From b742f00aac8e1e1bb628232383c35e67f4a41e4e Mon Sep 17 00:00:00 2001
From: cwjbxqmz <1134865194@qq.com>
Date: 星期五, 26 一月 2024 15:21:28 +0800
Subject: [PATCH] 1

---
 WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdMoveBill.html |  116 ++++++++++++++++++++++++++++++++++++++++++++++++++--------
 1 files changed, 100 insertions(+), 16 deletions(-)

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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdMoveBill.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdMoveBill.html"
index 47e2e3b..75b1d01 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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdMoveBill.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\344\273\223\345\272\223\347\256\241\347\220\206/Sc_MouldProdMoveBill.html"
@@ -63,7 +63,7 @@
                                                 </div>
                                             </div>
                                             <div class="layui-inline">
-                                                <label class="layui-form-label">鍣ㄥ叿浠撳簱</label>
+                                                <label class="layui-form-label">鍣ㄥ叿浠撳簱<label style="color:red"> * </label></label>
                                                 <div class="layui-input-inline">
                                                     <input type="text" name="HWHName" id="HWHName" readonly class="layui-input" value="" style="float:left;width:150px;">
                                                     <input type="hidden" name="HWHID" id="HWHID" class="layui-input" value="" style="float:left;width:150px;">
@@ -75,7 +75,7 @@
                                         </div>
                                         <div class="layui-form-item">
                                             <div class="layui-inline">
-                                                <label class="layui-form-label">棰嗘枡浜�</label>
+                                                <label class="layui-form-label">棰嗘枡浜�<label style="color:red"> * </label></label>
                                                 <div class="layui-input-inline">
                                                     <input type="text" name="HSecManagerName" id="HSecManagerName" readonly class="layui-input" value="" style="float:left;width:150px;">
                                                     <input type="hidden" name="HSecManagerID" id="HSecManagerID" class="layui-input" value="" style="float:left;width:150px;">
@@ -85,7 +85,7 @@
                                                 </div>
                                             </div>
                                             <div class="layui-inline">
-                                                <label class="layui-form-label">鍙戞枡浜�</label>
+                                                <label class="layui-form-label">鍙戞枡浜�<label style="color:red"> * </label></label>
                                                 <div class="layui-input-inline">
                                                     <input type="text" name="HKeeperName" id="HKeeperName" readonly class="layui-input" value="" style="float:left;width:150px;">
                                                     <input type="hidden" name="HKeeperID" id="HKeeperID" class="layui-input" value="" style="float:left;width:150px;">
@@ -95,7 +95,7 @@
                                                 </div>
                                             </div>
                                             <div class="layui-inline">
-                                                <label class="layui-form-label">閮ㄩ棬</label>
+                                                <label class="layui-form-label">閮ㄩ棬<label style="color:red"> * </label></label>
                                                 <div class="layui-input-inline">
                                                     <input type="text" name="HDeptName" id="HDeptName" readonly class="layui-input" value="" style="float:left;width:150px;">
                                                     <input type="hidden" name="HDeptID" id="HDeptID" class="layui-input" value="" style="float:left;width:150px;">
@@ -127,7 +127,7 @@
                                             <div class="layui-inline">
                                                 <label class="layui-form-label">閫夊崟鍙�</label>
                                                 <div class="layui-input-inline">
-                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:150px;">
+                                                    <input type="text" name="XDH" id="XDH" class="layui-input" value="" style="float:left;width:100%;">
                                                 </div>
                                             </div>
                                             <div class="layui-inline">
@@ -148,7 +148,21 @@
                             </div>
                         </div>
 
-                        <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                        <div class="layui-tab layui-tab-card" lay-filter="TabTest">
+                            <ul class="layui-tab-title">
+                                <li class="layui-this">鏄庣粏淇℃伅</li>
+                                <li>姹囨�讳俊鎭�</li>
+                            </ul>
+                            <div class="layui-tab-content">
+                                <div class="layui-tab-item layui-show">
+                                    <table class="layui-hide" id="mainTable" lay-filter="mainTable"></table>
+                                </div>
+                                <div class="layui-tab-item">
+                                    <table class="layui-hide" id="mainTable1" lay-filter="mainTable1"></table>
+                                </div>
+                            </div>
+                        </div>
+
                         <script type="text/html" id="toolbarDemo">
                             <div class="layui-btn-container">
 
@@ -227,6 +241,9 @@
                     , { field: 'HMaterName', title: '鍣ㄥ叿鍚嶇О', edit: 'text', width: 100 }
                     , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
                     , { field: 'HBatchNo', title: '鎵规', edit: 'text', width: 100 }
+                    , { field: 'HUnitID', title: 'HUnitID', edit: 'text', width: 100, hide: true }
+                    , { field: 'HUnitCode', title: '璁¢噺鍗曚綅浠g爜', edit: 'text', event: 'HUnitCode', width: 100 }
+                    , { field: 'HUnitName', title: '璁¢噺鍗曚綅', edit: 'text', width: 100 }
                     , { field: 'HDesignLife', title: '璁捐瀵垮懡', edit: 'text', width: 100 }
                     , { field: 'HLeaveLife', title: '鍓╀綑瀵垮懡', edit: 'text', width: 100 }
                     , { field: 'HUseLife', title: '绱浣跨敤瀵垮懡', edit: 'text', width: 120 }
@@ -255,10 +272,31 @@
                 ]]
                 , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
             };
+            var option1 = {
+                elem: '#mainTable1'
+                , height: 500
+                //,url: '/demo/table/user/' //鏁版嵁鎺ュ彛
+                , page: true //寮�鍚垎椤�
+                , cols: [[
+                    { type: 'checkbox', fixed: 'left' }
+                    , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 }
+                    , { field: '鐗╂枡浠g爜', title: '鐗╂枡浠g爜', edit: 'text', event: 'HMaterCode', width: 100 }
+                    , { field: '鐗╂枡鍚嶇О', title: '鐗╂枡鍚嶇О', edit: 'text', width: 100 }
+                    , { field: '瑙勬牸鍨嬪彿', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 }
+                    , { field: '鍗曟嵁鍙�', title: '鍗曟嵁鍙�', edit: 'text', width: 100 }
+                    , { field: '鎵规', title: '鎵规', edit: 'text', width: 100 }
+                    , { field: '瀹炲彂鏁伴噺', title: '瀹炲彂鏁伴噺', edit: 'text', width: 100 }
+                    , { field: 'HSCWHID', title: 'HSCWHID', edit: 'text', width: 100, hide: true }
+                    , { field: '璋冨嚭浠撳簱浠g爜', title: '璋冨嚭浠撳簱浠g爜', edit: 'text', event: 'HWHCode', width: 120 }
+                    , { field: '璋冨嚭浠撳簱', title: '璋冨嚭浠撳簱', edit: 'text', width: 120 }
+                    , { field: '琛ㄤ綋澶囨敞', title: '澶囨敞', edit: 'text', width: 100 }
+                ]]
+                , limit: 500 //姣忛〉榛樿鏄剧ず鐨勬暟閲�
+            };
             //鍒ゆ柇鏄惁鏂板
             if (OperationType == 1) {
                 //鍒濆鍔犺浇琛ㄦ牸{ "ID": 0, "HWasterReasonName": " ","HBadReasonID":0,"HEmpName": "  ", "HSQProcName": "   ","HProcID":0, "HZRProcName": "  ", "HMRBChecker": "  ", "HRemark": "  ", "HPSProcName": "  ", "HCloseMan": "   " }
-                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }];
+                option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "","HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }];
                 table.render(option);
             }
             else {
@@ -269,11 +307,11 @@
                     type: "GET",
                     data: { "sqlWhere": "and hmainid=" + hID },
                     success: function (result) {
-                        //console.log(result);
-                        //console.log('gouba' + result);
                         if (result.count == 1) {
-                            option.data = result.data;
+                            option.data = result.list[0];
                             table.render(option);
+                            option1.data = result.list[1];
+                            table.render(option1);
 
                         } else {
                             layer.alert(result.code + result.Message, { icon: 5 });
@@ -294,7 +332,7 @@
                 var checkStatus = table.checkStatus('mainTable')
                     , data = checkStatus.data;;
                 var AddRow = table.cache['mainTable'];
-                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" };
+                var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "","HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HOtherOrgID": sessionStorage["OrganizationID"], "HStockOrgID": 0, "HStockOrgCode": "", "HStockOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" };
                 switch (obj.event) {
                     case 'btn-AddLine':
                         //table.cache["mainTable"].push(AddRow[rows]);
@@ -389,7 +427,47 @@
                                 }
                             });
                         }
+                        //璁¢噺鍗曚綅浠g爜
+                        if (obj.event === 'HUnitCode')  //璁¢噺鍗曚綅浠g爜
+                        {
+                            //椤甸潰灞�-鑷畾涔�
+                            layer.open({
+                                type: 2,
+                                skin: 'layui-layer-rim', //鍔犱笂杈规
+                                title: '璁¢噺鍗曚綅鍒楄〃',
+                                closeBtn: 1,
+                                shift: 2,
+                                area: ['80%', '80%'],
+                                maxmin: true,
+                                content: ['../../PublicPage/UnitInformation.html', 'yes'],
+                                btn: ['纭畾', '鍙栨秷']
+                                , btn1: function (index, layero) {
 
+                                    //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
+                                    var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
+                                    if (checkStatus.data.length === 0) {
+                                        return layer.msg('璇烽�夋嫨鏁版嵁');
+                                    }
+
+                                    //鍚屾鏇存柊琛ㄦ牸鍜岀紦瀛樺搴旂殑鍊�
+                                    obj.update({
+                                        HUnitID: checkStatus.data[0].HItemID,
+                                        HUnitCode: checkStatus.data[0].HNumber,
+                                        HUnitName: checkStatus.data[0].HName,
+                                    });
+
+                                    layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨�
+                                }
+                                , btn2: function (index, layero) {
+                                    //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟
+                                    //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴
+                                },
+                                end: function () {
+
+                                }
+                            });
+                        }
                         if (obj.event === 'HStockOrgCode')  //缁勭粐
                         {
                             //椤甸潰灞�-鑷畾涔�
@@ -464,7 +542,7 @@
 
                                     //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                                     var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
                                     if (checkStatus.data.length === 0) {
                                         return layer.msg('璇烽�夋嫨鏁版嵁');
                                     }
@@ -548,7 +626,7 @@
 
                                     //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                                     var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                                    var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+                                    var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
                                     if (checkStatus.data.length === 0) {
                                         return layer.msg('璇烽�夋嫨鏁版嵁');
                                     }
@@ -805,7 +883,7 @@
 
                         //鎸夐挳銆愭寜閽竴銆戠殑鍥炶皟
                         var iframeWindow = window['layui-layer-iframe' + index]  //鑾峰彇寮规椤甸潰
-                        var checkStatus = iframeWindow.layui.table.checkStatus('ck-table');//鑾峰彇table鐨別lem:"#test"
+                        var checkStatus = iframeWindow.layui.table.checkStatus('mainTable');//鑾峰彇table鐨別lem:"#test"
                         if (checkStatus.data.length === 0) {
                             return layer.msg('璇烽�夋嫨鏁版嵁');
                         }
@@ -827,7 +905,7 @@
             });
 
 
-            //琛ㄥご淇℃伅楠屾敹鍛樺脊绐�
+            //琛ㄥご淇℃伅楠屾敹鍛樺脊绐� 
             form.on('submit(HSecManagerList)', function () {
                 //椤甸潰灞�-鑷畾涔�
                 layer.open({
@@ -954,6 +1032,7 @@
                     Pub_Close(2);
                 }
             });
+
             function formatDate(date) {
                 var d = new Date(date),
                     month = '' + (d.getMonth() + 1),
@@ -965,6 +1044,7 @@
 
                 return [year, month, day].join('-');
             }
+
             form.on('submit(Saver)', function (data) {//淇濆瓨
                 //debugger;
                 data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜�
@@ -987,7 +1067,7 @@
                                 layer.msg(data.Message, { time: 1 * 1000, icon: 1 }, function () {
                                     $('#add-btn').addClass("layui-btn-disabled").attr("disabled", true);
                                     var index = parent.layer.getFrameIndex(window.name); //鍏堝緱鍒板綋鍓峣frame灞傜殑绱㈠紩
-                                    parent.layer.close(index); //鍐嶆墽琛屽叧闂� 聽 聽 聽 聽 聽聽 聽聽聽 聽
+                                    parent.layer.close(index); //鍐嶆墽琛屽叧闂�
                                 });
                             }
                             else {
@@ -1112,6 +1192,10 @@
                         layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璋冨叆浠撳簱涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                         return Result = false;
                     }
+                    if (sSubStr[i].HUnitID == "") {
+                        layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璁¢噺鍗曚綅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+                        return Result = false;
+                    }
                     if (sSubStr[i].HSCWHID == "") {
                         layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璋冨嚭浠撳簱涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
                         return Result = false;

--
Gitblit v1.9.1