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 fd955362
authored
Jul 19, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Plain Diff
Merge branch 'v3.13.1' into v3.13.6
2 parents
b2748c21
f9d3f554
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
122 additions
and
70 deletions
src/common/constant.js
src/components/selectMutiProDialog/indexForCoupon.vue
src/views/couponManage/editCashCoupon.vue
src/views/couponManage/editDiscountCoupon.vue
src/views/couponManage/editExchangeCoupon.vue
src/views/couponManage/editMemberService.vue
src/common/constant.js
View file @
fd95536
...
@@ -128,7 +128,8 @@ const orderSourceList = [
...
@@ -128,7 +128,8 @@ const orderSourceList = [
{
confId
:
'1'
,
confName
:
'商城订单'
},
{
confId
:
'1'
,
confName
:
'商城订单'
},
{
confId
:
'2'
,
confName
:
'直播订单'
},
{
confId
:
'2'
,
confName
:
'直播订单'
},
{
confId
:
'3'
,
confName
:
'秒杀订单'
},
{
confId
:
'3'
,
confName
:
'秒杀订单'
},
{
confId
:
'4'
,
confName
:
'众筹订单'
}
{
confId
:
'4'
,
confName
:
'众筹订单'
},
{
confId
:
'6'
,
confName
:
'配置升级订单'
}
]
]
const
deliveryTypeList
=
[
const
deliveryTypeList
=
[
...
...
src/components/selectMutiProDialog/indexForCoupon.vue
View file @
fd95536
...
@@ -88,7 +88,7 @@ export default {
...
@@ -88,7 +88,7 @@ export default {
getList
(
page
,
isMounted
=
false
)
{
getList
(
page
,
isMounted
=
false
)
{
var
params
=
{
var
params
=
{
goodsStatus
:
1
,
goodsStatus
:
1
,
goodsSource
:
1
,
goodsSource
s
:
[
1
,
4
]
,
currentPage
:
1
,
currentPage
:
1
,
pageNum
:
1
,
pageNum
:
1
,
pageSize
:
100000
,
pageSize
:
100000
,
...
...
src/views/couponManage/editCashCoupon.vue
View file @
fd95536
...
@@ -24,9 +24,7 @@
...
@@ -24,9 +24,7 @@
<div
:class=
"editForm.status == 3 ? 'darkColor' : ''"
class=
"ctime"
>
<div
:class=
"editForm.status == 3 ? 'darkColor' : ''"
class=
"ctime"
>
<!--
<span
class=
"ctime_name"
>
使用限制:
</span>
-->
<!--
<span
class=
"ctime_name"
>
使用限制:
</span>
-->
<span
v-show=
"editForm.denomination"
style=
"font-size: 12px;"
>
¥
</span>
<span
v-show=
"editForm.denomination"
style=
"font-size: 12px;"
>
¥
</span>
<span
class=
"ctime_content"
style=
"font-size: 20px;font-weight: 600;"
v-show=
"editForm.denomination"
>
{{
<span
class=
"ctime_content"
style=
"font-size: 20px;font-weight: 600;"
v-show=
"editForm.denomination"
>
{{
editForm
.
denomination
}}
</span>
editForm
.
denomination
}}
</span>
<span
class=
"ctime_content"
>
{{
editForm
.
useBarriers
==
1
?
'无门槛'
:
'满'
+
editForm
.
full
+
'元可用'
}}
</span>
<span
class=
"ctime_content"
>
{{
editForm
.
useBarriers
==
1
?
'无门槛'
:
'满'
+
editForm
.
full
+
'元可用'
}}
</span>
</div>
</div>
<div
class=
"ccode"
>
<div
class=
"ccode"
>
...
@@ -81,8 +79,7 @@
...
@@ -81,8 +79,7 @@
<br
/>
<br
/>
<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"
@
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
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-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"
>
...
@@ -106,16 +103,15 @@
...
@@ -106,16 +103,15 @@
<
template
slot=
"denominationHtml"
>
<
template
slot=
"denominationHtml"
>
<el-input
v-model=
"editForm.denomination"
id=
"denomination"
placeholder=
"请输入面值"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
></el-input>
<el-input
v-model=
"editForm.denomination"
id=
"denomination"
placeholder=
"请输入面值"
:disabled=
"apear != 'couponAdd'"
@
blur
.
native
.
capture=
"editForm.useChannel == 1 && denominationBlur($event)"
></el-input>
元
元
<span
style=
"color: red; margin-left: 15px"
v-if=
"priceFlag && editForm.useChannel == 1"
>
{{
<span
style=
"color: red; margin-left: 15px"
v-if=
"priceFlag && editForm.useChannel == 1"
>
{{
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
selectedAllProList
.
length
?
'存在零售价低于代金券的商品'
:
'系统暂无已创建的商品,请先创建好商品后再配置代金券'
}}
</span>
</
template
>
</
template
>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<
template
slot=
"stock"
slot-scope=
"scope"
>
<
template
slot=
"stock"
slot-scope=
"scope"
>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<div
v-else
>
<div
v-else
>
<el-input
:disabled=
"apear != 'couponAdd'"
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
></el-input>
<el-input
:disabled=
"apear != 'couponAdd'
|| isLimitStock
"
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
></el-input>
张
张
<el-checkbox
style=
"margin-left:10px;"
v-model=
"isLimitStock"
:disabled=
"disabledContent"
@
change=
"updateStock"
>
不限制库存
</el-checkbox>
</div>
</div>
</
template
>
</
template
>
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
<!-- 只有使用途径为线上商品时才有效,到店核销时屏蔽 -->
...
@@ -165,6 +161,7 @@ export default {
...
@@ -165,6 +161,7 @@ export default {
name
:
'editCashCoupon'
,
name
:
'editCashCoupon'
,
data
()
{
data
()
{
return
{
return
{
isLimitStock
:
false
,
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
showSubmit
:
true
,
showSubmit
:
true
,
...
@@ -303,7 +300,7 @@ export default {
...
@@ -303,7 +300,7 @@ export default {
},
},
{
{
label
:
'库存'
,
label
:
'库存'
,
name
:
'stock
'
,
name
:
!
this
.
isLimitStock
?
'stock'
:
'
'
,
addHtml
:
'stock'
addHtml
:
'stock'
// width: '150px',
// width: '150px',
// type: 'input'
// type: 'input'
...
@@ -324,7 +321,7 @@ export default {
...
@@ -324,7 +321,7 @@ export default {
addHtml
:
'editHtml'
,
addHtml
:
'editHtml'
,
isHide
:
true
isHide
:
true
}
}
]
,
]
// 适用门店
// 适用门店
// merchantRule: {
// merchantRule: {
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
...
@@ -483,10 +480,15 @@ export default {
...
@@ -483,10 +480,15 @@ export default {
},
},
methods
:
{
methods
:
{
updateStock
(
e
)
{
this
.
editRule
.
stock
[
0
].
required
=
!
e
this
.
editForm
.
stock
=
''
},
setAllDisabled
(
editName
)
{
setAllDisabled
(
editName
)
{
this
[
editName
].
forEach
(
item
=>
{
this
[
editName
]
&&
item
.
isDisabled
=
true
this
[
editName
].
forEach
(
item
=>
{
})
item
.
isDisabled
=
true
})
},
},
editCoupon
(
attribute
)
{
editCoupon
(
attribute
)
{
attribute
.
forEach
(
item
=>
{
attribute
.
forEach
(
item
=>
{
...
@@ -520,7 +522,7 @@ export default {
...
@@ -520,7 +522,7 @@ export default {
pageSize
:
100000
,
pageSize
:
100000
,
pageStart
:
0
,
pageStart
:
0
,
goodsStatus
:
1
,
goodsStatus
:
1
,
goodsSource
:
1
,
goodsSource
s
:
[
1
,
4
]
,
goodsName
:
''
goodsName
:
''
}
}
if
(
goodsName
)
{
if
(
goodsName
)
{
...
@@ -627,6 +629,10 @@ export default {
...
@@ -627,6 +629,10 @@ export default {
// if (this.$isGroupUp) {
// if (this.$isGroupUp) {
// this.editForm.scopeApplication = this.editForm.scopeApplication + ''
// this.editForm.scopeApplication = this.editForm.scopeApplication + ''
// }
// }
if
(
res
.
limitStockFlag
==
2
)
{
this
.
isLimitStock
=
true
this
.
editRule
.
stock
[
0
].
required
=
false
}
//有效期
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:永久有效
//有效类型 1:固定天数,领取后计算 2:时间段,3:永久有效
if
(
this
.
editForm
.
effectiveType
==
2
)
{
if
(
this
.
editForm
.
effectiveType
==
2
)
{
...
@@ -720,8 +726,8 @@ export default {
...
@@ -720,8 +726,8 @@ export default {
//面值
//面值
obj
.
denomination
=
form
.
denomination
obj
.
denomination
=
form
.
denomination
//库存
//库存
obj
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
obj
.
limitStockFlag
=
this
.
$isGroupUp
||
this
.
isLimitStock
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
if
(
!
this
.
$isGroupUp
||
!
this
.
isLimitStock
)
{
obj
.
stock
=
form
.
stock
obj
.
stock
=
form
.
stock
}
}
// else {
// else {
...
@@ -796,15 +802,16 @@ export default {
...
@@ -796,15 +802,16 @@ export default {
}
}
console
.
log
(
params
)
console
.
log
(
params
)
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$apis
.
couponManage
[
method
](
params
)
this
.
$message
({
.
then
(
res
=>
{
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
this
.
$message
({
type
:
res
.
code
==
'0'
?
'success'
:
'error'
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
.
finally
(()
=>
{
.
finally
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
...
@@ -826,7 +833,7 @@ export default {
...
@@ -826,7 +833,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{
})
.
catch
(()
=>
{})
}
else
{
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
}
...
...
src/views/couponManage/editDiscountCoupon.vue
View file @
fd95536
...
@@ -98,8 +98,9 @@
...
@@ -98,8 +98,9 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<
template
slot=
"stock"
slot-scope=
"scope"
>
<
template
slot=
"stock"
slot-scope=
"scope"
>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<el-input
:disabled=
"apear != 'couponAdd'"
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
></el-input>
<el-input
:disabled=
"apear != 'couponAdd'
|| isLimitStock
"
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
></el-input>
张
张
<el-checkbox
style=
"margin-left:10px;"
v-model=
"isLimitStock"
:disabled=
"apear != 'couponAdd'"
@
change=
"updateStock"
>
不限制库存
</el-checkbox>
</
template
>
</
template
>
<
template
slot=
"useDescriptionHtml"
>
<
template
slot=
"useDescriptionHtml"
>
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
<el-input
type=
"textarea"
v-model=
"editForm.useDescription"
:autosize=
"
{ minRows: 2, maxRows: 4 }" maxlength="200" :disabled="userDisable" />
...
@@ -126,6 +127,7 @@ export default {
...
@@ -126,6 +127,7 @@ export default {
name
:
'editDiscountCoupon'
,
name
:
'editDiscountCoupon'
,
data
()
{
data
()
{
return
{
return
{
isLimitStock
:
false
,
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
showSubmit
:
true
,
showSubmit
:
true
,
...
@@ -242,7 +244,7 @@ export default {
...
@@ -242,7 +244,7 @@ export default {
addHtml
:
'editHtml'
,
addHtml
:
'editHtml'
,
isHide
:
true
isHide
:
true
}
}
]
,
]
// 适用门店
// 适用门店
// merchantRule: {
// merchantRule: {
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
...
@@ -348,8 +350,12 @@ export default {
...
@@ -348,8 +350,12 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
updateStock
(
e
)
{
this
.
editRule
.
stock
[
0
].
required
=
!
e
this
.
editForm
.
stock
=
''
},
setAllDisabled
(
editName
)
{
setAllDisabled
(
editName
)
{
this
[
editName
].
forEach
(
item
=>
{
this
[
editName
]
&&
this
[
editName
]
.
forEach
(
item
=>
{
item
.
isDisabled
=
true
item
.
isDisabled
=
true
})
})
},
},
...
@@ -399,6 +405,10 @@ export default {
...
@@ -399,6 +405,10 @@ export default {
// if (this.$isGroupUp) {
// if (this.$isGroupUp) {
// this.editForm.scopeApplication = this.editForm.scopeApplication + ''
// this.editForm.scopeApplication = this.editForm.scopeApplication + ''
// }
// }
if
(
res
.
limitStockFlag
==
2
)
{
this
.
isLimitStock
=
true
this
.
editRule
.
stock
[
0
].
required
=
false
}
//使用限制,满多少元可用
//使用限制,满多少元可用
if
(
this
.
editForm
.
useBarriers
==
2
)
{
if
(
this
.
editForm
.
useBarriers
==
2
)
{
this
.
editForm
.
full
=
this
.
editForm
.
full
this
.
editForm
.
full
=
this
.
editForm
.
full
...
@@ -475,8 +485,8 @@ export default {
...
@@ -475,8 +485,8 @@ export default {
obj
.
full
=
form
.
full
obj
.
full
=
form
.
full
}
}
//库存
//库存
obj
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
obj
.
limitStockFlag
=
this
.
$isGroupUp
||
this
.
isLimitStock
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
if
(
!
this
.
$isGroupUp
||
!
this
.
isLimitStock
)
{
obj
.
stock
=
form
.
stock
obj
.
stock
=
form
.
stock
}
}
// else {
// else {
...
@@ -529,15 +539,16 @@ export default {
...
@@ -529,15 +539,16 @@ export default {
method
=
'createCouponApi'
//后台创建优惠券
method
=
'createCouponApi'
//后台创建优惠券
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$apis
.
couponManage
[
method
](
params
)
this
.
$message
({
.
then
(
res
=>
{
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
this
.
$message
({
type
:
res
.
code
==
'0'
?
'success'
:
'error'
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
.
finally
(()
=>
{
.
finally
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
...
@@ -559,7 +570,7 @@ export default {
...
@@ -559,7 +570,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{
})
.
catch
(()
=>
{})
}
else
{
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
}
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
fd95536
...
@@ -57,9 +57,10 @@
...
@@ -57,9 +57,10 @@
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<template
slot=
"stock"
slot-scope=
"scope"
>
<template
slot=
"stock"
slot-scope=
"scope"
>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<el-input
:disabled=
"apear != 'couponAdd'"
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
>
<el-input
:disabled=
"apear != 'couponAdd'
||isLimitStock
"
v-else
class=
"w-150"
v-model=
"editForm[scope.scope.name]"
placeholder=
"请输入库存"
>
<!--
<span
slot=
"suffix"
>
张
</span>
-->
<!--
<span
slot=
"suffix"
>
张
</span>
-->
</el-input>
</el-input>
<el-checkbox
style=
"margin-left:10px;"
v-model=
"isLimitStock"
:disabled=
"apear != 'couponAdd'"
@
change=
"updateStock"
>
不限制库存
</el-checkbox>
</
template
>
</
template
>
<
template
slot=
"directionalFlagHtml"
>
<
template
slot=
"directionalFlagHtml"
>
<div>
<div>
...
@@ -114,6 +115,7 @@ export default {
...
@@ -114,6 +115,7 @@ export default {
name
:
'editDiscountCoupon'
,
name
:
'editDiscountCoupon'
,
data
()
{
data
()
{
return
{
return
{
isLimitStock
:
false
,
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
defaultTime
:
[
'00:00:00'
,
'23:59:59'
],
// 选择日期后的默认时间
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
format
:
'yyyy-MM-dd HH:mm:ss'
,
// 日期显示格式
showSubmit
:
true
,
showSubmit
:
true
,
...
@@ -213,7 +215,7 @@ export default {
...
@@ -213,7 +215,7 @@ export default {
addHtml
:
'editHtml'
,
addHtml
:
'editHtml'
,
isHide
:
true
isHide
:
true
}
}
]
,
]
// 适用门店
// 适用门店
// merchantRule: {
// merchantRule: {
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
...
@@ -307,8 +309,12 @@ export default {
...
@@ -307,8 +309,12 @@ export default {
},
},
methods
:
{
methods
:
{
updateStock
(
e
)
{
this
.
editRule
.
stock
[
0
].
required
=
!
e
this
.
editForm
.
stock
=
''
},
setAllDisabled
(
editName
)
{
setAllDisabled
(
editName
)
{
this
[
editName
].
forEach
(
item
=>
{
this
[
editName
]
&&
this
[
editName
]
.
forEach
(
item
=>
{
item
.
isDisabled
=
true
item
.
isDisabled
=
true
})
})
},
},
...
@@ -347,6 +353,10 @@ export default {
...
@@ -347,6 +353,10 @@ export default {
// if (this.$isGroupUp) {
// if (this.$isGroupUp) {
// this.editForm.scopeApplication = this.editForm.scopeApplication + ''
// this.editForm.scopeApplication = this.editForm.scopeApplication + ''
// }
// }
if
(
res
.
limitStockFlag
==
2
)
{
this
.
isLimitStock
=
true
this
.
editRule
.
stock
[
0
].
required
=
false
}
//有效期
//有效期
//有效类型 1:固定天数,领取后计算 2:时间段,3:永久有效
//有效类型 1:固定天数,领取后计算 2:时间段,3:永久有效
if
(
this
.
editForm
.
effectiveType
==
2
)
{
if
(
this
.
editForm
.
effectiveType
==
2
)
{
...
@@ -406,8 +416,8 @@ export default {
...
@@ -406,8 +416,8 @@ export default {
}
}
//库存
//库存
obj
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
obj
.
limitStockFlag
=
this
.
$isGroupUp
||
this
.
isLimitStock
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
if
(
!
this
.
$isGroupUp
||
!
this
.
isLimitStock
)
{
obj
.
stock
=
form
.
stock
obj
.
stock
=
form
.
stock
}
}
// else {
// else {
...
@@ -458,15 +468,16 @@ export default {
...
@@ -458,15 +468,16 @@ export default {
method
=
'createCouponApi'
//后台创建优惠券
method
=
'createCouponApi'
//后台创建优惠券
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$apis
.
couponManage
[
method
](
params
)
this
.
$message
({
.
then
(
res
=>
{
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
this
.
$message
({
type
:
res
.
code
==
'0'
?
'success'
:
'error'
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
})
if
(
res
.
code
==
'0'
)
{
this
.
cancelJump
()
}
})
.
finally
(()
=>
{
.
finally
(()
=>
{
this
.
loading
=
false
this
.
loading
=
false
})
})
...
@@ -488,7 +499,7 @@ export default {
...
@@ -488,7 +499,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{
})
.
catch
(()
=>
{})
}
else
{
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
}
...
...
src/views/couponManage/editMemberService.vue
View file @
fd95536
...
@@ -18,11 +18,19 @@
...
@@ -18,11 +18,19 @@
<!-- effectiveType:1, effectiveDays:5 -->
<!-- effectiveType:1, effectiveDays:5 -->
<el-radio
:label=
"1"
id=
"effectiveDays"
>
<el-radio
:label=
"1"
id=
"effectiveDays"
>
领取后
领取后
<el-input
v-model=
"ruleForm.effectiveDays"
maxlength=
"4"
@
input=
"
<el-input
v-model=
"ruleForm.effectiveDays"
maxlength=
"4"
@
input=
"
val =>
{
val =>
{
ruleForm.effectiveDays = val.replace(/[^\d]/g, '')
ruleForm.effectiveDays = val.replace(/[^\d]/g, '')
}
}
" :disabled="title == '查看' || title == '编辑' || ruleForm.effectiveType != 1" placeholder="请输入" size="small" style="width: 100px">
</el-input>
"
:disabled="title == '查看' || title == '编辑' || ruleForm.effectiveType != 1"
placeholder="请输入"
size="small"
style="width: 100px"
>
</el-input>
天内有效
天内有效
</el-radio>
</el-radio>
<!-- effectiveStartTime effectiveEndTime +具体时间 -->
<!-- effectiveStartTime effectiveEndTime +具体时间 -->
...
@@ -46,11 +54,19 @@
...
@@ -46,11 +54,19 @@
</el-radio>
</el-radio>
<el-radio
:label=
"2"
id=
"limitDays"
>
<el-radio
:label=
"2"
id=
"limitDays"
>
有效期内每
有效期内每
<el-input
v-model=
"ruleForm.limitDays"
maxlength=
"4"
@
input=
"
<el-input
v-model=
"ruleForm.limitDays"
maxlength=
"4"
@
input=
"
val =>
{
val =>
{
ruleForm.limitDays = val.replace(/[^\d]/g, '')
ruleForm.limitDays = val.replace(/[^\d]/g, '')
}
}
" :disabled="title == '查看' || title == '编辑' || ruleForm.customUseLimit != 2" placeholder="请输入" size="small" style="width: 100px">
</el-input>
"
:disabled="title == '查看' || title == '编辑' || ruleForm.customUseLimit != 2"
placeholder="请输入"
size="small"
style="width: 100px"
>
</el-input>
天内可使用
天内可使用
<el-button
@
click
.
stop=
"sub2"
class=
"addsubBtn"
:disabled=
"title == '查看' || title == '编辑' || ruleForm.customUseLimit != 2"
>
-
</el-button>
<el-button
@
click
.
stop=
"sub2"
class=
"addsubBtn"
:disabled=
"title == '查看' || title == '编辑' || ruleForm.customUseLimit != 2"
>
-
</el-button>
<span
class=
"numWrap"
>
{{
ruleForm
.
limitTime2
}}
</span>
<span
class=
"numWrap"
>
{{
ruleForm
.
limitTime2
}}
</span>
...
@@ -69,12 +85,13 @@
...
@@ -69,12 +85,13 @@
元
元
</el-form-item>
</el-form-item>
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<!-- 库存,集团版集团账号-无限制库存;其他-输入框 -->
<el-form-item
size=
"small"
label=
"库存:"
prop=
"stock
"
>
<el-form-item
size=
"small"
label=
"库存:"
:prop=
"!isLimitStock ? 'stock' : ''
"
>
<!--
<el-input
size=
"small"
:disabled=
"title == '查看'"
maxlength=
"6"
v-model
.
number=
"ruleForm.stock"
placeholder=
"请输入"
></el-input>
-->
<!--
<el-input
size=
"small"
:disabled=
"title == '查看'"
maxlength=
"6"
v-model
.
number=
"ruleForm.stock"
placeholder=
"请输入"
></el-input>
-->
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<span
v-if=
"$isGroupUp"
>
无库存限制
</span>
<div
v-else
>
<div
v-else
>
<el-input
:disabled=
"title == '查看'"
class=
"w-150"
v-model=
"ruleForm.stock"
placeholder=
"请输入库存"
></el-input>
<el-input
:disabled=
"title == '查看'
|| isLimitStock
"
class=
"w-150"
v-model=
"ruleForm.stock"
placeholder=
"请输入库存"
></el-input>
张
张
<el-checkbox
style=
"margin-left:10px;"
v-model=
"isLimitStock"
:disabled=
"title == '查看'"
@
change=
"updateStock"
>
不限制库存
</el-checkbox>
</div>
</div>
</el-form-item>
</el-form-item>
<el-form-item
size=
"small"
label=
"使用说明:"
prop=
"useDescription"
>
<el-form-item
size=
"small"
label=
"使用说明:"
prop=
"useDescription"
>
...
@@ -190,7 +207,7 @@ export default {
...
@@ -190,7 +207,7 @@ export default {
return
callback
(
new
Error
(
'库存不能为空或负数'
))
return
callback
(
new
Error
(
'库存不能为空或负数'
))
}
}
setTimeout
(()
=>
{
setTimeout
(()
=>
{
if
(
!
(
/^
[
0-9
]
*$/
.
test
(
value
)
))
{
if
(
!
/^
[
0-9
]
*$/
.
test
(
value
))
{
callback
(
new
Error
(
'请输入数字值'
))
callback
(
new
Error
(
'请输入数字值'
))
}
else
{
}
else
{
if
(
value
<
0
)
{
if
(
value
<
0
)
{
...
@@ -203,6 +220,7 @@ export default {
...
@@ -203,6 +220,7 @@ export default {
}
}
return
{
return
{
timer
:
Function
,
timer
:
Function
,
isLimitStock
:
false
,
isEdit
:
false
,
isEdit
:
false
,
showSubmit
:
true
,
showSubmit
:
true
,
disabledDescription
:
false
,
disabledDescription
:
false
,
...
@@ -228,7 +246,8 @@ export default {
...
@@ -228,7 +246,8 @@ export default {
shopPrice
:
''
,
shopPrice
:
''
,
stock
:
''
,
stock
:
''
,
useDescription
:
''
,
useDescription
:
''
,
daterange
:
[]
daterange
:
[],
limitStockFlag
:
1
// scopeApplication: ''
// scopeApplication: ''
},
},
copyRuleForm
:
{},
copyRuleForm
:
{},
...
@@ -254,7 +273,7 @@ export default {
...
@@ -254,7 +273,7 @@ export default {
},
},
merchantId
:
''
,
merchantId
:
''
,
merchantName
:
''
,
merchantName
:
''
,
title
:
this
.
$route
.
query
.
title
||
''
,
title
:
this
.
$route
.
query
.
title
||
''
// 适用门店
// 适用门店
// merchantRule: {
// merchantRule: {
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
// scopeApplication: [{ required: true, message: '请选择适用范围', trigger: 'change' }]
...
@@ -340,6 +359,9 @@ export default {
...
@@ -340,6 +359,9 @@ export default {
}
}
},
},
methods
:
{
methods
:
{
updateStock
(
e
)
{
this
.
ruleForm
.
stock
=
''
},
setAllDisabled
(
editName
)
{
setAllDisabled
(
editName
)
{
this
[
editName
].
forEach
(
item
=>
{
this
[
editName
].
forEach
(
item
=>
{
item
.
isDisabled
=
true
item
.
isDisabled
=
true
...
@@ -357,9 +379,9 @@ export default {
...
@@ -357,9 +379,9 @@ export default {
this
.
ruleForm
=
res
this
.
ruleForm
=
res
this
.
ruleForm
.
anticipatedCost
=
(
res
.
anticipatedCost
/
100
).
toFixed
(
2
)
this
.
ruleForm
.
anticipatedCost
=
(
res
.
anticipatedCost
/
100
).
toFixed
(
2
)
this
.
ruleForm
.
customUseLimit
=
res
.
useType
this
.
ruleForm
.
customUseLimit
=
res
.
useType
// if (this.$isGroupUp
) {
if
(
res
.
limitStockFlag
==
2
)
{
// this.ruleForm.scopeApplication = res.scopeApplication + ''
this
.
isLimitStock
=
true
//
}
}
if
(
res
.
effectiveType
==
1
)
{
if
(
res
.
effectiveType
==
1
)
{
this
.
ruleForm
.
effectiveDays
=
res
.
effectiveDays
this
.
ruleForm
.
effectiveDays
=
res
.
effectiveDays
}
}
...
@@ -467,8 +489,8 @@ export default {
...
@@ -467,8 +489,8 @@ export default {
params
.
shopPrice
=
this
.
ruleForm
.
shopPrice
params
.
shopPrice
=
this
.
ruleForm
.
shopPrice
// params.stock = this.ruleForm.stock
// params.stock = this.ruleForm.stock
//库存
//库存
params
.
limitStockFlag
=
this
.
$isGroupUp
?
2
:
1
params
.
limitStockFlag
=
this
.
$isGroupUp
||
this
.
isLimitStock
?
2
:
1
if
(
!
this
.
$isGroupUp
)
{
if
(
!
this
.
$isGroupUp
||
!
this
.
isLimitStock
)
{
params
.
stock
=
this
.
ruleForm
.
stock
params
.
stock
=
this
.
ruleForm
.
stock
}
}
// else {
// else {
...
...
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