Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
h5
/
account
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit f0686a38
authored
Mar 31, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.7.0' into 'master'
合并V3.7.0 See merge request
!48
2 parents
6fd1106a
92cdb9bf
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
197 additions
and
27 deletions
html/employee/add.html
html/employee/detail.html
html/employee/index.html
html/merchant/add.html
html/merchant/addSubMerchant.html
html/merchant/edit.html
html/merchant/index.html
html/employee/add.html
View file @
f0686a3
...
@@ -357,20 +357,25 @@
...
@@ -357,20 +357,25 @@
selected
:
true
,
selected
:
true
,
data
:
[
data
:
[
{
{
name
:
'1.0车损升级'
,
name
:
'精品升级(太阳膜)'
,
value
:
'0'
},
{
name
:
'1.1精品升级'
,
value
:
'1'
value
:
'1'
},
},
{
{
name
:
'
1.2膨胀金活动
'
,
name
:
'
次新车转化(车衣、改色膜)
'
,
value
:
'
2
'
value
:
'
4
'
},
},
{
{
name
:
'
1.3
众筹活动'
,
name
:
'
售后
众筹活动'
,
value
:
'3'
value
:
'3'
},
{
name
:
'会员权益/升级'
,
value
:
'0'
},
{
name
:
'膨胀金活动'
,
value
:
'2'
}
}
],
],
on
:
function
(
data
)
{
on
:
function
(
data
)
{
...
@@ -560,7 +565,7 @@
...
@@ -560,7 +565,7 @@
}
}
var
params
=
helper
.
clone
(
true
,
data
.
field
,
otherParams
)
var
params
=
helper
.
clone
(
true
,
data
.
field
,
otherParams
)
delete
params
.
merhcnatImg
delete
params
.
merhcnatImg
console
.
log
(
params
)
params
.
createdSource
=
1
request
(
params
,
function
(
result
)
{
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
if
(
result
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
...
html/employee/detail.html
View file @
f0686a3
...
@@ -411,16 +411,19 @@
...
@@ -411,16 +411,19 @@
employeeData
.
staffLabel
.
map
((
item
,
index
)
=>
{
employeeData
.
staffLabel
.
map
((
item
,
index
)
=>
{
switch
(
item
)
{
switch
(
item
)
{
case
'0'
:
case
'0'
:
employeeData
.
staffLabel
[
index
]
=
'
1.0车损
升级'
employeeData
.
staffLabel
[
index
]
=
'
会员权益/
升级'
break
break
case
'1'
:
case
'1'
:
employeeData
.
staffLabel
[
index
]
=
'
1.1精品升级
'
employeeData
.
staffLabel
[
index
]
=
'
精品升级(太阳膜)
'
break
break
case
'2'
:
case
'2'
:
employeeData
.
staffLabel
[
index
]
=
'
1.2
膨胀金活动'
employeeData
.
staffLabel
[
index
]
=
'膨胀金活动'
break
break
case
'3'
:
case
'3'
:
employeeData
.
staffLabel
[
index
]
=
'1.3众筹活动'
employeeData
.
staffLabel
[
index
]
=
'售后众筹活动'
break
case
'4'
:
employeeData
.
staffLabel
[
index
]
=
'次新车转化(车衣、改色膜)'
break
break
default
:
default
:
employeeData
.
staffLabel
[
index
]
=
'无'
employeeData
.
staffLabel
[
index
]
=
'无'
...
...
html/employee/index.html
View file @
f0686a3
...
@@ -88,6 +88,18 @@
...
@@ -88,6 +88,18 @@
class=
"layui-input updateCircleAngle"
/>
class=
"layui-input updateCircleAngle"
/>
</div>
</div>
</div>
</div>
<div
id=
"from"
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
来源:
</label>
<div
class=
"layui-input-inline"
style=
"width: 246px"
>
<select
name=
"createdSource"
id=
"searchfrom"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
账户中心
</option>
<option
value=
"2"
>
SCRM
</option>
<option
value=
"3"
>
生意助手
</option>
<option
value=
"4"
>
门店助手
</option>
</select>
</div>
</div>
<div
class=
"layui-inline"
style=
"float: right"
pane
>
<div
class=
"layui-inline"
style=
"float: right"
pane
>
<button
type=
"button"
class=
"layui-btn layui-btn-normal exportInputBtn"
id=
"employeeExport"
>
导出
</button>
<button
type=
"button"
class=
"layui-btn layui-btn-normal exportInputBtn"
id=
"employeeExport"
>
导出
</button>
<button
id=
"employeeReset"
class=
"layui-btn"
>
重置
</button>
<button
id=
"employeeReset"
class=
"layui-btn"
>
重置
</button>
...
@@ -143,6 +155,8 @@
...
@@ -143,6 +155,8 @@
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
,
width
:
80
},
{
field
:
'statusName'
,
title
:
'状态'
,
align
:
'center'
,
width
:
80
},
{
field
:
'createdAccount'
,
title
:
'创建者'
,
align
:
'center'
},
{
field
:
'createdAccount'
,
title
:
'创建者'
,
align
:
'center'
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
align
:
'center'
,
width
:
160
},
{
field
:
'merchantName'
,
title
:
'商户名(商户号)'
,
align
:
'center'
,
width
:
160
},
{
field
:
'createdSourceStr'
,
title
:
'来源'
,
align
:
'center'
,
width
:
160
,
templet
:
'#sourceTpl'
,},
{
field
:
'createdTime'
,
title
:
'创建时间'
,
align
:
'center'
,
width
:
160
},
{
field
:
'updatedTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
90
},
{
field
:
'updatedTime'
,
title
:
'更新时间'
,
align
:
'center'
,
width
:
90
},
{
title
:
'操作'
,
width
:
160
,
align
:
'center'
,
toolbar
:
'#employeeBar'
},
{
title
:
'操作'
,
width
:
160
,
align
:
'center'
,
toolbar
:
'#employeeBar'
},
{
field
:
'statusName'
,
title
:
'启用开关'
,
width
:
85
,
templet
:
'#switchTpl'
,
unresize
:
true
}
{
field
:
'statusName'
,
title
:
'启用开关'
,
width
:
85
,
templet
:
'#switchTpl'
,
unresize
:
true
}
...
@@ -475,6 +489,7 @@
...
@@ -475,6 +489,7 @@
lay
-
filter
=
"sexDemo"
{{
d
.
status
==
0
?
'checked'
:
''
}}
>
lay
-
filter
=
"sexDemo"
{{
d
.
status
==
0
?
'checked'
:
''
}}
>
<
/div
>
<
/div
>
</script>
</script>
</body>
</body>
</html>
</html>
\ No newline at end of file
\ No newline at end of file
html/merchant/add.html
View file @
f0686a3
...
@@ -1017,7 +1017,33 @@
...
@@ -1017,7 +1017,33 @@
}
else
{
}
else
{
params
.
status
=
1
params
.
status
=
1
}
}
console
.
log
(
params
)
verifyMerchantName
(
params
.
merchantName
,
params
,
loading
)
layer
.
close
(
loading
)
return
false
})
function
verifyDialog
(
params
,
loading
){
// 验证商户名是否重复
layer
.
confirm
(
'商户名称已经被使用,是否确定继续使用'
,
{
title
:
"提示"
,
btn
:
[
'取消'
,
'确定'
]
//可以无限个按钮
,
btn2
:
function
(
index
,
layero
){
//按钮【按钮二】的回调
nextStepRequest
(
params
,
loading
)
}
},
function
(
index
,
layero
){
//按钮【按钮一】的回调
layer
.
close
(
index
);
layer
.
close
(
loading
)
})
}
function
nextStepRequest
(
params
,
loading
){
params
.
createdSource
=
1
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
close
(
loading
)
layer
.
close
(
loading
)
...
@@ -1050,12 +1076,25 @@
...
@@ -1050,12 +1076,25 @@
}
}
})
})
}
}
}
else
{
layer
.
close
(
loading
)
}
}
})
})
return
false
layer
.
close
(
loading
)
}
function
verifyMerchantName
(
name
,
paramsM
,
loading
){
var
params
=
{
method
:
'merchants.api.merchant.checkMerchantNameRepeat'
,
merchantName
:
paramsM
.
merchantName
}
request
(
params
,
function
(
res
)
{
if
(
res
&&
res
.
data
==
true
){
return
nextStepRequest
(
paramsM
,
loading
)
}
else
if
(
res
&&
res
.
data
==
false
){
return
verifyDialog
(
paramsM
,
loading
)
}
})
})
}
function
findId
(
nodeList
)
{
function
findId
(
nodeList
)
{
var
idList
=
[]
var
idList
=
[]
...
...
html/merchant/addSubMerchant.html
View file @
f0686a3
...
@@ -987,7 +987,6 @@
...
@@ -987,7 +987,6 @@
if
(
treeObj
)
{
if
(
treeObj
)
{
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
console
.
log
(
getCheckedKeys
)
getCheckedNodes
=
getCheckedNodes
.
filter
(
item
=>
item
.
children
)
getCheckedNodes
=
getCheckedNodes
.
filter
(
item
=>
item
.
children
)
merchantForm
.
merchantBrandList
=
getCheckedNodes
.
map
(
car
=>
{
merchantForm
.
merchantBrandList
=
getCheckedNodes
.
map
(
car
=>
{
let
merchantBrandId
=
[]
let
merchantBrandId
=
[]
...
@@ -1001,7 +1000,6 @@
...
@@ -1001,7 +1000,6 @@
merchantBrandId
merchantBrandId
}
}
})
})
console
.
log
(
merchantForm
.
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantForm
.
merchantBrandList
)
params
.
merchantBrandListJson
=
JSON
.
stringify
(
merchantForm
.
merchantBrandList
)
}
}
if
(
merchantForm
.
merchantFiles
.
length
)
{
if
(
merchantForm
.
merchantFiles
.
length
)
{
...
@@ -1029,7 +1027,16 @@
...
@@ -1029,7 +1027,16 @@
}
else
{
}
else
{
params
.
status
=
1
params
.
status
=
1
}
}
console
.
log
(
params
)
verifyMerchantName
(
params
.
merchantName
,
params
,
loading
)
layer
.
close
(
loading
)
return
false
})
function
nextStepRequest
(
params
,
loading
){
params
.
createdSource
=
1
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
close
(
loading
)
layer
.
close
(
loading
)
...
@@ -1063,12 +1070,40 @@
...
@@ -1063,12 +1070,40 @@
}
}
})
})
}
}
}
else
{
}
})
layer
.
close
(
loading
)
layer
.
close
(
loading
)
}
}
function
verifyMerchantName
(
name
,
paramsM
,
loading
){
var
params
=
{
method
:
'merchants.api.merchant.checkMerchantNameRepeat'
,
merchantName
:
paramsM
.
merchantName
}
request
(
params
,
function
(
res
)
{
if
(
res
&&
res
.
data
==
true
){
return
nextStepRequest
(
paramsM
,
loading
)
}
else
if
(
res
&&
res
.
data
==
false
){
return
verifyDialog
(
paramsM
,
loading
)
}
})
})
return
false
}
function
verifyDialog
(
params
,
loading
){
// 验证商户名是否重复
layer
.
confirm
(
'商户名称已经被使用,是否确定继续使用'
,
{
title
:
"提示"
,
btn
:
[
'取消'
,
'确定'
]
//可以无限个按钮
,
btn2
:
function
(
index
,
layero
){
//按钮【按钮二】的回调
nextStepRequest
(
params
,
loading
)
}
},
function
(
index
,
layero
){
//按钮【按钮一】的回调
layer
.
close
(
index
);
layer
.
close
(
loading
)
})
})
}
function
findId
(
nodeList
)
{
function
findId
(
nodeList
)
{
var
idList
=
[]
var
idList
=
[]
...
@@ -1115,7 +1150,6 @@
...
@@ -1115,7 +1150,6 @@
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
var
municipality
=
municipalities
.
find
(
item
=>
item
==
provinceIdx
)
if
(
municipality
)
{
if
(
municipality
)
{
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
console
.
log
(
cityIdx
)
if
(
municipality
===
'重庆市'
)
{
if
(
municipality
===
'重庆市'
)
{
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
=
provincecode
.
slice
(
0
,
4
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
provincecode
==
5001
?
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'城区'
)
:
(
cityIdx
=
cityIdx
.
slice
(
0
,
2
)
+
'郊县'
)
...
...
html/merchant/edit.html
View file @
f0686a3
...
@@ -367,7 +367,7 @@
...
@@ -367,7 +367,7 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
商户名称:
</label>
<label
class=
"layui-form-label required"
>
商户名称:
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input
disabled"
maxlength=
"50"
name=
"merchantName"
disabled
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
<input
class=
"layui-input
"
maxlength=
"50"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -792,7 +792,6 @@
...
@@ -792,7 +792,6 @@
focusElem
.
css
(
verifyType
==
'radio'
?
{
color
:
''
}
:
{
'border-color'
:
''
})
focusElem
.
css
(
verifyType
==
'radio'
?
{
color
:
''
}
:
{
'border-color'
:
''
})
})
})
.
focus
()
.
focus
()
console
.
log
(
222
)
return
'必填项不能为空'
return
'必填项不能为空'
}
}
}
}
...
@@ -915,6 +914,7 @@
...
@@ -915,6 +914,7 @@
// if (treeObj) merchantForm.merchantBrandMain = treeObj.getCheckedNodes(true)
// if (treeObj) merchantForm.merchantBrandMain = treeObj.getCheckedNodes(true)
// params.merchantBrandMain = findId(merchantForm.merchantBrandMain).join(',')
// params.merchantBrandMain = findId(merchantForm.merchantBrandMain).join(',')
if
(
treeObj
)
{
if
(
treeObj
)
{
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
let
getCheckedNodes
=
treeObj
.
getCheckedNodes
(
true
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
const
getCheckedKeys
=
treeObj
.
getCheckedNodes
(
true
).
map
(
item
=>
item
.
id
)
// getCheckedNodes = getCheckedNodes.filter(item => item.children)
// getCheckedNodes = getCheckedNodes.filter(item => item.children)
...
@@ -923,6 +923,7 @@
...
@@ -923,6 +923,7 @@
let
parent
=
childCheckNodes
.
map
(
item
=>
{
let
parent
=
childCheckNodes
.
map
(
item
=>
{
return
item
.
getParentNode
()
return
item
.
getParentNode
()
})
})
parent
=
parent
.
filter
(
item
=>
item
!==
null
)
const
removeDuplicateObj
=
arr
=>
{
const
removeDuplicateObj
=
arr
=>
{
let
obj
=
{}
let
obj
=
{}
arr
=
arr
.
reduce
((
newArr
,
next
)
=>
{
arr
=
arr
.
reduce
((
newArr
,
next
)
=>
{
...
@@ -969,7 +970,22 @@
...
@@ -969,7 +970,22 @@
}
else
{
}
else
{
params
.
status
=
1
params
.
status
=
1
}
}
console
.
log
(
params
)
verifyMerchantName
(
params
.
merchantName
,
params
)
// request(params, function (res) {
// if (res.code == '0') {
// layer.msg('操作成功', {
// icon: 1
// })
// if (!functionClick) {
// go('merchant', 'index')
// }
// }
// })
return
false
})
function
nextStepRequest
(
params
){
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
@@ -980,8 +996,38 @@
...
@@ -980,8 +996,38 @@
}
}
}
}
})
})
return
false
}
function
verifyDialog
(
params
){
// 验证商户名是否重复
layer
.
confirm
(
'商户名称已经被使用,是否确定继续使用'
,
{
title
:
"提示"
,
btn
:
[
'取消'
,
'确定'
]
//可以无限个按钮
,
btn2
:
function
(
index
,
layero
){
//按钮【按钮二】的回调
nextStepRequest
(
params
)
}
},
function
(
index
,
layero
){
//按钮【按钮一】的回调
layer
.
close
(
index
);
})
})
}
function
verifyMerchantName
(
name
,
paramsM
){
var
params
=
{
method
:
'merchants.api.merchant.checkMerchantNameRepeat'
,
merchantName
:
paramsM
.
merchantName
}
request
(
params
,
function
(
res
)
{
if
(
res
&&
res
.
data
==
true
){
return
nextStepRequest
(
paramsM
)
}
else
if
(
res
&&
res
.
data
==
false
){
return
verifyDialog
(
paramsM
)
}
})
}
function
findId
(
nodeList
)
{
function
findId
(
nodeList
)
{
var
idList
=
[]
var
idList
=
[]
...
...
html/merchant/index.html
View file @
f0686a3
...
@@ -220,6 +220,16 @@
...
@@ -220,6 +220,16 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
id=
"from"
class=
"layui-inline"
>
<label
class=
"layui-form-label"
>
来源:
</label>
<div
class=
"layui-input-inline"
style=
"width: 246px"
>
<select
name=
"createdSource"
id=
"searchfrom"
>
<option
value=
""
>
全部
</option>
<option
value=
"1"
>
账户中心
</option>
<option
value=
"3"
>
生意助手
</option>
</select>
</div>
</div>
<div
class=
"layui-inline searchInputBtn"
style=
"float: right;"
>
<div
class=
"layui-inline searchInputBtn"
style=
"float: right;"
>
<button
class=
"layui-btn"
id=
"merchantReset"
>
重置
</button>
<button
class=
"layui-btn"
id=
"merchantReset"
>
重置
</button>
...
@@ -403,6 +413,24 @@
...
@@ -403,6 +413,24 @@
// width: 160
// width: 160
},
},
{
{
field
:
'createdSourceStr'
,
title
:
'来源'
,
align
:
'center'
,
width
:
120
},
{
field
:
'createdAccount'
,
title
:
'创建人'
,
align
:
'center'
,
width
:
120
},
{
field
:
'createdTime'
,
title
:
'创建时间'
,
align
:
'center'
,
width
:
120
},
{
field
:
'updatedTime'
,
field
:
'updatedTime'
,
title
:
'更新时间'
,
title
:
'更新时间'
,
align
:
'center'
,
align
:
'center'
,
...
...
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment