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 f106b61f
authored
Feb 25, 2023
by
张立顺
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
调整判断逻辑
1 parent
ed6890d1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
16 deletions
src/views/memberCenter/setmealAddUpdate.vue
src/views/memberCenter/setmealAddUpdate.vue
View file @
f106b61
...
@@ -19,7 +19,8 @@
...
@@ -19,7 +19,8 @@
<div
class=
"gift-content"
>
<div
class=
"gift-content"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<div
class=
"gift-item"
v-for=
"(subItem, subIndex) in couponObj[item].list"
:key=
"subIndex"
>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<span
:class=
"['circle', subItem.status == '3' ? ' grey' : '']"
></span>
<div
:class=
"['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']"
>
{{
subItem
.
couponName
}}
×
{{
subItem
.
couponAmount
}}
</div>
<div
:class=
"['gift-coupon-name', subItem.status == '3' ? ' txt-grey' : '']"
>
{{
subItem
.
couponName
}}
×
{{
subItem
.
couponAmount
}}
</div>
<div
v-show=
"subItem.status == '3'"
class=
"gift-tips"
>
已失效
</div>
<div
v-show=
"subItem.status == '3'"
class=
"gift-tips"
>
已失效
</div>
<i
class=
"el-icon-delete"
@
click=
"handleGiftDelete(item, subIndex)"
></i>
<i
class=
"el-icon-delete"
@
click=
"handleGiftDelete(item, subIndex)"
></i>
</div>
</div>
...
@@ -29,7 +30,7 @@
...
@@ -29,7 +30,7 @@
</div>
</div>
<div
class=
"el-form-item__error"
v-if=
"setmealContentRules"
>
请选择套餐
</div>
<div
class=
"el-form-item__error"
v-if=
"setmealContentRules"
>
请选择套餐
</div>
</el-form-item>
</el-form-item>
<el-form-item
label=
"赠送金卡会员:"
prop=
"giveGoldFlag"
v-if=
"showGh
&&
accountLevel == 4"
>
<el-form-item
label=
"赠送金卡会员:"
prop=
"giveGoldFlag"
v-if=
"showGh
&&
accountLevel == 4"
>
<el-radio-group
v-model=
"ruleForm.giveGoldFlag"
>
<el-radio-group
v-model=
"ruleForm.giveGoldFlag"
>
<el-radio
:label=
"2"
>
赠送
</el-radio>
<el-radio
:label=
"2"
>
赠送
</el-radio>
<el-radio
:label=
"1"
>
不赠送
</el-radio>
<el-radio
:label=
"1"
>
不赠送
</el-radio>
...
@@ -37,7 +38,8 @@
...
@@ -37,7 +38,8 @@
</el-form-item>
</el-form-item>
<span
class=
"give-tip"
>
选择赠送,客户购买该套餐后即开通一年金卡会员权益
</span>
<span
class=
"give-tip"
>
选择赠送,客户购买该套餐后即开通一年金卡会员权益
</span>
<el-form-item
size=
"small"
label=
"套餐售价/元:"
prop=
"packagePrice"
>
<el-form-item
size=
"small"
label=
"套餐售价/元:"
prop=
"packagePrice"
>
<el-input
size=
"small"
v-model=
"ruleForm.packagePrice"
placeholder=
"请输入套餐售价"
@
keyup
.
native=
"ruleForm.packagePrice = oninput(ruleForm.packagePrice)"
>
<el-input
size=
"small"
v-model=
"ruleForm.packagePrice"
placeholder=
"请输入套餐售价"
@
keyup
.
native=
"ruleForm.packagePrice = oninput(ruleForm.packagePrice)"
>
<!--
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
-->
<!--
<span
slot=
"suffix"
class=
"suffix-label"
>
元
</span>
-->
</el-input>
</el-input>
</el-form-item>
</el-form-item>
...
@@ -67,7 +69,8 @@
...
@@ -67,7 +69,8 @@
</div>
</div>
</template> -->
</template> -->
<el-form-item
size=
"small"
label=
"说明:"
prop=
"notes"
>
<el-form-item
size=
"small"
label=
"说明:"
prop=
"notes"
>
<el-input
size=
"small"
:rows=
"6"
type=
"textarea"
v-model=
"ruleForm.notes"
placeholder=
"请输入"
maxlength=
"200"
show-word-limit
></el-input>
<el-input
size=
"small"
:rows=
"6"
type=
"textarea"
v-model=
"ruleForm.notes"
placeholder=
"请输入"
maxlength=
"200"
show-word-limit
></el-input>
</el-form-item>
</el-form-item>
</el-form>
</el-form>
</div>
</div>
...
@@ -75,8 +78,11 @@
...
@@ -75,8 +78,11 @@
<el-button
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
<el-button
@
click=
"goBack"
size=
"medium"
>
取消
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
size=
"medium"
:loading=
"sloading"
>
提交
</el-button>
<el-button
type=
"primary"
@
click=
"submitForm()"
size=
"medium"
:loading=
"sloading"
>
提交
</el-button>
</GLFooter>
</GLFooter>
<GLDialog
mode=
"small"
type=
"warning"
@
onOk=
"handleTipConfirm"
content=
"当前有内容信息未保存,是否继续返回?"
@
onCancel=
"handleTipClose"
:visible
.
sync=
"isTipDialogVisible"
></GLDialog>
<GLDialog
mode=
"small"
type=
"warning"
@
onOk=
"handleTipConfirm"
content=
"当前有内容信息未保存,是否继续返回?"
@
onCancel=
"handleTipClose"
<select-gift-dialog
v-if=
"isSelectGiftVisible"
:isSelectGiftVisible=
"isSelectGiftVisible"
:selectedGiftList=
"selectedMealList"
@
handleGiftConfirm=
"handleGiftConfirm"
@
handleGiftClose=
"handleGiftClose"
></select-gift-dialog>
:visible
.
sync=
"isTipDialogVisible"
></GLDialog>
<select-gift-dialog
v-if=
"isSelectGiftVisible"
:isSelectGiftVisible=
"isSelectGiftVisible"
:selectedGiftList=
"selectedMealList"
@
handleGiftConfirm=
"handleGiftConfirm"
@
handleGiftClose=
"handleGiftClose"
></select-gift-dialog>
</div>
</div>
</template>
</template>
<
script
>
<
script
>
...
@@ -91,7 +97,7 @@ export default {
...
@@ -91,7 +97,7 @@ export default {
var
validatePrice
=
(
rule
,
value
,
callback
)
=>
{
var
validatePrice
=
(
rule
,
value
,
callback
)
=>
{
if
(
!
value
)
{
if
(
!
value
)
{
return
callback
(
new
Error
(
'请输入售价'
))
return
callback
(
new
Error
(
'请输入售价'
))
}
else
if
(
value
<
this
.
memberPrice
&&
this
.
ruleForm
.
giveGoldFlag
==
2
&&
this
.
accountLevel
==
4
&&
this
.
showGh
)
{
}
else
if
(
value
<
this
.
memberPrice
&&
this
.
ruleForm
.
giveGoldFlag
==
2
&&
this
.
accountLevel
==
4
&&
this
.
showGh
)
{
return
callback
(
new
Error
(
'套餐售价不能低于会员卡价格'
))
return
callback
(
new
Error
(
'套餐售价不能低于会员卡价格'
))
}
else
{
}
else
{
callback
()
callback
()
...
@@ -170,7 +176,7 @@ export default {
...
@@ -170,7 +176,7 @@ export default {
copyTotalPrice
:
0
,
//用于检查页面信息是否改动
copyTotalPrice
:
0
,
//用于检查页面信息是否改动
id
:
this
.
$route
.
query
.
id
||
0
,
id
:
this
.
$route
.
query
.
id
||
0
,
accountLevel
:
0
,
//1,2,3,4工厂,省代,市代,门店
accountLevel
:
0
,
//1,2,3,4工厂,省代,市代,门店
showGh
:
fals
e
showGh
:
tru
e
}
}
},
},
computed
:
{
computed
:
{
...
@@ -193,7 +199,7 @@ export default {
...
@@ -193,7 +199,7 @@ export default {
this
.
merchantName
=
this
.
$globalState
.
session
.
merchantName
this
.
merchantName
=
this
.
$globalState
.
session
.
merchantName
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
this
.
accountLevel
=
this
.
$globalState
.
session
.
accountLevel
}
}
this
.
showGh
=
window
.
location
.
host
.
indexOf
(
'cgacar'
)
!=
-
1
//
this.showGh = window.location.host.indexOf('cgacar')!= -1
if
(
this
.
showGh
)
{
if
(
this
.
showGh
)
{
this
.
getCardContentFun
()
this
.
getCardContentFun
()
}
}
...
@@ -204,7 +210,7 @@ export default {
...
@@ -204,7 +210,7 @@ export default {
}
}
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
},
},
mounted
()
{},
mounted
()
{
},
methods
:
{
methods
:
{
//获取会员卡上方卡片的相关信息
//获取会员卡上方卡片的相关信息
getCardContentFun
()
{
getCardContentFun
()
{
...
@@ -223,10 +229,10 @@ export default {
...
@@ -223,10 +229,10 @@ export default {
this
.
choseItemList
.
push
(
k
)
this
.
choseItemList
.
push
(
k
)
})
})
})
})
if
(
this
.
choseItemList
.
length
>
0
)
{
if
(
this
.
choseItemList
.
length
>
0
)
{
this
.
setmealContentRules
=
false
this
.
setmealContentRules
=
false
}
else
{
}
else
{
this
.
setmealContentRules
=
true
this
.
setmealContentRules
=
true
}
}
},
},
handleGiftDelete
(
attr
,
idx
)
{
handleGiftDelete
(
attr
,
idx
)
{
...
@@ -467,6 +473,7 @@ export default {
...
@@ -467,6 +473,7 @@ export default {
/deep/
.el-icon-warning
{
/deep/
.el-icon-warning
{
color
:
#5850ff
!important
;
color
:
#5850ff
!important
;
}
}
.topMsg
{
.topMsg
{
padding
:
0
20px
;
padding
:
0
20px
;
background-color
:
#fff
;
background-color
:
#fff
;
...
@@ -475,6 +482,7 @@ export default {
...
@@ -475,6 +482,7 @@ export default {
display
:
flex
;
display
:
flex
;
justify-content
:
space-between
;
justify-content
:
space-between
;
align-items
:
center
;
align-items
:
center
;
.pageTitle
{
.pageTitle
{
position
:
relative
;
position
:
relative
;
//
margin-bottom
:
20px
;
//
margin-bottom
:
20px
;
...
@@ -486,10 +494,12 @@ export default {
...
@@ -486,10 +494,12 @@ export default {
letter-spacing
:
1px
;
letter-spacing
:
1px
;
}
}
}
}
.container
{
.container
{
margin
:
0
0px
16px
;
margin
:
0
0px
16px
;
position
:
relative
;
position
:
relative
;
min-height
:
calc
(
100vh
-
300px
);
min-height
:
calc
(
100vh
-
300px
);
.allChoseWrap
{
.allChoseWrap
{
width
:
363px
;
width
:
363px
;
min-height
:
32px
;
min-height
:
32px
;
...
@@ -503,6 +513,7 @@ export default {
...
@@ -503,6 +513,7 @@ export default {
padding-top
:
5px
;
padding-top
:
5px
;
padding-left
:
10px
;
padding-left
:
10px
;
box-sizing
:
border-box
;
box-sizing
:
border-box
;
.choseItem
{
.choseItem
{
position
:
relative
;
position
:
relative
;
min-width
:
90px
;
min-width
:
90px
;
...
@@ -518,11 +529,13 @@ export default {
...
@@ -518,11 +529,13 @@ export default {
border
:
1px
solid
#e8e8ea
;
border
:
1px
solid
#e8e8ea
;
margin-right
:
10px
;
margin-right
:
10px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
span
{
span
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#666666
;
color
:
#666666
;
}
}
.close-x
{
.close-x
{
position
:
absolute
;
position
:
absolute
;
color
:
#666
;
color
:
#666
;
...
@@ -534,11 +547,13 @@ export default {
...
@@ -534,11 +547,13 @@ export default {
height
:
12px
;
height
:
12px
;
line-height
:
12px
;
line-height
:
12px
;
cursor
:
pointer
;
cursor
:
pointer
;
&:hover
{
&:hover
{
border-radius
:
100%
;
border-radius
:
100%
;
background-color
:
#e8e8ea
;
background-color
:
#e8e8ea
;
}
}
}
}
//
img
{
//
img
{
//
position
:
absolute
;
//
position
:
absolute
;
//
top
:
5px
;
//
top
:
5px
;
...
@@ -547,24 +562,29 @@ export default {
...
@@ -547,24 +562,29 @@ export default {
//
}
//
}
}
}
}
}
.totalWrap
{
.totalWrap
{
margin-top
:
5px
;
margin-top
:
5px
;
margin-bottom
:
-5px
;
margin-bottom
:
-5px
;
span
{
span
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#666666
;
color
:
#666666
;
}
}
span
:last-child
{
span
:last-child
{
color
:
#ff5151
;
color
:
#ff5151
;
}
}
}
}
.calcValueMsg
{
.calcValueMsg
{
margin-left
:
-8px
;
margin-left
:
-8px
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#999999
;
color
:
#999999
;
}
}
.shopValuePanel
{
.shopValuePanel
{
margin-left
:
120px
;
margin-left
:
120px
;
margin-bottom
:
15px
;
margin-bottom
:
15px
;
...
@@ -573,6 +593,7 @@ export default {
...
@@ -573,6 +593,7 @@ export default {
border
:
1px
solid
#e8e8ea
;
border
:
1px
solid
#e8e8ea
;
border-radius
:
2px
;
border-radius
:
2px
;
padding-bottom
:
10px
;
padding-bottom
:
10px
;
.setmealName
{
.setmealName
{
padding-left
:
10px
;
padding-left
:
10px
;
height
:
28px
;
height
:
28px
;
...
@@ -584,12 +605,14 @@ export default {
...
@@ -584,12 +605,14 @@ export default {
font-weight
:
400
;
font-weight
:
400
;
color
:
#666666
;
color
:
#666666
;
}
}
.rowMsg
{
.rowMsg
{
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#666666
;
color
:
#666666
;
margin-top
:
10px
;
margin-top
:
10px
;
>
span
:
first-child
{
>
span
:
first-child
{
display
:
inline-block
;
display
:
inline-block
;
min-width
:
165px
;
min-width
:
165px
;
text-align
:
right
;
text-align
:
right
;
...
@@ -597,54 +620,67 @@ export default {
...
@@ -597,54 +620,67 @@ export default {
}
}
}
}
}
}
.allPrice
{
.allPrice
{
margin
:
0
0
20px
120px
;
margin
:
0
0
20px
120px
;
font-size
:
14px
;
font-size
:
14px
;
font-weight
:
400
;
font-weight
:
400
;
color
:
#666666
;
color
:
#666666
;
.price
{
.price
{
color
:
#ff5151
;
color
:
#ff5151
;
}
}
}
}
}
}
.marketing
{
.marketing
{
//
礼包
//
礼包
.gift-block
{
.gift-block
{
width
:
878px
;
width
:
878px
;
border-radius
:
4px
;
border-radius
:
4px
;
border
:
1px
solid
#e5e5e5
;
border
:
1px
solid
#e5e5e5
;
.gift-title
{
.gift-title
{
padding
:
10px
;
padding
:
10px
;
background-color
:
#f4f6fc
;
background-color
:
#f4f6fc
;
border-bottom
:
1px
solid
#e5e5e5
;
border-bottom
:
1px
solid
#e5e5e5
;
.price
{
.price
{
font-size
:
18px
;
font-size
:
18px
;
}
}
}
}
.gift-box
{
.gift-box
{
display
:
flex
;
display
:
flex
;
padding
:
10px
0
10px
10px
;
padding
:
10px
0
10px
10px
;
.gift-logo
{
.gift-logo
{
width
:
58px
;
width
:
58px
;
height
:
22px
;
height
:
22px
;
margin-right
:
12px
;
margin-right
:
12px
;
}
}
.gift-label
{
.gift-label
{
width
:
70px
;
width
:
70px
;
color
:
#999999
;
color
:
#999999
;
text-align
:
right
;
text-align
:
right
;
}
}
.gift-content
{
.gift-content
{
width
:
calc
(
100%
-
70px
);
width
:
calc
(
100%
-
70px
);
border-bottom
:
1px
solid
#e5e5e5
;
border-bottom
:
1px
solid
#e5e5e5
;
line-height
:
22px
;
line-height
:
22px
;
.gift-item
{
.gift-item
{
display
:
inline-block
;
display
:
inline-block
;
width
:
50%
;
width
:
50%
;
.gift-coupon-name
{
.gift-coupon-name
{
display
:
inline-block
;
display
:
inline-block
;
margin
:
0
5px
0
7px
;
margin
:
0
5px
0
7px
;
}
}
.gift-tips
{
.gift-tips
{
display
:
inline-block
;
display
:
inline-block
;
font-size
:
12px
;
font-size
:
12px
;
...
@@ -656,12 +692,14 @@ export default {
...
@@ -656,12 +692,14 @@ export default {
}
}
}
}
}
}
.gift-content
:last-child
{
.gift-content
:last-child
{
border-bottom
:
0px
;
border-bottom
:
0px
;
}
}
}
}
}
}
}
}
.footer-panel
{
.footer-panel
{
position
:
fixed
;
position
:
fixed
;
bottom
:
0px
;
bottom
:
0px
;
...
@@ -671,6 +709,7 @@ export default {
...
@@ -671,6 +709,7 @@ export default {
background
:
#ffffff
;
background
:
#ffffff
;
box-shadow
:
0px
-1px
1px
0px
rgba
(
88
,
80
,
255
,
0.1
);
box-shadow
:
0px
-1px
1px
0px
rgba
(
88
,
80
,
255
,
0.1
);
z-index
:
999
;
z-index
:
999
;
div
{
div
{
display
:
inline-block
;
display
:
inline-block
;
position
:
relative
;
position
:
relative
;
...
@@ -680,6 +719,7 @@ export default {
...
@@ -680,6 +719,7 @@ export default {
margin-left
:
-110px
;
margin-left
:
-110px
;
}
}
}
}
.give-tip
{
.give-tip
{
font-weight
:
400
;
font-weight
:
400
;
font-size
:
12px
;
font-size
:
12px
;
...
@@ -688,7 +728,7 @@ export default {
...
@@ -688,7 +728,7 @@ export default {
margin
:
-15px
0
20px
154px
;
margin
:
-15px
0
20px
154px
;
}
}
}
}
/
deep
/
.el-form-item__error
{
/
deep
/
.el-form-item__error
{
margin-left
:
154px
;
margin-left
:
154px
;
}
</
style
>
\ No newline at end of file
\ No newline at end of file
}
</
style
>
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