Commit 042374d8 by 吕明尚

优惠卷领取记录表增加作废和恢复功能

parent 7626f831
......@@ -35,6 +35,21 @@ export function updateConsumerCoupon(data) {
})
}
export function cancelCoupon(id) {
return request({
url: '/system/consumerCoupon/cancelCoupon?id=' + id,
method: 'get',
})
}
export function restoreCoupon(id) {
return request({
url: '/system/consumerCoupon/restoreCoupon?id=' + id,
method: 'get',
})
}
// 删除优惠券领取记录
export function delConsumerCoupon(id) {
return request({
......
......@@ -77,6 +77,22 @@
/>
</el-select>
</el-form-item>
<el-form-item label="优惠卷状态" prop="isDelete">
<el-select v-model="queryParams.isDelete" placeholder="请选择优惠卷状态">
<el-option
key=0
label="正常"
value=0
:value="0"
/>
<el-option
key=1
label="作废"
value=1
/>
</el-select>
</el-form-item>
<el-form-item label="有效期开始" prop="startDate">
<el-date-picker clearable
......@@ -255,13 +271,29 @@
<!-- @click="handleUpdate(scope.row)"-->
<!-- v-hasPermi="['system:consumerCoupon:edit']"-->
<!-- >修改</el-button>-->
<el-button
<!-- <el-button-->
<!-- size="mini"-->
<!-- type="text"-->
<!-- icon="el-icon-delete"-->
<!-- @click="handleDelete(scope.row)"-->
<!-- v-hasPermi="['system:coupon:remove']"-->
<!-- >删除-->
<!-- </el-button>-->
<el-button v-if="scope.row.isDelete == 0"
size="mini"
type="text"
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['system:coupon:remove']"
>删除
icon="el-icon-edit"
@click="cancelCoupon(scope.row)"
v-hasPermi="['system:coupon:edit']"
>作废
</el-button>
<el-button v-if="scope.row.isDelete == 1"
size="mini"
type="text"
icon="el-icon-edit"
@click="restoreCoupon(scope.row)"
v-hasPermi="['system:coupon:edit']"
>恢复
</el-button>
</template>
</el-table-column>
......@@ -377,6 +409,7 @@ import {
} from '@/api/system/consumerCoupon'
import {listStore, storeList} from "../../../api/system/store";
import {query} from '@/api/system/pack'
import {cancelCoupon, restoreCoupon} from "../../../api/system/consumerCoupon";
export default {
......@@ -430,7 +463,7 @@ export default {
endDate: null,
useDate: null,
useStatus: null,
isDelete: null,
isDelete: 0,
deleteBy: null,
deleteTime: null,
phone: null,
......@@ -614,6 +647,18 @@ export default {
...this.queryParams
}, `consumerCoupon_${new Date().getTime()}.xlsx`)
},
cancelCoupon(row) {
cancelCoupon(row.id).then(res => {
this.$modal.msgSuccess('操作成功')
this.getList()
})
},
restoreCoupon(row) {
restoreCoupon(row.id).then(res => {
this.$modal.msgSuccess('操作成功')
this.getList()
})
},
// 美团授权逻辑
onEmpower() {
console.log(window.location.href)
......
......@@ -281,7 +281,7 @@
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="订单时长(H)" align="center" prop="timeLong" width="90"/>
<el-table-column label="订单时长(H)" align="center" prop="timeLong" width="110"/>
<el-table-column label="支付类型" align="center" prop="payType" >
<template slot-scope="scope">
<dict-tag :options="dict.type.store_pay_ways" :value="scope.row.payType"/>
......
......@@ -11,7 +11,7 @@
>关闭
</el-button>
</el-col>
<right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
<!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>-->
</el-row>
<el-table v-loading="loading" :data="orderList">
<el-table-column label="订单流水号" align="center" prop="orderNo" width="150"/>
......@@ -60,7 +60,7 @@
<span>{{ parseTime(scope.row.payTime, '{y}-{m}-{d} {h}:{i}:{s}') }}</span>
</template>
</el-table-column>
<el-table-column label="订单时长(H)" align="center" prop="timeLong" width="90"/>
<el-table-column label="订单时长(H)" align="center" prop="timeLong" width="110"/>
<el-table-column label="支付类型" align="center" prop="payType">
<template slot-scope="scope">
<dict-tag :options="dict.type.store_pay_ways" :value="scope.row.payType"/>
......
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