From c27ad3dcb8b67a6c10a99c98b9bd6dd1f08b7967 Mon Sep 17 00:00:00 2001 From: luxiaotao1123 <t1341870251@63.com> Date: 星期二, 01 三月 2022 10:43:15 +0800 Subject: [PATCH] # --- src/main/webapp/static/js/issue/issue.js | 96 ++++++++++++++---------------------------------- 1 files changed, 28 insertions(+), 68 deletions(-) diff --git a/src/main/webapp/static/js/issue/issue.js b/src/main/webapp/static/js/issue/issue.js index 63a2c34..e77cd1f 100644 --- a/src/main/webapp/static/js/issue/issue.js +++ b/src/main/webapp/static/js/issue/issue.js @@ -78,10 +78,27 @@ } }); + /* 琛ㄦ牸2鎼滅储 */ + form.on('submit(issueTbSearch)', function (data) { + insTb2.reload({where: data.field, page: {curr: 1}}); + return false; + }); + // 鐩戝惉澶村伐鍏锋爮浜嬩欢 table.on('toolbar(issueTable)', function (obj) { var checkStatus = table.checkStatus(obj.config.id).data; switch(obj.event) { + case 'add': + layer.open({ + type: 1, + title: false, + closeBtn: 0, + area: ['auto'], + skin: 'layui-layer-nobg', //娌℃湁鑳屾櫙鑹� + shadeClose: true, + content: $('#mobileQr') + }); + break case 'del': if (checkStatus.length === 0) { layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2}); @@ -99,8 +116,17 @@ table.on('tool(issueTable)', function(obj){ var data = obj.data; switch (obj.event) { - case 'edit': - showEditModel(data); + case 'detl': + top.issueByDetl = data.id; + admin.popupRight({ + type: 1, + window: "top", + area: "1250px", + url: "issue_detl.html", + end: function () { + $(".layui-laypage-btn")[0].click(); + } + }) break; case "del": var ids = [data.id]; @@ -108,44 +134,6 @@ break; } }); - - /* 寮圭獥 - 鏂板銆佷慨鏀� */ - function showEditModel(mData) { - admin.open({ - type: 1, - area: '600px', - title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��', - content: $('#editDialog').html(), - success: function (layero, dIndex) { - layDateRender(); - form.val('detail', mData); - form.on('submit(editSubmit)', function (data) { - var loadIndex = layer.load(2); - $.ajax({ - url: baseUrl+"/issue/"+(mData?'update':'add')+"/auth", - headers: {'token': localStorage.getItem('token')}, - data: data.field, - method: 'POST', - success: function (res) { - layer.close(loadIndex); - if (res.code === 200){ - layer.close(dIndex); - layer.msg(res.msg, {icon: 1}); - tableReload(); - } else if (res.code === 403){ - top.location.href = baseUrl+"/"; - }else { - layer.msg(res.msg, {icon: 2}); - } - } - }) - return false; - }); - $(layero).children('.layui-layer-content').css('overflow', 'visible'); - layui.form.render('select'); - } - }); - } /* 鍒犻櫎 */ function del(ids) { @@ -175,19 +163,6 @@ }); } - // 鎼滅储 - form.on('submit(search)', function (data) { - pageCurr = 1; - tableReload(false); - }); - - // 閲嶇疆 - form.on('submit(reset)', function (data) { - pageCurr = 1; - clearFormVal($('#search-box')); - tableReload(false); - }); - // 鏃堕棿閫夋嫨鍣� function layDateRender() { layDate.render({ @@ -216,18 +191,3 @@ }); -// 鍏抽棴鍔ㄤ綔 -$(document).on('click','#data-detail-close', function () { - parent.layer.closeAll(); -}); - -function tableReload(child) { - var searchData = {}; - $.each($('#search-box [name]').serializeArray(), function() { - searchData[this.name] = this.value; - }); - tableIns.reload({ - where: searchData, - page: {curr: pageCurr} - }); -} -- Gitblit v1.9.1