From e01fce2ebdd2bdba72682aa314656b57e68f211c Mon Sep 17 00:00:00 2001 From: zhang <zc857179121@qq.com> Date: 星期一, 01 九月 2025 16:05:06 +0800 Subject: [PATCH] 1 --- src/main/webapp/static/js/order/out.js | 66 ++++++++++++++++++++++++++++++--- 1 files changed, 60 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/static/js/order/out.js b/src/main/webapp/static/js/order/out.js index abe3c6a..14e31ec 100644 --- a/src/main/webapp/static/js/order/out.js +++ b/src/main/webapp/static/js/order/out.js @@ -42,6 +42,15 @@ ,{field: 'memo', align: 'center',title: '澶囨敞', hide: false} ,{field: 'qty', align: 'center',title: '浣滀笟鏁伴噺', style: 'font-weight: bold'} ,{field: 'enableQty', align: 'center',title: '寰呭嚭鏁伴噺', style: 'font-weight: bold'} + ,{field: 'finishStatus', align: 'center', title: '鏄惁瀹屾垚', templet: function(d){ + if (d.qty === 0 && d.enableQty === 0) { + return '<span style="color:green;font-weight:bold;">瀹屾垚</span>'; + } else { + return '<span style="color:red;">鏈畬鎴�</span>'; + } + }} + + // ,{field: 'name', align: 'center',title: '鍚嶇О'} // ,{field: 'unit', align: 'center',title: '鍗曚綅', hide: true} // ,{field: 'barcode', align: 'center',title: '鍟嗗搧鏉$爜', hide: true} @@ -321,10 +330,53 @@ } } - ,yes: function(index, layero){ - //鎸夐挳銆愮珛鍗冲嚭搴撱�戠殑鍥炶皟 - pakout(tableCache, index); + ,yes: function(layerIndex, layero){ + // 绔嬪嵆鍑哄簱鎸夐挳鐐瑰嚮 鈫� 鍏堣姹備笅鎷夊垪琛� + let loadIndex = layer.load(2); + $.ajax({ + url: baseUrl + "/getMesOrder/auth", // 浣犳彁渚涚殑鎺ュ彛 + headers: {'token': localStorage.getItem('token')}, + method: 'POST', + success: function(res){ + layer.close(loadIndex); + if(res.code === 200){ + // 寮瑰嚭浜屾纭妗� + layer.open({ + type: 1, + title: '璇烽�夋嫨缁勮揣鍗曞彿', + area: ['400px','200px'], + content: $('#staBatchSelectDialog').html(), + success: function(layero2, index2){ + // 娓叉煋涓嬫媺妗� + let select = $(layero2).find('#batchSelectStaBox'); + select.empty().append(`<option value="">璇烽�夋嫨缁勮揣鍗曞彿</option>`); + res.data.forEach(item => { + select.append(`<option value="${item}">${item}</option>`); + }); + // 娉ㄦ剰杩欓噷 select 瑕佸姞 lay-search 灞炴�� + select.attr("lay-search", ""); + layui.form.render('select'); + + + + // 纭鎸夐挳 + form.on('submit(staBatchSelectConfirm)', function(obj){ + let selectedValue = obj.field.batchSta; + console.log(selectedValue) + layer.close(index2); + // 璋冪敤鍘熸潵鐨勫嚭搴撳嚱鏁帮紝鍚屾椂浼犱笅鎷夊�� + pakout(tableCache, layerIndex, selectedValue); + return false; + }); + } + }); + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }); } + ,btn2: function(index, layero){ //鎸夐挳銆愮◢鍚庡鐞嗐�戠殑鍥炶皟 layer.close(index) @@ -340,14 +392,14 @@ }) } - function pakout(tableCache, layerIndex) { - // let loadIndex = layer.load(2); + function pakout(tableCache, layerIndex, optionValue) { + // 鍙互鎶� optionValue 浼犵粰鎺ュ彛 notice.msg('姝e湪鐢熸垚鍑哄簱浠诲姟......', {icon: 4}); $.ajax({ url: baseUrl + "/out/pakout/auth", headers: {'token': localStorage.getItem('token')}, contentType: 'application/json;charset=UTF-8', - data: JSON.stringify(tableCache), + data: JSON.stringify({tableCache,optionValue}), method: 'POST', success: function (res) { notice.destroy(); @@ -367,6 +419,8 @@ + + /* 鍒犻櫎璁㈠崟 */ function doDelSensor(obj) { layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', { -- Gitblit v1.9.1