From cc93547c2e9eb7c91e3ebb5b66de9c8d4cc32f51 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期三, 01 六月 2022 16:45:17 +0800 Subject: [PATCH] # --- src/main/webapp/views/wrkMastLog/wrkMastLog.html | 3 src/main/webapp/static/js/wrkMastLog/wrkMastLog.js | 369 ++------------------------------------------- src/main/webapp/views/wrkMastLog/wrkDetlLog.html | 91 +++++++++++ src/main/webapp/static/js/wrkMast/wrkMast.js | 2 4 files changed, 115 insertions(+), 350 deletions(-) diff --git a/src/main/webapp/static/js/wrkMast/wrkMast.js b/src/main/webapp/static/js/wrkMast/wrkMast.js index e729d5b..fe33064 100644 --- a/src/main/webapp/static/js/wrkMast/wrkMast.js +++ b/src/main/webapp/static/js/wrkMast/wrkMast.js @@ -273,7 +273,7 @@ table.on('tool(wrkMast)', function(obj){ let data = obj.data; switch (obj.event) { - // 鏄庣粏灞曠ず todo + // 鏄庣粏灞曠ず case 'detlShow': wrkNo = data.wrkNo; // 琛ㄦ牸涓嬫柟鏄剧ず diff --git a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js index 5d0e30f..e637bfa 100644 --- a/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js +++ b/src/main/webapp/static/js/wrkMastLog/wrkMastLog.js @@ -1,4 +1,6 @@ var pageCurr; +var wrkNo; +var ioTime; layui.use(['table','laydate', 'form'], function(){ var table = layui.table; var $ = layui.jquery; @@ -65,7 +67,7 @@ // return html; // }} - // ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:130} + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 80} ]], request: { pageName: 'curr', @@ -220,6 +222,24 @@ table.on('tool(wrkMastLog)', function(obj){ var data = obj.data; switch (obj.event) { + // 鏄庣粏灞曠ず + case 'detlShow': + wrkNo = data.wrkNo; + ioTime = data.ioTime; + // 琛ㄦ牸涓嬫柟鏄剧ず + // locDetl(data.wrkNo); + // 寮瑰眰鏄剧ず + layer.open({ + type: 2, + title: '宸ヤ綔鏄庣粏鍘嗗彶妗�', + maxmin: true, + area: [top.detailWidth, top.detailHeight], + shadeClose: true, + content: 'wrkDetlLog.html', + success: function(layero, index){ + } + }); + break; // 璇︽儏 case 'detail': layer.open({ @@ -241,353 +261,6 @@ } }); break; - // 缂栬緫 - case 'edit': - layer.open({ - type: 2, - title: '淇敼', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: 'wrkMastLog_detail.html', - success: function(layero, index){ - layer.getChildFrame('#data-detail-submit-save', index).hide(); - setFormVal(layer.getChildFrame('#detail', index), data, false); - top.convertDisabled(layer.getChildFrame('#data-detail :input', index), false); - top.convertDisabled(layer.getChildFrame('#id', index), true); - layero.find('iframe')[0].contentWindow.layui.form.render('select'); - layero.find('iframe')[0].contentWindow.layui.form.render('checkbox'); - layer.getChildFrame('##dealDownLine', index).hide(); - layer.iframeAuto(index);layer.style(index, {top: (($(window).height()-layer.getChildFrame('#data-detail', index).height())/3)+"px"}); - - } - }); - break; - case 'wrkSts': - var param = top.reObject(data).wrkSts; - if (param === undefined) { - layer.msg("鏃犳暟鎹�"); - } else { - layer.open({ - type: 2, - title: '宸ヤ綔鐘舵�佽鎯�', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../basWrkStatus/basWrkStatus_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/basWrkStatus/"+ 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-save,#data-detail-submit-edit,#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 'ioType': - var param = top.reObject(data).ioType; - if (param === undefined) { - layer.msg("鏃犳暟鎹�"); - } else { - layer.open({ - type: 2, - title: '鍏ュ嚭搴撶被鍨嬭鎯�', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../basWrkIotype/basWrkIotype_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/basWrkIotype/"+ 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-save,#data-detail-submit-edit,#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 'crnNo': - var param = top.reObject(data).crnNo; - if (param === undefined) { - layer.msg("鏃犳暟鎹�"); - } else { - layer.open({ - type: 2, - title: '鍫嗗灈鏈哄彿璇︽儏', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../basCrnp/basCrnp_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/basCrnp/"+ 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-save,#data-detail-submit-edit,#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 'locNo': - var param = top.reObject(data).locNo; - if (param === undefined) { - layer.msg("鏃犳暟鎹�"); - } else { - layer.open({ - type: 2, - title: '鐩爣搴撲綅璇︽儏', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../locMast/locMast_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/locMast/"+ 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-save,#data-detail-submit-edit,#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 'staNo': - var param = top.reObject(data).staNo; - if (param === undefined) { - layer.msg("鏃犳暟鎹�"); - } else { - layer.open({ - type: 2, - title: '鐩爣绔欒鎯�', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../basDevp/basDevp_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/basDevp/"+ 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-save,#data-detail-submit-edit,#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 'sourceStaNo': - var param = top.reObject(data).sourceStaNo; - if (param === undefined) { - layer.msg("鏃犳暟鎹�"); - } else { - layer.open({ - type: 2, - title: '婧愮珯璇︽儏', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../basDevp/basDevp_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/basDevp/"+ 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-save,#data-detail-submit-edit,#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 'sourceLocNo': - var param = top.reObject(data).sourceLocNo; - if (param === undefined) { - layer.msg("鏃犳暟鎹�"); - } else { - layer.open({ - type: 2, - title: '婧愬簱浣嶈鎯�', - maxmin: true, - area: [top.detailWidth, top.detailHeight], - shadeClose: false, - content: '../locMast/locMast_detail.html', - success: function(layero, index){ - $.ajax({ - url: baseUrl+"/locMast/"+ 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-save,#data-detail-submit-edit,#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 'modiUser': - var param = top.reObject(data).modiUser; - 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-save,#data-detail-submit-edit,#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': - var param = top.reObject(data).appeUser; - 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-save,#data-detail-submit-edit,#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; - } }); diff --git a/src/main/webapp/views/wrkMastLog/wrkDetlLog.html b/src/main/webapp/views/wrkMastLog/wrkDetlLog.html new file mode 100644 index 0000000..af87049 --- /dev/null +++ b/src/main/webapp/views/wrkMastLog/wrkDetlLog.html @@ -0,0 +1,91 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title></title> + <meta name="renderer" content="webkit"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1"> + <link rel="stylesheet" href="../../static/layui/css/layui.css" media="all"> + <link rel="stylesheet" href="../../static/css/cool.css" media="all"> + <link rel="stylesheet" href="../../static/css/common.css" media="all"> + <style> + </style> +</head> +<body> +<div class="layui-inline" style="width:31%;margin-top: 20px"> + <label class="layui-form-label">宸� 浣� 鍙凤細</label> + <div class="layui-input-inline"> + <input id="wrkNo" class="layui-input" type="text" disabled="disabled"> + </div> +</div> +<table class="layui-hide" id="wrkDetlByMast" lay-filter="wrkDetlByMast"></table> +</body> +<script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> +<script type="text/javascript" src="../../static/layui/layui.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/common.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/cool.js" charset="utf-8"></script> +<script type="text/javascript" src="../../static/js/locMast/locMast.js" charset="utf-8"></script> +<script type="text/javascript"> + var pageCur; + function getCol() { + var cols = [ + {field: 'wrkNo', align: 'center',title: '宸ヤ綔鍙�'} + ,{field: 'ioTime$', align: 'center',title: '宸ヤ綔鏃堕棿'} + ]; + cols.push.apply(cols, detlCols); + return cols; + } + layui.use(['table','laydate', 'form'], function() { + table = layui.table; + var $ = layui.jquery; + var form = layui.form; + + $('#wrkNo').val(parent.wrkNo); + // 鏁版嵁娓叉煋 + tableIns1 = table.render({ + elem: '#wrkDetlByMast', + headers: {token: localStorage.getItem('token')}, + url: baseUrl+'/wrkDetl/list/auth', + where: {wrk_no: parent.wrkNo}, + page: true, + limit: 16, + limits: [16, 30, 50, 100, 200, 500], + even: true, + toolbar: '#toolbar', + cellMinWidth: 50, + cols: [getCol()], + request: { + pageName: 'curr', + pageSize: 'limit' + }, + parseData: function (res) { + return { + 'code': res.code, + 'msg': res.msg, + 'count': res.data.total, + 'data': res.data.records + } + }, + response: { + statusCode: 200 + }, + done: function(res, curr, count) { + if (res.code === 403) { + top.location.href = baseUrl+"/"; + } + pageCur=curr; + 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'; + } + }); + } + }); + }); +</script> +</html> + diff --git a/src/main/webapp/views/wrkMastLog/wrkMastLog.html b/src/main/webapp/views/wrkMastLog/wrkMastLog.html index e569302..fdaa517 100644 --- a/src/main/webapp/views/wrkMastLog/wrkMastLog.html +++ b/src/main/webapp/views/wrkMastLog/wrkMastLog.html @@ -81,7 +81,8 @@ </script> <script type="text/html" id="operate"> - <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">璇︽儏</a> + <a class="layui-btn layui-btn-xs btn-detlShow" lay-event="detlShow">鏄庣粏</a> +<!-- <a class="layui-btn layui-btn-primary layui-btn-xs" lay-event="detail">璇︽儏</a>--> </script> <script type="text/javascript" src="../../static/js/jquery/jquery-3.3.1.min.js"></script> -- Gitblit v1.9.1