|
|
|
@ -1,93 +1,83 @@
|
|
|
|
|
<template>
|
|
|
|
|
<div>
|
|
|
|
|
<Spin v-if="saving" fix>加载中...</Spin>
|
|
|
|
|
<Form ref="formValidate" :model="formValidate" :label-width="80">
|
|
|
|
|
<Spin v-if="saving"
|
|
|
|
|
fix>加载中...</Spin>
|
|
|
|
|
<Form ref="formValidate"
|
|
|
|
|
:model="formValidate"
|
|
|
|
|
:label-width="80">
|
|
|
|
|
<Row>
|
|
|
|
|
<i-col span="7">
|
|
|
|
|
<FormItem label="选择日期"
|
|
|
|
|
prop="">
|
|
|
|
|
<Date-picker v-model="formValidate.date"
|
|
|
|
|
type="daterange"
|
|
|
|
|
placement="bottom-end"
|
|
|
|
|
placeholder="选择日期区间"></Date-picker>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="6">
|
|
|
|
|
<FormItem label="零售公司" prop="">
|
|
|
|
|
<Select
|
|
|
|
|
v-model="formValidate.organizationId"
|
|
|
|
|
<FormItem label="零售公司"
|
|
|
|
|
prop="">
|
|
|
|
|
<Select v-model="formValidate.organizationId"
|
|
|
|
|
filterable
|
|
|
|
|
placeholder="全部"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<Option
|
|
|
|
|
v-for="(item, index) in companyList"
|
|
|
|
|
clearable>
|
|
|
|
|
<Option v-for="(item, index) in companyList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
>{{ item.label }}
|
|
|
|
|
:value="item.value">{{ item.label }}
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="6">
|
|
|
|
|
<FormItem label="店铺" prop="">
|
|
|
|
|
<Select
|
|
|
|
|
v-model="formValidate.storeId"
|
|
|
|
|
<FormItem label="店铺"
|
|
|
|
|
prop="">
|
|
|
|
|
<Select v-model="formValidate.storeId"
|
|
|
|
|
filterable
|
|
|
|
|
placeholder="全部"
|
|
|
|
|
clearable
|
|
|
|
|
>
|
|
|
|
|
<Option
|
|
|
|
|
v-for="(item, index) in shopList"
|
|
|
|
|
clearable>
|
|
|
|
|
<Option v-for="(item, index) in shopList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
>{{ item.label }}
|
|
|
|
|
:value="item.value">{{ item.label }}
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="4">
|
|
|
|
|
<FormItem label="活动状态" prop="">
|
|
|
|
|
<FormItem label="活动状态"
|
|
|
|
|
prop="">
|
|
|
|
|
<Select v-model="formValidate.status">
|
|
|
|
|
<Option
|
|
|
|
|
v-for="(item, index) in activityStatusList"
|
|
|
|
|
<Option v-for="(item, index) in activityStatusList"
|
|
|
|
|
:key="index"
|
|
|
|
|
:value="item.value"
|
|
|
|
|
>{{ item.label }}
|
|
|
|
|
:value="item.value">{{ item.label }}
|
|
|
|
|
</Option>
|
|
|
|
|
</Select>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="7">
|
|
|
|
|
<FormItem label="选择日期" prop="">
|
|
|
|
|
<Date-picker
|
|
|
|
|
v-model="formValidate.date"
|
|
|
|
|
type="daterange"
|
|
|
|
|
placement="bottom-end"
|
|
|
|
|
placeholder="选择日期区间"
|
|
|
|
|
></Date-picker>
|
|
|
|
|
</FormItem>
|
|
|
|
|
</i-col>
|
|
|
|
|
<i-col span="1">
|
|
|
|
|
<Button type="primary" @click="searchTable">查询</Button>
|
|
|
|
|
<Button type="primary"
|
|
|
|
|
@click="searchTable">查询</Button>
|
|
|
|
|
</i-col>
|
|
|
|
|
</Row>
|
|
|
|
|
<Row style="margin-top:50px">
|
|
|
|
|
<Table
|
|
|
|
|
:loading="loading"
|
|
|
|
|
<Table :loading="loading"
|
|
|
|
|
border
|
|
|
|
|
:columns="columns1"
|
|
|
|
|
:data="data"
|
|
|
|
|
></Table>
|
|
|
|
|
<Page
|
|
|
|
|
:total="totalSize"
|
|
|
|
|
:data="data"></Table>
|
|
|
|
|
<Page :total="totalSize"
|
|
|
|
|
:current="pageNum"
|
|
|
|
|
:page-size="pageSize"
|
|
|
|
|
show-elevator
|
|
|
|
|
show-total
|
|
|
|
|
placement="top"
|
|
|
|
|
@on-change="handlePage"
|
|
|
|
|
class-name="ks-page"
|
|
|
|
|
></Page>
|
|
|
|
|
class-name="ks-page"></Page>
|
|
|
|
|
</Row>
|
|
|
|
|
</Form>
|
|
|
|
|
<useTable
|
|
|
|
|
ref="useTable"
|
|
|
|
|
<useTable ref="useTable"
|
|
|
|
|
@doShow="doShow"
|
|
|
|
|
:show="showUse"
|
|
|
|
|
:schedule="activityInstance.scheduleVO"
|
|
|
|
|
></useTable>
|
|
|
|
|
:schedule="activityInstance.scheduleVO"></useTable>
|
|
|
|
|
</div>
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
@ -167,26 +157,22 @@ export default {
|
|
|
|
|
title: "活动类型",
|
|
|
|
|
key: "scheduleVO.name",
|
|
|
|
|
render (h, params) {
|
|
|
|
|
return h("span", params.row["scheduleVO"]["name"]);
|
|
|
|
|
return h("span", params.row["params"][0]["defaultVal"]);
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "活动开始时间",
|
|
|
|
|
title: "活动时间",
|
|
|
|
|
key: "beginTime",
|
|
|
|
|
width: 230,
|
|
|
|
|
render (h, params) {
|
|
|
|
|
return h("span", (params.row.beginTime) + " - " + (params.row.endTime));
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
|
title: "活动结束时间",
|
|
|
|
|
key: "endTime",
|
|
|
|
|
},
|
|
|
|
|
// {
|
|
|
|
|
// title: '零售公司',
|
|
|
|
|
// key: 'company'
|
|
|
|
|
// },
|
|
|
|
|
{
|
|
|
|
|
title: "店铺",
|
|
|
|
|
key: "shop",
|
|
|
|
|
render (h, params) {
|
|
|
|
|
return h("span", (params.row.stores.length || 0) + "家");
|
|
|
|
|
return h("span", (params.row.stores[0].abbreviation) + "等" + (params.row.stores.length || 0) + "家");
|
|
|
|
|
},
|
|
|
|
|
},
|
|
|
|
|
{
|
|
|
|
@ -304,21 +290,30 @@ export default {
|
|
|
|
|
this.searchTable();
|
|
|
|
|
},
|
|
|
|
|
stop (instance) {
|
|
|
|
|
this.saving = true;
|
|
|
|
|
let _this = this;
|
|
|
|
|
this.$Modal.confirm({
|
|
|
|
|
title: '您确认要终止?',
|
|
|
|
|
content: '终止之后不可恢复',
|
|
|
|
|
onOk: () => {
|
|
|
|
|
this.saving = true;
|
|
|
|
|
ActivityManager.instanceTerminate({ instanceId: instance.id }, (res) => {
|
|
|
|
|
_this.saving = false;
|
|
|
|
|
if (res.success == undefined || !res.success) {
|
|
|
|
|
that.$Message.error("终止失败!");
|
|
|
|
|
if (res.data.success == undefined || !res.data.success) {
|
|
|
|
|
_this.$Message.error("终止失败!");
|
|
|
|
|
} else {
|
|
|
|
|
_this.searchTable();
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
onCancel: () => {
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
},
|
|
|
|
|
modify (instance) {
|
|
|
|
|
this.activityInstance = instance;
|
|
|
|
|
this.showUse = true;
|
|
|
|
|
store.commit("SET_useData", instance);
|
|
|
|
|
store.commit("SET_useData", Object.assign({}, instance));
|
|
|
|
|
},
|
|
|
|
|
navigateCode (instance) {
|
|
|
|
|
this.$router.push({
|
|
|
|
|