From b94b49249478ac97272aa545439c682e70143e32 Mon Sep 17 00:00:00 2001
From: yusijie <ysj@hz-kingdee.com>
Date: 星期三, 31 五月 2023 11:05:12 +0800
Subject: [PATCH] 其他入库扫码删除
---
WebTM/views/验收入库/其他入库/Kf_OtherInBill_Fast.html | 399 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 230 insertions(+), 169 deletions(-)
diff --git "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html" "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
index 378958c..25cdbe7 100644
--- "a/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
+++ "b/WebTM/views/\351\252\214\346\224\266\345\205\245\345\272\223/\345\205\266\344\273\226\345\205\245\345\272\223/Kf_OtherInBill_Fast.html"
@@ -1107,183 +1107,244 @@
var sMouldManagerCtl = 'N'
var sFIFOCtl = 'N'
var HBillType = '1203'
- //鍒ゆ柇鏉$爜鏄惁涓虹┖ new
- if (sBarCode == '') {
- playSound();
- layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
- return false;
- }
- if (sBarCode != "") {
- $('#HBarCode').val("");
- //sessionStorage["SourceFlag"] = false;
- }
- //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
- $.ajax({
- //url: "http://localhost:12761/OtherInStockBill/get_InfoByBarCode_Source_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
- url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
- type: "GET",
- data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sessionStorage["HUserName"], "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": sessionStorage["OrganizationID"], "HScanStyle": "", "HCustom1": "", "HCustom2": "" },
- success: function (result) {
- if (result.count == 1) {
- if (result.data.hBarTypeField == '浠撳簱鏉$爜') {
- $("#HWHNAME").val(result.data.hWhNameField);
- $("#HWHID").val(result.data.hWhIDField);
- $("#HStockPlaceName").val("");
- $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
- element.tabChange('tab-Kf_OtherInBill', '2'); //璺宠浆椤电
- return;
- }
- else if (result.data.hBarTypeField == '浠撲綅鏉$爜') {
- $("#HStockPlaceName").val(result.data.hSPNameField);
- $("#HStockPlaceID").val(result.data.hSPIDField);
- $("#HWHNAME").val(result.data.hWhNameField);
- $("#HWHID").val(result.data.hWhIDField);
- $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
- element.tabChange('tab-Kf_OtherInBill', '2');//璺宠浆椤电
- return;
- }
- else if (result.data.hBarTypeField == '閮ㄩ棬鏉$爜') {
- $("#HDeptName").val(result.data.hDeptNameField);
- $("#HDeptID").val(result.data.hDeptIDField);
- $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
- element.tabChange('tab-Kf_OtherInBill', '2');//璺宠浆椤电
- return;
- }
- else if (result.data.hBarTypeField == '婧愬崟鏉$爜') {
- $("#HSupName").val(result.data.hSupNameField);
- $("#HSupID").val(result.data.hSupIDField);
- $("#HDeptName").val(result.data.hDeptNameField);
- $("#HDeptID").val(result.data.hDeptIDField);
- $("#HSourceBillNo").val(result.data.hSourceBillNoField);
- HSourceFlag = true;
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (result.data.hSourceBillType == "1241") {
- $("#HBillType").val("1241");
+ var HDeleteFlag = sBarCode.substring(0, 1);
+ if (HDeleteFlag == "*") {
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ }
+ var sBarCode_Del = sBarCode.slice(1);
+ $.ajax(
+ {
+ type: "Get",
+ url: GetWEBURL() + "/ProductIn/Delete_Json",
+ async: true,
+ data: { "HInterID": sInterID, "HBillNo": sBillNo, "HBillType": HBillType, "HBarCode": sBarCode_Del },
+ dataType: "json",
+ success: function (data) {
+ if (data.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜�
+ playSound1();
+ table.render({
+ elem: '#wl-table'
+ , url: GetWEBURL() + '/ProductIn/DisBillEntryList_Webs_Json'
+ //, toolbar: '#toolbarDemo'
+ , defaultToolbar: []
+ , page: true
+ , limit: 100
+ , where: { HBillID: sInterID, HBillType: '1203', 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: 'HBarcodeQtys', title: '鏉$爜鏁伴噺', width: 150 }
+ ]]
+ // , data: [linterid]
+ // , page: true
+ , height: 500
+ , done: function () {
+ layer.closeAll("loading");
+ }
+ })
+ //娓呯┖鏁伴噺
+ $("#HQty").val("");
}
else {
- $("#HBillType").val("鎵嬪伐褰曞叆");
+ playSound();
+ layer.msg(data.Message, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
}
- $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
- element.tabChange('tab-Kf_OtherInBill', '3');
+ },
+ error: function (err) {
+ playSound();
+ layer.msg('閿欒' + err, { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ }
+ });
+ } else {
+ //鍒ゆ柇鏉$爜鏄惁涓虹┖ new
+ if (sBarCode == '') {
+ playSound();
+ layer.msg("鏉$爜涓虹┖锛屼笉鑳芥壂鎻忥紒", { icon: 5, btn: ['纭'], time: 100000, offset: 't', skin: 'layui-layer-lan', title: "娓╅Θ鎻愮ず" });
+ return false;
+ }
+ if (sBarCode != "") {
+ $('#HBarCode').val("");
+ //sessionStorage["SourceFlag"] = false;
+ }
+
+ //if (AllowLoadData(sSubStr, 'HBarCode') != false) {//闈炵┖楠岃瘉
+ $.ajax({
+ //url: "http://localhost:12761/OtherInStockBill/get_InfoByBarCode_Source_Json", //鏂规硶鎵�鍦ㄩ〉闈㈠拰鏂规硶鍚�
+ url: GetWEBURL() + "/WEBSController/Get_BarCode_Json",
+ type: "GET",
+ data: { "sBarCode": sBarCode, "HInterID": sInterID, "HBillType": HBillType, "HBillNo": sBillNo, "HMaker": sessionStorage["HUserName"], "HWhID": sHWHID, "HSPID": sHSPID, "HQty": sQty, "HRedBlueFlag": false, "SourceFlag": HSourceFlag, "HSourceBillNo": sSourceBillNo, "HSourceBillType": sHBillType, "HStockOrgID": sessionStorage["OrganizationID"], "HScanStyle": "", "HCustom1": "", "HCustom2": "" },
+ success: function (result) {
+ if (result.count == 1) {
+ if (result.data.hBarTypeField == '浠撳簱鏉$爜') {
+ $("#HWHNAME").val(result.data.hWhNameField);
+ $("#HWHID").val(result.data.hWhIDField);
+ $("#HStockPlaceName").val("");
+ $("#HNote").val(";涓�閿壂鐮佷粨搴撴潯鐮�");
+ element.tabChange('tab-Kf_OtherInBill', '2'); //璺宠浆椤电
+ return;
+ }
+ else if (result.data.hBarTypeField == '浠撲綅鏉$爜') {
+ $("#HStockPlaceName").val(result.data.hSPNameField);
+ $("#HStockPlaceID").val(result.data.hSPIDField);
+ $("#HWHNAME").val(result.data.hWhNameField);
+ $("#HWHID").val(result.data.hWhIDField);
+ $("#HNote").val(";涓�閿壂鐮佷粨浣嶆潯鐮�");
+ element.tabChange('tab-Kf_OtherInBill', '2');//璺宠浆椤电
+ return;
+ }
+ else if (result.data.hBarTypeField == '閮ㄩ棬鏉$爜') {
+ $("#HDeptName").val(result.data.hDeptNameField);
+ $("#HDeptID").val(result.data.hDeptIDField);
+ $("#HNote").val(";涓�閿壂鐮侀儴闂ㄦ潯鐮�");
+ element.tabChange('tab-Kf_OtherInBill', '2');//璺宠浆椤电
+ return;
+ }
+ else if (result.data.hBarTypeField == '婧愬崟鏉$爜') {
+ $("#HSupName").val(result.data.hSupNameField);
+ $("#HSupID").val(result.data.hSupIDField);
+ $("#HDeptName").val(result.data.hDeptNameField);
+ $("#HDeptID").val(result.data.hDeptIDField);
+ $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+ HSourceFlag = true;
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (result.data.hSourceBillType == "1241") {
+ $("#HBillType").val("1241");
+
+ }
+ else {
+ $("#HBillType").val("鎵嬪伐褰曞叆");
+ }
+ $("#HNote").val(";涓�閿壂鐮佹簮鍗曟潯鐮�");
+ element.tabChange('tab-Kf_OtherInBill', '3');
+ }
+ else {
+ if (HSourceFlag == true) {
+ element.tabChange('tab-Kf_OtherInBill', '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);
+ //sessionStorage["SourceFlag"] = true;
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ //if (result.data.HSourceBillType == "1241") {
+ // $("#HBillType").val("1241");
+
+ //}
+ //else if (result.data.HSourceBillType == "1601") {
+ // $("#HBillType").val("1601");
+ //}
+
+
+ HSourceFlag = true;
+ $("#HSourceBillNo").val(result.data.hSourceBillNoField);
+ $("#HBillType").val(result.data.hSourceBillTypeField == null ? "1241" : result.data.hSourceBillTypeField);
+ //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
+ if (result.data.hSourceBillTypeField == "1241") {
+ $("#HBillType").empty();
+ $("#HBillType").val("1241");
+ var optionHtml = '';
+ optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
+ $("#HBillType").append(optionHtml);
+ layui.form.render('select');
+ $("#HBillType").attr("readonly", "readonly");
+ }
+ else {
+ //$("#HBillType").empty();
+ $("#HBillType").val("-1");
+ var optionHtml = '';
+ optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鎵嬪伐褰曞叆' + "</option>";
+ $("#HBillType").append(optionHtml);
+ layui.form.render('select');
+ $("#HBillType").attr("readonly", "readonly");
+ }
+ $("#HSourceBillNo").attr("readonly", "readonly");
+ $("#HNote").val(";鐗╂枡鏉$爜");
+ element.tabChange('tab-Kf_OtherInBill', '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: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
+ // //, toolbar: '#toolbarDemo'
+ // , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
+ // , cellMinWidth: 90
+ // , 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: 'HAuxPropID', title: '杈呭姪灞炴��', width: 150 }
+ // , { field: 'HMTONo', title: 'MTO鍙�', width: 150 }
+ // ]]
+ // , height: 500
+ // , done: function () {
+ // layer.closeAll("loading");
+ // }
+ //});
+ $.ajax({
+ url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
+ type: "GET",
+ data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
+ success: function (result) {
+ if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
+ listOption.data = result.data.list;
+ table.render(listOption);
+ listOption1.data = result.data.list2;
+ table.render(listOption1);
+
+ //console.log(result.data.list2);
+ var count = 0;
+ var count1 = 0;
+ for (var i = 0; i < result.data.list.length; i++) {
+ count += result.data.list[i].HQty;
+ count1 += result.data.list[i].HPieceQty;
+ }
+ $("#HSumQtys").val(count);
+ $("#HBarCodeQtys").val(count1);
+ //return;
+ }
+ else {
+ layer.msg(result.Message);
+ }
+ layer.closeAll("loading");
+ }
+ });
+ //娓呯┖鏁伴噺
+ $("#HQty").val("");
}
else {
- if (HSourceFlag == true) {
- element.tabChange('tab-Kf_OtherInBill', '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);
- //sessionStorage["SourceFlag"] = true;
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- //if (result.data.HSourceBillType == "1241") {
- // $("#HBillType").val("1241");
-
- //}
- //else if (result.data.HSourceBillType == "1601") {
- // $("#HBillType").val("1601");
- //}
-
-
- HSourceFlag = true;
- $("#HSourceBillNo").val(result.data.hSourceBillNoField);
- $("#HBillType").val(result.data.hSourceBillTypeField == null ? "1241" : result.data.hSourceBillTypeField);
- //鑾峰彇婧愬崟绫诲瀷銆佹簮鍗曞崟鍙�
- if (result.data.hSourceBillTypeField == "1241") {
- $("#HBillType").empty();
- $("#HBillType").val("1241");
- var optionHtml = '';
- optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鍏ュ簱鐢宠鍗�' + "</option>";
- $("#HBillType").append(optionHtml);
- layui.form.render('select');
- $("#HBillType").attr("readonly", "readonly");
- }
- else {
- //$("#HBillType").empty();
- $("#HBillType").val("-1");
- var optionHtml = '';
- optionHtml += "<option value = '" + result.data.hSourceBillTypeField + "' >" + '鎵嬪伐褰曞叆' + "</option>";
- $("#HBillType").append(optionHtml);
- layui.form.render('select');
- $("#HBillType").attr("readonly", "readonly");
- }
- $("#HSourceBillNo").attr("readonly", "readonly");
- $("#HNote").val(";鐗╂枡鏉$爜");
- element.tabChange('tab-Kf_OtherInBill', '3');
- }
+ // $("#verifycode").click();
+ //layer.msg(result.Message, { icon: 5 });
+ layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
}
- //$("#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: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_Json'
- // //, toolbar: '#toolbarDemo'
- // , where: { HBillID: sInterID, HBillType: '1203', sWhere: '' }
- // , cellMinWidth: 90
- // , 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: 'HAuxPropID', title: '杈呭姪灞炴��', width: 150 }
- // , { field: 'HMTONo', title: 'MTO鍙�', width: 150 }
- // ]]
- // , height: 500
- // , done: function () {
- // layer.closeAll("loading");
- // }
- //});
- $.ajax({
- url: GetWEBURL() + '/OtherInStockBill/DisBillEntryList_Webs_New_Json1',
- type: "GET",
- data: { HBillID: sInterID, HBillNo: sBillNo, HBillType: HBillType, sMouldManagerCtl: sMouldManagerCtl, sFIFOCtl: sFIFOCtl },
- success: function (result) {
- if (result.count == 1) { // 璇存槑楠岃瘉鎴愬姛浜嗭紝
- listOption.data = result.data.list;
- table.render(listOption);
- listOption1.data = result.data.list2;
- table.render(listOption1);
-
- //console.log(result.data.list2);
- var count = 0;
- var count1 = 0;
- for (var i = 0; i < result.data.list.length; i++) {
- count += result.data.list[i].HQty;
- count1 += result.data.list[i].HPieceQty;
- }
- $("#HSumQtys").val(count);
- $("#HBarCodeQtys").val(count1);
- //return;
- }
- else {
- layer.msg(result.Message);
- }
- layer.closeAll("loading");
- }
- });
- //娓呯┖鏁伴噺
- $("#HQty").val("");
+ layer.closeAll("loading");
}
- else {
- // $("#verifycode").click();
- //layer.msg(result.Message, { icon: 5 });
- layer.msg(result.Message, { icon: 5, btn: ['閫�鍑�'], time: 100000, offset: 't' });
- }
- layer.closeAll("loading");
- }
- });
+ });
+ }
}
function playSound() {
//var audio = document.getElementById("cs");
--
Gitblit v1.9.1