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 fc2af01a
authored
Nov 04, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
合并
2 parents
4b5c1894
76a46481
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
357 additions
and
271 deletions
html/employee/add.html
html/merchant/add.html
html/merchant/addSubMerchant.html
html/merchant/edit.html
html/merchant/index.html
html/role/add.html
html/employee/add.html
View file @
fc2af01
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
...
@@ -74,6 +75,7 @@
margin-bottom
:
100px
;
}
.edit-box
.grayLine
{
position
:
absolute
;
left
:
0
;
...
...
@@ -92,12 +94,15 @@
color
:
#333333
;
font-weight
:
600
;
}
.hide
{
display
:
none
;
}
.show
{
display
:
block
;
}
.pageTitle
{
background-color
:
#fff
;
height
:
78px
;
...
...
@@ -107,17 +112,20 @@
line-height
:
78px
;
padding-left
:
20px
;
}
.Wrap
{
margin
:
8px
20px
0
;
/* height: 100%; */
}
.xm-select-demo
,
xm-select
>
.xm-body
.scroll-body
{
xm-select
>
.xm-body
.scroll-body
{
width
:
360px
;
}
</style>
</head>
<body>
</head>
<body>
<div
id=
"app"
>
<main>
<div
class=
"Wrap"
>
...
...
@@ -143,19 +151,22 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
员工姓名:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"staffName"
maxlength=
"15"
required
lay-verify=
"required"
placeholder=
"请输入员工姓名"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"text"
name=
"staffName"
maxlength=
"15"
required
lay-verify=
"required"
placeholder=
"请输入员工姓名"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录手机号:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"staffPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入您有效的手机号作为登录账户"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"text"
name=
"staffPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入您有效的手机号作为登录账户"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录密码:
</label>
<div
class=
"layui-input-block"
style=
"position: relative"
>
<input
type=
"password"
name=
"password"
id=
"password"
maxlength=
"15"
required
lay-verify=
"required|pass"
placeholder=
"请输入登录密码"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"password"
name=
"password"
id=
"password"
maxlength=
"15"
required
lay-verify=
"required|pass"
placeholder=
"请输入登录密码"
autocomplete=
"off"
class=
"layui-input"
/>
<button
type=
"button"
class=
"layui-btn form-right hide"
id=
"resetpsw"
>
重置密码
</button>
</div>
</div>
...
...
@@ -163,7 +174,8 @@
<label
class=
"layui-form-label required"
>
可见商户:
</label>
<div
class=
"layui-input-block"
>
<input
class=
"layui-input"
placeholder=
"可见商户"
id=
"searchMerchant"
/>
<ul
id=
"visibleInferiorMerTree"
style=
"max-height: 200px; overflow-y: auto"
class=
"ztree wrapper-tree"
></ul>
<ul
id=
"visibleInferiorMerTree"
style=
"max-height: 200px; overflow-y: auto"
class=
"ztree wrapper-tree"
>
</ul>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -182,16 +194,9 @@
<div
class=
"upload-img-box"
>
<div
class=
"icon-add img-add show"
>
+
</div>
<img
class=
"upload-img upload-img-wh hide"
id=
"img"
/>
<input
type=
"file"
id=
"upload"
name=
"merhcnatImg"
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"
/>
<input
type=
"file"
id=
"upload"
name=
"merhcnatImg"
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>
<span
class=
"tips"
>
图片格式仅支持JPG,PNG格式,大小1M以内
</span>
</div>
...
...
@@ -199,14 +204,16 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
邮箱:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"staffEmail"
maxlength=
"30"
lay-verify=
""
placeholder=
"请输入邮箱"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"text"
name=
"staffEmail"
maxlength=
"30"
lay-verify=
""
placeholder=
"请输入邮箱"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
主要职务:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"staffJob"
maxlength=
"10"
placeholder=
"请输入主要职务"
autocomplete=
"off"
class=
"layui-input"
/>
<input
type=
"text"
name=
"staffJob"
maxlength=
"10"
placeholder=
"请输入主要职务"
autocomplete=
"off"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"footer-close"
>
...
...
@@ -247,6 +254,20 @@
// merchantAccountLevel: 1,
// merchantId: 81
// }
// 禁用所有input框的回车事件
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
for
(
let
i
=
0
;
i
<
inputs
.
length
;
i
++
)
{
var
input
=
inputs
[
i
]
input
.
onkeydown
=
function
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
event
.
keyCode
=
0
;
event
.
returnValue
=
false
;
}
}
}
var
merchantNameSelect
=
xmSelect
.
render
({
el
:
'#merchantNameSelect'
,
prop
:
{
...
...
@@ -265,7 +286,7 @@
clickClose
:
true
,
radio
:
true
,
data
:
[],
on
:
function
(
data
)
{
on
:
function
(
data
)
{
console
.
log
(
data
)
merchantId
=
data
.
change
[
0
].
id
getList
(
merchantId
)
...
...
@@ -298,7 +319,7 @@
$
(
'#addUpdateTitle'
).
text
(
'修改员工'
)
$
(
'#merchantNameSelect'
).
addClass
(
'hide'
)
}
findAllMerchant
(
function
(
result
)
{
})
findAllMerchant
(
function
(
result
)
{
})
}
...
...
@@ -559,5 +580,6 @@
}
})
</script>
</body>
</body>
</html>
\ No newline at end of file
html/merchant/add.html
View file @
fc2af01
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
...
@@ -10,8 +11,9 @@
<link
rel=
"stylesheet"
type=
"text/css"
href=
"/css/main.css"
/>
<style>
body
{
height
:
auto
;
height
:
auto
;
}
.edit-box
{
/* width: 1046px; */
padding
:
20px
20px
;
...
...
@@ -20,6 +22,7 @@
margin
:
15px
auto
;
position
:
relative
;
}
.edit-box
.grayLine
{
position
:
absolute
;
left
:
0
;
...
...
@@ -28,6 +31,7 @@
width
:
100%
;
height
:
1px
;
}
.edit-title
{
height
:
48px
;
line-height
:
48px
;
...
...
@@ -49,10 +53,12 @@
.edit-box
.layui-form-item
.layui-input-inline.w-70
{
width
:
70%
;
}
.edit-box
.layui-form-item
.layui-input-inline.w-70
#addrEl
{
width
:
calc
(
100%
-
200px
);
display
:
inline-block
;
}
.edit-box
.btn-no-border
{
border
:
none
;
}
...
...
@@ -136,11 +142,13 @@
#accountTypeEl
.layui-form-checked
:hover
i
{
color
:
#5850ff
!important
;
}
.layui-form-radio
:hover
*,
.layui-form-radioed
,
.layui-form-radioed
>
i
{
.layui-form-radioed
>
i
{
color
:
#5850ff
!important
;
}
.pageTitle
{
background-color
:
#fff
;
height
:
78px
;
...
...
@@ -160,6 +168,7 @@
width
:
100%
;
height
:
500px
;
}
.layui-no-data
.no-data
{
position
:
absolute
;
top
:
50%
;
...
...
@@ -169,23 +178,29 @@
font-size
:
14px
;
line-height
:
22px
;
}
.layui-no-data
.no-data
div
{
margin-top
:
12px
;
}
.layuui-radio
{
display
:
inline-flex
;
align-items
:
center
;
margin-right
:
20px
;
}
.layuui-radio
.layui-form-radio
{
margin
:
0
;
}
.layuui-radio
span
{
line-height
:
28px
;
}
#basicForm
{
margin-bottom
:
87px
;
}
#merchantOrgcodeEl
{
border-top-left-radius
:
0
;
border-bottom-left-radius
:
0
;
...
...
@@ -193,9 +208,9 @@
}
</style>
<title>
商户编辑
</title>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<main>
<div
class=
"Wrap"
>
...
...
@@ -210,7 +225,8 @@
<div
class=
"grayLine"
></div>
<div
class=
"layui-form-item edit-title"
style=
"position: relative"
>
<div
id=
"basic"
class=
"layui-input-inline"
>
企业基本信息
</div>
<div
id=
"createMerchantEl"
class=
"layui-input-item hide"
style=
"position: absolute; right: 0; top: -90px; font-size: normal"
>
<div
id=
"createMerchantEl"
class=
"layui-input-item hide"
style=
"position: absolute; right: 0; top: -90px; font-size: normal"
>
<label
class=
"layui-form-label"
>
渠道:
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"channelEl"
name=
"channelId"
lay-verify=
"channelId"
>
...
...
@@ -236,7 +252,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
商户名称:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
maxlength=
"50"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
<input
class=
"layui-input"
maxlength=
"50"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
</div>
</div>
</div>
...
...
@@ -257,15 +274,18 @@
</select>
</div>
<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
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"
style=
"margin-left: 20px"
>
选择地址
</button>
<button
type=
"button"
class=
"layui-btn"
data-type=
"handleSelectAddr"
style=
"margin-left: 20px"
>
选择地址
</button>
</div>
</div>
<!-- <div class="layui-form-item">
...
...
@@ -278,8 +298,10 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
联系电话:
</label>
<div
class=
"layui-input-inline removeCheckBg"
>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
/>
<input
type=
"checkbox"
name=
"isloginName"
lay-filter=
"encrypt"
lay-skin=
"primary"
title=
"联系电话同时作为登录账户名"
/>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
/>
<input
type=
"checkbox"
name=
"isloginName"
lay-filter=
"encrypt"
lay-skin=
"primary"
title=
"联系电话同时作为登录账户名"
/>
</div>
</div>
</div>
...
...
@@ -304,7 +326,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
驻店电话:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"residentPhone"
maxlength=
"11"
placeholder=
"请输入驻店电话"
lay-verify=
"residentPhone"
/>
<input
class=
"layui-input"
name=
"residentPhone"
maxlength=
"11"
placeholder=
"请输入驻店电话"
lay-verify=
"residentPhone"
/>
</div>
</div>
</div>
...
...
@@ -312,7 +335,8 @@
<label
class=
"layui-form-label"
>
营业时间:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"startDate"
class=
"layui-input"
name=
"bussinessBegintime"
placeholder=
"开始时间"
/>
<input
type=
"text"
id=
"startDate"
class=
"layui-input"
name=
"bussinessBegintime"
placeholder=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
...
...
@@ -329,7 +353,8 @@
<label
class=
"layui-form-label"
></label>
<div>
<div
class=
"layui-input-inline"
>
<input
id=
"scopeCus"
class=
"layui-input business-scope-cust"
maxlength=
"15"
placeholder=
"请自定义营业范围,建议不超过10个"
/>
<input
id=
"scopeCus"
class=
"layui-input business-scope-cust"
maxlength=
"15"
placeholder=
"请自定义营业范围,建议不超过10个"
/>
</div>
<div
class=
"layui-input-inline option-btns"
style=
"margin-left: 20px"
>
<button
type=
"button"
class=
"layui-btn btn-no-border"
data-type=
"handleAddScope"
>
...
...
@@ -358,48 +383,27 @@
<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=
"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"
/>
<input
type=
"file"
id=
"upload0"
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>
</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=
"upload1"
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"
/>
<input
type=
"file"
id=
"upload1"
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>
</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=
"upload2"
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"
/>
<input
type=
"file"
id=
"upload2"
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>
</div>
<span
class=
"tips"
>
图片格式仅支持JPG,PNG格式,大小1M以内
</span>
...
...
@@ -431,7 +435,8 @@
<label
class=
"layui-form-label"
>
账户有效期:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"effectiveStarttime"
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
<input
type=
"text"
id=
"effectiveStarttime"
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
...
...
@@ -446,15 +451,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
<input
class=
"layui-input"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
</div>
</div>
</div>
...
...
@@ -462,16 +460,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录密码:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
type=
"password"
id=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登录密码"
required
lay-verify=
"required|merchantLoginPassword"
/>
<input
class=
"layui-input"
type=
"password"
id=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登录密码"
required
lay-verify=
"required|merchantLoginPassword"
/>
<!-- <button type="button" class="layui-btn form-right hide" id="resetpsw">重置密码</button> -->
</div>
</div>
...
...
@@ -479,7 +469,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
账户等级:
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"accountLevelEl"
name=
"merchantAccountLevel"
required
lay-vertify=
"required"
lay-search
></select>
<select
id=
"accountLevelEl"
name=
"merchantAccountLevel"
required
lay-vertify=
"required"
lay-search
></select>
</div>
</div>
<!-- <div class="layui-form-item" id="effectiveShowEl">
...
...
@@ -586,6 +577,18 @@
accountTypeList
:
[]
}
// 禁用所有input框的回车事件
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
for
(
let
i
=
0
;
i
<
inputs
.
length
;
i
++
)
{
var
input
=
inputs
[
i
]
input
.
onkeydown
=
function
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
event
.
keyCode
=
0
;
event
.
returnValue
=
false
;
}
}
}
var
startDate
=
laydate
.
render
({
elem
:
'#startDate'
,
//指定元素
type
:
'time'
,
...
...
@@ -1835,5 +1838,6 @@
<
/div
>
<
/div
>
</script>
</body>
</body>
</html>
\ No newline at end of file
html/merchant/addSubMerchant.html
View file @
fc2af01
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
...
@@ -15,6 +16,7 @@
.clearfix
{
zoom
:
1
;
}
.clearfix
::after
{
content
:
''
;
display
:
block
;
...
...
@@ -22,6 +24,7 @@
clear
:
both
;
visibility
:
hidden
;
}
.edit-box
{
/* width: 1046px; */
padding
:
20px
20px
;
...
...
@@ -30,6 +33,7 @@
margin
:
15px
auto
;
position
:
relative
;
}
.edit-box
.grayLine
{
position
:
absolute
;
left
:
0
;
...
...
@@ -38,6 +42,7 @@
width
:
100%
;
height
:
1px
;
}
.edit-title
{
height
:
48px
;
line-height
:
48px
;
...
...
@@ -59,10 +64,12 @@
.edit-box
.layui-form-item
.layui-input-inline.w-70
{
width
:
70%
;
}
.edit-box
.layui-form-item
.layui-input-inline.w-70
#addrEl
{
width
:
calc
(
100%
-
200px
);
display
:
inline-block
;
}
.edit-box
.btn-no-border
{
border
:
none
;
}
...
...
@@ -91,9 +98,11 @@
.edit-box
.m-t-10
{
margin-top
:
10px
;
}
.edit-box
.label-text
{
line-height
:
32px
;
}
.edit-box
.upload-img-wh
{
width
:
120px
!important
;
height
:
80px
;
...
...
@@ -147,11 +156,13 @@
#accountTypeEl
.layui-form-checked
:hover
i
{
color
:
#5850ff
!important
;
}
.layui-form-radio
:hover
*,
.layui-form-radioed
,
.layui-form-radioed
>
i
{
.layui-form-radioed
>
i
{
color
:
#5850ff
!important
;
}
.pageTitle
{
background-color
:
#fff
;
height
:
78px
;
...
...
@@ -162,6 +173,7 @@
padding
:
0
20px
;
width
:
100%
;
}
/* .Wrap {
margin: 8px auto 0;
width: 1046px;
...
...
@@ -169,10 +181,12 @@
.layui-tab-content
{
position
:
relative
;
}
.layui-no-data
{
width
:
100%
;
height
:
500px
;
}
.layui-no-data
.no-data
{
position
:
absolute
;
top
:
50%
;
...
...
@@ -182,28 +196,33 @@
font-size
:
14px
;
line-height
:
22px
;
}
.layui-no-data
.no-data
div
{
margin-top
:
12px
;
}
.layuui-radio
{
display
:
inline-flex
;
align-items
:
center
;
margin-right
:
20px
;
}
.layuui-radio
.layui-form-radio
{
margin
:
0
;
}
.layuui-radio
span
{
line-height
:
28px
;
}
#basicForm
{
margin-bottom
:
87px
;
}
</style>
<title>
商户编辑
</title>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<main>
<div
class=
"Wrap"
>
...
...
@@ -223,7 +242,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
商户名称:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
maxlength=
"50"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
<input
class=
"layui-input"
maxlength=
"50"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
</div>
</div>
</div>
...
...
@@ -244,13 +264,15 @@
</select>
</div>
<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
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>
...
...
@@ -265,8 +287,10 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
联系电话:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
/>
<input
type=
"checkbox"
name=
"isloginName"
lay-filter=
"encrypt"
lay-skin=
"primary"
title=
"联系电话同时作为登录账户名"
/>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
/>
<input
type=
"checkbox"
name=
"isloginName"
lay-filter=
"encrypt"
lay-skin=
"primary"
title=
"联系电话同时作为登录账户名"
/>
</div>
</div>
</div>
...
...
@@ -291,7 +315,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
驻店电话:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"residentPhone"
maxlength=
"11"
placeholder=
"请输入驻店电话"
lay-verify=
"residentPhone"
/>
<input
class=
"layui-input"
name=
"residentPhone"
maxlength=
"11"
placeholder=
"请输入驻店电话"
lay-verify=
"residentPhone"
/>
</div>
</div>
</div>
...
...
@@ -299,7 +324,8 @@
<label
class=
"layui-form-label"
>
营业时间:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"startDate"
class=
"layui-input"
name=
"bussinessBegintime"
placeholder=
"开始时间"
/>
<input
type=
"text"
id=
"startDate"
class=
"layui-input"
name=
"bussinessBegintime"
placeholder=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
...
...
@@ -316,7 +342,8 @@
<label
class=
"layui-form-label"
></label>
<div>
<div
class=
"layui-input-inline"
>
<input
id=
"scopeCus"
class=
"layui-input business-scope-cust"
maxlength=
"15"
placeholder=
"请自定义营业范围,建议不超过10个"
/>
<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"
>
...
...
@@ -345,48 +372,27 @@
<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=
"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"
/>
<input
type=
"file"
id=
"upload0"
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>
</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=
"upload1"
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"
/>
<input
type=
"file"
id=
"upload1"
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>
</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=
"upload2"
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"
/>
<input
type=
"file"
id=
"upload2"
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>
</div>
<span
class=
"tips"
>
图片格式仅支持JPG,PNG格式,大小1M以内
</span>
...
...
@@ -418,15 +424,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
<input
class=
"layui-input"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
</div>
</div>
</div>
...
...
@@ -434,16 +433,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录密码:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
type=
"password"
id=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登录密码"
required
lay-verify=
"required|merchantLoginPassword"
/>
<input
class=
"layui-input"
type=
"password"
id=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登录密码"
required
lay-verify=
"required|merchantLoginPassword"
/>
<!-- <button type="button" class="layui-btn form-right hide" id="resetpsw">重置密码</button> -->
</div>
</div>
...
...
@@ -452,18 +443,21 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
账户等级:
</label>
<div
class=
"layui-input-inline"
>
<select
id=
"accountLevelEl"
name=
"merchantAccountLevel"
lay-filter=
"accountLevel"
required
lay-vertify=
"required"
lay-search
></select>
<select
id=
"accountLevelEl"
name=
"merchantAccountLevel"
lay-filter=
"accountLevel"
required
lay-vertify=
"required"
lay-search
></select>
</div>
</div>
<div
class=
"layui-form-item hide"
id=
"effectiveShowEl"
>
<label
class=
"layui-form-label required"
>
账户有效期:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"effectiveStarttime"
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
<input
type=
"text"
id=
"effectiveStarttime"
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"expireDate"
disabled
class=
"layui-input"
name=
"expireDate"
placeholder=
"结束时间"
/>
<input
type=
"text"
id=
"expireDate"
disabled
class=
"layui-input"
name=
"expireDate"
placeholder=
"结束时间"
/>
</div>
<button
id=
"sevenday"
type=
"button"
class=
"layui-btn btn-no-border"
>
续7天
</button>
<button
id=
"oneyear"
type=
"button"
class=
"layui-btn btn-no-border"
>
续1年
</button>
...
...
@@ -583,6 +577,18 @@
accountTypeList
:
[]
}
// 禁用所有input框的回车事件
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
for
(
let
i
=
0
;
i
<
inputs
.
length
;
i
++
)
{
var
input
=
inputs
[
i
]
input
.
onkeydown
=
function
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
event
.
keyCode
=
0
;
event
.
returnValue
=
false
;
}
}
}
var
startDate
=
laydate
.
render
({
elem
:
'#startDate'
,
//指定元素
type
:
'time'
,
...
...
@@ -632,7 +638,7 @@
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
,
btns
:
[
'clear'
,
'confirm'
],
min
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()
+
1
}
`
min
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()
+
1
}
`
})
editLevel
=
qs
(
'editLevel'
)
...
...
@@ -777,8 +783,8 @@
merchantForm
[
item
]
=
formData
[
item
]
||
''
params
[
item
]
=
formData
[
item
]
||
''
})
if
(
formData
.
effectiveStarttime
)
params
.
effectiveStarttime
=
new
Date
(
formData
.
effectiveStarttime
)
if
(
formData
.
expireDate
)
params
.
expireDate
=
new
Date
(
formData
.
expireDate
)
if
(
formData
.
effectiveStarttime
)
params
.
effectiveStarttime
=
new
Date
(
formData
.
effectiveStarttime
)
if
(
formData
.
expireDate
)
params
.
expireDate
=
new
Date
(
formData
.
expireDate
)
// if (merchantId) {
// params.effectiveTime = merchantForm.effectiveTime
// }
...
...
@@ -1854,5 +1860,6 @@
<
/div
>
<
/div
>
</script>
</body>
</body>
</html>
\ No newline at end of file
html/merchant/edit.html
View file @
fc2af01
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
...
@@ -15,21 +16,26 @@
.grayBgWrap
{
padding-bottom
:
100px
;
}
.grayBgWrap
.layui-tree-box
{
padding
:
0
;
background-color
:
#fff
;
}
/* .contentGrayBg */
.contentGrayBg
.layui-this
{
background-color
:
#fff
;
border
:
2px
solid
#fff
;
}
.contentGrayBg
.layui-tab
{
border
:
10px
solid
#f4f6fc
;
}
.clearfix
{
zoom
:
1
;
}
.clearfix
::after
{
content
:
''
;
display
:
block
;
...
...
@@ -37,6 +43,7 @@
clear
:
both
;
visibility
:
hidden
;
}
.edit-box
{
/* width: 1046px; */
padding
:
20px
20px
;
...
...
@@ -66,6 +73,7 @@
.edit-box
.layui-form-item
.layui-input-inline.w-70
{
width
:
70%
;
}
.edit-box
.layui-form-item
.layui-input-inline.w-70
#addrEl
{
width
:
calc
(
100%
-
200px
);
display
:
inline-block
;
...
...
@@ -152,18 +160,22 @@
#accountTypeEl
.layui-form-checked
:hover
i
{
color
:
#5850ff
!important
;
}
.layui-form-radio
:hover
*,
.layui-form-radioed
,
.layui-form-radioed
>
i
{
.layui-form-radioed
>
i
{
color
:
#5850ff
!important
;
}
.layui-tab-content
{
position
:
relative
;
}
.layui-no-data
{
width
:
100%
;
height
:
500px
;
}
.layui-no-data
.no-data
{
position
:
absolute
;
top
:
50%
;
...
...
@@ -173,33 +185,39 @@
font-size
:
14px
;
line-height
:
22px
;
}
.layui-no-data
.no-data
div
{
margin-top
:
12px
;
}
.layuui-radio
{
display
:
inline-flex
;
align-items
:
center
;
margin-right
:
20px
;
}
.layuui-radio
.layui-form-radio
{
margin
:
0
;
}
.layuui-radio
span
{
line-height
:
28px
;
}
#basicForm
{
margin-bottom
:
87px
;
}
</style>
<title>
商户编辑
</title>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<main>
<div
class=
"layui-tab layui-top-tab layui-tab-brief grayBgWrap"
lay-filter=
"editTab"
>
<ul
class=
"layui-tab-title"
>
<li
lay-id=
"2"
id=
"functional"
class=
"layui-this"
style=
"padding: 0; width: 90px; margin-right: 20px"
>
修改功能权限
</li>
<li
lay-id=
"2"
id=
"functional"
class=
"layui-this"
style=
"padding: 0; width: 90px; margin-right: 20px"
>
修改功能权限
</li>
<li
lay-id=
"1"
id=
"basic"
style=
"padding: 0; width: 90px"
>
修改基本信息
</li>
</ul>
<div
class=
"layui-tab-content m-t-md removeCheckBg"
>
...
...
@@ -243,30 +261,15 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
<input
class=
"layui-input"
id=
"merchantLoginAccountEl"
name=
"merchantLoginAccount"
maxlength=
"15"
placeholder=
"请输入登录账户名"
required
lay-verify=
"required|merchantLoginAccount"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录密码:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
type=
"password"
id=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登录密码"
required
lay-verify=
"required|merchantLoginPassword"
/>
<input
class=
"layui-input"
type=
"password"
id=
"password"
name=
"merchantLoginPassword"
maxlength=
"15"
placeholder=
"请输入登录密码"
required
lay-verify=
"required|merchantLoginPassword"
/>
<button
type=
"button"
class=
"layui-btn form-right hide"
id=
"resetpsw"
>
重置密码
</button>
</div>
</div>
...
...
@@ -274,7 +277,8 @@
<label
class=
"layui-form-label required"
>
账户有效期:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"effectiveStarttime"
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
<input
type=
"text"
id=
"effectiveStarttime"
class=
"layui-input"
name=
"effectiveStarttime"
placeholder=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
...
...
@@ -308,11 +312,13 @@
<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=
"单店企微版"
/>
<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=
"集团企微版"
/>
<input
type=
"radio"
name=
"merchantModel"
required
lay-verify=
"otherReq"
value=
"1"
title=
"集团企微版"
/>
<span>
(集团多个企微共用一个企微账户授权)
</span>
</div>
</div>
...
...
@@ -321,7 +327,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
商户名称:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
maxlength=
"50"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
<input
class=
"layui-input"
maxlength=
"50"
name=
"merchantName"
required
lay-verify=
"required"
placeholder=
"请输入商户名称"
/>
</div>
</div>
</div>
...
...
@@ -342,13 +349,15 @@
</select>
</div>
<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
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>
...
...
@@ -357,8 +366,10 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
联系电话:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
/>
<input
type=
"checkbox"
name=
"isloginName"
lay-filter=
"encrypt"
lay-skin=
"primary"
title=
"联系电话同时作为登录账户名"
/>
<input
class=
"layui-input"
name=
"merchantLegalPersonPhone"
maxlength=
"11"
required
lay-verify=
"required|phone"
placeholder=
"请输入联系电话"
/>
<input
type=
"checkbox"
name=
"isloginName"
lay-filter=
"encrypt"
lay-skin=
"primary"
title=
"联系电话同时作为登录账户名"
/>
</div>
</div>
</div>
...
...
@@ -383,7 +394,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
驻店电话:
</label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"residentPhone"
maxlength=
"11"
placeholder=
"请输入驻店电话"
lay-verify=
"residentPhone"
/>
<input
class=
"layui-input"
name=
"residentPhone"
maxlength=
"11"
placeholder=
"请输入驻店电话"
lay-verify=
"residentPhone"
/>
</div>
</div>
</div>
...
...
@@ -391,11 +403,13 @@
<label
class=
"layui-form-label"
>
营业时间:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"startDate"
autocomplete=
"off"
class=
"layui-input"
name=
"bussinessBegintime"
placeholder=
"开始时间"
/>
<input
type=
"text"
id=
"startDate"
autocomplete=
"off"
class=
"layui-input"
name=
"bussinessBegintime"
placeholder=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"endDate"
class=
"layui-input"
name=
"bussinessEndtime"
placeholder=
"结束时间"
/>
<input
type=
"text"
id=
"endDate"
class=
"layui-input"
name=
"bussinessEndtime"
placeholder=
"结束时间"
/>
</div>
</div>
</div>
...
...
@@ -408,7 +422,8 @@
<label
class=
"layui-form-label"
></label>
<div>
<div
class=
"layui-input-inline"
>
<input
id=
"scopeCus"
class=
"layui-input business-scope-cust"
maxlength=
"15"
placeholder=
"请自定义营业范围,建议不超过10个"
/>
<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"
>
...
...
@@ -437,48 +452,27 @@
<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=
"merhcnatImg0"
ref=
"file"
<input
type=
"file"
id=
"upload0"
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"
/>
accept=
"image/png, image/jpeg, image/gif, image/jpg"
data-idx=
"0"
style=
"opacity: 0"
/>
</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=
"upload1"
name=
"merhcnatImg1"
ref=
"file"
<input
type=
"file"
id=
"upload1"
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"
/>
accept=
"image/png, image/jpeg, image/gif, image/jpg"
data-idx=
"1"
style=
"opacity: 0"
/>
</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=
"upload2"
name=
"merhcnatImg2"
ref=
"file"
<input
type=
"file"
id=
"upload2"
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"
/>
accept=
"image/png, image/jpeg, image/gif, image/jpg"
data-idx=
"2"
style=
"opacity: 0"
/>
</div>
</div>
<span
class=
"tips"
>
图片格式仅支持JPG,PNG格式,大小1M以内
</span>
...
...
@@ -531,7 +525,7 @@
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
merchantAccountLevel
=
qs
(
'merchantAccountLevel'
)
var
model
=
qs
(
'model'
)
console
.
log
(
merchantAccountLevel
==
4
,
!
accountInfo
,
qs
(
'status'
)
==
1
)
console
.
log
(
merchantAccountLevel
==
4
,
!
accountInfo
,
qs
(
'status'
)
==
1
)
if
(
merchantAccountLevel
==
4
&&
!
accountInfo
&&
qs
(
'status'
)
==
1
)
{
// 上级是市代,子商户为门店,显示 有效期
$
(
'#effectiveShowEl'
).
removeClass
(
'hide'
)
...
...
@@ -575,6 +569,18 @@
accountTypeList
:
[]
}
// 禁用所有input框的回车事件
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
for
(
let
i
=
0
;
i
<
inputs
.
length
;
i
++
)
{
var
input
=
inputs
[
i
]
input
.
onkeydown
=
function
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
event
.
keyCode
=
0
;
event
.
returnValue
=
false
;
}
}
}
var
startDate
=
laydate
.
render
({
elem
:
'#startDate'
,
//指定元素
type
:
'time'
,
...
...
@@ -623,7 +629,7 @@
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
,
btns
:
[
'clear'
,
'confirm'
],
min
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()
+
1
}
`
min
:
`
${
new
Date
().
getFullYear
()}
-
${
new
Date
().
getMonth
()
+
1
}
-
${
new
Date
().
getDate
()
+
1
}
`
})
editLevel
=
qs
(
'editLevel'
)
...
...
@@ -758,8 +764,8 @@
merchantForm
[
item
]
=
formData
[
item
]
||
''
params
[
item
]
=
formData
[
item
]
||
''
})
if
(
formData
.
effectiveStarttime
)
params
.
effectiveStarttime
=
new
Date
(
formData
.
effectiveStarttime
)
if
(
formData
.
expireDate
)
params
.
expireDate
=
new
Date
(
formData
.
expireDate
)
if
(
formData
.
effectiveStarttime
)
params
.
effectiveStarttime
=
new
Date
(
formData
.
effectiveStarttime
)
if
(
formData
.
expireDate
)
params
.
expireDate
=
new
Date
(
formData
.
expireDate
)
if
(
merchantId
)
{
params
.
effectiveTime
=
merchantForm
.
effectiveTime
}
...
...
@@ -1144,11 +1150,16 @@
// baseIsShow(false)
// treeIsShow(true)
}
console
.
log
(
model
)
// if (qs('status') == 1 && !helper.store.get('accountInfo') && isFactory) {
// $('#merchantModel').removeClass('hide')
// $('#merchantModel').addClass('show')
// }
if
(
!
accountInfo
&&
isFactory
)
{
if
(
qs
(
'status'
)
==
1
)
{
$
(
'#merchantModel'
).
removeClass
(
'hide'
)
$
(
'#merchantModel'
).
addClass
(
'show'
)
}
else
if
(
qs
(
'model'
)
==
'-'
)
{
}
else
if
(
model
==
'-'
)
{
$
(
'#merchantModel'
).
removeClass
(
'hide'
)
$
(
'#merchantModel'
).
addClass
(
'show'
)
}
...
...
@@ -1926,5 +1937,6 @@
<
/div
>
<
/div
>
</script>
</body>
</body>
</html>
\ No newline at end of file
html/merchant/index.html
View file @
fc2af01
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
...
@@ -12,9 +13,11 @@
.h20
{
height
:
20px
;
}
.mb5
{
margin-bottom
:
5px
;
}
.merchant
.layui-table
{
margin
:
0
;
width
:
100%
;
...
...
@@ -28,6 +31,7 @@
.layui-btn-xs
{
cursor
:
pointer
;
}
.layui-form-label
{
width
:
130px
;
}
...
...
@@ -38,11 +42,13 @@
.mode
{
margin-left
:
30px
;
}
.input-before-name
{
width
:
80px
;
text-align
:
right
;
display
:
inline-block
;
}
.commonInput
{
width
:
260px
;
}
...
...
@@ -51,17 +57,21 @@
display
:
flex
;
align-items
:
center
;
}
.relevancyImg
{
width
:
20px
;
height
:
20px
;
margin-right
:
5px
;
}
.hide
{
display
:
none
;
}
.show
{
display
:
inline-block
;
}
.merchantTable
.layui-table-cell
{
/* height: auto; */
/* line-height: 88px; */
...
...
@@ -74,9 +84,9 @@
}
</style>
<title>
商户管理
</title>
</head>
</head>
<body>
<body>
<div
class=
"merchant"
id=
"app"
>
<main>
<div
class=
"context-block"
>
...
...
@@ -93,7 +103,6 @@
<div
id=
"relevancyEl"
class=
"layui-inline hide"
>
<button
class=
"layui-btn mb5"
id=
"relevancyBtn"
>
<img
class=
"relevancyImg"
src=
"../../css/img/relevancy.png"
alt=
""
/>
<!-- <i class="layui-icon layui-icon-addition"></i> -->
门店账户关联企微
</button>
</div>
...
...
@@ -148,7 +157,9 @@
</div>
<!-- margin-left: -5px -->
<div
class=
"layui-input-inline"
style=
"width: 286px; margin-left: -4px"
>
<input
class=
"layui-input"
type=
"text"
placeholder=
"请输入"
name=
"merchantLoginAccount"
id=
"updateCircleAngle"
/>
<input
class=
"layui-input"
type=
"text"
placeholder=
"请输入"
name=
"merchantLoginAccount"
id=
"updateCircleAngle"
onkeydown=
"if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}"
/>
</div>
</div>
<div
id=
"model"
>
...
...
@@ -174,7 +185,9 @@
<div
style=
"display: flex; justify-content: space-between"
>
<div
class=
"layui-inline customerStatus"
>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
type=
"text"
style=
"width: 404px"
name=
"merchantName"
placeholder=
"请输入商户名称/关联的企业微信名"
/>
<input
class=
"layui-input"
type=
"text"
style=
"width: 404px"
name=
"merchantName"
placeholder=
"请输入商户名称/关联的企业微信名"
onkeydown=
"if (event.keyCode == 13) {event.keyCode = 0;event.returnValue = false;}"
/>
</div>
</div>
<div
class=
"layui-inline searchInputBtn"
>
...
...
@@ -373,8 +386,8 @@
{
field
:
'merchantName'
,
title
:
'商户名称'
,
align
:
'center'
//
width: 150
align
:
'center'
,
width
:
150
},
{
field
:
'entmicroName'
,
...
...
@@ -385,7 +398,7 @@
{
field
:
'accountTypeNames'
,
title
:
'账户类型'
,
align
:
'left
'
,
align
:
'center
'
,
width
:
150
,
templet
:
'#accountTypeTpl'
},
...
...
@@ -478,7 +491,7 @@
table
.
on
(
'tool(merchant-table-filter)'
,
function
(
obj
)
{
var
eventName
=
obj
.
event
var
row
=
obj
.
data
console
.
log
(
row
)
console
.
log
(
row
.
merchantAccountLevel
)
switch
(
eventName
)
{
// 查看
case
'handleDetail'
:
...
...
@@ -581,11 +594,10 @@
})
init
()
document
.
onkeypress
=
function
(
e
)
{
e
.
preventDefault
()
}
$
(
'#addBtn'
).
on
(
'click'
,
function
()
{
$
(
'#addBtn'
).
on
(
'click'
,
function
(
e
)
{
// 1-创建新商户;2-创建子商户;3-修改
// e.target.blur()
go
(
'merchant'
,
'add'
,
{
editLevel
:
1
,
step
:
1
,
...
...
@@ -860,5 +872,6 @@
}
})
</script>
</body>
</body>
</html>
\ No newline at end of file
html/role/add.html
View file @
fc2af01
<!DOCTYPE html>
<html
lang=
"zh"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
content=
"IE=edge"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
/>
...
...
@@ -14,6 +15,7 @@
margin
:
8px
0
0
;
padding-bottom
:
100px
;
}
.show
{
display
:
inline-block
;
width
:
360px
;
...
...
@@ -22,6 +24,7 @@
.hide
{
display
:
none
;
}
.tabmutiple-content-wrap
{
background-color
:
#f4f6fc
;
/* padding-top: 10px; */
...
...
@@ -32,22 +35,27 @@
/* margin: 0 10px; */
background-color
:
#fff
;
}
.contentGrayBg
{
/* background-color: #fff; */
/* border: 2px solid red; */
}
.layui-tab-title
{
background-color
:
#f4f6fc
;
box-sizing
:
border-box
;
}
.contentGrayBg
.layui-this
{
background-color
:
#fff
;
border
:
2px
solid
#fff
;
margin-left
:
-3px
;
}
.contentGrayBg
.layui-tab
{
border
:
10px
solid
#f4f6fc
;
}
.edit-box
{
padding
:
0
20px
20px
;
color
:
#333333
;
...
...
@@ -56,6 +64,7 @@
position
:
relative
;
/* height: 100%; */
}
.edit-box
.grayLine
{
position
:
absolute
;
left
:
0
;
...
...
@@ -64,6 +73,7 @@
width
:
100%
;
height
:
1px
;
}
.edit-title
{
height
:
78px
;
line-height
:
78px
;
...
...
@@ -74,6 +84,7 @@
color
:
#333333
;
background-color
:
#fff
;
}
.baseInfo
{
height
:
48px
;
line-height
:
48px
;
...
...
@@ -91,10 +102,12 @@
.layui-tab-content
{
position
:
relative
;
}
.layui-no-data
{
width
:
100%
;
height
:
500px
;
}
.layui-no-data
.no-data
{
position
:
absolute
;
top
:
50%
;
...
...
@@ -104,17 +117,19 @@
font-size
:
14px
;
line-height
:
22px
;
}
.layui-no-data
.no-data
div
{
margin-top
:
12px
;
}
.xm-select-demo
,
xm-select
>
.xm-body
.scroll-body
{
xm-select
>
.xm-body
.scroll-body
{
width
:
360px
;
}
</style>
</head>
</head>
<body>
<body>
<div
id=
"app"
>
<main>
<div
class=
"Wrap"
>
...
...
@@ -140,7 +155,8 @@
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
角色名称:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"text"
name=
"roleName"
maxlength=
"15"
lay-verify=
"required"
placeholder=
"请输入角色名称"
class=
"layui-input"
/>
<input
type=
"text"
name=
"roleName"
maxlength=
"15"
lay-verify=
"required"
placeholder=
"请输入角色名称"
class=
"layui-input"
/>
</div>
</div>
<div
class=
"layui-form-item"
>
...
...
@@ -178,7 +194,7 @@
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
layui
.
use
([
'form'
,
'element'
,
'request'
,
'laytpl'
,
'xmSelect'
,
'gtree'
,
'helper'
,
'xmSelect'
],
function
()
{
layui
.
use
([
'form'
,
'element'
,
'request'
,
'laytpl'
,
'xmSelect'
,
'gtree'
,
'helper'
,
'xmSelect'
],
function
()
{
// var merchantId = qs('merchantId')
var
roleid
=
qs
(
'id'
)
var
element
=
layui
.
element
...
...
@@ -188,6 +204,17 @@
var
xmSelect
=
layui
.
xmSelect
var
request
=
layui
.
request
var
merchantId
=
''
// 禁用所有input框的回车事件
var
inputs
=
document
.
getElementsByTagName
(
'input'
)
for
(
let
i
=
0
;
i
<
inputs
.
length
;
i
++
)
{
var
input
=
inputs
[
i
]
input
.
onkeydown
=
function
(
event
)
{
if
(
event
.
keyCode
==
13
)
{
event
.
keyCode
=
0
;
event
.
returnValue
=
false
;
}
}
}
var
merchantNameSelect
=
xmSelect
.
render
({
el
:
'#merchantNameSelect'
,
prop
:
{
...
...
@@ -206,7 +233,7 @@
radio
:
true
,
clickClose
:
true
,
data
:
[],
on
:
function
(
data
)
{
on
:
function
(
data
)
{
console
.
log
(
data
)
merchantId
=
data
.
change
[
0
].
id
findMenuFunTreeByMerId
(
merchantId
)
...
...
@@ -257,7 +284,7 @@
* productList:复选下拉框的list,修改过的数据{name: '', value: ''}
* products:对应的菜单下的产品list,包含了对应的权限树,原始数据,需作为参数传入treeTabAdd中,在实例化tree时传入的数据使用
*/
tabAdd
:
function
(
item
,
productList
)
{
tabAdd
:
function
(
item
,
productList
)
{
// 渠道的id,一层选项卡的id
var
id
=
item
.
value
// roleAuth 一层选项卡过滤器的名称
...
...
@@ -291,7 +318,7 @@
// '<div id="select{{d.id}}"></div> <div class="layui-tab layui-tab-brief" lay-filter="treeTab{{d.id}}"><ul class="layui-tab-title"></ul> <div class="layui-tab-content"></div></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 productList = []
...
...
@@ -348,11 +375,11 @@
// console.log(selectEl[id])
},
// tab删除
tabDelete
:
function
(
name
,
id
)
{
tabDelete
:
function
(
name
,
id
)
{
element
.
tabDelete
(
name
,
id
)
},
// tab Change
tabChange
:
function
(
name
,
id
)
{
tabChange
:
function
(
name
,
id
)
{
console
.
log
(
name
,
id
)
element
.
tabChange
(
name
,
id
)
if
(
name
==
'roleAuth'
)
{
...
...
@@ -391,7 +418,7 @@
* products:产品list数组
* defaultList:编辑时传入,默认勾选中的数组。(举例:[1,2,3])
*/
treeTabAdd
:
function
(
item
,
id
,
treeListData
,
defaultList
)
{
treeTabAdd
:
function
(
item
,
id
,
treeListData
,
defaultList
)
{
console
.
log
(
item
,
id
,
treeListData
,
defaultList
)
var
productId
=
'tab_'
+
id
+
'_'
+
item
.
value
var
filterName
=
'treeTab'
+
id
// 过滤器的名称 lay-filter
...
...
@@ -406,7 +433,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
)
{
console
.
log
(
treeView
)
treeView
.
innerHTML
=
html
})
...
...
@@ -438,7 +465,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
...
...
@@ -479,7 +506,7 @@
})
// 复选框的change事件
form
.
on
(
'checkbox(switch)'
,
function
(
data
)
{
form
.
on
(
'checkbox(switch)'
,
function
(
data
)
{
console
.
log
(
data
,
'111111111'
,
treeData
)
if
(
data
.
elem
.
checked
)
{
var
obj
=
{
title
:
data
.
elem
.
title
,
value
:
data
.
elem
.
value
}
...
...
@@ -508,7 +535,7 @@
// end
// 表单提交
form
.
on
(
'submit(roleSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(roleSubmit)'
,
function
(
data
)
{
console
.
log
(
data
.
value
,
check_arr
,
treeData
)
if
(
check_arr
.
length
==
0
)
{
layer
.
msg
(
'请选择角色权限'
,
{
...
...
@@ -522,7 +549,7 @@
})
// select 选择触发
form
.
on
(
'select(merchants)'
,
function
(
data
)
{
form
.
on
(
'select(merchants)'
,
function
(
data
)
{
console
.
log
(
data
.
value
,
check_arr
,
treeData
)
check_arr
.
forEach
(
item
=>
{
active
.
tabDelete
(
'roleAuth'
,
item
.
accounttypeId
)
...
...
@@ -534,10 +561,10 @@
})
// 存草稿
$
(
'#draft'
).
on
(
'click'
,
function
()
{
$
(
'#draft'
).
on
(
'click'
,
function
()
{
var
formVal
=
form
.
val
(
'roleForm'
)
console
.
log
(
formVal
)
if
(
!
formVal
.
merchantId
)
{
if
(
!
formVal
.
merchantId
)
{
layer
.
msg
(
'请选择所属商户'
,
{
icon
:
2
})
...
...
@@ -555,7 +582,7 @@
})
// 返回上个页面
$
(
'#return'
).
on
(
'click'
,
function
()
{
$
(
'#return'
).
on
(
'click'
,
function
()
{
window
.
history
.
back
()
})
...
...
@@ -607,7 +634,7 @@
var
params
=
helper
.
clone
(
true
,
formVal
,
otherParams
)
delete
params
.
select
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
...
...
@@ -623,7 +650,7 @@
method
:
'cn.com.glsx.merchants.merchant.findMenuFunTreeByMerId'
,
id
:
merchantId
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
// callback(res.data)
menuFunTreeData
=
res
.
data
...
...
@@ -729,7 +756,7 @@
method
:
'org.ore.api.role.getById'
,
id
:
id
}
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
var
data
=
res
.
data
var
accounttypeId
=
''
...
...
@@ -766,7 +793,7 @@
var
functionValueIdLists
=
[]
if
(
productObj
.
treeObj
)
{
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'
)
{
...
...
@@ -777,10 +804,10 @@
}
}
})
$
.
each
(
functionValueIdLists
,
function
(
idx
,
m
)
{
$
.
each
(
functionValueIdLists
,
function
(
idx
,
m
)
{
// m.parentId
var
findIdx
=
-
1
$
.
each
(
functionIdList
,
function
(
idn
,
n
)
{
$
.
each
(
functionIdList
,
function
(
idn
,
n
)
{
if
(
n
.
id
==
m
.
parentId
)
{
findIdx
=
idn
}
...
...
@@ -795,7 +822,7 @@
})
}
})
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
$
.
each
(
functionIdLists
,
function
(
idx
,
m
)
{
// console.log(m)
functionIdList
.
push
({
id
:
m
.
parentId
,
...
...
@@ -834,7 +861,7 @@
// 查询所有商户
function
findAllMerchant
()
{
var
params
=
{
method
:
'cn.com.glsx.merchants.menu.findAllMerchant'
}
request
(
params
,
function
(
result
)
{
request
(
params
,
function
(
result
)
{
if
(
result
.
code
==
'0'
)
{
console
.
log
(
result
)
merchantNameSelect
.
update
({
...
...
@@ -874,5 +901,6 @@
<
/div
>
<
/div
>
</script>
</body>
</body>
</html>
\ No newline at end of file
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