From a485a36e78493d47b67ce8f7b10ecf0d0dc775c5 Mon Sep 17 00:00:00 2001
From: zzr99 <1940172413@qq.com>
Date: 星期三, 17 十一月 2021 17:42:26 +0800
Subject: [PATCH] 基础资料:增加 故障原因列表 增加故障原因列表编辑

---
 WebTM/views/PublicPage/MouldMaintainRuleInterList.html |   18 
 WebTM/views/基础资料/基础资料/Gy_ConkReasonEdit.html           |  273 ++++++++++++++++++++++++
 WebTM/views/基础资料/基础资料/Gy_ConkReasonList.html           |  292 ++++++++++++++++++++++++++
 WebTM/views/模治具管理/模治具管理/Gy_MouldFile.html              |    8 
 WebTM/views/index.html                                 |    1 
 WebTM/views/PublicPage/MouldDotCheckRuleInterList.html |   20 
 WebTM/WebTM.csproj                                     |    2 
 7 files changed, 591 insertions(+), 23 deletions(-)

diff --git a/WebTM/WebTM.csproj b/WebTM/WebTM.csproj
index 0fb11cf..573b295 100644
--- a/WebTM/WebTM.csproj
+++ b/WebTM/WebTM.csproj
@@ -586,6 +586,8 @@
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_MouldProdMoveStockBill.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_MouldProdOutStockBill.aspx" />
     <Content Include="views\鍩虹璧勬枡\鍏敤鍩虹璧勬枡\xmlLBM_MouldTypeBill.aspx" />
+    <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_ConkReasonEdit.html" />
+    <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_ConkReasonList.html" />
     <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckEdit.html" />
     <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_DotCheckList.html" />
     <Content Include="views\鍩虹璧勬枡\鍩虹璧勬枡\Gy_MaintainEdit.html" />
diff --git a/WebTM/views/PublicPage/MouldDotCheckRuleInterList.html b/WebTM/views/PublicPage/MouldDotCheckRuleInterList.html
index bfbe939..54f0dcc 100644
--- a/WebTM/views/PublicPage/MouldDotCheckRuleInterList.html
+++ b/WebTM/views/PublicPage/MouldDotCheckRuleInterList.html
@@ -36,15 +36,15 @@
                                         <div class="layui-col-xs12 layui-inline">
                                             <div class="layui-row">
                                                 <div class="layui-inline">
-                                                    <label class="layui-form-label">鍛ㄦ湡鍗曚綅</label>
+                                                    <label class="layui-form-label">瑙勭▼鍗曞彿</label>
                                                     <div class="layui-input-block">
-                                                        <input type="text" class="layui-input" name="HCycleUnit" id="HCycleUnit">
+                                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                                     </div>
                                                 </div>
                                                 <div class="layui-inline">
-                                                    <label class="layui-form-label">淇濆吇鍛ㄦ湡</label>
+                                                    <label class="layui-form-label">鍛ㄦ湡鍗曚綅</label>
                                                     <div class="layui-input-block">
-                                                        <input type="text" class="layui-input" name="HCheckCycle" id="HCheckCycle">
+                                                        <input type="text" class="layui-input" name="HCycleUnit" id="HCycleUnit">
                                                     </div>
                                                 </div>
                                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -87,8 +87,8 @@
                 , laydate = layui.laydate
                 , util = layui.util
                 , tree = layui.tree
-            var sWhere = " where HStopFlag=0 and HEndFlag<>'1' "; //鏍戝瀷100046  sessionStorage["OrganizationID"]
-            var sWhere1 = " where HStopFlag=0 and HEndFlag=1 ";  //鍒楄〃
+            var sWhere = ""; //鏍戝瀷100046  sessionStorage["OrganizationID"]
+            var sWhere1 = "where 1=1";  //鍒楄〃
 
             var option = {
                 elem: '#mainTable'
@@ -99,7 +99,7 @@
                 , cols: [[
                     { type: 'radio', fixed: 'left' }
                     , { field: 'hmainid', title: 'HInterID', sort: true, hide: true }
-                    , { field: '鐐规鍛ㄦ湡', title: '鐐规鍛ㄦ湡' }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
                     , { field: '鍛ㄦ湡鍗曚綅', title: '鍛ㄦ湡鍗曚綅' }
                 ]]
             };
@@ -190,10 +190,10 @@
         }
 
         function SeachFilter(sWhere1) {
-            var HCheckCycle = $("#HCheckCycle").val();
+            var HBillNo= $("#HBillNo").val();
             var HCycleUnit = $("#HCycleUnit").val();
-            if (HCycleUnit) {
-                sWhere1 += " and 鐐规鍛ㄦ湡 like '%" + HCheckCycle + "%'";
+            if (HBillNo) {
+                sWhere1 += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
             }
             if (HCycleUnit) {
                 sWhere1 += " and 鍛ㄦ湡鍗曚綅 like '%" + HCycleUnit + "%'";
diff --git a/WebTM/views/PublicPage/MouldMaintainRuleInterList.html b/WebTM/views/PublicPage/MouldMaintainRuleInterList.html
index 7bd8096..b752646 100644
--- a/WebTM/views/PublicPage/MouldMaintainRuleInterList.html
+++ b/WebTM/views/PublicPage/MouldMaintainRuleInterList.html
@@ -36,15 +36,15 @@
                                         <div class="layui-col-xs12 layui-inline">
                                             <div class="layui-row">
                                                 <div class="layui-inline">
-                                                    <label class="layui-form-label">鍛ㄦ湡鍗曚綅</label>
+                                                    <label class="layui-form-label">瑙勭▼鍗曞彿</label>
                                                     <div class="layui-input-block">
-                                                        <input type="text" class="layui-input" name="HCycleUnit" id="HCycleUnit">
+                                                        <input type="text" class="layui-input" name="HBillNo" id="HBillNo">
                                                     </div>
                                                 </div>
                                                 <div class="layui-inline">
-                                                    <label class="layui-form-label">淇濆吇鍛ㄦ湡</label>
+                                                    <label class="layui-form-label">鍛ㄦ湡鍗曚綅</label>
                                                     <div class="layui-input-block">
-                                                        <input type="text" class="layui-input" name="HCheckCycle" id="HCheckCycle">
+                                                        <input type="text" class="layui-input" name="HCycleUnit" id="HCycleUnit">
                                                     </div>
                                                 </div>
                                                 <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
@@ -99,7 +99,7 @@
                 , cols: [[
                     { type: 'radio', fixed: 'left' }
                     , { field: 'hmainid', title: 'HInterID', sort: true, hide: true }
-                    , { field: 'HCheckCycle', title: '淇濆吇鍛ㄦ湡' }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�' }
                     , { field: 'HCycleUnit', title: '鍛ㄦ湡鍗曚綅' }
                 ]]
             };
@@ -190,13 +190,13 @@
         }
 
         function SeachFilter(sWhere1) {
-            var HCheckCycle = $("#HCheckCycle").val();
+            var HBillNo = $("#HBillNo").val();
             var HCycleUnit = $("#HCycleUnit").val();
-            if (HCycleUnit) {
-                sWhere1 += " and HCheckCycle like '%" + HCheckCycle + "%'";
+            if (HBillNo) {
+                sWhere1 += " and 鍗曟嵁鍙� like '%" + HBillNo + "%'";
             }
             if (HCycleUnit) {
-                sWhere1 += " and HCycleUnit like '%" + HCycleUnit + "%'";
+                sWhere1 += " and 鍛ㄦ湡鍗曚綅 like '%" + HCycleUnit + "%'";
             }
             return sWhere1;
         }
diff --git a/WebTM/views/index.html b/WebTM/views/index.html
index 0f0c52a..3d6a4bf 100644
--- a/WebTM/views/index.html
+++ b/WebTM/views/index.html
@@ -773,6 +773,7 @@
                                         <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_Source.html">鐢熶骇璧勬簮鍒楄〃</a></dd>
                                         <dd><a lay-href="鍩虹璧勬枡/宸ヨ祫鍩虹璧勬枡/Gy_Group.html">鐢熶骇鐝粍鍒楄〃</a></dd>
                                         <dd><a lay-href="鍩虹璧勬枡/鐢熶骇鍩虹璧勬枡/Gy_BadReason.html">涓嶈壇鍘熷洜鍒楄〃</a></dd>
+                                        <dd><a lay-href="鍩虹璧勬枡/鍩虹璧勬枡/Gy_ConkReasonList.html">鏁呴殰鍘熷洜鍒楄〃</a></dd>
                                     </dl>
                                 </dd>
                                 <dd>
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonEdit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonEdit.html"
new file mode 100644
index 0000000..6e74592
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonEdit.html"
@@ -0,0 +1,273 @@
+锘�<!DOCTYPE html>
+<html>
+<head>
+    <meta charset="utf-8" />
+    <title>鏂板/缂栬緫鏁呴殰鍘熷洜</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=0">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+</head>
+<body>
+
+    <div id="layout1" class="layui-fluid">
+        <div class="layui-row layui-col-space15">
+            <div class="layui-col-md12">
+                <div class="layui-card">
+                    <form id="form0" class="layui-form" lay-filter="component-form-group" action="">
+                        <div class="layui-card-header">
+                            <div class="layui-btn-group">
+
+                                <button type="button" id="add-btn" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Saver">淇濆瓨</button>
+                                <button type="button" class="layui-btn layui-btn-normal layui-btn-radius" lay-submit="" lay-filter="Exit">閫�鍑�</button>
+
+                            </div>
+
+                        </div>
+                        <div class="layui-card-body">
+                            <div class="layui-tab layui-tab-brief" lay-filter="docDemoTabBrief">
+                                <!--<ul class="layui-tab-title">
+                                <li class="layui-this">鍩烘湰淇℃伅</li>-->
+                                <!--<li>鍏朵粬淇℃伅</li>-->
+                                <!--</ul>-->
+                                <h1 style="text-align:center;"><b>鏁呴殰鍘熷洜</b></h1>
+                                <div class="layui-tab-content">
+                                    <div class="layui-tab-item layui-show">
+                                        <input type="hidden" class="layui-input" name="user" id="user">
+                                        <div class="layui-form-item">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 120px">浠g爜锛�</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HNumber" lay-verify="HNumber" id="HNumber" autocomplete="off">
+                                                    <input name="HItemID" id="HItemID" autocomplete="off" type="hidden">
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 120px">鍚嶇О锛�</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HName" id="HName" autocomplete="off">
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 120px">鍔╄鐮侊細</label>
+                                                <div class="layui-input-inline">
+                                                    <input class="layui-input" name="HHelpCode" id="HHelpCode" autocomplete="off">
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="layui-form-item">
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 120px">鎻忚堪锛�</label>
+                                                <div class="layui-input-inline">
+                                                    <div class="layui-input-inline">
+                                                        <textarea placeholder="璇疯緭鍏ユ晠闅滄弿杩�" class="layui-textarea" name="HExplanation" id="HExplanation"></textarea>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label" style="width: 120px">澶囨敞锛�</label>
+                                                <div class="layui-input-inline">
+                                                    <div class="layui-input-inline">
+                                                        <textarea placeholder="璇疯緭鍏ユ晠闅滄弿杩�" class="layui-textarea" name="HRemark" id="HRemark"></textarea>
+                                                    </div>
+                                                </div>
+                                            </div>
+                                            <div class="layui-inline">
+                                                <label class="layui-form-label">浣跨敤鐘舵�侊細</label>
+                                                <div class="layui-input-block">
+                                                    <select name="HUseFlag" lay-filter="aihao" id="HUseFlag">
+                                                        <option value="鏈娴�" selected="selected">鏈娴�</option>
+                                                        <option value="鏈娴�">鏈娴�</option>
+                                                        <option value="宸蹭娇鐢�">宸蹭娇鐢�</option>
+                                                    </select>
+                                                </div>
+                                            </div>
+                                        </div>
+                                        <div class="layui-form-item">
+                                            <label class="layui-form-label"> 绂佺敤鏍囧織:</label>
+                                            <div class="layui-input-inline">
+                                                <!--<input type="checkbox" name="checkboxHStopflag" id="checkboxHStopflag" lay-skin="primary" lay-filter="checkboxHStopflag" value="true">-->
+                                                <input type="checkbox" name="HStopflag" id="HStopflag" lay-skin="primary" title="" value="">
+                                            </div>
+                                        </div>
+                                    </div>
+                                </div>
+                            </div>
+                        </div>
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script src="../../../layuiadmin/PubCustom.js"></script>
+    <script>
+        //鑾峰彇鍙傛暟
+        var params = get_UrlVars();
+        if (typeof (params[params[0]]) == "undefined") {
+            var OperationType = 1;//鎿嶄綔绫诲瀷
+        } else {
+            var OperationType = params[params[0]];//鎿嶄綔绫诲瀷
+            var linterid = params[params[1]];//婧愬崟id
+            var HSouceBillType = params[params[2]];//婧愬崟绫诲瀷
+        }
+
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index' //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'laydate', 'table', 'element'], function () {
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , laydate = layui.laydate
+                , element = layui.element;
+            //#endregion
+
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+            //鍒ゆ柇鎿嶄綔绫诲瀷
+            if (OperationType == 1) {//鏃犳簮鍗�
+                set_AddFNew();
+            }
+            else if (OperationType == 3) {//缂栬緫
+                set_EditFromGrid();
+            }
+            else {
+                layer.alert("鏈煡鎿嶄綔绫诲瀷锛�", { icon: 5 });
+            }
+            //#endregion
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+            //淇濆瓨
+            form.on('submit(Saver)', function (data) {//淇濆瓨
+
+                var isEndCheck = document.getElementById("HStopflag").checked;
+                isEndCheck == true ? data.field.HStopflag = 'true' : data.field.HStopflag = 'false';//灏嗘暟缁勫悎骞舵垚瀛楃涓�
+                var user = sessionStorage["HUserName"];
+                var sMainStr = JSON.stringify(data.field) + ";" + user;
+                if (AllowLoadData()) {
+                    $.ajax(
+                        {
+                            type: "POST",
+                            url: GetWEBURL() + "Gy_ConkReasonBill/SaveGy_ConkReason", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            async: true,
+                            data: { "msg": sMainStr },
+                            dataType: "json",
+                            success: function (data) {
+                                if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                                    layer.msg(data.Message, { icon: 1 });
+                                    $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
+                                }
+                                else {
+                                    f_alert(data.Message);
+                                    console.log("Reason" + sMainStr + "sub:" + JSON.stringify(layui.table.cache.mainTable));
+                                }
+                                layer.closeAll("loading");
+                            },
+                            error: function (err) {
+
+                                f_alert("閿欒:" + err);
+                                console.log("Reason" + sMainStr);
+                            }
+                        });
+                }
+            });
+            //閫�鍑�
+            form.on('submit(Exit)', function (data) {//
+                if (linterid == undefined) {
+                    //鍏抽棴椤电
+                    Pub_Close(2);
+                }
+                else {
+                    //鍏抽棴椤电
+                    Pub_Close(1);
+                }
+            });
+            ////绂佺敤鏍囧織
+            //form.on('checkbox(HStopflag)', function (data) {
+            //    $("#HStopflag").val(data.elem.checked);
+            //});
+            //鐩戝惉鎻愪氦
+            form.verify({
+                numberOrEmpty: function (value, item) {
+                    // if (value != '') {
+                    if (!/^\d+$/.test(value)) {
+                        return '涓嶈兘涓虹┖鎴栨暟瀛楁垨鑰�0';
+                    }
+                    //}
+                }
+            });
+            //#endregion
+
+
+            //#region 褰撳墠椤甸潰闈㈡墍鏈夌殑鏂规硶
+
+            //鏃犳簮鍗曟柊澧�
+            function set_AddFNew() {
+                $("#HItemID").val("0");
+                $("#HNumber").val("");
+            }
+            //缂栬緫
+            function set_EditFromGrid() {
+                $("#HItemID").val(linterid);
+                set_EditForm(linterid);  //缂栬緫鑾峰彇琛ㄥご
+            }
+            //缂栬緫鍔犺浇琛ㄥご
+            function set_EditForm(linterid) {
+                //鏌ヨ妫�楠屾柟妗堝崟鏄惁瀛樺湪
+                $.ajax({
+                    url: GetWEBURL() + "Gy_ConkReasonBill/GetConkReasonByID",
+                    type: "GET",
+                    data: {
+                        "HID": linterid
+                    },
+                    success: function (result) {
+                        if (result.code == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+                            var data = result.data.h_v_IF_Edit_BadReasonList[0];
+                            $("#HNumber").val(data.HNumber);//浠g爜
+                            $("#HItemID").val(data.HItemID);//浠g爜ID
+                            $("#HName").val(data.HName);//鍚嶇О
+                            $("#HHelpCode").val(data.HHelpCode);//鍔╄浠g爜
+                            $("#HExplanation").val(data.HExplanation);//鎻忚堪
+                            $("#HRemark").val(data.HRemark);//澶囨敞
+                            $("#HUseFlag").val(data.HUseFlag);//浣跨敤鐘舵��
+                            $("input[name='HStopflag']").attr("checked", data.绂佺敤鏍囪);//true:閫変腑 false:涓嶉�変腑
+                            layui.form.render();//瀹炴椂娓叉煋閫変腑鍜屼笉閫変腑鐨勬牱寮�,鏈�濂芥坊鍔犺繖鍙ヨ瘽
+
+                        } else {
+                            layer.alert(result.msg, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
+                        }
+                    }, error: function () {
+                        layer.alert("鍙戠敓閿欒!", { icon: 5 });
+                    }
+                });
+            }
+            //鏁版嵁楠岃瘉
+            function AllowLoadData() {
+                if ($("#HHelpCode").val() == '') {
+                    layer.msg("璇峰~鍐欏姪璁扮爜", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                    return false;
+                }
+                else {
+                    return true;
+                }
+            }
+            //
+            function f_alert(sMsg) {
+                layer.alert(sMsg, { icon: 5 });
+
+            }
+            //#endregion
+        });
+
+    </script>
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonList.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonList.html"
new file mode 100644
index 0000000..0001591
--- /dev/null
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\345\237\272\347\241\200\350\265\204\346\226\231/Gy_ConkReasonList.html"
@@ -0,0 +1,292 @@
+锘�<!DOCTYPE html>
+<html xmlns="http://www.w3.org/1999/xhtml">
+<head>
+    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
+    <title>鏁呴殰鍘熷洜鍒楄〃</title>
+    <meta name="renderer" content="webkit">
+    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
+    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
+    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
+    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+
+</head>
+<body>
+    <div class="layui-fluid">
+        <div class="layui-col-md12">
+            <div class="layui-card" style="padding: 1px">
+                <div class="layui-card-body" style="padding: 1px;">
+
+                    <form class="layui-form" action="" lay-filter="component-form-group">
+
+                        <div class="layui-collapse">
+                            <div class="layui-colla-item">
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;">鏁呴殰鍘熷洜浠g爜</label>
+                                    <div class="layui-input-block" style="margin-left: 120px;">
+                                        <input type="text" class="layui-input" name="HNumber" id="HNumber">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label" style="width: 85px;">鏁呴殰鍘熷洜鍚嶇О</label>
+                                    <div class="layui-input-block" style="margin-left: 120px;">
+                                        <input type="text" class="layui-input" name="HName" id="HName">
+                                    </div>
+                                </div>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnSearch" id="btnSearch">
+                                    <i class="layui-icon layui-icon-search layuiadmin-button-btn"></i>
+                                </button>
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+
+                            </div>
+                        </div>
+
+                        <table class="" id="mainTable" lay-filter="mainTable"></table>
+                        <script type="text/html" id="toolbarDemo">
+                            <div class="layui-btn-container">
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Add"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Edit"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-Delete"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                            </div>
+                        </script>
+
+                    </form>
+                </div>
+            </div>
+        </div>
+    </div>
+    <script src="../../../layuiadmin/layui/layui.js"></script>
+    <script src="../../../layuiadmin/Scripts/json2.js"></script>
+    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
+    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
+    <script>
+        layui.config({
+            base: '../../../layuiadmin/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
+        }).extend({
+            index: 'lib/index', //涓诲叆鍙fā鍧�
+        }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+            //#region 鍏叡鍙橀噺
+            var $ = layui.$
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
+            //鏌ヨ鏉′欢
+            var sWhere = "";
+            var option = [];
+            //#endregion
+
+
+            //#region 杩涘叆椤甸潰鏃㈠姞杞�
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+            //#endregion
+
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
+            //澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                var checkStatus = table.checkStatus(obj.config.id);
+                switch (obj.event) {
+                    //鏂板
+                    case 'btn-Add': set_AddNew();
+                        break;
+                    //缂栬緫
+                    case 'btn-Edit': set_ShowBill();
+                        break;
+                    //鍒犻櫎
+                    case 'btn-Delete': set_DeleteBill();
+                        break;
+                };
+            });
+            //鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {
+                get_FastQuery();
+            });
+            // 閲嶇疆鎸夐挳
+            form.on('submit(btnReSearch)', function (data) {
+                set_ClearQuery();
+            });
+            //#endregion
+
+
+            //#region 姝ら〉闈㈡墍鏈夋柟娉�
+            // 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+            }
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , limits: [20, 50, 100, 150, 200, 250]
+                    , limit: 20
+                    , page: true
+                    , cellMinWidth: 90
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                        , { field: 'hitemid', title: 'HItemID', sort: true, hide: true }
+                        , { field: '鏁呴殰鍘熷洜浠g爜', title: '鏁呴殰鍘熷洜浠g爜' }
+                        , { field: '鏁呴殰鍘熷洜', title: '鏁呴殰鍘熷洜鍚嶇О' }
+                        , { field: '鎻忚堪', title: '鏁呴殰鎻忚堪' }
+                        , { field: '绂佺敤鏍囪', title: '绂佺敤鏍囪' }
+                        , { field: '澶囨敞', title: '澶囨敞' }
+                    ]]
+                };
+            }
+            //鏌ヨ
+            function get_Display(sWhere) {
+                var index = layer.load(0, { shade: false });
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
+                $.ajax({
+                    url: GetWEBURL() + '/Gy_ConkReasonBill/Get_ConkReasonBillList',
+                    type: "GET",
+                    data: { "sWhere": sWhere },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.close(index);
+                        } else {
+                            layer.close(index);
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.close(index);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+            }
+            //蹇�熸煡璇�
+            function get_FastQuery() {
+                var HNumber = $("#HNumber").val();
+                var HName = $("#HName").val();
+                if (HNumber) {
+                    sWhere += " and 鏁呴殰鍘熷洜浠g爜 like '%" + HNumber + "%'";
+                }
+                if (HName) {
+                    sWhere += " and 鏁呴殰鍘熷洜 like '%" + HName + "%'";
+                }
+                $.ajax({
+                    url: GetWEBURL() + '/Gy_ConkReasonBill/Get_ConkReasonBillList',
+                    type: "GET",
+                    data: { "sWhere": sWhere },
+                    success: function (data1) {
+                        if (data1.count == 1) {
+                            option.data = data1.data;
+                            table.render(option);
+                            layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                        } else {
+                            layer.alert(data1.code + data1.Message, { icon: 5 });
+                        }
+                    }, error: function () {
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                    }
+                });
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
+            //閲嶇疆蹇�熸煡璇�
+            function set_ClearQuery() {
+                $("#HNumber").val("");
+                $("#HName").val("");
+                $("#btnSearch").click();
+            }
+            //鏂板
+            function set_AddNew() {
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鏂板涓嶈壇鍘熷洜',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['100%', '100%'],
+                    maxmin: true,
+                    content: '../鍩虹璧勬枡/Gy_ConkReasonEdit.html?OperationType=1&linterid=&HSouceBillType=',
+                    end: function () {
+                        //鍒锋柊椤甸潰,
+                        location.reload();
+                    },
+                    success: function (layero, index) {
+
+                    }
+                });
+            }
+            //缂栬緫
+            function set_ShowBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var hID = data[0].HItemID.toString();
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '缂栬緫涓嶈壇鍘熷洜'
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../鍩虹璧勬枡/Gy_ConkReasonEdit.html?OperationType=3&linterid=' + hID + '&HSouceBillType='
+                        , resize: false,
+                        end: function () {
+                            //鍒锋柊椤甸潰,
+                            location.reload();
+                        }
+                        , cancel: function () {
+                            //$(".layui-btn").removeClass("layui-btn-disabled");
+                        }
+                    })
+
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+            //鍒犻櫎
+            function set_DeleteBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var HItemID = data[0].hitemid.toString();
+                    //閫昏緫鍒犻櫎鏂规硶
+                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                        $.ajax({
+                            type: "GET",
+                            url: GetWEBURL() + "/Gy_ConkReasonBill/set_DeleteBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            data: { "HItemID": HItemID },
+                            success: function (result) {
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { time: 1 * 1000, icon: 1 }, function () {
+                                        // 寰楀埌frame绱㈠紩
+                                        var index = layer.getFrameIndex(window.name);
+                                        //鍏抽棴褰撳墠frame
+                                        layer.close(index);
+                                        //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                        window.location.reload();
+                                    });
+
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                            }
+                        });
+                    })
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+            }
+            //#endregion
+
+            //浠ヤ笂鏄痩ayui妯″潡
+        });
+    </script>
+
+</body>
+</html>
\ No newline at end of file
diff --git "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html" "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html"
index 0fc990d..feefb50 100644
--- "a/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html"
+++ "b/WebTM/views/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/\346\250\241\346\262\273\345\205\267\347\256\241\347\220\206/Gy_MouldFile.html"
@@ -858,7 +858,7 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        $("#HMouldMaintainRuleInterName").val(checkStatus.data[0].HCheckCycle);
+                        $("#HMouldMaintainRuleInterName").val(checkStatus.data[0].鍗曟嵁鍙�);
                         $("#HMouldMaintainRuleInterID").val(checkStatus.data[0].hmainid);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -895,7 +895,7 @@
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
-                        $("#HMouldDotCheckRuleInterName").val(checkStatus.data[0].鐐规鍛ㄦ湡);
+                        $("#HMouldDotCheckRuleInterName").val(checkStatus.data[0].鍗曟嵁鍙�);
                         $("#HMouldDotCheckRuleInterID").val(checkStatus.data[0].hmainid);
                         layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
                     }
@@ -1010,9 +1010,9 @@
                         $("#HLeaveLife").val(d.data[0].鍓╀綑瀵垮懡);
                         $("#HProdQty").val(d.data[0].宸茬敓浜ф暟閲�);
                         $("#HProdWeight").val(d.data[0].宸茬敓浜ч噸閲�);
-                        $("#HMouldDotCheckRuleInterName").val(d.data[0].鐐规鍛ㄦ湡);
+                        $("#HMouldDotCheckRuleInterName").val(d.data[0].鐐规瑙勭▼鍗曞彿);
                         $("#HMouldDotCheckRuleInterID").val(d.data[0].HMouldDotCheckRuleInterID);
-                        $("#HMouldMaintainRuleInterName").val(d.data[0].淇濆吇鍛ㄦ湡);
+                        $("#HMouldMaintainRuleInterName").val(d.data[0].淇濆吇瑙勭▼鍗曞彿);
                         $("#HMouldMaintainRuleInterID").val(d.data[0].HMouldMaintainRuleInterID);
                     }
 

--
Gitblit v1.9.1