From af941d9728d6bf52b941c9505a5bd3e81b8064a3 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期一, 21 十一月 2022 15:01:37 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/plan/plan.js |   43 ++++++++++++-------------------------------
 1 files changed, 12 insertions(+), 31 deletions(-)

diff --git a/src/main/webapp/static/js/plan/plan.js b/src/main/webapp/static/js/plan/plan.js
index 0144987..2dabb60 100644
--- a/src/main/webapp/static/js/plan/plan.js
+++ b/src/main/webapp/static/js/plan/plan.js
@@ -232,13 +232,22 @@
                                         if (res0.code === 200) {
                                             admin.open({
                                                 type: 1,
-                                                area: '600px',
+                                                area: '1500px',
                                                 title: '娣诲姞鍞墠瑙勫垝鐢宠鍗�' + ' - ' + planType.name,
                                                 content: $('#editDialog').html(),
                                                 success: function (layero0, dIndex0) {
                                                     layer.close(loadIndex0);
+                                                    let orderSel = loadOrderSel();
+                                                    let cstmrSel = loadCstmrSel();
+                                                    let planNeedSel = loadPlanNeedSel();
+                                                    form.val('detail', {
+                                                        planTypeName: planType.name
+                                                    });
                                                     layDateRender();
                                                     form.on('submit(editSubmit)', function (data) {
+                                                        data.field.orderId = orderSel.getValue()[0] ? orderSel.getValue()[0].value : null;
+                                                        data.field.cstmrId = cstmrSel.getValue()[0] ? cstmrSel.getValue()[0].value : null;
+                                                        data.field.planNeed = planNeedSel.getValue()[0] ? planNeedSel.getValue()[0].value : null;
                                                         var loadIndex = layer.load(2);
                                                         $.ajax({
                                                             url: baseUrl+"/plan/"+(mData?'update':'add')+"/auth",
@@ -448,12 +457,12 @@
             });
             layDate.render({
                 elem: '#appleTime\\$',
-                type: 'datetime',
+                type: 'date',
                 value: data!==undefined?data['appleTime\\$']:null
             });
             layDate.render({
                 elem: '#finishTime\\$',
-                type: 'datetime',
+                type: 'datet',
                 value: data!==undefined?data['finishTime\\$']:null
             });
             layDate.render({
@@ -470,34 +479,6 @@
         }, 300);
     }
     layDateRender();
-
-    window.loadDeptSel = function () {
-        return xmSelect.render({
-            el: '#deptXmlSel',
-            autoRow: true,
-            filterable: true,
-            remoteSearch: true,
-            radio: true,
-            remoteMethod: function (val, cb, show) {
-                $.ajax({
-                    url: baseUrl + "/dept/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.loadPlanTypeSel = function () {
         return xmSelect.render({

--
Gitblit v1.9.1