Skip to content

Commit 2970ac5

Browse files
committed
增加客户管理界面
1 parent 9ed2224 commit 2970ac5

File tree

10 files changed

+838
-52
lines changed

10 files changed

+838
-52
lines changed

README.en.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@
2424

2525
---
2626

27-
# Copyright Declaration
28-
29-
Open source does not mean free of charge. GuanDianYun is released in accordance with the [GPL-3.0](https://gitee.com/o88o/psi/blob/master/LICENSE) open-source agreement and provides technical exchange and learning, but **it is strictly forbidden to modify and release the derived code as closed-source commercial software for sale!** If you need to use this product locally for any commercial purposes, **please contact the project leader for commercial authorization** to comply with the GPL agreement and ensure your normal use.
30-
31-
Help Manual - Is GuanDianYun free to use?
32-
* **Community Edition**: We promise that all open-source code has been, is now, and will be free for individual users to learn from, without any charge; it should be noted that the open-source agreement must be followed during the learning or use process.
33-
* **Commercial Edition**: If enterprises want to use it for their own purposes or for commercial use, they must choose the commercial authorization version, and we also accept customized development of the system according to individual/enterprise customer needs.
34-
35-
The GuanDianYun open-source team has the final interpretation right of this open-source agreement.
36-
3727
# I. About GuanDianYun
3828

3929
## 1.1 Introduction

README.es.md

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -24,16 +24,6 @@
2424

2525
---
2626

27-
# Declaración de derechos de autor
28-
29-
El código abierto no significa gratis, la nube de la tienda de gestión sigue publicando el acuerdo de código abierto [GPL-3.0](https://gitee.com/o88o/psi/blob/master/LICENSE) y proporciona la oportunidad de intercambiar y aprender técnicas, pero **absolutamente no se permite modificar y publicar el código derivado como software comercial de código cerrado!** Si necesita utilizar este producto localmente para cualquier comportamiento con características comerciales, **póngase en contacto con el líder del proyecto para obtener autorización comercial**, para cumplir con el acuerdo GPL y garantizar su uso normal.
30-
31-
¿El manual de ayuda de la nube de la tienda de gestión requiere un pago?
32-
* **Edición de la comunidad**: Prometemos que el código fuente de código abierto anteriormente, en la actualidad y en el futuro será gratuito para que los usuarios individuales lo aprendan, sin cargo alguno; lo que se debe tener en cuenta es que durante el aprendizaje o el uso es necesario cumplir con el acuerdo de código abierto.
33-
* **Edición comercial**: Si la empresa desea utilizarlo o comercializarlo, debe elegir la versión con autorización comercial, también aceptamos adecuadamente el desarrollo personalizado del sistema según las necesidades de los clientes individuales / empresariales;
34-
35-
El equipo de código abierto de la nube de la tienda de gestión tiene el derecho final de interpretación de este acuerdo de código abierto.
36-
3727
# I. Acerca de la nube de la tienda de gestión
3828

3929
## 1.1 Introducción

README.md

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -25,17 +25,6 @@
2525

2626
---
2727

28-
# 版权声明
29-
30-
开源不代表免费,管店云 遵循 [GPL-3.0](https://gitee.com/o88o/psi/blob/master/LICENSE) 开源协议发布,并提供技术交流学习,但**绝不允许修改后和衍生的代码做为闭源的商业软件发布和销售!** 如果需要将本产品在本地进行任何附带商业化性质行为使用,**请联系项目负责人进行商业授权**,以遵守 GPL 协议保证您的正常使用。
31-
32-
帮助手册——管店云 需要付费吗?
33-
* **社区版** :我们承诺之前、现在以及未来所有开源的源码免费供个人用户学习,不收取任何费用;需要注意的是,在学习或使用过程中需要遵守开源协议。
34-
* **商业版** :若企业想自用或商用,必须选择商业授权版本,我们也酌情接受根据个人/企业客户需求,进行系统的定制化开发;
35-
36-
37-
管店云 开源团队拥有对本开源协议的最终解释权。
38-
3928
# 一、 关于 管店云
4029

4130
## 1.1 介绍

pom.xml

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -238,27 +238,6 @@
238238
<version>5.2.3</version>
239239
</dependency>
240240

241-
<!-- https://mvnrepository.com/artifact/com.huifu.adapay.core/adapay-core-sdk -->
242-
<dependency>
243-
<groupId>com.huifu.adapay.core</groupId>
244-
<artifactId>adapay-core-sdk</artifactId>
245-
<version>1.2.10</version>
246-
</dependency>
247-
248-
<!-- https://mvnrepository.com/artifact/com.huifu.adapay/adapay-java-sdk -->
249-
<dependency>
250-
<groupId>com.huifu.adapay</groupId>
251-
<artifactId>adapay-java-sdk</artifactId>
252-
<version>1.2.10</version>
253-
</dependency>
254-
255-
<dependency>
256-
<groupId>com.huifu.adapay</groupId>
257-
<artifactId>adapay-sdk-merchant</artifactId>
258-
<version>1.2.7</version>
259-
<scope>system</scope>
260-
<systemPath>D:/eclipse/Workspaces/Oomph/psi-common/src/main/resources/lib/adapay-sdk-merchant-1.2.7.jar</systemPath>
261-
</dependency>
262241
<dependency>
263242
<groupId>org.apache.httpcomponents</groupId>
264243
<artifactId>httpclient</artifactId>
Lines changed: 200 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,200 @@
1+
<input type="hidden" name="id" value="#(customerInfo.id??)">
2+
3+
<div class="row">
4+
5+
<div class="col">
6+
<ul class="nav nav-tabs" id="add-cust-tab">
7+
<li class="nav-item"><a class="nav-link active text-primary fw-bold" aria-current="page" href="javascript:void(0)">基础信息</a></li>
8+
</ul>
9+
</div>
10+
</div>
11+
12+
<div class="row mt-3">
13+
14+
<div class="col">
15+
<div class="input-group mb-3">
16+
<span class="input-group-text">客户名称<span class="text-danger">*</span></span>
17+
<input type="text" maxlength="30" class="form-control" name="name" id="customerInfo_name" placeholder="请输入客户名称"
18+
value="#(customerInfo.name??)">
19+
</div>
20+
</div>
21+
<div class="col">
22+
<div class="input-group mb-3">
23+
<span class="input-group-text">客户分类<span class="text-danger">*</span></span>
24+
<select class="form-select" name="customer_category_id" id="customerInfo_customer_category_id">
25+
#for(x : customerCategoryPage.list)
26+
<option value="#(x.id)" #if(customerInfo && x.id == customerInfo.customer_category_id) selected #end>#(x.name)</option>
27+
#end
28+
</select>
29+
#if(session.hasOper(Permissions.sale_customer_category_create))
30+
<button type="button" class="btn btn-sm btn-outline-primary" onclick="customerInfo.addCustomerCategory();">新建分类</button>
31+
#end
32+
</div>
33+
</div>
34+
35+
</div>
36+
37+
<div class="row">
38+
<div class="col-6">
39+
<div class="input-group mb-3">
40+
<span class="input-group-text">所属业务员</span>
41+
<input type="hidden" name="handler_id" #if(customerInfo) value="#(customerInfo.handler_id??)" #else value="#(session.tenantAdminId)" #end >
42+
<input type="text" placeholder="选择业务员" name="handler_keyword" #if(customerInfo) value="#(customerInfo.handler.real_name??)" #else value="#(session.realName)" #end autocomplete="off" #if(!customerInfo || session.tenantAdminId == customerInfo.handler_id?? || session.hasOper(Permissions.sale_customer_info_updateSaleman)) class="form-control" #else class="form-control input-readonly" readonly #end>
43+
</div>
44+
</div>
45+
46+
</div>
47+
48+
<div class="row">
49+
<div class="col">
50+
<div class="input-group mb-3">
51+
<span class="input-group-text">价格等级</span>
52+
<select class="form-select" name="customer_price_level_id" id="customerInfo_customer_price_level_id">
53+
#for(x : priceLevelPage.list)
54+
<option value="#(x.id)" #if(customerInfo && x.id == customerInfo.customer_price_level_id) selected #end>#(x.name)</option>
55+
#end
56+
</select>
57+
</div>
58+
</div>
59+
<div class="col">
60+
<div class="input-group mb-3">
61+
<span class="input-group-text">专属折扣</span>
62+
<input type="text" class="form-control" name="discount" placeholder="请输入优惠折扣" #if(customerInfo && customerInfo.discount) value="#number(customerInfo.discount*10,"#.##")" #end id="customerInfo_discount" onclick="$(this).select();"> <span class="input-group-text"></span>
63+
</div>
64+
</div>
65+
66+
</div>
67+
68+
<div class="row">
69+
<div class="col">
70+
<div class="input-group mb-3">
71+
<span class="input-group-text">联系电话</span> <input type="text" class="form-control" placeholder="请输入手机号" value="#(customerInfo.mobile??)" name="mobile" id="customerInfo_mobile">
72+
</div>
73+
</div>
74+
<div class="col">
75+
<div class="input-group mb-3">
76+
<span class="input-group-text">联系人</span> <input type="text" class="form-control" placeholder="请输入联系人" value="#(customerInfo.contact??)" name="contact" id="customerInfo_contact">
77+
</div>
78+
</div>
79+
</div>
80+
81+
82+
<div class="row">
83+
<div class="col">
84+
<div class="input-group mb-3">
85+
<span class="input-group-text">结算方式</span>
86+
<select class="form-select" name="pay_type" id="customerInfo_pay_type">
87+
#for(x : SalePayTypeEnum)
88+
<option value="#(x.value.value)" #if(customerInfo && customerInfo.pay_type == x.value.value) selected #end>#(x.value.name)</option>
89+
#end
90+
</select>
91+
</div>
92+
</div>
93+
<div class="col">
94+
<div class="input-group mb-3">
95+
<span class="input-group-text">结算账期</span>
96+
<input type="number" class="form-control" placeholder="请输入结算的账期" value="#(customerInfo.pay_day??0)" name="pay_day" id="customerInfo_pay_day" onclick="$(this).select();">
97+
<span class="input-group-text"></span>
98+
</div>
99+
</div>
100+
</div>
101+
102+
<div class="row">
103+
<div class="col">
104+
<div class="input-group mb-3">
105+
<span class="input-group-text">收货地址</span>
106+
<input type="text" class="form-control" placeholder="请输入详细地址" value="#(customerInfo.address??)" name="address" id="customerInfo_address">
107+
</div>
108+
</div>
109+
</div>
110+
111+
<div class="row">
112+
113+
<div class="col">
114+
<ul class="nav nav-tabs">
115+
<li class="nav-item"><a class="nav-link active text-secondary fw-bold" aria-current="page" href="javascript:void(0)">辅助信息</a></li>
116+
</ul>
117+
</div>
118+
</div>
119+
120+
<div class="row mt-3">
121+
122+
<div class="col">
123+
<div class="input-group mb-3">
124+
<span class="input-group-text">开户银行</span> <input type="text" class="form-control" placeholder="请输入开户银行" value="#(customerInfo.bank_name??)" name="bank_name" id="customerInfo_bank_name">
125+
</div>
126+
</div>
127+
<div class="col">
128+
<div class="input-group mb-3">
129+
<span class="input-group-text">银行账号</span> <input type="text" class="form-control" placeholder="请输入银行账号" value="#(customerInfo.bank_no??)" name="bank_no" id="customerInfo_bank_no">
130+
</div>
131+
</div>
132+
133+
</div>
134+
135+
<div class="row">
136+
137+
<div class="col">
138+
<div class="input-group mb-3">
139+
<span class="input-group-text">生日</span> <input type="text" class="form-control" placeholder="请输入生日" value="#(customerInfo.birthday??)" name="birthday" onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd'})">
140+
</div>
141+
</div>
142+
<div class="col">
143+
<div class="input-group mb-3">
144+
<span class="input-group-text">微信号</span> <input type="text" class="form-control" placeholder="请输入微信号" value="#(customerInfo.wechat??)" name="wechat" >
145+
</div>
146+
</div>
147+
148+
</div>
149+
150+
151+
<div class="row">
152+
153+
<div class="col">
154+
<div class="input-group mb-3">
155+
<span class="input-group-text">来源渠道</span> <input type="text" class="form-control" placeholder="请输入客户的来源渠道" value="#(customerInfo.source_channel??)" name="source_channel" >
156+
</div>
157+
</div>
158+
<div class="col">
159+
<div class="input-group mb-3">
160+
<span class="input-group-text">备注</span>
161+
<input type="text" class="form-control" placeholder="请输入备注" value="#(customerInfo.remark??)" name="remark" >
162+
</div>
163+
</div>
164+
165+
</div>
166+
167+
<script type="application/javascript">
168+
169+
customerInfo.formChecking = function() {
170+
if($.trim($("#customerInfo_name").val()) == '') {
171+
beekit.tips('客户名称不能为空!', '#customerInfo_name');
172+
$("#customerInfo_name").focus();
173+
return false;
174+
}
175+
if($.trim($("#customerInfo_name").val()).length > 30) {
176+
beekit.tips('客户名称不能过长!', '#customerInfo_name');
177+
$("#customerInfo_name").focus();
178+
return false;
179+
}
180+
if($.trim($("#customerInfo_customer_category_id").val()) == '') {
181+
beekit.tips('必须选择客户分类!', '#customerInfo_customer_category_id');
182+
$("#customerInfo_customer_category_id").focus();
183+
return false;
184+
}
185+
186+
return true;
187+
};
188+
189+
customerInfo.addCustomerCategory = function() {
190+
beekit.modalChild("/sale/customer/category/add?sourcePage=customerFormPage");
191+
};
192+
193+
customerInfo.handlerList = function(formId) {
194+
var inputKeyword = $(formId).find("input[name=handler_keyword]").first();
195+
var inputId = $(formId).find("input[name=handler_id]").first();
196+
beekit.autocomplete(inputKeyword, "/setting/tenant/admin/listByJson", inputId);
197+
};
198+
199+
200+
</script>
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered modal-lg">
2+
<div class="modal-content">
3+
<div class="modal-header">
4+
<h6 class="modal-title">新增客户</h6>
5+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
6+
</div>
7+
<div class="modal-body">
8+
<form id="customerInfo-add-form" onsubmit="customerInfo.create();return false;">
9+
#include("_form.html")
10+
</form>
11+
</div>
12+
<div class="modal-footer">
13+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-label="Close">关闭</button>
14+
<button type="button" class="btn btn-primary" onclick="customerInfo.create();">保存</button>
15+
</div>
16+
</div>
17+
</div>
18+
19+
<script type="application/javascript">
20+
$(function() {
21+
// 初始化bootstrap相关组件
22+
common.initBootstrap();
23+
24+
var formId = "#customerInfo-add-form";
25+
26+
setTimeout(function() {
27+
customerInfo.handlerList(formId);
28+
29+
formInput.listenkeyUp(formId);
30+
31+
$("#customerInfo_name").focus();
32+
}, 500);
33+
34+
});
35+
36+
customerInfo.create = function() {
37+
var result = customerInfo.formChecking();
38+
if(!result) {
39+
return;
40+
}
41+
beekit.ajaxPost("/sale/customer/info/create", $("#customerInfo-add-form").serialize(), function(ret) {
42+
common.processRequestResult(ret, function(ret) {
43+
beekit.msg(ret);
44+
if (ret.state == "ok") {
45+
beekit.modalClose();
46+
customerInfo.list(ret.targetId);
47+
}
48+
});
49+
});
50+
};
51+
52+
</script>
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
<div class="modal-dialog modal-dialog-scrollable modal-dialog-centered modal-lg">
2+
<div class="modal-content">
3+
<div class="modal-header">
4+
<h6 class="modal-title">编辑客户</h6>
5+
<button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
6+
</div>
7+
<div class="modal-body">
8+
<form id="customerInfo-edit-form" onsubmit="customerInfo.update();return false;">
9+
#include("_form.html")
10+
</form>
11+
</div>
12+
<div class="modal-footer">
13+
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal" aria-label="Close">关闭</button>
14+
<button type="button" class="btn btn-primary" onclick="customerInfo.update();">保存</button>
15+
</div>
16+
</div>
17+
</div>
18+
19+
<script type="application/javascript">
20+
$(function() {
21+
// 初始化bootstrap相关组件
22+
common.initBootstrap();
23+
24+
var formId = "#customerInfo-edit-form";
25+
26+
setTimeout(function() {
27+
customerInfo.handlerList(formId);
28+
29+
formInput.listenkeyUp(formId);
30+
31+
}, 500);
32+
33+
});
34+
35+
customerInfo.update = function() {
36+
var result = customerInfo.formChecking();
37+
if(!result) {
38+
return;
39+
}
40+
beekit.ajaxPost("/sale/customer/info/update", $("#customerInfo-edit-form").serialize(), function(ret) {
41+
common.processRequestResult(ret, function(ret) {
42+
beekit.msg(ret);
43+
if (ret.state == "ok") {
44+
beekit.modalClose();
45+
customerInfo.list(#(customerInfo.id));
46+
}
47+
});
48+
});
49+
};
50+
51+
</script>

0 commit comments

Comments
 (0)