Commit f106b61f by 张立顺

调整判断逻辑

1 parent ed6890d1
......@@ -19,7 +19,8 @@
<div class="gift-content">
<div class="gift-item" v-for="(subItem, subIndex) in couponObj[item].list" :key="subIndex">
<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>
<i class="el-icon-delete" @click="handleGiftDelete(item, subIndex)"></i>
</div>
......@@ -29,7 +30,7 @@
</div>
<div class="el-form-item__error" v-if="setmealContentRules">请选择套餐</div>
</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 :label="2">赠送</el-radio>
<el-radio :label="1">不赠送</el-radio>
......@@ -37,7 +38,8 @@
</el-form-item>
<span class="give-tip">选择赠送,客户购买该套餐后即开通一年金卡会员权益</span>
<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> -->
</el-input>
</el-form-item>
......@@ -67,7 +69,8 @@
</div>
</template> -->
<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>
</div>
......@@ -75,8 +78,11 @@
<el-button @click="goBack" size="medium">取消</el-button>
<el-button type="primary" @click="submitForm()" size="medium" :loading="sloading">提交</el-button>
</GLFooter>
<GLDialog mode="small" type="warning" @onOk="handleTipConfirm" content="当前有内容信息未保存,是否继续返回?" @onCancel="handleTipClose" :visible.sync="isTipDialogVisible"></GLDialog>
<select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible" :selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm" @handleGiftClose="handleGiftClose"></select-gift-dialog>
<GLDialog mode="small" type="warning" @onOk="handleTipConfirm" content="当前有内容信息未保存,是否继续返回?" @onCancel="handleTipClose"
:visible.sync="isTipDialogVisible"></GLDialog>
<select-gift-dialog v-if="isSelectGiftVisible" :isSelectGiftVisible="isSelectGiftVisible"
:selectedGiftList="selectedMealList" @handleGiftConfirm="handleGiftConfirm"
@handleGiftClose="handleGiftClose"></select-gift-dialog>
</div>
</template>
<script>
......@@ -91,7 +97,7 @@ export default {
var validatePrice = (rule, value, callback) => {
if (!value) {
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('套餐售价不能低于会员卡价格'))
} else {
callback()
......@@ -170,7 +176,7 @@ export default {
copyTotalPrice: 0, //用于检查页面信息是否改动
id: this.$route.query.id || 0,
accountLevel: 0, //1,2,3,4工厂,省代,市代,门店
showGh: false
showGh: true
}
},
computed: {
......@@ -193,7 +199,7 @@ export default {
this.merchantName = this.$globalState.session.merchantName
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) {
this.getCardContentFun()
}
......@@ -204,7 +210,7 @@ export default {
}
// this.getSetmealServiceFun() //获取服务套餐,执行完了之后去获取编辑详情
},
mounted() {},
mounted() { },
methods: {
//获取会员卡上方卡片的相关信息
getCardContentFun() {
......@@ -223,10 +229,10 @@ export default {
this.choseItemList.push(k)
})
})
if (this.choseItemList.length> 0) {
if (this.choseItemList.length > 0) {
this.setmealContentRules = false
}else{
this.setmealContentRules = true
} else {
this.setmealContentRules = true
}
},
handleGiftDelete(attr, idx) {
......@@ -467,6 +473,7 @@ export default {
/deep/ .el-icon-warning {
color: #5850ff !important;
}
.topMsg {
padding: 0 20px;
background-color: #fff;
......@@ -475,6 +482,7 @@ export default {
display: flex;
justify-content: space-between;
align-items: center;
.pageTitle {
position: relative;
// margin-bottom: 20px;
......@@ -486,10 +494,12 @@ export default {
letter-spacing: 1px;
}
}
.container {
margin: 0 0px 16px;
position: relative;
min-height: calc(100vh - 300px);
.allChoseWrap {
width: 363px;
min-height: 32px;
......@@ -503,6 +513,7 @@ export default {
padding-top: 5px;
padding-left: 10px;
box-sizing: border-box;
.choseItem {
position: relative;
min-width: 90px;
......@@ -518,11 +529,13 @@ export default {
border: 1px solid #e8e8ea;
margin-right: 10px;
margin-bottom: 10px;
span {
font-size: 14px;
font-weight: 400;
color: #666666;
}
.close-x {
position: absolute;
color: #666;
......@@ -534,11 +547,13 @@ export default {
height: 12px;
line-height: 12px;
cursor: pointer;
&:hover {
border-radius: 100%;
background-color: #e8e8ea;
}
}
// img {
// position: absolute;
// top: 5px;
......@@ -547,24 +562,29 @@ export default {
// }
}
}
.totalWrap {
margin-top: 5px;
margin-bottom: -5px;
span {
font-size: 14px;
font-weight: 400;
color: #666666;
}
span:last-child {
color: #ff5151;
}
}
.calcValueMsg {
margin-left: -8px;
font-size: 14px;
font-weight: 400;
color: #999999;
}
.shopValuePanel {
margin-left: 120px;
margin-bottom: 15px;
......@@ -573,6 +593,7 @@ export default {
border: 1px solid #e8e8ea;
border-radius: 2px;
padding-bottom: 10px;
.setmealName {
padding-left: 10px;
height: 28px;
......@@ -584,12 +605,14 @@ export default {
font-weight: 400;
color: #666666;
}
.rowMsg {
font-size: 14px;
font-weight: 400;
color: #666666;
margin-top: 10px;
> span:first-child {
>span:first-child {
display: inline-block;
min-width: 165px;
text-align: right;
......@@ -597,54 +620,67 @@ export default {
}
}
}
.allPrice {
margin: 0 0 20px 120px;
font-size: 14px;
font-weight: 400;
color: #666666;
.price {
color: #ff5151;
}
}
}
.marketing {
// 礼包
.gift-block {
width: 878px;
border-radius: 4px;
border: 1px solid #e5e5e5;
.gift-title {
padding: 10px;
background-color: #f4f6fc;
border-bottom: 1px solid #e5e5e5;
.price {
font-size: 18px;
}
}
.gift-box {
display: flex;
padding: 10px 0 10px 10px;
.gift-logo {
width: 58px;
height: 22px;
margin-right: 12px;
}
.gift-label {
width: 70px;
color: #999999;
text-align: right;
}
.gift-content {
width: calc(100% - 70px);
border-bottom: 1px solid #e5e5e5;
line-height: 22px;
.gift-item {
display: inline-block;
width: 50%;
.gift-coupon-name {
display: inline-block;
margin: 0 5px 0 7px;
}
.gift-tips {
display: inline-block;
font-size: 12px;
......@@ -656,12 +692,14 @@ export default {
}
}
}
.gift-content:last-child {
border-bottom: 0px;
}
}
}
}
.footer-panel {
position: fixed;
bottom: 0px;
......@@ -671,6 +709,7 @@ export default {
background: #ffffff;
box-shadow: 0px -1px 1px 0px rgba(88, 80, 255, 0.1);
z-index: 999;
div {
display: inline-block;
position: relative;
......@@ -680,6 +719,7 @@ export default {
margin-left: -110px;
}
}
.give-tip {
font-weight: 400;
font-size: 12px;
......@@ -688,7 +728,7 @@ export default {
margin: -15px 0 20px 154px;
}
}
/deep/ .el-form-item__error {
margin-left: 154px;
}
</style>
\ No newline at end of file
}</style>
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!