From 757f103f37d83dfb55bb49b3df0b805cb520d4f7 Mon Sep 17 00:00:00 2001 From: zwl <1051256694@qq.com> Date: 星期六, 11 十月 2025 15:28:26 +0800 Subject: [PATCH] 第三版 --- src/main/webapp/static/js/waitPakin/waitPakin.js | 59 +++++++++++++++++++++++++++++++++++++++++++++++++++-------- 1 files changed, 51 insertions(+), 8 deletions(-) diff --git a/src/main/webapp/static/js/waitPakin/waitPakin.js b/src/main/webapp/static/js/waitPakin/waitPakin.js index ef7f164..09e7d29 100644 --- a/src/main/webapp/static/js/waitPakin/waitPakin.js +++ b/src/main/webapp/static/js/waitPakin/waitPakin.js @@ -1,31 +1,35 @@ var pageCurr; function getCol() { - var cols = [ - ]; + var cols = [ {type: 'checkbox'} ]; cols.push.apply(cols, detlCols); - cols.push({field: 'status', align: 'center',title: '鏁版嵁鐘舵��', templet:function(row){ + cols.push({field: 'locNo', align: 'center',title: '搴撲綅鍙�'} + ,{field: 'status', align: 'center',title: '鏁版嵁鐘舵��', templet:function(row){ var html = "<input value='status' type='checkbox' lay-skin='switch' lay-text='姝e父|閿佸畾'' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'"; if(row.status === 'Y'){html += " checked ";} html += ">"; return html; - }} + }, hide: true} ,{field: 'ioStatus', align: 'center',title: '鍏ュ嚭鐘舵��', templet:function(row){ - var html = "<input value='ioStatus' type='checkbox' lay-skin='switch' lay-text='杩愯涓瓅寰呭鐞�' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'"; + var html = "<input value='ioStatus' type='checkbox' lay-skin='switch' lay-text='鍏ュ簱涓瓅寰呭叆搴�' lay-filter='tableCheckbox' disabled='disabled' table-index='"+row.LAY_TABLE_INDEX+"'"; if(row.ioStatus === 'Y'){html += " checked ";} html += ">"; return html; }} ,{field: 'modiUser$', align: 'center',title: '淇敼浜哄憳', hide:true} - ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide:true}) + ,{field: 'modiTime$', align: 'center',title: '淇敼鏃堕棿', hide:true} + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:250}) return cols; } -layui.use(['table','laydate', 'form'], function(){ +layui.config({ + base: baseUrl + "/static/layui/lay/modules/" +}).use(['table','laydate', 'form', 'tableMerge'], function(){ var table = layui.table; var $ = layui.jquery; var layer = layui.layer; var layDate = layui.laydate; var form = layui.form; + var tableMerge = layui.tableMerge; // 鏁版嵁娓叉煋 tableIns = table.render({ @@ -55,6 +59,7 @@ statusCode: 200 }, done: function(res, curr, count) { + // tableMerge.render(this); if (res.code === 403) { top.location.href = baseUrl+"/"; } @@ -98,6 +103,33 @@ table.on('toolbar(waitPakin)', function (obj) { var checkStatus = table.checkStatus(obj.config.id); switch(obj.event) { + case 'addWrk': + if (checkStatus.data.length === 0){ + layer.msg('璇疯嚦灏戦�夋嫨涓�鏉℃暟鎹�', {icon: 2}); + } else { + layer.confirm('纭畾鐢熸垚宸ヤ綔妗d换鍔″悧', function(){ + $.ajax({ + url: baseUrl+"/create/waitPain/wrkMast/start", + headers: {'token': localStorage.getItem('token')}, + data: JSON.stringify(checkStatus.data), + contentType:'application/json;charset=UTF-8', + method: 'POST', + traditional:true, + success: function (res) { + if (res.code === 200){ + layer.closeAll(); + tableReload(false); + layer.msg(res.msg, {icon: 1}) + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}) + } + } + }) + }); + } + break; case 'addData': layer.open({ type: 2, @@ -293,6 +325,16 @@ }); } break; + case 'complete': + layer.confirm('纭閲嶆柊鍛煎彨agv杩涜鍏ュ簱鎼繍锛�', {title: '鎵樼洏鐮侊細'+data.zpallet, shadeClose: true}, function(){ + http.post(baseUrl+"/hand/control/complete1", {zpallet: data.zpallet, type:1}, function (res) { + $(".layui-laypage-btn")[0].click(); + layer.msg(data.wrkNo + res.msg); + }) + layer.closeAll(); + + }); + break; } }); @@ -433,7 +475,8 @@ if (find[0]!=null){ if (find[0].type === 'checkbox'){ if (data[val]==='Y'){ - find.attr("checked","checked"); + find.attr + ("checked","checked"); find.val('Y'); } else { find.remove("checked"); -- Gitblit v1.9.1