Commit 66390eb8 by 王志慧

海马刀需求开发

1 parent e31572c7
...@@ -29,6 +29,12 @@ ...@@ -29,6 +29,12 @@
</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 size="small" label="会员专享:" v-if="isHmd" prop="memberPayFlags">
<el-checkbox-group v-model="ruleForm.memberPayFlags">
<el-checkbox v-for="(item, index) in memberList" :key="index" :label="item.name">{{ item.label }}</el-checkbox>
</el-checkbox-group>
<span class="give-tip" style=" margin: -15px 0 0 154px;">仅勾选的等级用户方可购买会员套餐</span>
</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>
...@@ -113,6 +119,7 @@ export default { ...@@ -113,6 +119,7 @@ export default {
} }
} }
return { return {
isHmd: true,
memberPrice: '', //会员卡价格 memberPrice: '', //会员卡价格
sloading: false, sloading: false,
ruleForm: { ruleForm: {
...@@ -122,13 +129,15 @@ export default { ...@@ -122,13 +129,15 @@ export default {
// couponList:[], // couponList:[],
notes: '', notes: '',
giveGoldFlag: '', giveGoldFlag: '',
packageImg: '' packageImg: '',
memberPayFlags: []
}, },
copyRuleForm: {}, //用于检查页面信息是否改动 copyRuleForm: {}, //用于检查页面信息是否改动
rules: { rules: {
packageName: [{ required: true, message: '请输入套餐名称', trigger: 'blur' }], packageName: [{ required: true, message: '请输入套餐名称', trigger: 'blur' }],
packagePrice: [{ required: true, validator: validatePrice, trigger: 'blur' }], packagePrice: [{ required: true, validator: validatePrice, trigger: 'blur' }],
giveGoldFlag: [{ required: true, message: '请选择金卡会员', trigger: 'change' }] giveGoldFlag: [{ required: true, message: '请选择金卡会员', trigger: 'change' }],
memberPayFlags: [{ required: true, message: '请选择会员专享', trigger: 'change' }]
}, },
picOptions: { picOptions: {
width: '104px', width: '104px',
...@@ -142,8 +151,26 @@ export default { ...@@ -142,8 +151,26 @@ export default {
key: 'sharePosterImg', key: 'sharePosterImg',
isClose: true isClose: true
}, },
memberList: [
{
label: '普通用户',
name: 2
},
{
label: '普通会员',
name: 3
},
{
label: '银卡会员',
name: 4
},
{
label: '金卡用户',
name: 5
}
],
packageImgArr: [], packageImgArr: [],
sharePosterImgArr:[], sharePosterImgArr: [],
allItemList: [], allItemList: [],
choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'], choseItemList: [], //['一年12次洗车券×1', '车身打蜡×2', '全车镀膜×1'],
copyChoseItemList: [], //用于检查页面信息是否改动 copyChoseItemList: [], //用于检查页面信息是否改动
...@@ -312,8 +339,9 @@ export default { ...@@ -312,8 +339,9 @@ export default {
item.couponAmount = item.serviceQuantity item.couponAmount = item.serviceQuantity
item.id = item.serviceId item.id = item.serviceId
}) })
this.packageImgArr =res.data.packageImg? [res.data.packageImg]:[] !res.data.memberPayFlags ? (this.ruleForm.memberPayFlags = []) : ''
this.sharePosterImgArr =res.data.sharePosterImg? [res.data.sharePosterImg]:[] this.packageImgArr = res.data.packageImg ? [res.data.packageImg] : []
this.sharePosterImgArr = res.data.sharePosterImg ? [res.data.sharePosterImg] : []
this.recoveryCoupon() this.recoveryCoupon()
this.copyTotalPrice = this.totalPrice this.copyTotalPrice = this.totalPrice
this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据 this.copyRuleForm = JSON.parse(JSON.stringify(this.ruleForm)) //深拷贝一份数据
...@@ -363,12 +391,12 @@ export default { ...@@ -363,12 +391,12 @@ export default {
param.packagePrice = this.ruleForm.packagePrice param.packagePrice = this.ruleForm.packagePrice
param.notes = this.ruleForm.notes param.notes = this.ruleForm.notes
param.switchStatus = this.ruleForm.switchStatus ? 1 : 0 param.switchStatus = this.ruleForm.switchStatus ? 1 : 0
if (this.isHmd) param.memberPayFlags = this.ruleForm.memberPayFlags
if (this.showGh) { if (this.showGh) {
param.giveGoldFlag = this.ruleForm.giveGoldFlag param.giveGoldFlag = this.ruleForm.giveGoldFlag
if (this.accountLevel == 4) { if (this.accountLevel == 4) {
param.packageImg = this.ruleForm.packageImg param.packageImg = this.ruleForm.packageImg
param.sharePosterImg = this.ruleForm.sharePosterImg param.sharePosterImg = this.ruleForm.sharePosterImg
} }
} }
let lists = this.choseItemList let lists = this.choseItemList
...@@ -406,12 +434,13 @@ export default { ...@@ -406,12 +434,13 @@ export default {
params.packagePrice = this.ruleForm.packagePrice params.packagePrice = this.ruleForm.packagePrice
params.notes = this.ruleForm.notes params.notes = this.ruleForm.notes
params.switchStatus = this.ruleForm.switchStatus ? 1 : 0 params.switchStatus = this.ruleForm.switchStatus ? 1 : 0
// 海马刀传参
if (this.isHmd) params.memberPayFlags = this.ruleForm.memberPayFlags
if (this.showGh) { if (this.showGh) {
params.giveGoldFlag = this.ruleForm.giveGoldFlag params.giveGoldFlag = this.ruleForm.giveGoldFlag
if (this.accountLevel == 4) { if (this.accountLevel == 4) {
params.packageImg = this.ruleForm.packageImg params.packageImg = this.ruleForm.packageImg
params.sharePosterImg = this.ruleForm.sharePosterImg params.sharePosterImg = this.ruleForm.sharePosterImg
} }
} }
let list = this.choseItemList let list = this.choseItemList
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!