Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas
/
scrm-micro-marketing
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 48350234
authored
Mar 20, 2022
by
wuwx
Committed by
chenwq
Mar 23, 2022
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改选择时间bug,样式
1 parent
1e91c2d5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
6 deletions
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editExchangeCoupon.vue
src/views/couponManage/editCashCoupon.vue
View file @
4835023
...
...
@@ -62,7 +62,7 @@
<br
/>
<el-form-item
prop=
"effectiveTime"
ref=
"effectiveTime"
style=
"margin-top: 12px; display: block"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
<el-date-picker
v-model=
"editForm.effectiveTime"
type=
"datetimerange"
style=
"width: 340px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOption"
:default-time=
"defaultTime"
:format=
"format"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
<el-date-picker
v-model=
"editForm.effectiveTime"
@
change=
"haveChange"
type=
"datetimerange"
style=
"width: 340px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:picker-options=
"pickerOption"
:default-time=
"defaultTime"
:format=
"format"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
>
...
...
@@ -361,7 +361,8 @@ export default {
},
'editForm.effectiveTime'
(
newValue
,
oldValue
)
{
if
(
newValue
&&
newValue
.
length
==
2
)
{
this
.
couponTime
=
this
.
setDateString
(
newValue
[
0
],
true
)
+
' ~ '
+
this
.
setDateString
(
newValue
[
1
],
true
)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this
.
couponTime
=
newValue
[
0
]
+
' ~ '
+
newValue
[
1
]
}
else
{
this
.
couponTime
=
''
}
...
...
@@ -435,6 +436,11 @@ export default {
},
methods
:
{
haveChange
()
{
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
if
(
oDateOne
<
timeStamp
)
this
.
editForm
.
effectiveTime
=
[]
},
// 编辑按钮
editMessage
()
{
let
anticipatedCostIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'anticipatedCost'
)
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
4835023
...
...
@@ -66,7 +66,7 @@
<
template
slot=
"effectiveHtml"
>
<el-form-item
prop=
"effectiveTime"
ref=
"effectiveTime"
style=
"margin-top: 12px; display: block"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
<el-date-picker
v-model=
"editForm.effectiveTime"
type=
"datetimerange"
style=
"width: 340px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:default-time=
"defaultTime"
:format=
"format"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
<el-date-picker
v-model=
"editForm.effectiveTime"
@
change=
"haveChange"
type=
"datetimerange"
style=
"width: 340px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:default-time=
"defaultTime"
:format=
"format"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
>
...
...
@@ -251,7 +251,8 @@ export default {
},
'editForm.effectiveTime'
(
newValue
,
oldValue
)
{
if
(
newValue
&&
newValue
.
length
==
2
)
{
this
.
couponTime
=
this
.
setDateString
(
newValue
[
0
],
true
)
+
' ~ '
+
this
.
setDateString
(
newValue
[
1
],
true
)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this
.
couponTime
=
newValue
[
0
]
+
' ~ '
+
newValue
[
1
]
}
else
{
this
.
couponTime
=
''
}
...
...
@@ -266,6 +267,11 @@ export default {
},
methods
:
{
haveChange
()
{
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
if
(
oDateOne
<
timeStamp
)
this
.
editForm
.
effectiveTime
=
[]
},
// 编辑按钮
editMessage
()
{
let
anticipatedCostIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'anticipatedCost'
)
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
4835023
...
...
@@ -45,7 +45,7 @@
<
template
slot=
"effectiveHtml"
>
<el-form-item
prop=
"effectiveTime"
ref=
"effectiveTime"
style=
"margin-top: 12px; display: block"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"2"
:disabled=
"apear != 'couponAdd'"
>
<el-date-picker
v-model=
"editForm.effectiveTime"
type=
"datetimerange"
style=
"width: 340px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:default-time=
"defaultTime"
:format=
"format"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
<el-date-picker
v-model=
"editForm.effectiveTime"
@
change=
"haveChange"
type=
"datetimerange"
style=
"width: 340px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd HH:mm:ss"
:default-time=
"defaultTime"
:format=
"format"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
</el-radio>
</el-form-item>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
>
...
...
@@ -229,7 +229,8 @@ export default {
},
'editForm.effectiveTime'
(
newValue
,
oldValue
)
{
if
(
newValue
&&
newValue
.
length
==
2
)
{
this
.
couponTime
=
this
.
setDateString
(
newValue
[
0
],
true
)
+
' ~ '
+
this
.
setDateString
(
newValue
[
1
],
true
)
// this.couponTime = this.setDateString(newValue[0], true) + ' ~ ' + this.setDateString(newValue[1], true)
this
.
couponTime
=
newValue
[
0
]
+
' ~ '
+
newValue
[
1
]
}
else
{
this
.
couponTime
=
''
}
...
...
@@ -244,6 +245,11 @@ export default {
},
methods
:
{
haveChange
()
{
let
oDateOne
=
new
Date
(
this
.
editForm
.
effectiveTime
[
0
]).
getTime
()
let
timeStamp
=
new
Date
().
getTime
()
if
(
oDateOne
<
timeStamp
)
this
.
editForm
.
effectiveTime
=
[]
},
// 编辑按钮
editMessage
()
{
let
anticipatedCostIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'anticipatedCost'
)
...
...
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