From 27f2006f4dd48ee116604b2a83aa0aabeec0d760 Mon Sep 17 00:00:00 2001
From: YL <YL@LAPTOP-SE03PLUR>
Date: 星期五, 27 八月 2021 17:42:42 +0800
Subject: [PATCH] nothing

---
 WebTM/views/基础资料/采购基础资料/Gy_Supplier_Edit.html         |    7 
 WebTM/views/模治具管理/模治具管理/Sc_MouldConkBookBillList.html |  479 +++++++++++++++++++++++++++--------------------------
 WebTM/views/基础资料/采购基础资料/Gy_Supplier.html              |   19 --
 3 files changed, 249 insertions(+), 256 deletions(-)

diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html"
index 328341b..5216d70 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier.html"
@@ -155,7 +155,6 @@
             function get_Display(sWhere) {
                 var index = layer.load(0, { shade: false });
                 $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
                     url: GetWEBURL() + '/Gy_Supplier/list',
                     type: "GET",
                     data: { "sWhere": sWhere },
@@ -184,23 +183,7 @@
                 if (HName) {
                     sWhere += " and 渚涘簲鍟嗗悕绉� like '%" + HName + "%'";
                 }
-                $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                    url: GetWEBURL() + '/Gy_Supplier/list',
-                    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 });
-                    }
-                });
+                get_Display(sWhere);
                 sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
             }
             // 閲嶇疆鎸夐挳
diff --git "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html" "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html"
index 4d6f323..5d35bf0 100644
--- "a/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html"
+++ "b/WebTM/views/\345\237\272\347\241\200\350\265\204\346\226\231/\351\207\207\350\264\255\345\237\272\347\241\200\350\265\204\346\226\231/Gy_Supplier_Edit.html"
@@ -57,6 +57,7 @@
                                 <label class="layui-form-label">缂栫爜</label>
                                 <div class="layui-input-inline">
                                     <input type="text" name="HNumber" id="HNumber" lay-verify="HNumber" autocomplete="off" placeholder="" class="layui-input">
+                                    <input type="hidden" name="HInterID" id="HInterID">
                                 </div>
                             </div>
                             <div class="layui-inline">
@@ -233,6 +234,7 @@
                                             <label class="layui-form-label">鍒涘缓浜�</label>
                                             <div class="layui-input-inline">
                                                 <input type="text" name="HCreator" id="HCreator" lay-verify="HCreator" autocomplete="off" placeholder="" class="layui-input">
+                                               
                                             </div>
                                         </div>
                                         <div class="layui-col-xs3">
@@ -336,6 +338,7 @@
                 set_AddFNew();
             }
             else if (OperationType == 3) {//缂栬緫
+                $("#HInterID").val(linterid);
                 set_EditFromGrid();
             }
             else {
@@ -371,11 +374,10 @@
                 var index = layer.load();
 
                 if (AllowLoadData()) {
-                    if (OperationType === 3) {
+                    if (OperationType =="3") {
                         $.ajax({
                             type: "POST",
                             url: GetWEBURL() + "/Gy_Supplier/AddBill1",
-                            //url: "http://localhost:12761/Gy_Supplier/AddBill1",
                             async: true,
                             data: { "oMain": sBillModeify },
                             dataType: "json",
@@ -407,7 +409,6 @@
                         $.ajax({
                             type: "POST",
                             url: GetWEBURL() + "/Gy_Supplier/AddBill",
-                            //url: "http://localhost:12761/Gy_Supplier/AddBill",
                             async: true,
                             data: { "oMain": oMain },
                             dataType: "json",
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/Sc_MouldConkBookBillList.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/Sc_MouldConkBookBillList.html"
index e15b169..7af0c98 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/Sc_MouldConkBookBillList.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/Sc_MouldConkBookBillList.html"
@@ -1,8 +1,8 @@
 锘�<!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 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">
@@ -37,7 +37,7 @@
                                             <option value="ZHSJ">涓婃灦褰掕繕鍗�</option>
                                         </select>
                                     </div>
-                                </div>
+                                </div>-->
                                 <div class="layui-inline">
                                     <label class="layui-form-label">鍗曟嵁鍙�</label>
                                     <div class="layui-input-block">
@@ -49,30 +49,31 @@
                                     <div class="layui-input-block">
                                         <input type="text" class="layui-input" name="HCreateBy" id="HCreateBy">
                                     </div>
-                                </div>-->
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">寮�濮嬫椂闂�</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
+                                    </div>
+                                </div>
+                                <div class="layui-inline">
+                                    <label class="layui-form-label">缁撴潫鏃堕棿</label>
+                                    <div class="layui-input-block">
+                                        <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
+                                    </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 class="layui-colla-content">
+                                <button class="layui-btn layuiadmin-btn-order" type="button" lay-submit="" lay-filter="btnReSearch" id="btnReSearch" style="padding:0 5px">閲嶇疆</button>
+                                <div class="layui-colla-content">
                                     <div class="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">
-                                            <input type="date" class="layui-input" name="BenginHCreateDate" id="BenginHCreateDate">
-                                        </div>
-                                    </div>
-                                    <div class="layui-inline">
-                                        <label class="layui-form-label">缁撴潫鏃堕棿</label>
-                                        <div class="layui-input-block">
-                                            <input type="date" class="layui-input" name="EndHCreateDate" id="EndHCreateDate">
-                                        </div>
-                                    </div>
-                                </div>-->
+
+                                </div>
                             </div>
                         </div>
                         <table class="" id="mainTable" lay-filter="mainTable"></table>
@@ -106,6 +107,7 @@
         }).extend({
             index: 'lib/index', //涓诲叆鍙fā鍧�
         }).use(['index', 'form', 'table', 'element', 'laypage', 'laydate'], function () {
+            //#region 鍏ㄥ眬鍙橀噺
             var $ = layui.$
                 , admin = layui.admin
                 , layer = layui.layer
@@ -117,256 +119,263 @@
                 , util = layui.util
             //鏌ヨ鏉′欢
             var sWhere = "";
+            var option = [];
+            //#endregion
 
-            var option = {
-                elem: '#mainTable'
-                , toolbar: '#toolbarDemo'
-                , height: 'full-50'
-                , page: true
-                , cellMinWidth: 90
-                , cols: [[
-                    { type: 'checkbox', fixed: 'left' }
-                    ,{ field: 'hmainid', title: '鍗曟嵁ID', hide: true }
-                    , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
-                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
-                    , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
-                    , { field: 'hempid', title: 'hempid', width: 160, hide: true }
-                    , { field: '鍙戠幇浜轰唬鐮�', title: '鍙戠幇浜轰唬鐮�', width: 200 }
-                    , { field: '鍙戠幇浜�', title: '鍙戠幇浜�', width: 200 }
-                    , { field: 'HConkTypeID', title: 'HConkTypeID', width: 200, hide: true }
-                    , { field: '鏁呴殰绫诲埆浠g爜', title: '鏁呴殰绫诲埆浠g爜', width: 200 }
-                    , { field: '鏁呴殰绫诲埆', title: '鏁呴殰绫诲埆', width: 200 }
-                    , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 200 }
-                    , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
-                    , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
-                    , { field: '浣跨敤閮ㄩ棬浠g爜', title: '浣跨敤閮ㄩ棬浠g爜', width: 200 }
-                    , { field: '浣跨敤閮ㄩ棬', title: '浣跨敤閮ㄩ棬', width: 200 }
-                    , { field: 'HMouldID', title: 'HMouldID', width: 200, hide: true }
-                    , { field: '浜у搧妯″叿浠g爜', title: '浜у搧妯″叿浠g爜', width: 200 }
-                    , { field: '浜у搧妯″叿', title: '浜у搧妯″叿', width: 200 }
-                    , { field: '鏁呴殰鍙戠敓鏃ユ湡', title: '鏁呴殰鍙戠敓鏃ユ湡', width: 200 }
-                    , { field: '瑕佹眰瀹屽杽鏃ユ湡', title: '瑕佹眰瀹屽杽鏃ユ湡', width: 200 }
-                    , { field: '鎽樿', title: '鎽樿', width: 200 }
-                    , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200 }
-                    , { field: '澶囨敞', title: '澶囨敞', width: 200 }
-                    , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
-                    , { field: 'HConkReasonID', title: 'HConkReasonID', width: 115, hide: true }
-                    , { field: '鏁呴殰鍘熷洜浠g爜', title: '鏁呴殰鍘熷洜浠g爜', width: 200 }
-                    , { field: '鏁呴殰鍘熷洜', title: '鏁呴殰鍘熷洜', width: 200 }
-                    , { field: '鏁呴殰鍘熷洜鎻忚堪', title: '鏁呴殰鍘熷洜鎻忚堪', width: 200 }
-                    , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true }
-                    , { field: '瀛愯礋璐d汉浠g爜', title: '瀛愯礋璐d汉浠g爜', width: 200 }
-                    , { field: '瀛愯礋璐d汉', title: '瀛愯礋璐d汉', width: 200 }
-                    , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
-                    , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 115 }
-                    , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
-                    , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true }
-                    , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 115, hide: true }
-                    , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                    , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
-                    , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                    , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
-                    , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                    , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
-                    , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                    , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
-                    , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
-                    , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
-                    , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
-                    , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
-                    , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
-                    , { field: 'hbilltype', title: 'hbilltype', width: 200 }
-                ]]
-            };
+            //#region 杩涘叆椤甸潰鍗冲姞杞�
+            //鍒濆鍖栫晫闈�
+            set_ClearBill();
+            //#endregion
 
-            var index = layer.load(0);
+            //#region 瑙﹀彂浜嬩欢锛氬寘鎷琭orm.on(){}鏍煎紡鐨勬墍鏈夌偣鍑讳簨浠躲�侀�夋嫨浜嬩欢绛�
 
             //澶村伐鍏锋爮浜嬩欢
             table.on('toolbar(mainTable)', function (obj) {
-                var checkStatus = table.checkStatus(obj.config.id);
                 switch (obj.event) {
-                    case 'btn-Add':
-                        //椤甸潰灞�-鑷畾涔�
-                        layer.open({
-                            type: 2,
-                            skin: 'layui-layer-rim', //鍔犱笂杈规
-                            title: '鏂板妯″叿鏁呴殰鐧昏鍗�',
-                            closeBtn: 1,
-                            shift: 2,
-                            area: ['100%', '100%'],
-                            maxmin: true,
-                            content: '../妯℃不鍏风鐞�/Sc_Add_MouldConkBookBillList.html',
-                            end: function () {
-                                //鍒锋柊椤甸潰,
-                                location.reload();
-                            },
-                            success: function (layero, index) {
-
-                            }
-                        });
+                    //鏂板
+                    case 'btn-Add': set_AddNew();
                         break;
-                    case 'btn-Edit':
-                        var checkStatus = table.checkStatus('mainTable')
-                            , data = checkStatus.data;
-                        if (checkStatus.data.length === 1) {
-                            var hID = data[0].hmainid.toString();
-                            //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
-                            layer.open({
-                                type: 2
-                                , area: ['100%', '100%']
-                                , title: '缂栬緫妯″叿鏁呴殰鐧昏鍗�'
-                                , closeBtn: 1
-                                , shade: 0.6 //閬僵閫忔槑搴�
-                                , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
-                                , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
-                                , content: '../妯℃不鍏风鐞�/Sc_Add_MouldConkBookBillList.html?hID=' + hID
-                                , resize: false,
-                                end: function () {
-                                    //鍒锋柊椤甸潰,
-                                    location.reload();
-                                }
-                                , cancel: function () {
-                                    //$(".layui-btn").removeClass("layui-btn-disabled");
-                                }
-                            })
-
-                        } else {
-                            layer.msg('璇烽�夋嫨涓�琛屾暟鎹紪杈戯紒');
-                        }
-
+                    //缂栬緫
+                    case 'btn-Edit': set_ShowBill();
                         break;
-                    case 'btn-Delete':
-                        var checkStatus = table.checkStatus('mainTable')
-                            , data = checkStatus.data;
-                        if (checkStatus.data.length === 1) {
-                            var InterID = data[0].hmainid.toString();
-                            //閫昏緫鍒犻櫎鏂规硶
-                            layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
-                                $.ajax({
-                                    type: "GET",
-                                    url: GetWEBURL() + "/Sc_MouldConkBookBill/DeltetMouldConkBookBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
-                                    data: { "HInterID": InterID },
-                                    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('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
-                        }
+                    //鍒犻櫎
+                    case 'btn-Delete': set_DeleteBill();
+                        break;
+                    //鍒锋柊
+                    case 'get_Refresh': get_Refresh();
+                        break;
+                    //閫�鍑烘寜閽�
+                    case 'get_Exit': Pub_Close(2);
                         break;
                 };
             });
 
-            //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
-            $.ajax({
-                //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                url: GetWEBURL() + '/Sc_MouldConkBookBill/GetMouldConkBookBillList',
-                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 });
-                }
+            //鏌ヨ鎸夐挳
+            form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
+                get_FastQuery();
             });
 
             //閲嶇疆鎸夐挳
-            //form.on('submit(btnReSearch)', function (data) {
-            //    $("#HBillType").val("");//鍗曟嵁绫诲瀷
-            //    $("#HBillNo").val("");//鍗曟嵁鍙�
-            //    $("#HSourceBillNo").val("");//婧愬崟鍙�
-            //    $("#HCreateBy").val("");//鍒跺崟浜�
-            //    $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
-            //    $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
-            //    $("#btnSearch").click();
-            //});
+            form.on('submit(btnReSearch)', function (data) {
+                $("#HBillNo").val("");//鍗曟嵁鍙�
+                $("#HCreateBy").val("");//鍒跺崟浜�
+                $("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
+                $("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
+                $("#btnSearch").click();
+            });
 
-            //鏌ヨ鎸夐挳
-            form.on('submit(btnSearch)', function (data) {//閫夋嫨浠撲綅
-                //var HBillType = $("#HBillType").val();//鍗曟嵁绫诲瀷
-                //var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
-                //var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
-                //var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
-                //var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
-                //if (HBillNo) {
-                //    sWhere += " and HBillNo like '%" + HBillNo + "%'";
-                //}
-                //if (HCreateBy) {
-                //    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
-                //}
-                //if (BenginHCreateDate) {
-                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
-                //}
-                //if (EndHCreateDate) {
-                //    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
-                //}
-                var index = layer.load(0);
+
+            //#endregion
+
+            //鍒濆鍖栫晫闈�
+            function set_ClearBill() {
+                //鍒濆鍖栬〃鏍�
+                set_InitGrid();
+                //鏌ヨ
+                get_Display(sWhere);
+            }
+
+            //鍒濆鍖栬〃鏍�
+            function set_InitGrid() {
+                option = {
+                    elem: '#mainTable'
+                    , toolbar: '#toolbarDemo'
+                    , height: 'full-50'
+                    , page: true
+                    , cellMinWidth: 90
+                    , cols: [[
+                        { type: 'checkbox', fixed: 'left' }
+                        , { field: 'hmainid', title: '鍗曟嵁ID', hide: true }
+                        , { field: '鏃ユ湡', title: '鏃ユ湡', width: 200, templet: "<div>{{d.鏃ユ湡 ==null ?'':layui.util.toDateString(d.鏃ユ湡, 'yyyy-MM-dd')}}</div>" }
+                        , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', width: 160 }
+                        , { field: '鍗曟嵁绫诲瀷', title: '鍗曟嵁绫诲瀷', width: 160, hide: true }
+                        , { field: 'hempid', title: 'hempid', width: 160, hide: true }
+                        , { field: '鍙戠幇浜轰唬鐮�', title: '鍙戠幇浜轰唬鐮�', width: 200 }
+                        , { field: '鍙戠幇浜�', title: '鍙戠幇浜�', width: 200 }
+                        , { field: 'HConkTypeID', title: 'HConkTypeID', width: 200, hide: true }
+                        , { field: '鏁呴殰绫诲埆浠g爜', title: '鏁呴殰绫诲埆浠g爜', width: 200 }
+                        , { field: '鏁呴殰绫诲埆', title: '鏁呴殰绫诲埆', width: 200 }
+                        , { field: '璐熻矗浜轰唬鐮�', title: '璐熻矗浜轰唬鐮�', width: 200 }
+                        , { field: '璐熻矗浜�', title: '璐熻矗浜�', width: 200 }
+                        , { field: 'HDeptID', title: 'HDeptID', width: 200, hide: true }
+                        , { field: '浣跨敤閮ㄩ棬浠g爜', title: '浣跨敤閮ㄩ棬浠g爜', width: 200 }
+                        , { field: '浣跨敤閮ㄩ棬', title: '浣跨敤閮ㄩ棬', width: 200 }
+                        , { field: 'HMouldID', title: 'HMouldID', width: 200, hide: true }
+                        , { field: '浜у搧妯″叿浠g爜', title: '浜у搧妯″叿浠g爜', width: 200 }
+                        , { field: '浜у搧妯″叿', title: '浜у搧妯″叿', width: 200 }
+                        , { field: '鏁呴殰鍙戠敓鏃ユ湡', title: '鏁呴殰鍙戠敓鏃ユ湡', width: 200 }
+                        , { field: '瑕佹眰瀹屽杽鏃ユ湡', title: '瑕佹眰瀹屽杽鏃ユ湡', width: 200 }
+                        , { field: '鎽樿', title: '鎽樿', width: 200 }
+                        , { field: '鍐呴儴鍗曟嵁鍙�', title: '鍐呴儴鍗曟嵁鍙�', width: 200 }
+                        , { field: '澶囨敞', title: '澶囨敞', width: 200 }
+                        , { field: 'hsubid', title: 'hsubid', width: 200, hide: true }
+                        , { field: 'HConkReasonID', title: 'HConkReasonID', width: 115, hide: true }
+                        , { field: '鏁呴殰鍘熷洜浠g爜', title: '鏁呴殰鍘熷洜浠g爜', width: 200 }
+                        , { field: '鏁呴殰鍘熷洜', title: '鏁呴殰鍘熷洜', width: 200 }
+                        , { field: '鏁呴殰鍘熷洜鎻忚堪', title: '鏁呴殰鍘熷洜鎻忚堪', width: 200 }
+                        , { field: 'HManagerID', title: 'HManagerID', width: 115, hide: true }
+                        , { field: '瀛愯礋璐d汉浠g爜', title: '瀛愯礋璐d汉浠g爜', width: 200 }
+                        , { field: '瀛愯礋璐d汉', title: '瀛愯礋璐d汉', width: 200 }
+                        , { field: '鍏宠仈鏁伴噺', title: '鍏宠仈鏁伴噺', width: 200 }
+                        , { field: '琛屽叧闂汉', title: '琛屽叧闂汉', width: 115 }
+                        , { field: '鍏抽棴绫诲瀷', title: '鍏抽棴绫诲瀷', width: 200 }
+                        , { field: '琛ㄤ綋澶囨敞', title: '琛ㄤ綋澶囨敞', width: 200, hide: true }
+                        , { field: '鍒跺崟浜�', title: '鍒跺崟浜�', width: 115, hide: true }
+                        , { field: '鍒跺崟鏃ユ湡', title: '鍒跺崟鏃ユ湡', width: 200, templet: "<div>{{d.鍒跺崟鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍒跺崟鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '瀹℃牳浜�', title: '瀹℃牳浜�', width: 200 }
+                        , { field: '瀹℃牳鏃ユ湡', title: '瀹℃牳鏃ユ湡', width: 200, templet: "<div>{{d.瀹℃牳鏃ユ湡 ==null ? '':layui.util.toDateString(d.瀹℃牳鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '淇敼浜�', title: '淇敼浜�', width: 200 }
+                        , { field: '淇敼鏃ユ湡', title: '淇敼鏃ユ湡', width: 200, templet: "<div>{{d.淇敼鏃ユ湡 ==null ?'':layui.util.toDateString(d.淇敼鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '鍏抽棴浜�', title: '鍏抽棴浜�', width: 200 }
+                        , { field: '鍏抽棴鏃ユ湡', title: '鍏抽棴鏃ユ湡', width: 200, templet: "<div>{{d.鍏抽棴鏃ユ湡 ==null ?'':layui.util.toDateString(d.鍏抽棴鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '浣滃簾浜�', title: '浣滃簾浜�', width: 200 }
+                        , { field: '浣滃簾鏃ユ湡', title: '浣滃簾鏃ユ湡', width: 200, templet: "<div>{{d.浣滃簾鏃ユ湡 ==null ?'':layui.util.toDateString(d.浣滃簾鏃ユ湡, 'yyyy-MM-dd HH:mm:ss')}}</div>" }
+                        , { field: '婧愬崟涓诲唴鐮�', title: '婧愬崟涓诲唴鐮�', width: 200, hide: true }
+                        , { field: '婧愬崟瀛愬唴鐮�', title: '婧愬崟瀛愬唴鐮�', width: 200, hide: true }
+                        , { field: '婧愬崟鍗曞彿', title: '婧愬崟鍗曞彿', width: 200 }
+                        , { field: '婧愬崟绫诲瀷', title: '婧愬崟绫诲瀷', width: 200 }
+                        , { field: 'hbilltype', title: 'hbilltype', width: 200 }
+                    ]]
+                };
+            }
+
+            //鏌ヨ
+            function get_Display(sWhere) {
+                var index = layer.load(0, { shade: false });
+                //杩涘叆椤甸潰鏄剧ず鐨勭紦瀛樺垪琛�
                 $.ajax({
-                    //url: "http://61.130.49.162:9090/WMSAPI///Web/GetMAXNum",
-                    url: GetWEBURL1() + '/Sc_MouldConkBookBill/GetMouldConkBookBillList',
+                    url: GetWEBURL() + '/Sc_MouldConkBookBill/GetMouldConkBookBillList',
                     type: "GET",
-                    data: { "sWhere": sWhere},
+                    data: { "sWhere": sWhere },
                     success: function (data1) {
                         if (data1.count == 1) {
                             option.data = data1.data;
                             table.render(option);
                             layer.close(index);
-                            layer.alert("鏌ヨ鎴愬姛", { icon: 1 });
                         } else {
                             layer.close(index);
                             layer.alert(data1.code + data1.Message, { icon: 5 });
                         }
                     }, error: function () {
                         layer.close(index);
-                        layer.alert("鎺ュ彛澶辨晥!", { icon: 5 });
+                        layer.alert("鎺ュ彛璇锋眰澶辫触!", { icon: 5 });
                     }
                 });
-                //璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
-                sWhere = "";
-                //$("#HBillType").val("");//鍗曟嵁绫诲瀷
-                //$("#HBillNo").val("");//鍗曟嵁鍙�
-                //$("#HSourceBillNo").val("");//婧愬崟鍙�
-                //$("#HCreateBy").val("");//鍒跺崟浜�
-                //$("#BenginHCreateDate").val("");//寮�濮嬪埗鍗曟椂闂�
-                //$("#EndHCreateDate").val("");//缁撴潫鍒跺崟鏃堕棿
-            });
+            }
 
-            //鐩戝惉琛屽弻鍑讳簨浠�
-            table.on('rowDouble(mainTable)', function (obj) {
-                layer.alert("鍙屽嚮浜嬩欢", { icon: 1 });
-            });
+            //蹇�熻繃婊�
+            function get_FastQuery() {
+                var HBillNo = $("#HBillNo").val();//鍗曟嵁鍙�
+                var HCreateBy = $("#HCreateBy").val();//鍒跺崟浜�
+                var BenginHCreateDate = $("#BenginHCreateDate").val();//寮�濮嬪埗鍗曟椂闂�
+                var EndHCreateDate = $("#EndHCreateDate").val();//缁撴潫鍒跺崟鏃堕棿
+                if (HBillNo) {
+                    sWhere += " and HBillNo like '%" + HBillNo + "%'";
+                }
+                if (HCreateBy) {
+                    sWhere += " and HCreateBy like '%" + HCreateBy + "%'";
+                }
+                if (BenginHCreateDate) {
+                    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) >= '" + BenginHCreateDate + "'";
+                }
+                if (EndHCreateDate) {
+                    sWhere += " and CONVERT(varchar(100),HCreateDate, 23) <= '" + EndHCreateDate + "'";
+                }
+                get_Display(sWhere);
+                sWhere = "";//璋冪敤鎺ュ彛鍚庢竻绌簊Where缂撳瓨
+            }
 
+            //鏂板
+            function set_AddNew() {
+                //椤甸潰灞�-鑷畾涔�
+                layer.open({
+                    type: 2,
+                    skin: 'layui-layer-rim', //鍔犱笂杈规
+                    title: '鏂板妯″叿鏁呴殰鐧昏鍗�',
+                    closeBtn: 1,
+                    shift: 2,
+                    area: ['100%', '100%'],
+                    maxmin: true,
+                    content: '../妯℃不鍏风鐞�/Sc_Add_MouldConkBookBillList.html',
+                    end: function () {
+                        //鍒锋柊椤甸潰,
+                        location.reload();
+                    },
+                    success: function (layero, index) {
 
-            //laydate.render({
-            //    elem: '#HDate'
-            //    , type: 'datetime'
-            //    , trigger: 'click'
-            //    , format:'yyyy-MM-dd HH:mm'
-            //});
+                    }
+                });
+            }
+
+            //缂栬緫
+            function set_ShowBill() {
+                var checkStatus = table.checkStatus('mainTable')
+                    , data = checkStatus.data;
+                if (checkStatus.data.length === 1) {
+                    var hID = data[0].hmainid.toString();
+                    //if (AllowLoadData(sSubStr) != false) {//闈炵┖楠岃瘉
+                    layer.open({
+                        type: 2
+                        , area: ['100%', '100%']
+                        , title: '缂栬緫妯″叿鏁呴殰鐧昏鍗�'
+                        , closeBtn: 1
+                        , shade: 0.6 //閬僵閫忔槑搴�
+                        , maxmin: true //鍏佽鍏ㄥ睆鏈�灏忓寲
+                        , anim: 0 //0-6鐨勫姩鐢诲舰寮忥紝-1涓嶅紑鍚�
+                        , content: '../妯℃不鍏风鐞�/Sc_Add_MouldConkBookBillList.html?hID=' + hID
+                        , 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 InterID = data[0].hmainid.toString();
+                    //閫昏緫鍒犻櫎鏂规硶
+                    layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗涓嶈兘鎭㈠", { title: "鍒犻櫎纭" }, function (index) {
+                        $.ajax({
+                            type: "GET",
+                            url: GetWEBURL() + "/Sc_MouldConkBookBill/DeltetMouldConkBookBill", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+                            data: { "HInterID": InterID },
+                            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('璇烽�夋嫨涓�琛屾暟鎹垹闄わ紒');
+                }
+            }
+
 
 
             //浠ヤ笂鏄痩ayui妯″潡

--
Gitblit v1.9.1