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 8c91c993
authored
May 31, 2022
by
chenwq
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
4种券,错误定位
1 parent
0f3cb035
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
69 additions
and
18 deletions
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editExchangeCoupon.vue
src/views/couponManage/editMemberService.vue
src/views/couponManage/editCashCoupon.vue
View file @
8c91c99
...
...
@@ -101,7 +101,7 @@
</el-form-item>
</
template
>
<
template
slot=
"denominationHtml"
>
<el-input
v-model=
"editForm.denomination"
style=
"width: 150px"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
>
<el-input
v-model=
"editForm.denomination"
id=
"denomination"
style=
"width: 150px"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
>
<span
slot=
"append"
>
元
</span>
</el-input>
<span
style=
"color: red; margin-left: 15px"
v-if=
"priceFlag && editForm.useChannel == 1"
>
{{
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
...
...
@@ -745,18 +745,31 @@ export default {
return
obj
},
// 跳转
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
},
handleConfirm
()
{
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
(
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
merchantVaild
=>
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
(
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
if
(
this
.
priceFlag
&&
this
.
editForm
.
useChannel
==
1
)
{
//存在零售价低于代金券的商品
this
.
whereToGo
(
'denomination'
)
return
}
var
params
=
this
.
getCouponInfoParams
()
...
...
@@ -765,6 +778,7 @@ export default {
message
:
'未选择商品'
,
type
:
'error'
})
this
.
whereToGo
(
'denomination'
)
return
}
let
method
=
''
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
8c91c99
...
...
@@ -97,11 +97,11 @@
</
template
>
<
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-radio
v-model=
"editForm.effectiveType"
label=
"2"
:disabled=
"apear != 'couponAdd'"
id=
"effectiveTime"
>
<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"
>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
id=
"effectiveDays"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
领取后
<el-input
v-model=
"editForm.effectiveDays"
style=
"width: 100px; margin-left: 5px; margin-right: 5px"
:disabled=
"apear != 'couponAdd' || editForm.effectiveType != 1"
/>
...
...
@@ -528,15 +528,27 @@ export default {
return
obj
},
// 跳转
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
},
handleConfirm
()
{
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
(
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
merchantVaild
=>
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
(
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
var
params
=
this
.
getCouponInfoParams
()
let
method
=
''
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
8c91c99
...
...
@@ -77,11 +77,11 @@
</
template
>
<
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-radio
v-model=
"editForm.effectiveType"
label=
"2"
:disabled=
"apear != 'couponAdd'"
id=
"effectiveTime"
>
<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"
>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
id=
"effectiveDays"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
领取后
<el-input
v-model=
"editForm.effectiveDays"
style=
"width: 100px; margin-left: 5px; margin-right: 5px"
:disabled=
"apear != 'couponAdd' || editForm.effectiveType != 1"
/>
...
...
@@ -431,15 +431,27 @@ export default {
return
obj
},
// 跳转
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
},
handleConfirm
()
{
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
valid
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
(
(
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
merchantVaild
=>
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
(
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
var
params
=
this
.
getCouponInfoParams
()
let
method
=
''
...
...
src/views/couponManage/editMemberService.vue
View file @
8c91c99
...
...
@@ -5,10 +5,10 @@
</div>
<div
class=
"live-room container"
style=
"padding-top: 20px;"
>
<el-form
:model=
"ruleForm"
:rules=
"rules"
ref=
"ruleForm"
label-width=
"120px"
class=
"demo-ruleForm"
>
<el-form-item
size=
"small"
label=
"服务名称"
prop=
"couponName"
style=
"width: 440px"
>
<el-form-item
size=
"small"
label=
"服务名称"
prop=
"couponName"
style=
"width: 440px"
id=
"couponName"
>
<el-input
size=
"small"
:disabled=
"disabledContent"
v-model
.
trim=
"ruleForm.couponName"
maxlength=
"20"
placeholder=
"请输入服务名称,如“精洗轿车”"
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"预估成本/元"
prop=
"anticipatedCost"
style=
"width: 440px"
>
<el-form-item
size=
"small"
label=
"预估成本/元"
prop=
"anticipatedCost"
style=
"width: 440px"
id=
"anticipatedCost"
>
<el-input
size=
"small"
:disabled=
"disabledCost"
v-model
.
trim=
"ruleForm.anticipatedCost"
maxlength=
"20"
placeholder=
"请输入预估成本"
></el-input>
</el-form-item>
<el-form-item
size=
"small"
label=
"有效期"
prop=
"effectiveType"
>
...
...
@@ -16,7 +16,7 @@
<el-radio-group
v-model=
"ruleForm.effectiveType"
:disabled=
"disabledContent"
>
<el-radio
:label=
"3"
class=
"itemBlock"
>
永久有效
</el-radio>
<!-- effectiveType:1, effectiveDays:5 -->
<el-radio
:label=
"1"
>
<el-radio
:label=
"1"
id=
"effectiveDays"
>
领取后
<el-input
v-model=
"ruleForm.effectiveDays"
maxlength=
"4"
@
input=
"
val =>
{
...
...
@@ -26,7 +26,7 @@
天内有效
</el-radio>
<!-- effectiveStartTime effectiveEndTime +具体时间 -->
<el-radio
:label=
"2"
>
<el-radio
:label=
"2"
id=
"daterange"
>
<el-date-picker
:size=
"small"
:disabled=
"title == '查看' || title == '编辑' || ruleForm.effectiveType != 2"
style=
"width: 230px"
v-model=
"ruleForm.daterange"
type=
"daterange"
value-format=
"yyyy-MM-dd"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
:picker-options=
"pickerOptions ||
{}">
</el-date-picker>
</el-radio>
</el-radio-group>
...
...
@@ -44,7 +44,7 @@
<el-button
@
click=
"add1"
class=
"addsubBtn"
:disabled=
"title == '查看' || title == '编辑' || ruleForm.customUseLimit != 1"
>
+
</el-button>
次
</el-radio>
<el-radio
:label=
"2"
>
<el-radio
:label=
"2"
id=
"limitDays"
>
有效期内每
<el-input
v-model=
"ruleForm.limitDays"
maxlength=
"4"
@
input=
"
val =>
{
...
...
@@ -400,14 +400,27 @@ export default {
this
.
copyRuleForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
ruleForm
))
//深拷贝一份数据
})
},
// 跳转
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
},
submitForm
(
formName
)
{
this
.
$refs
[
formName
].
validate
(
valid
=>
{
this
.
$refs
[
formName
].
validate
(
(
valid
,
errorObj
)
=>
{
var
merchantval
=
true
var
merchantErrorObj
=
[]
if
(
this
.
$isGroupUp
)
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
merchantVaild
=>
{
this
.
$refs
.
merchantRef
.
$refs
[
this
.
editChildRef
].
validate
(
(
merchantVaild
,
errorObj
)
=>
{
merchantval
=
merchantVaild
merchantErrorObj
=
errorObj
})
}
if
(
!
valid
)
{
this
.
whereToGo
(
Object
.
keys
(
errorObj
)[
0
])
}
else
if
(
!
merchantval
)
{
this
.
whereToGo
(
Object
.
keys
(
merchantErrorObj
)[
0
])
}
if
(
valid
&&
merchantval
)
{
if
(
this
.
isEdit
==
true
)
{
this
.
updateService
()
...
...
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