js/CangKuManage_js/QTCK.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
lib/base_js/js/app.js | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
manifest.json | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/CangKuManage/CK_XSCK_DFQ.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
pages/CangKuManage/QTCK.html | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
js/CangKuManage_js/QTCK.js
@@ -134,10 +134,10 @@ } // var user_id = "admin"; $.ajax({ url: app.API_URL_HEADER + "/XKYDHD/GetBarInfoQTBARCK", url: app.API_URL_HEADER + "/XKYDHD/GetDBAInfoQTBARCK", data: { DBNO:$("#QTNO").val(), DBNO:$("#QTNO").val(), DAB001: $("#DAB001").val(), logID: user_id //user_id,//Admin //先写死,便于调试 @@ -156,16 +156,28 @@ }); return; } else { matterTable = data.data.matterTable; $("#DAB001").val(""); $("#DAB002").val(matterTable[0]["ITEMNO"].toString()); $("#DAB003").val(matterTable[0]["QUANTITYB"].toString() === null ? 0 : matterTable[0]["QUANTITYB"].toString()); mui.toast("扫描成功!"); mui("#DAB001")[0].focus(); playerAudio("OK"); GetInfoQTCK(); matterTable = data.data.matterTable; $("#DAB002").val(matterTable[0]["ITEMNO"].toString()); $("#DAB003").val(matterTable[0]["DBA005"].toString() === null ? 0 : matterTable[0]["DBA005"].toString()); $("#FLSL").val(matterTable[0]["QUANTITY"].toString() === null ? 0 : matterTable[0]["QUANTITY"].toString()); var DAB003 = parseFloat($("#DAB003").val()); var FLSL = parseFloat($("#FLSL").val()); var ISEXIST = parseInt(matterTable[0]["ISEXIST"].toString() === null ? 0 : matterTable[0]["ISEXIST"].toString()); // 大于0的表示在表GS_QTWL中,不做限制 if (DAB003 <= FLSL || ISEXIST > 0) { // txtSL的值小于FLSL的值 //console.log("生成领料单1"); CreateZJDBCK(); GetInfoQTCK(); mui("#DAB001")[0].focus(); $("#DAB001").val("");//先清空一下数据源 $("#DAB002").val("");//先清空一下数据源 $("#DAB003").val("");//先清空一下数据源 $("#FLSL").val("");//先清空一下数据源 } else{ mui("#FLSL")[0].focus(); } } }, error: function(xhr, type, errorThrown) { @@ -174,6 +186,128 @@ }); } }; function CreateZJDBCK() { //用户ID var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); var user_id =currentSession.user_id; //currentSession.user_id; $.ajax({ url: app.API_URL_HEADER + "/XKYDHD/GetBarInfoQTBARCK", data: { DBNO:$("#QTNO").val(), DAB001: $("#DAB001").val(), logID: user_id //user_id,//Admin //先写死,便于调试 }, DataType: "json", type: "post", async: false, //timeout: 15000, success: function(data) { //console.log(JSON.stringify(data)); if(data.status != 0) { playerAudio("NG"); mui.alert(data.message,"","",function(){ mui("#DAB001")[0].focus(); $("#DAB001").val(""); $("#DAB003").val("");//先清空一下数据源 }); return; } else { $("#DAB003").val("");//先清空一下数据源 $("#FLSL").val("");//先清空一下数据源 //mui("#FLSL")[0].focus(); playerAudio("OK"); mui.toast("出库成功"); } }, error: function(xhr, type, errorThrown) { alert("获取数据异常:" + JSON.stringify(errorThrown)); } }); }; // 扫描条码处理方法 function is_CreateSCLLD() { if (event.keyCode == 13) { var DAB003Value = parseFloat($("#DAB003").val()); var FLSLValue = parseFloat($("#FLSL").val()); // 比较数值大小 if (DAB003Value <= FLSLValue) { // txtSL的值小于FLSL的值 console.log("生成领料单"); // CreateSCLLD(); // GETGDINFO_SX(); } else if (DAB003Value > FLSLValue) { // txtSL的值大于FLSL的值 //console.log("确认是否拆分领料"); mui.confirm('是否拆分该条码?', '请确认', ['确认', '取消'], function(e) { if (e.index === 0) { PrintSplit(); GetInfoQTCK(); console.log("刷新成功!"); mui("#DAB001")[0].focus(); $("#DAB001").val("");//先清空一下数据源 } else { // 用户点击了取消按钮 mui("#FLSL")[0].focus(); } }); } } }; function PrintSplit() { //用户ID var currentSession = app.loadconfig(app.CONFIG_CURRENT_SESSION); var user_id =currentSession.user_id; //currentSession.user_id; $.ajax({ url: app.API_URL_HEADER + "/XKYDHD/GetBarInfoQTBARCK_S", data: { DBNO:$("#QTNO").val(), DAB001: $("#DAB001").val(), logID: user_id, //user_id,//Admin //先写死,便于调试 SL:$("#FLSL").val() }, DataType: "json", type: "post", async: false, //timeout: 15000, success: function(data) { //console.log(JSON.stringify(data)); if(data.status != 0) { playerAudio("NG"); mui.alert(data.message,"","",function(){ mui("#DAB001")[0].focus(); $("#DAB001").val(""); $("#DAB003").val("");//先清空一下数据源 }); return; } else { $("#DAB003").val("");//先清空一下数据源 $("#FLSL").val("");//先清空一下数据源 mui("#FLSL")[0].focus(); playerAudio("OK"); mui.toast("出库成功"); //initBluetooth(); } }, error: function(xhr, type, errorThrown) { alert("获取数据异常:" + JSON.stringify(errorThrown)); } }); }; function populateTable(data) { console.log(data); @@ -202,6 +336,10 @@ let td4 = document.createElement("td"); td4.textContent = data[i]["已扫数量"]; tr.appendChild(td4); let td5 = document.createElement("td"); td5.textContent = data[i]["超额管理"]; tr.appendChild(td5); tbody.appendChild(tr); } lib/base_js/js/app.js
@@ -50,6 +50,12 @@ // app.API_URL_HEADER = "http://localhost:27611/api"; // app.API_URL_HEADER_BACK = "http://localhost:27611/api"; //正式环境 app.API_URL = "http://192.168.1.198:8081/MESAPP"; app.API_URL_BACK = "http://211.140.38.18:8081/MESAPP"; app.API_URL_HEADER = "http://192.168.1.198:8081/MESAPP/api"; app.API_URL_HEADER_BACK = "http://211.140.38.18:8081/MESAPP/api"; // app.API_URL = "http://192.168.0.103:27611"; // app.API_URL_BACK = "http://192.168.0.103:27611"; // app.API_URL_HEADER = "http://192.168.0.103:27611/api"; @@ -60,10 +66,10 @@ // app.API_URL_HEADER = "http://192.168.1.198:8081/MESAPP/api"; // app.API_URL_HEADER_BACK = "http://192.168.1.198:8081/MESAPP/api"; app.API_URL = "http://192.168.1.198:8081/MESAPP"; app.API_URL_BACK = "http://211.140.38.18:8081/MESAPP"; app.API_URL_HEADER = "http://192.168.1.198:8081/MESAPP/api"; app.API_URL_HEADER_BACK = "http://211.140.38.18:8081/MESAPP/api"; // app.API_URL = "http://192.168.1.198:8081/MESAPP"; // app.API_URL_BACK = "http://211.140.38.18:8081/MESAPP"; // app.API_URL_HEADER = "http://192.168.1.198:8081/MESAPP/api"; // app.API_URL_HEADER_BACK = "http://211.140.38.18:8081/MESAPP/api"; // app.API_URL = "http://211.140.38.18:8081/MESAPP"; // app.API_URL_BACK = "http://211.140.38.18:8081/MESAPP"; manifest.json
@@ -3,7 +3,7 @@ "id" : "H546D0BA6", /*应用的标识*/ "name" : "YKD_MES", /*应用名称,程序桌面图标名称*/ "version" : { "name" : "3.65", /*应用版本名称*/ "name" : "3.85", /*应用版本名称*/ "code" : "100" }, "description" : "", /*应用描述信息*/ 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的值小于FLSL的值 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的值小于FLSL的值 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的值大于FLSL的值 //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", pages/CangKuManage/QTCK.html
@@ -64,6 +64,10 @@ <label>条码数量</label> <input id="DAB003" readonly="readonly" type="text" value="" class="mui-input-clear text-color" /> </div> <div class="mui-input-row" id="row001"> <label>发料数量</label> <input id="FLSL" type="text" value="" class="mui-input-clear text-color" placeholder="请输入发料数量" onkeypress="is_CreateSCLLD()" /> </div> <!-- <div class="mui-input-row" id="row001"> <label>出库数量</label> <input id="DAB004" readonly="readonly" type="text" value="" class="mui-input-clear text-color" /> @@ -87,6 +91,7 @@ <th>物料代码</th> <th>申请数量</th> <th>已扫数量</th> <th>超额管理</th> </tr> </thead>