diff --git a/src/pages/activity/ActivityCode.vue b/src/pages/activity/ActivityCode.vue index f21c438..3cdcc4c 100644 --- a/src/pages/activity/ActivityCode.vue +++ b/src/pages/activity/ActivityCode.vue @@ -1,25 +1,24 @@ - - + + - + diff --git a/src/pages/activity/ActivityPlan.vue b/src/pages/activity/ActivityPlan.vue index d2aae55..6d9aa46 100644 --- a/src/pages/activity/ActivityPlan.vue +++ b/src/pages/activity/ActivityPlan.vue @@ -1,92 +1,103 @@ - 加载中... - + 加载中... + - - + + - - - {{ item.label }} + + + {{ item.label }} - - - {{ item.label }} + + + {{ item.label }} - + - {{ item.label }} + {{ item.label }} - 查询 + 查询 - - + + - - - + + + @@ -97,14 +108,15 @@ import useTable from "./useTable"; import http from "../../services/CommonHttp"; import { formatDate } from "../../utils/Common"; import store from "../../store"; -import planDetail from './PlanDetail'; +import planDetail from "./PlanDetail"; export default { name: "ActivityPlan", inject: ["setMenuName"], components: { - useTable, planDetail + useTable, + planDetail, }, - data () { + data() { const _this = this; return { loading: false, @@ -150,13 +162,14 @@ export default { { label: "已结束", value: 3, - } + }, ], columns1: [ { type: "index", width: 60, align: "center", + title: "序号", }, { title: "活动名称", @@ -165,7 +178,7 @@ export default { { title: "活动类型", key: "scheduleVO.name", - render (h, params) { + render(h, params) { return h("span", params.row["params"][0]["defaultVal"]); }, }, @@ -173,42 +186,54 @@ export default { title: "活动时间", key: "beginTime", width: 230, - render (h, params) { - return h("span", (params.row.beginTime) + " - " + (params.row.endTime)); + render(h, params) { + return h("span", params.row.beginTime + " - " + params.row.endTime); }, }, { title: "零售公司", key: "shop", - render (h, params) { - return h("span", (params.row.companyName) + "等" + (params.row.companyCount || 0) + "家公司"); + render(h, params) { + return h( + "span", + params.row.companyName + + "等" + + (params.row.companyCount || 0) + + "家公司" + ); }, }, { title: "店铺", key: "shop", - render (h, params) { - return h("span", (params.row.storeName) + "等" + (params.row.storeCount || 0) + "家店铺"); + render(h, params) { + return h( + "span", + params.row.storeName + + "等" + + (params.row.storeCount || 0) + + "家店铺" + ); }, }, { title: "添加好友数", key: "addFriendNum", - render (h, params) { + render(h, params) { return h("span", (params.row.friends || 0) + "人"); }, }, { title: "参与活动客户数", key: "joinActivityClientNum", - render (h, params) { + render(h, params) { return h("span", (params.row.friends || 0) + "人"); }, }, { title: "活动码", key: "activityCode", - render (h, p) { + render(h, p) { return h( "Button", { @@ -222,7 +247,7 @@ export default { { title: "活动状态", key: "status", - render (h, p) { + render(h, p) { const status = p.row.status; if (status === 1) return h("span", "未开始"); if (status === 2) return h("span", "进行中"); @@ -234,7 +259,7 @@ export default { title: "操作", key: "action", width: 200, - render (h, p) { + render(h, p) { return h("div", [ h( "Button", @@ -261,29 +286,29 @@ export default { ], }; }, - mounted () { + mounted() { this.setMenuName("活动管理", "活动计划"); this.getCompanyInfo(); this.getShopInfo(); this.searchTable(); }, methods: { - doShow (show) { + doShow(show) { this.showUse = show; }, - showDetail (detail) { + showDetail(detail) { let _this = this; - this.getDetail(detail.id).then(res => { + this.getDetail(detail.id).then((res) => { _this.detail = res; _this.isShowDetail = true; - }) + }); }, - getCompanyInfo () { + getCompanyInfo() { let that = this; let data = { userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, }; - ActivityManager.getCompany(data, function (data) { + ActivityManager.getCompany(data, function(data) { that.companyList = []; data.data.results.forEach((element) => { that.companyList.push({ @@ -293,17 +318,17 @@ export default { }); }); }, - selectCompany (value) { + selectCompany(value) { this.customerId = value; this.getShopInfo(); }, - getShopInfo () { + getShopInfo() { let that = this; let data = { userId: JSON.parse(sessionStorage.getItem("loginInfo")).userId, - customerIds: this.customerId + customerIds: this.customerId, }; - ActivityManager.getShop(data, function (data) { + ActivityManager.getShop(data, function(data) { that.shopList = []; data.data.results.forEach((element) => { that.shopList.push({ @@ -313,55 +338,59 @@ export default { }); }); }, - handlePage: function (value) { + handlePage: function(value) { this.pageNum = value; this.searchTable(); }, - stop (instance) { + stop(instance) { let _this = this; this.$Modal.confirm({ - title: '您确认要终止?', - content: '终止之后不可恢复', + title: "您确认要终止?", + content: "终止之后不可恢复", onOk: () => { this.saving = true; - ActivityManager.instanceTerminate({ instanceId: instance.id }, (res) => { - _this.saving = false; - if (res.data.success == undefined || !res.data.success) { - _this.$Message.error("终止失败!"); - } else { - _this.searchTable(); + ActivityManager.instanceTerminate( + { instanceId: instance.id }, + (res) => { + _this.saving = false; + if (res.data.success == undefined || !res.data.success) { + _this.$Message.error("终止失败!"); + } else { + _this.searchTable(); + } } - }); + ); }, - onCancel: () => { - - } + onCancel: () => {}, }); }, - getDetail (instanceId) { + getDetail(instanceId) { return new Promise((resolve, reject) => { - ActivityManager.instanceDetail({ - instanceId - }, res => { - resolve(res.data.results) - }); - }) + ActivityManager.instanceDetail( + { + instanceId, + }, + (res) => { + resolve(res.data.results); + } + ); + }); }, - modify (instance) { + modify(instance) { let _this = this; - this.getDetail(instance.id).then(res => { + this.getDetail(instance.id).then((res) => { store.commit("SET_useData", res); _this.activityInstance = res; _this.showUse = true; - }) + }); }, - navigateCode (instance) { + navigateCode(instance) { this.$router.push({ path: "/activity/plan/code", query: { instanceId: instance.id }, }); }, - searchTable (params = {}) { + searchTable(params = {}) { this.loading = true; if ( this.formValidate.date !== null && @@ -398,6 +427,6 @@ export default { diff --git a/src/pages/activity/addActivity.vue b/src/pages/activity/addActivity.vue index a7a3c8a..ce4a6ed 100644 --- a/src/pages/activity/addActivity.vue +++ b/src/pages/activity/addActivity.vue @@ -1,102 +1,119 @@ - - + + 配置活动 基本配置 - + - - - + + + 请上传图片 - + - - - + + + - - + + - - + + - - + + 活动类型 - + 类型{{ index + 1 }} - + - + - 删除 + 删除 - +添加活动类型 + +添加活动类型
+ + 配置活动 基本配置 - + - - - + + + 请上传图片 - + - - - + + + - - + + - - + + - - + + 活动类型 - + 类型{{ index + 1 }} - + - + - 删除 + 删除 - +添加活动类型 + +添加活动类型
配置活动