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