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 b65c928a
authored
Aug 17, 2021
by
cwq0219
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
bug修复
1 parent
8e54d11b
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
70 additions
and
31 deletions
html/merchant/detail.html
html/merchant/edit.html
js/gtree.js
html/merchant/detail.html
View file @
b65c928
...
@@ -418,7 +418,13 @@
...
@@ -418,7 +418,13 @@
if
(
productData
.
products
&&
productData
.
products
.
lengt
!=
0
)
{
if
(
productData
.
products
&&
productData
.
products
.
lengt
!=
0
)
{
for
(
var
j
=
0
;
j
<
productData
.
products
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
productData
.
products
.
length
;
j
++
)
{
menuData
=
productData
.
products
[
j
]
menuData
=
productData
.
products
[
j
]
var
idList
=
menuData
.
menuIds
.
concat
(
menuData
.
functionIds
)
var
idList
=
''
// idList = menuData.menuIds.concat(menuData.functionIds)
if
(
menuData
.
menuIds
)
{
idList
=
menuData
.
menuIds
.
concat
(
menuData
.
functionIds
)
}
else
{
idList
=
menuData
.
functionIds
}
active
.
treeTabAdd
({
active
.
treeTabAdd
({
name
:
menuData
.
productName
,
name
:
menuData
.
productName
,
value
:
menuData
.
productId
value
:
menuData
.
productId
...
@@ -467,10 +473,13 @@
...
@@ -467,10 +473,13 @@
method
:
'cn.com.glsx.merchants.merchant.findMerchantTree'
method
:
'cn.com.glsx.merchants.merchant.findMerchantTree'
}
}
request
(
treeParams
,
function
(
res
)
{
request
(
treeParams
,
function
(
res
)
{
console
.
log
(
res
)
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
merchants
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
false
)
merchants
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
false
)
merchants
.
expandAll
(
true
)
merchants
.
expandAll
(
true
)
all_nodes
=
merchants
.
getNodes
()
all_nodes
=
merchants
.
getNodes
()
var
targetNode
=
merchants
.
getNodeByParam
(
'id'
,
merchantId
)
merchants
.
selectNode
(
targetNode
)
bindEvent
()
bindEvent
()
}
}
})
})
...
@@ -481,10 +490,13 @@
...
@@ -481,10 +490,13 @@
var
txt
=
$
(
'#treeInput'
).
val
()
var
txt
=
$
(
'#treeInput'
).
val
()
if
(
!
txt
)
{
if
(
!
txt
)
{
merchants
.
showNodes
(
all_nodes
)
merchants
.
showNodes
(
all_nodes
)
var
targetNode
=
merchants
.
getNodeByParam
(
'id'
,
merchantId
)
merchants
.
selectNode
(
all_nodes
[
0
])
}
else
{
}
else
{
var
show_nodes
=
merchants
.
getNodesByParamFuzzy
(
'label'
,
txt
)
var
show_nodes
=
merchants
.
getNodesByParamFuzzy
(
'label'
,
txt
)
merchants
.
hideNodes
(
all_nodes
)
merchants
.
hideNodes
(
all_nodes
)
merchants
.
showNodes
(
show_nodes
)
merchants
.
showNodes
(
show_nodes
)
merchants
.
selectNode
(
show_nodes
[
0
])
}
}
})
})
return
false
return
false
...
...
html/merchant/edit.html
View file @
b65c928
...
@@ -130,10 +130,13 @@
...
@@ -130,10 +130,13 @@
<form
class=
"layui-form"
lay-filter=
"merchantForm"
>
<form
class=
"layui-form"
lay-filter=
"merchantForm"
>
<div
class=
"layui-form-item edit-title"
style=
"position: relative;"
>
<div
class=
"layui-form-item edit-title"
style=
"position: relative;"
>
<div
class=
"layui-input-inline"
>
企业基本信息
</div>
<div
class=
"layui-input-inline"
>
企业基本信息
</div>
<div
class=
"layui-input-inline"
style=
"position: absolute; right: 0; top: 5px; font-size: normal;"
>
<div
class=
"layui-input-item"
style=
"position: absolute; right: 0; top: 5px; font-size: normal;"
>
<label
class=
"layui-form-label"
>
渠道:
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"channelEl"
name=
"channelId"
></select>
<select
id=
"channelEl"
name=
"channelId"
></select>
</div>
</div>
</div>
</div>
</div>
<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"
>
...
@@ -142,7 +145,7 @@
...
@@ -142,7 +145,7 @@
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
></label>
<label
class=
"layui-form-label"
>
商户简称:
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
maxlength=
"15"
name=
"merchantAbbreviation"
placeholder=
"请输入商户简称"
>
<input
class=
"layui-input"
maxlength=
"15"
name=
"merchantAbbreviation"
placeholder=
"请输入商户简称"
>
</div>
</div>
...
@@ -150,14 +153,14 @@
...
@@ -150,14 +153,14 @@
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
商户类型:
</label>
<label
class=
"layui-form-label"
>
商户类型:
</label>
<div
class=
"layui-input-inline"
style=
"width: 100px; margin: 0;"
>
<div
class=
"layui-input-inline"
style=
"width: 100px; margin: 0;"
>
<select
name=
"merchantType"
id=
"merchantTypeEl"
>
<select
name=
"merchantType"
id=
"merchantTypeEl"
lay-filter=
"merchantTypeFilter"
>
<option
value=
"1"
>
个人
</option>
<option
value=
"1"
>
个人
</option>
<option
value=
"2"
>
企业
</option>
<option
value=
"2"
>
企业
</option>
</select>
</select>
</div>
</div>
<div
class=
"layui-input-inline"
style=
"width: 220px;"
>
<div
class=
"layui-input-inline"
style=
"width: 220px;"
>
<input
class=
"layui-input"
maxlength=
"50"
lay-verify=
"merchantOrgcode"
name=
"merchantOrgcode"
<input
class=
"layui-input"
maxlength=
"50"
lay-verify=
"merchantOrgcode"
name=
"merchantOrgcode"
placeholder=
"请输入组织机构
号码"
>
id=
"merchantOrgcodeEl"
placeholder=
"请输入身份证
号码"
>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
...
@@ -290,13 +293,6 @@
...
@@ -290,13 +293,6 @@
<div
class=
"m-t-10"
id=
"parentName"
></div>
<div
class=
"m-t-10"
id=
"parentName"
></div>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
账户类型:
</label>
<div
class=
"layui-input-inline"
>
<!-- <input class="layui-input layui-btn-disabled" name="parentAccountTypeName" placeholder="请输入账户类型"> -->
<div
class=
"m-t-10"
id=
"parentAccountTypeName"
></div>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
...
@@ -474,12 +470,14 @@
...
@@ -474,12 +470,14 @@
// console.log(validator.PHONEREG)
// console.log(validator.PHONEREG)
// 校验
// 校验
form
.
verify
({
form
.
verify
({
// merchantOrgcode: function (value) {
merchantOrgcode
:
function
(
value
)
{
// var merchantType = $('#merchantTypeEl option:selected').val()
var
merchantType
=
$
(
'#merchantTypeEl option:selected'
).
val
()
// if(value && (merchantType == '1') && !validator.checkIdCard(value)) {
if
(
value
)
{
// return '请填入正确的身份证'
if
((
merchantType
==
1
)
&&
!
validator
.
checkIdCard
(
value
))
{
// }
return
'请填入正确的身份证'
// },
}
}
},
merchantLoginAccount
:
function
(
value
)
{
merchantLoginAccount
:
function
(
value
)
{
if
(
value
&&
value
.
length
<
3
)
{
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
return
'登录账户名请填入3-15位字符'
...
@@ -497,6 +495,14 @@
...
@@ -497,6 +495,14 @@
}
}
})
})
form
.
on
(
'select(merchantTypeFilter)'
,
function
(
data
)
{
if
(
data
.
value
==
1
)
{
$
(
'#merchantOrgcodeEl'
).
attr
(
'placeholder'
,
'请输入身份证号码'
)
}
else
{
$
(
'#merchantOrgcodeEl'
).
attr
(
'placeholder'
,
'请输入组织机构号码'
)
}
})
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
// console.log(editLevel)
// console.log(editLevel)
// console.log(data.field)
// console.log(data.field)
...
@@ -732,11 +738,6 @@
...
@@ -732,11 +738,6 @@
}
}
})
})
// console.log($('#merchantTypeEl'))
// $('#merchantTypeEl').on('change', function() {
// console.log('?????????????')
// })
$
(
'.upload'
).
on
(
'change'
,
function
(
e
)
{
$
(
'.upload'
).
on
(
'change'
,
function
(
e
)
{
// console.log(e)
// console.log(e)
var
idx
=
$
(
this
).
data
(
'idx'
)
var
idx
=
$
(
this
).
data
(
'idx'
)
...
@@ -788,6 +789,12 @@
...
@@ -788,6 +789,12 @@
}
}
function
init
()
{
function
init
()
{
// var index = layer.load(2, {
// shade: true,
// time: 10 * 1000
// }); //又换了种风格,并且设定最长等待10秒
//关闭
// layer.close(index);
getChannel
()
getChannel
()
getPeriod
()
getPeriod
()
...
@@ -902,12 +909,11 @@
...
@@ -902,12 +909,11 @@
parentId
:
data
.
id
,
parentId
:
data
.
id
,
parentName
:
data
.
merchantName
+
'('
+
data
.
merchantNo
+
')'
,
parentName
:
data
.
merchantName
+
'('
+
data
.
merchantNo
+
')'
,
parentAccountType
:
data
.
accountType
,
parentAccountType
:
data
.
accountType
,
parentAccountTypeName
:
data
.
accountTypeNames
,
parentMerchantAccountLevel
:
data
.
merchantAccountLevel
,
parentMerchantAccountLevel
:
data
.
merchantAccountLevel
,
channelId
:
data
.
channelId
,
channelId
:
data
.
channelId
,
effectiveTime
:
data
.
effectiveTime
effectiveTime
:
data
.
effectiveTime
}
}
var
attrList
=
[
'parentName'
,
'parentAccountTypeName'
]
var
attrList
=
[
'parentName'
]
$
.
each
(
attrList
,
function
(
index
,
item
)
{
$
.
each
(
attrList
,
function
(
index
,
item
)
{
$
(
'#'
+
item
).
text
(
parentInfo
[
item
])
$
(
'#'
+
item
).
text
(
parentInfo
[
item
])
})
})
...
@@ -930,6 +936,9 @@
...
@@ -930,6 +936,9 @@
if
(
merchantForm
.
status
!=
1
)
{
if
(
merchantForm
.
status
!=
1
)
{
$
(
'#draft'
).
remove
()
$
(
'#draft'
).
remove
()
}
}
if
(
merchantForm
.
merchantType
==
2
)
{
$
(
'#merchantOrgcodeEl'
).
attr
(
'placeholder'
,
'请输入组织机构号码'
)
}
console
.
log
(
merchantForm
)
console
.
log
(
merchantForm
)
getBusiScope
()
getBusiScope
()
getCarBrandTree
()
getCarBrandTree
()
...
@@ -996,7 +1005,6 @@
...
@@ -996,7 +1005,6 @@
// 账户等级
// 账户等级
function
getAccountLevel
()
{
function
getAccountLevel
()
{
// console.log('???????????')
getDictData
(
'account_level'
,
function
(
res
)
{
getDictData
(
'account_level'
,
function
(
res
)
{
baseData
.
accountLevelList
=
res
.
data
baseData
.
accountLevelList
=
res
.
data
// console.log(baseData.accountLevelList)
// console.log(baseData.accountLevelList)
...
@@ -1004,8 +1012,12 @@
...
@@ -1004,8 +1012,12 @@
var
tempList
=
[]
var
tempList
=
[]
$
.
each
(
baseData
.
accountLevelList
,
function
(
index
,
item
)
{
$
.
each
(
baseData
.
accountLevelList
,
function
(
index
,
item
)
{
if
(
item
.
dictValue
>
parentInfo
.
parentMerchantAccountLevel
)
{
if
(
item
.
dictValue
>
parentInfo
.
parentMerchantAccountLevel
)
{
if
(
parentInfo
.
parentMerchantAccountLevel
==
1
&&
item
.
dictValue
==
3
)
{
}
else
{
tempList
.
push
(
baseData
.
accountLevelList
[
index
])
tempList
.
push
(
baseData
.
accountLevelList
[
index
])
}
}
}
})
})
baseData
.
accountLevelList
=
tempList
baseData
.
accountLevelList
=
tempList
}
}
...
@@ -1363,7 +1375,13 @@
...
@@ -1363,7 +1375,13 @@
for
(
var
j
=
0
;
j
<
productData
.
products
.
length
;
j
++
)
{
for
(
var
j
=
0
;
j
<
productData
.
products
.
length
;
j
++
)
{
menuData
=
productData
.
products
[
j
]
menuData
=
productData
.
products
[
j
]
selectArr
.
push
(
menuData
.
productId
)
selectArr
.
push
(
menuData
.
productId
)
var
idList
=
menuData
.
menuIds
.
concat
(
menuData
.
functionIds
)
var
idList
=
''
// idList = menuData.menuIds.concat(menuData.functionIds)
if
(
menuData
.
menuIds
)
{
idList
=
menuData
.
menuIds
.
concat
(
menuData
.
functionIds
)
}
else
{
idList
=
menuData
.
functionIds
}
active
.
treeTabAdd
({
active
.
treeTabAdd
({
name
:
menuData
.
productName
,
name
:
menuData
.
productName
,
value
:
menuData
.
productId
value
:
menuData
.
productId
...
...
js/gtree.js
View file @
b65c928
...
@@ -10,6 +10,7 @@
...
@@ -10,6 +10,7 @@
layui
.
define
([
'ztree'
],
function
(
exports
)
{
layui
.
define
([
'ztree'
],
function
(
exports
)
{
var
$
=
layui
.
$
var
$
=
layui
.
$
var
tree
=
layui
.
ztree
var
tree
=
layui
.
ztree
function
onNodeCreated
(
event
,
treeId
,
treeNode
)
{
function
onNodeCreated
(
event
,
treeId
,
treeNode
)
{
if
(
treeNode
.
logo
==
'functionValue'
)
{
if
(
treeNode
.
logo
==
'functionValue'
)
{
var
tId
=
treeNode
.
getParentNode
().
tId
var
tId
=
treeNode
.
getParentNode
().
tId
...
@@ -25,12 +26,17 @@ layui.define(['ztree'], function (exports) {
...
@@ -25,12 +26,17 @@ layui.define(['ztree'], function (exports) {
var
p
=
gtree
.
opt
.
checkedList
var
p
=
gtree
.
opt
.
checkedList
if
(
p
.
indexOf
(
treeNode
.
id
)
!=
-
1
)
{
if
(
p
.
indexOf
(
treeNode
.
id
)
!=
-
1
)
{
treeNode
.
checked
=
true
treeNode
.
checked
=
true
var
i
=
setInterval
(
function
(){
// var i= setInterval(function(){
// if (inst) {
// clearInterval(i)
// inst.updateNode(treeNode)
// }
// },20)
// var time = setTimeout(function () {
if
(
inst
)
{
if
(
inst
)
{
clearInterval
(
i
)
inst
.
updateNode
(
treeNode
)
inst
.
updateNode
(
treeNode
)
}
}
},
2
0
)
// }, 100
0)
}
}
}
}
if
(
gtree
.
opt
&&
gtree
.
opt
.
chkDisabled
)
{
if
(
gtree
.
opt
&&
gtree
.
opt
.
chkDisabled
)
{
...
@@ -44,7 +50,10 @@ layui.define(['ztree'], function (exports) {
...
@@ -44,7 +50,10 @@ layui.define(['ztree'], function (exports) {
},
},
check
:
{
check
:
{
enable
:
true
,
enable
:
true
,
chkboxType
:
{
Y
:
'ps'
,
N
:
's'
}
chkboxType
:
{
Y
:
'ps'
,
N
:
's'
}
},
},
data
:
{
data
:
{
key
:
{
key
:
{
...
...
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