From 5eb90395313f5d7232aad2fb1a821a0028ca7764 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期三, 31 五月 2023 11:49:48 +0800 Subject: [PATCH] 出入库优化-称重页面 --- igds-web/src/main/resources/static/admin/inout/in-weight.js | 107 +++++++++++++++++++---------------------------------- 1 files changed, 38 insertions(+), 69 deletions(-) diff --git a/igds-web/src/main/resources/static/admin/inout/in-weight.js b/igds-web/src/main/resources/static/admin/inout/in-weight.js index e1ced5b..e5e5e36 100644 --- a/igds-web/src/main/resources/static/admin/inout/in-weight.js +++ b/igds-web/src/main/resources/static/admin/inout/in-weight.js @@ -5,6 +5,7 @@ var recordData = null;// 涓氬姟鏁版嵁淇℃伅 var snapData;//绯荤粺鎶撴媿瀵硅薄淇℃伅 var timerWeight; +var textParam;//璁惧璇嗗埆缁撴灉 $(function () { layui.use(['layer', 'laydate', 'form', 'table', 'util'], function () { @@ -34,7 +35,7 @@ shadeClose: true, shade: 0.3, closeBtn: 2, - offset: ['50px','120px'], + offset: ['50px', '120px'], area: ['1000px', '640px'], content: '../../basic/inout/inout-progress?type=' + type + "&t=" + Math.random() }); @@ -122,32 +123,6 @@ resetForm(); } } - -//鎺у埗娴佺▼鐜妭鏄剧ず -function showProgress() { - if (!inoutProgress) { - return; - } - if (inoutProgress.indexOf("REGISTER") == -1) { - $("#progress-register").css("display", "none"); - } - if (inoutProgress.indexOf("CHECK") == -1) { - $("#progress-check").css("display", "none"); - } - if (inoutProgress.indexOf("WEIGHT_FULL") == -1) { - $("#progress-fullWeight").css("display", "none"); - } - if (inoutProgress.indexOf("HANDLE") == -1) { - $("#progress-hand").css("display", "none"); - } - if (inoutProgress.indexOf("WEIGHT_EMPTY") == -1) { - $("#progress-emptyWeight").css("display", "none"); - } - if (inoutProgress.indexOf("CARD_BACK") == -1) { - $("#progress-cardBack").css("display", "none"); - } -} - //鏇存敼鎵i噸淇℃伅妗嗕笉鍙紪杈� function addDisabled() { @@ -249,13 +224,7 @@ //鏂扮殑璇诲崱鏂瑰紡 function flushICCard() { - if(cardDto && cardDto.protocol != "TCP_DEFAULT"){ - //鍗忚鑾峰彇 - flushICCard2(); - }else { - //鏈湴璇诲彇 - flushICCard1(); - } + flushICCard1(); } /** @@ -299,7 +268,7 @@ * 鏈湴璇诲彇鏅烘収鍗� */ function flushICCard1() { - $("#intelCard").val(null); + $("#text-param").val(null); $("#form-data")[0].reset(); form.render(); recordData = null; @@ -312,18 +281,17 @@ jsonp: "callback", jsonpCallback: "jsonpCallback", success: function (json) { - //console.log(json); var data = json.no; - //console.log(data); if (data === "not found") { - layer.alert("璇烽噸鏂拌鍗★紒", {offset: ['300px', '300px']}); + alertError("璇烽噸鏂拌鍗★紒"); } else { - $("#intelCard").val(data); + textParam = data; + $("#text-param").text("璇嗗埆鍗″彿锛�" + textParam); flushData(); } }, error: function () { - layer.alert("IC鍗¤鍙栧嚭閿欙紒", {offset: ['300px', '300px']}); + alertError("IC鍗¤鍙栧嚭閿欙紒"); } }); } @@ -661,7 +629,7 @@ field: 'name', title: '閫氱煡鍗曞悕绉�', width: '15%' - },{ + }, { field: 'customerName', title: '閫佽揣鍗曚綅' }, { @@ -743,35 +711,36 @@ }); } -function controlGate(targetStatus){ - if(gateDto){ - var data = {"companyId":companyId - ,"deptId":deptId - ,"bizType":type - ,"confId":gateDto.id - ,"targetStatus":targetStatus - ,"sort":gateDto.sort - }; - $.ajax({ - type: "POST", - url: "../../basic/inout/gate-ctrl", - dataType: "json", - contentType: "application/json;charset=UTF-8", - data: JSON.stringify(data), - success: function (result) { - if (result.code != "0000") { - layer.msg("鎿嶄綔澶辫触锛�"+result.msg); - } else { - layer.msg("鎿嶄綔鎴愬姛"); - } - }, - error: function () { - layer.alert("鎿嶄綔澶辫触锛岃閲嶆柊灏濊瘯锛侊紒"); +function controlGate(targetStatus) { + if (gateDto) { + var data = { + "companyId": companyId + , "deptId": deptId + , "bizType": type + , "confId": gateDto.id + , "targetStatus": targetStatus + , "sort": gateDto.sort + }; + $.ajax({ + type: "POST", + url: "../../basic/inout/gate-ctrl", + dataType: "json", + contentType: "application/json;charset=UTF-8", + data: JSON.stringify(data), + success: function (result) { + if (result.code != "0000") { + layer.msg("鎿嶄綔澶辫触锛�" + result.msg); + } else { + layer.msg("鎿嶄綔鎴愬姛"); } - }); - }else{ - layer.msg("娌℃湁鑾峰彇鍒拌澶囷紒"); - } + }, + error: function () { + layer.alert("鎿嶄綔澶辫触锛岃閲嶆柊灏濊瘯锛侊紒"); + } + }); + } else { + layer.msg("娌℃湁鑾峰彇鍒拌澶囷紒"); + } } //-------------------------閬撻椄鎿嶄綔--------------------------// \ No newline at end of file -- Gitblit v1.9.3