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 5100fa0a
authored
Oct 30, 2021
by
胡悦
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改有效期
1 parent
c933ee9a
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
7 deletions
html/merchant/addSubMerchant.html
html/merchant/edit.html
html/merchant/validPeriodForm.html
html/merchant/addSubMerchant.html
View file @
5100fa0
...
@@ -617,6 +617,7 @@
...
@@ -617,6 +617,7 @@
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
date
.
date
=
date
.
date
+
1
$
(
'#expireDate'
).
val
(
''
)
$
(
'#expireDate'
).
val
(
''
)
expireDate
.
config
.
min
=
date
expireDate
.
config
.
min
=
date
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
...
...
html/merchant/edit.html
View file @
5100fa0
...
@@ -275,7 +275,7 @@
...
@@ -275,7 +275,7 @@
</div>
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-form-mid"
>
-
</div>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"expireDate"
disabled
class=
"layui-input"
name=
"expireDate"
placeholder=
"结束时间"
/>
<input
type=
"text"
id=
"expireDate"
class=
"layui-input"
name=
"expireDate"
placeholder=
"结束时间"
/>
</div>
</div>
<button
id=
"sevenday"
type=
"button"
class=
"layui-btn btn-no-border"
>
续7天
</button>
<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=
"oneyear"
type=
"button"
class=
"layui-btn btn-no-border"
>
续1年
</button>
...
@@ -609,9 +609,9 @@
...
@@ -609,9 +609,9 @@
done
:
function
(
value
,
date
)
{
done
:
function
(
value
,
date
)
{
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
console
.
log
(
value
,
date
,
helper
.
dateFormat
(
new
Date
()))
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
date
.
date
=
date
.
date
+
1
$
(
'#expireDate'
).
val
(
''
)
$
(
'#expireDate'
).
val
(
''
)
expireDate
.
config
.
min
=
date
expireDate
.
config
.
min
=
date
$
(
'#expireDate'
).
removeAttr
(
'disabled'
)
}
}
})
})
...
@@ -713,20 +713,27 @@
...
@@ -713,20 +713,27 @@
if
(
formData
.
bussinessBegintime
)
{
if
(
formData
.
bussinessBegintime
)
{
merchantForm
.
bussinessBegintime
=
formData
.
bussinessBegintime
merchantForm
.
bussinessBegintime
=
formData
.
bussinessBegintime
params
.
bussinessBegintime
=
formData
.
bussinessBegintime
params
.
bussinessBegintime
=
formData
.
bussinessBegintime
}
else
{
params
.
bussinessBegintime
=
''
}
}
if
(
formData
.
bussinessEndtime
)
{
if
(
formData
.
bussinessEndtime
)
{
merchantForm
.
bussinessEndtime
=
formData
.
bussinessEndtime
merchantForm
.
bussinessEndtime
=
formData
.
bussinessEndtime
params
.
bussinessEndtime
=
formData
.
bussinessEndtime
params
.
bussinessEndtime
=
formData
.
bussinessEndtime
}
else
{
params
.
bussinessEndtime
=
''
}
}
if
(
merchantForm
.
lat
)
{
if
(
merchantForm
.
lat
)
{
params
.
lat
=
merchantForm
.
lat
params
.
lat
=
merchantForm
.
lat
params
.
lng
=
merchantForm
.
lng
params
.
lng
=
merchantForm
.
lng
params
.
merchantAddress
=
merchantForm
.
merchantAddress
params
.
merchantAddress
=
merchantForm
.
merchantAddress
}
}
$
.
each
(
fieldToFormNameList
,
function
(
index
,
item
)
{
$
.
each
(
fieldToFormNameList
,
function
(
index
,
item
)
{
merchantForm
[
item
]
=
formData
[
item
]
||
''
merchantForm
[
item
]
=
formData
[
item
]
||
''
params
[
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
(
merchantId
)
{
if
(
merchantId
)
{
params
.
effectiveTime
=
merchantForm
.
effectiveTime
params
.
effectiveTime
=
merchantForm
.
effectiveTime
}
}
...
@@ -756,6 +763,8 @@
...
@@ -756,6 +763,8 @@
merchantForm
[
item
.
attr
]
=
checkedArr
.
join
(
item
.
toString
)
merchantForm
[
item
.
attr
]
=
checkedArr
.
join
(
item
.
toString
)
params
[
item
.
attr
]
=
checkedArr
.
join
(
item
.
toString
)
params
[
item
.
attr
]
=
checkedArr
.
join
(
item
.
toString
)
}
}
}
else
{
params
[
item
.
attr
]
=
''
}
}
})
})
if
(
!
params
.
accounttypeId
)
{
if
(
!
params
.
accounttypeId
)
{
...
@@ -809,7 +818,6 @@
...
@@ -809,7 +818,6 @@
if
(
!
functionClick
)
{
if
(
!
functionClick
)
{
go
(
'merchant'
,
'index'
)
go
(
'merchant'
,
'index'
)
}
}
// } else {
// } else {
// if (!merchantId) {
// if (!merchantId) {
// merchantId = res.data
// merchantId = res.data
...
@@ -994,7 +1002,6 @@
...
@@ -994,7 +1002,6 @@
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
()
{
...
@@ -1003,7 +1010,6 @@
...
@@ -1003,7 +1010,6 @@
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
()
{
...
@@ -1012,7 +1018,6 @@
...
@@ -1012,7 +1018,6 @@
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'
)
})
})
$
(
'.layui-btn'
).
on
(
'click'
,
function
()
{
$
(
'.layui-btn'
).
on
(
'click'
,
function
()
{
...
...
html/merchant/validPeriodForm.html
View file @
5100fa0
...
@@ -121,7 +121,8 @@
...
@@ -121,7 +121,8 @@
// effectiveStarttime.config.min = helper.dateFormat(new Date())
// effectiveStarttime.config.min = helper.dateFormat(new Date())
console
.
log
(
value
,
date
)
console
.
log
(
value
,
date
)
date
.
month
=
date
.
month
-
1
date
.
month
=
date
.
month
-
1
// expireDate.config.min = date
date
.
date
=
date
.
date
+
1
expireDate
.
config
.
min
=
date
$
(
'#expireDate'
).
val
(
''
)
$
(
'#expireDate'
).
val
(
''
)
lay
(
'#effectiveStarttime'
).
html
(
value
)
lay
(
'#effectiveStarttime'
).
html
(
value
)
}
}
...
...
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