From 66d9462e988879fc037e96e3449a95d376e3831b Mon Sep 17 00:00:00 2001
From: 仲国强 <519541279@qq.com>
Date: 星期三, 08 九月 2021 14:25:28 +0800
Subject: [PATCH] 工艺路线优化sz

---
 WebTM/views/计划管理/工艺路线/Gy_RoutingBillList.html |  400 ++++++++++++++++++++++++++++++++++++++------------------
 1 files changed, 272 insertions(+), 128 deletions(-)

diff --git "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html" "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
index 70076c3..2848953 100644
--- "a/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
+++ "b/WebTM/views/\350\256\241\345\210\222\347\256\241\347\220\206/\345\267\245\350\211\272\350\267\257\347\272\277/Gy_RoutingBillList.html"
@@ -1,7 +1,7 @@
 锘�<!DOCTYPE html>
 <html xmlns="http://www.w3.org/1999/xhtml">
 <head>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+    <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">
@@ -9,7 +9,11 @@
     <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>
-    
+    <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>
+
 </head>
 <body>
     <div class="layui-fluid">
@@ -19,11 +23,6 @@
                     <form class="layui-form" action="" lay-filter="component-form-group">
                         <div class="layui-collapse">
                             <div class="layui-colla-item">
-                                <div class="layui-colla-title layui-inline">
-                                    <div class="layui-inline">
-                                        <span></span>
-                                    </div>
-                                </div>
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鍗曟嵁鍙�</label>
                                     <div class="layui-input-block">
@@ -31,7 +30,7 @@
                                     </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="hnumber" id="hnumber">
                                     </div>
@@ -52,13 +51,11 @@
                         <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-getCheckData"><i class="layui-icon layui-icon-tips"></i>棰勮</button>-->
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-reload"><i class="layui-icon layui-icon-refresh"></i>鍒锋柊</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-confirm" id="btn_confirm"><i class="layui-icon layui-icon-ok-circle"></i>纭</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-back" id="btn_back"><i class="layui-icon layui-icon-close-fill"></i>椹冲洖</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-details"><i class="layui-icon layui-icon-form"></i>璇︽儏</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-generate"><i class="layui-icon layui-icon-file"></i>鐢熸垚閫佽揣鍗�</button>
-                                <button type="button" class="layui-btn layui-btn-sm" lay-event="btn-exit"><i class="layui-icon layui-icon-return"></i>閫�鍑�</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_AddNew"><i class="layui-icon layui-icon-file-b"></i>鏂板</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_ShowBill"><i class="layui-icon layui-icon-form"></i>缂栬緫</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="set_DeleteBill"><i class="layui-icon layui-icon-delete"></i>鍒犻櫎</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Refresh"><i class="layui-icon layui-icon-refresh-3"></i>鍒锋柊</button>
+                                <button type="button" class="layui-btn layui-btn-sm" lay-event="get_Exit"><i class="layui-icon layui-icon-logout"></i>閫�鍑�</button>
 
                             </div>
                         </script>
@@ -67,10 +64,6 @@
             </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/' //闈欐�佽祫婧愭墍鍦ㄨ矾寰�
@@ -78,96 +71,156 @@
             index: 'lib/index', //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'table', 'element', 'laypage','laydate'], function () {
             var $ = layui.$
-            , admin = layui.admin
-            , layer = layui.layer
-            , table = layui.table
-            , form = layui.form
-            , element = layui.element
-            , laypage = layui.laypage
-            , laydate = layui.laydate
+                , admin = layui.admin
+                , layer = layui.layer
+                , table = layui.table
+                , form = layui.form
+                , element = layui.element
+                , laypage = layui.laypage
+                , laydate = layui.laydate
             //var sWhere = " 浜у搧浠g爜 = 'BX0002'";
             var sWhere = "";
+            var option = [];
 
-            var option = {
-                elem: '#mainTable'
-                //, toolbar: '#toolbarDemo'
-                ,height: 'full-50' 
-                , page: true
-                ,cellMinWidth: 90
-                , cols: [[
-                    //{ field: 'hmainid', title: 'hmainid', width: 110 }
-                    { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true, width: 165 }
-                    , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
-                    , { field: '宸ヨ壓鍚嶇О', title: '宸ヨ壓鍚嶇О', width: 170 }
-                    //, { field: 'hmaterid', title: 'hmaterid', width: 165 }
-                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 160 }
-                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 160 }
-                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 215 }
-                    , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 115 }
-                    , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' }
-                    , { field: '榛樿宸ヨ壓', title: '榛樿宸ヨ壓' }
-                    , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
-                    //, { field: 'hsubid', title: 'hsubid', width: 80 }
-                    , { field: '宸ュ簭鍙�', title: '宸ュ簭鍙�' }
-                    , { field: '濮斿鏍囪', title: '濮斿鏍囪' }
-                    //, { field: 'hprocid', title: 'hprocid', width: 105 }
-                    , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' }
-                    , { field: '宸ュ簭', title: '宸ュ簭' }
-                    //, { field: 'HSupID', title: 'HSupID', width: 105 }
-                    , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' }
-                    , { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }
-                    //, { field: 'HCenterID', title: 'HCenterID', width: 105 }
-                    , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 115 }
-                    , { field: '宸ヤ綔涓績鍚嶇О', title: '宸ヤ綔涓績鍚嶇О', width: 115 }
-                    , { field: '鏃堕棿鍗曚綅', title: '鏃堕棿鍗曚綅' }
-                    , { field: '杩愯鏃堕棿', title: '杩愯鏃堕棿' }
-                    , { field: '鍔犲伐鏁伴噺', title: '鍔犲伐鏁伴噺' }
-                    , { field: '鍑嗗鏃堕棿', title: '鍑嗗鏃堕棿' }
-                    , { field: '鎺掗槦鏃堕棿', title: '鎺掗槦鏃堕棿' }
-                    , { field: '杞Щ鏃堕棿', title: '杞Щ鏃堕棿' }
-                    , { field: '鑹巼', title: '鑹巼' }
-                    , { field: '绱鑹巼', title: '绱鑹巼' }
-                    , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
-                    , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
-                    , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡' }
-                    , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
-                    , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡' }
-                    , { field: '淇敼浜�', title: '淇敼浜�' }
-                    , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡' }
-                    , { field: '浣滃簾浜�', title: '浣滃簾浜�' }
-                    , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
-                    //, { field: 'HDayWorkQty', title: 'HDayWorkQty', width: 105 }
-                    //, { field: 'HGroupID', title: 'HGroupID', width: 105 }
-                    //, { field: 'HWorkerID', title: 'HWorkerID', width: 105 }
-                    //, { field: 'HSourceID', title: 'HSourceID', width: 105 }
-                    , { field: '鍔犲伐鍗曚环', title: '鍔犲伐鍗曚环' }
-                    //, { field: 'HNextProcFlag', title: 'HNextProcFlag', width: 105 }
-                    , { field: '涓嬮亾娴佽浆宸ュ簭', title: '涓嬮亾娴佽浆宸ュ簭'}
-                    , { field: '娴佽浆宸ュ簭', title: '娴佽浆宸ュ簭' }
-                ]]
-            };
 
-            var index = layer.load(0, { shade: false });
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+
+            //#endregion
+
+            //#region 澶村伐鍏锋爮浜嬩欢
+            table.on('toolbar(mainTable)', function (obj) {
+                switch (obj.event) {
+                    //鏂板
+                    case 'set_AddNew': set_AddNew();
+                        break;
+                    //缂栬緫
+                    case 'set_ShowBill': set_ShowBill();
+                        break;
+                    //鍒犻櫎
+                    case 'set_DeleteBill': set_DeleteBill();
+                        break;
+                    //娴忚
+                    case 'get_PrintReport': get_PrintReport();
+                        break;
+                    //鍒锋柊
+                    case 'get_Refresh': get_Refresh();
+                        break;
+                    //閫�鍑烘寜閽�
+                    case 'get_Exit': Pub_Close(2);
+                        break;
+                };
+            });
+
+            //#endregion
+
+            //#region 鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+            }
+            //#endregion
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , cellMinWidth: 90
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                        //{ field: 'hmainid', title: 'hmainid', width: 110 }
+                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', sort: true, width: 165 }
+                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷' }
+                        , { field: '宸ヨ壓鍚嶇О', title: '宸ヨ壓鍚嶇О', width: 170 }
+                        //, { field: 'hmaterid', title: 'hmaterid', width: 165 }
+                        , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', width: 160 }
+                        , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', width: 160 }
+                        , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', width: 215 }
+                        , { field: '璁¢噺鍗曚綅浠g爜', title: '璁¢噺鍗曚綅浠g爜', width: 115 }
+                        , { field: '璁¢噺鍗曚綅', title: '璁¢噺鍗曚綅' }
+                        , { field: '榛樿宸ヨ壓', title: '榛樿宸ヨ壓' }
+                        , { field: '琛ㄥご澶囨敞', title: '琛ㄥご澶囨敞' }
+                        //, { field: 'hsubid', title: 'hsubid', width: 80 }
+                        , { field: '宸ュ簭鍙�', title: '宸ュ簭鍙�' }
+                        , { field: '濮斿鏍囪', title: '濮斿鏍囪' }
+                        //, { field: 'hprocid', title: 'hprocid', width: 105 }
+                        , { field: '宸ュ簭浠g爜', title: '宸ュ簭浠g爜' }
+                        , { field: '宸ュ簭', title: '宸ュ簭' }
+                        //, { field: 'HSupID', title: 'HSupID', width: 105 }
+                        , { field: '渚涘簲鍟嗕唬鐮�', title: '渚涘簲鍟嗕唬鐮�' }
+                        , { field: '渚涘簲鍟�', title: '渚涘簲鍟�' }
+                        //, { field: 'HCenterID', title: 'HCenterID', width: 105 }
+                        , { field: '宸ヤ綔涓績浠g爜', title: '宸ヤ綔涓績浠g爜', width: 115 }
+                        , { field: '宸ヤ綔涓績鍚嶇О', title: '宸ヤ綔涓績鍚嶇О', width: 115 }
+                        , { field: '鏃堕棿鍗曚綅', title: '鏃堕棿鍗曚綅' }
+                        , { field: '杩愯鏃堕棿', title: '杩愯鏃堕棿' }
+                        , { field: '鍔犲伐鏁伴噺', title: '鍔犲伐鏁伴噺' }
+                        , { field: '鍑嗗鏃堕棿', title: '鍑嗗鏃堕棿' }
+                        , { field: '鎺掗槦鏃堕棿', title: '鎺掗槦鏃堕棿' }
+                        , { field: '杞Щ鏃堕棿', title: '杞Щ鏃堕棿' }
+                        , { field: '鑹巼', title: '鑹巼' }
+                        , { field: '绱鑹巼', title: '绱鑹巼' }
+                        , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞' }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�' }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 195 }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�' }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 180 }
+                        , { field: '淇敼浜�', title: '淇敼浜�' }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 180 }
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�' }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡' }
+                        //, { field: 'HDayWorkQty', title: 'HDayWorkQty', width: 105 }
+                        //, { field: 'HGroupID', title: 'HGroupID', width: 105 }
+                        //, { field: 'HWorkerID', title: 'HWorkerID', width: 105 }
+                        //, { field: 'HSourceID', title: 'HSourceID', width: 105 }
+                        , { field: '鍔犲伐鍗曚环', title: '鍔犲伐鍗曚环' }
+                        //, { field: 'HNextProcFlag', title: 'HNextProcFlag', width: 105 }
+                        , { field: '涓嬮亾娴佽浆宸ュ簭', title: '涓嬮亾娴佽浆宸ュ簭', width: 150 }
+                        , { field: '娴佽浆宸ュ簭', title: '娴佽浆宸ュ簭' }
+                    ]]
+                };
+            }
+            //var index = layer.load(0, { shade: false });
             //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
-            $.ajax({
-                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                url: GetWEBURL() + '/LEMS/MES_Gy_RoutingBillList_Json',
-                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 });
-                }
-            }); 
+            //$.ajax({
+            //    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
+            //    url: GetWEBURL() + '/LEMS/MES_Gy_RoutingBillList_Json',
+            //    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 });
+            //    }
+            //});
+
+            //#region 閲嶇疆杩囨护鏉′欢鏂规硶
+            function set_ClearQuery() {
+                $("#HNumber").val("");
+                $("#HName").val("");
+                sWhere = "";
+            }
+            //#endregion
+
+            //#region 鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
+
+                get_FastQuery();
+            });
+            //#endregion
 
             //閲嶇疆鎸夐挳
             form.on('submit(btnReSearch)', function (data) {
@@ -175,22 +228,12 @@
                 $("#hnumber").val("");//鐗╂枡
                 $("#HOrderProcNO").val("");//鍗曟嵁绫诲瀷
                 $("#btnSearch").click();
+                set_ClearQuery();
             });
 
-            //鏌ヨ鎸夐挳
-            form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
-                var HOrderProcNO = $("#HOrderProcNO").val();//鍗曟嵁绫诲瀷
-                var hnumber = $("#hnumber").val();//鐗╂枡
-                var WorkCenter = $("#WorkCenter").val();//鍗曟嵁鍙�
-                if (HOrderProcNO) {
-                    sWhere += " and 鍗曟嵁绫诲瀷 like '%" + HOrderProcNO + "%'";
-                }
-                if (hnumber) {
-                    sWhere += " and 鐗╂枡浠g爜 like '%" + hnumber + "%' or 鐗╂枡鍚嶇О like '%" + hnumber + "%'"
-                }
-                if (WorkCenter) {
-                    sWhere += " and 鍗曟嵁鍙� like '%" + WorkCenter + "%'";
-                }
+            //#region 鏌ヨ
+            function get_Display(sWhere) {
+                var ajaxLoad = layer.load();
                 $.ajax({
                     //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                     url: GetWEBURL() + '/LEMS/MES_Gy_RoutingBillList_Json',
@@ -200,30 +243,131 @@
                         if (data1.count == 1) {
                             option.data = data1.data;
                             table.render(option);
-                            layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
+                            layer.close(ajaxLoad);
+                            //layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                         } else {
+                            layer.close(ajaxLoad);
                             layer.alert(data1.code + data1.Message, { icon: 5 });
                         }
                     }, error: function () {
-                        layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+                        layer.close(ajaxLoad);
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
+            }
+            //#endregion
+
+
+            //#region 蹇�熻繃婊�
+            function get_FastQuery() {
+                var HOrderProcNO = $("#HOrderProcNO").val();//鍗曟嵁绫诲瀷
+                var hnumber = $("#hnumber").val();
+                //var HName = $("#HName").val();
+                var WorkCenter = $("#WorkCenter").val();//鍗曟嵁鍙�
+                if (HOrderProcNO) {
+                    sWhere += " and 鍗曟嵁绫诲瀷 like '%" + HOrderProcNO + "%'";
+                }
+                if (hnumber) {
+                    sWhere += " and 鐗╂枡浠g爜 like '%" + hnumber + "%' or 鐗╂枡鍚嶇О like '%" + hnumber + "%'";
+                }
+                if (WorkCenter) {
+                    sWhere += " and 鍗曟嵁鍙� like '%" + WorkCenter + "%'";
+                }
+                get_Display(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
-            });
+            }
+            //#endregion
+
+            //#region 鏂板
+            function set_AddNew() {
+                layer.open({
+                    type: 2
+                    , skin: 'layui-layer-rim' //鍔犱笂杈规
+                    , area: ['100%', '100%']
+                    , title: '宸ヨ壓璺嚎-鏂板'
+                    , shift: 0//寮瑰嚭鍔ㄧ敾
+                    , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=1&linterid=&HSouceBillType='
+                })
+            }
+            //#endregion
 
 
-            //laydate.render({
-            //    elem: '#HDate'
-            //    , type: 'datetime'
-            //    , trigger: 'click'
-            //    , format:'yyyy-MM-dd HH:mm'
-            //});
+            //#region 缂栬緫
+            function set_ShowBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var linterid = data[0].HItemID;
+                    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '宸ヨ壓璺嚎-缂栬緫'
+                        , shift: 0//寮瑰嚭鍔ㄧ敾
+                        , content: '../宸ヨ壓璺嚎/Gy_RoutingBill.html?OperationType=3&linterid=' + linterid + '&HSouceBillType='
+                    })
+                } else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
+                }
+            }
+            //#endregion
 
+            //#region 鍒犻櫎
+            function set_DeleteBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var hmainid = data[0].hmainid;
+                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                        var wait = layer.load();
+                        //閫昏緫鍒犻櫎鏂规硶
+                        $.ajax({
+                            url: GetWEBURL() + '/LEMS/DeltetGy_RoutingBillSub',
+                            type: "GET",
+                            data: { "lngBillKey": hmainid },
+                            success: function (result) {
+                                console.log('gouba' + result);
+                                if (result.count == 1) {
+                                    layer.msg(result.Message, { icon: 1 }, function () {
+                                        // 寰楀埌frame绱㈠紩
+                                        var index = layer.getFrameIndex(window.name);
+                                        //鍏抽棴褰撳墠frame
+                                        layer.close(wait);
+                                        //淇敼涓哄姛鍚庡埛鏂扮晫闈�
+                                        window.location.reload();
+                                    });
+                                } else {
+                                    layer.alert(result.code + result.Message, { icon: 5 });
+                                    layer.close(wait);
+                                }
+                            }, error: function () {
+                                layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
+                                layer.close(wait);
+                            }
+                        });
+                    })
+
+                }
+                else {
+                    layer.msg('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+
+            }
+            //#endregion
+
+
+
+            //#region 鍒锋柊
+            function get_Refresh() {
+                set_ClearQuery();
+                get_Display(sWhere);
+            }
+            //#endregion
 
             //浠ヤ笂鏄痩ayui妯″潡
         });
 
-        
+
 
 
     </script>

--
Gitblit v1.9.1