From affb9fbb6862699df4495517c41c62be7b5e10a6 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期四, 09 十一月 2023 14:56:55 +0800
Subject: [PATCH] #

---
 src/main/java/com/zy/crm/manager/controller/PlanController.java |   12 ++++++++----
 src/main/webapp/static/js/plan/plan.js                          |    5 +++--
 src/main/webapp/static/js/priOnline2/priOnline.js               |    4 ++--
 src/main/webapp/views/plan/plan.html                            |    2 +-
 4 files changed, 14 insertions(+), 9 deletions(-)

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 305ffbc..4e77bb0 100644
--- a/src/main/java/com/zy/crm/manager/controller/PlanController.java
+++ b/src/main/java/com/zy/crm/manager/controller/PlanController.java
@@ -6,10 +6,7 @@
 import com.baomidou.mybatisplus.mapper.Wrapper;
 import com.baomidou.mybatisplus.plugins.Page;
 import com.core.annotations.ManagerAuth;
-import com.core.common.BaseRes;
-import com.core.common.Cools;
-import com.core.common.DateUtils;
-import com.core.common.R;
+import com.core.common.*;
 import com.core.domain.KeyValueVo;
 import com.core.exception.CoolException;
 import com.zy.crm.common.model.SettleDto;
@@ -216,6 +213,13 @@
     @Transactional
     public R assistantPlanAdd(@RequestParam Long hostPlanId) {
         Plan hostPlan = planService.selectById(hostPlanId);
+        if (hostPlan.getAssistantHostSign()!=0){
+            return R.error("姝よ鍒掑崟涓嶉渶瑕佸垱寤哄壇娴佺▼");
+        }
+        PlanType planType2 = planTypeService.selectById(hostPlan.getPlanType());
+        if (planType2.getType()!=2){
+            return R.error("姝よ鍒掑崟涓嶉渶瑕佸垱寤哄壇娴佺▼");
+        }
         if (!Cools.isEmpty(hostPlan.getAssistantPlanId()) && hostPlan.getAssistantPlanId()!=0){
             return R.error("姝よ鍒掑崟宸插瓨鍦ㄥ壇瑙勫垝鍗曪紝id涓�"+hostPlan.getAssistantPlanId());
         }
diff --git a/src/main/webapp/static/js/plan/plan.js b/src/main/webapp/static/js/plan/plan.js
index 531ab26..18873cf 100644
--- a/src/main/webapp/static/js/plan/plan.js
+++ b/src/main/webapp/static/js/plan/plan.js
@@ -204,8 +204,9 @@
             ,{field: 'center', align: 'left',title: '鍏宠仈娴佺▼', toolbar: '#tbLook', minWidth: 160, hide: false}
             ,{field: 'assistantHostSign$', align: 'left',title: '涓诲壇鏍囪', hide: false}
             ,{field: 'assistantHostSign', align: 'left',title: '涓诲壇鏍囪', hide: true}
-            ,{field: 'hostPlanId', align: 'left',title: '涓籌D', hide: false}
-            ,{field: 'assistantPlanId', align: 'left',title: '鍓疘D', hide: false}
+            ,{field: 'hostPlanId', align: 'left',title: '涓籌D', hide: true}
+            ,{field: 'assistantPlanId', align: 'left',title: '鍓疘D', hide: true}
+            // ,{field: 'assistantPlanIdSignType', align: 'left',title: '闆嗘垚璐ф灦鏍囧織', hide: true}
             ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width: 340}
         ]],
         request: {
diff --git a/src/main/webapp/static/js/priOnline2/priOnline.js b/src/main/webapp/static/js/priOnline2/priOnline.js
index 06438ed..ce892f9 100644
--- a/src/main/webapp/static/js/priOnline2/priOnline.js
+++ b/src/main/webapp/static/js/priOnline2/priOnline.js
@@ -123,8 +123,8 @@
             , {field: 'updateTime$', align: 'center', title: '鏇存柊鏃堕棿', hide: false}
             ,{field: 'assistantHostSign$', align: 'left',title: '涓诲壇鏍囪', hide: false}
             ,{field: 'assistantHostSign', align: 'left',title: '涓诲壇鏍囪', hide: true}
-            ,{field: 'hostPlanId', align: 'left',title: '涓籌D', hide: false}
-            ,{field: 'assistantPlanId', align: 'left',title: '鍓疘D', hide: false}
+            ,{field: 'hostPlanId', align: 'left',title: '涓籌D', hide: true}
+            ,{field: 'assistantPlanId', align: 'left',title: '鍓疘D', hide: true}
             , {fixed: 'right', title: '鎿嶄綔', align: 'center', toolbar: '#operate', width: 350}
         ]],
         request: {
diff --git a/src/main/webapp/views/plan/plan.html b/src/main/webapp/views/plan/plan.html
index 486c145..ef58192 100644
--- a/src/main/webapp/views/plan/plan.html
+++ b/src/main/webapp/views/plan/plan.html
@@ -153,7 +153,7 @@
         <a class="layui-btn layui-btn-primary layui-btn-xs btn-edit" lay-event="edit">淇敼</a>
         <a class="layui-btn layui-btn-danger layui-btn-xs btn-edit" lay-event="del">鍒犻櫎</a>
     {{# } }}
-    {{# if (d.assistantHostSign == 0) { }}
+    {{# if (d.assistantHostSign == 0 && d.assistantPlanId==0) { }}
         <a class="layui-btn layui-btn-xs btn-edit" lay-event="assistantPlan">鍒涘缓璐ф灦瑙勫垝浠诲姟</a>
     {{# } }}
 

--
Gitblit v1.9.1