From 5ad02cdbb8b596683c45751f78aa82d015a85143 Mon Sep 17 00:00:00 2001 From: cdk <2441919651@qq.com> Date: 星期二, 07 一月 2025 09:27:10 +0800 Subject: [PATCH] 1.其它出库增加发料数量字段,修改扫条码的逻辑 2.销售出库待发区增加库位 --- pages/CangKuManage/CK_XSCK_DFQ.html | 162 ++++++++++++++++++++++++++++------------------------- 1 files changed, 85 insertions(+), 77 deletions(-) diff --git a/pages/CangKuManage/CK_XSCK_DFQ.html b/pages/CangKuManage/CK_XSCK_DFQ.html index 0ac4bc6..9c484f6 100644 --- a/pages/CangKuManage/CK_XSCK_DFQ.html +++ b/pages/CangKuManage/CK_XSCK_DFQ.html @@ -38,12 +38,6 @@ <body> <div class="mui-input-group mui-content" > - <!-- <div class="mui-input-row "> - <div style=" float: left; "> - <label class="row-title">浜哄憳</label> - <input class="row-content-split" type="text" name="txtBillNo" id="txtBillNo" placeholder="璇烽�夋嫨鎶ュ伐浜哄憳"readonly="readonly"> - </div> - </div> --> <div class="mui-input-row" id="row001"> <label>浜哄憳缂栫爜</label> <input id="txtBillNoN" type="text" value="" class="mui-input-clear text-color" placeholder="璇锋壂鎻忎汉鍛樼爜" onkeypress="GetBarInfoT()" /> @@ -104,7 +98,7 @@ </div> <div style="width: 40%;float: left;"> <input id="MBA001" type="text" value="" class="text-color" placeholder="璇锋壂鎻忓簱浣�" - style="width: 100%;float: left;" onkeypress="GetStoreTAA()" /> + style="width: 100%;float: left;" onkeypress="GetStore()" /> </div> <div style="width: 29%;float: left;" class="mui-checkbox mui-left"> <label style="width: 100%;float: left;">榛樿</label> @@ -165,23 +159,13 @@ <script> mui.init(); // 鍒濆鍖� MUI - //app.init(); - //鍒濆鍖� - + mui.plusReady(function() { app.init(); fetchData(); fetchCYSData(); - // console.log("1111"); - //app.init(); - //fetchData(); - //fetchCYSData(); }); - // window.onload = function(){ - - // fetchData(); - // fetchCYSData(); - // } + var is_DY =false; // 褰撶‘瀹氭寜閽鐐瑰嚮鏃讹紝鎵ц鐨勫洖璋冨嚱鏁� @@ -231,11 +215,7 @@ var DFA001 = splitValues[0]; // 绗竴涓�煎瓨鍏� DFA001 var DFB002 = splitValues[1]; // 绗簩涓�煎瓨鍏� DFB002 } - //鐢ㄦ埛ID - // var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); - // var user_id =currentSession.user_id; //currentSession.user_id; - // var user_id = "admin"; - //console.log("4"); + $.ajax({ url: app.API_URL_HEADER + "/WARBABChag/GetBarInfoXSCK", @@ -273,9 +253,7 @@ //$("#FLSL").val(data.data.FLSL);//濉叆鍙戞枡鏁伴噺 //$("#DAB020").val(data.data.DAB020);//濉叆鐗╂枡缂栫爜 - - - if (parseFloat(txtSL.value) <= parseFloat(FLSL.value)) { + if (parseFloat(txtSL.value) <= parseFloat(FLSL.value) && $("#MBA001").val() != '') { // txtSL鐨勫�煎皬浜嶧LSL鐨勫�� console.log("鐢熸垚鍑哄簱鍗�"); @@ -283,6 +261,10 @@ txtSL.value = ""; FLSL.value = ""; document.getElementById("DAB020").value = ""; + if(!document.getElementById('checkdefault').checked) + { + $("#MBA001").val(""); + } }else { FLSL.focus(); @@ -326,31 +308,32 @@ var DFB002 = splitValues[1]; // 绗簩涓�煎瓨鍏� DFB002 } - // 姣旇緝鏁板�煎ぇ灏� - - if (txtSLValue <= FLSLValue) { - - // txtSL鐨勫�煎皬浜嶧LSL鐨勫�� - console.log("鐢熸垚鍑哄簱鍗�1"); - // CreateXSCKD(); - // txtSL.value = ""; - // FLSL.value = ""; - // document.getElementById("DAB020").value = ""; + CreateXSCKD(); + txtSL.value = ""; + FLSL.value = ""; + document.getElementById("DAB020").value = ""; + if(!document.getElementById('checkdefault').checked) + { + $("#MBA001").val(""); + } } else if (txtSLValue > FLSLValue) { - // txtSL鐨勫�煎ぇ浜嶧LSL鐨勫�� - //console.log("纭鏄惁鎷嗗垎棰嗘枡"); mui.confirm('鏄惁鎷嗗垎璇ユ潯鐮侊紵', '璇风‘璁�', ['纭', '鍙栨秷'], function(e) { if (e.index === 0) { //PrintSplit(); if(is_DY) { - PrintSplit_XSCK(); SX_FHTZD(); + txtSL.value = ""; + FLSL.value = ""; + document.getElementById("DAB020").value = ""; + if(!document.getElementById('checkdefault').checked) + { + $("#MBA001").val(""); + } console.log("鍒锋柊鎴愬姛锛�"); is_DY = false; - } } else { @@ -363,6 +346,55 @@ } } }; + + function GetStore() { + //鐢ㄦ埛ID + if($("#txtSL").val() == "" || $("#FLSL").val() == ""){ + return; + } + + var txtSL = document.getElementById("txtSL"); + var FLSL = document.getElementById("FLSL"); + var txtSLValue = parseFloat(txtSL.value); + var FLSLValue = parseFloat(FLSL.value); + + if (txtSLValue <= FLSLValue) { + CreateXSCKD(); + txtSL.value = ""; + FLSL.value = ""; + document.getElementById("DAB020").value = ""; + if(!document.getElementById('checkdefault').checked) + { + $("#MBA001").val(""); + } + } else if (txtSLValue > FLSLValue) { + mui.confirm('鏄惁鎷嗗垎璇ユ潯鐮侊紵', '璇风‘璁�', ['纭', '鍙栨秷'], function(e) { + if (e.index === 0) { + //PrintSplit(); + if(is_DY) + { + PrintSplit_XSCK(); + SX_FHTZD(); + txtSL.value = ""; + FLSL.value = ""; + document.getElementById("DAB020").value = ""; + if(!document.getElementById('checkdefault').checked) + { + $("#MBA001").val(""); + } + console.log("鍒锋柊鎴愬姛锛�"); + is_DY = false; + } + + } else { + // 鐢ㄦ埛鐐瑰嚮浜嗗彇娑堟寜閽� + console.log("鍙栨秷鎷嗗垎锛�"); + FLSL.focus(); + } + }); + + } + } //鍒锋柊鎸夐挳 function confirmQuantity() { @@ -476,20 +508,8 @@ //鑾峰彇杞︾墝鍙�,鏍¢獙銆� var cpinfo = document.getElementById("cpinfo"); var cpinfoValue = cpinfo.value; + var CKB002 = $("#MBA001").val(); - // if (cpinfoValue === '') { - // alert("璇疯緭鍏ヨ溅鐗屽彿锛侊紒锛�"); - // return; - // } - - // var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); - // var user_id = currentSession.user_id; - - // var user_id = app.userid - // if(app.userid === undefined) - // { - // user_id = document.getElementById('txtBillNo').value; - // } var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); //var user_id = currentSession.user_id; if($("#txtBillNo").val() == ""){ @@ -500,7 +520,7 @@ console.log(user_id); - $.ajax(app.API_URL_HEADER + "/WARBABChag/PrintSplit_XSCK", { + $.ajax(app.API_URL_HEADER + "/WARBABChag/PrintSplit_XSCK_DFQ", { data: { DAB001: barcodeValue, user_id: user_id, @@ -513,6 +533,7 @@ orderTypeBill: orderTypeBill, orderTypeName: orderTypeName, FLSL:document.getElementById("FLSL").value, + CKB002: CKB002, }, dataType: "json", type: "post", @@ -544,9 +565,6 @@ SX_FHTZD(); playerAudio("OK"); //printByIds(str); - - - } }, error: function(xhr, type, errorThrown) { @@ -788,16 +806,17 @@ function CreateXSCKD() { var barcodeInput = document.getElementById("DAB001"); var barcodeValue = barcodeInput.value; - - - - // 濡傛灉鏈緭鍏ユ潯鐮侊紝璺冲嚭鏂规硶 if (barcodeValue === '') { alert("璇锋壂鎻忔潯鐮侊紒锛侊紒"); return; } + + if ($("#MBA001").val() === '') { + alert("璇锋壂鎻忓簱浣嶏紒锛侊紒"); + return; + } //鑾峰彇鍙戣揣閫氱煡鍗曪紝鏍¢獙 var COMDFA = document.getElementById("order"); @@ -817,6 +836,7 @@ //鑾峰彇涓氬姟绫诲瀷,鏍¢獙銆� var ywlx = document.getElementById("base"); var ywlxValue = ywlx.value; + var CKB002 = $("#MBA001").val(); if (ywlxValue === '') { alert("璇烽�夋嫨涓氬姟绫诲瀷锛侊紒锛�"); @@ -856,20 +876,7 @@ //鑾峰彇杞︾墝鍙�,鏍¢獙銆� var cpinfo = document.getElementById("cpinfo"); var cpinfoValue = cpinfo.value; - - // if (cpinfoValue === '') { - // alert("璇疯緭鍏ヨ溅鐗屽彿锛侊紒锛�"); - // return; - // } - - // var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); - // var user_id = currentSession.user_id; - - // var user_id = app.userid - // if(app.userid === undefined) - // { - // user_id = document.getElementById('txtBillNo').value; - // } + var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); //var user_id = currentSession.user_id; @@ -881,7 +888,7 @@ console.log(user_id); - $.ajax(app.API_URL_HEADER + "/WARBABChag/CreateXSCK", { + $.ajax(app.API_URL_HEADER + "/WARBABChag/CreateXSCK_DFQ", { data: { DAB001: barcodeValue, user_id: user_id, @@ -893,6 +900,7 @@ cpinfo: cpinfoValue, orderTypeBill: orderTypeBill, orderTypeName: orderTypeName, + CKB002: CKB002, }, dataType: "json", type: "post", -- Gitblit v1.9.3