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 57341e02
authored
Feb 16, 2022
by
周子尧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
1
1 parent
d10d5159
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
95 additions
and
25 deletions
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editExchangeCoupon.vue
src/views/couponManage/editCashCoupon.vue
View file @
57341e0
...
@@ -90,15 +90,15 @@
...
@@ -90,15 +90,15 @@
</GLTable>
</GLTable>
</div>
</div>
<
template
slot=
"useDescriptionHtml"
>
<
template
slot=
"useDescriptionHtml"
>
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="
apear == 'couponSee'
" />
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="
userDisable
" />
</
template
>
</
template
>
<
template
slot=
"editHtml"
>
<
template
slot=
"editHtml"
>
<el-button
style=
"margin-left:80px"
@
click=
"editMessage"
>
编辑
</el-button>
<el-button
style=
"margin-left:
80px"
@
click=
"editMessage"
>
编辑
</el-button>
</
template
>
</
template
>
</glsx-combi-form>
</glsx-combi-form>
</div>
</div>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type=
"primary"
v-if=
"
apear != 'couponSee'
"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
v-if=
"
showSubmit
"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
v-if=
"apear != 'couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear != 'couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear == 'couponSee'"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
v-if=
"apear == 'couponSee'"
@
click=
"handleCancel"
>
返回
</el-button>
</div>
</div>
...
@@ -112,6 +112,8 @@ export default {
...
@@ -112,6 +112,8 @@ export default {
name
:
'editCashCoupon'
,
name
:
'editCashCoupon'
,
data
()
{
data
()
{
return
{
return
{
showSubmit
:
true
,
userDisable
:
false
,
size
:
'small'
,
size
:
'small'
,
title
:
'创建'
,
title
:
'创建'
,
titleObj
:
{
titleObj
:
{
...
@@ -212,7 +214,7 @@ export default {
...
@@ -212,7 +214,7 @@ export default {
name
:
'estimatedCost'
,
name
:
'estimatedCost'
,
width
:
'320px'
,
width
:
'320px'
,
type
:
'input'
,
type
:
'input'
,
maxlength
:
20
isDisabled
:
false
// index:1
// index:1
},
},
{
{
...
@@ -271,7 +273,7 @@ export default {
...
@@ -271,7 +273,7 @@ export default {
{
{
label
:
'使用说明'
,
label
:
'使用说明'
,
name
:
'useDescription'
,
name
:
'useDescription'
,
addHtml
:
'useDescriptionHtml'
addHtml
:
'useDescriptionHtml'
,
// index:10
// index:10
},
},
{
{
...
@@ -296,6 +298,7 @@ export default {
...
@@ -296,6 +298,7 @@ export default {
if
(
id
)
{
if
(
id
)
{
if
(
addOrEdit
==
3
)
{
if
(
addOrEdit
==
3
)
{
this
.
apear
=
'couponSee'
this
.
apear
=
'couponSee'
this
.
showSubmit
=
false
this
.
title
=
'查看'
this
.
title
=
'查看'
this
.
editFormData
[
11
].
isHide
=
false
this
.
editFormData
[
11
].
isHide
=
false
}
else
if
(
addOrEdit
==
2
)
{
}
else
if
(
addOrEdit
==
2
)
{
...
@@ -305,6 +308,7 @@ export default {
...
@@ -305,6 +308,7 @@ export default {
this
.
editFormData
[
0
].
isDisabled
=
true
this
.
editFormData
[
0
].
isDisabled
=
true
this
.
editFormData
[
1
].
isDisabled
=
true
this
.
editFormData
[
1
].
isDisabled
=
true
this
.
editFormData
[
9
].
isDisabled
=
true
this
.
editFormData
[
9
].
isDisabled
=
true
this
.
userDisable
=
true
}
else
{
}
else
{
this
.
apear
=
'couponAdd'
this
.
apear
=
'couponAdd'
this
.
title
=
'创建'
this
.
title
=
'创建'
...
@@ -407,8 +411,11 @@ export default {
...
@@ -407,8 +411,11 @@ export default {
methods
:
{
methods
:
{
// 编辑按钮
// 编辑按钮
editMessage
(){
editMessage
()
{
let
estimatedCostIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'estimatedCost'
)
this
.
editFormData
[
estimatedCostIndex
].
isDisabled
=
false
this
.
userDisable
=
false
this
.
showSubmit
=
true
},
},
setDateString
(
objField
,
special
)
{
setDateString
(
objField
,
special
)
{
var
value
=
typeof
objField
==
'string'
?
objField
.
split
(
' '
)[
0
]
:
special
?
objField
.
format
(
'YYYY年MM月DD日'
)
:
objField
.
format
(
'YYYY年MM月DD日'
)
var
value
=
typeof
objField
==
'string'
?
objField
.
split
(
' '
)[
0
]
:
special
?
objField
.
format
(
'YYYY年MM月DD日'
)
:
objField
.
format
(
'YYYY年MM月DD日'
)
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
57341e0
...
@@ -64,12 +64,15 @@
...
@@ -64,12 +64,15 @@
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
slot=
"useDescriptionHtml"
>
<
template
slot=
"useDescriptionHtml"
>
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="apear == 'couponSee'" />
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</
template
>
<
template
slot=
"editHtml"
>
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
</
template
>
</
template
>
</glsx-combi-form>
</glsx-combi-form>
</div>
</div>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type=
"primary"
v-if=
"
apear != 'couponSee'
"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
v-if=
"
showSubmit
"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
v-if=
"apear != 'couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear != 'couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear == 'couponSee'"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
v-if=
"apear == 'couponSee'"
@
click=
"handleCancel"
>
返回
</el-button>
</div>
</div>
...
@@ -82,6 +85,8 @@ export default {
...
@@ -82,6 +85,8 @@ export default {
name
:
'editDiscountCoupon'
,
name
:
'editDiscountCoupon'
,
data
()
{
data
()
{
return
{
return
{
showSubmit
:
true
,
userDisable
:
false
,
size
:
'small'
,
size
:
'small'
,
title
:
'创建'
,
title
:
'创建'
,
titleObj
:
{
titleObj
:
{
...
@@ -121,9 +126,11 @@ export default {
...
@@ -121,9 +126,11 @@ export default {
couponName
:
''
,
couponName
:
''
,
effectiveType
:
'2'
,
effectiveType
:
'2'
,
effectiveTime
:
[],
effectiveTime
:
[],
effectiveDays
:
''
effectiveDays
:
''
,
estimatedCost
:
''
},
},
editRule
:
{
editRule
:
{
estimatedCost
:
[{
required
:
true
,
message
:
'请输入预估成本'
,
trigger
:
'change'
}],
couponName
:
[{
required
:
true
,
message
:
'请输入优惠券名称'
,
trigger
:
'change'
}],
couponName
:
[{
required
:
true
,
message
:
'请输入优惠券名称'
,
trigger
:
'change'
}],
effectiveType
:
[{
required
:
true
,
message
:
'请选择有效期'
,
trigger
:
'change'
}],
effectiveType
:
[{
required
:
true
,
message
:
'请选择有效期'
,
trigger
:
'change'
}],
effectiveTime
:
[{
required
:
true
,
message
:
'有效期不能为空'
,
trigger
:
'change'
}],
effectiveTime
:
[{
required
:
true
,
message
:
'有效期不能为空'
,
trigger
:
'change'
}],
...
@@ -140,6 +147,13 @@ export default {
...
@@ -140,6 +147,13 @@ export default {
maxlength
:
20
maxlength
:
20
},
},
{
{
label
:
'预估成本'
,
name
:
'estimatedCost'
,
width
:
'320px'
,
type
:
'input'
,
isDisabled
:
false
},
{
label
:
'发放数量'
,
label
:
'发放数量'
,
name
:
'stock'
,
name
:
'stock'
,
width
:
'180px'
,
width
:
'180px'
,
...
@@ -155,6 +169,11 @@ export default {
...
@@ -155,6 +169,11 @@ export default {
label
:
'使用说明'
,
label
:
'使用说明'
,
name
:
'useDescription'
,
name
:
'useDescription'
,
addHtml
:
'useDescriptionHtml'
addHtml
:
'useDescriptionHtml'
},
{
name
:
''
,
addHtml
:
'editHtml'
,
isHide
:
true
}
}
]
]
}
}
...
@@ -171,7 +190,9 @@ export default {
...
@@ -171,7 +190,9 @@ export default {
if
(
id
)
{
if
(
id
)
{
if
(
addOrEdit
==
3
)
{
if
(
addOrEdit
==
3
)
{
this
.
apear
=
'couponSee'
this
.
apear
=
'couponSee'
this
.
showSubmit
=
false
this
.
title
=
'查看'
this
.
title
=
'查看'
this
.
editFormData
[
5
].
isHide
=
false
}
else
if
(
addOrEdit
==
2
)
{
}
else
if
(
addOrEdit
==
2
)
{
this
.
apear
=
'couponEdit'
this
.
apear
=
'couponEdit'
this
.
title
=
'编辑'
this
.
title
=
'编辑'
...
@@ -179,6 +200,8 @@ export default {
...
@@ -179,6 +200,8 @@ export default {
this
.
isDisabled
=
true
this
.
isDisabled
=
true
this
.
editFormData
[
0
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
0
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
1
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
1
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
2
].
isDisabled
=
this
.
isDisabled
this
.
userDisable
=
true
}
else
{
}
else
{
this
.
apear
=
'couponAdd'
this
.
apear
=
'couponAdd'
this
.
title
=
'创建'
this
.
title
=
'创建'
...
@@ -216,6 +239,13 @@ export default {
...
@@ -216,6 +239,13 @@ export default {
},
},
methods
:
{
methods
:
{
// 编辑按钮
editMessage
()
{
let
estimatedCostIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'estimatedCost'
)
this
.
editFormData
[
estimatedCostIndex
].
isDisabled
=
false
this
.
userDisable
=
false
this
.
showSubmit
=
true
},
setDateString
(
objField
,
special
)
{
setDateString
(
objField
,
special
)
{
var
value
=
typeof
objField
==
'string'
?
objField
.
split
(
' '
)[
0
]
:
special
?
objField
.
format
(
'YYYY年MM月DD日'
)
:
objField
.
format
(
'YYYY年MM月DD日'
)
var
value
=
typeof
objField
==
'string'
?
objField
.
split
(
' '
)[
0
]
:
special
?
objField
.
format
(
'YYYY年MM月DD日'
)
:
objField
.
format
(
'YYYY年MM月DD日'
)
return
value
return
value
...
@@ -225,13 +255,13 @@ export default {
...
@@ -225,13 +255,13 @@ export default {
this
.
$apis
.
couponManage
.
getCouponDetailApi
({
couponId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
this
.
$apis
.
couponManage
.
getCouponDetailApi
({
couponId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
editForm
.
effectiveType
=
this
.
editForm
.
effectiveType
+
''
this
.
editForm
.
effectiveType
=
this
.
editForm
.
effectiveType
+
''
this
.
editForm
.
estimatedCost
=
(
this
.
editForm
.
estimatedCost
/
100
).
toFixed
(
2
)
//有效期
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if
(
this
.
editForm
.
effectiveType
==
2
)
{
if
(
this
.
editForm
.
effectiveType
==
2
)
{
this
.
editForm
.
effectiveTime
=
[
this
.
editForm
.
effectiveStartTime
,
this
.
editForm
.
effectiveEndTime
]
this
.
editForm
.
effectiveTime
=
[
this
.
editForm
.
effectiveStartTime
,
this
.
editForm
.
effectiveEndTime
]
}
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
this
.
editStatus
=
false
})
})
})
})
...
@@ -265,7 +295,8 @@ export default {
...
@@ -265,7 +295,8 @@ export default {
obj
.
couponName
=
form
.
couponName
obj
.
couponName
=
form
.
couponName
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
obj
.
discountType
=
'2'
obj
.
discountType
=
'2'
//预估成本
obj
.
estimatedCost
=
form
.
estimatedCost
//有效期
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
obj
.
effectiveType
=
form
.
effectiveType
obj
.
effectiveType
=
form
.
effectiveType
...
@@ -327,7 +358,8 @@ export default {
...
@@ -327,7 +358,8 @@ export default {
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
})
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
57341e0
<!-- 编辑兑换券 -->
<!-- 编辑兑换券 -->
<
template
>
<
template
>
<div
class=
"edit-share marketing p-t-20 edit-box"
>
<div
class=
"edit-share marketing p-t-20 edit-box"
>
<div
class=
"container edit-container"
style=
"height: 630px;
position: relative;
"
>
<div
class=
"container edit-container"
style=
"height: 630px;
position: relative
"
>
<div
class=
"right_show"
>
<div
class=
"right_show"
>
<div
class=
"card-top"
></div>
<div
class=
"card-top"
></div>
<div
class=
"card_one"
>
<div
class=
"card_one"
>
...
@@ -29,26 +29,29 @@
...
@@ -29,26 +29,29 @@
<p
class=
"edit-title"
>
{{
title
}}
兑换券
</p>
<p
class=
"edit-title"
>
{{
title
}}
兑换券
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<glsx-combi-form
class=
"edit-form-container"
ref=
"editFormRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"editForm"
:formData=
"editFormData"
:formRules=
"editRule"
>
<template
slot=
"effectiveHtml"
>
<template
slot=
"effectiveHtml"
>
<el-form-item
prop=
"effectiveTime"
ref=
"effectiveTime"
style=
"margin-top: 12px;
display: block;
"
>
<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'"
>
<el-date-picker
v-model=
"editForm.effectiveTime"
type=
"daterange"
style=
"width:295px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
<el-date-picker
v-model=
"editForm.effectiveTime"
type=
"daterange"
style=
"width:
295px"
range-separator=
"至"
start-placeholder=
"开始日期"
end-placeholder=
"结束日期"
value-format=
"yyyy-MM-dd"
:picker-options=
"pickerOption"
:disabled=
"editForm.effectiveType != 2 || apear != 'couponAdd'"
clearable
></el-date-picker>
</el-radio>
</el-radio>
</el-form-item>
</el-form-item>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
>
<el-form-item
prop=
"effectiveDays"
ref=
"effectiveDays"
>
<el-radio
v-model=
"editForm.effectiveType"
label=
"1"
:disabled=
"apear != 'couponAdd'"
>
<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"
/>
<el-input
v-model=
"editForm.effectiveDays"
style=
"width: 100px;
margin-left: 5px; margin-right:
5px"
:disabled=
"apear != 'couponAdd' || editForm.effectiveType != 1"
/>
天内有效
天内有效
</el-radio>
</el-radio>
</el-form-item>
</el-form-item>
</
template
>
</
template
>
<
template
slot=
"useDescriptionHtml"
>
<
template
slot=
"useDescriptionHtml"
>
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="apear == 'couponSee'" />
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
style=
"width: 320px"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
</
template
>
<
template
slot=
"editHtml"
>
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
</
template
>
</
template
>
</glsx-combi-form>
</glsx-combi-form>
</div>
</div>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<div
class=
"footer"
:style=
"{ left: footerLeft + 'px', width: footerWidth + 'px' }"
>
<el-button
type=
"primary"
v-if=
"
apear != 'couponSee'
"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
type=
"primary"
v-if=
"
showSubmit
"
@
click=
"handleConfirm"
>
确定
</el-button>
<el-button
v-if=
"apear != 'couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear != 'couponSee'"
@
click=
"handleCancel"
>
取消
</el-button>
<el-button
v-if=
"apear == 'couponSee'"
@
click=
"handleCancel"
>
返回
</el-button>
<el-button
v-if=
"apear == 'couponSee'"
@
click=
"handleCancel"
>
返回
</el-button>
</div>
</div>
...
@@ -61,6 +64,8 @@ export default {
...
@@ -61,6 +64,8 @@ export default {
name
:
'editDiscountCoupon'
,
name
:
'editDiscountCoupon'
,
data
()
{
data
()
{
return
{
return
{
showSubmit
:
true
,
userDisable
:
false
,
size
:
'small'
,
size
:
'small'
,
title
:
'创建'
,
title
:
'创建'
,
titleObj
:
{
titleObj
:
{
...
@@ -100,9 +105,11 @@ export default {
...
@@ -100,9 +105,11 @@ export default {
couponName
:
''
,
couponName
:
''
,
effectiveType
:
'2'
,
effectiveType
:
'2'
,
effectiveTime
:
[],
effectiveTime
:
[],
effectiveDays
:
''
effectiveDays
:
''
,
estimatedCost
:
''
},
},
editRule
:
{
editRule
:
{
estimatedCost
:
[{
required
:
true
,
message
:
'请输入预估成本'
,
trigger
:
'change'
}],
couponName
:
[{
required
:
true
,
message
:
'请输入优惠券名称'
,
trigger
:
'change'
}],
couponName
:
[{
required
:
true
,
message
:
'请输入优惠券名称'
,
trigger
:
'change'
}],
effectiveType
:
[{
required
:
true
,
message
:
'请选择有效期'
,
trigger
:
'change'
}],
effectiveType
:
[{
required
:
true
,
message
:
'请选择有效期'
,
trigger
:
'change'
}],
effectiveTime
:
[{
required
:
true
,
message
:
'有效期不能为空'
,
trigger
:
'change'
}],
effectiveTime
:
[{
required
:
true
,
message
:
'有效期不能为空'
,
trigger
:
'change'
}],
...
@@ -119,6 +126,13 @@ export default {
...
@@ -119,6 +126,13 @@ export default {
maxlength
:
20
maxlength
:
20
},
},
{
{
label
:
'预估成本'
,
name
:
'estimatedCost'
,
width
:
'320px'
,
type
:
'input'
,
isDisabled
:
false
},
{
label
:
'发放数量'
,
label
:
'发放数量'
,
name
:
'stock'
,
name
:
'stock'
,
width
:
'180px'
,
width
:
'180px'
,
...
@@ -134,6 +148,11 @@ export default {
...
@@ -134,6 +148,11 @@ export default {
label
:
'使用说明'
,
label
:
'使用说明'
,
name
:
'useDescription'
,
name
:
'useDescription'
,
addHtml
:
'useDescriptionHtml'
addHtml
:
'useDescriptionHtml'
},
{
name
:
''
,
addHtml
:
'editHtml'
,
isHide
:
true
}
}
]
]
}
}
...
@@ -150,6 +169,8 @@ export default {
...
@@ -150,6 +169,8 @@ export default {
if
(
id
)
{
if
(
id
)
{
if
(
addOrEdit
==
3
)
{
if
(
addOrEdit
==
3
)
{
this
.
apear
=
'couponSee'
this
.
apear
=
'couponSee'
this
.
editFormData
[
5
].
isHide
=
false
this
.
showSubmit
=
false
this
.
title
=
'查看'
this
.
title
=
'查看'
}
else
if
(
addOrEdit
==
2
)
{
}
else
if
(
addOrEdit
==
2
)
{
this
.
apear
=
'couponEdit'
this
.
apear
=
'couponEdit'
...
@@ -158,6 +179,7 @@ export default {
...
@@ -158,6 +179,7 @@ export default {
this
.
isDisabled
=
true
this
.
isDisabled
=
true
this
.
editFormData
[
0
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
0
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
1
].
isDisabled
=
this
.
isDisabled
this
.
editFormData
[
1
].
isDisabled
=
this
.
isDisabled
this
.
userDisable
=
true
}
else
{
}
else
{
this
.
apear
=
'couponAdd'
this
.
apear
=
'couponAdd'
this
.
title
=
'创建'
this
.
title
=
'创建'
...
@@ -195,6 +217,13 @@ export default {
...
@@ -195,6 +217,13 @@ export default {
},
},
methods
:
{
methods
:
{
// 编辑按钮
editMessage
()
{
let
estimatedCostIndex
=
this
.
editFormData
.
findIndex
(
item
=>
item
.
name
==
'estimatedCost'
)
this
.
editFormData
[
estimatedCostIndex
].
isDisabled
=
false
this
.
userDisable
=
false
this
.
showSubmit
=
true
},
setDateString
(
objField
,
special
)
{
setDateString
(
objField
,
special
)
{
var
value
=
typeof
objField
==
'string'
?
objField
.
split
(
' '
)[
0
]
:
special
?
objField
.
format
(
'YYYY年MM月DD日'
)
:
objField
.
format
(
'YYYY年MM月DD日'
)
var
value
=
typeof
objField
==
'string'
?
objField
.
split
(
' '
)[
0
]
:
special
?
objField
.
format
(
'YYYY年MM月DD日'
)
:
objField
.
format
(
'YYYY年MM月DD日'
)
return
value
return
value
...
@@ -204,13 +233,13 @@ export default {
...
@@ -204,13 +233,13 @@ export default {
this
.
$apis
.
couponManage
.
getCouponDetailApi
({
couponId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
this
.
$apis
.
couponManage
.
getCouponDetailApi
({
couponId
:
this
.
routeInfo
.
id
}).
then
(
res
=>
{
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
editForm
=
this
.
$common
.
utils
.
deepClone
(
res
)
this
.
editForm
.
effectiveType
=
this
.
editForm
.
effectiveType
+
''
this
.
editForm
.
effectiveType
=
this
.
editForm
.
effectiveType
+
''
this
.
editForm
.
estimatedCost
=
(
this
.
editForm
.
estimatedCost
/
100
).
toFixed
(
2
)
//有效期
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
if
(
this
.
editForm
.
effectiveType
==
2
)
{
if
(
this
.
editForm
.
effectiveType
==
2
)
{
this
.
editForm
.
effectiveTime
=
[
this
.
editForm
.
effectiveStartTime
,
this
.
editForm
.
effectiveEndTime
]
this
.
editForm
.
effectiveTime
=
[
this
.
editForm
.
effectiveStartTime
,
this
.
editForm
.
effectiveEndTime
]
}
}
this
.
$nextTick
(()
=>
{
this
.
$nextTick
(()
=>
{
this
.
editStatus
=
false
this
.
editStatus
=
false
})
})
})
})
...
@@ -244,7 +273,8 @@ export default {
...
@@ -244,7 +273,8 @@ export default {
obj
.
couponName
=
form
.
couponName
obj
.
couponName
=
form
.
couponName
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
//优惠券类型 1:满减券,2:折扣券,3:代金券,4:实物券 5:购车代金券 6:商品折扣券,7:会员服务
obj
.
discountType
=
'4'
obj
.
discountType
=
'4'
//预估成本
obj
.
estimatedCost
=
form
.
estimatedCost
//有效期
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:无有效期
obj
.
effectiveType
=
form
.
effectiveType
obj
.
effectiveType
=
form
.
effectiveType
...
@@ -306,7 +336,8 @@ export default {
...
@@ -306,7 +336,8 @@ export default {
confirmButtonText
:
'确定'
,
confirmButtonText
:
'确定'
,
cancelButtonText
:
'取消'
,
cancelButtonText
:
'取消'
,
type
:
'warning'
type
:
'warning'
}).
then
(()
=>
{
})
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{})
.
catch
(()
=>
{})
...
...
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