From ae2fb12ff5a4740417d3ba6d6dfad990a7456307 Mon Sep 17 00:00:00 2001 From: lty <876263681@qq.com> Date: 星期三, 23 四月 2025 11:00:46 +0800 Subject: [PATCH] #库存盘点页面完成 --- src/main/webapp/static/js/basDevp/basDevp.js | 164 ++++++++++++++++++++++++++++++++++-------------------- 1 files changed, 104 insertions(+), 60 deletions(-) diff --git a/src/main/webapp/static/js/basDevp/basDevp.js b/src/main/webapp/static/js/basDevp/basDevp.js index 535e6e7..9e4b732 100644 --- a/src/main/webapp/static/js/basDevp/basDevp.js +++ b/src/main/webapp/static/js/basDevp/basDevp.js @@ -195,9 +195,31 @@ success: function(layero, index){ layer.getChildFrame('#autoing,#loading,#canining,#canouting,#inreq1,#inreq2,#wrkNo,#barcode,#ctnType,#grossWt', index).parent().parent().hide(); layer.getChildFrame('#data-detail-submit-edit', index).hide(); - clearFormVal(layer.getChildFrame('#detail', index)); + clearFormVal(layer.getChildFrame('#detail', index)); layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); } + }); + break; + case 'init': + layer.prompt({title: '璇疯緭鍏ュ彛浠わ紝骞跺垵濮嬪寲绔欑偣', formType: 1, shadeClose: true}, function(pass, idx){ + http.get(baseUrl+"/locMast/init/pwd", {pwd: pass}, function (res) { + if (res.data) { + layer.open({ + type: 1, + title: '鍒濆鍖栫珯鐐�', + area: ["400px"], + maxmin: true, + shadeClose: true, + content: $("#resetLocDiv"), + success: function (layero, index) { + + } + }) + } else { + layer.msg("鍙d护閿欒"); + } + layer.close(idx); + }) }); break; case 'refreshData': @@ -275,6 +297,28 @@ } }); + // 鍒濆鍖栦繚瀛� + form.on('submit(initDo)', function (data) { + $.ajax({ + url: baseUrl+"/basDevp/init/auth", + headers: {'token': localStorage.getItem('token')}, + data: data.field, + method: 'POST', + async: false, + success: function (res) { + if (res.code === 200){ + layer.msg(res.msg); + layer.closeAll(); + tableReload(false); + } else if (res.code === 403){ + parent.location.href = "/"; + }else { + layer.msg(res.msg) + } + } + }) + }); + // 鐩戝惉琛屽伐鍏蜂簨浠� table.on('tool(basDevp)', function(obj){ var data = obj.data; @@ -324,36 +368,36 @@ if (param === undefined) { layer.msg("鏃犳暟鎹�"); } else { - layer.open({ - type: 2, - title: '淇敼璇︽儏', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../user/user_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/user/"+ param +"/auth", - headers: {'token': localStorage.getItem('token')}, - method: 'GET', - success: function (res) { - if (res.code === 200){ - setFormVal(layer.getChildFrame('#detail', index), res.data, true); - top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); - layer.getChildFrame('#password,#createTime\\$,#status', index).parent().parent().hide(); - layer.getChildFrame('#data-detail-submit,#prompt', index).hide(); - layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); - layero.find('iframe')[0].contentWindow.layui.form.render('select'); - layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); - } else if (res.code === 403){ - parent.location.href = "/"; - }else { - layer.msg(res.msg) - } - } - }) - } - }); + layer.open({ + type: 2, + title: '淇敼璇︽儏', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: false, + content: '../user/user_detail.html', + success: function(layero, index){ + $.ajax({ + url: baseUrl+"/user/"+ param +"/auth", + headers: {'token': localStorage.getItem('token')}, + method: 'GET', + success: function (res) { + if (res.code === 200){ + setFormVal(layer.getChildFrame('#detail', index), res.data, true); + top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); + layer.getChildFrame('#password,#createTime\\$,#status', index).parent().parent().hide(); + layer.getChildFrame('#data-detail-submit,#prompt', index).hide(); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + layero.find('iframe')[0].contentWindow.layui.form.render('select'); + layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); + } else if (res.code === 403){ + parent.location.href = "/"; + }else { + layer.msg(res.msg) + } + } + }) + } + }); } break; case 'appeUser': @@ -361,35 +405,35 @@ if (param === undefined) { layer.msg("鏃犳暟鎹�"); } else { - layer.open({ - type: 2, - title: '鍒涜鎯�', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../user/user_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/user/"+ param +"/auth", - headers: {'token': localStorage.getItem('token')}, - method: 'GET', - success: function (res) { - if (res.code === 200){ - setFormVal(layer.getChildFrame('#detail', index), res.data, true); - top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); - layer.getChildFrame('#data-detail-submit', index).hide(); - layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); - layero.find('iframe')[0].contentWindow.layui.form.render('select'); - layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); - } else if (res.code === 403){ - parent.location.href = "/"; - }else { - layer.msg(res.msg) - } - } - }) - } - }); + layer.open({ + type: 2, + title: '鍒涜鎯�', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: false, + content: '../user/user_detail.html', + success: function(layero, index){ + $.ajax({ + url: baseUrl+"/user/"+ param +"/auth", + headers: {'token': localStorage.getItem('token')}, + method: 'GET', + success: function (res) { + if (res.code === 200){ + setFormVal(layer.getChildFrame('#detail', index), res.data, true); + top.convertDisabled(layer.getChildFrame('#data-detail :input', index), true); + layer.getChildFrame('#data-detail-submit', index).hide(); + layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); + layero.find('iframe')[0].contentWindow.layui.form.render('select'); + layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); + } else if (res.code === 403){ + parent.location.href = "/"; + }else { + layer.msg(res.msg) + } + } + }) + } + }); } break; -- Gitblit v1.9.1