From 14d06bc77ede74bba038de2d9b1b6198382882ca Mon Sep 17 00:00:00 2001 From: zzr99 <1940172413@qq.com> Date: 星期四, 04 十一月 2021 16:47:59 +0800 Subject: [PATCH] 所有出入库详情页加计量单位显示并保存 --- WebTM/views/模治具管理/模治具仓库管理/Sc_Add_MouldProdOutBillList.html | 18 - WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepInBill.html | 50 +++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldRepairInBillEdit.html | 53 +++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdOutBillEdit.html | 52 +++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdMoveBill.html | 53 +++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldRepairOutBillEdit.html | 53 +++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldProdInBillEdit.html | 80 ++------ WebTM/layuiadmin/Scripts/webConfig.js | 4 WebTM/views/模治具管理/模治具仓库管理/Sc_Add_MouldProdBackBillList.html | 52 +++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldOtherOutBillEdit.html | 52 +++++ WebTM/views/模治具管理/模治具仓库管理/Sc_MouldMoveStockStepOutBill.html | 50 +++++ 11 files changed, 429 insertions(+), 88 deletions(-) diff --git a/WebTM/layuiadmin/Scripts/webConfig.js b/WebTM/layuiadmin/Scripts/webConfig.js index 802a542..f6d4f0e 100644 --- a/WebTM/layuiadmin/Scripts/webConfig.js +++ b/WebTM/layuiadmin/Scripts/webConfig.js @@ -2,11 +2,11 @@ function GetWEBURL() { //var WEBURL = "http://192.168.16.80:8011/"; //鍔炲叕瀹ゆ湇鍔″櫒 //var WEBURL = "http://localhost:8081/SWEAPI/"; //ch鏈湴 - var WEBURL = "http://localhost:8085/API/"; //zgq鏈湴 + //var WEBURL = "http://localhost:8085/API/"; //zgq鏈湴 //var WEBURL = "http://localhost:8080/API/"; //棰滄檽鍐涙湰鍦伴厤缃� //var WEBURL = "http://localhost:8082/lubao"; //棰滄檽鍐涙湰鍦伴厤缃� //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //鏉ㄩ湶鏈湴閰嶇疆 - //var WEBURL = "http://localhost:8082/LuBaoAPI/"; //绔犵传鏌旀湰鍦伴厤缃� + var WEBURL = "http://localhost:8082/LuBaoAPI/"; //绔犵传鏌旀湰鍦伴厤缃� //var WEBURL = "http://10.1.4.155/API/"; //姹熶赴瀹㈡埛NEW //var WEBURL = "http://47.96.97.237/API/"; //鏅轰簯鏈嶅姟鍣� //var WEBURL = "http://183.129.128.86:9090/API/"; //鍑礉濂堢壒瀹㈡埛鏈嶅姟鍣ㄥ缃� 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_Add_MouldProdBackBillList.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_Add_MouldProdBackBillList.html" index 1d9fab0..6e82c21 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_Add_MouldProdBackBillList.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_Add_MouldProdBackBillList.html" @@ -241,7 +241,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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; switch (obj.event) { //鏂板涓�琛� case 'btn-AddLine': btnAddLine(NewRow); @@ -648,6 +648,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: 100 } @@ -682,7 +685,7 @@ function set_AddFNew() { //鑾峰彇鏈�澶у崟鎹彿 get_MAXNum(); - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //鑾峰彇鏈�澶у崟鎹彿 @@ -706,7 +709,7 @@ function set_EditFromGrid(linterid) { set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋 - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //缂栬緫鑾峰彇琛ㄥご @@ -885,7 +888,46 @@ } }); } + if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅 + { + //椤甸潰灞�-鑷畾涔� + 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 === 'HWHCode') //浠撳簱浠g爜 { //椤甸潰灞�-鑷畾涔� @@ -1027,6 +1069,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; + } //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0 if (parseFloat(sSubStr[i].HQty) == 0) { layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,浜у搧鍏ュ簱璁板綍鏈壂鐮侊紙瀹炲彂鏁伴噺涓�0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); 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_Add_MouldProdOutBillList.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_Add_MouldProdOutBillList.html" index 5290bf5..e2cce6a 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_Add_MouldProdOutBillList.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_Add_MouldProdOutBillList.html" @@ -222,6 +222,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: 100 } @@ -280,7 +283,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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HRemark": "" }; switch (obj.event) { case 'btn-AddLine': //table.cache["mainTable"].push(AddRow[rows]); @@ -970,19 +973,14 @@ return false; } if (!typeof (sSubStr) == "undefined") { - //for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺 - // if (parseFloat(sSubStr[i].HQtyMust) > 0) { - // if (parseFloat(sSubStr[i].HQty) > parseFloat(sSubStr[i].HQtyMust)) - // { - // layer.msg("鏁伴噺涓嶈兘澶т簬搴旀敹鏁伴噺", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' }); - // return false; - // } - // } - //} for (var i = 0; i <= sSubStr.length - 1; i++) { //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0 if (parseFloat(sSubStr[i].HQty) > 0) { s = 1; } + if (sSubStr[i].HUnitID == "") { + layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,璁¢噺鍗曚綅涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); + return Result = false; + } } if (s == 0) { layer.msg("浜у搧鍏ュ簱璁板綍鏈壂鐮�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); 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_MouldMoveStockStepInBill.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_MouldMoveStockStepInBill.html" index 55f8246..8de89ac 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_MouldMoveStockStepInBill.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_MouldMoveStockStepInBill.html" @@ -241,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: 100 } @@ -271,7 +274,7 @@ //鍒ゆ柇鏄惁鏂板 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, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "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, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HSCWHID": 0, "HSCWHCode": "", "HSCWHName": "", "HSCSPID": 0, "HSCSPCode": "", "HSCSPName": "", "HRemark": "" }]; table.render(option); } else { @@ -304,7 +307,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, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "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, "HStockOrgID": sessionStorage["OrganizationID"], "HOtherOrgID": 0, "HOtherOrgCode": "", "HOtherOrgName": "", "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]); @@ -400,7 +403,46 @@ } }); } + if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅 + { + //椤甸潰灞�-鑷畾涔� + 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 === 'HOtherOrgCode') //缁勭粐 { //椤甸潰灞�-鑷畾涔� @@ -1110,6 +1152,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 (HStockStyle == "璺ㄧ粍缁囪皟鎷�" && sSubStr[i].HStockOrgID == sSubStr[i].HOtherOrgID) { layer.msg("璋冩嫧绫诲瀷涓鸿法缁勭粐璋冩嫧锛屾槑缁嗚褰曠" + (i + 1) + "琛�,璋冨嚭缁勭粐鍜屽綋鍓嶇粍缁囦竴鑷� !", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); return Result = false; 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_MouldMoveStockStepOutBill.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_MouldMoveStockStepOutBill.html" index cd00e09..f6e7fce 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_MouldMoveStockStepOutBill.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_MouldMoveStockStepOutBill.html" @@ -228,6 +228,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 } @@ -259,7 +262,7 @@ //鍒ゆ柇鏄惁鏂板 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 { @@ -295,7 +298,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]); @@ -611,7 +614,46 @@ } }); } + if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅 + { + //椤甸潰灞�-鑷畾涔� + 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 () { + + } + }); + } obj.event = ""; return false; @@ -1121,6 +1163,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 (HStockStyle == "璺ㄧ粍缁囪皟鎷�" && sSubStr[i].HStockOrgID == sSubStr[i].HOtherOrgID) { layer.msg("璋冩嫧绫诲瀷涓鸿法缁勭粐璋冩嫧锛屾槑缁嗚褰曠" + (i + 1) + "琛�,璋冨叆缁勭粐鍜屽綋鍓嶇粍缁囦竴鑷� !", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); return Result = false; 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_MouldOtherOutBillEdit.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_MouldOtherOutBillEdit.html" index 49731ee..3ddfc59 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_MouldOtherOutBillEdit.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_MouldOtherOutBillEdit.html" @@ -228,7 +228,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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; switch (obj.event) { //鏂板涓�琛� case 'btn-AddLine': btnAddLine(NewRow); @@ -563,6 +563,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: 100 } @@ -596,7 +599,7 @@ function set_AddFNew() { //鑾峰彇鏈�澶у崟鎹彿 get_MAXNum(); - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //鑾峰彇鏈�澶у崟鎹彿 @@ -620,7 +623,7 @@ function set_EditFromGrid(linterid) { set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋 - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //缂栬緫鑾峰彇琛ㄥご @@ -797,7 +800,46 @@ } }); } + if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅 + { + //椤甸潰灞�-鑷畾涔� + 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 === 'HWHCode') //浠撳簱浠g爜 { //椤甸潰灞�-鑷畾涔� @@ -919,6 +961,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; + } } } else { 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_MouldProdInBillEdit.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_MouldProdInBillEdit.html" index b4893c4..f6b7bea 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_MouldProdInBillEdit.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_MouldProdInBillEdit.html" @@ -236,6 +236,7 @@ , element = layui.element; //鏌ヨ鏉′欢 var option = []; + var option1 = []; var sWhere = ""; var sBillType = "3801"; //#endregion @@ -265,7 +266,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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; console.log(NewRow); switch (obj.event) { //鏂板涓�琛� @@ -682,6 +683,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: 100 } @@ -718,16 +722,16 @@ columns = [ { type: 'checkbox', fixed: 'left' } , { templet: '#xuhao', title: '搴忓彿', sort: true, fixed: 'left', event: "qwe", width: 100 } - , { field: 'HMaterID', title: 'HMaterID', edit: 'text', width: 100, hide: true } - , { field: 'HMaterCode', title: '鐗╂枡浠g爜', edit: 'text', event: 'HMaterCode', width: 100 } - , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', edit: 'text', width: 100 } - , { field: 'HMaterSpec', title: '瑙勬牸鍨嬪彿', edit: 'text', width: 100 } - , { field: 'HBatchNo', title: '鎵规', edit: 'text', width: 100 } - , { field: 'HQty', title: '瀹炴敹鏁伴噺', edit: 'text', width: 100 } - , { field: 'HWHID', title: 'HWHID', edit: 'text', width: 100, hide: true } - , { field: 'HWHCode', title: '鏀舵枡浠撳簱浠g爜', edit: 'text', event: 'HWHCode', width: 120 } - , { field: 'HWHName', title: '鏀舵枡浠撳簱鍚嶇О', edit: 'text', width: 120 } - , { field: 'HRemark', title: '澶囨敞', edit: 'text', 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: 'hwhid1', title: 'HWHID', 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 } ]; option1 = { id: 'mainTable1' @@ -747,7 +751,7 @@ function set_AddFNew() { //鑾峰彇鏈�澶у崟鎹彿 get_MAXNum(); - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //鑾峰彇鏈�澶у崟鎹彿 @@ -771,7 +775,7 @@ function set_EditFromGrid(linterid) { set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋 - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //缂栬緫鑾峰彇琛ㄥご @@ -825,8 +829,10 @@ data: { "sqlWhere": "and hmainid=" + linterid }, success: function (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 }); @@ -996,47 +1002,7 @@ } }); } - //杈呭姪璁¢噺鍗曚綅浠g爜 - if (obj.event === 'HSecUnitCode') //杈呭姪璁¢噺鍗曚綅浠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({ - HSecUnitID: checkStatus.data[0].HItemID, - HSecUnitCode: checkStatus.data[0].HNumber, - HSecUnitName: checkStatus.data[0].HName, - }); - - layer.close(layer.index); //瀹冭幏鍙栫殑濮嬬粓鏄渶鏂板脊鍑虹殑鏌愪釜灞傦紝鍊兼槸鐢眑ayer鍐呴儴鍔ㄦ�侀�掑璁$畻鐨� - } - , btn2: function (index, layero) { - //鎸夐挳銆愭寜閽簩銆戠殑鍥炶皟 - //return false 寮�鍚浠g爜鍙姝㈢偣鍑昏鎸夐挳鍏抽棴 - }, - end: function () { - - } - }); - } + //璁¢噺鍗曚綅浠g爜 if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅浠g爜 { @@ -1209,6 +1175,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].HWHID == "") { layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,鏀舵枡浠撳簱涓虹┖!", { icon: 5, btn: ['纭'], time: 2000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); return Result = false; 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 857b853..159c90a 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" @@ -227,6 +227,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 } @@ -258,7 +261,7 @@ //鍒ゆ柇鏄惁鏂板 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 { @@ -294,7 +297,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 +392,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') //缁勭粐 { //椤甸潰灞�-鑷畾涔� @@ -954,6 +997,7 @@ Pub_Close(2); } }); + function formatDate(date) { var d = new Date(date), month = '' + (d.getMonth() + 1), @@ -965,6 +1009,7 @@ return [year, month, day].join('-'); } + form.on('submit(Saver)', function (data) {//淇濆瓨 //debugger; data.field.HMaker = sessionStorage["HUserName"];//鍒跺崟浜� @@ -1112,6 +1157,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; 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_MouldProdOutBillEdit.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_MouldProdOutBillEdit.html" index 782134c..6bc3c3a 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_MouldProdOutBillEdit.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_MouldProdOutBillEdit.html" @@ -246,7 +246,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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; switch (obj.event) { //鏂板涓�琛� case 'btn-AddLine': btnAddLine(NewRow); @@ -651,6 +651,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: 100 } @@ -685,7 +688,7 @@ function set_AddFNew() { //鑾峰彇鏈�澶у崟鎹彿 get_MAXNum(); - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //鑾峰彇鏈�澶у崟鎹彿 @@ -709,7 +712,7 @@ function set_EditFromGrid(linterid) { set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋 - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HPrice": 0, "HMoney": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HSPID": 0, "HSPCode": "", "HSPName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //缂栬緫鑾峰彇琛ㄥご @@ -888,7 +891,46 @@ } }); } + if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅 + { + //椤甸潰灞�-鑷畾涔� + 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 === 'HWHCode') //浠撳簱浠g爜 { //椤甸潰灞�-鑷畾涔� @@ -1030,6 +1072,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; + } //鍒ゆ柇鎵爜鏁伴噺涓嶈兘涓�0 if (parseFloat(sSubStr[i].HQty) == 0) { layer.msg("鏄庣粏璁板綍绗�" + (i + 1) + "琛�,浜у搧鍏ュ簱璁板綍鏈壂鐮侊紙瀹炲彂鏁伴噺涓�0锛�", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" }); 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_MouldRepairInBillEdit.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_MouldRepairInBillEdit.html" index 24167c4..1fe812a 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_MouldRepairInBillEdit.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_MouldRepairInBillEdit.html" @@ -322,7 +322,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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "", "HStockOrgID": sessionStorage["OrganizationID"] }; + var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "", "HStockOrgID": sessionStorage["OrganizationID"] }; switch (obj.event) { //鏂板涓�琛� case 'btn-AddLine': btnAddLine(NewRow); @@ -842,6 +842,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: 100 } @@ -870,7 +873,7 @@ function set_AddFNew() { //鑾峰彇鏈�澶у崟鎹彿 get_MAXNum(); - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "", "HStockOrgID": sessionStorage["OrganizationID"] }]; + option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "","HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "", "HStockOrgID": sessionStorage["OrganizationID"] }]; table.render(option); } //鑾峰彇鏈�澶у崟鎹彿 @@ -895,7 +898,7 @@ function set_EditFromGrid(linterid) { set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋 - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "", "HStockOrgID": sessionStorage["OrganizationID"] }]; + option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HRemark": "", "HStockOrgID": sessionStorage["OrganizationID"] }]; table.render(option); } //缂栬緫鑾峰彇琛ㄥご @@ -1130,6 +1133,46 @@ } }); } + if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅 + { + //椤甸潰灞�-鑷畾涔� + 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 () { + + } + }); + } obj.event = ""; return false; } @@ -1183,6 +1226,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; + } } } else { 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_MouldRepairOutBillEdit.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_MouldRepairOutBillEdit.html" index 6a5f4b2..c011cd2 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_MouldRepairOutBillEdit.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_MouldRepairOutBillEdit.html" @@ -325,7 +325,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, "HWHID": 0, "HWHCode": "", "HWHName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; + var NewRow = { "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "","HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }; switch (obj.event) { //鏂板涓�琛� case 'btn-AddLine': btnAddLine(NewRow); @@ -839,6 +839,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: 100 } @@ -867,7 +870,7 @@ function set_AddFNew() { //鑾峰彇鏈�澶у崟鎹彿 get_MAXNum(); - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; + option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HUnitID": 0, "HUnitCode": "", "HUnitName": "","HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //鑾峰彇鏈�澶у崟鎹彿 @@ -892,7 +895,7 @@ function set_EditFromGrid(linterid) { set_EditForm(linterid); //缂栬緫鑾峰彇琛ㄥご set_EditGrid(linterid); //缂栬緫鑾峰彇琛ㄤ綋 - option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; + option.data = [{ "HMaterID": 0, "HMaterCode": "", "HMaterName": "", "HMaterSpec": "", "HBatchNo": "HUnitID": 0, "HUnitCode": "", "HUnitName": "", "HDesignLife": 0, "HLeaveLife": 0, "HUseLife": 0, "HQtyMust": 0, "HQty": 0, "HWHID": 0, "HWHCode": "", "HWHName": "", "HStockOrgID": sessionStorage["OrganizationID"], "HRemark": "" }]; table.render(option); } //缂栬緫鑾峰彇琛ㄥご @@ -1126,6 +1129,46 @@ } }); } + if (obj.event === 'HUnitCode') //璁¢噺鍗曚綅淇℃伅 + { + //椤甸潰灞�-鑷畾涔� + 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 () { + + } + }); + } obj.event = ""; return false; } @@ -1179,6 +1222,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; + } } } else { -- Gitblit v1.9.1