From f9e2d3130f7bc3bb5230515703b0342e094af374 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期三, 20 三月 2024 15:38:59 +0800
Subject: [PATCH] #
---
src/main/webapp/static/wms/js/basPlcerror/basPlcerror.js | 66 ++++++++++++++++++++------------
1 files changed, 41 insertions(+), 25 deletions(-)
diff --git a/src/main/webapp/static/wms/js/basPlcerror/basPlcerror.js b/src/main/webapp/static/wms/js/basPlcerror/basPlcerror.js
index 7bd32da..9319ff4 100644
--- a/src/main/webapp/static/wms/js/basPlcerror/basPlcerror.js
+++ b/src/main/webapp/static/wms/js/basPlcerror/basPlcerror.js
@@ -1,5 +1,7 @@
var pageCurr;
-layui.use(['table','laydate', 'form'], function(){
+layui.config({
+ base: baseUrl + "/static/wms/layui/lay/modules/"
+}).use(['table','laydate', 'form'], function(){
var table = layui.table;
var $ = layui.jquery;
var layer = layui.layer;
@@ -101,30 +103,14 @@
});
break;
case 'deleteData':
- var data = checkStatus.data;
- if (data.length === 0){
- layer.msg('璇烽�夋嫨鏁版嵁');
- } else {
- layer.confirm('纭畾鍒犻櫎'+(data.length===1?'姝�':data.length)+'鏉℃暟鎹悧', function(){
- $.ajax({
- url: baseUrl+"/basPlcerror/delete/auth",
- headers: {'token': localStorage.getItem('token')},
- data: {param: JSON.stringify(data)},
- method: 'POST',
- traditional:true,
- success: function (res) {
- if (res.code === 200){
- layer.closeAll();
- tableReload(false);
- } else if (res.code === 403){
- top.location.href = baseUrl+"/";
- } else {
- layer.msg(res.msg)
- }
- }
- })
- });
+ let data = checkStatus.data
+ if (data.length === 0) {
+ layer.msg('璇烽�夋嫨瑕佸垹闄ょ殑鏁版嵁', {icon: 2});
+ return;
}
+ del(data.map(function (d) {
+ return d.errorCode;
+ }));
break;
case 'exportData':
layer.confirm('纭畾瀵煎嚭Excel鍚�', {shadeClose: true}, function(){
@@ -190,7 +176,10 @@
}
});
break;
-
+ case "del":
+ // 鍒犻櫎
+ del([data.errorCode]);
+ break;
}
});
@@ -277,6 +266,33 @@
type: 'datetime'
});
+ /* 鍒犻櫎 */
+ function del(ids) {
+ layer.confirm('纭畾瑕佸垹闄ら�変腑鏁版嵁鍚楋紵', {
+ skin: 'layui-layer-admin',
+ shade: .1
+ }, function (i) {
+ layer.close(i);
+ var loadIndex = layer.load(2);
+ $.ajax({
+ url: baseUrl+"/basPlcerror/delete/auth",
+ headers: {'token': localStorage.getItem('token')},
+ data: {ids: ids},
+ 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});
+ }
+ }
+ })
+ });
+ }
});
--
Gitblit v1.9.1