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 f7a674a5
authored
Oct 27, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修复bug
1 parent
c12d4857
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
146 additions
and
55 deletions
html/employee/index.html
html/merchant/add.html
html/merchant/addSubMerchant.html
html/merchant/detail.html
html/merchant/edit.html
html/merchant/index.html
html/employee/index.html
View file @
f7a674a
...
@@ -16,6 +16,9 @@
...
@@ -16,6 +16,9 @@
xm-select
>
.xm-body
.scroll-body
{
xm-select
>
.xm-body
.scroll-body
{
width
:
300px
;
width
:
300px
;
}
}
xm-select
:hover
{
border
:
1px
solid
#5850ff
!important
;
}
</style>
</style>
<body>
<body>
...
@@ -190,6 +193,7 @@
...
@@ -190,6 +193,7 @@
name
:
'merchantName'
,
name
:
'merchantName'
,
value
:
'id'
value
:
'id'
},
},
name
:
'merchantId'
,
filterable
:
true
,
filterable
:
true
,
radio
:
true
,
radio
:
true
,
data
:
[]
data
:
[]
...
@@ -225,7 +229,7 @@
...
@@ -225,7 +229,7 @@
})
})
}
else
if
(
layEvent
===
'updateTime'
)
{
}
else
if
(
layEvent
===
'updateTime'
)
{
console
.
log
(
data
.
id
,
data
.
effectiveTime
)
console
.
log
(
data
.
id
,
data
.
effectiveTime
)
layer
.
open
({
layer
.
open
({
type
:
2
,
type
:
2
,
title
:
''
,
title
:
''
,
closeBtn
:
0
,
closeBtn
:
0
,
...
@@ -368,12 +372,8 @@
...
@@ -368,12 +372,8 @@
searchData
.
staffName
=
''
searchData
.
staffName
=
''
searchData
.
staffPhone
=
''
searchData
.
staffPhone
=
''
}
}
if
(
searchData
.
select
)
{
searchData
.
merchantId
=
searchData
.
select
}
delete
searchData
.
type
delete
searchData
.
type
delete
searchData
.
keywords
delete
searchData
.
keywords
delete
searchData
.
select
return
searchData
return
searchData
}
}
...
...
html/merchant/add.html
View file @
f7a674a
...
@@ -206,7 +206,7 @@
...
@@ -206,7 +206,7 @@
<div
class=
"edit-box clearfix"
>
<div
class=
"edit-box clearfix"
>
<div
class=
"grayLine"
></div>
<div
class=
"grayLine"
></div>
<div
class=
"layui-form-item edit-title"
style=
"position: relative"
>
<div
class=
"layui-form-item edit-title"
style=
"position: relative"
>
<div
class=
"layui-input-inline"
>
企业基本信息
</div>
<div
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>
<label
class=
"layui-form-label"
>
渠道:
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
...
@@ -469,7 +469,7 @@
...
@@ -469,7 +469,7 @@
required
required
lay-verify=
"required|merchantLoginPassword"
lay-verify=
"required|merchantLoginPassword"
/>
/>
<
button
type=
"button"
class=
"layui-btn form-right hide"
id=
"resetpsw"
>
重置密码
</button
>
<
!-- <button type="button" class="layui-btn form-right hide" id="resetpsw">重置密码</button> --
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -500,6 +500,9 @@
...
@@ -500,6 +500,9 @@
<!-- 权限树 -->
<!-- 权限树 -->
<div
id=
"authorityTree"
>
<div
id=
"authorityTree"
>
<div
class=
"edit-box"
>
<div
class=
"edit-box"
>
<div
class=
"layui-form-item edit-title"
style=
"position: relative"
>
<div
class=
"layui-input-inline"
>
功能权限
</div>
</div>
<!-- 树 -->
<!-- 树 -->
<!-- <div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label required">角色权限:</label>
<label class="layui-form-label required">角色权限:</label>
...
@@ -630,13 +633,13 @@
...
@@ -630,13 +633,13 @@
isFactory
=
qs
(
'isFactory'
)
==
'true'
isFactory
=
qs
(
'isFactory'
)
==
'true'
step
=
qs
(
'step'
)
step
=
qs
(
'step'
)
var
pwd
=
$
(
'#password'
)
// 密码输入框
var
pwd
=
$
(
'#password'
)
// 密码输入框
var
resetpsw
=
$
(
'#resetpsw'
)
//
var resetpsw = $('#resetpsw')
// pwd.attr('readonly', false)
// pwd.attr('readonly', false)
// 重置密码
// 重置密码
resetpsw
.
on
(
'click'
,
function
()
{
//
resetpsw.on('click', function () {
pwd
.
attr
(
'readonly'
,
false
)
//
pwd.attr('readonly', false)
pwd
.
val
(
''
)
//
pwd.val('')
})
//
})
init
()
init
()
// 校验
// 校验
...
@@ -705,6 +708,7 @@
...
@@ -705,6 +708,7 @@
})
})
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
document
.
querySelector
(
'#basic'
).
scrollIntoView
(
true
)
console
.
log
(
data
)
console
.
log
(
data
)
var
formData
=
data
.
field
var
formData
=
data
.
field
var
params
=
{
var
params
=
{
...
@@ -1028,10 +1032,10 @@
...
@@ -1028,10 +1032,10 @@
getPeriod
()
getPeriod
()
baseIsShow
(
true
)
baseIsShow
(
true
)
treeIsShow
(
false
)
treeIsShow
(
false
)
if
(
merchantId
)
{
//
if (merchantId) {
resetpsw
.
removeClass
(
'hide'
)
//
resetpsw.removeClass('hide')
resetpsw
.
addClass
(
'show'
)
//
resetpsw.addClass('show')
}
//
}
if
(
isFactory
)
{
if
(
isFactory
)
{
$
(
'#subMerchantEl'
).
hide
()
$
(
'#subMerchantEl'
).
hide
()
$
(
'#subMerchantModel'
).
hide
()
$
(
'#subMerchantModel'
).
hide
()
...
@@ -1066,10 +1070,10 @@
...
@@ -1066,10 +1070,10 @@
if
(
!
merchantId
)
{
if
(
!
merchantId
)
{
merchantId
=
qs
(
'id'
)
merchantId
=
qs
(
'id'
)
}
}
if
(
merchantId
)
{
//
if (merchantId) {
resetpsw
.
removeClass
(
'hide'
)
//
resetpsw.removeClass('hide')
resetpsw
.
addClass
(
'show'
)
//
resetpsw.addClass('show')
}
//
}
if
(
editLevel
==
3
)
{
if
(
editLevel
==
3
)
{
$
(
'#firstBtn'
).
text
(
'确定'
)
$
(
'#firstBtn'
).
text
(
'确定'
)
$
(
'#preStep'
).
remove
()
$
(
'#preStep'
).
remove
()
...
@@ -1775,6 +1779,7 @@
...
@@ -1775,6 +1779,7 @@
$
(
'#preStep'
).
on
(
'click'
,
function
()
{
$
(
'#preStep'
).
on
(
'click'
,
function
()
{
step
=
1
step
=
1
init
()
init
()
document
.
querySelector
(
'#basic'
).
scrollIntoView
(
true
)
})
})
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
...
...
html/merchant/addSubMerchant.html
View file @
f7a674a
...
@@ -205,7 +205,7 @@
...
@@ -205,7 +205,7 @@
<main>
<main>
<div
class=
"Wrap"
>
<div
class=
"Wrap"
>
<div
class=
"pageTitle"
>
<div
class=
"pageTitle"
>
<span
id=
"addUpdateTitle"
>
创建商户
</span>
<span
id=
"addUpdateTitle"
>
创建
子
商户
</span>
</div>
</div>
<!-- <div class="edit-box"> -->
<!-- <div class="edit-box"> -->
<!-- 基本信息 -->
<!-- 基本信息 -->
...
@@ -214,7 +214,7 @@
...
@@ -214,7 +214,7 @@
<div
class=
"edit-box clearfix"
>
<div
class=
"edit-box clearfix"
>
<div
class=
"grayLine"
></div>
<div
class=
"grayLine"
></div>
<div
class=
"layui-form-item edit-title"
style=
"position: relative"
>
<div
class=
"layui-form-item edit-title"
style=
"position: relative"
>
<div
class=
"layui-input-inline"
>
企业基本信息
</div>
<div
id=
"basic"
class=
"layui-input-inline"
>
企业基本信息
</div>
</div>
</div>
<div
class=
"layui-col-md6"
>
<div
class=
"layui-col-md6"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
...
@@ -441,7 +441,7 @@
...
@@ -441,7 +441,7 @@
required
required
lay-verify=
"required|merchantLoginPassword"
lay-verify=
"required|merchantLoginPassword"
/>
/>
<
button
type=
"button"
class=
"layui-btn form-right hide"
id=
"resetpsw"
>
重置密码
</button
>
<
!-- <button type="button" class="layui-btn form-right hide" id="resetpsw">重置密码</button> --
>
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -488,6 +488,9 @@
...
@@ -488,6 +488,9 @@
<!-- 权限树 -->
<!-- 权限树 -->
<div
id=
"authorityTree"
>
<div
id=
"authorityTree"
>
<div
class=
"edit-box"
>
<div
class=
"edit-box"
>
<div
class=
"layui-form-item edit-title"
style=
"position: relative"
>
<div
class=
"layui-input-inline"
>
功能权限
</div>
</div>
<!-- 树 -->
<!-- 树 -->
<!-- <div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label required">角色权限:</label>
<label class="layui-form-label required">角色权限:</label>
...
@@ -622,20 +625,21 @@
...
@@ -622,20 +625,21 @@
var
expireDate
=
laydate
.
render
({
var
expireDate
=
laydate
.
render
({
elem
:
'#expireDate'
,
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
format
:
'yyyy-MM-dd'
,
min
:
helper
.
dateFormat
(
new
Date
())
})
})
editLevel
=
qs
(
'editLevel'
)
editLevel
=
qs
(
'editLevel'
)
isFactory
=
qs
(
'isFactory'
)
==
'true'
isFactory
=
qs
(
'isFactory'
)
==
'true'
step
=
qs
(
'step'
)
step
=
qs
(
'step'
)
var
pwd
=
$
(
'#password'
)
// 密码输入框
var
pwd
=
$
(
'#password'
)
// 密码输入框
var
resetpsw
=
$
(
'#resetpsw'
)
//
var resetpsw = $('#resetpsw')
// pwd.attr('readonly', false)
// pwd.attr('readonly', false)
// 重置密码
// 重置密码
resetpsw
.
on
(
'click'
,
function
()
{
//
resetpsw.on('click', function () {
pwd
.
attr
(
'readonly'
,
false
)
//
pwd.attr('readonly', false)
pwd
.
val
(
''
)
//
pwd.val('')
})
//
})
init
()
init
()
// 校验
// 校验
...
@@ -721,8 +725,8 @@
...
@@ -721,8 +725,8 @@
}
}
}
}
})
})
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
form
.
on
(
'submit(handleFirstSubmit)'
,
function
(
data
)
{
document
.
querySelector
(
'#basic'
).
scrollIntoView
(
true
)
console
.
log
(
data
)
console
.
log
(
data
)
var
formData
=
data
.
field
var
formData
=
data
.
field
var
params
=
{
var
params
=
{
...
@@ -1005,6 +1009,7 @@
...
@@ -1005,6 +1009,7 @@
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
console
.
log
(
helper
.
dateFormat
(
startTime
),
endTime
)
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
startTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
})
})
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
$
(
'#oneyear'
).
on
(
'click'
,
function
()
{
...
@@ -1013,6 +1018,7 @@
...
@@ -1013,6 +1018,7 @@
console
.
log
(
helper
.
dateFormat
(
endTime
))
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
})
})
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
$
(
'#twoyears'
).
on
(
'click'
,
function
()
{
...
@@ -1021,6 +1027,7 @@
...
@@ -1021,6 +1027,7 @@
console
.
log
(
helper
.
dateFormat
(
endTime
))
console
.
log
(
helper
.
dateFormat
(
endTime
))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#effectiveStarttime'
).
val
(
helper
.
dateFormat
(
new
Date
(
new
Date
().
setHours
(
0
,
0
,
0
,
0
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
})
})
function
baseIsShow
(
isShow
)
{
function
baseIsShow
(
isShow
)
{
...
@@ -1051,10 +1058,10 @@
...
@@ -1051,10 +1058,10 @@
getPeriod
()
getPeriod
()
baseIsShow
(
true
)
baseIsShow
(
true
)
treeIsShow
(
false
)
treeIsShow
(
false
)
if
(
merchantId
)
{
//
if (merchantId) {
resetpsw
.
removeClass
(
'hide'
)
//
resetpsw.removeClass('hide')
resetpsw
.
addClass
(
'show'
)
//
resetpsw.addClass('show')
}
//
}
if
(
isFactory
)
{
if
(
isFactory
)
{
$
(
'#subMerchantEl'
).
hide
()
$
(
'#subMerchantEl'
).
hide
()
$
(
'#subMerchantModel'
).
hide
()
$
(
'#subMerchantModel'
).
hide
()
...
@@ -1083,10 +1090,10 @@
...
@@ -1083,10 +1090,10 @@
if
(
!
merchantId
)
{
if
(
!
merchantId
)
{
merchantId
=
qs
(
'id'
)
merchantId
=
qs
(
'id'
)
}
}
if
(
merchantId
)
{
//
if (merchantId) {
resetpsw
.
removeClass
(
'hide'
)
//
resetpsw.removeClass('hide')
resetpsw
.
addClass
(
'show'
)
//
resetpsw.addClass('show')
}
//
}
if
(
editLevel
==
3
)
{
if
(
editLevel
==
3
)
{
$
(
'#firstBtn'
).
text
(
'确定'
)
$
(
'#firstBtn'
).
text
(
'确定'
)
$
(
'#preStep'
).
remove
()
$
(
'#preStep'
).
remove
()
...
@@ -1775,6 +1782,7 @@
...
@@ -1775,6 +1782,7 @@
}
else
{
}
else
{
params
.
accountTypes
=
JSON
.
stringify
([])
params
.
accountTypes
=
JSON
.
stringify
([])
}
}
console
.
log
(
requestList
,
params
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
@@ -1789,6 +1797,7 @@
...
@@ -1789,6 +1797,7 @@
$
(
'#preStep'
).
on
(
'click'
,
function
()
{
$
(
'#preStep'
).
on
(
'click'
,
function
()
{
step
=
1
step
=
1
init
()
init
()
document
.
querySelector
(
'#basic'
).
scrollIntoView
(
true
)
})
})
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
...
...
html/merchant/detail.html
View file @
f7a674a
...
@@ -246,6 +246,7 @@
...
@@ -246,6 +246,7 @@
}
}
.updateRecord
.layui-table-body
{
.updateRecord
.layui-table-body
{
overflow-y
:
scroll
;
overflow-y
:
scroll
;
}
</style>
</style>
</head>
</head>
...
@@ -509,7 +510,7 @@
...
@@ -509,7 +510,7 @@
'merchantLoginAccount'
,
'merchantLoginAccount'
,
'accountTypeNames'
,
'accountTypeNames'
,
'accountLevelName'
,
'accountLevelName'
,
//
'effectiveTimeName',
'effectiveTimeName'
,
'merchantName'
,
'merchantName'
,
'merchantAbbreviation'
,
'merchantAbbreviation'
,
'merchantTypeName'
,
'merchantTypeName'
,
...
@@ -628,20 +629,20 @@
...
@@ -628,20 +629,20 @@
if
(
roleData
.
merchantType
==
2
)
{
if
(
roleData
.
merchantType
==
2
)
{
$
(
'#orgTxt'
).
text
(
'组织机构代码:'
)
$
(
'#orgTxt'
).
text
(
'组织机构代码:'
)
}
}
var
effectiveTimeNameEl
=
$
(
'#effectiveTimeName'
)
//
var effectiveTimeNameEl = $('#effectiveTimeName')
if
(
roleData
.
merchantAccountLevel
==
4
)
{
// 门店
//
if (roleData.merchantAccountLevel == 4) { // 门店
if
(
roleData
.
status
==
1
||
roleData
.
status
==
5
)
{
//
if (roleData.status == 1 || roleData.status == 5) {
effectiveTimeNameEl
.
text
(
'-'
)
//
effectiveTimeNameEl.text('-')
}
else
{
//
} else {
effectiveTimeNameEl
.
text
(
roleData
.
effectiveTimeName
)
//
effectiveTimeNameEl.text(roleData.effectiveTimeName)
}
//
}
}
else
{
// 工厂省代市代
//
} else { // 工厂省代市代
if
(
roleData
.
status
==
1
||
roleData
.
status
==
4
)
{
//
if (roleData.status == 1 || roleData.status == 4) {
effectiveTimeNameEl
.
text
(
'-'
)
//
effectiveTimeNameEl.text('-')
}
else
{
//
} else {
effectiveTimeNameEl
.
text
(
roleData
.
effectiveTimeName
)
//
effectiveTimeNameEl.text(roleData.effectiveTimeName)
}
//
}
}
//
}
// callback(roleData.accountTypes)
// callback(roleData.accountTypes)
}
}
})
})
...
...
html/merchant/edit.html
View file @
f7a674a
...
@@ -267,6 +267,21 @@
...
@@ -267,6 +267,21 @@
<button
type=
"button"
class=
"layui-btn form-right hide"
id=
"resetpsw"
>
重置密码
</button>
<button
type=
"button"
class=
"layui-btn form-right hide"
id=
"resetpsw"
>
重置密码
</button>
</div>
</div>
</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=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
<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>
<button
id=
"twoyears"
type=
"button"
class=
"layui-btn btn-no-border"
>
续2年
</button>
</div>
</div>
<!-- <div class="layui-form-item">
<!-- <div class="layui-form-item">
<label class="layui-form-label required">账户等级:</label>
<label class="layui-form-label required">账户等级:</label>
<div class="layui-input-inline">
<div class="layui-input-inline">
...
@@ -510,7 +525,16 @@
...
@@ -510,7 +525,16 @@
var
parentInfo
=
{}
var
parentInfo
=
{}
var
isFreshSecond
=
true
var
isFreshSecond
=
true
var
scopeNum
=
1
var
scopeNum
=
1
var
accountInfo
=
helper
.
store
.
get
(
'accountInfo'
)
var
merchantAccountLevel
=
qs
(
'merchantAccountLevel'
)
console
.
log
(
merchantAccountLevel
==
4
,
!
accountInfo
,
qs
(
'status'
)
==
1
)
if
(
merchantAccountLevel
==
4
&&
!
accountInfo
&&
qs
(
'status'
)
==
1
)
{
// 上级是市代,子商户为门店,显示 有效期
$
(
'#effectiveShowEl'
).
removeClass
(
'hide'
)
$
(
'#effectiveShowEl'
).
addClass
(
'show'
)
$
(
'#effectiveStarttime'
).
attr
(
'lay-verify'
,
'required'
)
$
(
'#expireDate'
).
attr
(
'lay-verify'
,
'required'
)
}
// 设置标记,functionFlag修改了功能权限改为true,basicFlag基本信息
// 设置标记,functionFlag修改了功能权限改为true,basicFlag基本信息
var
functionFlag
=
false
var
functionFlag
=
false
var
basicFlag
=
false
var
basicFlag
=
false
...
@@ -578,6 +602,25 @@
...
@@ -578,6 +602,25 @@
}
}
})
})
var
effectiveStarttime
=
laydate
.
render
({
elem
:
'#effectiveStarttime'
,
format
:
'yyyy-MM-dd'
,
min
:
helper
.
dateFormat
(
new
Date
()),
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
date
.
month
=
date
.
month
-
1
$
(
'#expireDate'
).
val
(
''
)
expireDate
.
config
.
min
=
date
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
}
})
var
expireDate
=
laydate
.
render
({
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
,
min
:
helper
.
dateFormat
(
new
Date
())
})
editLevel
=
qs
(
'editLevel'
)
editLevel
=
qs
(
'editLevel'
)
isFactory
=
qs
(
'isFactory'
)
==
'true'
isFactory
=
qs
(
'isFactory'
)
==
'true'
var
pwd
=
$
(
'#password'
)
// 密码输入框
var
pwd
=
$
(
'#password'
)
// 密码输入框
...
@@ -940,6 +983,33 @@
...
@@ -940,6 +983,33 @@
return
false
return
false
})
})
$
(
'#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
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
})
$
(
'#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
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
})
$
(
'#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
))))
$
(
'#expireDate'
).
val
(
helper
.
dateFormat
(
endTime
))
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
})
$
(
'.layui-btn'
).
on
(
'click'
,
function
()
{
$
(
'.layui-btn'
).
on
(
'click'
,
function
()
{
var
type
=
$
(
this
).
data
(
'type'
)
var
type
=
$
(
this
).
data
(
'type'
)
if
(
btnHandle
[
type
])
{
if
(
btnHandle
[
type
])
{
...
@@ -1499,8 +1569,12 @@
...
@@ -1499,8 +1569,12 @@
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
)
treeData
[
id
][
item
.
value
].
treeObj
=
tree
.
create
(
treedom
,
treeListData
)
if
(
defaultList
)
{
if
(
defaultList
)
{
treeData
[
id
][
item
.
value
].
treeObj
.
checkNodes
(
defaultList
)
treeData
[
id
][
item
.
value
].
treeObj
.
checkNodes
(
defaultList
)
$
(
`#nodata
${
id
}
`
).
removeClass
(
'show'
)
$
(
`#nodata
${
id
}
`
).
addClass
(
'hide'
)
}
else
{
}
else
{
treeData
[
id
][
item
.
value
].
treeObj
.
checkAllNodes
(
true
)
treeData
[
id
][
item
.
value
].
treeObj
.
checkAllNodes
(
true
)
// $(`#nodata${roleId}`).removeClass('show')
// $(`#nodata${roleId}`).addClass('hide')
}
}
}
}
// }
// }
...
@@ -1782,6 +1856,7 @@
...
@@ -1782,6 +1856,7 @@
}
else
{
}
else
{
params
.
status
=
merchantForm
.
status
params
.
status
=
merchantForm
.
status
}
}
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
layer
.
msg
(
'操作成功'
,
{
...
...
html/merchant/index.html
View file @
f7a674a
...
@@ -499,7 +499,8 @@
...
@@ -499,7 +499,8 @@
parentId
:
row
.
parentId
,
parentId
:
row
.
parentId
,
isFactory
:
row
.
merchantAccountLevel
==
1
,
isFactory
:
row
.
merchantAccountLevel
==
1
,
step
:
1
,
step
:
1
,
status
:
row
.
status
status
:
row
.
status
,
merchantAccountLevel
:
row
.
merchantAccountLevel
})
})
break
break
case
'handleAuthority'
:
case
'handleAuthority'
:
...
...
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