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 1b651913
authored
Oct 25, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改新增、编辑商户、修改有效期问题
1 parent
e6d1ee17
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
99 additions
and
72 deletions
html/merchant/add.html
html/merchant/addSubMerchant.html
html/merchant/edit.html
html/merchant/validPeriodForm.html
html/role/index.html
html/merchant/add.html
View file @
1b65191
...
...
@@ -424,7 +424,7 @@
</div>
</div>
</div>
<
!-- <
div class="layui-form-item hide" id="effectiveShowEl">
<div
class=
"layui-form-item hide"
id=
"effectiveShowEl"
>
<label
class=
"layui-form-label"
>
账户有效期:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
...
...
@@ -438,7 +438,7 @@
<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>
<div
class=
"layui-col-md6"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label required"
>
登录账户名:
</label>
...
...
@@ -508,6 +508,10 @@
<input lay-filter="switch" type="checkbox" name="merchantId" value="2" title="服务商/合作商" /> -->
<!-- </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>
...
...
@@ -1716,20 +1720,26 @@
$
(
'#draft'
).
on
(
'click'
,
function
()
{
getAuthList
()
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
),
method
:
'cn.com.glsx.merchants.merchant.updatePermissions'
,
status
:
merchantForm
.
status
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
go
(
'merchant'
,
'index'
)
if
(
requestList
.
length
!=
0
)
{
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
),
method
:
'cn.com.glsx.merchants.merchant.updatePermissions'
,
status
:
merchantForm
.
status
}
})
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
go
(
'merchant'
,
'index'
)
}
})
}
else
{
layer
.
msg
(
'请选择产品'
,
{
icon
:
5
})
}
return
false
})
...
...
@@ -1740,25 +1750,32 @@
$
(
'#confirm'
).
on
(
'click'
,
function
()
{
getAuthList
()
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
)
}
params
.
method
=
'cn.com.glsx.merchants.merchant.updatePermissions'
// 草稿
if
(
merchantForm
.
status
==
1
)
{
params
.
status
=
2
console
.
log
(
requestList
)
if
(
requestList
.
length
!=
0
)
{
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
)
}
params
.
method
=
'cn.com.glsx.merchants.merchant.updatePermissions'
// 草稿
if
(
merchantForm
.
status
==
1
)
{
params
.
status
=
2
}
else
{
params
.
status
=
merchantForm
.
status
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
go
(
'merchant'
,
'index'
)
}
})
}
else
{
params
.
status
=
merchantForm
.
status
layer
.
msg
(
'请选择产品'
,
{
icon
:
5
})
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
go
(
'merchant'
,
'index'
)
}
})
return
false
})
})
...
...
html/merchant/addSubMerchant.html
View file @
1b65191
...
...
@@ -598,7 +598,7 @@
if
(
value
!=
''
)
{
date
.
month
=
date
.
month
-
1
startDate
.
config
.
max
=
date
}
else
{
k
}
else
{
startDate
.
config
.
max
=
endDate
.
config
.
max
}
lay
(
'#endDate'
).
html
(
value
)
...
...
@@ -608,7 +608,7 @@
var
effectiveStarttime
=
laydate
.
render
({
elem
:
'#effectiveStarttime'
,
format
:
'yyyy-MM-dd'
,
min
:
'
nowTime
'
,
min
:
''
,
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
effectiveStarttime
.
config
.
min
=
helper
.
dateFormat
(
new
Date
())
...
...
@@ -620,11 +620,7 @@
var
expireDate
=
laydate
.
render
({
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
,
min
:
''
,
done
:
function
(
value
,
date
)
{
effectiveStarttime
.
config
.
min
=
helper
.
dateFormat
(
new
Date
())
}
format
:
'yyyy-MM-dd'
})
editLevel
=
qs
(
'editLevel'
)
...
...
html/merchant/edit.html
View file @
1b65191
...
...
@@ -753,6 +753,7 @@
}
else
{
params
.
status
=
1
}
console
.
log
(
params
)
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
// if (editLevel == 3) {
...
...
@@ -1728,27 +1729,35 @@
function
submitAuth
()
{
getAuthList
()
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
)
}
params
.
method
=
'cn.com.glsx.merchants.merchant.updatePermissions'
// 草稿
if
(
merchantForm
.
status
==
1
)
{
params
.
status
=
2
console
.
log
(
requestList
)
if
(
requestList
.
length
!=
0
)
{
var
params
=
{
merchantId
:
merchantId
,
accountTypes
:
JSON
.
stringify
(
requestList
)
}
params
.
method
=
'cn.com.glsx.merchants.merchant.updatePermissions'
// 草稿
if
(
merchantForm
.
status
==
1
)
{
params
.
status
=
2
}
else
{
params
.
status
=
merchantForm
.
status
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
if
(
!
basicClick
)
{
go
(
'merchant'
,
'index'
)
}
}
})
}
else
{
params
.
status
=
merchantForm
.
status
layer
.
msg
(
'请选择产品'
,
{
icon
:
5
})
}
request
(
params
,
function
(
res
)
{
if
(
res
.
code
==
'0'
)
{
layer
.
msg
(
'操作成功'
,
{
icon
:
1
})
if
(
!
basicClick
)
{
go
(
'merchant'
,
'index'
)
}
}
})
return
false
}
})
...
...
html/merchant/validPeriodForm.html
View file @
1b65191
...
...
@@ -46,7 +46,7 @@
<p
class=
"input-downtips"
id=
"tips"
></p>
</div>
</div>
<div
id=
"storeEl"
class=
"layui-form-item"
>
<div
id=
"storeEl"
class=
"layui-form-item
hide
"
>
<label
class=
"layui-form-label"
>
账户有效期:
</label>
<div
class=
"layui-inline"
>
<div
class=
"layui-input-inline"
>
...
...
@@ -89,19 +89,22 @@
if
(
merchantAccountLevel
==
4
)
{
storeEl
.
show
()
merchantEl
.
hide
()
vaildData
.
expireDate
=
getQueryString
(
'expireDate'
)
vaildData
.
effectiveStarttime
=
getQueryString
(
'effectiveStarttime'
)
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
if
(
overdue
)
{
if
(
getQueryString
(
'expireDate'
)
!=
'-'
&&
getQueryString
(
'effectiveStarttime'
)
!=
'-'
)
{
vaildData
.
expireDate
=
getQueryString
(
'expireDate'
)
vaildData
.
effectiveStarttime
=
getQueryString
(
'effectiveStarttime'
)
console
.
log
(
111111111111
,
getQueryString
(
'expireDate'
))
overdue
=
getStartTime
(
vaildData
.
expireDate
).
overdue
if
(
overdue
)
{
$
(
'#effectiveStarttime'
).
removeAttr
(
'disabled'
)
}
form
.
val
(
'periodFilter'
,
{
expireDate
:
getQueryString
(
'expireDate'
),
effectiveStarttime
:
getQueryString
(
'effectiveStarttime'
)
})
}
else
{
$
(
'#effectiveStarttime'
).
removeAttr
(
'disabled'
)
}
form
.
val
(
'periodFilter'
,
{
expireDate
:
getQueryString
(
'expireDate'
),
effectiveStarttime
:
getQueryString
(
'effectiveStarttime'
)
})
}
else
{
storeEl
.
show
()
merchantEl
.
hide
()
setText
(
2
)
console
.
log
(
getQueryString
(
'status'
))
vaildData
.
effectiveTime
=
getQueryString
(
'status'
)
...
...
@@ -117,6 +120,7 @@
done
:
function
(
value
,
date
)
{
effectiveStarttime
.
config
.
min
=
helper
.
dateFormat
(
new
Date
())
console
.
log
(
value
,
date
)
date
.
month
=
date
.
month
-
1
expireDate
.
config
.
min
=
date
lay
(
'#effectiveStarttime'
).
html
(
value
)
}
...
...
@@ -124,7 +128,8 @@
var
expireDate
=
laydate
.
render
({
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
format
:
'yyyy-MM-dd'
,
min
:
$
(
'#effectiveStarttime'
).
val
()
})
$
(
'#sevenday'
).
on
(
'click'
,
function
()
{
...
...
html/role/index.html
View file @
1b65191
...
...
@@ -43,8 +43,8 @@
<div
class=
"layui-input-inline"
style=
"margin-left: 0"
>
<select
name=
"delFlag"
id=
"status"
lay-verify=
"required"
>
<option
value=
""
>
全部
</option>
<option
value=
"
0
"
>
草稿
</option>
<option
value=
"
1
"
>
启用
</option>
<option
value=
"
1
"
>
草稿
</option>
<option
value=
"
0
"
>
启用
</option>
</select>
</div>
</div>
...
...
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