From bb80791c3d96ba2bf19c29ede1ae87905bceb7ba Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 08 十一月 2022 16:10:53 +0800
Subject: [PATCH] #
---
src/main/webapp/static/js/order/order.js | 6 +
src/main/java/com/zy/crm/manager/entity/Order.java | 77 +++++++++++++++
src/main/webapp/views/order/order.html | 207 ++++++++++-------------------------------
3 files changed, 132 insertions(+), 158 deletions(-)
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 90a4731..3c2c829 100644
--- a/src/main/java/com/zy/crm/manager/entity/Order.java
+++ b/src/main/java/com/zy/crm/manager/entity/Order.java
@@ -9,9 +9,11 @@
import com.zy.crm.manager.service.CompanyService;
import com.zy.crm.manager.service.CstmrService;
import com.zy.crm.system.entity.Dept;
+import com.zy.crm.system.entity.Dic;
import com.zy.crm.system.entity.Host;
import com.zy.crm.system.entity.User;
import com.zy.crm.system.service.DeptService;
+import com.zy.crm.system.service.DicService;
import com.zy.crm.system.service.HostService;
import com.zy.crm.system.service.UserService;
import io.swagger.annotations.ApiModelProperty;
@@ -327,5 +329,80 @@
return new SimpleDateFormat("yyyy-MM-dd HH:mm:ss").format(this.updateTime);
}
+ @TableField(exist = false)
+ private String pcd;
+
+ public String getPcd() {
+ StringBuilder sb = new StringBuilder();
+ if (!Cools.isEmpty(province)) {
+ sb.append(province).append(",");
+ }
+ if (!Cools.isEmpty(city)) {
+ sb.append(city).append(",");
+ }
+ if (!Cools.isEmpty(district)) {
+ sb.append(district).append(",");
+ }
+ String s = sb.toString();
+ if (s.endsWith(",")) {
+ s = s.substring(0, s.length() - 1);
+ }
+ return s;
+ }
+
+ public String getPcd$() {
+ StringBuilder sb = new StringBuilder();
+ DicService service = SpringUtils.getBean(DicService.class);
+ if (!Cools.isEmpty(province)) {
+ Dic provinceDic = service.selectById(province);
+ if (!Cools.isEmpty(provinceDic)) {
+ sb.append(provinceDic.getName()).append(",");
+ }
+ }
+ if (!Cools.isEmpty(city)) {
+ Dic cityDic = service.selectById(city);
+ if (!Cools.isEmpty(cityDic)) {
+ sb.append(cityDic.getName()).append(",");
+ }
+ }
+ if (!Cools.isEmpty(district)) {
+ Dic districtDic = service.selectById(district);
+ if (!Cools.isEmpty(districtDic)) {
+ sb.append(districtDic.getName()).append(",");
+ }
+ }
+ String s = sb.toString();
+ if (s.endsWith(",")) {
+ s = s.substring(0, s.length() - 1);
+ }
+ return s;
+ }
+
+ public void setPcd(String pcd) {
+ this.pcd = pcd;
+ if (!Cools.isEmpty(pcd)) {
+ String[] split = this.pcd.split(",");
+ for (int i = 0;i< split.length; i++) {
+ switch (i) {
+ case 0:
+ this.province = split[0];
+ break;
+ case 1:
+ this.city = split[1];
+ break;
+ case 2:
+ this.district = split[2];
+ break;
+ default:
+ break;
+ }
+ }
+ } else {
+ this.province = "";
+ this.city = "";
+ this.district = "";
+ }
+ }
+
}
diff --git a/src/main/webapp/static/js/order/order.js b/src/main/webapp/static/js/order/order.js
index 73503ce..3b22b09 100644
--- a/src/main/webapp/static/js/order/order.js
+++ b/src/main/webapp/static/js/order/order.js
@@ -246,11 +246,15 @@
function showEditModel(mData) {
admin.open({
type: 1,
- area: '600px',
+ area: '1500px',
title: (mData ? '淇敼' : '娣诲姞') + '璁㈠崟鐘舵��',
content: $('#editDialog').html(),
success: function (layero, dIndex) {
+ if (mData) {
+ $('#cascaderVal').val(mData.pcd);
+ }
layDateRender(mData);
+ cascaderRender();
form.val('detail', mData);
form.on('submit(editSubmit)', function (data) {
var loadIndex = layer.load(2);
diff --git a/src/main/webapp/views/order/order.html b/src/main/webapp/views/order/order.html
index 74a0acb..399b767 100644
--- a/src/main/webapp/views/order/order.html
+++ b/src/main/webapp/views/order/order.html
@@ -113,95 +113,71 @@
<form id="detail" lay-filter="detail" class="layui-form admin-form model-form">
<input name="id" type="hidden">
<div class="layui-row">
- <div class="layui-col-md12">
- <div class="layui-form-item">
- <label class="layui-form-label">鎵�灞炲晢鎴�: </label>
- <div class="layui-input-block cool-auto-complete">
- <input class="layui-input" name="hostId" placeholder="璇疯緭鍏ユ墍灞炲晢鎴�" style="display: none">
- <input id="hostId$" name="hostId$" 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="hostQueryByhostId" onkeyup="autoLoad(this.getAttribute('data-key'))">
- <select class="cool-auto-complete-window-select" data-key="hostQueryByhostIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
- </select>
- </div>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">鎵�灞為儴闂�: </label>
- <div class="layui-input-block cool-auto-complete">
- <input class="layui-input" name="deptId" placeholder="璇疯緭鍏ユ墍灞為儴闂�" style="display: none">
- <input id="deptId$" name="deptId$" 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="deptQueryBydeptId" onkeyup="autoLoad(this.getAttribute('data-key'))">
- <select class="cool-auto-complete-window-select" data-key="deptQueryBydeptIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
- </select>
- </div>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">鎵�灞炰汉鍛�: </label>
- <div class="layui-input-block cool-auto-complete">
- <input class="layui-input" name="userId" placeholder="璇疯緭鍏ユ墍灞炰汉鍛�" style="display: none">
- <input id="userId$" name="userId$" 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="userQueryByuserId" onkeyup="autoLoad(this.getAttribute('data-key'))">
- <select class="cool-auto-complete-window-select" data-key="userQueryByuserIdSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
- </select>
- </div>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">鐢叉柟鍗曚綅: </label>
- <div class="layui-input-block cool-auto-complete">
- <input class="layui-input" name="cstmrId" placeholder="璇疯緭鍏ョ敳鏂瑰崟浣�" style="display: none">
- <input id="cstmrId$" name="cstmrId$" 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="cstmrQueryBycstmrId" onkeyup="autoLoad(this.getAttribute('data-key'))">
- <select class="cool-auto-complete-window-select" data-key="cstmrQueryBycstmrIdSelect" 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">瀹㈡埛浠e彿: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="uuid" placeholder="璇疯緭鍏ュ鎴蜂唬鍙�" lay-vertype="tips" lay-verify="required">
- </div>
- </div>
+ <div class="layui-col-md6">
<div class="layui-form-item">
<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">
+ <input class="layui-input" name="name" placeholder="璇疯緭鍏ュ鎴峰悕绉�" lay-vertype="tips" lay-verify="required" autocomplete="off">
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label">鎬婚噾棰�: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="money" placeholder="璇疯緭鍏ユ�婚噾棰�">
- </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 cool-auto-complete">
- <input class="layui-input" name="company" placeholder="璇疯緭鍏ユ墍灞炲叕鍙�" style="display: none">
- <input id="company$" name="company$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="璇疯緭鍏ユ墍灞炲叕鍙�" onfocus=this.blur()>
+ <input class="layui-input" name="cstmrType" placeholder="璇疯緭鍏ュ鎴风被鍒�" lay-vertype="tips" lay-verify="required" style="display: none">
+ <input id="cstmrType$" name="cstmrType$" 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="companyQueryBycompany" onkeyup="autoLoad(this.getAttribute('data-key'))">
- <select class="cool-auto-complete-window-select" data-key="companyQueryBycompanySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
+ <input class="cool-auto-complete-window-input" data-key="cstmrTypeQueryBycstmrType" onkeyup="autoLoad(this.getAttribute('data-key'))">
+ <select class="cool-auto-complete-window-select" data-key="cstmrTypeQueryBycstmrTypeSelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
</select>
</div>
</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">
- <input class="layui-input" name="remarks" placeholder="璇疯緭鍏ュ娉�">
+ <input id="cascaderVal" name="pcd" placeholder="璇烽�夋嫨" class="layui-hide" lay-verify="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">
+ <input class="layui-input" name="addr" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�" autocomplete="off" lay-verify="required">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">瀹㈡埛鑱旂郴浜�: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="contacts" placeholder="璇疯緭鍏ュ鎴疯仈绯讳汉" autocomplete="off" lay-verify="required">
+ </div>
+ </div>
+ </div>
+ <div class="layui-col-md6">
+ <div class="layui-form-item">
+ <label class="layui-form-label">瀹㈡埛鍏崇郴: </label>
+ <div class="layui-input-block">
+ <input class="layui-input" name="rela" placeholder="璇疯緭鍏ュ鎴峰叧绯�" autocomplete="off">
+ </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">
+ <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">
+ <input class="layui-input" name="tel" placeholder="璇疯緭鍏ョ數璇�" autocomplete="off" lay-verify="required">
+ </div>
+ </div>
+ <div class="layui-form-item">
+ <label class="layui-form-label layui-form-required">璐熻矗浜�: </label>
<div class="layui-input-block cool-auto-complete">
- <input class="layui-input" name="director" placeholder="璇疯緭鍏ヨ礋璐d汉" style="display: none">
+ <input class="layui-input" name="director" placeholder="璇疯緭鍏ヨ礋璐d汉" style="display: none" lay-verify="required">
<input id="director$" name="director$" class="layui-input cool-auto-complete-div" onclick="autoShow(this.id)" type="text" placeholder="璇疯緭鍏ヨ礋璐d汉" onfocus=this.blur()>
<div class="cool-auto-complete-window">
<input class="cool-auto-complete-window-input" data-key="userQueryBydirector" onkeyup="autoLoad(this.getAttribute('data-key'))">
@@ -211,95 +187,12 @@
</div>
</div>
<div class="layui-form-item">
- <label class="layui-form-label">鐪�: </label>
+ <label class="layui-form-label">澶囨敞: </label>
<div class="layui-input-block">
- <input class="layui-input" name="province" placeholder="璇疯緭鍏ョ渷">
+ <textarea class="layui-textarea" name="remarks" placeholder="璇疯緭鍏ュ娉�" maxlength="1024" autocomplete="off"></textarea>
</div>
</div>
- <div class="layui-form-item">
- <label class="layui-form-label">甯�: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="city" placeholder="璇疯緭鍏ュ競">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">鍘�: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="district" placeholder="璇疯緭鍏ュ幙">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">闀�: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="town" placeholder="璇疯緭鍏ラ晣">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">璇︾粏鍦板潃: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="addr" placeholder="璇疯緭鍏ヨ缁嗗湴鍧�">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">闄勪欢: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="files" placeholder="璇疯緭鍏ラ檮浠�">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">鐘舵��: </label>
- <div class="layui-input-block">
- <select name="status">
- <option value="">璇烽�夋嫨鐘舵��</option>
- <option value="1">姝e父</option>
- <option value="0">绂佺敤</option>
- </select>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">娣诲姞浜哄憳: </label>
- <div class="layui-input-block cool-auto-complete">
- <input class="layui-input" name="createBy" placeholder="璇疯緭鍏ユ坊鍔犱汉鍛�" style="display: none">
- <input id="createBy$" name="createBy$" 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="userQueryBycreateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
- <select class="cool-auto-complete-window-select" data-key="userQueryBycreateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
- </select>
- </div>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">娣诲姞鏃堕棿: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="createTime" id="createTime$" placeholder="璇疯緭鍏ユ坊鍔犳椂闂�">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">淇敼浜哄憳: </label>
- <div class="layui-input-block cool-auto-complete">
- <input class="layui-input" name="updateBy" placeholder="璇疯緭鍏ヤ慨鏀逛汉鍛�" style="display: none">
- <input id="updateBy$" name="updateBy$" 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="userQueryByupdateBy" onkeyup="autoLoad(this.getAttribute('data-key'))">
- <select class="cool-auto-complete-window-select" data-key="userQueryByupdateBySelect" onchange="confirmed(this.getAttribute('data-key'))" multiple="multiple">
- </select>
- </div>
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">淇敼鏃堕棿: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="updateTime" id="updateTime$" placeholder="璇疯緭鍏ヤ慨鏀规椂闂�">
- </div>
- </div>
- <div class="layui-form-item">
- <label class="layui-form-label">娉ㄩ噴: </label>
- <div class="layui-input-block">
- <input class="layui-input" name="memo" placeholder="璇疯緭鍏ユ敞閲�">
- </div>
- </div>
-
- </div>
+ </div>
</div>
<hr class="layui-bg-gray">
<div class="layui-form-item text-right">
--
Gitblit v1.9.1