From e399048a22f9ff2037f075beedd1f5832a07af02 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 14 十一月 2022 15:23:16 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/order/order.js |   63 +++++++++++++++++++++++++++++++
 1 files changed, 62 insertions(+), 1 deletions(-)

diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 3b22b09..664e5c9 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -247,11 +247,15 @@
         admin.open({
             type: 1,
             area: '1500px',
-            title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��',
+            title: (mData ? '淇敼' : '娣诲姞') + '璺熻釜椤圭洰',
             content: $('#editDialog').html(),
             success: function (layero, dIndex) {
+                let cstmrSel = loadCstmrSel();
+                let companySel = loadCompanySel();
                 if (mData) {
                     $('#cascaderVal').val(mData.pcd);
+                    cstmrSel.setValue({name: cstmrId$, value: cstmrId});
+                    companySel.setValue({name: company$, value: company});
                 }
                 layDateRender(mData);
                 cascaderRender();
@@ -278,6 +282,7 @@
                     })
                     return false;
                 });
+
                 $(layero).children('.layui-layer-content').css('overflow', 'visible');
                 layui.form.render('select');
             }
@@ -356,6 +361,62 @@
         });
     }
 
+    window.loadCstmrSel = function () {
+        return xmSelect.render({
+            el: '#cstmrXmlSel',
+            autoRow: true,
+            filterable: true,
+            remoteSearch: true,
+            radio: true,
+            remoteMethod: function (val, cb, show) {
+                $.ajax({
+                    url: baseUrl + "/cstmr/all/get/kv",
+                    headers: {'token': localStorage.getItem('token')},
+                    data: {
+                        condition: val
+                    },
+                    method: 'POST',
+                    success: function (res) {
+                        if (res.code === 200) {
+                            cb(res.data)
+                        } else {
+                            cb([]);
+                            layer.msg(res.msg, {icon: 2});
+                        }
+                    }
+                });
+            }
+        });
+    }
+
+    window.loadCompanySel = function () {
+        return xmSelect.render({
+            el: '#companyXmlSel',
+            autoRow: true,
+            filterable: true,
+            remoteSearch: true,
+            radio: true,
+            remoteMethod: function (val, cb, show) {
+                $.ajax({
+                    url: baseUrl + "/company/all/get/kv",
+                    headers: {'token': localStorage.getItem('token')},
+                    data: {
+                        condition: val
+                    },
+                    method: 'POST',
+                    success: function (res) {
+                        if (res.code === 200) {
+                            cb(res.data)
+                        } else {
+                            cb([]);
+                            layer.msg(res.msg, {icon: 2});
+                        }
+                    }
+                });
+            }
+        });
+    }
+
 });
 
 // 鍏抽棴鍔ㄤ綔

--
Gitblit v1.9.1