From 71d838e032d13a46a07917f5606862496220ea74 Mon Sep 17 00:00:00 2001 From: zyx <zyx123456> Date: 星期一, 08 一月 2024 08:35:35 +0800 Subject: [PATCH] # 入库拣货功能添加 --- src/main/webapp/static/js/cool.js | 88 ++++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 88 insertions(+), 0 deletions(-) diff --git a/src/main/webapp/static/js/cool.js b/src/main/webapp/static/js/cool.js index d817c09..511bbd9 100644 --- a/src/main/webapp/static/js/cool.js +++ b/src/main/webapp/static/js/cool.js @@ -26,12 +26,21 @@ } } +function test() { + +} + /** * 鎼滅储鑷姩琛ュ叏 -- input */ function autoLoad(val) { var inputDomVal = document.querySelector("input[data-key="+val+"]").value; var selectDom = document.querySelector("select[data-key="+val+"Select]"); + var type = document.querySelector("input[data-key="+val+"]").getAttribute('data-value'); + if(type){ + inputDomVal = inputDomVal + "," + type; + } + //debugger; selectDom.length = 0; var defaultOption = new Option("鍙栨秷閫夋嫨", ""); defaultOption.title = ""; @@ -49,6 +58,9 @@ for (var i=0;i<list.length;i++){ var option = new Option(list[i].value, i); option.title = list[i].id; + option.addr = list[i].addr; + option.phone = list[i].phone; + option.customer = list[i].customer; selectDom.options[i+1] = option; } selectDom.style.display='block'; @@ -87,10 +99,86 @@ } else { cacd.val(selectOptionDom.html()); realDom.val(selectOptionDom.attr("title")); + if(selectOptionDom[0].phone){ + $('#phone').val(selectOptionDom[0].phone); + } + if(selectOptionDom[0].addr){ + $('#addr').val(selectOptionDom[0].addr); + } + if(selectOptionDom[0].customer){ + $('#customerR').val(selectOptionDom[0].customer); + tableReload(); + + }else { + $('#customerR').val(""); + } } inputDom.val(""); } +function tableReload(){ + layui.use(['table','laydate', 'form'], function(){ + var form = layui.form; + var layer = layui.layer; + var table = layui.table; + var orderNo = $('#orderNoV').val(); + table.render({ + elem: '#formSSXMTable', + height: 312, + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/plaQty/orderDetail/auth', + where: { + orderNo: orderNo + }, + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + cols: [[ + {type: 'checkbox'}, + {field: 'id', title: 'id', hide:true}, + {field: 'batch', title: '鎵瑰彿'}, + {field: 'packageNo', title: '鍖呭彿'}, + {field: 'orderWeight', title: '閲嶉噺'} + + ]], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + console.log(res) + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + tableData = table.cache.locDetl; + console.log(tableData); + pageCurr=curr; + limit(); + form.on('checkbox(tableCheckbox)', function (data) { + var _index = $(data.elem).attr('table-index')||0; + if(data.elem.checked){ + res.data[_index][data.value] = 'Y'; + }else{ + res.data[_index][data.value] = 'N'; + } + }); + } + }); + }) + +} + function reviewImg(src) { window.open().document.write("<img src="+src+" />"); } -- Gitblit v1.9.1