From aa963091956e9d3f9a4a0f1a19809f56344ba988 Mon Sep 17 00:00:00 2001 From: jiazx0107@163.com <jiazx0107@163.com> Date: 星期三, 31 五月 2023 22:37:26 +0800 Subject: [PATCH] 出入库优化-称重实现粮食产地 --- igds-web/src/main/resources/static/admin/inout/weight.js | 132 ++++++++++++++++++++++++++++++------------- 1 files changed, 91 insertions(+), 41 deletions(-) diff --git a/igds-web/src/main/resources/static/admin/inout/weight.js b/igds-web/src/main/resources/static/admin/inout/weight.js index b5a4af5..9f0f528 100644 --- a/igds-web/src/main/resources/static/admin/inout/weight.js +++ b/igds-web/src/main/resources/static/admin/inout/weight.js @@ -161,54 +161,103 @@ }); } -/** - * 寮瑰嚭鎻愰啋妗� - * @param msg 鎻愰啋淇℃伅 - * @param data 鏁版嵁淇℃伅锛屽彲鑳戒负绌� - */ -function notify(msg, data) { - if (data) { - //璧嬪�� - $("#resultMsg").text(msg); - $("#resultUserName").text(data.userName); - $("#resultPlateNum").text(data.plateNum); - if ("IN" == data.type) { - $("#resultType").text("鍏ュ簱-" + INOUT_PROGRESS_MSG(data.progress)); - } else { - $("#resultType").text("鍑哄簱-" + INOUT_PROGRESS_MSG(data.progress)); - } - $("#resultIntelCard").text(data.intelCard); - - layer.open({ - type: 1, - offset: ['150px', '200px'], - area: '450px;', - shade: 0.8, - id: 'dialog_notify_info', - btn: ['纭畾'], - content: $('#dialog-from-notify'), - yes: function (index) { - layer.closeAll(); - } - }); - } else { - layer.alert(msg, {offset: ['300px', '300px']}); +// ---------------------------閫氱煡鍗�-寮�濮� -------------------// +// 寮瑰嚭寰�鏉ュ崟浣嶄笅鎷夋 +function showNotice() { + var titleCustomer = "閫佽揣鍗曚綅"; + var url = "../../basic/inout/list-notice-in"; + if ("OUT" == type) { + titleCustomer = "鏀惰揣鍗曚綅"; + url = "../../basic/inout/list-notice-out" } + var index = layer.load(); + var param = { + type: type + }; + + console.log(url); + + table.render({ + elem: '#tableNotice', + url: url, + page: false, + even: true, + method: 'POST', + contentType: "application/json;charset=UTF-8", + cols: [[{ + field: 'name', + title: '閫氱煡鍗曞悕绉�', + width: '15%' + }, { + field: 'customerName', + title: titleCustomer + }, { + field: 'foodVarietyName', + title: '绮鍝佺', + width: '10%' + }, { + field: 'year', + title: '骞翠唤', + width: '8%' + }, { + field: 'depotName', + title: "鎵�娑変粨搴�" + }, { + field: 'contractName', + title: '鎵�灞炲悎鍚�' + }]], + where: param, + parseData: function (res) { + if ("0000" == res.code) { + return { + "code": "0", + "msg": res.msg, + "data": res.data + } + } else { + return { + "code": "1", + "msg": res.msg + } + } + }, + done: function (res) { + layer.close(index); + } + }); + //鍙屽嚮鏄剧ず閫変腑鏁版嵁 + table.on('rowDouble(tableNotice)', function (obj) { + var data = obj.data; + form.val("form-data", { + customerName: data.customerName, + noticeId: data.id + }); + layer.closeAll(); + }); + // 寮瑰嚭瀵硅瘽妗� + layer.open({ + type: 1, + offset: ['100px', '250px'], + title: "閫氱煡鍗曞垪琛紙鍙屽嚮閫変腑锛�", + area: ['900px', '600px'], + shade: 0, + content: $('#listNotice'), + btn: 0, + btn: ['鍙栨秷'], + yes: function () { + layer.closeAll(); + }, + closeBtn: 0 + }); } - -// ---------------------------绮浜у湴 -寮�濮� -------------------// -// 寮瑰嚭寰�鏉ュ崟浣嶄笅鎷夋 +// ---------------------------绮浜у湴-寮�濮� -------------------// function showFoodLocation() { var index = layer.load(); - // 娓叉煋寰�鏉ュ崟浣嶅垪琛� table.render({ elem: '#tableFoodLoaction', - url: '../../basic/common/page-food-location', + url: '../../basic/common/page-dicArea', page: false, - // limit : limit, - // skin : "nob", - // size : 'sm', toolbar: '#toolbarFoodLocaton', even: true, method: 'POST', @@ -254,6 +303,7 @@ // 璧嬪�� form.val("form-data", { foodLocation: data.name, + foodLocationId: data.code }); // 鍏抽棴 layer.closeAll(); @@ -279,7 +329,7 @@ function flushFoodLocation() { var key = $("#key2").val(); table.reload('tableFoodLoaction', { - url: "../../basic/common/page-food-location", + url: "../../basic/common/page-dicArea", where: { key: key }, -- Gitblit v1.9.3