From 647a874bed1dc715370dc0edc59c3a6c4a0b0d9d Mon Sep 17 00:00:00 2001 From: duhe <226547893@qq.com> Date: 星期三, 27 十二月 2023 14:37:02 +0800 Subject: [PATCH] 1 --- WebTM/views/验收入库/委外入库/Kf_EntrustInBill_Fast.html | 300 +++++++++++++++++++++++++++++++++++++++++++---------------- 1 files changed, 216 insertions(+), 84 deletions(-) diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html" index d7f9942..e024ee0 100644 --- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html" +++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\247\224\345\244\226\345\205\245\345\272\223/Kf_EntrustInBill_Fast.html" @@ -315,6 +315,35 @@ $("#HBillerID").hide(); + + var listOption = { + elem: '#wl-table' + , toolbar: '#toolbarDemo' + , cellMinWidth: 90 + , limit: 3000 + , totalRow: true + , cols: [[ + { type: 'radio' } + , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true } + , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true } + , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 } + , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } + , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 } + , { field: 'HAuxPropName', title: '杈呭姪灞炴��', width: 150 } + , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } + //, { field: 'HBatchNo', title: '鎵规', width: 150, hide: true } + , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150, totalRow: true } + , { field: 'HMaterID', title: 'HMaterID', width: 150, hide: true } + , { field: 'HAuxPropID', title: 'HAuxPropID', width: 150, hide: true } + , { field: 'HSourceInterID', title: 'HSourceInterID', width: 150, hide: true } + , { field: 'HSourceEntryID', title: 'HSourceEntryID', width: 150, hide: true } + //, { fixed: 'right', title: '鎿嶄綔', toolbar: '#barDemo', width: 70 } + ]] + , height: 500 + , done: function () { + layer.closeAll("loading"); + } + } //榛樿甯﹀叆鐨勪粨搴擄紝濡傛灉鍚敤浠撲綅鍒欎粨浣嶆湁鏁堬紝濡傛灉娌℃湁鍚敤鍒欎粨浣嶇伆搴� new @@ -337,6 +366,7 @@ function RoadBillMain(linterid) { $.ajax({ url: GetWEBURL() + "/Web/GetPonderationBill", + async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰 type: "GET", data: { "HInterID": linterid }, success: function (d) { @@ -408,7 +438,9 @@ } else {//濡傛灉淇敼鍒欒蛋涓嬮潰 new RoadBillMain(linterid); - RoadBillSub(linterid); + //鏄剧ず琛ㄤ綋鏄庣粏 + DisBillEntryList(); + //RoadBillSub(linterid); HSourceFlag = true; } @@ -577,6 +609,57 @@ }) }); + //#region 鍒犻櫎 + + form.on('submit(cmdDelete)', function () {//鍒犻櫎 + var checkStatus = table.checkStatus('wl-table') + , data = checkStatus.data; + if (checkStatus.data.length === 1) { + layer.confirm("纭瑕佸垹闄ゅ悧锛屽垹闄ゅ悗灏嗕笉鍙仮澶嶏紒", { title: "鍒犻櫎纭" }, function (index) { + var sInterID = $("#HInterID").val() + var sBillNo = $("#HBillNo").val() + var sMaterID = data[0].HMaterID + var sAuxPropID = data[0].HAuxPropID + var sMTONo = '' + var sSourceInterID = data[0].HSourceInterID + var sSourceEntryID = data[0].HSourceEntryID + var HBillType = '1210'; + var sHStockOrgID = sessionStorage["OrganizationID"] + layer.load(3) + $.ajax( + { + type: "Get", + url: GetWEBURL() + "/WEBSController/set_DelPonderationBillMain_Temp_InterIDAndSource_Json", + async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰 + data: { "HInterID": sInterID, "HMaterID": sMaterID, "HAuxPropID": sAuxPropID, "HMTONo": sMTONo, "HSourceInterID": sSourceInterID, "HSourceEntryID": sSourceEntryID, "HBillType": HBillType }, + dataType: "json", + success: function (data) { + if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + //鏄剧ず琛ㄤ綋鏄庣粏 + DisBillEntryList(); + } + else { + layer.msg(data.Message, { icon: 2 }); + } + }, + error: function (err) { + layer.msg('閿欒' + err, { + icon: 5, + time: 20000 + }, function () { + }); + } + }); + layer.close(index) + }) + } + else { + layer.msg('璇烽�夋嫨涓�琛岃褰曪紝杩涜鍒犻櫎锛�'); + } + }); + + //#endregion + //鍏抽棴鎸夐挳 form.on('submit(Cancel)', function () { layer.confirm('鎮ㄧ‘瀹氳閫�鍑哄悧锛�', { icon: 3, title: '鎻愮ず' }, function (index) { @@ -702,34 +785,37 @@ //娓呯┖鏁伴噺 $("#HQty").val(""); //鏄剧ず琛ㄤ綋鏄庣粏 - layer.load(3); - element.tabChange('tab-Kf_EntrustInBill', '2'); - table.render({ - elem: '#wl-table' - //, url: 'http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/DisBillEntryList_Webs_Json' - , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json' - , toolbar: '#toolbarDemo' - , totalRow: true - , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' } - , cols: [[ - { type: 'radio' } - , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true } - , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true } - , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 } - , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } - , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 } - , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 } - , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 } - , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } - , { field: 'HBatchNo', title: '鎵规', width: 150 } - ]] - // , data: [linterid] - // , page: true - , height: 500 - , done: function () { - layer.closeAll("loading"); - } - }); + DisBillEntryList(); + + ////鏄剧ず琛ㄤ綋鏄庣粏 + //layer.load(3); + //element.tabChange('tab-Kf_EntrustInBill', '2'); + //table.render({ + // elem: '#wl-table' + // //, url: 'http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/DisBillEntryList_Webs_Json' + // , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json' + // , toolbar: '#toolbarDemo' + // , totalRow: true + // , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' } + // , cols: [[ + // { type: 'radio' } + // , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true } + // , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true } + // , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 } + // , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } + // , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 } + // , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 } + // , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 } + // , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } + // , { field: 'HBatchNo', title: '鎵规', width: 150 } + // ]] + // // , data: [linterid] + // // , page: true + // , height: 500 + // , done: function () { + // layer.closeAll("loading"); + // } + //}); } else { playSound(); @@ -859,34 +945,37 @@ } } //鏄剧ず琛ㄤ綋鏄庣粏 - layer.load(3); - element.tabChange('tab-Kf_EntrustInBill', '2'); - table.render({ - elem: '#wl-table' - //, url: 'http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/DisBillEntryList_Webs_Json' - , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json' - , toolbar: '#toolbarDemo' - , totalRow: true - , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' } - , cols: [[ - { type: 'radio' } - , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true} - , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true} - , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 } - , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } - , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 } - , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 } - , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 } - , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } - , { field: 'HBatchNo', title: '鎵规', width: 150 } - ]] - // , data: [linterid] - // , page: true - , height: 500 - , done: function () { - layer.closeAll("loading"); - } - }); + DisBillEntryList(); + + ////鏄剧ず琛ㄤ綋鏄庣粏 + //layer.load(3); + //element.tabChange('tab-Kf_EntrustInBill', '2'); + //table.render({ + // elem: '#wl-table' + // //, url: 'http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/DisBillEntryList_Webs_Json' + // , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json' + // , toolbar: '#toolbarDemo' + // , totalRow: true + // , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' } + // , cols: [[ + // { type: 'radio' } + // , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true} + // , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true} + // , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 } + // , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } + // , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 } + // , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 } + // , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 } + // , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } + // , { field: 'HBatchNo', title: '鎵规', width: 150 } + // ]] + // // , data: [linterid] + // // , page: true + // , height: 500 + // , done: function () { + // layer.closeAll("loading"); + // } + //}); //娓呯┖鏁伴噺 $("#HQty").val(""); } @@ -1062,33 +1151,37 @@ HSourceFlag = true; layer.load(3); element.tabChange('tab-Kf_EntrustInBill', '2'); - table.render({ - elem: '#wl-table' - //, url: 'http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/DisBillEntryList_Webs_Json' - , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json' - , toolbar: '#toolbarDemo' - , totalRow: true - , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' } - , cols: [[ - { type: 'radio' } - , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true } - , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true } - , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 } - , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } - , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 } - , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 } - , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 } - , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } - , { field: 'HBatchNo', title: '鎵规', width: 150 } - , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150 } - ]] - // , data: [linterid] - // , page: true - , height: 500 - , done: function () { - layer.closeAll("loading"); - } - }); + + //鏄剧ず琛ㄤ綋鏄庣粏 + DisBillEntryList(); + + //table.render({ + // elem: '#wl-table' + // //, url: 'http://61.130.49.162:9090/WMSAPI///Kf_EntrustInBill/DisBillEntryList_Webs_Json' + // , url: GetWEBURL() + '/Kf_EntrustInBill/DisBillEntryList_Webs_Json' + // , toolbar: '#toolbarDemo' + // , totalRow: true + // , where: { HBillID: sInterID, HBillType: '1210', sWhere: '' } + // , cols: [[ + // { type: 'radio' } + // , { field: 'HQty', title: '鏁伴噺', width: 150, totalRow: true } + // , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150, totalRow: true } + // , { field: 'HMaterNumber', title: '鐗╂枡浠g爜', width: 150 } + // , { field: 'HMaterName', title: '鐗╂枡鍚嶇О', width: 150 } + // , { field: 'HMaterModel', title: '瑙勬牸鍨嬪彿', width: 150 } + // , { field: 'HSourceInterID', title: '婧愬崟涓诲唴鐮�', width: 150 } + // , { field: 'HSourceEntryID', title: '婧愬崟瀛愬唴鐮�', width: 150 } + // , { field: 'HSourceBillNo', title: '婧愬崟鍗曞彿', width: 150 } + // , { field: 'HBatchNo', title: '鎵规', width: 150 } + // , { field: 'HPieceQty', title: '鏉$爜鏁伴噺', width: 150 } + // ]] + // // , data: [linterid] + // // , page: true + // , height: 500 + // , done: function () { + // layer.closeAll("loading"); + // } + //}); } else { // $("#verifycode").click(); @@ -1101,6 +1194,45 @@ }); } + //#region 鏄剧ず鐗╂枡鍒楄〃淇℃伅 + + function DisBillEntryList() { + var sInterID = $("#HInterID").val() + var sBillNo = $("#HBillNo").val() + var HBillType = '1210' + var sHStockOrgID = sessionStorage["OrganizationID"]; + + //鍒锋柊鍒楄〃淇℃伅 + $.ajax({ + type: "GET", + url: GetWEBURL() + '/WEBSController/GetBillEntryTmpList_Json', + async: false, //async鐢ㄤ簬鎺у埗锛坒alse锛夊悓姝ュ拰锛坱rue锛夊紓姝ワ紝榛樿鐨勬槸true锛屽嵆璇锋眰榛樿鐨勬槸寮傛璇锋眰 + data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HStockOrgID": sHStockOrgID }, + success: function (result) { + if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝 + listOption.data = result.data.Materlist; + table.render(listOption); + + //console.log(result.data.list2); + var count = 0; + var count1 = 0; + for (var i = 0; i < result.data.Materlist.length; i++) { + count += result.data.Materlist[i].HQty; + count1 += result.data.Materlist[i].HPieceQty; + } + $("#HSumQtys").val(count); + $("#HBarcodeQtys").val(count1); + //return; + } + else { + layer.msg(result.Message); + } + } + }); + } + + //#endregion + }); //浠ヤ笂涓簂ayui妯″潡 function GetHWHValue(obj) //杩斿洖璋冨叆浠撳簱 -- Gitblit v1.9.1