Skip to content

Commit 57d7baf

Browse files
客户管理功能整改,支持动态加载数据权限
1 parent 42fae06 commit 57d7baf

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

44 files changed

+786
-361
lines changed

base-server/.gitignore

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
*.class
2+
3+
# Package Files #
4+
*.war
5+
*.ear
6+
7+
class
8+
.settings
9+
*.classpath
10+
/bin
11+
classes
12+
/target/
13+
/.project/
14+
/logs/
15+
/.idea/
16+
*.iml

base-server/pom.xml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
5+
<parent>
6+
<artifactId>skyeye-web</artifactId>
7+
<groupId>com.skyeye.web</groupId>
8+
<version>1-SNAPSHOT</version>
9+
</parent>
10+
<modelVersion>4.0.0</modelVersion>
11+
12+
<artifactId>base-server</artifactId>
13+
14+
<properties>
15+
<maven.compiler.source>8</maven.compiler.source>
16+
<maven.compiler.target>8</maven.compiler.target>
17+
</properties>
18+
19+
</project>

crm/src/main/resources/template/js/crmCustomerContact/crmCustomerContactAdd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,9 @@ layui.config({
4444
// 客户选择
4545
$("body").on("click", "#customMationSel", function (e) {
4646
_openNewWindows({
47-
url: "../../tpl/customermanage/customerChoose.html",
47+
url: "../../tpl/customerManage/customerChoose.html",
4848
title: "选择客户",
49-
pageId: "customerchooselist",
49+
pageId: "customerChoose",
5050
area: ['90vw', '90vh'],
5151
callBack: function (refreshCode) {
5252
$("#customName").val(customerMation.customName);

crm/src/main/resources/template/js/crmCustomerContact/crmCustomerContactEdit.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,10 +62,10 @@ layui.config({
6262

6363
// 客户选择
6464
$("body").on("click", "#customMationSel", function (e) {
65-
_openNewWindows({
66-
url: "../../tpl/customermanage/customerChoose.html",
67-
title: "选择客户",
68-
pageId: "customerchooselist",
65+
_openNewWindows({
66+
url: "../../tpl/customerManage/customerChoose.html",
67+
title: "选择客户",
68+
pageId: "customerChoose",
6969
area: ['90vw', '90vh'],
7070
callBack: function (refreshCode) {
7171
$("#customName").val(customerMation.customName);

crm/src/main/resources/template/js/crmOpportunity/crmopportunityadd.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -162,10 +162,10 @@ layui.config({
162162

163163
// 客户选择
164164
$("body").on("click", "#customMationSel", function (e) {
165-
_openNewWindows({
166-
url: "../../tpl/customermanage/customerChoose.html",
167-
title: "选择客户",
168-
pageId: "customerchooselist",
165+
_openNewWindows({
166+
url: "../../tpl/customerManage/customerChoose.html",
167+
title: "选择客户",
168+
pageId: "customerChoose",
169169
area: ['90vw', '90vh'],
170170
callBack: function (refreshCode) {
171171
$("#customName").val(customerMation.customName);

crm/src/main/resources/template/js/crmOpportunity/crmopportunityedit.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -214,10 +214,10 @@ layui.config({
214214

215215
// 客户选择
216216
$("body").on("click", "#customMationSel", function(e) {
217-
_openNewWindows({
218-
url: "../../tpl/customermanage/customerChoose.html",
217+
_openNewWindows({
218+
url: "../../tpl/customerManage/customerChoose.html",
219219
title: "选择客户",
220-
pageId: "customerchooselist",
220+
pageId: "customerChoose",
221221
area: ['90vw', '90vh'],
222222
callBack: function (refreshCode) {
223223
$("#customName").val(customerMation.customName);

crm/src/main/resources/template/js/crmcontractmanage/mycrmcontractadd.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,9 +65,9 @@ layui.config({
6565
//客户选择
6666
$("body").on("click", "#customMationSel", function (e) {
6767
_openNewWindows({
68-
url: "../../tpl/customermanage/customerChoose.html",
68+
url: "../../tpl/customerManage/customerChoose.html",
6969
title: "选择客户",
70-
pageId: "customerchooselist",
70+
pageId: "customerChoose",
7171
area: ['100vw', '100vh'],
7272
callBack: function (refreshCode) {
7373
$("#customName").val(customerMation.customName);

crm/src/main/resources/template/js/crmcontractmanage/mycrmcontractedit.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -98,9 +98,9 @@ layui.config({
9898
// 客户选择
9999
$("body").on("click", "#customMationSel", function (e) {
100100
_openNewWindows({
101-
url: "../../tpl/customermanage/customerChoose.html",
101+
url: "../../tpl/customerManage/customerChoose.html",
102102
title: "选择客户",
103-
pageId: "customerchooselist",
103+
pageId: "customerChoose",
104104
area: ['100vw', '100vh'],
105105
callBack: function (refreshCode) {
106106
$("#customName").val(customerMation.customName);

crm/src/main/resources/template/js/customermanage/customeradd.js renamed to crm/src/main/resources/template/js/customerManage/customerAdd.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ layui.config({
7070
params.chargeUser = userList[0].id;
7171
}
7272

73-
AjaxPostUtil.request({url: flowableBasePath + "customer002", params: params, type: 'json', callback: function (json) {
73+
AjaxPostUtil.request({url: flowableBasePath + "writeCustomerMation", params: params, type: 'json', method: 'POST', callback: function (json) {
7474
parent.layer.close(index);
7575
parent.refreshCode = '0';
7676
}});

crm/src/main/resources/template/js/customermanage/customerChoose.js renamed to crm/src/main/resources/template/js/customerManage/customerChoose.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,9 +112,9 @@ layui.config({
112112
function details(data) {
113113
rowId = data.id;
114114
_openNewWindows({
115-
url: "../../tpl/customermanage/customerdetails.html",
115+
url: "../../tpl/customerManage/customerDetails.html",
116116
title: "客户详情",
117-
pageId: "customerdetails",
117+
pageId: "customerDetails",
118118
area: ['90vw', '90vh'],
119119
callBack: function (refreshCode) {
120120
}});

crm/src/main/resources/template/js/customermanage/customerdetails.js renamed to crm/src/main/resources/template/js/customerManage/customerDetails.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,12 @@ layui.config({
2828

2929
showGrid({
3030
id: "showForm",
31-
url: flowableBasePath + "customer005",
32-
params: {rowId: customerId},
31+
url: flowableBasePath + "queryCustomerMationById",
32+
params: {id: customerId},
3333
pagination: false,
34-
template: getFileContent('tpl/customermanage/customerdetailsTemplate.tpl'),
35-
ajaxSendLoadBefore: function(hdb) {
36-
},
34+
method: 'GET',
35+
template: $("#beanTemplate").html(),
36+
ajaxSendLoadBefore: function(hdb) {},
3737
ajaxSendAfter: function (json) {
3838
// 附件回显
3939
skyeyeEnclosure.showDetails({"enclosureUpload": json.bean.enclosureInfo});

crm/src/main/resources/template/js/customermanage/customeredit.js renamed to crm/src/main/resources/template/js/customerManage/customerEdit.js

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,16 +12,15 @@ layui.config({
1212
var index = parent.layer.getFrameIndex(window.name);
1313
var $ = layui.$,
1414
textool = layui.textool;
15-
var selectMust = getFileContent('tpl/template/select-option-must.tpl');
16-
15+
1716
showGrid({
1817
id: "showForm",
19-
url: flowableBasePath + "customer003",
20-
params: {rowId: parent.rowId},
18+
url: flowableBasePath + "queryCustomerMationById",
19+
params: {id: parent.rowId},
2120
pagination: false,
22-
template: getFileContent('tpl/customermanage/customereditTemplate.tpl'),
23-
ajaxSendLoadBefore: function(hdb) {
24-
},
21+
method: 'GET',
22+
template: $("#beanTemplate").html(),
23+
ajaxSendLoadBefore: function(hdb) {},
2524
ajaxSendAfter: function (json) {
2625
// 客户分类
2726
sysDictDataUtil.showDictDataListByDictTypeCode(sysDictData["crmCustomerType"]["key"], 'select', "typeId", json.bean.typeId, form);
@@ -50,7 +49,7 @@ layui.config({
5049
form.on('submit(formEditBean)', function (data) {
5150
if (winui.verifyForm(data.elem)) {
5251
var params = {
53-
rowId: parent.rowId,
52+
id: parent.rowId,
5453
name: $("#name").val(),
5554
combine: $("#combine").val(),
5655
typeId: $("#typeId").val(),
@@ -86,7 +85,7 @@ layui.config({
8685
params.chargeUser = userList[0].id;
8786
}
8887

89-
AjaxPostUtil.request({url: flowableBasePath + "customer004", params: params, type: 'json', callback: function (json) {
88+
AjaxPostUtil.request({url: flowableBasePath + "writeCustomerMation", params: params, type: 'json', method: 'POST', callback: function (json) {
9089
parent.layer.close(index);
9190
parent.refreshCode = '0';
9291
}});

crm/src/main/resources/template/js/customermanage/customerInternationalList.js renamed to crm/src/main/resources/template/js/customerManage/customerInternationalList.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,9 @@ layui.config({
7070
function details(data) {
7171
rowId = data.id;
7272
_openNewWindows({
73-
url: "../../tpl/customermanage/customerdetails.html",
73+
url: "../../tpl/customerManage/customerDetails.html",
7474
title: "客户详情",
75-
pageId: "customerdetails",
75+
pageId: "customerDetails",
7676
area: ['90vw', '90vh'],
7777
callBack: function (refreshCode) {
7878
}});

crm/src/main/resources/template/js/customermanage/customerlist.js renamed to crm/src/main/resources/template/js/customerManage/customerList.js

Lines changed: 12 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1+
12
var rowId = "";
2-
var searchType = "";
33

44
layui.config({
55
base: basePath,
@@ -13,16 +13,9 @@ layui.config({
1313
table = layui.table;
1414
// 新增
1515
authBtn('1570454924611');
16-
// 所有客户
17-
authBtn('1658637723975');
18-
// 我创建的
19-
authBtn('1658637741078');
20-
// 我负责的
21-
authBtn('1658637775025');
22-
23-
$("#typeBox").find('button').eq(0).addClass(' plan-select');
16+
// 加载列表数据权限
17+
loadAuthBtnGroup('messageTable', '1570455037177');
2418

25-
// 表格渲染
2619
table.render({
2720
id: 'messageTable',
2821
elem: '#messageTable',
@@ -45,7 +38,7 @@ layui.config({
4538
{ field: 'createTime', title: systemLanguage["com.skyeye.createTime"][languageType], align: 'center', width: 150 },
4639
{ field: 'lastUpdateName', title: systemLanguage["com.skyeye.lastUpdateName"][languageType], align: 'left', width: 120 },
4740
{ field: 'lastUpdateTime', title: systemLanguage["com.skyeye.lastUpdateTime"][languageType], align: 'center', width: 150 },
48-
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar'}
41+
{ title: systemLanguage["com.skyeye.operation"][languageType], fixed: 'right', align: 'center', width: 150, toolbar: '#tableBar' }
4942
]],
5043
done: function(json) {
5144
matchingLanguage();
@@ -70,9 +63,9 @@ layui.config({
7063
// 新增
7164
$("body").on("click", "#addBean", function() {
7265
_openNewWindows({
73-
url: "../../tpl/customermanage/customeradd.html",
66+
url: "../../tpl/customerManage/customerAdd.html",
7467
title: "新增客户",
75-
pageId: "customeradd",
68+
pageId: "customerAdd",
7669
area: ['90vw', '90vh'],
7770
callBack: function (refreshCode) {
7871
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
@@ -84,9 +77,9 @@ layui.config({
8477
function edit(data) {
8578
rowId = data.id;
8679
_openNewWindows({
87-
url: "../../tpl/customermanage/customeredit.html",
80+
url: "../../tpl/customerManage/customerEdit.html",
8881
title: "编辑客户",
89-
pageId: "customeredit",
82+
pageId: "customerEdit",
9083
area: ['90vw', '90vh'],
9184
callBack: function (refreshCode) {
9285
winui.window.msg(systemLanguage["com.skyeye.successfulOperation"][languageType], {icon: 1, time: 2000});
@@ -98,9 +91,9 @@ layui.config({
9891
function details(data) {
9992
rowId = data.id;
10093
_openNewWindows({
101-
url: "../../tpl/customermanage/customerdetails.html",
94+
url: "../../tpl/customerManage/customerDetails.html",
10295
title: systemLanguage["com.skyeye.detailsPageTitle"][languageType],
103-
pageId: "customerdetails",
96+
pageId: "customerDetails",
10497
area: ['90vw', '90vh'],
10598
callBack: function (refreshCode) {
10699
}});
@@ -117,15 +110,7 @@ layui.config({
117110
});
118111
}
119112

120-
$("body").on("click", ".type-btn", function (e) {
121-
$(".type-btn").removeClass("plan-select");
122-
$(this).addClass("plan-select");
123-
loadTable();
124-
});
125-
126113
form.render();
127-
128-
// 刷新数据
129114
$("body").on("click", "#reloadTable", function() {
130115
loadTable();
131116
});
@@ -135,10 +120,8 @@ layui.config({
135120
}
136121

137122
function getTableParams() {
138-
return $.extend(true, {
139-
type: $(".plan-select").data("type")
140-
}, initTableSearchUtil.getSearchValue("messageTable"));
123+
return $.extend(true, {}, initTableSearchUtil.getSearchValue("messageTable"));
141124
}
142125

143-
exports('customerlist', {});
126+
exports('customerList', {});
144127
});

crm/src/main/resources/template/tpl/customermanage/customeradd.html renamed to crm/src/main/resources/template/tpl/customerManage/customerAdd.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
<script src="../../assets/lib/layui/layui.js"></script>
186186
<script src="../../assets/lib/layui/custom.js"></script>
187187
<script type="text/javascript">
188-
layui.config({base: '../../js/customermanage/'}).use('customeradd');
188+
layui.config({base: '../../js/customerManage/'}).use('customerAdd');
189189
</script>
190190
</body>
191191
</html>

crm/src/main/resources/template/tpl/customermanage/customerChoose.html renamed to crm/src/main/resources/template/tpl/customerManage/customerChoose.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
<script src="../../assets/lib/layui/layui.js"></script>
4848
<script src="../../assets/lib/layui/custom.js"></script>
4949
<script type="text/javascript">
50-
layui.config({base: '../../js/customermanage/'}).use('customerChoose');
50+
layui.config({base: '../../js/customerManage/'}).use('customerChoose');
5151
</script>
5252
</body>
5353
</html>

0 commit comments

Comments
 (0)