This commit is contained in:
cun-nan 2024-09-18 13:34:55 +08:00
parent fd148c3404
commit c111107dac
7 changed files with 104 additions and 1 deletions

View File

@ -210,7 +210,7 @@
:label="item1.name"
:value="item1.id"></el-option>
</el-select>
<el-input style="width: 20%;margin: 0 10px" v-model="item.givePoints">
<el-input style="width: 20%;margin: 0 10px" v-model="item.giftCardTotal">
<template slot="append"></template>
</el-input>
<img src="@/assets/images/ljt.png" style="width: 25px;height: 25px;"
@ -554,6 +554,7 @@ export default {
orderType: orderType,
vouchersId: "",
giftCardTotal: "",
consumeAmount:"",
}
this.couponList.push(data)
},
@ -587,24 +588,55 @@ export default {
}
}
let flag = false;
if (this.ruleForm.activeGift && this.ruleForm.activeGift.includes(0)) {
if (!this.pointList || this.pointList.length == 0) {
this.$message.error("请先选择赠送积分信息!")
return;
}else {
this.pointList.forEach(item => {
if (!item.consumeAmount || !item.givePoints){
flag = true
}
})
}
}
if (flag){
this.$message.error("请确保赠送积分信息已经填写!")
return;
}
if (this.ruleForm.activeGift && this.ruleForm.activeGift.includes(3)) {
if (!this.growthValueList || this.growthValueList.length == 0) {
this.$message.error("请先选择赠送成长值信息!")
return;
}else {
this.growthValueList.forEach(item => {
if (!item.consumeAmount || !item.giveGrowthValue){
flag = true
}
})
}
}
if (flag){
this.$message.error("请确保赠送成长值信息已经填写!")
return;
}
if (this.ruleForm.activeGift && this.ruleForm.activeGift.includes(1)) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}else {
this.couponList.forEach(item => {
if (!item.vouchersId || !item.giftCardTotal || !item.consumeAmount){
flag = true
}
})
}
}
if (flag){
this.$message.error("请确保赠送优惠券信息已经填写!")
return;
}
this.$refs[formName].validate((valid) => {
if (valid) {
// 使

View File

@ -282,12 +282,23 @@ export default {
return
}
}
let flag = false;
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}else {
this.couponList.forEach(item => {
if (!item.vouchersId || !item.giftCardTotal){
flag = true
}
})
}
}
if (flag){
this.$message.error("请先确保赠送优惠券信息已经填写!")
return;
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")

View File

@ -309,12 +309,24 @@ export default {
return
}
}
let flag = false;
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}else {
this.couponList.forEach(item => {
if (!item.vouchersId || !item.giftCardTotal){
flag = true;
}
})
}
}
if (flag){
this.$message.error("请先确保赠送优惠券信息已经填写!")
return;
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")

View File

@ -285,12 +285,24 @@ export default {
return
}
}
let flag = false;
if (this.ruleForm.rewardDisplay && this.ruleForm.rewardDisplay.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}else {
this.couponList.forEach(item => {
if (!item.vouchersId || !item.giftCardTotal){
flag = true;
}
})
}
}
if (flag){
this.$message.error("请先确保赠送优惠券信息已经填写!")
return;
}
if (this.ruleForm.rewardDisplay && this.ruleForm.rewardDisplay.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")

View File

@ -375,12 +375,24 @@ export default {
return
}
}
let flag = false;
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}else {
this.couponList.forEach(item => {
if (!item.vouchersId || !item.giftCardTotal){
flag = true;
}
})
}
}
if (flag){
this.$message.error("请先确保赠送优惠券信息已经填写!")
return;
}
this.$refs[formName].validate((valid) => {
if (valid) {
if (this.ruleForm.suitTimeSlotType==0){

View File

@ -364,12 +364,24 @@ export default {
return
}
}
let flag = false;
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}else {
this.couponList.forEach(item => {
if (!item.vouchersId || !item.giftCardTotal){
flag = true;
}
})
}
}
if (flag){
this.$message.error("请先确保赠送优惠券信息已经填写!")
return;
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")

View File

@ -313,12 +313,24 @@ export default {
return
}
}
let flag = false;
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("0")) {
if (!this.couponList || this.couponList.length == 0) {
this.$message.error("请先选择赠送优惠券信息!")
return;
}else {
this.couponList.forEach(item => {
if (!item.vouchersId || !item.giftCardTotal){
flag = true;
}
})
}
}
if (flag){
this.$message.error("请先确保赠送优惠券信息已经填写!")
return;
}
if (this.ruleForm.courtesyReward && this.ruleForm.courtesyReward.includes("3")) {
if (!this.ruleForm.points) {
this.$message.error("请输入赠送积分!")