From 17580e07751d7abaac48071a8ec0e743fdfb35fc Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 11 九月 2023 10:40:24 +0800
Subject: [PATCH] #权限控制优化

---
 src/main/webapp/static/js/plan/plan.js |   24 ++++++++++++++++++++++++
 1 files changed, 24 insertions(+), 0 deletions(-)

diff --git a/src/main/webapp/static/js/plan/plan.js b/src/main/webapp/static/js/plan/plan.js
index a540409..ec26e83 100644
--- a/src/main/webapp/static/js/plan/plan.js
+++ b/src/main/webapp/static/js/plan/plan.js
@@ -488,6 +488,7 @@
                                     autoRow: true,
                                     filterable: true,
                                     remoteSearch: true,
+                                    clickClose: true,
                                     radio: true,
                                     remoteMethod: function (val, cb, show) {
                                         let loadIndex = layer.load(2);
@@ -822,6 +823,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
@@ -850,6 +852,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
@@ -868,6 +871,25 @@
                         }
                     }
                 });
+            },
+            on: function (data){
+                if (data.change.length > 0) {
+                    let orderId = data.change[0].value;
+                    $.ajax({
+                        url: baseUrl + "/order/" + orderId + "/auth",
+                        headers: {'token': localStorage.getItem('token')},
+                        data: {},
+                        method: 'GET',
+                        success: function (res) {
+                            if (res.code === 200) {
+                                let cstmrSel = loadCstmrSel();
+                                cstmrSel.setValue([{name: res.data.cstmrId$, value: res.data.cstmrId}]);
+                            } else {
+                                layer.msg(res.msg, {icon: 2});
+                            }
+                        }
+                    });
+                }
             }
         });
     }
@@ -878,6 +900,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
@@ -936,6 +959,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({

--
Gitblit v1.9.1