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', method: 'get',
}) })
} }
export function getsk(data) {
return request({
url: 'business/marketingActivity/cardGift',
method: 'put',
data:data
})
}
export function getyi() { export function getyi() {
return request({ return request({
url: 'business/marketingActivity/cardGift/countGiftValue?useStatus=1', url: 'business/marketingActivity/cardGift/countGiftValue?useStatus=1',

View File

@ -3,7 +3,7 @@
<!-- 礼品卡--> <!-- 礼品卡-->
<el-card style="margin-bottom: 20px"> <el-card style="margin-bottom: 20px">
<div class="top-hang"> <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 <el-option
v-for="item in jglist" v-for="item in jglist"
:key="item.cardAmount" :key="item.cardAmount"
@ -216,6 +216,16 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </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>
<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 <el-table-column
prop="createBy" prop="createBy"
@ -249,7 +250,7 @@
<el-button <el-button
size="mini" size="mini"
type="text" type="text"
@click="yj(scope.row)" @click="getwysk(scope.row)"
>售卡</el-button> >售卡</el-button>
@ -314,10 +315,10 @@ import {
oilDepotConfiguration, oilDepotConfiguration,
getdownload, getdownload,
getselectGiftValue, getselectGiftValue,
getyi, getyi,
getwei, getwei,
getqb getqb,
getsk
} from "@/api/EventMarketing/giftBlock"; } from "@/api/EventMarketing/giftBlock";
import {getToken} from "@/utils/auth"; import {getToken} from "@/utils/auth";
export default { export default {
@ -419,6 +420,21 @@ import {
}, },
methods:{ 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) { handleChange(file, fileList) {