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 b04ead14
authored
Jul 17, 2023
by
王志慧
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
服务券、兑换券添加不限制库存功能
1 parent
e31572c7
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
136 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 @
b04ead1
This diff is collapsed.
Click to expand it.
src/views/couponManage/editDiscountCoupon.vue
View file @
b04ead1
...
@@ -18,7 +18,6 @@
...
@@ -18,7 +18,6 @@
<span
v-if=
"editForm.effectiveType == 2"
>
{{
couponTime
}}
</span>
<span
v-if=
"editForm.effectiveType == 2"
>
{{
couponTime
}}
</span>
</div>
</div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px;"
></div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px;"
></div>
<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
class=
"ctime_content"
style=
"font-size: 20px;font-weight: 600;"
v-show=
"editForm.discountIntensity"
>
{{
editForm
.
discountIntensity
}}
</span>
<span
class=
"ctime_content"
style=
"font-size: 20px;font-weight: 600;"
v-show=
"editForm.discountIntensity"
>
{{
editForm
.
discountIntensity
}}
</span>
...
@@ -98,8 +97,9 @@
...
@@ -98,8 +97,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" />
...
@@ -119,13 +119,13 @@
...
@@ -119,13 +119,13 @@
</GLFooter>
</GLFooter>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
limitPrice
}
from
'@/common/constant'
import
{
limitPrice
}
from
'@/common/constant'
export
default
{
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 +242,7 @@ export default {
...
@@ -242,7 +242,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' }]
...
@@ -269,11 +269,9 @@ export default {
...
@@ -269,11 +269,9 @@ export default {
// ]
// ]
}
}
},
},
created
()
{
created
()
{
this
.
editRule
.
stock
[
0
].
required
=
!
this
.
$isGroupUp
this
.
editRule
.
stock
[
0
].
required
=
!
this
.
$isGroupUp
},
},
mounted
()
{
mounted
()
{
this
.
setMinHeight
()
this
.
setMinHeight
()
this
.
routeInfo
=
this
.
$route
.
params
this
.
routeInfo
=
this
.
$route
.
params
...
@@ -301,7 +299,6 @@ export default {
...
@@ -301,7 +299,6 @@ export default {
this
.
isDisabled
=
false
this
.
isDisabled
=
false
}
}
},
},
watch
:
{
watch
:
{
editForm
:
{
editForm
:
{
handler
(
val
)
{
handler
(
val
)
{
...
@@ -348,8 +345,12 @@ export default {
...
@@ -348,8 +345,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
})
})
},
},
...
@@ -383,7 +384,6 @@ export default {
...
@@ -383,7 +384,6 @@ export default {
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
},
},
getInfo
()
{
getInfo
()
{
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
couponManage
this
.
$apis
.
couponManage
...
@@ -399,6 +399,10 @@ export default {
...
@@ -399,6 +399,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
...
@@ -416,7 +420,6 @@ export default {
...
@@ -416,7 +420,6 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
validateRules
()
{
validateRules
()
{
var
form
=
this
.
editForm
var
form
=
this
.
editForm
if
(
form
.
effectiveType
==
'2'
)
{
if
(
form
.
effectiveType
==
'2'
)
{
...
@@ -441,7 +444,6 @@ export default {
...
@@ -441,7 +444,6 @@ export default {
this
.
editForm
.
discountIntensity
=
''
this
.
editForm
.
discountIntensity
=
''
}
}
},
},
getCouponInfoParams
()
{
getCouponInfoParams
()
{
var
obj
=
{}
var
obj
=
{}
var
id
=
this
.
routeInfo
.
id
var
id
=
this
.
routeInfo
.
id
...
@@ -475,8 +477,8 @@ export default {
...
@@ -475,8 +477,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 {
...
@@ -497,12 +499,10 @@ export default {
...
@@ -497,12 +499,10 @@ export default {
obj
.
anticipatedCost
=
(
form
.
anticipatedCost
*
100
).
toFixed
(
0
)
obj
.
anticipatedCost
=
(
form
.
anticipatedCost
*
100
).
toFixed
(
0
)
return
obj
return
obj
},
},
// 跳转
// 跳转
whereToGo
(
id
)
{
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
document
.
getElementById
(
id
).
scrollIntoView
()
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
validateRules
()
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
...
@@ -529,7 +529,8 @@ export default {
...
@@ -529,7 +529,8 @@ export default {
method
=
'createCouponApi'
//后台创建优惠券
method
=
'createCouponApi'
//后台创建优惠券
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$apis
.
couponManage
[
method
](
params
)
.
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
...
@@ -559,7 +560,7 @@ export default {
...
@@ -559,7 +560,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{
})
.
catch
(()
=>
{})
}
else
{
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
}
...
@@ -577,21 +578,18 @@ export default {
...
@@ -577,21 +578,18 @@ export default {
top
:
92px
;
top
:
92px
;
background-image
:
url(../../assets/coupon/phone.png)
;
background-image
:
url(../../assets/coupon/phone.png)
;
}
}
.right_show
.card-top
{
.right_show
.card-top
{
height
:
59px
;
height
:
59px
;
width
:
251px
;
width
:
251px
;
margin-left
:
18px
;
margin-left
:
18px
;
margin-top
:
55px
;
margin-top
:
55px
;
}
}
/* .right_show .card-middle {
/* .right_show .card-middle {
height: 388px;
height: 388px;
width: 251px;
width: 251px;
margin-left: 18px;
margin-left: 18px;
overflow: auto;
overflow: auto;
}
}
.right_show .card-middle .cname {
.right_show .card-middle .cname {
width: 170px;
width: 170px;
height: 17px;
height: 17px;
...
@@ -603,7 +601,6 @@ export default {
...
@@ -603,7 +601,6 @@ export default {
margin-top: 15px;
margin-top: 15px;
display: inline-block;
display: inline-block;
}
}
.right_show .card-middle .ctype {
.right_show .card-middle .ctype {
width: 48px;
width: 48px;
height: 20px;
height: 20px;
...
@@ -614,7 +611,6 @@ export default {
...
@@ -614,7 +611,6 @@ export default {
display: inline-block;
display: inline-block;
float: right;
float: right;
}
}
.right_show .card-middle .ctype .ctypeName {
.right_show .card-middle .ctype .ctypeName {
width: 36px;
width: 36px;
height: 17px;
height: 17px;
...
@@ -624,7 +620,6 @@ export default {
...
@@ -624,7 +620,6 @@ export default {
font-weight: 400;
font-weight: 400;
margin-left: 6px;
margin-left: 6px;
}
}
.right_show .card-middle .ctime {
.right_show .card-middle .ctime {
margin-left: 10px;
margin-left: 10px;
margin-top: 17px;
margin-top: 17px;
...
@@ -637,7 +632,6 @@ export default {
...
@@ -637,7 +632,6 @@ export default {
color: #333333;
color: #333333;
font-weight: 400;
font-weight: 400;
}
}
.right_show .card-middle .ctime .ctime_content {
.right_show .card-middle .ctime .ctime_content {
height: 17px;
height: 17px;
font-family: PingFangSC-Regular;
font-family: PingFangSC-Regular;
...
@@ -646,14 +640,12 @@ export default {
...
@@ -646,14 +640,12 @@ export default {
font-weight: 400;
font-weight: 400;
margin-left: 5px;
margin-left: 5px;
}
}
.right_show .card-middle .ccode {
.right_show .card-middle .ccode {
width: 120px;
width: 120px;
height: 120px;
height: 120px;
margin-left: 67px;
margin-left: 67px;
margin-top: 8px;
margin-top: 8px;
}
}
.right_show .card-middle .ccodeName {
.right_show .card-middle .ccodeName {
width: 68px;
width: 68px;
height: 17px;
height: 17px;
...
@@ -664,7 +656,6 @@ export default {
...
@@ -664,7 +656,6 @@ export default {
margin-left: 93px;
margin-left: 93px;
margin-top: 8px;
margin-top: 8px;
}
}
.right_show .card-middle .cremarks {
.right_show .card-middle .cremarks {
margin-left: 10px;
margin-left: 10px;
margin-top: 17px;
margin-top: 17px;
...
@@ -675,7 +666,6 @@ export default {
...
@@ -675,7 +666,6 @@ export default {
color: #333333;
color: #333333;
font-weight: 400;
font-weight: 400;
}
}
.right_show .card-middle .cremarks_content {
.right_show .card-middle .cremarks_content {
margin-left: 10px;
margin-left: 10px;
margin-right: 11px;
margin-right: 11px;
...
@@ -688,7 +678,6 @@ export default {
...
@@ -688,7 +678,6 @@ export default {
font-weight: 400;
font-weight: 400;
word-break: break-word;
word-break: break-word;
} */
} */
.card_one
{
.card_one
{
width
:
243px
;
width
:
243px
;
height
:
288px
;
height
:
288px
;
...
@@ -697,7 +686,6 @@ export default {
...
@@ -697,7 +686,6 @@ export default {
margin-left
:
22px
;
margin-left
:
22px
;
margin-top
:
5.81px
;
margin-top
:
5.81px
;
}
}
.cname
{
.cname
{
margin
:
16px
0
10px
16px
;
margin
:
16px
0
10px
16px
;
display
:
inline-block
;
display
:
inline-block
;
...
@@ -710,7 +698,6 @@ export default {
...
@@ -710,7 +698,6 @@ export default {
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.ctype
{
.ctype
{
width
:
48px
;
width
:
48px
;
height
:
20px
;
height
:
20px
;
...
@@ -721,7 +708,6 @@ export default {
...
@@ -721,7 +708,6 @@ export default {
display
:
inline-block
;
display
:
inline-block
;
float
:
right
;
float
:
right
;
}
}
.ctypeName
{
.ctypeName
{
width
:
36px
;
width
:
36px
;
height
:
17px
;
height
:
17px
;
...
@@ -731,13 +717,11 @@ export default {
...
@@ -731,13 +717,11 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
margin-left
:
6px
;
margin-left
:
6px
;
}
}
.ctime
{
.ctime
{
margin
:
8px
16px
9px
;
margin
:
8px
16px
9px
;
text-align
:
center
;
text-align
:
center
;
color
:
#fc5b32
;
color
:
#fc5b32
;
}
}
/* .ctime_name {
/* .ctime_name {
width: 48px;
width: 48px;
height: 17px;
height: 17px;
...
@@ -746,7 +730,6 @@ export default {
...
@@ -746,7 +730,6 @@ export default {
color: #333333;
color: #333333;
font-weight: 400;
font-weight: 400;
} */
} */
.ctime_content
{
.ctime_content
{
height
:
17px
;
height
:
17px
;
font-family
:
PingFangSC-Regular
;
font-family
:
PingFangSC-Regular
;
...
@@ -754,14 +737,12 @@ export default {
...
@@ -754,14 +737,12 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
margin-left
:
5px
;
margin-left
:
5px
;
}
}
.ccode
{
.ccode
{
width
:
120px
;
width
:
120px
;
height
:
120px
;
height
:
120px
;
margin
:
0
16px
;
margin
:
0
16px
;
margin
:
auto
;
margin
:
auto
;
}
}
.ccodeName
{
.ccodeName
{
width
:
68px
;
width
:
68px
;
height
:
17px
;
height
:
17px
;
...
@@ -772,7 +753,6 @@ export default {
...
@@ -772,7 +753,6 @@ export default {
margin-left
:
88px
;
margin-left
:
88px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.link-top
{
.link-top
{
width
:
227px
;
width
:
227px
;
height
:
1px
;
height
:
1px
;
...
@@ -780,12 +760,10 @@ export default {
...
@@ -780,12 +760,10 @@ export default {
margin-left
:
8px
;
margin-left
:
8px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.code_d
{
.code_d
{
margin-left
:
98px
;
margin-left
:
98px
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.card_two
{
.card_two
{
width
:
243px
;
width
:
243px
;
height
:
162px
;
height
:
162px
;
...
@@ -794,7 +772,6 @@ export default {
...
@@ -794,7 +772,6 @@ export default {
margin-left
:
22px
;
margin-left
:
22px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.cremarks
{
.cremarks
{
padding-left
:
8px
;
padding-left
:
8px
;
padding-top
:
8px
;
padding-top
:
8px
;
...
@@ -805,7 +782,6 @@ export default {
...
@@ -805,7 +782,6 @@ export default {
color
:
#333333
;
color
:
#333333
;
font-weight
:
400
;
font-weight
:
400
;
}
}
.cremarks_content
{
.cremarks_content
{
margin-left
:
8px
;
margin-left
:
8px
;
margin-right
:
8px
;
margin-right
:
8px
;
...
@@ -819,18 +795,15 @@ export default {
...
@@ -819,18 +795,15 @@ export default {
word-break
:
break-word
;
word-break
:
break-word
;
overflow
:
auto
;
overflow
:
auto
;
}
}
.promptCopy
{
.promptCopy
{
font-size
:
14px
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
color
:
#999
;
color
:
#999
;
margin-left
:
-10px
;
margin-left
:
-10px
;
}
}
.glsx-combi-form
.el-form-item--small.el-form-item
{
.glsx-combi-form
.el-form-item--small.el-form-item
{
margin-top
:
0px
!important
;
margin-top
:
0px
!important
;
}
}
.couponImg
{
.couponImg
{
width
:
69px
;
width
:
69px
;
height
:
69px
;
height
:
69px
;
...
@@ -840,7 +813,6 @@ export default {
...
@@ -840,7 +813,6 @@ export default {
margin-top
:
-6px
;
margin-top
:
-6px
;
margin-right
:
-6px
;
margin-right
:
-6px
;
}
}
.validityPeriod
{
.validityPeriod
{
font-size
:
12px
;
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
...
@@ -848,38 +820,31 @@ export default {
...
@@ -848,38 +820,31 @@ export default {
color
:
#a0a0a0
;
color
:
#a0a0a0
;
margin
:
0
16px
8px
16px
;
margin
:
0
16px
8px
16px
;
}
}
.process
{
.process
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
margin-bottom
:
2px
;
margin-bottom
:
2px
;
}
}
.process
.process_text
{
.process
.process_text
{
margin-left
:
2px
;
margin-left
:
2px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#333
;
color
:
#333
;
}
}
.process
img
{
.process
img
{
width
:
12px
;
width
:
12px
;
height
:
12px
;
height
:
12px
;
}
}
.process
.rightArrow
{
.process
.rightArrow
{
padding
:
0
4px
;
padding
:
0
4px
;
}
}
.slider
{
.slider
{
height
:
380px
;
height
:
380px
;
overflow
:
auto
;
overflow
:
auto
;
}
}
.slider
::-webkit-scrollbar-thumb
{
.slider
::-webkit-scrollbar-thumb
{
background
:
transparent
;
background
:
transparent
;
}
}
.darkColor
{
.darkColor
{
color
:
#999
;
color
:
#999
;
}
}
...
...
src/views/couponManage/editExchangeCoupon.vue
View file @
b04ead1
...
@@ -21,7 +21,6 @@
...
@@ -21,7 +21,6 @@
<span
v-if=
"editForm.effectiveType == 2"
>
{{
couponTime
}}
</span>
<span
v-if=
"editForm.effectiveType == 2"
>
{{
couponTime
}}
</span>
</div>
</div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px 7px;"
></div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px 7px;"
></div>
<div
class=
"ccode"
>
<div
class=
"ccode"
>
<img
src=
"../../assets/coupon/code2.png"
/>
<img
src=
"../../assets/coupon/code2.png"
/>
</div>
</div>
...
@@ -57,9 +56,10 @@
...
@@ -57,9 +56,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>
...
@@ -107,13 +107,13 @@
...
@@ -107,13 +107,13 @@
</GLFooter>
</GLFooter>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
import
{
limitPrice
}
from
'@/common/constant'
import
{
limitPrice
}
from
'@/common/constant'
export
default
{
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 +213,7 @@ export default {
...
@@ -213,7 +213,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' }]
...
@@ -240,11 +240,9 @@ export default {
...
@@ -240,11 +240,9 @@ export default {
// ]
// ]
}
}
},
},
created
()
{
created
()
{
this
.
editRule
.
stock
[
0
].
required
=
!
this
.
$isGroupUp
this
.
editRule
.
stock
[
0
].
required
=
!
this
.
$isGroupUp
},
},
mounted
()
{
mounted
()
{
this
.
setMinHeight
()
this
.
setMinHeight
()
this
.
routeInfo
=
this
.
$route
.
params
this
.
routeInfo
=
this
.
$route
.
params
...
@@ -272,7 +270,6 @@ export default {
...
@@ -272,7 +270,6 @@ export default {
this
.
isDisabled
=
false
this
.
isDisabled
=
false
}
}
},
},
watch
:
{
watch
:
{
editForm
:
{
editForm
:
{
handler
(
val
)
{
handler
(
val
)
{
...
@@ -305,10 +302,13 @@ export default {
...
@@ -305,10 +302,13 @@ 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
})
})
},
},
...
@@ -334,7 +334,6 @@ export default {
...
@@ -334,7 +334,6 @@ export default {
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
},
},
getInfo
()
{
getInfo
()
{
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
couponManage
this
.
$apis
.
couponManage
...
@@ -347,6 +346,10 @@ export default {
...
@@ -347,6 +346,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
)
{
...
@@ -360,7 +363,6 @@ export default {
...
@@ -360,7 +363,6 @@ export default {
this
.
loading
=
false
this
.
loading
=
false
})
})
},
},
validateRules
()
{
validateRules
()
{
var
form
=
this
.
editForm
var
form
=
this
.
editForm
if
(
form
.
effectiveType
==
'2'
)
{
if
(
form
.
effectiveType
==
'2'
)
{
...
@@ -376,7 +378,6 @@ export default {
...
@@ -376,7 +378,6 @@ export default {
this
.
editRule
.
effectiveDays
[
0
].
required
=
false
this
.
editRule
.
effectiveDays
[
0
].
required
=
false
}
}
},
},
getCouponInfoParams
()
{
getCouponInfoParams
()
{
var
obj
=
{}
var
obj
=
{}
var
id
=
this
.
routeInfo
.
id
var
id
=
this
.
routeInfo
.
id
...
@@ -404,10 +405,9 @@ export default {
...
@@ -404,10 +405,9 @@ export default {
obj
.
effectiveEndTime
=
d
[
1
]
obj
.
effectiveEndTime
=
d
[
1
]
}
}
}
}
//库存
//库存
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 {
...
@@ -426,12 +426,10 @@ export default {
...
@@ -426,12 +426,10 @@ export default {
obj
.
anticipatedCost
=
(
form
.
anticipatedCost
*
100
).
toFixed
(
0
)
obj
.
anticipatedCost
=
(
form
.
anticipatedCost
*
100
).
toFixed
(
0
)
return
obj
return
obj
},
},
// 跳转
// 跳转
whereToGo
(
id
)
{
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
document
.
getElementById
(
id
).
scrollIntoView
()
},
},
handleConfirm
()
{
handleConfirm
()
{
this
.
validateRules
()
this
.
validateRules
()
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
this
.
$refs
.
editFormRef
.
$refs
[
this
.
editChildRef
].
validate
((
valid
,
errorObj
)
=>
{
...
@@ -458,7 +456,8 @@ export default {
...
@@ -458,7 +456,8 @@ export default {
method
=
'createCouponApi'
//后台创建优惠券
method
=
'createCouponApi'
//后台创建优惠券
}
}
this
.
loading
=
true
this
.
loading
=
true
this
.
$apis
.
couponManage
[
method
](
params
).
then
(
res
=>
{
this
.
$apis
.
couponManage
[
method
](
params
)
.
then
(
res
=>
{
this
.
$message
({
this
.
$message
({
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
message
:
res
.
code
==
'0'
?
'操作成功'
:
res
.
message
,
type
:
res
.
code
==
'0'
?
'success'
:
'error'
type
:
res
.
code
==
'0'
?
'success'
:
'error'
...
@@ -488,7 +487,7 @@ export default {
...
@@ -488,7 +487,7 @@ export default {
.
then
(()
=>
{
.
then
(()
=>
{
this
.
cancelJump
()
this
.
cancelJump
()
})
})
.
catch
(()
=>
{
})
.
catch
(()
=>
{})
}
else
{
}
else
{
this
.
cancelJump
()
this
.
cancelJump
()
}
}
...
@@ -506,14 +505,12 @@ export default {
...
@@ -506,14 +505,12 @@ export default {
top
:
92px
;
top
:
92px
;
background-image
:
url(../../assets/coupon/phone.png)
;
background-image
:
url(../../assets/coupon/phone.png)
;
}
}
.right_show
.card-top
{
.right_show
.card-top
{
height
:
59px
;
height
:
59px
;
width
:
251px
;
width
:
251px
;
margin-left
:
18px
;
margin-left
:
18px
;
margin-top
:
55px
;
margin-top
:
55px
;
}
}
.card_one
{
.card_one
{
width
:
243px
;
width
:
243px
;
height
:
260px
;
height
:
260px
;
...
@@ -522,7 +519,6 @@ export default {
...
@@ -522,7 +519,6 @@ export default {
margin-left
:
22px
;
margin-left
:
22px
;
margin-top
:
5.81px
;
margin-top
:
5.81px
;
}
}
.cname
{
.cname
{
margin
:
16px
0
10px
16px
;
margin
:
16px
0
10px
16px
;
display
:
inline-block
;
display
:
inline-block
;
...
@@ -535,7 +531,6 @@ export default {
...
@@ -535,7 +531,6 @@ export default {
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
white-space
:
nowrap
;
white-space
:
nowrap
;
}
}
.ctype
{
.ctype
{
width
:
48px
;
width
:
48px
;
height
:
20px
;
height
:
20px
;
...
@@ -546,7 +541,6 @@ export default {
...
@@ -546,7 +541,6 @@ export default {
display
:
inline-block
;
display
:
inline-block
;
float
:
right
;
float
:
right
;
}
}
.ctypeName
{
.ctypeName
{
width
:
36px
;
width
:
36px
;
height
:
17px
;
height
:
17px
;
...
@@ -556,7 +550,6 @@ export default {
...
@@ -556,7 +550,6 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
margin-left
:
6px
;
margin-left
:
6px
;
}
}
/* .ctime_name {
/* .ctime_name {
width: 48px;
width: 48px;
height: 17px;
height: 17px;
...
@@ -565,14 +558,12 @@ export default {
...
@@ -565,14 +558,12 @@ export default {
color: #333333;
color: #333333;
font-weight: 400;
font-weight: 400;
} */
} */
.ccode
{
.ccode
{
width
:
120px
;
width
:
120px
;
height
:
120px
;
height
:
120px
;
margin
:
0
16px
;
margin
:
0
16px
;
margin
:
auto
;
margin
:
auto
;
}
}
.ccodeName
{
.ccodeName
{
width
:
68px
;
width
:
68px
;
height
:
17px
;
height
:
17px
;
...
@@ -583,7 +574,6 @@ export default {
...
@@ -583,7 +574,6 @@ export default {
margin-left
:
88px
;
margin-left
:
88px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.link-top
{
.link-top
{
width
:
227px
;
width
:
227px
;
height
:
1px
;
height
:
1px
;
...
@@ -591,12 +581,10 @@ export default {
...
@@ -591,12 +581,10 @@ export default {
margin-left
:
8px
;
margin-left
:
8px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.code_d
{
.code_d
{
margin-left
:
98px
;
margin-left
:
98px
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.card_two
{
.card_two
{
width
:
243px
;
width
:
243px
;
height
:
162px
;
height
:
162px
;
...
@@ -605,7 +593,6 @@ export default {
...
@@ -605,7 +593,6 @@ export default {
margin-left
:
22px
;
margin-left
:
22px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.cremarks
{
.cremarks
{
padding-left
:
8px
;
padding-left
:
8px
;
padding-top
:
8px
;
padding-top
:
8px
;
...
@@ -616,7 +603,6 @@ export default {
...
@@ -616,7 +603,6 @@ export default {
color
:
#333333
;
color
:
#333333
;
font-weight
:
400
;
font-weight
:
400
;
}
}
.cremarks_content
{
.cremarks_content
{
margin-left
:
8px
;
margin-left
:
8px
;
margin-right
:
8px
;
margin-right
:
8px
;
...
@@ -630,18 +616,15 @@ export default {
...
@@ -630,18 +616,15 @@ export default {
word-break
:
break-word
;
word-break
:
break-word
;
overflow
:
auto
;
overflow
:
auto
;
}
}
.promptCopy
{
.promptCopy
{
font-size
:
14px
;
font-size
:
14px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
color
:
#999
;
color
:
#999
;
margin-left
:
-10px
;
margin-left
:
-10px
;
}
}
.glsx-combi-form
.el-form-item--small.el-form-item
{
.glsx-combi-form
.el-form-item--small.el-form-item
{
margin-top
:
0px
!important
;
margin-top
:
0px
!important
;
}
}
.couponImg
{
.couponImg
{
width
:
69px
;
width
:
69px
;
height
:
69px
;
height
:
69px
;
...
@@ -651,7 +634,6 @@ export default {
...
@@ -651,7 +634,6 @@ export default {
margin-top
:
-6px
;
margin-top
:
-6px
;
margin-right
:
-6px
;
margin-right
:
-6px
;
}
}
.validityPeriod
{
.validityPeriod
{
font-size
:
12px
;
font-size
:
12px
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
font-family
:
PingFangSC-Regular
,
PingFang
SC
;
...
@@ -659,38 +641,31 @@ export default {
...
@@ -659,38 +641,31 @@ export default {
color
:
#a0a0a0
;
color
:
#a0a0a0
;
margin
:
0
16px
8px
16px
;
margin
:
0
16px
8px
16px
;
}
}
.process
{
.process
{
display
:
flex
;
display
:
flex
;
align-items
:
center
;
align-items
:
center
;
justify-content
:
center
;
justify-content
:
center
;
margin-bottom
:
2px
;
margin-bottom
:
2px
;
}
}
.process
.process_text
{
.process
.process_text
{
margin-left
:
2px
;
margin-left
:
2px
;
font-size
:
12px
;
font-size
:
12px
;
color
:
#333
;
color
:
#333
;
}
}
.process
img
{
.process
img
{
width
:
12px
;
width
:
12px
;
height
:
12px
;
height
:
12px
;
}
}
.process
.rightArrow
{
.process
.rightArrow
{
padding
:
0
4px
;
padding
:
0
4px
;
}
}
.slider
{
.slider
{
height
:
380px
;
height
:
380px
;
overflow
:
auto
;
overflow
:
auto
;
}
}
.slider
::-webkit-scrollbar-thumb
{
.slider
::-webkit-scrollbar-thumb
{
background
:
transparent
;
background
:
transparent
;
}
}
.darkColor
{
.darkColor
{
color
:
#999
;
color
:
#999
;
}
}
...
...
src/views/couponManage/editMemberService.vue
View file @
b04ead1
...
@@ -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"
>
...
@@ -84,7 +101,6 @@
...
@@ -84,7 +101,6 @@
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
<el-button
style=
"margin-left: 80px"
@
click=
"editMessage"
>
编辑
</el-button>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
<!--
<div
class=
"edit-container"
v-if=
"$isGroupUp"
>
<!--
<div
class=
"edit-container"
v-if=
"$isGroupUp"
>
<p
class=
"edit-title"
>
适用门店配置
</p>
<p
class=
"edit-title"
>
适用门店配置
</p>
<glsx-combi-form
class=
"edit-form-container"
ref=
"merchantRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"ruleForm"
:formData=
"merchantEditFormData"
:formRules=
"merchantRule"
></glsx-combi-form>
<glsx-combi-form
class=
"edit-form-container"
ref=
"merchantRef"
:isEdit=
"true"
:isBlock=
"true"
:formRef=
"editChildRef"
:formObj=
"ruleForm"
:formData=
"merchantEditFormData"
:formRules=
"merchantRule"
></glsx-combi-form>
...
@@ -107,7 +123,6 @@
...
@@ -107,7 +123,6 @@
<div
:class=
"ruleForm.status == 3 ? 'darkColor' : ''"
class=
"cname"
>
{{
ruleForm
.
couponName
}}
</div>
<div
:class=
"ruleForm.status == 3 ? 'darkColor' : ''"
class=
"cname"
>
{{
ruleForm
.
couponName
}}
</div>
<img
src=
"../../images/unService.png"
class=
"couponImg"
v-if=
"ruleForm.status == 3"
/>
<img
src=
"../../images/unService.png"
class=
"couponImg"
v-if=
"ruleForm.status == 3"
/>
<img
src=
"../../images/service.png"
class=
"couponImg"
v-else
/>
<img
src=
"../../images/service.png"
class=
"couponImg"
v-else
/>
<!--
<div
class=
"ctype"
>
<!--
<div
class=
"ctype"
>
<div
class=
"ctypeName"
></div>
<div
class=
"ctypeName"
></div>
</div>
-->
</div>
-->
...
@@ -116,7 +131,6 @@
...
@@ -116,7 +131,6 @@
<span>
{{
effectiveRangeText
}}
</span>
<span>
{{
effectiveRangeText
}}
</span>
</div>
</div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px;"
></div>
<div
style=
"height: 1px;background-color: rgb(238, 238, 238);margin: 0 16px;"
></div>
<div
:class=
"ruleForm.status == 3 ? 'darkColor' : ''"
class=
"ctime"
>
<div
:class=
"ruleForm.status == 3 ? 'darkColor' : ''"
class=
"ctime"
>
<!--
<span
class=
"ctime_name"
>
使用限制:
</span>
-->
<!--
<span
class=
"ctime_name"
>
使用限制:
</span>
-->
<span
class=
"ctime_content"
>
{{
limitText
}}
</span>
<span
class=
"ctime_content"
>
{{
limitText
}}
</span>
...
@@ -163,7 +177,6 @@
...
@@ -163,7 +177,6 @@
</glsx-dialog>
</glsx-dialog>
</div>
</div>
</
template
>
</
template
>
<
script
>
<
script
>
import
glsxDialog
from
'@/components/glsx-dialog'
import
glsxDialog
from
'@/components/glsx-dialog'
import
{
limitPrice
}
from
'@/common/constant'
import
{
limitPrice
}
from
'@/common/constant'
...
@@ -190,7 +203,7 @@ export default {
...
@@ -190,7 +203,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 +216,7 @@ export default {
...
@@ -203,6 +216,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 +242,8 @@ export default {
...
@@ -228,7 +242,8 @@ export default {
shopPrice
:
''
,
shopPrice
:
''
,
stock
:
''
,
stock
:
''
,
useDescription
:
''
,
useDescription
:
''
,
daterange
:
[]
daterange
:
[],
limitStockFlag
:
1
// scopeApplication: ''
// scopeApplication: ''
},
},
copyRuleForm
:
{},
copyRuleForm
:
{},
...
@@ -249,12 +264,11 @@ export default {
...
@@ -249,12 +264,11 @@ export default {
{
required
:
true
,
message
:
'请输入库存'
,
trigger
:
'blur'
},
{
required
:
true
,
message
:
'请输入库存'
,
trigger
:
'blur'
},
{
validator
:
checkStock
,
trigger
:
'blur'
}
{
validator
:
checkStock
,
trigger
:
'blur'
}
]
]
// useDescription: [{ required: true, message: '请填写活动形式', trigger: 'blur' }]
// useDescription: [{ required: true, message: '请填写活动形式', trigger: 'blur' }]
},
},
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 +354,9 @@ export default {
...
@@ -340,6 +354,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 +374,9 @@ export default {
...
@@ -357,9 +374,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
}
}
...
@@ -379,12 +396,10 @@ export default {
...
@@ -379,12 +396,10 @@ export default {
this
.
copyRuleForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
ruleForm
))
//深拷贝一份数据
this
.
copyRuleForm
=
JSON
.
parse
(
JSON
.
stringify
(
this
.
ruleForm
))
//深拷贝一份数据
})
})
},
},
// 跳转
// 跳转
whereToGo
(
id
)
{
whereToGo
(
id
)
{
document
.
getElementById
(
id
).
scrollIntoView
()
document
.
getElementById
(
id
).
scrollIntoView
()
},
},
submitForm
(
formName
)
{
submitForm
(
formName
)
{
clearTimeout
(
this
.
timer
)
clearTimeout
(
this
.
timer
)
this
.
timer
=
setTimeout
(()
=>
{
this
.
timer
=
setTimeout
(()
=>
{
...
@@ -462,20 +477,18 @@ export default {
...
@@ -462,20 +477,18 @@ export default {
params
.
useAmount
=
this
.
ruleForm
.
limitTime2
params
.
useAmount
=
this
.
ruleForm
.
limitTime2
}
}
}
}
params
.
vipPrice
=
this
.
ruleForm
.
vipPrice
params
.
vipPrice
=
this
.
ruleForm
.
vipPrice
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 {
// params.scopeApplication = this.ruleForm.scopeApplication
// params.scopeApplication = this.ruleForm.scopeApplication
// }
// }
params
.
useDescription
=
this
.
ruleForm
.
useDescription
params
.
useDescription
=
this
.
ruleForm
.
useDescription
params
.
discountType
=
7
params
.
discountType
=
7
params
.
merchantId
=
this
.
merchantId
params
.
merchantId
=
this
.
merchantId
params
.
merchantName
=
this
.
merchantName
params
.
merchantName
=
this
.
merchantName
...
@@ -523,7 +536,6 @@ export default {
...
@@ -523,7 +536,6 @@ export default {
this
.
sloading
=
false
this
.
sloading
=
false
})
})
},
},
goBack
()
{
goBack
()
{
if
(
JSON
.
stringify
(
this
.
ruleForm
)
==
JSON
.
stringify
(
this
.
copyRuleForm
)
||
this
.
title
==
'查看'
)
{
if
(
JSON
.
stringify
(
this
.
ruleForm
)
==
JSON
.
stringify
(
this
.
copyRuleForm
)
||
this
.
title
==
'查看'
)
{
this
.
$router
.
push
(
'/couponManage/index'
)
this
.
$router
.
push
(
'/couponManage/index'
)
...
@@ -590,7 +602,6 @@ export default {
...
@@ -590,7 +602,6 @@ export default {
}
}
}
}
</
script
>
</
script
>
<
style
lang=
"scss"
scoped
>
<
style
lang=
"scss"
scoped
>
.live-room
{
.live-room
{
.topMsg
{
.topMsg
{
...
@@ -615,7 +626,6 @@ export default {
...
@@ -615,7 +626,6 @@ export default {
}
}
.container
{
.container
{
margin
:
0
0px
16px
;
margin
:
0
0px
16px
;
position
:
relative
;
position
:
relative
;
/deep/
.el-form-item__content
{
/deep/
.el-form-item__content
{
.radioGroupWrap
{
.radioGroupWrap
{
...
@@ -701,14 +711,12 @@ export default {
...
@@ -701,14 +711,12 @@ export default {
top
:
92px
;
top
:
92px
;
background-image
:
url(../../assets/coupon/phone.png)
;
background-image
:
url(../../assets/coupon/phone.png)
;
}
}
.right_show
.card-top
{
.right_show
.card-top
{
height
:
59px
;
height
:
59px
;
width
:
251px
;
width
:
251px
;
margin-left
:
18px
;
margin-left
:
18px
;
margin-top
:
55px
;
margin-top
:
55px
;
}
}
.card_one
{
.card_one
{
width
:
243px
;
width
:
243px
;
height
:
285px
;
height
:
285px
;
...
@@ -717,7 +725,6 @@ export default {
...
@@ -717,7 +725,6 @@ export default {
margin-left
:
22px
;
margin-left
:
22px
;
margin-top
:
5.81px
;
margin-top
:
5.81px
;
}
}
.cname
{
.cname
{
margin
:
16px
0
10px
16px
;
margin
:
16px
0
10px
16px
;
display
:
inline-block
;
display
:
inline-block
;
...
@@ -731,7 +738,6 @@ export default {
...
@@ -731,7 +738,6 @@ export default {
white-space
:
nowrap
;
white-space
:
nowrap
;
height
:
35px
;
height
:
35px
;
}
}
.ctype
{
.ctype
{
width
:
48px
;
width
:
48px
;
height
:
20px
;
height
:
20px
;
...
@@ -742,7 +748,6 @@ export default {
...
@@ -742,7 +748,6 @@ export default {
display
:
inline-block
;
display
:
inline-block
;
float
:
right
;
float
:
right
;
}
}
.ctypeName
{
.ctypeName
{
width
:
36px
;
width
:
36px
;
height
:
17px
;
height
:
17px
;
...
@@ -752,7 +757,6 @@ export default {
...
@@ -752,7 +757,6 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
margin-left
:
6px
;
margin-left
:
6px
;
}
}
.ctime
{
.ctime
{
margin
:
8px
16px
9px
;
margin
:
8px
16px
9px
;
text-align
:
center
;
text-align
:
center
;
...
@@ -766,7 +770,6 @@ export default {
...
@@ -766,7 +770,6 @@ export default {
color: #333333;
color: #333333;
font-weight: 400;
font-weight: 400;
} */
} */
.ctime_content
{
.ctime_content
{
height
:
17px
;
height
:
17px
;
font-family
:
PingFangSC-Regular
;
font-family
:
PingFangSC-Regular
;
...
@@ -774,14 +777,12 @@ export default {
...
@@ -774,14 +777,12 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
margin-left
:
5px
;
margin-left
:
5px
;
}
}
.ccode
{
.ccode
{
width
:
120px
;
width
:
120px
;
height
:
120px
;
height
:
120px
;
margin
:
0
16px
;
margin
:
0
16px
;
margin
:
auto
;
margin
:
auto
;
}
}
.ccodeName
{
.ccodeName
{
width
:
68px
;
width
:
68px
;
height
:
17px
;
height
:
17px
;
...
@@ -792,7 +793,6 @@ export default {
...
@@ -792,7 +793,6 @@ export default {
margin-left
:
88px
;
margin-left
:
88px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.link-top
{
.link-top
{
width
:
227px
;
width
:
227px
;
height
:
1px
;
height
:
1px
;
...
@@ -800,12 +800,10 @@ export default {
...
@@ -800,12 +800,10 @@ export default {
margin-left
:
8px
;
margin-left
:
8px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.code_d
{
.code_d
{
margin-left
:
98px
;
margin-left
:
98px
;
margin-top
:
10px
;
margin-top
:
10px
;
}
}
.card_two
{
.card_two
{
width
:
243px
;
width
:
243px
;
height
:
162px
;
height
:
162px
;
...
@@ -814,7 +812,6 @@ export default {
...
@@ -814,7 +812,6 @@ export default {
margin-left
:
22px
;
margin-left
:
22px
;
margin-top
:
8px
;
margin-top
:
8px
;
}
}
.cremarks
{
.cremarks
{
padding-left
:
8px
;
padding-left
:
8px
;
padding-top
:
8px
;
padding-top
:
8px
;
...
@@ -825,7 +822,6 @@ export default {
...
@@ -825,7 +822,6 @@ export default {
color
:
#333333
;
color
:
#333333
;
font-weight
:
400
;
font-weight
:
400
;
}
}
.cremarks_content
{
.cremarks_content
{
margin-left
:
8px
;
margin-left
:
8px
;
margin-right
:
8px
;
margin-right
:
8px
;
...
...
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