From 7271757d8a07b55b51adc7b88d6f2dfa302e8b40 Mon Sep 17 00:00:00 2001
From: ch <37327@LLOOCCY>
Date: 星期日, 02 一月 2022 19:14:09 +0800
Subject: [PATCH] 其他入库、委外入库、委外出库缓存列表功能
---
WebTM/views/领料发货/销售出库/Kf_SellOutBill_Fast.html | 284 ++++++++++++++++++++++++++++++++++----------------------
1 files changed, 174 insertions(+), 110 deletions(-)
diff --git "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html" "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
index 697750f..d1e96cd 100644
--- "a/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
+++ "b/WebTM/views/\351\242\206\346\226\231\345\217\221\350\264\247/\351\224\200\345\224\256\345\207\272\345\272\223/Kf_SellOutBill_Fast.html"
@@ -807,7 +807,12 @@
//鎵潯鐮�-鐩存帴璋僿ebservice
$('#HBarCode').on('keydown', function (event) {
- var sBarCode = $('#HBarCode').val()//鏉$爜
+ var sOldBarCode = $('#HBarCode').val()
+ var HDeleteFlag = sOldBarCode.substring(0, 1);
+ var sBarCode = sOldBarCode.slice(1);
+
+
+ //var sBarCode = $('#HBarCode').val()//鏉$爜
var sInterID = $("#HInterID").val()//鍗曟嵁鍙稩D
var sBillType = '1205'
var sBillNo = $("#HBillNo").val()//鍗曟嵁鍙�
@@ -818,71 +823,104 @@
//var SourceFlag = sessionStorage["SourceFlag"];
var sSourceBillNo = $("#HSourceBillNo").val();//婧愬崟鍙�
var sHBillType = $("#HBillType").val() //婧愬崟绫诲瀷-鍙戣揣閫氱煡鍗曪細1402锛岄攢鍞鍗�1401
-
+ var sBillType = '1205'
if (sQty == "") {
sQty = 0;
}
if (event.keyCode == 13) {
- if (sBarCode == '') {
- layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
- return false;
- }
- if (sBarCode != "") {
- $('#HBarCode').val("");
- }
- $.ajax({
- url: GetWEBURL() + "/SellOut/get_CheckTypeByBarCode_Json",
- type: "GET",
- data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sMaker, "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
- success: function (result) {
- if (result.count == 1) {
- if (result.data.HBarType == '浠撳簱鏉$爜') {
- $("#HWHNAME").val(result.data.HWhName);
- $("#HWHID").val(result.data.HWhID);
- $("#HStockPlaceName").val("");
- $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3'); //璺宠浆椤电
- }
- else if (result.data.HBarType == '浠撲綅鏉$爜') {
- $("#HStockPlaceName").val(result.data.HSPName);
- $("#HStockPlaceID").val(result.data.HSPID);
- $("#HWHNAME").val(result.data.HWhName);
- $("#HWHID").val(result.data.HWhID);
- $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
- }
- else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
- $("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
- }
- else if (result.data.HBarType == '婧愬崟鏉$爜') {
- //$("#HSupName").val(result.data.HSupName);
- $("#HSupID").val(result.data.HSupID);
- //$("#HDeptName").val(result.data.HDeptName);
- $("#HDeptID").val(result.data.HDeptID);
- $("#HSourceBillNo").val(result.data.HSourceBillNo);
- HSourceFlag = true;
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (result.data.HSourceBillType == "1402") {
- $("#HBillType").val("1402");
-
- }
- else if (result.data.HSourceBillType == "1401") {
- $("#HBillType").val("1401");
+ if (HDeleteFlag == "*") {
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ $.ajax(
+ {
+ type: "Get",
+ url: GetWEBURL() + "/ProductIn/Delete_Json",
+ async: true,
+ data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": sBillType, "HBarCode": sBarCode },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+ table.render({
+ elem: '#wl-table'
+ // , url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HQty', title: '鏁伴噺', width: 150 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+ , { 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: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
+ , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
+ , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
+ , { field: 'HSCWHID', title: '璋冨嚭浠撳簱ID', width: 150, hide: true }
+ , { field: 'HSCSPID', title: '璋冨嚭浠撲綅ID', width: 150, hide: true }
+ , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 150, hide: true }
+ , { field: 'HMTONo', title: 'MTO鍙�', width: 150, hide: true }
+ , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ //, height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ })
}
else {
- $("#HBillType").val("鎵嬪伐褰曞叆");
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
- $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
- element.tabChange('tab-Kf_SellOutBill', '3');
+ },
+ error: function (err) {
+ layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
- else {
- if (HSourceFlag == "true") {
- element.tabChange('tab-Kf_SellOutBill', '3');
+ });
+ }
+ else {
+ var sBarCode = $('#HBarCode').val()
+ if (sBarCode == '') {
+ layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭畾'], time: 100000, offset: 't' });
+ return false;
+ }
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ $.ajax({
+ url: GetWEBURL() + "/SellOut/get_CheckTypeByBarCode_Json",
+ type: "GET",
+ data: { "sCode": sBarCode, "sInterID": sInterID, "HBillType": sBillType, "sBillNo": sBillNo, "sMaker": sMaker, "WhID": sHWHID, "SPID": sHSPID, "sQty": sQty, "sRedBlue": false, "SourceFlag": HSourceFlag, "sSourceBillNo": sSourceBillNo, "sSourceType": sHBillType, "HOWNERID": sessionStorage["OrganizationID"] },
+ success: function (result) {
+ if (result.count == 1) {
+ if (result.data.HBarType == '浠撳簱鏉$爜') {
+ $("#HWHNAME").val(result.data.HWhName);
+ $("#HWHID").val(result.data.HWhID);
+ $("#HStockPlaceName").val("");
+ $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+ element.tabChange('tab-Kf_SellOutBill', '3'); //璺宠浆椤电
}
- else {
+ else if (result.data.HBarType == '浠撲綅鏉$爜') {
+ $("#HStockPlaceName").val(result.data.HSPName);
+ $("#HStockPlaceID").val(result.data.HSPID);
+ $("#HWHNAME").val(result.data.HWhName);
+ $("#HWHID").val(result.data.HWhID);
+ $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+ element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
+ }
+ else if (result.data.HBarType == '閮ㄩ棬鏉$爜') {
+ $("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+ element.tabChange('tab-Kf_SellOutBill', '3');//璺宠浆椤电
+ }
+ else if (result.data.HBarType == '婧愬崟鏉$爜') {
//$("#HSupName").val(result.data.HSupName);
$("#HSupID").val(result.data.HSupID);
//$("#HDeptName").val(result.data.HDeptName);
@@ -897,63 +935,89 @@
else if (result.data.HSourceBillType == "1401") {
$("#HBillType").val("1401");
}
- //else if (result.data.HSourceBillType == "1601") {
- // $("#HBillType").val("1601");
- //}
- $("#HNote").val(";鐗╂枡鏉$爜");
+ else {
+ $("#HBillType").val("鎵嬪伐褰曞叆");
+ }
+ $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
element.tabChange('tab-Kf_SellOutBill', '3');
}
+ else {
+ if (HSourceFlag == "true") {
+ element.tabChange('tab-Kf_SellOutBill', '3');
+ }
+ else {
+ //$("#HSupName").val(result.data.HSupName);
+ $("#HSupID").val(result.data.HSupID);
+ //$("#HDeptName").val(result.data.HDeptName);
+ $("#HDeptID").val(result.data.HDeptID);
+ $("#HSourceBillNo").val(result.data.HSourceBillNo);
+ HSourceFlag = true;
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (result.data.HSourceBillType == "1402") {
+ $("#HBillType").val("1402");
+
+ }
+ else if (result.data.HSourceBillType == "1401") {
+ $("#HBillType").val("1401");
+ }
+ //else if (result.data.HSourceBillType == "1601") {
+ // $("#HBillType").val("1601");
+ //}
+ $("#HNote").val(";鐗╂枡鏉$爜");
+ element.tabChange('tab-Kf_SellOutBill', '3');
+ }
+ }
+ //$("#HSupID").val(result.data.HSupID);
+ //$("#HSupName").val(result.data.HSupName);
+ //$("#HDeptID").val(result.data.HDeptID);
+ //$("#HDeptName").val(result.data.HDeptName);
+ layer.load(3)
+ table.render({
+ elem: '#wl-table'
+ // , url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
+ , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
+ , toolbar: '#toolbarDemo'
+ , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
+ , cols: [[
+ { type: 'radio' }
+ , { field: 'HQty', title: '鏁伴噺', width: 150 }
+ , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
+ , { 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: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
+ , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
+ , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
+ , { field: 'HSCWHID', title: '璋冨嚭浠撳簱ID', width: 150, hide: true }
+ , { field: 'HSCSPID', title: '璋冨嚭浠撲綅ID', width: 150, hide: true }
+ , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 150, hide: true }
+ , { field: 'HMTONo', title: 'MTO鍙�', width: 150, hide: true }
+ , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ //, height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ });
}
- //$("#HSupID").val(result.data.HSupID);
- //$("#HSupName").val(result.data.HSupName);
- //$("#HDeptID").val(result.data.HDeptID);
- //$("#HDeptName").val(result.data.HDeptName);
- layer.load(3)
- table.render({
- elem: '#wl-table'
- // , url: 'http://61.130.49.162:9090/WMSAPI///OtherInStockBill/DisBillEntryList_Webs_Json'
- , url: GetWEBURL() + '/SellOut/DisBillEntryList_Webs_Json'
- , toolbar: '#toolbarDemo'
- , where: { HBillID: sInterID, HBillType: '1205', sWhere: '' }
- , cols: [[
- { type: 'radio' }
- , { field: 'HQty', title: '鏁伴噺', width: 150 }
- , { field: 'HQtyMust', title: '搴旀敹鏁伴噺', width: 150 }
- , { 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: 'HInterID', title: '鍗曟嵁ID', width: 150, hide: true }
- , { field: 'HBilltype', title: '鍗曟嵁绫诲瀷', width: 150, hide: true }
- , { field: 'Hbarcode', title: '鏉$爜缂栧彿', width: 150, hide: true }
- , { field: 'HSCWHID', title: '璋冨嚭浠撳簱ID', width: 150, hide: true }
- , { field: 'HSCSPID', title: '璋冨嚭浠撲綅ID', width: 150, hide: true }
- , { field: 'HAuxPropID', title: '杈呭姪灞炴�D', width: 150, hide: true }
- , { field: 'HMTONo', title: 'MTO鍙�', width: 150, hide: true }
- , { field: 'HMaterID', title: '鐗╂枡ID', width: 150, hide: true }
- ]]
- // , data: [linterid]
- // , page: true
- //, height: 500
- , done: function () {
- layer.closeAll("loading");
- }
- });
+ else {
+ // $("#verifycode").click();
+ //layer.msg(result.Message, { icon: 5 });
+ layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ layer.closeAll("loading");
+ },
+ error: function (err) {
+ layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
- else {
- // $("#verifycode").click();
- //layer.msg(result.Message, { icon: 5 });
- layer.msg(result.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- layer.closeAll("loading");
- },
- error: function (err) {
- layer.msg("鎺ュ彛璇锋眰澶辫触锛�" + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- }
- });
+ });
+ }
}
});
--
Gitblit v1.9.1