feature_0521
zhenghuang 5 years ago
parent d00e6e8752
commit ba8d3a8a48

@ -1,107 +1,105 @@
<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 :gutter="10">
<i-col span="4">
<FormItem label="开始日期" prop>
<Date-picker
v-model="formValidate.startDate"
<FormItem label="开始日期"
prop>
<Date-picker v-model="formValidate.startDate"
:options='startDateOptions'
type="date"
placement="bottom-end"
placeholder="选择日期区间"
format="yyyy-MM-dd"
@on-change="startDateChange"
></Date-picker>
@on-change="startDateChange"></Date-picker>
</FormItem>
</i-col>
<i-col span="4">
<FormItem label="结束日期" prop>
<Date-picker
v-model="formValidate.endDate"
<FormItem label="结束日期"
prop>
<Date-picker v-model="formValidate.endDate"
:options='endDateOptions'
type="date"
placement="bottom-end"
placeholder="选择结束日期"
format="yyyy-MM-dd"
@on-change="endDateChange"
></Date-picker>
@on-change="endDateChange"></Date-picker>
</FormItem>
</i-col>
<i-col span="4">
<FormItem label="零售公司" prop>
<Select
v-model="formValidate.organizationId"
<FormItem label="零售公司"
prop>
<Select v-model="formValidate.organizationId"
filterable
@on-change="selectCompany"
placeholder="全部"
clearable
>
<Option
v-for="(item, index) in companyList"
clearable>
<Option v-for="(item, index) in companyList"
:key="index"
:value="item.value"
>{{ item.label }}</Option>
:value="item.value">{{ item.label }}</Option>
</Select>
</FormItem>
</i-col>
<i-col span="6">
<FormItem label="店铺" prop>
<Select v-model="formValidate.storeId" filterable placeholder="全部" clearable>
<Option
v-for="(item, index) in shopList"
<FormItem label="店铺"
prop>
<Select v-model="formValidate.storeId"
filterable
placeholder="全部"
clearable>
<Option v-for="(item, index) in shopList"
:key="index"
:value="item.value"
>{{ item.label }}</Option>
:value="item.value">{{ item.label }}</Option>
</Select>
</FormItem>
</i-col>
<i-col span="3">
<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 }}</Option>
:value="item.value">{{ item.label }}</Option>
</Select>
</FormItem>
</i-col>
<i-col span="3">
<Button type="primary" @click="() => {pageNum = 1;searchTable()}">查询</Button>
<Button type="primary"
@click="() => {pageNum = 1;searchTable()}">查询</Button>
</i-col>
</Row>
<Row style="margin-top:50px">
<Table
:loading="loading"
<Table :loading="loading"
border
@on-row-dblclick="showDetail"
: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"
:isModify="true"
:schedule="activityInstance.scheduleVO"
></useTable>
<Modal v-model="isShowDetail" title="活动计划详情" width="70%" :footer-hide="true">
<planDetail v-if="isShowDetail" :detail="detail"></planDetail>
:schedule="activityInstance.scheduleVO"></useTable>
<Modal v-model="isShowDetail"
title="活动计划详情"
width="70%"
:footer-hide="true">
<planDetail v-if="isShowDetail"
:detail="detail"></planDetail>
</Modal>
</div>
</template>
@ -413,12 +411,12 @@ export default {
},
searchTable (params = {}) {
this.loading = true;
if (this.formValidate.startDate !== "") {
if (this.formValidate.startDate) {
this.formValidate.startDate = formatDate(this.formValidate.startDate);
} else {
this.formValidate.startDate = undefined;
}
if (!!this.formValidate.endDate) {
if (this.formValidate.endDate) {
this.formValidate.endDate = formatDate(this.formValidate.endDate);
} else {
this.formValidate.endDate = undefined;

@ -1,10 +1,8 @@
<template>
<Modal v-model="dispalyModal"
width="1000"
:loading="loading"
:mask-closable="false"
@on-cancel="cancel"
@on-ok="save">
:loading="true"
:mask-closable="false">
<p slot="header"
style="color:#f60;text-align:left">
<span>配置活动</span>
@ -97,6 +95,16 @@
<Button style="margin-top: 10px"
type="primary"
@click="addActivityInput">+添加活动类型</Button>
<div slot="footer">
<Button type="primary"
shape="circle"
:loading="modal_loading"
@click="cancel">取消</Button>
<Button type="primary"
shape="circle"
:loading="modal_loading"
@click="save">确定</Button>
</div>
</Modal>
</template>
<script>
@ -133,7 +141,6 @@ export default {
},
watch: {
addActivityModal (val) {
console.log(111, val);
this.dispalyModal = val;
if (val === true && this.id) {
this.getActivityData();
@ -159,6 +166,7 @@ export default {
},
];
}
this.$forceUpdate();
},
},
mounted () { },
@ -224,20 +232,20 @@ export default {
},
save () {
let that = this;
that.modal_loading = true;
let i = 0;
this.loading = true;
if (
typeof that.formValidate.logo == "undefined" ||
that.formValidate.logo == "" ||
that.formValidate.logo.length <= 0
) {
that.$Message.error("请上传活动封面!");
that.loading = false;
that.modal_loading = false;
return false;
}
if (that.formValidate.params.length <= 0) {
that.$Message.error("至少需要填写一个活动类型!");
that.loading = false;
that.modal_loading = false;
return false;
}
for (const key in that.formValidate.params) {
@ -250,12 +258,11 @@ export default {
}
if (element.defaultVal.length <= 0) {
that.$Message.error(`请输入类型${i}的参数!`);
that.loading = false;
that.modal_loading = false;
return false;
}
}
}
this.loading = true;
this.$refs["formValidate"].validate((valid) => {
if (valid) {
// param = JSON.stringify(param)
@ -263,12 +270,13 @@ export default {
ActivityManager.addOreditActivity(data, function (data) {
that.addActivityModal = false;
that.formValidate = {};
that.modal_loading = false;
that.$emit("dispalyAddActivityModal", false, true);
});
} else {
that.modal_loading = false;
that.$Message.error("表单验证失败!");
}
that.loading = false;
});
},
},

@ -31,7 +31,7 @@ module.exports = {
// proxy: 'http://192.168.1.123:8312/'
// proxy: 'http://192.168.31.177:8312/'
// proxy: 'http://localhost:8312/'
proxy: "http://111.231.218.44:8080/",
proxy: 'http://localhost:8080/',
// proxy: 'http://localhost:8080/',
// proxy: 'http://jdxdev.vipgz4.idcfengye.com/'
},

Loading…
Cancel
Save