From 2f54d40d80be4635d1f22b2f02c735d383060875 Mon Sep 17 00:00:00 2001
From: LSH
Date: 星期五, 01 十二月 2023 14:49:35 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/cstmr/cstmr.js | 2
src/main/webapp/views/planType/planType.html | 43 ++++++--------
src/main/java/com/zy/crm/manager/entity/PlanType.java | 7 ++
src/main/java/com/zy/crm/manager/entity/Cstmr.java | 20 ++++++
src/main/java/com/zy/crm/manager/controller/PlanTypeController.java | 10 +++
src/main/resources/mapper/PlanTypeMapper.xml | 1
src/main/java/com/zy/crm/manager/entity/Order.java | 2
src/main/resources/mapper/CstmrMapper.xml | 1
src/main/webapp/views/cstmr/cstmr_more.html | 2
src/main/webapp/static/js/cstmr/cstmr2.js | 2
src/main/webapp/views/cstmr/cstmr.html | 24 +++-----
src/main/webapp/views/orderProductType/orderProductType.html | 21 +-----
src/main/webapp/views/cstmr/cstmr2.html | 24 +++-----
src/main/resources/application.yml | 10 +-
14 files changed, 88 insertions(+), 81 deletions(-)
diff --git a/src/main/java/com/zy/crm/manager/controller/PlanTypeController.java b/src/main/java/com/zy/crm/manager/controller/PlanTypeController.java
index 08e12a8..647d6a6 100644
--- a/src/main/java/com/zy/crm/manager/controller/PlanTypeController.java
+++ b/src/main/java/com/zy/crm/manager/controller/PlanTypeController.java
@@ -11,7 +11,9 @@
import com.core.common.R;
import com.core.domain.KeyValueVo;
import com.zy.crm.common.web.BaseController;
+import com.zy.crm.manager.entity.OrderProductType;
import com.zy.crm.manager.entity.PlanType;
+import com.zy.crm.manager.service.OrderProductTypeService;
import com.zy.crm.manager.service.PlanTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@@ -23,6 +25,8 @@
@Autowired
private PlanTypeService planTypeService;
+ @Autowired
+ private OrderProductTypeService orderProductTypeService;
@GetMapping(value = "/planType/{id}/auth")
@ManagerAuth
@@ -91,6 +95,12 @@
@RequestMapping(value = "/planType/add/auth")
@ManagerAuth(memo = "娣诲姞瑙勫垝鍗曠被鍨�")
public R add(PlanType planType) {
+ int OPTCOUNT = planTypeService.selectCount(new EntityWrapper<PlanType>().eq("order_product_type_id", planType.getOrderProductTypeId()));
+ if (OPTCOUNT!=0) return R.error("閲嶅娣诲姞");
+ OrderProductType orderProductType = orderProductTypeService.selectById(planType.getOrderProductTypeId());
+ planType.setName(orderProductType.getName());
+ planType.setType(orderProductType.getType());
+ planType.setOrderProductTypeId(planType.getOrderProductTypeId());
planType.setHostId(getHostId());
planType.setCreateBy(getUserId());
planType.setCreateTime(new Date());
diff --git a/src/main/java/com/zy/crm/manager/entity/Cstmr.java b/src/main/java/com/zy/crm/manager/entity/Cstmr.java
index 750f58b..30c1b44 100644
--- a/src/main/java/com/zy/crm/manager/entity/Cstmr.java
+++ b/src/main/java/com/zy/crm/manager/entity/Cstmr.java
@@ -7,6 +7,7 @@
import com.core.common.Cools;
import com.core.common.SpringUtils;
import com.zy.crm.manager.service.CstmrTypeService;
+import com.zy.crm.manager.service.OrderProductTypeService;
import com.zy.crm.system.entity.Dept;
import com.zy.crm.system.entity.Dic;
import com.zy.crm.system.entity.Host;
@@ -204,11 +205,18 @@
private String industry;
/**
- * 浜у搧绫诲埆
+ * 浜у搧绫诲埆 搴熷純
*/
@ApiModelProperty(value= "浜у搧绫诲埆")
@TableField("product_category")
private String productCategory;
+
+ /**
+ * 浜у搧绫诲瀷
+ */
+ @ApiModelProperty(value= "浜у搧绫诲瀷")
+ @TableField("order_product_type_id")
+ private Long orderProductTypeId;
/**
* 浼佷笟淇$敤浠g爜
@@ -375,6 +383,16 @@
return null;
}
+ public String getOrderProductTypeId$(){
+ if (this.orderProductTypeId==null) return null;
+ OrderProductTypeService orderProductTypeService = SpringUtils.getBean(OrderProductTypeService.class);
+ OrderProductType orderProductType = orderProductTypeService.selectById(this.orderProductTypeId);
+ if (!Cools.isEmpty(orderProductType)){
+ return String.valueOf(orderProductType.getName());
+ }
+ return null;
+ }
+
public void setType0(String type0){
if (Cools.isEmpty(type0)) {
diff --git a/src/main/java/com/zy/crm/manager/entity/Order.java b/src/main/java/com/zy/crm/manager/entity/Order.java
index bfaed43..ddbd89b 100644
--- a/src/main/java/com/zy/crm/manager/entity/Order.java
+++ b/src/main/java/com/zy/crm/manager/entity/Order.java
@@ -198,7 +198,7 @@
private String transactionRate;
/**
- * 娣诲姞浜哄憳
+ * 浜у搧绫诲瀷
*/
@ApiModelProperty(value= "浜у搧绫诲瀷")
@TableField("order_product_type_id")
diff --git a/src/main/java/com/zy/crm/manager/entity/PlanType.java b/src/main/java/com/zy/crm/manager/entity/PlanType.java
index a03eddb..4bac64e 100644
--- a/src/main/java/com/zy/crm/manager/entity/PlanType.java
+++ b/src/main/java/com/zy/crm/manager/entity/PlanType.java
@@ -6,6 +6,7 @@
import com.baomidou.mybatisplus.enums.IdType;
import com.core.common.Cools;
import com.core.common.SpringUtils;
+import com.zy.crm.manager.service.OrderProductTypeService;
import com.zy.crm.system.entity.Host;
import com.zy.crm.system.entity.User;
import com.zy.crm.system.service.HostService;
@@ -61,6 +62,12 @@
private String formId;
/**
+ * 浜у搧绫诲瀷ID
+ */
+ @ApiModelProperty(value= "浜у搧绫诲瀷ID")
+ @TableField("order_product_type_id")
+ private Long orderProductTypeId;
+ /**
* 琛ㄥ崟閰嶇疆
*/
@ApiModelProperty(value= "琛ㄥ崟閰嶇疆")
diff --git a/src/main/resources/application.yml b/src/main/resources/application.yml
index 325b2da..a7d6e8d 100644
--- a/src/main/resources/application.yml
+++ b/src/main/resources/application.yml
@@ -17,12 +17,12 @@
name: @pom.build.finalName@
datasource:
driver-class-name: com.microsoft.sqlserver.jdbc.SQLServerDriver
-# url: jdbc:sqlserver://192.168.4.15:1433;databasename=zy_crm
-# username: sa
-# password: sa@123
- url: jdbc:sqlserver://127.0.0.1:51433;databasename=zy_crm
+ url: jdbc:sqlserver://127.0.0.1:1433;databasename=zy_crm
username: sa
- password: Zoneyung@zy56$
+ password: sa@123
+# url: jdbc:sqlserver://127.0.0.1:51433;databasename=zy_crm
+# username: sa
+# password: Zoneyung@zy56$
# url: jdbc:sqlserver://47.97.1.152:51433;databasename=zy_crm
# username: sa
# password: Zoneyung@zy56$
diff --git a/src/main/resources/mapper/CstmrMapper.xml b/src/main/resources/mapper/CstmrMapper.xml
index f3b9e68..1b9a100 100644
--- a/src/main/resources/mapper/CstmrMapper.xml
+++ b/src/main/resources/mapper/CstmrMapper.xml
@@ -32,6 +32,7 @@
<result column="memo" property="memo" />
<result column="industry" property="industry" />
<result column="product_category" property="productCategory" />
+ <result column="order_product_type_id" property="orderProductTypeId" />
<result column="credit_code" property="creditCode" />
<result column="issue_time" property="issueTime" />
<result column="company_type" property="companyType" />
diff --git a/src/main/resources/mapper/PlanTypeMapper.xml b/src/main/resources/mapper/PlanTypeMapper.xml
index 82abe06..b2f200e 100644
--- a/src/main/resources/mapper/PlanTypeMapper.xml
+++ b/src/main/resources/mapper/PlanTypeMapper.xml
@@ -18,6 +18,7 @@
<result column="update_by" property="updateBy" />
<result column="update_time" property="updateTime" />
<result column="memo" property="memo" />
+ <result column="order_product_type_id" property="orderProductTypeId" />
</resultMap>
diff --git a/src/main/webapp/static/js/cstmr/cstmr.js b/src/main/webapp/static/js/cstmr/cstmr.js
index a9d8902..122ead3 100644
--- a/src/main/webapp/static/js/cstmr/cstmr.js
+++ b/src/main/webapp/static/js/cstmr/cstmr.js
@@ -149,7 +149,7 @@
,{field: 'remarks', align: 'left',title: '澶囨敞', hide: false, templet:function(d){return emptyShow(d.remarks)}}
,{field: 'cstmrType$', align: 'left',title: '瀹㈡埛绫诲埆', hide: false}
,{field: 'industry', align: 'left',title: '瀹㈡埛琛屼笟', hide: false}
- ,{field: 'productCategory', align: 'left',title: '浜у搧绫诲埆', hide: false}
+ ,{field: 'orderProductTypeId$', align: 'left',title: '浜у搧绫诲瀷', hide: false}
,{field: 'userId$', align: 'left',title: '娣诲姞浜哄憳', hide: true}
,{field: 'deptId$', align: 'left',title: '鎵�灞為儴闂�', hide: true}
,{field: 'rela', align: 'left',title: '瀹㈡埛鍏崇郴', hide: true}
diff --git a/src/main/webapp/static/js/cstmr/cstmr2.js b/src/main/webapp/static/js/cstmr/cstmr2.js
index b116de5..0ffc3e5 100644
--- a/src/main/webapp/static/js/cstmr/cstmr2.js
+++ b/src/main/webapp/static/js/cstmr/cstmr2.js
@@ -149,7 +149,7 @@
,{field: 'remarks', align: 'left',title: '澶囨敞', hide: false, templet:function(d){return emptyShow(d.remarks)}}
,{field: 'cstmrType$', align: 'left',title: '瀹㈡埛绫诲埆', hide: false}
,{field: 'industry', align: 'left',title: '瀹㈡埛琛屼笟', hide: false}
- ,{field: 'productCategory', align: 'left',title: '浜у搧绫诲埆', hide: false}
+ ,{field: 'orderProductTypeId$', align: 'left',title: '浜у搧绫诲瀷', hide: false}
,{field: 'userId$', align: 'left',title: '娣诲姞浜哄憳', hide: true}
,{field: 'createTime$', align: 'left',title: '娣诲姞鏃堕棿', hide: false}
,{field: 'deptId$', align: 'left',title: '鎵�灞為儴闂�', hide: true}
diff --git a/src/main/webapp/views/cstmr/cstmr.html b/src/main/webapp/views/cstmr/cstmr.html
index 7274fdf..1e94575 100644
--- a/src/main/webapp/views/cstmr/cstmr.html
+++ b/src/main/webapp/views/cstmr/cstmr.html
@@ -179,21 +179,15 @@
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label layui-form-required">浜у搧绫诲埆: </label>
- <div class="layui-input-block">
- <select name="productCategory" lay-vertype="tips" lay-verify="required">
- <option value="">璇烽�夋嫨绫诲埆</option>
- <option value="绔嬩綋搴擄紙璐ф灦锛�">绔嬩綋搴擄紙璐ф灦锛�</option>
- <option value="绔嬩綋搴擄紙闆嗘垚锛�">绔嬩綋搴擄紙闆嗘垚锛�</option>
- <option value="鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�">鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�</option>
- <option value="闃佹ゼ璐ф灦/閽㈠钩鍙�">闃佹ゼ璐ф灦/閽㈠钩鍙�</option>
- <option value="鍛ㄨ浆瀹瑰櫒">鍛ㄨ浆瀹瑰櫒</option>
- <option value="骞冲簱">骞冲簱</option>
- <option value="璐ф灦澧炶ˉ">璐ф灦澧炶ˉ</option>
- <option value="闆嗘垚澧炶ˉ">闆嗘垚澧炶ˉ</option>
- <option value="璐ф灦鍏跺畠">璐ф灦鍏跺畠</option>
- <option value="闆嗘垚鍏跺畠">闆嗘垚鍏跺畠</option>
- </select>
+ <label class="layui-form-label layui-form-required">浜у搧绫诲瀷: </label>
+ <div class="layui-input-block cool-auto-complete">
+ <input class="layui-input" name="orderProductTypeId" placeholder="璇疯緭鍏ヤ骇鍝佺被鍨�" style="display: none">
+ <input id="orderProductTypeId$" name="orderProductTypeId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="璇疯緭鍏ヤ骇鍝佺被鍨�" onfocus=this.blur()>
+ <div class="cool-auto-complete-window">
+ <input class="cool-auto-complete-window-input" data-key="orderProductTypeQueryBydirector" onkeyup="autoLoad(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="orderProductTypeQueryBydirectorSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+ </select>
+ </div>
</div>
</div>
<div class="layui-form-item">
diff --git a/src/main/webapp/views/cstmr/cstmr2.html b/src/main/webapp/views/cstmr/cstmr2.html
index 0ca3c4d..49167a9 100644
--- a/src/main/webapp/views/cstmr/cstmr2.html
+++ b/src/main/webapp/views/cstmr/cstmr2.html
@@ -192,21 +192,15 @@
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label layui-form-required">浜у搧绫诲埆: </label>
- <div class="layui-input-block">
- <select name="productCategory" lay-vertype="tips" lay-verify="required">
- <option value="">璇烽�夋嫨绫诲埆</option>
- <option value="绔嬩綋搴擄紙璐ф灦锛�">绔嬩綋搴擄紙璐ф灦锛�</option>
- <option value="绔嬩綋搴擄紙闆嗘垚锛�">绔嬩綋搴擄紙闆嗘垚锛�</option>
- <option value="鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�">鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�</option>
- <option value="闃佹ゼ璐ф灦/閽㈠钩鍙�">闃佹ゼ璐ф灦/閽㈠钩鍙�</option>
- <option value="鍛ㄨ浆瀹瑰櫒">鍛ㄨ浆瀹瑰櫒</option>
- <option value="骞冲簱">骞冲簱</option>
- <option value="璐ф灦澧炶ˉ">璐ф灦澧炶ˉ</option>
- <option value="闆嗘垚澧炶ˉ">闆嗘垚澧炶ˉ</option>
- <option value="璐ф灦鍏跺畠">璐ф灦鍏跺畠</option>
- <option value="闆嗘垚鍏跺畠">闆嗘垚鍏跺畠</option>
- </select>
+ <label class="layui-form-label layui-form-required">浜у搧绫诲瀷: </label>
+ <div class="layui-input-block cool-auto-complete">
+ <input class="layui-input" name="orderProductTypeId" placeholder="璇疯緭鍏ヤ骇鍝佺被鍨�" style="display: none">
+ <input id="orderProductTypeId$" name="orderProductTypeId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="璇疯緭鍏ヤ骇鍝佺被鍨�" onfocus=this.blur()>
+ <div class="cool-auto-complete-window">
+ <input class="cool-auto-complete-window-input" data-key="orderProductTypeQueryBydirector" onkeyup="autoLoad(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="orderProductTypeQueryBydirectorSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+ </select>
+ </div>
</div>
</div>
<div class="layui-form-item">
diff --git a/src/main/webapp/views/cstmr/cstmr_more.html b/src/main/webapp/views/cstmr/cstmr_more.html
index dd30a17..5369b07 100644
--- a/src/main/webapp/views/cstmr/cstmr_more.html
+++ b/src/main/webapp/views/cstmr/cstmr_more.html
@@ -140,7 +140,7 @@
<div class="layui-inline layui-col-md6">
<label class="layui-form-label">浜у搧绫诲埆:</label>
<div class="layui-input-block">
- <input name="productCategory" class="layui-input" disabled />
+ <input name="orderProductTypeId$" class="layui-input" disabled />
</div>
</div>
<div class="layui-inline layui-col-md12">
diff --git a/src/main/webapp/views/orderProductType/orderProductType.html b/src/main/webapp/views/orderProductType/orderProductType.html
index 2c57085..7f610c7 100644
--- a/src/main/webapp/views/orderProductType/orderProductType.html
+++ b/src/main/webapp/views/orderProductType/orderProductType.html
@@ -64,28 +64,15 @@
<div class="layui-row">
<div class="layui-col-md12">
<div class="layui-form-item">
- <label class="layui-form-label layui-form-required">绫诲瀷鍚嶇О</label>
+ <label class="layui-form-label layui-form-required">绫诲瀷鍚嶇О: </label>
<div class="layui-input-block">
- <!-- <input class="layui-input" name="name" placeholder="璇疯緭鍏ョ被鍨嬪悕绉�" lay-verType="tips" lay-verify="required" required/>-->
- <select name="name" lay-verType="tips" lay-verify="required" required>
- <option value="">璇烽�夋嫨绫诲瀷</option>
- <option value="绔嬩綋搴擄紙璐ф灦锛�">绔嬩綋搴擄紙璐ф灦锛�</option>
- <option value="绔嬩綋搴擄紙闆嗘垚锛�">绔嬩綋搴擄紙闆嗘垚锛�</option>
- <option value="鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�">鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�</option>
- <option value="闃佹ゼ璐ф灦/閽㈠钩鍙�">闃佹ゼ璐ф灦/閽㈠钩鍙�</option>
- <option value="鍛ㄨ浆瀹瑰櫒">鍛ㄨ浆瀹瑰櫒</option>
- <option value="骞冲簱">骞冲簱</option>
- <option value="璐ф灦澧炶ˉ">璐ф灦澧炶ˉ</option>
- <option value="闆嗘垚澧炶ˉ">闆嗘垚澧炶ˉ</option>
- <option value="璐ф灦鍏跺畠">璐ф灦鍏跺畠</option>
- <option value="闆嗘垚鍏跺畠">闆嗘垚鍏跺畠</option>
- </select>
+ <input class="layui-input" name="name" placeholder="璇疯緭鍏ヤ骇鍝佺被鍨嬪悕绉�" autocomplete="off" lay-verify="required" required>
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label">鍖哄垎: </label>
+ <label class="layui-form-label layui-form-required">鍖哄垎: </label>
<div class="layui-input-block">
- <select name="type">
+ <select name="type" lay-verType="tips" lay-verify="required" required>
<option value="">璇烽�夋嫨鍖哄垎</option>
<option value="1">璐ф灦</option>
<option value="2">闆嗘垚</option>
diff --git a/src/main/webapp/views/planType/planType.html b/src/main/webapp/views/planType/planType.html
index 53632a9..333574b 100644
--- a/src/main/webapp/views/planType/planType.html
+++ b/src/main/webapp/views/planType/planType.html
@@ -7,6 +7,7 @@
<title>寮圭獥瀹炰緥</title>
<link rel="stylesheet" href="../../static/layui/css/layui.css" media="all">
<link rel="stylesheet" href="../../static/css/admin.css?v=318" media="all">
+ <link rel="stylesheet" href="../../static/css/cool.css" media="all">
<link rel="stylesheet" href="../../static/layui/lay/modules/formDesigner/cron.css" />
<link rel="stylesheet" href="../../static/layui/lay/modules/formDesigner/labelGeneration.css" />
@@ -86,33 +87,27 @@
<div class="layui-col-md12">
<div class="layui-form-item">
<label class="layui-form-label layui-form-required">绫诲瀷鍚嶇О</label>
- <div class="layui-input-block">
+ <div class="layui-input-block cool-auto-complete">
<!-- <input class="layui-input" name="name" placeholder="璇疯緭鍏ョ被鍨嬪悕绉�" lay-verType="tips" lay-verify="required" required/>-->
- <select name="name" lay-verType="tips" lay-verify="required" required>
- <option value="">璇烽�夋嫨绫诲瀷</option>
- <option value="绔嬩綋搴擄紙璐ф灦锛�">绔嬩綋搴擄紙璐ф灦锛�</option>
- <option value="绔嬩綋搴擄紙闆嗘垚锛�">绔嬩綋搴擄紙闆嗘垚锛�</option>
- <option value="鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�">鍥涘悜绌挎搴�/涓ゅ悜绌挎搴�</option>
- <option value="闃佹ゼ璐ф灦/閽㈠钩鍙�">闃佹ゼ璐ф灦/閽㈠钩鍙�</option>
- <option value="鍛ㄨ浆瀹瑰櫒">鍛ㄨ浆瀹瑰櫒</option>
- <option value="骞冲簱">骞冲簱</option>
- <option value="璐ф灦澧炶ˉ">璐ф灦澧炶ˉ</option>
- <option value="闆嗘垚澧炶ˉ">闆嗘垚澧炶ˉ</option>
- <option value="璐ф灦鍏跺畠">璐ф灦鍏跺畠</option>
- <option value="闆嗘垚鍏跺畠">闆嗘垚鍏跺畠</option>
- </select>
+ <input class="layui-input" name="orderProductTypeId" placeholder="璇疯緭鍏ヤ骇鍝佺被鍨�(鍙樉绀�10涓紝鏈煡璇㈠埌璇锋悳绱�)" style="display: none">
+ <input id="orderProductTypeId$" name="orderProductTypeId$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="璇疯緭鍏ヤ骇鍝佺被鍨�(鍙樉绀�10涓紝鏈煡璇㈠埌璇锋悳绱�)" onfocus=this.blur()>
+ <div class="cool-auto-complete-window">
+ <input class="cool-auto-complete-window-input" data-key="orderProductTypeQueryBydirector" onkeyup="autoLoad(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="orderProductTypeQueryBydirectorSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+ </select>
+ </div>
</div>
</div>
- <div class="layui-form-item">
- <label class="layui-form-label layui-form-required">鍖哄垎: </label>
- <div class="layui-input-block">
- <select name="type" lay-verType="tips" lay-verify="required" required>
- <option value="">璇烽�夋嫨鍖哄垎</option>
- <option value="1">璐ф灦</option>
- <option value="2">闆嗘垚</option>
- </select>
- </div>
- </div>
+<!-- <div class="layui-form-item">-->
+<!-- <label class="layui-form-label layui-form-required">鍖哄垎: </label>-->
+<!-- <div class="layui-input-block">-->
+<!-- <select name="type" lay-verType="tips" lay-verify="required" required>-->
+<!-- <option value="">璇烽�夋嫨鍖哄垎</option>-->
+<!-- <option value="1">璐ф灦</option>-->
+<!-- <option value="2">闆嗘垚</option>-->
+<!-- </select>-->
+<!-- </div>-->
+<!-- </div>-->
<div class="layui-form-item">
<label class="layui-form-label">绫诲瀷鏍囪瘑</label>
<div class="layui-input-block">
--
Gitblit v1.9.1