From ef338fb6029251c320431e65a2cd60ead0e8b6e0 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期一, 11 九月 2023 10:11:01 +0800
Subject: [PATCH] #

---
 src/main/webapp/static/js/cstmr/cstmr.js                        |    1 
 src/main/java/com/zy/crm/manager/controller/PlanController.java |   30 +++++++-------
 src/main/webapp/static/js/plan/plan.js                          |    4 ++
 src/main/webapp/static/js/order/order.js                        |    7 +++
 src/main/java/com/zy/crm/common/utils/FileSaveExampleUtil.java  |   26 ++++++------
 src/main/webapp/views/order/order.html                          |    2 
 6 files changed, 40 insertions(+), 30 deletions(-)

diff --git a/src/main/java/com/zy/crm/common/utils/FileSaveExampleUtil.java b/src/main/java/com/zy/crm/common/utils/FileSaveExampleUtil.java
index 46987e2..20892a0 100644
--- a/src/main/java/com/zy/crm/common/utils/FileSaveExampleUtil.java
+++ b/src/main/java/com/zy/crm/common/utils/FileSaveExampleUtil.java
@@ -61,19 +61,19 @@
 //        }
 //    }
 
-    public static void saveFile(MultipartFile file, String savePath) throws IOException {
-        // 鍒涘缓淇濆瓨鏂囦欢鐨勭洰褰曪紙濡傛灉涓嶅瓨鍦級
-        File directory = new File(savePath);
-        if (!directory.exists()) {
-            directory.mkdirs();
-        }
-
-        // 淇濆瓨鏂囦欢
-        String fileName = file.getOriginalFilename();
-        String filePath = savePath + fileName;
-        File dest = new File(filePath);
-        file.transferTo(dest);
-    }
+//    public static void saveFile(MultipartFile file, String savePath) throws IOException {
+//        // 鍒涘缓淇濆瓨鏂囦欢鐨勭洰褰曪紙濡傛灉涓嶅瓨鍦級
+//        File directory = new File(savePath);
+//        if (!directory.exists()) {
+//            directory.mkdirs();
+//        }
+//
+//        // 淇濆瓨鏂囦欢
+//        String fileName = file.getOriginalFilename();
+//        String filePath = savePath + fileName;
+//        File dest = new File(filePath);
+//        file.transferTo(dest);
+//    }
 
     public static void deleteFilesInDirectory(String directoryPath) {
         File directory = new File(directoryPath);
diff --git a/src/main/java/com/zy/crm/manager/controller/PlanController.java b/src/main/java/com/zy/crm/manager/controller/PlanController.java
index 22a3747..67025b6 100644
--- a/src/main/java/com/zy/crm/manager/controller/PlanController.java
+++ b/src/main/java/com/zy/crm/manager/controller/PlanController.java
@@ -260,21 +260,21 @@
         return "";
     }
 
-    @RequestMapping(value = "/plan/delete/file/auth")
-//    @ManagerAuth
-    public R deleteFile(@RequestParam("planId") String planId,@RequestParam MultipartFile file){
-        planId="涓婁紶鏂囦欢-20";
-        String[] split = planId.split("-");
-        int id = Integer.parseInt(split[1]);
-        System.out.println("---寮�濮�---");
-        String savePath = "D:/crm/plan/file/"+id+"/"+file.getName(); // 鎸囧畾淇濆瓨鏂囦欢鐨勮矾寰�
-        try{
-            FileSaveExampleUtil.deleteFilesInDirectory(savePath);
-        }catch (Exception e){
-            return R.error();
-        }
-        return R.ok();
-    }
+//    @RequestMapping(value = "/plan/delete/file/auth")
+////    @ManagerAuth
+//    public R deleteFile(@RequestParam("planId") String planId,@RequestParam MultipartFile file){
+//        planId="涓婁紶鏂囦欢-20";
+//        String[] split = planId.split("-");
+//        int id = Integer.parseInt(split[1]);
+//        System.out.println("---寮�濮�---");
+//        String savePath = "D:/crm/plan/file/"+id+"/"+file.getName(); // 鎸囧畾淇濆瓨鏂囦欢鐨勮矾寰�
+//        try{
+//            FileSaveExampleUtil.deleteFilesInDirectory(savePath);
+//        }catch (Exception e){
+//            return R.error();
+//        }
+//        return R.ok();
+//    }
 
     @RequestMapping(value = "/plan/view/file/auth")
 //    @ManagerAuth
diff --git a/src/main/webapp/static/js/cstmr/cstmr.js b/src/main/webapp/static/js/cstmr/cstmr.js
index abc13f8..ab0c979 100644
--- a/src/main/webapp/static/js/cstmr/cstmr.js
+++ b/src/main/webapp/static/js/cstmr/cstmr.js
@@ -405,6 +405,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 9ed24f6..97db090 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -150,7 +150,7 @@
             ,{field: 'director$', align: 'left',title: '椤圭洰璐熻矗浜�', templet:function(d){return emptyShow(d.director$)}}
             ,{field: 'remarks', align: 'left',title: '澶囨敞', templet:function(d){return emptyShow(d.remarks)}}
             ,{field: 'createTime$', align: 'left',title: '娣诲姞鏃堕棿'}
-            ,{field: 'company$', align: 'left',title: '鎵�灞炲叕鍙�', hide: true}
+            ,{field: 'company$', align: 'left',title: '鎵�灞炲叕鍙�', hide: false}
             ,{field: 'orderProductTypeId$', align: 'left',title: '浜у搧绫诲瀷', hide: false}
             ,{field: 'province', align: 'left',title: '鐪�', hide: true}
             ,{field: 'city', align: 'left',title: '甯�', hide: true}
@@ -268,6 +268,9 @@
             success: function (layero, dIndex) {
                 let cstmrSel = loadCstmrSel();
                 let companySel = loadCompanySel();
+                if (!mData){
+                    companySel.setValue([{name: "娴欐睙涓壃绔嬪簱鎶�鏈湁闄愬叕鍙�", value: 4}]);
+                }
                 if (mData) {
                     $('#cascaderVal').val(mData.pcd);
                     if (mData.cstmrId) { cstmrSel.setValue([{name: mData.cstmrId$, value: mData.cstmrId}]); }
@@ -408,6 +411,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
@@ -436,6 +440,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
diff --git a/src/main/webapp/static/js/plan/plan.js b/src/main/webapp/static/js/plan/plan.js
index 8ae8155..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({
@@ -898,6 +900,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
@@ -956,6 +959,7 @@
             autoRow: true,
             filterable: true,
             remoteSearch: true,
+            clickClose: true,
             radio: true,
             remoteMethod: function (val, cb, show) {
                 $.ajax({
diff --git a/src/main/webapp/views/order/order.html b/src/main/webapp/views/order/order.html
index fc63c32..d4da9e9 100644
--- a/src/main/webapp/views/order/order.html
+++ b/src/main/webapp/views/order/order.html
@@ -167,7 +167,7 @@
                 <div class="layui-form-item">
                     <label class="layui-form-label layui-form-required">椤圭洰鐘舵�� : </label>
                     <div class="layui-input-block" >
-                        <input type="radio" name="status" value="0" title="璺熻釜涓�"/>
+                        <input type="radio" name="status" value="0" title="璺熻釜涓�" checked/>
                         <input type="radio" name="status" value="1" title="瀹屾垚"/>
                         <input type="radio" name="status" value="2" title="鍏抽棴"/>
                     </div>

--
Gitblit v1.9.1