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 3abfa470
authored
Oct 09, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
提交新增商户
1 parent
f76feb17
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
108 additions
and
19 deletions
html/merchant/add.html
html/merchant/index.html
html/merchant/validPeriodForm.html
html/merchant/add.html
View file @
3abfa47
This diff is collapsed.
Click to expand it.
html/merchant/index.html
View file @
3abfa47
...
...
@@ -95,14 +95,23 @@
</select>
</div>
</div>
<div
style=
"float: right"
>
<div
class=
"layui-inline"
>
<input
class=
"layui-input"
name=
"merchantName"
placeholder=
"请输入商户名称"
/>
<div
class=
"layui-inline customerStatus"
pane
>
<label
class=
"layui-form-label"
>
模式:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"status"
id=
"searchModelEl"
>
<option
value=
""
>
全部
</option>
</select>
</div>
</div>
<div
class=
"layui-inline customerStatus"
pane
>
<label
class=
"layui-form-label"
></label>
<div
class=
"layui-input-inline"
>
<input
class=
"layui-input"
name=
"merchantName"
placeholder=
"请输入商户名称"
/>
</div>
</div>
<div
class=
"layui-inline searchInputBtn"
>
<button
class=
"layui-btn"
lay-submit
lay-filter=
"searchSubmit"
>
查询
</button>
</div>
</div>
</form>
<div
class=
"table-page"
>
<table
class=
"layui-table"
id=
"merchantTable"
lay-filter=
"merchant-table-filter"
></table>
...
...
@@ -148,13 +157,11 @@
{{
#
}
}}
{{
#
if
((
d
.
btn
.
createSubMerchant
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleAddMerchant"
>
创建子商户
/
门店
<
/a
>
{{
#
}
}}
{{
#
if
((
d
.
btn
.
editPeriod
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleVaildPeriod"
>
修改账户有效期
<
/a
>
{{
#
}
}}
<
/div
>
</script>
<script
type=
"text/html"
id=
"vaildPeriod"
>
{{
#
if
((
d
.
btn
.
editPeriod
)){
}}
<
a
class
=
"layui-btn-xs"
lay
-
event
=
"handleVaildPeriod"
>
修改账户有效期
<
/a
>
{{
#
}
}}
</script>
<script>
layui
.
use
([
'gtree'
,
'request'
,
'helper'
,
'table'
,
'laypage'
,
'layer'
],
function
()
{
var
tree
=
layui
.
gtree
...
...
@@ -171,7 +178,8 @@
statusList
:
[],
channelList
:
[],
accountLevelList
:
[],
accountTypeList
:
[]
accountTypeList
:
[],
modelList
:
[]
}
var
page
=
{
...
...
@@ -213,7 +221,7 @@
align
:
'center'
},
{
field
:
'merchant
Name
'
,
field
:
'merchant
Model
'
,
title
:
'模式'
,
align
:
'center'
},
...
...
@@ -277,8 +285,15 @@
align
:
'left'
,
title
:
'操作'
,
toolbar
:
'#merchantBtns'
,
width
:
220
// fixed: 'right'
width
:
220
,
fixed
:
'right'
// },
// {
// align: 'left',
// title: '账户开关',
// toolbar: '#vaildPeriod',
// width: 150,
// fixed: 'right'
}
]
var
colums
=
[
...
...
@@ -354,7 +369,7 @@
}
]
var
gl
=
fals
e
var
gl
=
tru
e
var
merchantTable
=
table
.
render
({
elem
:
'#merchantTable'
,
page
:
false
,
...
...
@@ -451,7 +466,7 @@
type
:
2
,
title
:
''
,
closeBtn
:
0
,
area
:
[
'
56
0px'
,
'230px'
],
area
:
[
'
90
0px'
,
'230px'
],
fixed
:
false
,
//不固定
// maxmin: true,
btn
:
[
'确定'
,
'取消'
],
...
...
@@ -647,9 +662,17 @@
})
}
// 获取模式
function
getModel
()
{
getDictData
(
'merchant_model'
,
function
(
res
)
{
baseData
.
modelList
=
res
.
data
setSelectOption
(
'#searchModelEl'
,
'modelList'
,
'dictValue'
,
'dictLabel'
)
})
}
// 功能点按需出现
function
elRemove
()
{
//
$('#operateEl').remove()
$
(
'#operateEl'
).
remove
()
}
function
init
()
{
...
...
@@ -658,6 +681,7 @@
getChannel
()
getAccountLevel
()
getAccountType
()
getModel
()
}
else
{
elRemove
()
}
...
...
html/merchant/validPeriodForm.html
View file @
3abfa47
...
...
@@ -24,14 +24,37 @@
<main
class=
"valid-period"
>
<form
class=
"layui-form"
lay-filter=
"periodFilter"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-label required"
style=
"width: 120px;"
>
账户有效期:
</div>
<label
class=
"layui-form-label"
>
账户有效期:
</label>
<div
class=
"layui-input-block"
>
<input
type=
"radio"
name=
"effectiveTime"
value=
"1"
title=
"启用"
>
<input
type=
"radio"
name=
"effectiveTime"
value=
"2"
title=
"禁用"
checked
>
</div>
<button
id=
"periodVerifyBtn"
lay-submit
lay-filter=
"periodSubmit"
style=
"display: none;"
></button>
</div>
<!-- <div class="layui-form-item">
<div class="layui-form-label required" style="width: 120px;"></div>
<div class="layui-input-inline" style="width: auto;">
<select name="effectiveTime" id="periodSelect" required lay-verify="required">
<option value="">请选择</option>
</select>
<p class="input-downtips">(注:永久有效不超过所属工厂商户的有效期)</p>
</div>
<button
id=
"periodVerifyBtn"
lay-submit
lay-filter=
"periodSubmit"
style=
"display: none;"
></button>
</div> -->
<div
class=
"layui-form-item"
>
<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=
"开始时间"
/>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"expireDate"
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>
</form>
</main>
...
...
@@ -39,9 +62,10 @@
<script
src=
"https://www.layuicdn.com/layui/layui.js"
></script>
<script
src=
"/js/load.js"
></script>
<script>
layui
.
use
([
'form'
,
'helper'
,
'request'
],
function
()
{
layui
.
use
([
'form'
,
'helper'
,
'request'
,
'laydate'
],
function
()
{
var
form
=
layui
.
form
var
request
=
layui
.
request
var
laydate
=
layui
.
laydate
var
$
=
layui
.
$
var
helper
=
layui
.
helper
var
currLayerIdx
=
parent
.
layer
.
getFrameIndex
(
window
.
name
)
...
...
@@ -56,9 +80,50 @@
// 1-草稿;2-正常;3-注销;4-过期
var
status
=
getQueryString
(
'status'
)
var
effectiveStarttime
=
laydate
.
render
({
elem
:
'#effectiveStarttime'
,
format
:
'yyyy-MM-dd'
,
min
:
'2021-09-30'
,
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
)
expireDate
.
config
.
min
=
date
lay
(
'#effectiveStarttime'
).
html
(
value
)
}
})
var
expireDate
=
laydate
.
render
({
elem
:
'#expireDate'
,
format
:
'yyyy-MM-dd'
})
$
(
'#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
))
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
))
})
$
(
'#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
))
})
getVaildPeriod
()
form
.
on
(
'submit(periodSubmit)'
,
function
(
data
)
{
console
.
log
(
data
)
if
(
data
.
field
.
effectiveTime
)
{
var
params
=
{
method
:
'cn.com.glsx.merchants.merchant.updateValPerByMerId'
,
...
...
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