diff --git a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue index 9ce2f7ca7..7e9392ed0 100644 --- a/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue +++ b/fuintAdmin/src/views/EventMarketing/SaveBlock/index.vue @@ -89,7 +89,6 @@ title="订单记录" :visible.sync="orderShow" size="55%" - :before-close="handleClose" center>
diff --git a/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue b/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue index 6fa03bb80..8117bcb4c 100644 --- a/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue +++ b/fuintAdmin/src/views/EventMarketing/giftBlock/index.vue @@ -147,7 +147,6 @@ title="订单记录" :visible.sync="orderShow" size="55%" - :before-close="handleClose" center>
@@ -223,7 +222,7 @@ width="40%" @close="handleClose2" > - + @@ -397,6 +396,7 @@ export default { dicts: ['card_gift_type'], data() { return { + value1:'', //http://localhost:81/dev-api/cardGiftActive uploadUrl: process.env.VUE_APP_BASE_API + ' /cardGiftActive/importCardInfo', Encryption: false, diff --git a/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue b/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue index dc03c42cd..82b5a7549 100644 --- a/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue +++ b/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue @@ -21,7 +21,7 @@ value-format="yyyy-MM-dd" placeholder="开始日期"> - +
- - 立减优惠 - 折扣优惠 + + 立减优惠 + 折扣优惠
- 例如:立减优惠,满100立减2元;折扣优惠,满200享受95折 + 例如:立减优惠,满100立减2元;折扣优惠,满200享受95折
@@ -98,13 +98,14 @@
每周 - +
每月 - + 不限 自定义
- + @@ -153,12 +155,13 @@ v-if="dict.value!='APPLET_CODE'" :key="dict.value" :label="dict.value" - :value="dict.value">{{dict.label}} + :value="dict.value">{{ dict.label }} +
-
+
按订单金额
-
+
订单金额满 @@ -180,7 +184,8 @@
-
+
订单金额满 @@ -198,7 +203,8 @@
-
+
订单金额每满 @@ -216,7 +222,8 @@
-
+
订单金额满 @@ -242,7 +249,8 @@
-
+
加油升数满 @@ -257,7 +265,8 @@
-
+
加油升数满 @@ -277,7 +286,8 @@
-
+
加油升数每满 @@ -297,7 +307,8 @@
-
+
加油升数满 @@ -338,7 +349,7 @@ import {addActiveSubPrice, editActiveSubPrice, getActiveSubPrice} from "@/api/Ev export default { name: "LiJianMarketing", dicts: ['payment_type'], - props:['activeId'], + props: ['activeId'], data() { return { ruleForm: { @@ -390,10 +401,10 @@ export default { }], // 表单校验 rules: { - timeType:[ + timeType: [ {required: true, message: '适用时间段不能为空', trigger: 'blur'}, ], - activeType:[ + activeType: [ {required: true, message: '活动类型不能为空', trigger: 'blur'}, ], activeName: [ @@ -451,9 +462,9 @@ export default { this.getOilList() }, methods: { - changeOfferType(){ + changeOfferType() { this.ruleForm.activeType = '0' - console.log( this.ruleForm,446) + console.log(this.ruleForm, 446) }, getOilList() { getOilNameList().then(response => { @@ -584,6 +595,37 @@ export default { this.ruleForm.activeType = index }, submitRuleForm(formName) { + + //活动方式为 订单金额 + if (this.ruleForm.activeManner && this.ruleForm.activeManner.includes('0')) { + + const list = this.orderList.some(item => { + if (item.full === '' || item.sub === '') { + this.$message.error("请填写订单相关活动规则,如不需要请删除"); + return true; // 返回 true 表示停止循环 + } + }); + if (list) { + return true; //退出当前方法 + } + + } + + + //活动方式为 订单金额 + if (this.ruleForm.activeManner && this.ruleForm.activeManner.includes('1')) { + const list = this.refuelList.some(item => { + if (item.full === '' || item.sub === '') { + this.$message.error("请填写加油相关活动规则,如不需要请删除"); + return true; // 返回 true 表示停止循环 + } + }); + if (list) { + return true; //退出当前方法 + } + } + + if (this.tindex1 == 1) { if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime) { this.$message.error("请选择活动开始时间") @@ -602,131 +644,18 @@ export default { return; } } - if (this.ruleForm.activeManner.length==0){ + if (this.ruleForm.activeManner.length == 0) { this.$message.warning("请选择活动方式"); return } - if (this.ruleForm.activeManner.indexOf("0")){ - let flag1 = true; - //按照订单金额 - if (this.ruleForm.offerType == 0 && this.ruleForm.activeType == 0){ - this.orderList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.sub){ - flag1 = false - } - }) - } - - if (this.ruleForm.offerType == 0 && this.ruleForm.activeType == 1){ - this.orderList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.randomFront){ - flag1 = false - } - if (!item.randomAfter){ - flag1 = false - } - }) - } - - if (this.ruleForm.offerType == 0 && this.ruleForm.activeType == 2){ - this.orderList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.sub){ - flag1 = false - } - if (!item.maxPreferential){ - flag1 = false - } - }) - } - if (this.ruleForm.offerType == 1 && this.ruleForm.activeType == 0){ - this.orderList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.enjoyDiscount){ - flag1 = false - } - if (!item.maxPreferential){ - flag1 = false - } - }) - } - - - if (!flag1){ - this.$message.warning("活动方式按订单金额,请填写完整"); - return - } + if (this.ruleForm.activeManner && this.ruleForm.activeManner.includes('0')) { + //如果选订单则 清空加油活动 + this.refuelList = [] } - if (this.ruleForm.activeManner.indexOf("1")){ - let flag1 = true - //按照加油升数 - if (this.ruleForm.offerType == 0 && this.ruleForm.activeType == 0){ - this.refuelList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.sub){ - flag1 = false - } - }) - } - - if (this.ruleForm.offerType == 0 && this.ruleForm.activeType == 1){ - this.refuelList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.randomFront){ - flag1 = false - } - if (!item.randomAfter){ - flag1 = false - } - }) - } - - if (this.ruleForm.offerType == 0 && this.ruleForm.activeType == 2){ - this.refuelList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.sub){ - flag1 = false - } - if (!item.maxPreferential){ - flag1 = false - } - }) - } - if (this.ruleForm.offerType == 1 && this.ruleForm.activeType == 0){ - this.refuelList.forEach(item=>{ - if (!item.full){ - flag1 = false - } - if (!item.enjoyDiscount){ - flag1 = false - } - if (!item.maxPreferential){ - flag1 = false - } - }) - } - if (!flag1){ - this.$message.warning("活动方式按加油升数,请填写完整"); - return - } - + if (this.ruleForm.activeManner && this.ruleForm.activeManner.includes('1')) { + //如果加油 则清空订单 + this.orderList = [] } this.$refs[formName].validate((valid) => { @@ -748,7 +677,7 @@ export default { editActiveSubPrice(this.ruleForm).then(res => { this.$message.success("修改成功") // this.getInfo() - this.$router.push({path:"/EventMarketing/center/index",query:{id:'3'}}) + this.$router.push({path: "/EventMarketing/center/index", query: {id: '3'}}) }) } else { // 添加 @@ -756,7 +685,7 @@ export default { if (res.data) { this.$message.success("添加成功") // this.getInfo() - this.$router.push({path:"/EventMarketing/center/index",query:{id:'3'}}) + this.$router.push({path: "/EventMarketing/center/index", query: {id: '3'}}) } else { this.$message.error("添加失败") } @@ -768,7 +697,7 @@ export default { resetForm(formName) { this.$refs[formName].resetFields(); // this.getInfo() - this.$router.push({path:"/EventMarketing/center/index",query: {activeId:this.activeId}}) + this.$router.push({path: "/EventMarketing/center/index", query: {activeId: this.activeId}}) }, } } diff --git a/fuintAdmin/src/views/EventMarketing/newCertificate/index.vue b/fuintAdmin/src/views/EventMarketing/newCertificate/index.vue index 62b9fa600..6daa95d61 100644 --- a/fuintAdmin/src/views/EventMarketing/newCertificate/index.vue +++ b/fuintAdmin/src/views/EventMarketing/newCertificate/index.vue @@ -46,15 +46,16 @@ 积分兑换 - + + @@ -62,7 +63,7 @@ {{ scope.row.tfGetNum || 0 }}/{{ scope.row.tfTotal || 0 }} - +