From 3f93dd7ade82d4b548d41ee36daa0a90f581835b Mon Sep 17 00:00:00 2001 From: 13405411873 <1994398261@qq.com> Date: Thu, 26 Sep 2024 15:19:59 +0800 Subject: [PATCH] =?UTF-8?q?=E8=90=A5=E9=94=80=E6=B4=BB=E5=8A=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EventMarketing/liJianMarketing/index.vue | 143 +++++++++--------- fuintAdmin/src/views/userGrade/index.vue | 8 +- .../activePrice/entity/ActiveSubPrice.java | 4 +- .../impl/ActiveSubPriceServiceImpl.java | 8 +- 4 files changed, 82 insertions(+), 81 deletions(-) diff --git a/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue b/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue index 903566e2e..a12cc9d25 100644 --- a/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue +++ b/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue @@ -9,21 +9,21 @@
-
- - - {{ item }} -
+ + 永久有效 + 自定义 + - +
-
- - - {{ item }} -
+ + 立减优惠 + 折扣优惠 +
- 例如:立减优惠,满100立减2元;折扣优惠,满200享受95折 + 例如:立减优惠,满100立减2元;折扣优惠,满200享受95折 +
-
- - - {{ item }} -
+ + 固定优惠 + 随机满减 + 每满 +
固定满减:订单满足规则时,只优惠一次且金额固定。如:满100元立减5元,订单金额是210元,则优惠减5元。 @@ -96,27 +94,26 @@
-
-
- - - {{ item }} - - - - - - - -
+
+ +
+ 每周 + + + +
+ + 每月 + + + + + +
@@ -139,13 +136,11 @@
-
- - - {{ item }} -
- + + 不限 + 自定义 + + @@ -347,13 +342,13 @@ export default { data() { return { ruleForm: { - activeTimeType: 0, + activeTimeType: '0', paymentType: [], activeManner: [], - offerType: 0, - activeType: 0, - timeType: 0, - applyOilType: 0, + offerType: '0', + activeType: '0', + timeType: '0', + applyOilType: '0', }, userGradeList: [], userLabelList: [], @@ -362,21 +357,21 @@ export default { oilNumberList: [], activityTimeTypeList: ["永久有效", "自定义"], - tindex1: 0, + tindex1: '0', preferentialTypeList: ["立减优惠", "折扣优惠"], - tindex2: 0, + tindex2: '0', weekMonthTypeList: ["每周", "每月"], - tindex3: 0, + tindex3: '0', oilTypeList: ['不限', '自定义'], - tindex4: 0, + tindex4: '0', activityTypeList: ['固定满减', '随机满减', '每满'], - tindex5: 0, + tindex5: '0', weekList: ["周一", "周二", "周三", "周四", "周五", "周六", "周日"], weekDay: [], monthDay: [], orderList: [{ - activeManner: 0, + activeManner: '0', full: "", sub: "", randomFront: "", @@ -385,7 +380,7 @@ export default { enjoyDiscount: "", }], refuelList: [{ - activeManner: 1, + activeManner: '0', full: "", sub: "", randomFront: "", @@ -395,6 +390,12 @@ export default { }], // 表单校验 rules: { + timeType:[ + {required: true, message: '适用时间段不能为空', trigger: 'blur'}, + ], + activeType:[ + {required: true, message: '活动类型不能为空', trigger: 'blur'}, + ], activeName: [ {required: true, message: '活动名称不能为空', trigger: 'blur'}, ], @@ -438,6 +439,10 @@ export default { this.getOilList() }, methods: { + changeOfferType(){ + this.ruleForm.activeType = '0' + console.log( this.ruleForm,446) + }, getOilList() { getOilNameList().then(response => { this.oilNameList = response.data; @@ -476,9 +481,9 @@ export default { if (res.data) { this.ruleForm = res.data if (res.data.timeSlots) { - if (res.data.timeType == 0) { + if (res.data.timeType == 1) { this.weekDay = this.ruleForm.timeSlots.split(",") - } else if (res.data.timeType == 1) { + } else if (res.data.timeType == 2) { this.monthDay = this.ruleForm.timeSlots.split(",") } } @@ -491,13 +496,13 @@ export default { if (res.data.refuelList) this.refuelList = this.ruleForm.refuelList } else { this.ruleForm = { - activeTimeType: 0, + activeTimeType: '0', paymentType: [], activeManner: [], - offerType: 0, - activeType: 0, - timeType: 0, - applyOilType: 0, + offerType: '0', + activeType: '0', + timeType: '0', + applyOilType: '0', } this.tindex1 = 0 this.tindex2 = 0 @@ -714,9 +719,9 @@ export default { this.$refs[formName].validate((valid) => { if (valid) { - if (this.ruleForm.timeType == 0) { + if (this.ruleForm.timeType == 1) { this.ruleForm.timeSlots = this.weekDay.toString() - } else if (this.ruleForm.timeType == 1) { + } else if (this.ruleForm.timeType == 2) { this.ruleForm.timeSlots = this.monthDay.toString() } if (this.ruleForm.levelId) this.ruleForm.levelId = this.ruleForm.levelId.toString() diff --git a/fuintAdmin/src/views/userGrade/index.vue b/fuintAdmin/src/views/userGrade/index.vue index 92c5c4487..3a0c1eb7c 100644 --- a/fuintAdmin/src/views/userGrade/index.vue +++ b/fuintAdmin/src/views/userGrade/index.vue @@ -725,9 +725,9 @@ + :value="item+''"> @@ -763,9 +763,9 @@ + :value="item+''"> diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/entity/ActiveSubPrice.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/entity/ActiveSubPrice.java index ac1922bdb..07a2a38ed 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/entity/ActiveSubPrice.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/entity/ActiveSubPrice.java @@ -45,8 +45,10 @@ public class ActiveSubPrice extends Model { /** 活动时间类型:0永久有效;1自定义 */ private String activeTimeType ; /** 生效起始时间 */ + @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8") private Date activeStartTime ; /** 生效截止时间 */ + @JsonFormat(pattern = "yyyy-MM-dd" , timezone = "GMT+8") private Date activeEndTime ; /** 优惠类型(0立减优惠|1活动优惠) */ private String offerType ; @@ -87,4 +89,4 @@ public class ActiveSubPrice extends Model { /**加油升数列表*/ @TableField(exist = false) private List refuelList; -} \ No newline at end of file +} diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/service/impl/ActiveSubPriceServiceImpl.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/service/impl/ActiveSubPriceServiceImpl.java index defb59102..5b42ea5b0 100644 --- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/service/impl/ActiveSubPriceServiceImpl.java +++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activePrice/service/impl/ActiveSubPriceServiceImpl.java @@ -76,15 +76,9 @@ public class ActiveSubPriceServiceImpl extends ServiceImpl