This commit is contained in:
@QQNZX 2024-03-05 17:07:25 +08:00
parent e745341b4a
commit d20c7f151d
2 changed files with 36 additions and 13 deletions

View File

@ -77,6 +77,13 @@ export function getqb() {
method: 'get',
})
}
export function getsk(data) {
return request({
url: 'business/marketingActivity/cardGift',
method: 'put',
data:data
})
}
export function getyi() {
return request({
url: 'business/marketingActivity/cardGift/countGiftValue?useStatus=1',

View File

@ -3,7 +3,7 @@
<!-- 礼品卡-->
<el-card style="margin-bottom: 20px">
<div class="top-hang">
<el-select v-model="queryParams.cardAmount" style="margin-right: 10px" placeholder="请选择面值">
<el-select v-model="queryParams.cardAmount" clearable style="margin-right: 10px" placeholder="请选择面值">
<el-option
v-for="item in jglist"
:key="item.cardAmount"
@ -216,6 +216,16 @@
</el-switch>
</template>
</el-table-column>
<el-table-column
prop="sailStatus"
label="出售状态"
>
<template slot-scope="scope">
<span v-if="scope.row.sailStatus == 1">已售</span>
<span v-if="scope.row.sailStatus != 1">未售</span>
</template>
</el-table-column>
@ -225,16 +235,7 @@
>
</el-table-column>
<el-table-column
prop="effectiveTimeStart"
label="有效期"
>
<template slot-scope="scope">
<div>{{scope.row.effectiveTimeStart}}</div>- <div>{{scope.row.effectiveTimeEnd}}</div>
</template>
</el-table-column>
<el-table-column
prop="createBy"
@ -249,7 +250,7 @@
<el-button
size="mini"
type="text"
@click="yj(scope.row)"
@click="getwysk(scope.row)"
>售卡</el-button>
@ -314,10 +315,10 @@ import {
oilDepotConfiguration,
getdownload,
getselectGiftValue,
getyi,
getwei,
getqb
getqb,
getsk
} from "@/api/EventMarketing/giftBlock";
import {getToken} from "@/utils/auth";
export default {
@ -419,6 +420,21 @@ import {
},
methods:{
getwysk(row){
if(row.sailStatus == 1){
this.$message.error("此卡已经售出过了呦")
return
}
let data = {
id:row.id,
sailStatus :1
}
getsk(data).then(res=>{
this.getlist()
console.log(res)
this.$message.success("售卡成功")
})
},
//
handleChange(file, fileList) {