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 fd72f558
authored
Oct 15, 2021
by
李长胜
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改样式
1 parent
32f649df
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
165 additions
and
150 deletions
css/main.css
html/employee/add.html
html/merchant/add.html
html/merchant/detail.html
html/merchant/edit.html
css/main.css
View file @
fd72f55
...
@@ -29,6 +29,10 @@ main::-webkit-scrollbar {
...
@@ -29,6 +29,10 @@ main::-webkit-scrollbar {
justify-content
:
space-between
;
justify-content
:
space-between
;
padding
:
0
20px
;
padding
:
0
20px
;
}
}
.upload-img-box
{
margin-right
:
10px
;
background-color
:
#f7f7f7
;
}
.header-nav
{
.header-nav
{
display
:
flex
;
display
:
flex
;
...
...
html/employee/add.html
View file @
fd72f55
...
@@ -70,7 +70,9 @@
...
@@ -70,7 +70,9 @@
background-color
:
#ffffff
;
background-color
:
#ffffff
;
margin
:
15px
auto
;
margin
:
15px
auto
;
position
:
relative
;
position
:
relative
;
height
:
100%
;
/* min-height: calc(100vh-182px); */
/* height: 100%; */
padding-bottom
:
30px
;
}
}
.edit-box
.grayLine
{
.edit-box
.grayLine
{
position
:
absolute
;
position
:
absolute
;
...
@@ -107,7 +109,7 @@
...
@@ -107,7 +109,7 @@
}
}
.Wrap
{
.Wrap
{
margin
:
8px
20px
0
;
margin
:
8px
20px
0
;
height
:
100%
;
/* height: 100%; */
}
}
</style>
</style>
</head>
</head>
...
@@ -156,7 +158,7 @@
...
@@ -156,7 +158,7 @@
<label
class=
"layui-form-label required"
>
可见商户:
</label>
<label
class=
"layui-form-label required"
>
可见商户:
</label>
<div
class=
"layui-input-block"
>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
placeholder=
"可见商户"
id=
"searchMerchant"
/>
<input
class=
"layui-input"
placeholder=
"可见商户"
id=
"searchMerchant"
/>
<ul
id=
"visibleInferiorMerTree"
style=
"height: 200px; overflow-y: auto
;
"
class=
"ztree wrapper-tree"
></ul>
<ul
id=
"visibleInferiorMerTree"
style=
"height: 200px; overflow-y: auto"
class=
"ztree wrapper-tree"
></ul>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
...
@@ -328,7 +330,7 @@
...
@@ -328,7 +330,7 @@
// 创建角色
// 创建角色
$
(
'#addRole'
).
on
(
'click'
,
function
()
{
$
(
'#addRole'
).
on
(
'click'
,
function
()
{
// go('role', 'add', null, true)
// go('role', 'add', null, true)
$messenger
.
emit
(
'route-to'
,
{
path
:
'/settings/role/add'
})
$messenger
.
emit
(
'route-to'
,
{
path
:
'/settings/role/add'
})
})
})
// 提交表单
// 提交表单
...
@@ -396,7 +398,7 @@
...
@@ -396,7 +398,7 @@
request
(
visibleMerchantParams
,
function
(
res
)
{
request
(
visibleMerchantParams
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
if
(
id
)
{
if
(
id
)
{
findAllMerchant
(
function
(
result
)
{
findAllMerchant
(
function
(
result
)
{
if
(
result
)
{
if
(
result
)
{
getById
(
function
(
checkedList
)
{
getById
(
function
(
checkedList
)
{
createMerchant
(
checkedList
,
res
.
data
)
createMerchant
(
checkedList
,
res
.
data
)
...
...
html/merchant/add.html
View file @
fd72f55
...
@@ -9,7 +9,6 @@
...
@@ -9,7 +9,6 @@
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<meta
name=
"keywords"
itemprop=
"keywords"
content=
"广联,帐户管理,员工管理"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<style>
<style>
.edit-box
{
.edit-box
{
/* width: 1046px; */
/* width: 1046px; */
padding
:
20px
20px
;
padding
:
20px
20px
;
...
@@ -83,6 +82,8 @@
...
@@ -83,6 +82,8 @@
.edit-box
.upload-img-wh
{
.edit-box
.upload-img-wh
{
width
:
120px
!important
;
width
:
120px
!important
;
height
:
80px
;
height
:
80px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
}
}
.show
{
.show
{
...
@@ -125,15 +126,17 @@
...
@@ -125,15 +126,17 @@
.edit-box
#accountTypeEl
.layui-form-checked
span
,
.edit-box
#accountTypeEl
.layui-form-checked
span
,
#accountTypeEl
.layui-form-checked
:hover
span
{
#accountTypeEl
.layui-form-checked
:hover
span
{
background-color
:
#5850
FF
!important
;
background-color
:
#5850
ff
!important
;
}
}
.edit-box
#accountTypeEl
.layui-form-checked
i
,
.edit-box
#accountTypeEl
.layui-form-checked
i
,
#accountTypeEl
.layui-form-checked
:hover
i
{
#accountTypeEl
.layui-form-checked
:hover
i
{
color
:
#5850
FF
!important
;
color
:
#5850
ff
!important
;
}
}
.layui-form-radio
:hover
*,
.layui-form-radioed
,
.layui-form-radioed
>
i
{
.layui-form-radio
:hover
*,
color
:
#5850FF
!important
;
.layui-form-radioed
,
.layui-form-radioed
>
i
{
color
:
#5850ff
!important
;
}
}
.pageTitle
{
.pageTitle
{
background-color
:
#fff
;
background-color
:
#fff
;
...
@@ -254,8 +257,7 @@
...
@@ -254,8 +257,7 @@
<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 w-70"
>
<div
class=
"layui-input-inline w-70"
>
<input
style=
"color: #333333 !important;"
name=
"merchantAddress"
disabled
<input
style=
"color: #333333 !important"
name=
"merchantAddress"
disabled
class=
"layui-input layui-btn-disabled"
id=
"addrEl"
placeholder=
"请选择商户地址"
/>
class=
"layui-input layui-btn-disabled"
id=
"addrEl"
placeholder=
"请选择商户地址"
>
<!-- <div class="m-t-10" id="addrEl">请选择商户地址</div> -->
<!-- <div class="m-t-10" id="addrEl">请选择商户地址</div> -->
<button
type=
"button"
class=
"layui-btn"
data-type=
"handleSelectAddr"
>
选择地址
</button>
<button
type=
"button"
class=
"layui-btn"
data-type=
"handleSelectAddr"
>
选择地址
</button>
</div>
</div>
...
@@ -280,7 +282,7 @@
...
@@ -280,7 +282,7 @@
<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=
"merchantLegalPerson"
placeholder=
"请输入联系人姓名"
/>
<input
class=
"layui-input"
maxlength=
"15"
name=
"merchantLegalPerson"
placeholder=
"请输入联系人姓名"
/>
<div
style=
"width: 100%; height: 28px
;
"
></div>
<div
style=
"width: 100%; height: 28px"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -667,21 +669,26 @@
...
@@ -667,21 +669,26 @@
return
'请填入正确的驻店电话'
return
'请填入正确的驻店电话'
}
}
},
},
otherReq
:
function
(
value
,
item
)
{
otherReq
:
function
(
value
,
item
)
{
var
verifyName
=
$
(
item
).
attr
(
'name'
)
var
verifyName
=
$
(
item
).
attr
(
'name'
),
,
verifyType
=
$
(
item
).
attr
(
'type'
)
verifyType
=
$
(
item
).
attr
(
'type'
),
,
formElem
=
$
(
item
).
parents
(
'.layui-form'
)
//获取当前所在的form元素,如果存在的话
formElem
=
$
(
item
).
parents
(
'.layui-form'
),
//获取当前所在的form元素,如果存在的话
,
verifyElem
=
formElem
.
find
(
'input[name='
+
verifyName
+
']'
)
//获取需要校验的元素
verifyElem
=
formElem
.
find
(
'input[name='
+
verifyName
+
']'
),
//获取需要校验的元素
,
isTrue
=
verifyElem
.
is
(
':checked'
)
//是否命中校验
isTrue
=
verifyElem
.
is
(
':checked'
),
//是否命中校验
,
focusElem
=
verifyElem
.
next
().
find
(
'i.layui-icon'
);
//焦点元素
focusElem
=
verifyElem
.
next
().
find
(
'i.layui-icon'
)
//焦点元素
if
(
!
isTrue
||
!
value
)
{
if
(
!
isTrue
||
!
value
)
{
//定位焦点
//定位焦点
focusElem
.
css
(
verifyType
==
'radio'
?{
"color"
:
"#FF5722"
}:{
"border-color"
:
"#FF5722"
});
focusElem
.
css
(
verifyType
==
'radio'
?
{
color
:
'#FF5722'
}
:
{
'border-color'
:
'#FF5722'
})
//对非输入框设置焦点
//对非输入框设置焦点
focusElem
.
first
().
attr
(
"tabIndex"
,
"1"
).
css
(
"outline"
,
"0"
).
blur
(
function
()
{
focusElem
focusElem
.
css
(
verifyType
==
'radio'
?{
"color"
:
""
}:{
"border-color"
:
""
});
.
first
()
}).
focus
();
.
attr
(
'tabIndex'
,
'1'
)
return
'必填项不能为空'
;
.
css
(
'outline'
,
'0'
)
.
blur
(
function
()
{
focusElem
.
css
(
verifyType
==
'radio'
?
{
color
:
''
}
:
{
'border-color'
:
''
})
})
.
focus
()
return
'必填项不能为空'
}
}
}
}
})
})
...
@@ -966,27 +973,27 @@
...
@@ -966,27 +973,27 @@
reader
.
onload
()
reader
.
onload
()
})
})
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
var
endTime
=
startTime
*
1
+
86400
*
7
*
1000
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
1
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
startTime
=
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
var
endTime
=
startTime
.
setFullYear
(
startTime
.
getFullYear
()
+
2
)
console
.
log
(
helper
.
dateFormat
(
endTime
))
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
})
})
...
@@ -1437,8 +1444,7 @@
...
@@ -1437,8 +1444,7 @@
// 选项卡标题的lay-id属性值
// 选项卡标题的lay-id属性值
id
:
id
id
:
id
})
})
var
getTpl
=
var
getTpl
=
`<form class="layui-form layui-form-pane layui-tab-form" action="">
`<form class="layui-form layui-form-pane layui-tab-form" action="">
<div class="layui-form-item" pane>
<div class="layui-form-item" pane>
<label class="layui-form-label">选择产品:</label>
<label class="layui-form-label">选择产品:</label>
<div class="layui-input-block" id="project
${
id
}
">
<div class="layui-input-block" id="project
${
id
}
">
...
@@ -1521,12 +1527,11 @@
...
@@ -1521,12 +1527,11 @@
$
(
`#nodata
${
id
}
`
).
removeClass
(
'hide'
)
$
(
`#nodata
${
id
}
`
).
removeClass
(
'hide'
)
$
(
`#nodata
${
id
}
`
).
addClass
(
'show'
)
$
(
`#nodata
${
id
}
`
).
addClass
(
'show'
)
}
}
}
}
}
}
// 产品复选框change事件
// 产品复选框change事件
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
console
.
log
(
data
,
'33333333333'
)
console
.
log
(
data
,
'33333333333'
)
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
projectId
=
data
.
value
var
projectId
=
data
.
value
...
...
html/merchant/detail.html
View file @
fd72f55
...
@@ -49,6 +49,7 @@
...
@@ -49,6 +49,7 @@
}
}
.wrapper-merchant
{
.wrapper-merchant
{
background-color
:
#f4f5fa
;
background-color
:
#f4f5fa
;
display
:
flex
;
}
}
.merchant-left
{
.merchant-left
{
padding-top
:
15px
;
padding-top
:
15px
;
...
@@ -63,10 +64,12 @@
...
@@ -63,10 +64,12 @@
}
}
.merchant-right
{
.merchant-right
{
padding-top
:
15px
;
padding-top
:
15px
;
overflow-x
:
auto
;
overflow-x
:
auto
;
width
:
calc
(
100vw
-
340px
-
20px
);
/* max-width: calc(100vw - 340px - 20px); */
background-color
:
#fff
;
background-color
:
#fff
;
padding-left
:
20px
;
padding-left
:
20px
;
padding-right
:
20px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
}
}
...
@@ -95,18 +98,19 @@
...
@@ -95,18 +98,19 @@
.merchant-right
.layui-btn
{
.merchant-right
.layui-btn
{
position
:
absolute
;
position
:
absolute
;
right
:
2
0px
;
right
:
0px
;
}
}
.merchant-right
.layui-input-inline
{
.merchant-right
.layui-input-inline
{
position
:
absolute
;
position
:
absolute
;
right
:
9
0px
;
right
:
7
0px
;
}
}
.updateRecord
{
.updateRecord
{
text-align
:
center
;
text-align
:
center
;
color
:
#999
;
color
:
#999
;
background-color
:
#fff
;
background-color
:
#fff
;
padding
:
0
10px
;
}
}
.mb21
{
.mb21
{
...
@@ -181,9 +185,9 @@
...
@@ -181,9 +185,9 @@
<main
class=
"bg-white wrapper detail"
>
<main
class=
"bg-white wrapper detail"
>
<div
class=
"layui-tab layui-top-tab layui-tab-brief bg-detail"
>
<div
class=
"layui-tab layui-top-tab layui-tab-brief bg-detail"
>
<ul
class=
"layui-tab-title"
>
<ul
class=
"layui-tab-title"
>
<li
class=
"layui-this"
style=
"padding: 0;
width: 90px;margin-right: 20px;
"
>
商户信息
</li>
<li
class=
"layui-this"
style=
"padding: 0;
width: 90px; margin-right: 20px
"
>
商户信息
</li>
<li
style=
"padding: 0;
width: 90px;margin-right: 20px;
"
>
上级/下级商户
</li>
<li
style=
"padding: 0;
width: 90px; margin-right: 20px
"
>
上级/下级商户
</li>
<li
style=
"padding: 0;
width: 90px;
"
>
修改记录
</li>
<li
style=
"padding: 0;
width: 90px
"
>
修改记录
</li>
</ul>
</ul>
<div
class=
"layui-tab-content clearfix m-t-md"
>
<div
class=
"layui-tab-content clearfix m-t-md"
>
<div
class=
"layui-tab-item layui-show"
>
<div
class=
"layui-tab-item layui-show"
>
...
@@ -267,7 +271,7 @@
...
@@ -267,7 +271,7 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"MsgWrap clearfix"
style=
"margin-bottom: 100px
;
"
>
<div
class=
"MsgWrap clearfix"
style=
"margin-bottom: 100px"
>
<div
class=
"grayLine"
></div>
<div
class=
"grayLine"
></div>
<h3
class=
"content-title"
>
企业信息
</h3>
<h3
class=
"content-title"
>
企业信息
</h3>
<div
class=
"detail-content clearfix"
>
<div
class=
"detail-content clearfix"
>
...
@@ -410,7 +414,7 @@
...
@@ -410,7 +414,7 @@
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
<script>
layui
.
use
([
'request'
,
'gtree'
,
'helper'
,
'table'
,
'form'
,
'treeTab'
,
'laypage'
],
function
()
{
layui
.
use
([
'request'
,
'gtree'
,
'helper'
,
'table'
,
'form'
,
'treeTab'
,
'laypage'
],
function
()
{
var
$
=
layui
.
$
var
$
=
layui
.
$
var
request
=
layui
.
request
var
request
=
layui
.
request
var
tree
=
layui
.
gtree
var
tree
=
layui
.
gtree
...
@@ -453,7 +457,7 @@
...
@@ -453,7 +457,7 @@
elem
:
'recordPage'
,
elem
:
'recordPage'
,
groups
:
5
,
groups
:
5
,
layout
:
[
'count'
,
'page'
,
'skip'
],
layout
:
[
'count'
,
'page'
,
'skip'
],
jump
:
function
(
obj
,
first
)
{
jump
:
function
(
obj
,
first
)
{
recordPage
.
pageNum
=
obj
.
curr
recordPage
.
pageNum
=
obj
.
curr
recordPage
.
pageSize
=
obj
.
limit
recordPage
.
pageSize
=
obj
.
limit
//首次不执行
//首次不执行
...
@@ -532,7 +536,7 @@
...
@@ -532,7 +536,7 @@
id
:
merchantId
,
id
:
merchantId
,
method
:
'cn.com.glsx.merchants.merchant.findMerchantDetail'
method
:
'cn.com.glsx.merchants.merchant.findMerchantDetail'
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
// businessScopeCustomize
// businessScopeCustomize
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
roleData
=
helper
.
clone
(
true
,
res
.
data
)
roleData
=
helper
.
clone
(
true
,
res
.
data
)
...
@@ -557,11 +561,11 @@
...
@@ -557,11 +561,11 @@
method
:
'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId'
,
method
:
'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId'
,
id
:
merchantId
id
:
merchantId
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
&&
res
.
data
&&
res
.
data
.
length
!=
0
)
{
if
(
res
.
code
==
'0'
&&
res
.
data
&&
res
.
data
.
length
!=
0
)
{
var
authList
=
res
.
data
var
authList
=
res
.
data
console
.
log
(
authList
)
console
.
log
(
authList
)
$
.
each
(
authList
,
function
(
index
,
item
)
{
$
.
each
(
authList
,
function
(
index
,
item
)
{
treeTab
.
tabAdd
(
treeTab
.
tabAdd
(
{
{
title
:
item
.
accounttypeName
,
title
:
item
.
accounttypeName
,
...
@@ -573,7 +577,7 @@
...
@@ -573,7 +577,7 @@
$
(
'#accountAuth'
).
append
(
'<span class="account-type-span">'
+
item
.
accounttypeName
+
'</span>'
)
$
(
'#accountAuth'
).
append
(
'<span class="account-type-span">'
+
item
.
accounttypeName
+
'</span>'
)
var
menuData
=
[]
var
menuData
=
[]
if
(
item
.
products
&&
item
.
products
.
length
!=
0
)
{
if
(
item
.
products
&&
item
.
products
.
length
!=
0
)
{
$
.
each
(
item
.
products
,
function
(
idx
,
m
)
{
$
.
each
(
item
.
products
,
function
(
idx
,
m
)
{
treeTab
.
treeTabDetail
(
treeTab
.
treeTabDetail
(
{
{
name
:
m
.
productName
,
name
:
m
.
productName
,
...
@@ -601,7 +605,7 @@
...
@@ -601,7 +605,7 @@
method
:
'cn.com.glsx.merchants.menu.findSubordinateRelationship'
,
method
:
'cn.com.glsx.merchants.menu.findSubordinateRelationship'
,
id
:
merchantId
id
:
merchantId
},
},
function
(
res
)
{
function
(
res
)
{
console
.
log
(
res
.
data
)
console
.
log
(
res
.
data
)
var
data
=
res
.
data
var
data
=
res
.
data
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
)
$
(
'#secondmerchantName'
).
text
(
data
.
merchantName
)
...
@@ -621,7 +625,7 @@
...
@@ -621,7 +625,7 @@
id
:
merchantId
,
id
:
merchantId
,
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
)
console
.
log
(
res
)
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
treeObj
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
{
treeObj
=
tree
.
create
(
'merchantTree'
,
res
.
data
,
null
,
{
...
@@ -639,7 +643,7 @@
...
@@ -639,7 +643,7 @@
}
}
function
bindEvent
()
{
function
bindEvent
()
{
$
(
'#merchantBtn'
).
on
(
'click'
,
function
()
{
$
(
'#merchantBtn'
).
on
(
'click'
,
function
()
{
var
txt
=
$
(
'#treeInput'
).
val
()
var
txt
=
$
(
'#treeInput'
).
val
()
if
(
!
txt
)
{
if
(
!
txt
)
{
treeObj
.
showNodes
(
all_nodes
)
treeObj
.
showNodes
(
all_nodes
)
...
@@ -704,7 +708,7 @@
...
@@ -704,7 +708,7 @@
})
})
// table搜索
// table搜索
$
(
'#tableSearch'
).
on
(
'click'
,
function
()
{
$
(
'#tableSearch'
).
on
(
'click'
,
function
()
{
var
search
=
$
(
'#tableSearchForm'
).
val
()
var
search
=
$
(
'#tableSearchForm'
).
val
()
console
.
log
(
search
)
console
.
log
(
search
)
getSecondTable
({
getSecondTable
({
...
@@ -713,7 +717,7 @@
...
@@ -713,7 +717,7 @@
return
false
return
false
})
})
$
(
'#closeEl'
).
on
(
'click'
,
function
()
{
$
(
'#closeEl'
).
on
(
'click'
,
function
()
{
go
(
'merchant'
,
'index'
)
go
(
'merchant'
,
'index'
)
})
})
...
@@ -728,7 +732,7 @@
...
@@ -728,7 +732,7 @@
},
},
search
search
)
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
// console.log(res)
// console.log(res)
var
data
=
res
.
data
var
data
=
res
.
data
var
options
=
{
var
options
=
{
...
@@ -748,9 +752,9 @@
...
@@ -748,9 +752,9 @@
pageSize
:
recordPage
.
pageSize
,
pageSize
:
recordPage
.
pageSize
,
method
:
'cn.com.glsx.merchants.menu.findLog'
method
:
'cn.com.glsx.merchants.menu.findLog'
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
var
data
=
res
.
data
var
data
=
res
.
data
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
$
.
each
(
data
.
data
,
function
(
index
,
item
)
{
item
.
index
=
index
+
1
+
recordPage
.
pageSize
*
(
recordPage
.
pageNum
-
1
)
item
.
index
=
index
+
1
+
recordPage
.
pageSize
*
(
recordPage
.
pageNum
-
1
)
data
.
data
[
index
].
modifyContent
=
item
.
module
+
'-'
+
item
.
action
data
.
data
[
index
].
modifyContent
=
item
.
module
+
'-'
+
item
.
action
})
})
...
...
html/merchant/edit.html
View file @
fd72f55
...
@@ -127,15 +127,17 @@
...
@@ -127,15 +127,17 @@
.edit-box
#accountTypeEl
.layui-form-checked
span
,
.edit-box
#accountTypeEl
.layui-form-checked
span
,
#accountTypeEl
.layui-form-checked
:hover
span
{
#accountTypeEl
.layui-form-checked
:hover
span
{
background-color
:
#5850
FF
!important
;
background-color
:
#5850
ff
!important
;
}
}
.edit-box
#accountTypeEl
.layui-form-checked
i
,
.edit-box
#accountTypeEl
.layui-form-checked
i
,
#accountTypeEl
.layui-form-checked
:hover
i
{
#accountTypeEl
.layui-form-checked
:hover
i
{
color
:
#5850
FF
!important
;
color
:
#5850
ff
!important
;
}
}
.layui-form-radio
:hover
*,
.layui-form-radioed
,
.layui-form-radioed
>
i
{
.layui-form-radio
:hover
*,
color
:
#5850FF
!important
;
.layui-form-radioed
,
.layui-form-radioed
>
i
{
color
:
#5850ff
!important
;
}
}
.layui-tab-content
{
.layui-tab-content
{
position
:
relative
;
position
:
relative
;
...
@@ -179,8 +181,8 @@
...
@@ -179,8 +181,8 @@
<main>
<main>
<div
class=
"layui-tab layui-top-tab layui-tab-brief"
lay-filter=
"editTab"
>
<div
class=
"layui-tab layui-top-tab layui-tab-brief"
lay-filter=
"editTab"
>
<ul
class=
"layui-tab-title"
>
<ul
class=
"layui-tab-title"
>
<li
lay-id=
"2"
id=
"functional"
style=
"padding: 0;
width: 90px;margin-right: 20px;
"
>
修改功能权限
</li>
<li
lay-id=
"2"
id=
"functional"
style=
"padding: 0;
width: 90px; margin-right: 20px
"
>
修改功能权限
</li>
<li
lay-id=
"1"
id=
"basic"
style=
"padding: 0;
width: 90px;
"
class=
"layui-this"
>
修改基本信息
</li>
<li
lay-id=
"1"
id=
"basic"
style=
"padding: 0;
width: 90px
"
class=
"layui-this"
>
修改基本信息
</li>
</ul>
</ul>
<div
class=
"layui-tab-content m-t-md"
>
<div
class=
"layui-tab-content m-t-md"
>
<!-- 权限树 -->
<!-- 权限树 -->
...
@@ -300,20 +302,20 @@
...
@@ -300,20 +302,20 @@
</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"
style=
"width: 100px; margin: 0
;
"
>
<div
class=
"layui-input-inline"
style=
"width: 100px; margin: 0"
>
<select
name=
"merchantType"
id=
"merchantTypeEl"
lay-filter=
"merchantTypeFilter"
>
<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"
id=
"merchantOrgcodeEl"
placeholder=
"请输入身份证号码"
/>
<input
class=
"layui-input"
maxlength=
"50"
lay-verify=
"merchantOrgcode"
name=
"merchantOrgcode"
id=
"merchantOrgcodeEl"
placeholder=
"请输入身份证号码"
/>
</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 w-70"
>
<div
class=
"layui-input-inline w-70"
>
<input
style=
"color: #333333 !important
;
"
name=
"merchantAddress"
disabled
class=
"layui-input layui-btn-disabled"
id=
"addrEl"
placeholder=
"请选择商户地址"
/>
<input
style=
"color: #333333 !important"
name=
"merchantAddress"
disabled
class=
"layui-input layui-btn-disabled"
id=
"addrEl"
placeholder=
"请选择商户地址"
/>
<!-- <div class="m-t-10" id="addrEl">请选择商户地址</div> -->
<!-- <div class="m-t-10" id="addrEl">请选择商户地址</div> -->
<button
type=
"button"
class=
"layui-btn"
data-type=
"handleSelectAddr"
>
选择地址
</button>
<button
type=
"button"
class=
"layui-btn"
data-type=
"handleSelectAddr"
>
选择地址
</button>
</div>
</div>
...
@@ -332,7 +334,7 @@
...
@@ -332,7 +334,7 @@
<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=
"merchantLegalPerson"
placeholder=
"请输入联系人姓名"
/>
<input
class=
"layui-input"
maxlength=
"15"
name=
"merchantLegalPerson"
placeholder=
"请输入联系人姓名"
/>
<div
style=
"width: 100%; height: 28px
;
"
></div>
<div
style=
"width: 100%; height: 28px"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -391,7 +393,7 @@
...
@@ -391,7 +393,7 @@
<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"
placeholder=
"车型品牌"
id=
"brand"
/>
<input
class=
"layui-input"
placeholder=
"车型品牌"
id=
"brand"
/>
<div
id=
"carBrandTree"
style=
"height: 200px; overflow-y: scroll
;
"
></div>
<div
id=
"carBrandTree"
style=
"height: 200px; overflow-y: scroll"
></div>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -410,7 +412,7 @@
...
@@ -410,7 +412,7 @@
class=
"upload upload-img-box upload-img-wh"
class=
"upload upload-img-box upload-img-wh"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
data-idx=
"0"
data-idx=
"0"
style=
"opacity: 0
;
"
style=
"opacity: 0"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -426,7 +428,7 @@
...
@@ -426,7 +428,7 @@
class=
"upload upload-img-box upload-img-wh"
class=
"upload upload-img-box upload-img-wh"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
data-idx=
"1"
data-idx=
"1"
style=
"opacity: 0
;
"
style=
"opacity: 0"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -442,7 +444,7 @@
...
@@ -442,7 +444,7 @@
class=
"upload upload-img-box upload-img-wh"
class=
"upload upload-img-box upload-img-wh"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
accept=
"image/png, image/jpeg, image/gif, image/jpg"
data-idx=
"2"
data-idx=
"2"
style=
"opacity: 0
;
"
style=
"opacity: 0"
/>
/>
</div>
</div>
</div>
</div>
...
@@ -469,7 +471,7 @@
...
@@ -469,7 +471,7 @@
<script
src=
"/js/load.js"
></script>
<script
src=
"/js/load.js"
></script>
<script
src=
"/js/validator.js"
></script>
<script
src=
"/js/validator.js"
></script>
<script>
<script>
layui
.
use
([
'gtree'
,
'request'
,
'helper'
,
'layer'
,
'laydate'
,
'element'
,
'xmSelect'
,
'laytpl'
,
'validator'
],
function
()
{
layui
.
use
([
'gtree'
,
'request'
,
'helper'
,
'layer'
,
'laydate'
,
'element'
,
'xmSelect'
,
'laytpl'
,
'validator'
],
function
()
{
var
tree
=
layui
.
gtree
var
tree
=
layui
.
gtree
var
request
=
layui
.
request
var
request
=
layui
.
request
var
form
=
layui
.
form
var
form
=
layui
.
form
...
@@ -534,7 +536,7 @@
...
@@ -534,7 +536,7 @@
elem
:
'#startDate'
,
//指定元素
elem
:
'#startDate'
,
//指定元素
type
:
'time'
,
type
:
'time'
,
format
:
'HH:mm:ss'
,
format
:
'HH:mm:ss'
,
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
//监听日期被切换
//监听日期被切换
if
(
value
!=
''
)
{
if
(
value
!=
''
)
{
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
...
@@ -549,7 +551,7 @@
...
@@ -549,7 +551,7 @@
elem
:
'#endDate'
,
//指定元素
elem
:
'#endDate'
,
//指定元素
type
:
'time'
,
type
:
'time'
,
format
:
'HH:mm:ss'
,
format
:
'HH:mm:ss'
,
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
//监听日期被切换
//监听日期被切换
if
(
value
!=
''
)
{
if
(
value
!=
''
)
{
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
...
@@ -568,25 +570,25 @@
...
@@ -568,25 +570,25 @@
var
resetpsw
=
$
(
'#resetpsw'
)
var
resetpsw
=
$
(
'#resetpsw'
)
// pwd.attr('readonly', false)
// pwd.attr('readonly', false)
// 重置密码
// 重置密码
resetpsw
.
on
(
'click'
,
function
()
{
resetpsw
.
on
(
'click'
,
function
()
{
pwd
.
attr
(
'readonly'
,
false
)
pwd
.
attr
(
'readonly'
,
false
)
pwd
.
val
(
''
)
pwd
.
val
(
''
)
})
})
init
()
init
()
// tab 切换
// tab 切换
element
.
on
(
'tab(editTab)'
,
function
(
val
)
{
element
.
on
(
'tab(editTab)'
,
function
(
val
)
{
console
.
log
(
'-------'
,
val
)
console
.
log
(
'-------'
,
val
)
})
})
// 校验
// 校验
form
.
verify
({
form
.
verify
({
channelId
:
function
(
value
)
{
channelId
:
function
(
value
)
{
if
(
editLevel
==
1
&&
!
value
)
{
if
(
editLevel
==
1
&&
!
value
)
{
return
'必填项不能为空'
return
'必填项不能为空'
}
}
},
},
merchantOrgcode
:
function
(
value
)
{
merchantOrgcode
:
function
(
value
)
{
var
merchantType
=
$
(
'#merchantTypeEl option:selected'
).
val
()
var
merchantType
=
$
(
'#merchantTypeEl option:selected'
).
val
()
if
(
value
)
{
if
(
value
)
{
if
(
merchantType
==
1
&&
!
validator
.
checkIdCard
(
value
))
{
if
(
merchantType
==
1
&&
!
validator
.
checkIdCard
(
value
))
{
...
@@ -597,27 +599,27 @@
...
@@ -597,27 +599,27 @@
}
}
}
}
},
},
merchantLoginAccount
:
function
(
value
)
{
merchantLoginAccount
:
function
(
value
)
{
if
(
value
&&
value
.
length
<
3
)
{
if
(
value
&&
value
.
length
<
3
)
{
return
'登录账户名请填入3-15位字符'
return
'登录账户名请填入3-15位字符'
}
}
},
},
merchantLoginPassword
:
function
(
value
)
{
merchantLoginPassword
:
function
(
value
)
{
if
(
value
&&
value
.
length
<
6
)
{
if
(
value
&&
value
.
length
<
6
)
{
return
'登录密码请填入6-15位字符'
return
'登录密码请填入6-15位字符'
}
}
},
},
residentPhone
:
function
(
value
)
{
residentPhone
:
function
(
value
)
{
if
(
value
&&
!
validator
.
checkPhoneNumber
(
value
))
{
if
(
value
&&
!
validator
.
checkPhoneNumber
(
value
))
{
return
'请填入正确的驻店电话'
return
'请填入正确的驻店电话'
}
}
},
},
hasModify
:
function
(
value
)
{
hasModify
:
function
(
value
)
{
console
.
log
(
value
,
'=================----------==========='
)
console
.
log
(
value
,
'=================----------==========='
)
}
}
})
})
form
.
on
(
'select(merchantTypeFilter)'
,
function
(
data
)
{
form
.
on
(
'select(merchantTypeFilter)'
,
function
(
data
)
{
if
(
data
.
value
==
1
)
{
if
(
data
.
value
==
1
)
{
$
(
'#merchantOrgcodeEl'
).
attr
(
'placeholder'
,
'请输入身份证号码'
)
$
(
'#merchantOrgcodeEl'
).
attr
(
'placeholder'
,
'请输入身份证号码'
)
}
else
{
}
else
{
...
@@ -625,7 +627,7 @@
...
@@ -625,7 +627,7 @@
}
}
})
})
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
var
formData
=
data
.
field
var
formData
=
data
.
field
var
params
=
{
var
params
=
{
isloginName
:
0
isloginName
:
0
...
@@ -661,7 +663,7 @@
...
@@ -661,7 +663,7 @@
params
.
lng
=
merchantForm
.
lng
params
.
lng
=
merchantForm
.
lng
params
.
merchantAddress
=
merchantForm
.
merchantAddress
params
.
merchantAddress
=
merchantForm
.
merchantAddress
}
}
$
.
each
(
fieldToFormNameList
,
function
(
index
,
item
)
{
$
.
each
(
fieldToFormNameList
,
function
(
index
,
item
)
{
merchantForm
[
item
]
=
formData
[
item
]
||
''
merchantForm
[
item
]
=
formData
[
item
]
||
''
params
[
item
]
=
formData
[
item
]
||
''
params
[
item
]
=
formData
[
item
]
||
''
})
})
...
@@ -684,9 +686,9 @@
...
@@ -684,9 +686,9 @@
toString
:
','
toString
:
','
}
}
]
]
$
.
each
(
checkClassNameList
,
function
(
index
,
item
)
{
$
.
each
(
checkClassNameList
,
function
(
index
,
item
)
{
var
checkedArr
=
[]
var
checkedArr
=
[]
$
(
'input[class='
+
item
.
attr
+
']:checked'
).
each
(
function
()
{
$
(
'input[class='
+
item
.
attr
+
']:checked'
).
each
(
function
()
{
checkedArr
.
push
(
$
(
this
).
val
())
checkedArr
.
push
(
$
(
this
).
val
())
})
})
if
(
checkedArr
.
length
)
{
if
(
checkedArr
.
length
)
{
...
@@ -705,7 +707,7 @@
...
@@ -705,7 +707,7 @@
}
}
var
elList
=
$
(
'.business-scope-cust'
)
var
elList
=
$
(
'.business-scope-cust'
)
var
tempList
=
[]
var
tempList
=
[]
$
.
each
(
elList
,
function
(
index
,
item
)
{
$
.
each
(
elList
,
function
(
index
,
item
)
{
if
(
item
.
value
)
{
if
(
item
.
value
)
{
tempList
.
push
(
item
.
value
)
tempList
.
push
(
item
.
value
)
}
}
...
@@ -737,7 +739,7 @@
...
@@ -737,7 +739,7 @@
}
else
{
}
else
{
params
.
status
=
1
params
.
status
=
1
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
// if (editLevel == 3) {
// if (editLevel == 3) {
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
@@ -779,7 +781,7 @@
...
@@ -779,7 +781,7 @@
function
findId
(
nodeList
)
{
function
findId
(
nodeList
)
{
var
idList
=
[]
var
idList
=
[]
$
.
each
(
nodeList
,
function
(
index
,
item
)
{
$
.
each
(
nodeList
,
function
(
index
,
item
)
{
idList
.
push
(
item
.
id
)
idList
.
push
(
item
.
id
)
})
})
return
idList
return
idList
...
@@ -788,7 +790,7 @@
...
@@ -788,7 +790,7 @@
// 按钮事件绑定
// 按钮事件绑定
var
btnHandle
=
{
var
btnHandle
=
{
// 选择地址
// 选择地址
handleSelectAddr
:
function
()
{
handleSelectAddr
:
function
()
{
helper
.
store
.
set
(
'merchantMapObj'
,
merchantForm
)
helper
.
store
.
set
(
'merchantMapObj'
,
merchantForm
)
layer
.
open
({
layer
.
open
({
type
:
2
,
type
:
2
,
...
@@ -796,7 +798,7 @@
...
@@ -796,7 +798,7 @@
area
:
[
'900px'
,
'600px'
],
area
:
[
'900px'
,
'600px'
],
btn
:
[
'确定'
,
'取消'
],
btn
:
[
'确定'
,
'取消'
],
content
:
'map.html'
,
content
:
'map.html'
,
yes
:
function
(
index
,
layero
)
{
yes
:
function
(
index
,
layero
)
{
var
body
=
layer
.
getChildFrame
(
'body'
,
index
)
var
body
=
layer
.
getChildFrame
(
'body'
,
index
)
body
.
find
(
'#mapBtn'
).
click
()
body
.
find
(
'#mapBtn'
).
click
()
var
res
=
helper
.
store
.
get
(
'merchantMapObj'
)
var
res
=
helper
.
store
.
get
(
'merchantMapObj'
)
...
@@ -812,13 +814,13 @@
...
@@ -812,13 +814,13 @@
})
})
}
}
},
},
end
:
function
()
{
end
:
function
()
{
helper
.
store
.
remove
(
'merchantMapObj'
)
helper
.
store
.
remove
(
'merchantMapObj'
)
}
}
})
})
},
},
// 添加范围
// 添加范围
handleAddScope
:
function
(
txt
)
{
handleAddScope
:
function
(
txt
)
{
if
(
scopeNum
<
10
)
{
if
(
scopeNum
<
10
)
{
scopeNum
=
scopeNum
+
1
scopeNum
=
scopeNum
+
1
var
parent
=
$
(
'#custom-scope'
)
var
parent
=
$
(
'#custom-scope'
)
...
@@ -832,14 +834,12 @@
...
@@ -832,14 +834,12 @@
if
(
txt
)
{
if
(
txt
)
{
inputEl
.
val
(
txt
)
inputEl
.
val
(
txt
)
}
}
addBtn
.
bind
(
'click'
,
function
(
e
)
{
addBtn
.
bind
(
'click'
,
function
(
e
)
{
btnHandle
.
handleAddScope
()
btnHandle
.
handleAddScope
()
})
})
deleteBtn
.
bind
(
'click'
,
function
(
e
)
{
deleteBtn
.
bind
(
'click'
,
function
(
e
)
{
scopeNum
=
scopeNum
-
1
scopeNum
=
scopeNum
-
1
var
el
=
$
(
this
)
var
el
=
$
(
this
).
parent
().
parent
()
.
parent
()
.
parent
()
el
.
remove
()
el
.
remove
()
})
})
child1
.
append
(
inputEl
)
child1
.
append
(
inputEl
)
...
@@ -850,14 +850,14 @@
...
@@ -850,14 +850,14 @@
parent
.
append
(
subParent
)
parent
.
append
(
subParent
)
}
}
},
},
handleCancel
:
function
()
{
handleCancel
:
function
()
{
go
(
'merchant'
,
'index'
)
go
(
'merchant'
,
'index'
)
return
false
return
false
}
}
}
}
// tab 点击事件
// tab 点击事件
$
(
'#functional'
).
on
(
'click'
,
function
()
{
$
(
'#functional'
).
on
(
'click'
,
function
()
{
$
(
'#basic'
).
attr
(
'lay-id'
)
$
(
'#basic'
).
attr
(
'lay-id'
)
var
current
=
$
(
'.layui-tab-title .layui-this'
).
attr
(
'lay-id'
)
var
current
=
$
(
'.layui-tab-title .layui-this'
).
attr
(
'lay-id'
)
var
layId
=
this
.
getAttribute
(
'lay-id'
)
var
layId
=
this
.
getAttribute
(
'lay-id'
)
...
@@ -868,7 +868,7 @@
...
@@ -868,7 +868,7 @@
{
{
btn
:
[
'是'
,
'否'
]
//按钮
btn
:
[
'是'
,
'否'
]
//按钮
},
},
function
(
index
)
{
function
(
index
)
{
element
.
tabChange
(
'editTab'
,
2
)
element
.
tabChange
(
'editTab'
,
2
)
functionClick
=
true
functionClick
=
true
$
(
'#basicSumit'
).
click
()
$
(
'#basicSumit'
).
click
()
...
@@ -876,7 +876,7 @@
...
@@ -876,7 +876,7 @@
init
()
init
()
layer
.
close
(
index
)
layer
.
close
(
index
)
},
},
function
()
{}
function
()
{}
)
)
}
else
{
}
else
{
element
.
tabChange
(
'editTab'
,
2
)
element
.
tabChange
(
'editTab'
,
2
)
...
@@ -887,7 +887,7 @@
...
@@ -887,7 +887,7 @@
return
false
return
false
})
})
$
(
'#basic'
).
on
(
'click'
,
function
()
{
$
(
'#basic'
).
on
(
'click'
,
function
()
{
$
(
'#functional'
).
attr
(
'lay-id'
)
$
(
'#functional'
).
attr
(
'lay-id'
)
var
current
=
$
(
'.layui-tab-title .layui-this'
).
attr
(
'lay-id'
)
var
current
=
$
(
'.layui-tab-title .layui-this'
).
attr
(
'lay-id'
)
var
layId
=
this
.
getAttribute
(
'lay-id'
)
var
layId
=
this
.
getAttribute
(
'lay-id'
)
...
@@ -898,7 +898,7 @@
...
@@ -898,7 +898,7 @@
{
{
btn
:
[
'是'
,
'否'
]
//按钮
btn
:
[
'是'
,
'否'
]
//按钮
},
},
function
(
index
)
{
function
(
index
)
{
element
.
tabChange
(
'editTab'
,
1
)
element
.
tabChange
(
'editTab'
,
1
)
basicClick
=
true
basicClick
=
true
step
=
1
step
=
1
...
@@ -906,7 +906,7 @@
...
@@ -906,7 +906,7 @@
location
.
reload
()
location
.
reload
()
layer
.
close
(
index
)
layer
.
close
(
index
)
},
},
function
()
{}
function
()
{}
)
)
}
else
{
}
else
{
element
.
tabChange
(
'editTab'
,
1
)
element
.
tabChange
(
'editTab'
,
1
)
...
@@ -917,14 +917,14 @@
...
@@ -917,14 +917,14 @@
return
false
return
false
})
})
$
(
'.layui-btn'
).
on
(
'click'
,
function
()
{
$
(
'.layui-btn'
).
on
(
'click'
,
function
()
{
var
type
=
$
(
this
).
data
(
'type'
)
var
type
=
$
(
this
).
data
(
'type'
)
if
(
btnHandle
[
type
])
{
if
(
btnHandle
[
type
])
{
btnHandle
[
type
]()
btnHandle
[
type
]()
}
}
})
})
$
(
'.upload'
).
on
(
'change'
,
function
(
e
)
{
$
(
'.upload'
).
on
(
'change'
,
function
(
e
)
{
var
idx
=
$
(
this
).
data
(
'idx'
)
var
idx
=
$
(
this
).
data
(
'idx'
)
var
imgEl
=
$
(
'#img'
+
idx
)
var
imgEl
=
$
(
'#img'
+
idx
)
var
el
=
$
(
'#upload'
+
idx
)
var
el
=
$
(
'#upload'
+
idx
)
...
@@ -932,7 +932,7 @@
...
@@ -932,7 +932,7 @@
var
reader
=
new
FileReader
()
var
reader
=
new
FileReader
()
var
fileInfo
=
el
[
0
].
files
[
0
]
var
fileInfo
=
el
[
0
].
files
[
0
]
reader
.
readAsDataURL
(
fileInfo
)
reader
.
readAsDataURL
(
fileInfo
)
reader
.
onload
=
function
(
e
)
{
reader
.
onload
=
function
(
e
)
{
if
(
e
)
{
if
(
e
)
{
var
imgFile
=
e
.
target
.
result
var
imgFile
=
e
.
target
.
result
var
base64
=
fileInfo
.
name
.
split
(
'.'
)[
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
var
base64
=
fileInfo
.
name
.
split
(
'.'
)[
1
]
+
'@'
+
imgFile
.
split
(
','
)[
1
]
...
@@ -942,7 +942,7 @@
...
@@ -942,7 +942,7 @@
}
}
request
(
request
(
params
,
params
,
function
(
result
)
{
function
(
result
)
{
merchantForm
.
merchantFiles
[
idx
]
=
{
merchantForm
.
merchantFiles
[
idx
]
=
{
fileUrl
:
result
.
data
,
fileUrl
:
result
.
data
,
fileName
:
''
fileName
:
''
...
@@ -962,14 +962,14 @@
...
@@ -962,14 +962,14 @@
reader
.
onload
()
reader
.
onload
()
})
})
$
(
'#basicForm'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#basicForm'
).
on
(
'click'
,
function
(
e
)
{
var
localName
=
e
.
target
.
localName
var
localName
=
e
.
target
.
localName
if
(
!
basicFlag
&&
(
localName
==
'input'
||
localName
==
'button'
||
localName
==
''
))
{
if
(
!
basicFlag
&&
(
localName
==
'input'
||
localName
==
'button'
||
localName
==
''
))
{
basicFlag
=
true
basicFlag
=
true
}
}
})
})
$
(
'#authorityTree'
).
on
(
'click'
,
function
(
e
)
{
$
(
'#authorityTree'
).
on
(
'click'
,
function
(
e
)
{
var
localName
=
e
.
target
.
localName
var
localName
=
e
.
target
.
localName
if
(
!
functionFlag
&&
(
localName
==
'span'
||
localName
==
'i'
))
{
if
(
!
functionFlag
&&
(
localName
==
'span'
||
localName
==
'i'
))
{
functionFlag
=
true
functionFlag
=
true
...
@@ -1064,7 +1064,7 @@
...
@@ -1064,7 +1064,7 @@
function
bindEvent
()
{
function
bindEvent
()
{
$
(
'#brand'
).
on
(
$
(
'#brand'
).
on
(
'input'
,
'input'
,
helper
.
debounce
(
function
()
{
helper
.
debounce
(
function
()
{
var
txt
=
$
(
this
).
val
()
var
txt
=
$
(
this
).
val
()
if
(
!
txt
)
{
if
(
!
txt
)
{
treeObj
.
showNodes
(
all_nodes
)
treeObj
.
showNodes
(
all_nodes
)
...
@@ -1088,7 +1088,7 @@
...
@@ -1088,7 +1088,7 @@
}
else
{
}
else
{
list
=
checkedStr
.
split
(
','
)
list
=
checkedStr
.
split
(
','
)
}
}
$
.
each
(
list
,
function
(
index
,
item
)
{
$
.
each
(
list
,
function
(
index
,
item
)
{
$
(
'input[class='
+
attr
+
']'
).
attr
(
'checked'
,
true
)
$
(
'input[class='
+
attr
+
']'
).
attr
(
'checked'
,
true
)
})
})
}
}
...
@@ -1098,14 +1098,14 @@
...
@@ -1098,14 +1098,14 @@
method
:
'cn.com.glsx.merchants.merchant.findMerchantDetail'
,
method
:
'cn.com.glsx.merchants.merchant.findMerchantDetail'
,
id
:
id
id
:
id
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
fn
&&
fn
(
res
)
fn
&&
fn
(
res
)
})
})
}
}
// 子商户 - 获取父商户信息
// 子商户 - 获取父商户信息
function
getParentInfo
()
{
function
getParentInfo
()
{
getMerchantApi
(
parentMerchantId
,
function
(
res
)
{
getMerchantApi
(
parentMerchantId
,
function
(
res
)
{
var
data
=
res
.
data
var
data
=
res
.
data
parentInfo
=
{
parentInfo
=
{
parentId
:
data
.
id
,
parentId
:
data
.
id
,
...
@@ -1117,7 +1117,7 @@
...
@@ -1117,7 +1117,7 @@
}
}
merchantForm
.
channelId
=
parentInfo
.
channelId
merchantForm
.
channelId
=
parentInfo
.
channelId
var
attrList
=
[
'parentName'
]
var
attrList
=
[
'parentName'
]
$
.
each
(
attrList
,
function
(
index
,
item
)
{
$
.
each
(
attrList
,
function
(
index
,
item
)
{
$
(
'#'
+
item
).
text
(
parentInfo
[
item
])
$
(
'#'
+
item
).
text
(
parentInfo
[
item
])
})
})
form
.
val
(
'merchantForm'
,
parentInfo
)
form
.
val
(
'merchantForm'
,
parentInfo
)
...
@@ -1137,7 +1137,7 @@
...
@@ -1137,7 +1137,7 @@
// 获取商户信息
// 获取商户信息
function
getMerchantInfo
()
{
function
getMerchantInfo
()
{
getMerchantApi
(
merchantId
,
function
(
res
)
{
getMerchantApi
(
merchantId
,
function
(
res
)
{
form
.
val
(
'merchantForm'
,
res
.
data
)
form
.
val
(
'merchantForm'
,
res
.
data
)
merchantForm
=
res
.
data
merchantForm
=
res
.
data
if
(
!
isFactory
)
{
if
(
!
isFactory
)
{
...
@@ -1169,12 +1169,12 @@
...
@@ -1169,12 +1169,12 @@
var
params
=
{
var
params
=
{
method
:
'cn.com.glsx.merchants.merchantCommon.getCarbrandTree'
method
:
'cn.com.glsx.merchants.merchantCommon.getCarbrandTree'
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
baseData
.
carBrandTreeList
=
res
.
data
baseData
.
carBrandTreeList
=
res
.
data
var
checkedList
=
[]
var
checkedList
=
[]
if
(
editLevel
==
3
&&
merchantForm
.
merchantBrand
)
{
if
(
editLevel
==
3
&&
merchantForm
.
merchantBrand
)
{
checkedList
=
merchantForm
.
merchantBrand
.
split
(
','
)
checkedList
=
merchantForm
.
merchantBrand
.
split
(
','
)
$
.
each
(
checkedList
,
function
(
index
,
item
)
{
$
.
each
(
checkedList
,
function
(
index
,
item
)
{
checkedList
[
index
]
=
parseInt
(
item
)
checkedList
[
index
]
=
parseInt
(
item
)
})
})
}
}
...
@@ -1194,7 +1194,7 @@
...
@@ -1194,7 +1194,7 @@
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
method
:
'cn.com.glsx.merchants.menu.findAllDictData'
,
dictType
:
dictType
dictType
:
dictType
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
fn
&&
fn
(
res
)
fn
&&
fn
(
res
)
})
})
}
}
...
@@ -1202,7 +1202,7 @@
...
@@ -1202,7 +1202,7 @@
// 设置option
// 设置option
function
setSelectOption
(
elName
,
listName
,
optionId
,
optionLabel
)
{
function
setSelectOption
(
elName
,
listName
,
optionId
,
optionLabel
)
{
var
el
=
$
(
elName
)
var
el
=
$
(
elName
)
$
.
each
(
baseData
[
listName
],
function
(
index
,
item
)
{
$
.
each
(
baseData
[
listName
],
function
(
index
,
item
)
{
el
.
append
(
new
Option
(
item
[
optionLabel
],
item
[
optionId
]))
el
.
append
(
new
Option
(
item
[
optionLabel
],
item
[
optionId
]))
})
})
form
.
render
(
'select'
)
form
.
render
(
'select'
)
...
@@ -1215,11 +1215,11 @@
...
@@ -1215,11 +1215,11 @@
// 账户等级
// 账户等级
function
getAccountLevel
()
{
function
getAccountLevel
()
{
getDictData
(
'account_level'
,
function
(
res
)
{
getDictData
(
'account_level'
,
function
(
res
)
{
baseData
.
accountLevelList
=
res
.
data
baseData
.
accountLevelList
=
res
.
data
if
(
!
isFactory
)
{
if
(
!
isFactory
)
{
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
)
{
if
(
parentInfo
.
parentMerchantAccountLevel
==
1
&&
item
.
dictValue
==
3
)
{
}
else
{
}
else
{
...
@@ -1235,7 +1235,7 @@
...
@@ -1235,7 +1235,7 @@
// 有效期
// 有效期
function
getPeriod
()
{
function
getPeriod
()
{
getDictData
(
'account_validity_period'
,
function
(
res
)
{
getDictData
(
'account_validity_period'
,
function
(
res
)
{
baseData
.
validPeriodList
=
res
.
data
baseData
.
validPeriodList
=
res
.
data
setSelectOption
(
'#validPeriodEl'
,
'validPeriodList'
,
'dictValue'
,
'dictLabel'
)
setSelectOption
(
'#validPeriodEl'
,
'validPeriodList'
,
'dictValue'
,
'dictLabel'
)
})
})
...
@@ -1243,14 +1243,14 @@
...
@@ -1243,14 +1243,14 @@
// 营业范围
// 营业范围
function
getBusiScope
()
{
function
getBusiScope
()
{
getDictData
(
'business_scope'
,
function
(
res
)
{
getDictData
(
'business_scope'
,
function
(
res
)
{
baseData
.
busiScopeList
=
res
.
data
baseData
.
busiScopeList
=
res
.
data
var
checkedList
=
[]
var
checkedList
=
[]
if
(
editLevel
==
3
&&
merchantForm
.
businessScope
)
{
if
(
editLevel
==
3
&&
merchantForm
.
businessScope
)
{
checkedList
=
merchantForm
.
businessScope
.
split
(
','
)
checkedList
=
merchantForm
.
businessScope
.
split
(
','
)
}
}
var
el
=
$
(
'#busiScopeEl'
)
var
el
=
$
(
'#busiScopeEl'
)
$
.
each
(
baseData
.
busiScopeList
,
function
(
index
,
item
)
{
$
.
each
(
baseData
.
busiScopeList
,
function
(
index
,
item
)
{
var
optionEl
=
$
(
var
optionEl
=
$
(
'<input type="checkbox" class="businessScope" name="businessScope['
+
item
.
dictValue
+
']" title='
+
item
.
dictLabel
+
' value="'
+
item
.
dictValue
+
'" lay-skin="primary">'
'<input type="checkbox" class="businessScope" name="businessScope['
+
item
.
dictValue
+
']" title='
+
item
.
dictLabel
+
' value="'
+
item
.
dictValue
+
'" lay-skin="primary">'
)
)
...
@@ -1273,7 +1273,7 @@
...
@@ -1273,7 +1273,7 @@
function
recoveryBusiScopeCus
()
{
function
recoveryBusiScopeCus
()
{
if
(
merchantForm
.
businessScopeCustomize
)
{
if
(
merchantForm
.
businessScopeCustomize
)
{
var
scopeCusList
=
merchantForm
.
businessScopeCustomize
.
split
(
','
)
var
scopeCusList
=
merchantForm
.
businessScopeCustomize
.
split
(
','
)
$
.
each
(
scopeCusList
,
function
(
index
,
item
)
{
$
.
each
(
scopeCusList
,
function
(
index
,
item
)
{
if
(
index
!=
0
)
{
if
(
index
!=
0
)
{
btnHandle
.
handleAddScope
(
item
)
btnHandle
.
handleAddScope
(
item
)
}
else
{
}
else
{
...
@@ -1287,7 +1287,7 @@
...
@@ -1287,7 +1287,7 @@
// 恢复图片
// 恢复图片
function
recoveryFile
()
{
function
recoveryFile
()
{
merchantForm
.
merchantFiles
=
[]
merchantForm
.
merchantFiles
=
[]
$
.
each
(
merchantForm
.
merchantFileResponses
,
function
(
index
,
item
)
{
$
.
each
(
merchantForm
.
merchantFileResponses
,
function
(
index
,
item
)
{
var
imgEl
=
$
(
'#img'
+
index
)
var
imgEl
=
$
(
'#img'
+
index
)
var
el
=
$
(
'#upload'
+
index
)
var
el
=
$
(
'#upload'
+
index
)
var
addEl
=
$
(
'.img-add'
+
index
)
var
addEl
=
$
(
'.img-add'
+
index
)
...
@@ -1305,14 +1305,14 @@
...
@@ -1305,14 +1305,14 @@
// 账户类型
// 账户类型
function
getAccountType
()
{
function
getAccountType
()
{
getDictData
(
'account_type'
,
function
(
res
)
{
getDictData
(
'account_type'
,
function
(
res
)
{
baseData
.
accountTypeList
=
res
.
data
baseData
.
accountTypeList
=
res
.
data
var
checkedList
=
[]
var
checkedList
=
[]
if
(
merchantId
&&
merchantForm
.
accountType
)
{
if
(
merchantId
&&
merchantForm
.
accountType
)
{
checkedList
=
merchantForm
.
accountType
.
split
(
','
)
checkedList
=
merchantForm
.
accountType
.
split
(
','
)
}
}
var
el
=
$
(
'#accountTypeEl'
)
var
el
=
$
(
'#accountTypeEl'
)
$
.
each
(
baseData
.
accountTypeList
,
function
(
index
,
item
)
{
$
.
each
(
baseData
.
accountTypeList
,
function
(
index
,
item
)
{
if
(
parentMerchantId
)
{
if
(
parentMerchantId
)
{
var
parentLevelList
=
parentInfo
.
parentAccountType
.
split
(
','
)
var
parentLevelList
=
parentInfo
.
parentAccountType
.
split
(
','
)
for
(
var
k
=
0
;
k
<=
parentLevelList
.
length
;
k
++
)
{
for
(
var
k
=
0
;
k
<=
parentLevelList
.
length
;
k
++
)
{
...
@@ -1379,7 +1379,7 @@
...
@@ -1379,7 +1379,7 @@
* productList:复选下拉框的list,修改过的数据{name: '', value: ''}
* productList:复选下拉框的list,修改过的数据{name: '', value: ''}
* products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用
* products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用
*/
*/
tabAdd
:
function
(
item
,
productList
)
{
tabAdd
:
function
(
item
,
productList
)
{
// 渠道的id,一层选项卡的id
// 渠道的id,一层选项卡的id
var
id
=
item
.
value
var
id
=
item
.
value
// roleAuth 一层选项卡过滤器的名称
// roleAuth 一层选项卡过滤器的名称
...
@@ -1411,7 +1411,7 @@
...
@@ -1411,7 +1411,7 @@
</div>`
</div>`
view
=
document
.
getElementById
(
'role'
+
id
)
view
=
document
.
getElementById
(
'role'
+
id
)
templateData
.
id
=
id
// 渲染模版的数据
templateData
.
id
=
id
// 渲染模版的数据
laytpl
(
getTpl
).
render
(
templateData
,
function
(
html
)
{
laytpl
(
getTpl
).
render
(
templateData
,
function
(
html
)
{
view
.
innerHTML
=
html
view
.
innerHTML
=
html
})
})
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
id
).
products
var
products
=
menuFunTreeData
.
find
(
item
=>
item
.
accounttypeId
==
id
).
products
...
@@ -1429,11 +1429,11 @@
...
@@ -1429,11 +1429,11 @@
})
})
},
},
// tab删除
// tab删除
tabDelete
:
function
(
name
,
id
)
{
tabDelete
:
function
(
name
,
id
)
{
element
.
tabDelete
(
name
,
id
)
element
.
tabDelete
(
name
,
id
)
},
},
// tab Change
// tab Change
tabChange
:
function
(
name
,
id
)
{
tabChange
:
function
(
name
,
id
)
{
element
.
tabChange
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
},
},
/**
/**
...
@@ -1446,7 +1446,7 @@
...
@@ -1446,7 +1446,7 @@
* products:产品list数组
* products:产品list数组
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
*/
*/
treeTabAdd
:
function
(
item
,
id
,
treeListData
,
defaultList
)
{
treeTabAdd
:
function
(
item
,
id
,
treeListData
,
defaultList
)
{
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
var
filterName
=
'treeTab'
+
id
// 过滤器的名称 lay-filter
var
filterName
=
'treeTab'
+
id
// 过滤器的名称 lay-filter
element
.
tabAdd
(
filterName
,
{
element
.
tabAdd
(
filterName
,
{
...
@@ -1460,7 +1460,7 @@
...
@@ -1460,7 +1460,7 @@
treeData
[
id
][
item
.
value
]
=
treeData
[
id
][
item
.
value
]
||
{}
treeData
[
id
][
item
.
value
]
=
treeData
[
id
][
item
.
value
]
||
{}
treeData
[
id
][
item
.
value
].
id
=
productId
// 渲染模版的数据
treeData
[
id
][
item
.
value
].
id
=
productId
// 渲染模版的数据
treeData
[
id
][
item
.
value
].
productId
=
item
.
value
treeData
[
id
][
item
.
value
].
productId
=
item
.
value
laytpl
(
getTreeTpl
).
render
(
treeData
[
id
][
item
.
value
],
function
(
html
)
{
laytpl
(
getTreeTpl
).
render
(
treeData
[
id
][
item
.
value
],
function
(
html
)
{
treeView
.
innerHTML
=
html
treeView
.
innerHTML
=
html
})
})
var
treedom
=
'tree_'
+
productId
var
treedom
=
'tree_'
+
productId
...
@@ -1487,7 +1487,7 @@
...
@@ -1487,7 +1487,7 @@
}
}
// 产品复选框change事件
// 产品复选框change事件
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
form
.
on
(
'checkbox(filter)'
,
function
(
data
)
{
console
.
log
(
data
,
'33333333333'
)
console
.
log
(
data
,
'33333333333'
)
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
roleId
=
+
data
.
elem
.
dataset
.
id
var
projectId
=
data
.
value
var
projectId
=
data
.
value
...
@@ -1545,7 +1545,7 @@
...
@@ -1545,7 +1545,7 @@
accountLevel
:
merchantForm
.
merchantAccountLevel
accountLevel
:
merchantForm
.
merchantAccountLevel
}
}
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
menuFunTreeData
=
res
.
data
menuFunTreeData
=
res
.
data
var
accountType
=
$
(
'#accountType'
)
var
accountType
=
$
(
'#accountType'
)
...
@@ -1601,7 +1601,7 @@
...
@@ -1601,7 +1601,7 @@
method
:
'cn.com.glsx.merchants.merchant.findPermissionsByMerId'
,
method
:
'cn.com.glsx.merchants.merchant.findPermissionsByMerId'
,
id
:
merchantId
id
:
merchantId
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
var
accounttypeId
=
''
var
accounttypeId
=
''
if
(
res
.
data
)
{
if
(
res
.
data
)
{
...
@@ -1629,7 +1629,7 @@
...
@@ -1629,7 +1629,7 @@
var
functionIdLists
=
[]
var
functionIdLists
=
[]
var
functionValueIdLists
=
[]
var
functionValueIdLists
=
[]
var
nodes
=
productObj
.
treeObj
.
getCheckedNodes
(
true
)
var
nodes
=
productObj
.
treeObj
.
getCheckedNodes
(
true
)
$
.
each
(
nodes
,
function
(
index
,
item
)
{
$
.
each
(
nodes
,
function
(
index
,
item
)
{
if
(
item
.
logo
==
'function'
)
{
if
(
item
.
logo
==
'function'
)
{
functionIdLists
.
push
(
item
)
functionIdLists
.
push
(
item
)
}
else
if
(
item
.
logo
==
'functionValue'
)
{
}
else
if
(
item
.
logo
==
'functionValue'
)
{
...
@@ -1640,9 +1640,9 @@
...
@@ -1640,9 +1640,9 @@
}
}
}
}
})
})
$
.
each
(
functionValueIdLists
,
function
(
idx
,
m
)
{
$
.
each
(
functionValueIdLists
,
function
(
idx
,
m
)
{
var
findIdx
=
-
1
var
findIdx
=
-
1
$
.
each
(
functionIds
,
function
(
idn
,
n
)
{
$
.
each
(
functionIds
,
function
(
idn
,
n
)
{
if
(
n
.
functionId
==
m
.
parentId
)
{
if
(
n
.
functionId
==
m
.
parentId
)
{
findIdx
=
idn
findIdx
=
idn
}
}
...
@@ -1657,7 +1657,7 @@
...
@@ -1657,7 +1657,7 @@
})
})
}
}
})
})
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
functionIds
.
push
({
functionIds
.
push
({
functionId
:
m
.
parentId
,
functionId
:
m
.
parentId
,
mendId
:
m
.
superParentId
mendId
:
m
.
superParentId
...
@@ -1676,7 +1676,7 @@
...
@@ -1676,7 +1676,7 @@
}
}
}
}
$
(
'#draft'
).
on
(
'click'
,
function
()
{
$
(
'#draft'
).
on
(
'click'
,
function
()
{
getAuthList
()
getAuthList
()
var
params
=
{
var
params
=
{
merchantId
:
merchantId
,
merchantId
:
merchantId
,
...
@@ -1684,7 +1684,7 @@
...
@@ -1684,7 +1684,7 @@
method
:
'cn.com.glsx.merchants.merchant.updatePermissions'
,
method
:
'cn.com.glsx.merchants.merchant.updatePermissions'
,
status
:
merchantForm
.
status
status
:
merchantForm
.
status
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
icon
:
1
...
@@ -1700,7 +1700,7 @@
...
@@ -1700,7 +1700,7 @@
// init()
// init()
// })
// })
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
submitAuth
()
submitAuth
()
})
})
...
@@ -1717,7 +1717,7 @@
...
@@ -1717,7 +1717,7 @@
}
else
{
}
else
{
params
.
status
=
merchantForm
.
status
params
.
status
=
merchantForm
.
status
}
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
icon
:
1
...
...
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