From aaf2e5aed7df2d082935cf91a538a037557c368e Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期三, 02 三月 2022 15:09:44 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/issue/issue.js | 95 +++++++++++++----------------------------------
1 files changed, 26 insertions(+), 69 deletions(-)
diff --git a/src/main/webapp/static/js/issue/issue.js b/src/main/webapp/static/js/issue/issue.js
index 1c9c320..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});
@@ -101,9 +118,15 @@
switch (obj.event) {
case 'detl':
top.issueByDetl = data.id;
- break;
- case 'edit':
- showEditModel(data);
+ 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];
@@ -111,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) {
@@ -178,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({
@@ -219,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