From 0c673f0817ede32335014ad15b3d668f251a8e70 Mon Sep 17 00:00:00 2001 From: 18516761980 <4761516tqsxp> Date: 星期四, 07 四月 2022 15:26:59 +0800 Subject: [PATCH] . --- src/main/webapp/static/js/item/item.js | 44 +++++++++++++++++++++++++++++++++++++++++++- 1 files changed, 43 insertions(+), 1 deletions(-) diff --git a/src/main/webapp/static/js/item/item.js b/src/main/webapp/static/js/item/item.js index cdd15b8..15f5edd 100644 --- a/src/main/webapp/static/js/item/item.js +++ b/src/main/webapp/static/js/item/item.js @@ -49,7 +49,7 @@ // ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'} ,{field: 'memo', align: 'center',title: '澶囨敞'} - ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150} + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:180} ]], request: { pageName: 'curr', @@ -159,9 +159,23 @@ var ids = [data.id]; del(ids); break; + case "initPlan": + initPlan(data.id); + break; + case "report": + initReport(obj); + break; } }); + function initReport(obj) { + admin.open({ + type: 1, + area: '600px', + title: '鎬荤粨鐢熸垚', + content: $('#initReport').html() + }); + } /* 寮圭獥 - 鏂板銆佷慨鏀� */ function showEditModel(mData) { admin.open({ @@ -228,6 +242,34 @@ }); } + /* 鍒濆鍖栭」鐩妭鐐� */ + function initPlan(id) { + layer.confirm('纭畾瑕佺敓鎴愯椤圭洰璁″垝鑺傜偣鍚楋紵', { + skin: 'layui-layer-admin', + shade: .1 + }, function (i) { + layer.close(i); + var loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/item/initPlan/auth", + headers: {'token': localStorage.getItem('token')}, + data: {id: id}, + method: 'POST', + success: function (res) { + layer.close(loadIndex); + if (res.code === 200){ + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + }); + } + // 鎼滅储 form.on('submit(search)', function (data) { -- Gitblit v1.9.1