From 1b7699b7a22019b059ef7ecdf56aacfa01cc93c3 Mon Sep 17 00:00:00 2001
From: zrg <z18737863051@163.com>
Date: 星期一, 29 四月 2024 17:35:29 +0800
Subject: [PATCH] Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
---
WebTM/views/验收入库/委外入库/Kf_EntrustInBill_Fast.html | 304 ++++++++++++++++++++++++++++++++++++--------------
1 files changed, 219 insertions(+), 85 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..d1904aa 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"
@@ -102,7 +102,7 @@
<label class="layui-form-label" style="width:30px;padding-left:0px;">浠撳簱</label>
</div>
<div class="layui-col-xs6">
- <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" readonly>
+ <input type="text" name="HWHNAME" id="HWHNAME" lay-verify="HWHNAME" autocomplete="off" class="layui-input" >
<input type="hidden" name="HWHID" id="HWHID" lay-verify="HWHID" autocomplete="off" class="layui-input">
</div>
<div class="layui-col-xs2">
@@ -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("");
}
@@ -926,7 +1015,9 @@
data: { "HBarCode": HBarCode },
success: function (result) {
if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ $("#HStockPlaceID").val(result.data[0].HItemID);
$("#HStockPlaceName").val(result.data[0].HName);
+ $("#HStockPlaceID").val(result.data[0].HItemID);
$("#HWHID").val(result.data[0].HWHID);
$("#HWHNAME").val(result.data[0].HWhName);
element.tabChange('tab-Kf_EntrustInBill', '2');
@@ -1062,33 +1153,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 +1196,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