优化劵活动优惠券代码
parent
6fa3fa7822
commit
7cbd2b698c
|
@ -12,7 +12,7 @@
|
||||||
</Card>
|
</Card>
|
||||||
<div class="paramsGroup" v-else>
|
<div class="paramsGroup" v-else>
|
||||||
|
|
||||||
<Card style="width: 350px; margin:7px;" v-for="group in paramsGroup" :key="group.groupId" :bordered="false">
|
<Card style="width: 350px; margin:7px;" v-for="(group,index) in paramsGroup" :key="index" :bordered="false">
|
||||||
<p slot="title">
|
<p slot="title">
|
||||||
<Icon type="ios-film-outline"></Icon> {{ group.groupName }}
|
<Icon type="ios-film-outline"></Icon> {{ group.groupName }}
|
||||||
</p>
|
</p>
|
||||||
|
@ -30,7 +30,7 @@
|
||||||
<Icon type="arrow-down-b"></Icon>
|
<Icon type="arrow-down-b"></Icon>
|
||||||
</p>
|
</p>
|
||||||
<template v-if="group.params && group.params.length > 0">
|
<template v-if="group.params && group.params.length > 0">
|
||||||
<div v-for="param in group.params" :key="param.param_id" class="params">
|
<div v-for="(param,paramId) in group.params" :key="paramId" class="params">
|
||||||
<span>{{ param.paramName }}</span>
|
<span>{{ param.paramName }}</span>
|
||||||
|
|
||||||
<span>
|
<span>
|
||||||
|
@ -67,9 +67,9 @@
|
||||||
style="width: 100%; text-align: left; margin-right: 10px"
|
style="width: 100%; text-align: left; margin-right: 10px"
|
||||||
>
|
>
|
||||||
<Option
|
<Option
|
||||||
v-for="item in ops"
|
v-for="(item,itemIndex) in ops.options"
|
||||||
:value="item"
|
:value="item"
|
||||||
:key="item"
|
:key="itemIndex"
|
||||||
:label="item"
|
:label="item"
|
||||||
>
|
>
|
||||||
{{ item }}
|
{{ item }}
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
|
|
||||||
<div>
|
<div>
|
||||||
<Modal :title="modalTitle" v-model="dialogParamsGroupVisible" :mask-closable="false" :width="500">
|
<Modal :title="modalTitle" v-model="dialogParamsGroupVisible" :mask-closable="false" :width="500">
|
||||||
<Form ref="paramGroupForm" :model="paramGroupForm" :label-width="100" :rules="paramGroupValidate">
|
<Form @submit.native.prevent @keydown.enter.native='submitParamGroupForm' ref="paramGroupForm" :model="paramGroupForm" :label-width="100" :rules="paramGroupValidate">
|
||||||
<FormItem label="参数名称" prop="groupName">
|
<FormItem label="参数名称" prop="groupName">
|
||||||
<Input v-model="paramGroupForm.groupName" style="width: 100%"/>
|
<Input v-model="paramGroupForm.groupName" style="width: 100%"/>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
|
@ -125,6 +125,7 @@ export default {
|
||||||
name: "categoryParams",
|
name: "categoryParams",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
submitLoading:false,
|
||||||
/** 分类ID */
|
/** 分类ID */
|
||||||
categoryId: this.$route.query.id,
|
categoryId: this.$route.query.id,
|
||||||
/** 参数组 */
|
/** 参数组 */
|
||||||
|
|
|
@ -271,6 +271,7 @@ export default {
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
pageNumber: 0,
|
pageNumber: 0,
|
||||||
couponName: query,
|
couponName: query,
|
||||||
|
promotionStatus:"START"
|
||||||
};
|
};
|
||||||
this.couponLoading = true;
|
this.couponLoading = true;
|
||||||
getPlatformCouponList(params).then((res) => {
|
getPlatformCouponList(params).then((res) => {
|
||||||
|
|
|
@ -3,21 +3,10 @@
|
||||||
<Card>
|
<Card>
|
||||||
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
<Form ref="searchForm" :model="searchForm" inline :label-width="70" class="search-form">
|
||||||
<Form-item label="活动名称">
|
<Form-item label="活动名称">
|
||||||
<Input
|
<Input type="text" v-model="searchForm.promotionName" placeholder="请输入活动名称" clearable style="width: 200px" />
|
||||||
type="text"
|
|
||||||
v-model="searchForm.promotionName"
|
|
||||||
placeholder="请输入活动名称"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
/>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="活动状态" prop="promotionStatus">
|
<Form-item label="活动状态" prop="promotionStatus">
|
||||||
<Select
|
<Select v-model="searchForm.promotionStatus" placeholder="请选择" clearable style="width: 200px">
|
||||||
v-model="searchForm.promotionStatus"
|
|
||||||
placeholder="请选择"
|
|
||||||
clearable
|
|
||||||
style="width: 200px"
|
|
||||||
>
|
|
||||||
<Option value="NEW">未开始</Option>
|
<Option value="NEW">未开始</Option>
|
||||||
<Option value="START">已开始/上架</Option>
|
<Option value="START">已开始/上架</Option>
|
||||||
<Option value="END">已结束/下架</Option>
|
<Option value="END">已结束/下架</Option>
|
||||||
|
@ -25,13 +14,8 @@
|
||||||
</Select>
|
</Select>
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item label="活动时间">
|
<Form-item label="活动时间">
|
||||||
<DatePicker
|
<DatePicker v-model="selectDate" type="daterange" clearable placeholder="选择起始时间" style="width: 200px">
|
||||||
v-model="selectDate"
|
</DatePicker>
|
||||||
type="daterange"
|
|
||||||
clearable
|
|
||||||
placeholder="选择起始时间"
|
|
||||||
style="width: 200px"
|
|
||||||
></DatePicker>
|
|
||||||
</Form-item>
|
</Form-item>
|
||||||
<Form-item>
|
<Form-item>
|
||||||
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
|
<Button @click="handleSearch" type="primary" class="search-btn">搜索</Button>
|
||||||
|
@ -41,13 +25,7 @@
|
||||||
<Row class="operation">
|
<Row class="operation">
|
||||||
<Button type="primary" @click="newAct">新增</Button>
|
<Button type="primary" @click="newAct">新增</Button>
|
||||||
</Row>
|
</Row>
|
||||||
<Table
|
<Table :loading="loading" border :columns="columns" :data="data" ref="table">
|
||||||
:loading="loading"
|
|
||||||
border
|
|
||||||
:columns="columns"
|
|
||||||
:data="data"
|
|
||||||
ref="table"
|
|
||||||
>
|
|
||||||
<template slot-scope="{ row }" slot="applyEndTime">
|
<template slot-scope="{ row }" slot="applyEndTime">
|
||||||
{{ unixDate(row.applyEndTime) }}
|
{{ unixDate(row.applyEndTime) }}
|
||||||
</template>
|
</template>
|
||||||
|
@ -61,67 +39,40 @@
|
||||||
</template>
|
</template>
|
||||||
<template slot-scope="{ row }" slot="action">
|
<template slot-scope="{ row }" slot="action">
|
||||||
<div>
|
<div>
|
||||||
<Button
|
<Button type="primary" v-if="row.promotionStatus == 'NEW'" size="small" @click="edit(row)">编辑</Button>
|
||||||
type="primary"
|
|
||||||
v-if="row.promotionStatus == 'NEW'"
|
|
||||||
size="small"
|
|
||||||
@click="edit(row)"
|
|
||||||
>编辑</Button>
|
|
||||||
<Button type="info" v-else size="small" @click="edit(row)">查看</Button>
|
<Button type="info" v-else size="small" @click="edit(row)">查看</Button>
|
||||||
<Button
|
<Button type="success" v-if="row.promotionStatus === 'START'" style="margin-left:5px" size="small"
|
||||||
type="success"
|
@click="openOrClose(row)">关闭</Button>
|
||||||
v-if="row.promotionStatus === 'START'"
|
<Button type="success" v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
||||||
ghost
|
style="margin-left:5px" size="small" @click="openOrClose(row)">开启</Button>
|
||||||
style="margin-left:5px"
|
<Button type="error" :disabled="row.promotionStatus == 'START'" style="margin-left:5px" size="small"
|
||||||
size="small"
|
@click="del(row)">删除</Button>
|
||||||
@click="openOrClose(row)"
|
|
||||||
>关闭</Button>
|
|
||||||
<Button
|
|
||||||
type="success"
|
|
||||||
v-if="row.promotionStatus === 'CLOSE' || row.promotionStatus === 'NEW'"
|
|
||||||
ghost
|
|
||||||
style="margin-left:5px"
|
|
||||||
size="small"
|
|
||||||
@click="openOrClose(row)"
|
|
||||||
>开启</Button>
|
|
||||||
<Button
|
|
||||||
type="error"
|
|
||||||
:disabled="row.promotionStatus == 'START'"
|
|
||||||
ghost
|
|
||||||
style="margin-left:5px"
|
|
||||||
size="small"
|
|
||||||
@click="del(row)"
|
|
||||||
>删除</Button>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
</Table>
|
</Table>
|
||||||
<Row type="flex" justify="end" class="page operation">
|
<Row type="flex" justify="end" class="page operation">
|
||||||
<Page
|
<Page :current="searchForm.pageNumber" :total="total" :page-size="searchForm.pageSize" @on-change="changePage"
|
||||||
:current="searchForm.pageNumber"
|
@on-page-size-change="changePageSize" :page-size-opts="[10, 20, 50]" size="small" show-total show-elevator
|
||||||
:total="total"
|
show-sizer></Page>
|
||||||
:page-size="searchForm.pageSize"
|
|
||||||
@on-change="changePage"
|
|
||||||
@on-page-size-change="changePageSize"
|
|
||||||
:page-size-opts="[10, 20, 50]"
|
|
||||||
size="small"
|
|
||||||
show-total
|
|
||||||
show-elevator
|
|
||||||
show-sizer
|
|
||||||
></Page>
|
|
||||||
</Row>
|
</Row>
|
||||||
</Card>
|
</Card>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { getFullDiscountList, delFullDiscount, updateFullDiscount } from "@/api/promotion.js";
|
import {
|
||||||
|
getFullDiscountList,
|
||||||
|
delFullDiscount,
|
||||||
|
updateFullDiscount,
|
||||||
|
} from "@/api/promotion.js";
|
||||||
export default {
|
export default {
|
||||||
name: 'full-cut',
|
name: "full-cut",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
total:0,
|
total: 0,
|
||||||
selectDate:[],
|
selectDate: [],
|
||||||
loading: false, // 表单加载状态
|
loading: false, // 表单加载状态
|
||||||
searchForm: { // 列表请求参数
|
searchForm: {
|
||||||
|
// 列表请求参数
|
||||||
pageNumber: 1,
|
pageNumber: 1,
|
||||||
pageSize: 10,
|
pageSize: 10,
|
||||||
sort: "startTime",
|
sort: "startTime",
|
||||||
|
@ -218,8 +169,8 @@ export default {
|
||||||
},
|
},
|
||||||
// 重置
|
// 重置
|
||||||
handleReset() {
|
handleReset() {
|
||||||
this.selectDate = ''
|
this.selectDate = "";
|
||||||
this.searchForm = {}
|
this.searchForm = {};
|
||||||
this.searchForm.pageNumber = 1;
|
this.searchForm.pageNumber = 1;
|
||||||
this.searchForm.pageSize = 10;
|
this.searchForm.pageSize = 10;
|
||||||
this.getDataList();
|
this.getDataList();
|
||||||
|
@ -248,12 +199,12 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// 开启或关闭活动
|
// 开启或关闭活动
|
||||||
openOrClose (row) {
|
openOrClose(row) {
|
||||||
let name = '开启'
|
let name = "开启";
|
||||||
let status = 'START'
|
let status = "START";
|
||||||
if (row.promotionStatus === 'START') {
|
if (row.promotionStatus === "START") {
|
||||||
name = '关闭'
|
name = "关闭";
|
||||||
status = 'CLOSE'
|
status = "CLOSE";
|
||||||
}
|
}
|
||||||
this.$Modal.confirm({
|
this.$Modal.confirm({
|
||||||
title: "提示",
|
title: "提示",
|
||||||
|
@ -291,14 +242,14 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted () {
|
mounted() {
|
||||||
this.init();
|
this.init();
|
||||||
},
|
},
|
||||||
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
// 页面缓存处理,从该页面离开时,修改KeepAlive为false,保证进入该页面是刷新
|
||||||
beforeRouteLeave(to, from, next) {
|
beforeRouteLeave(to, from, next) {
|
||||||
from.meta.keepAlive = false
|
from.meta.keepAlive = false;
|
||||||
next()
|
next();
|
||||||
}
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
|
|
|
@ -54,7 +54,7 @@
|
||||||
</Select>
|
</Select>
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem v-if="form.isPoint" label="赠积分" prop="point">
|
<FormItem v-if="form.isPoint" label="赠积分" prop="point">
|
||||||
<Input :disabled="form.promotionStatus != 'NEW'" v-model="form.point" type="number" :min="0" style="width: 280px" />
|
<InputNumber :min="0" :disabled="form.promotionStatus != 'NEW'" v-model="form.point" type="number" style="width: 280px" />
|
||||||
</FormItem>
|
</FormItem>
|
||||||
<FormItem label="使用范围" prop="scopeType">
|
<FormItem label="使用范围" prop="scopeType">
|
||||||
<RadioGroup type="button" button-style="solid" v-model="form.scopeType">
|
<RadioGroup type="button" button-style="solid" v-model="form.scopeType">
|
||||||
|
@ -376,6 +376,7 @@ export default {
|
||||||
pageNumber: 0,
|
pageNumber: 0,
|
||||||
getType: "ACTIVITY",
|
getType: "ACTIVITY",
|
||||||
couponName: query,
|
couponName: query,
|
||||||
|
promotionStatus:"START"
|
||||||
};
|
};
|
||||||
this.couponLoading = true;
|
this.couponLoading = true;
|
||||||
getShopCouponList(params).then((res) => {
|
getShopCouponList(params).then((res) => {
|
||||||
|
|
Loading…
Reference in New Issue