@@ -256,18 +256,20 @@
修改
删除
停用
@@ -348,19 +350,21 @@
修改
删除
停用
+ @click="editStatus(scope.row)"
+ >启用
@@ -385,7 +389,7 @@ import activeNewlyweds from '../activeNewlyweds/index'
import activeConsumption from '../activeConsumption/index'
import activeFullminus from '../activeFullminus/index'
import activeRecommend from '../activeRecommend/index'
-import {pageActive} from "@/api/active/active";
+import {deleteActive, editActiveStatus, pageActive} from "@/api/active/active";
export default {
name: 'Exchange',
@@ -480,9 +484,9 @@ export default {
if (index == 1) {
this.queryParams.type = ""
this.handleQuery()
- } else {
+ } else if (index == 2) {
this.queryParams.type = ""
- this.getOldList()
+ this.handleOldQuery()
}
},
indexType(id) {
@@ -537,17 +541,49 @@ export default {
this.queryParams.type = null
this.getOldList()
},
-
-
- routerPush(id) {
+ // 删除活动信息
+ deleteActive(data) {
+ this.$modal.confirm('是否删除本条数据,删除后无法恢复!').then(function () {
+ return deleteActive(data.id);
+ }).then(() => {
+ this.handleQuery()
+ this.handleOldQuery()
+ this.$modal.msgSuccess("删除成功");
+ }).catch(() => {
+ });
+ },
+ // 修改活动状态
+ editStatus(data) {
+ let str = data.activeStatus=='1' ? "停用" : "启用"
+ this.$modal.confirm('是否'+str+'本条数据!').then(function () {
+ return editActiveStatus(data.id);
+ }).then(() => {
+ this.handleQuery()
+ this.handleOldQuery()
+ this.$modal.msgSuccess(str+"成功");
+ }).catch(() => {
+ });
+ },
+ routerPush(id,type,data) {
+ let activeId = ""
+ if (data){
+ if (data.type=='3') id = 11
+ if (data.type=='4') id = 5
+ if (data.type=='5') id = 3
+ if (data.type=='6') id = 1
+ if (data.type=='7') id = 4
+ if (data.type=='8') id = 6
+ if (data.type=='9') id = 7
+ if (data.type=='10') id = 8
+ activeId = data.activeId
+ }
this.$router.push({
path: '/EventMarketing/openCardGift/index',
query: {
id: id,
-
+ activeId:activeId
}
});
- // this.$router.push('/EventMarketing/openCardGift/index')
},
// 跳转其他页面
goOtherPage(id, type) {
diff --git a/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue b/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue
index 5fe8b7f30..48b819bed 100644
--- a/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/liJianMarketing/index.vue
@@ -343,6 +343,7 @@ import {addActiveSubPrice, editActiveSubPrice, getActiveSubPrice} from "@/api/Ev
export default {
name: "LiJianMarketing",
dicts: ['payment_type'],
+ props:['activeId'],
data() {
return {
ruleForm: {
@@ -412,8 +413,10 @@ export default {
}
},
created() {
- // 查询信息
- // this.getInfo()
+ if (this.activeId) {
+ // 查询信息
+ this.getInfo()
+ }
this.listUserGrade()
this.getUserLabelList()
this.getOilList()
@@ -453,7 +456,7 @@ export default {
})
},
getInfo() {
- getActiveSubPrice().then(res => {
+ getActiveSubPrice(this.activeId).then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.timeSlots) {
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/birthday.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/birthday.vue
index a05c88825..0658743e7 100644
--- a/fuintAdmin/src/views/EventMarketing/openCardGift/birthday.vue
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/birthday.vue
@@ -34,7 +34,8 @@
- 设置生日有礼赠送时间,例:0表示会员生日当天赠送,1表示提前1天赠送,2表示提前2天赠送,以此类推。最多提前30天
+ 设置生日有礼赠送时间,例:0表示会员生日当天赠送,1表示提前1天赠送,2表示提前2天赠送,以此类推。最多提前30天
@@ -135,6 +136,7 @@ import {addActiveBirthday, editActiveBirthday, getActiveBirthday} from "@/api/Ev
export default {
name: "ActiveNewlyweds",
+ props: ["activeId"],
data() {
return {
opendetails: false,
@@ -210,8 +212,8 @@ export default {
},
ruleForm: {
- activeTimeType:0,
- courtesyReward:[]
+ activeTimeType: 0,
+ courtesyReward: []
},
ifWrite: true,
tindex1: 0,
@@ -220,7 +222,7 @@ export default {
],
couponList: [],
// 优惠券列表信息
- cardCouponList:[],
+ cardCouponList: [],
userGradeList: [],
// 表单校验
rules: {
@@ -249,35 +251,36 @@ export default {
};
},
created() {
- // this.getList()
- // this.getInfo()
+ if (this.activeId) {
+ this.getInfo()
+ }
this.getCardCoupon()
this.listUserGrade()
},
methods: {
listUserGrade() {
- listUserGrade({page:1,pageSize:1000}).then(res => {
+ listUserGrade({page: 1, pageSize: 1000}).then(res => {
if (res.code == 200) {
this.userGradeList = res.data.records
}
})
},
- getCardCoupon(){
- listCardCoupon({status:1,putType:1}).then(res => {
+ getCardCoupon() {
+ listCardCoupon({status: 1, putType: 1}).then(res => {
this.cardCouponList = res.data.records
})
},
- getInfo(){
- getActiveBirthday().then(res => {
+ getInfo() {
+ getActiveBirthday(this.activeId).then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
if (res.data.activeTimeType) this.tindex1 = res.data.activeTimeType
if (res.data.couponList) this.couponList = res.data.couponList
- }else {
+ } else {
this.ruleForm = {
- activeTimeType:0,
- courtesyReward:[]
+ activeTimeType: 0,
+ courtesyReward: []
}
this.tindex1 = 0
}
@@ -299,8 +302,8 @@ export default {
this.ruleForm.activeTimeType = index
},
submitRuleForm(formName) {
- if (this.tindex1 == 1){
- if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime){
+ if (this.tindex1 == 1) {
+ if (!this.ruleForm.activeStartTime || !this.ruleForm.activeEndTime) {
this.$message.error("请选择活动开始时间")
return
}
@@ -315,7 +318,7 @@ export default {
// this.getInfo()
this.$router.push({path: "/EventMarketing/center/index", query: {id: '4'}})
});
- }else {
+ } else {
addActiveBirthday(this.ruleForm).then(response => {
this.$modal.msgSuccess("新增成功");
// this.getInfo()
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/index.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/index.vue
index 6a504a384..ea66c3093 100644
--- a/fuintAdmin/src/views/EventMarketing/openCardGift/index.vue
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/index.vue
@@ -7,16 +7,16 @@
{{ title }}
-
-
-
-
+
+
+
+
-
-
-
-
+
+
+
+
@@ -46,10 +46,14 @@ export default {
data() {
return {
id: '',
- title: ""
+ title: "",
+ activeId:"",
}
},
created() {
+ if (this.$route.query.activeId) {
+ this.activeId = this.$route.query.activeId
+ }
this.id = this.$route.query.id
if (this.id == 1) {
if (this.$route.query.type && this.$route.query.type == "edit") {
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue
index beebb77c2..cb773590c 100644
--- a/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/invite.vue
@@ -124,6 +124,7 @@ import {
export default {
name: "ActiveNewlyweds",
+ props: ['activeId'],
data() {
return {
opendetails: false,
@@ -231,8 +232,9 @@ export default {
};
},
created() {
- // this.getList()
- // this.getInfo()
+ if (this.activeId) {
+ this.getInfo()
+ }
this.getCardCoupon()
},
methods: {
@@ -242,7 +244,7 @@ export default {
})
},
getInfo() {
- getActiveRecommendInfo().then(res => {
+ getActiveRecommendInfo(this.activeId).then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.rewardDisplay) {
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/popUp.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/popUp.vue
index 7f02ed048..d039202ef 100644
--- a/fuintAdmin/src/views/EventMarketing/openCardGift/popUp.vue
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/popUp.vue
@@ -161,6 +161,7 @@ import {addActivePopUp, editActivePopUp, getActivePopUp} from "@/api/EventMarket
export default {
name: "ActiveNewlyweds",
dicts: ['payment_type'],
+ props:['activeId'],
data() {
return {
opendetails: false,
@@ -290,8 +291,9 @@ export default {
};
},
created() {
- // this.getList()
- // this.getInfo()
+ if (this.activeId) {
+ this.getInfo()
+ }
this.getCardCoupon()
this.listUserGrade()
},
@@ -322,7 +324,7 @@ export default {
})
},
getInfo(){
- getActivePopUp().then(res => {
+ getActivePopUp(this.activeId).then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/userConsume.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/userConsume.vue
index e87d2a91b..ec1ce4e3b 100644
--- a/fuintAdmin/src/views/EventMarketing/openCardGift/userConsume.vue
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/userConsume.vue
@@ -155,6 +155,7 @@ import {
export default {
name: "ActiveNewlyweds",
dicts: ['payment_type'],
+ props:['activeId'],
data() {
return {
opendetails: false,
@@ -276,8 +277,9 @@ export default {
};
},
created() {
- // this.getList()
- // this.getInfo()
+ if (this.activeId) {
+ this.getInfo()
+ }
this.getCardCoupon()
this.listUserGrade()
this.getOilList()
@@ -319,7 +321,7 @@ export default {
})
},
getInfo(){
- getActiveUserConsume().then(res => {
+ getActiveUserConsume(this.activeId).then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.paymentType) this.ruleForm.paymentType = res.data.paymentType.split(",")
diff --git a/fuintAdmin/src/views/EventMarketing/openCardGift/userRecharge.vue b/fuintAdmin/src/views/EventMarketing/openCardGift/userRecharge.vue
index c3a02b766..b6b351789 100644
--- a/fuintAdmin/src/views/EventMarketing/openCardGift/userRecharge.vue
+++ b/fuintAdmin/src/views/EventMarketing/openCardGift/userRecharge.vue
@@ -140,6 +140,7 @@ import {
export default {
name: "ActiveNewlyweds",
dicts: ['payment_type'],
+ props:['activeId'],
data() {
return {
opendetails: false,
@@ -252,8 +253,9 @@ export default {
};
},
created() {
- // this.getList()
- // this.getInfo()
+ if (this.activeId) {
+ this.getInfo()
+ }
this.getCardCoupon()
this.listUserGrade()
},
@@ -271,7 +273,7 @@ export default {
})
},
getInfo(){
- getActiveUserRecharge().then(res => {
+ getActiveUserRecharge(this.activeId).then(res => {
if (res.data) {
this.ruleForm = res.data
if (res.data.courtesyReward) this.ruleForm.courtesyReward = res.data.courtesyReward.split(",")
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java
index 269e80c0c..8a278d993 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/controller/ActiveAppletController.java
@@ -48,7 +48,7 @@ public class ActiveAppletController extends BaseController {
/**
* 分页查询主表信息
*
- * @param pageNo 分页参数
+ * @param page 分页参数
* @param pageSize 分页参数
* @param activeApplet ActiveApplet实体
* @return com.fuint.framework.web.ResponseObject
@@ -145,5 +145,35 @@ public class ActiveAppletController extends BaseController {
return getSuccessResult(this.activeAppletService.removeByIds(idList));
}
+
+ /**
+ * 删除数据
+ *
+ * @param id 主键结合
+ * @return 删除结果
+ */
+ @DeleteMapping("delete/{id}")
+ public ResponseObject deleteById(@PathVariable Integer id) {
+ try {
+ SysLog sysLog = new SysLog();
+ sysLog.setSystemName("2");
+ sysLog.setMoudle("营销中心");
+ sysLog.setContent("删除油站活动");
+ sysLogService.saveVo(sysLog);
+ } catch (Exception ignored) {
+ }
+
+ return getSuccessResult(this.activeAppletService.deleteById(id));
+ }
+
+ /**
+ * 修改状态信息
+ * @param id
+ * @return
+ */
+ @GetMapping("editStatus/{id}")
+ public ResponseObject editStatus(@PathVariable Integer id) {
+ return getSuccessResult(activeAppletService.updateActiveStatus(id));
+ }
}
diff --git a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java
index 8d5165595..ffb31b1ee 100644
--- a/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java
+++ b/fuintBackend/fuint-application/src/main/java/com/fuint/business/marketingActivity/activeApplet/service/ActiveAppletService.java
@@ -40,5 +40,26 @@ public interface ActiveAppletService extends IService