Commit 69434d51 by 吕明尚

时长券增加适用门店,售卖金额,原始金额

parent 13675afd
......@@ -290,6 +290,14 @@
<dict-tag :options="dict.type.sunday_type" :value="scope.row.weeks"/>
</template>
</el-table-column>
<el-table-column align="center" label="适用门店" prop="storeIds" width="350px">
<template slot-scope="scope">
<div v-if="scope.row.storeIds" style="display: flex;flex-wrap: wrap;width: 100%;">
<dict-tag v-for="(item ,k) in scope.row.storeIds" :key="k" :options="storeList" :value="item"
style="margin: 0 3px;"/>
</div>
</template>
</el-table-column>
<el-table-column label="有效期开始" align="center" prop="startDate" width="180">
<template slot-scope="scope">
<span>{{ parseTime(scope.row.startDate, '{y}-{m}-{d}') }}</span>
......@@ -304,7 +312,7 @@
<el-table-column label="有效结束时段" align="center" prop="validEndTime" width="180"/>
<el-table-column label="数量" align="center" prop="number"/>
<el-table-column label="备注" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作">
<template slot-scope="scope">
<!-- <el-button-->
<!-- size="mini"-->
......@@ -343,6 +351,7 @@ import {listDuration} from "../../../api/system/coupon";
import {give} from "../../../api/system/consumerCoupon";
import moment from "moment";
import {query} from '@/api/system/pack';
import {storeList} from "../../../api/system/store";
export default {
name: "Consumer",
......@@ -366,6 +375,7 @@ export default {
// 会员用户表格数据
consumerList: [],
couponList: [],
storeList: [],
// 弹出层标题
title: "",
couponTitle: "",
......@@ -412,6 +422,7 @@ export default {
created() {
this.getList();
this.onPackList();
this.onStoreList();
},
methods: {
onPackList() {
......@@ -433,6 +444,24 @@ export default {
this.getList();
})
},
onStoreList() {
storeList().then(res => {
this.storeList = res.data.map(obj => {
return {
...obj,
raw: {
dictSort: 1,
dictValue: "1",
listClass: "primary",
cssClass: ''
},
value: obj.id.toString(),
label: obj.name,
}
})
this.$forceUpdate();
})
},
/** 查询会员用户列表 */
getList() {
this.loading = true;
......@@ -448,7 +477,9 @@ export default {
this.couponList = response.rows.map(item => {
return {
...item,
storeIds: item.storeIds && item.storeIds.length ? item.storeIds.split(",") : [],
weeks: item.weeks ? item.weeks.split(",") : []
}
});
this.couponTotal = response.total;
......
......@@ -229,6 +229,14 @@
<dict-tag :options="dict.type.sunday_type" :value="scope.row.weeks"/>
</template>
</el-table-column>
<el-table-column align="center" label="适用门店" prop="storeIds" width="350px">
<template slot-scope="scope">
<div v-if="scope.row.storeIds" style="display: flex;flex-wrap: wrap;width: 100%;">
<dict-tag v-for="(item ,k) in scope.row.storeIds" :key="k" :options="storeList" :value="item"
style="margin: 0 3px;"/>
</div>
</template>
</el-table-column>
<el-table-column label="有效开始时段" align="center" prop="couponTimeStart"/>
<el-table-column label="有效结束时段" align="center" prop="couponTimeEnd"/>
<el-table-column label="有效期开始" align="center" prop="startDate" width="180">
......@@ -264,7 +272,7 @@
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column label="说明" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作">
<template slot-scope="scope">
<!-- <el-button-->
<!-- size="mini"-->
......@@ -510,6 +518,7 @@ export default {
this.consumerCouponList = response.rows.map(item => {
return {
...item,
storeIds: item.storeIds && item.storeIds.length ? item.storeIds.split(",") : [],
weeks: item.weeks ? item.weeks.split(",") : []
}
});
......@@ -561,8 +570,21 @@ export default {
this.getList()
},
onStoreList() {
storeList().then(response => {
this.storeList = response.data;
storeList().then(res => {
this.storeList = res.data.map(obj => {
return {
...obj,
raw: {
dictSort: 1,
dictValue: "1",
listClass: "primary",
cssClass: ''
},
value: obj.id.toString(),
label: obj.name,
}
})
this.$forceUpdate();
})
},
onPackList() {
......
......@@ -116,6 +116,8 @@
<dict-tag :options="dict.type.store_coupon_type" :value="scope.row.couponType"/>
</template>
</el-table-column>
<el-table-column align="center" label="优惠券原始金额" prop="subPrice"/>
<el-table-column align="center" label="优惠券售卖金额" prop="couponPayPrice"/>
<el-table-column label="时长" align="center" prop="duration"/>
<el-table-column label="门槛时长" align="center" prop="minDuration"/>
<el-table-column label="平台类型" align="center" prop="platformType">
......@@ -128,16 +130,23 @@
<dict-tag :options="dict.type.store_order_type" :value="scope.row.orderType"/>
</template>
</el-table-column>
<el-table-column label="适用星期" align="center" prop="weeks" width="250px">
<el-table-column label="适用套餐" align="center" prop="packIds" width="250px">
<template slot-scope="scope">
<div v-if="scope.row.packIds">
<dict-tag :options="packList" :value="scope.row.packIds.split(',')"/>
</div>
</template>
</el-table-column>
<el-table-column align="center" label="适用星期" prop="weeks" width="250px">
<template slot-scope="scope">
<dict-tag :options="dict.type.sunday_type" :value="scope.row.weeks"/>
</template>
---------------
</el-table-column>
<el-table-column label="适用套餐" align="center" prop="packIds" width="250px">
<el-table-column align="center" label="适用门店" prop="storeIds" width="350">
<template slot-scope="scope">
<div v-if="scope.row.packIds">
<dict-tag :options="packList" :value="scope.row.packIds.split(',')"/>
<div v-if="scope.row.storeIds" style="display: flex;flex-wrap: wrap;width: 100%;">
<dict-tag v-for="(item ,k) in scope.row.storeIds" :key="k" :options="storeList" :value="item"
style="margin: 0 3px;"/>
</div>
</template>
</el-table-column>
......@@ -163,7 +172,7 @@
</el-table-column>
<el-table-column label="说明" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
......@@ -209,6 +218,12 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="优惠券原始金额" prop="subPrice">
<el-input v-model="form.subPrice" placeholder="请输入优惠券原始金额"/>
</el-form-item>
<el-form-item label="优惠券售卖金额" prop="couponPayPrice">
<el-input v-model="form.couponPayPrice" placeholder="请输入优惠券售卖金额"/>
</el-form-item>
<el-form-item label="时长" prop="duration">
<el-input-number v-model="form.duration" :max="24" :min="0.5" :step="0.5" placeholder="请输入时长"/>
</el-form-item>
......@@ -261,6 +276,16 @@
></el-option>
</el-select>
</el-form-item>
<el-form-item label="适用门店" prop="storeIds">
<el-select v-model="form.storeIds" clearable multiple placeholder="请选择适用门店">
<el-option
v-for="dict in storeList"
:key="dict.value"
:label="dict.label"
:value="dict.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="有效期开始" prop="startDate">
<el-date-picker clearable
v-model="form.startDate"
......@@ -317,6 +342,7 @@
</template>
<script>
import {storeList} from '@/api/system/store'
import {listDuration, getCoupon, delCoupon, addCoupon, updateCoupon} from "@/api/system/coupon";
import {query} from '@/api/system/pack'
......@@ -341,6 +367,7 @@ export default {
roomType: [],
// 优惠券表格数据
couponList: [],
storeList: [],
packList: [],
weeks: [],
// 弹出层标题
......@@ -391,6 +418,7 @@ export default {
created() {
this.getList();
this.onPackList();
this.onStoreList();
},
methods: {
onNavToCouponRecord(row){
......@@ -424,7 +452,8 @@ export default {
this.couponList = response.rows.map(item => {
return {
...item,
weeks: item.weeks ? item.weeks.split(",") : []
weeks: item.weeks ? item.weeks.split(",") : [],
storeIds: item.storeIds && item.storeIds.length ? item.storeIds.split(",") : []
}
});
this.total = response.total;
......@@ -450,6 +479,24 @@ export default {
this.getList();
})
},
onStoreList() {
storeList().then(res => {
this.storeList = res.data.map(obj => {
return {
...obj,
raw: {
dictSort: 1,
dictValue: "1",
listClass: "primary",
cssClass: ''
},
value: obj.id.toString(),
label: obj.name,
}
})
this.$forceUpdate();
})
},
// 取消按钮
cancel() {
this.open = false;
......@@ -520,6 +567,9 @@ export default {
if (this.form.roomType) {
this.roomType = this.form.roomType.split(",")
}
if (this.form.storeIds) {
this.form.storeIds = this.form.storeIds.split(",")
}
if (this.form.weeks) {
this.weeks = this.form.weeks.split(",")
}
......@@ -535,6 +585,7 @@ export default {
if (this.weeks.length) {
this.form.weeks = this.weeks.join();
}
this.form.storeIds = this.form.storeIds && this.form.storeIds.length ? this.form.storeIds.join() : ''
this.form.packIds = this.form.packIds && this.form.packIds.length ? this.form.packIds.join() : ''
if (this.form.id != null) {
updateCoupon(this.form).then(response => {
......
......@@ -165,7 +165,7 @@
<!-- <el-table-column label="数量" align="center" prop="number"/>-->
<el-table-column label="说明" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
......
......@@ -164,7 +164,7 @@
<!-- <el-table-column label="数量" align="center" prop="number"/>-->
<el-table-column label="说明" align="center" prop="remark"/>
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作">
<template slot-scope="scope">
<el-button
size="mini"
......
......@@ -298,7 +298,7 @@
<!-- <dict-tag :options="dict.type.order_pay_status" :value="scope.row.payStatus"/>-->
<!-- </template>-->
<!-- </el-table-column>-->
<el-table-column align="center" class-name="small-padding fixed-width" label="操作" width="100">
<el-table-column align="center" class-name="small-padding fixed-width" fixed="right" label="操作" width="100">
<template slot-scope="scope">
<el-button v-if="scope.row.payStatus == 1 && scope.row.status != 3"
size="mini"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment