From 4e300723c2bd7e121bad8d1a8bf041679a8add17 Mon Sep 17 00:00:00 2001 From: kgdxpr Date: Tue, 16 Jul 2024 09:08:56 +0800 Subject: [PATCH] 'commit' --- WebRoot/view/zj/list.html | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) diff --git a/WebRoot/view/zj/list.html b/WebRoot/view/zj/list.html index db23b84a..3f5c85d6 100644 --- a/WebRoot/view/zj/list.html +++ b/WebRoot/view/zj/list.html @@ -80,7 +80,7 @@ table.render({ elem: '#data-table', url: '/QingLong/zjcq/listZjcq', - height: 'full-150', + height: 'full-60', page: { limit: 15 , layout: ['count', 'prev', 'page', 'next', 'skip'] @@ -126,7 +126,38 @@ content: './chouqu.html?ys_id=' + obj.data.ys_id }); } else if (obj.event === 'remove') { - window.location.href = '/QingLong/zjcq/exportDocx?ys_id=' + obj.data.ys_id; + layer.confirm('确定要删除吗?', { + icon: 3, + title: '提示' + }, function (index) { + layer.close(index); + let loading = layer.load(); + $.ajax({ + url: "/QingLong/zjcq/delYs", + data: { ys_id: obj.data.ys_id }, + type: 'post', + success: function (result) { + layer.close(loading); + if (result.success) { + layer.msg('成功删除!', { + icon: 1, + time: 1000 + }, function () { + table.reload('data-table'); + }); + } else { + layer.msg(result.message, { + icon: 2, + time: 1000 + }); + } + }, + error: function (xhr, status, error) { + layer.close(loading); + console.log('请求出错:' + error + ',' + status); + } + }) + }); } else if (obj.event === 'export') { window.location.href = '/QingLong/zjcq/exportDocx?ys_id=' + obj.data.ys_id; }