This commit is contained in:
@QQNZX 2024-02-26 13:42:47 +08:00
parent 7bda79899f
commit e98e5bf217
3 changed files with 238 additions and 48 deletions

View File

@ -46,4 +46,46 @@ export function deleteList(id) {
}) })
} }
// 下载
export function getdownload(query) {
return request({
url: 'business/marketingActivity/cardGift/export',
method: 'get',
})
}
// 查询条件
export function getsoucondition() {
return request({
url: 'business/marketingActivity/cardGift',
method: 'get',
})
}
// 查询统计
export function getselectGiftValue() {
return request({
url: 'business/marketingActivity/cardGift/selectGiftValue',
method: 'get',
})
}
// 统计
export function getqb() {
return request({
url: 'business/marketingActivity/cardGift/countGiftValue',
method: 'get',
})
}
export function getyi() {
return request({
url: 'business/marketingActivity/cardGift/countGiftValue?useStatus=1',
method: 'get',
})
}
export function getwei() {
return request({
url: 'business/marketingActivity/cardGift/countGiftValue?useStatus=0',
method: 'get',
})
}

View File

@ -315,9 +315,9 @@
border: 1px solid #ccc; border: 1px solid #ccc;
} }
.el-upload { .el-upload {
width: 150px; //width: 150px;
height: 150px; //height: 150px;
line-height: 150px; //line-height: 150px;
} }
.mini-btn { .mini-btn {
padding: 4px 8px 4px 8px; padding: 4px 8px 4px 8px;

View File

@ -3,7 +3,14 @@
<!-- 礼品卡--> <!-- 礼品卡-->
<el-card style="margin-bottom: 20px"> <el-card style="margin-bottom: 20px">
<div class="top-hang"> <div class="top-hang">
<el-input v-model="queryParams.number" clearable style="width: 20%;margin-right: 10px" placeholder="礼品卡号 "></el-input> <el-select v-model="queryParams.cardAmount" style="margin-right: 10px" placeholder="请选择面值">
<el-option
v-for="item in jglist"
:key="item.cardAmount"
:label="item.cardAmount"
:value="item.cardAmount">
</el-option>
</el-select>
<el-select v-model="queryParams.activateStatus" style="margin-right: 10px" placeholder="请选择"> <el-select v-model="queryParams.activateStatus" style="margin-right: 10px" placeholder="请选择">
<el-option <el-option
v-for="item in option" v-for="item in option"
@ -21,31 +28,90 @@
</el-option> </el-option>
</el-select> </el-select>
<el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button> <el-button type="primary" icon="el-icon-search" @click="getlist">查询</el-button>
<div class="butoon">
<a style=";color: #00afff"
href="/dev-api/business/marketingActivity/cardGift/export"> 下载模板 </a >
</div>
<div >
<el-upload
class=""
v-loading="uploading"
action="/dev-api/business/marketingActivity/cardGift/exchangeImport"
:headers="headers"
:limit="1"
:on-change="handleChange"
style="margin-left: 15px"
:file-list="fileList">
<el-button size="small" type="primary" icon="el-icon-upload">点击上传</el-button>
</el-upload>
</div>
</div> </div>
</el-card> </el-card>
<div class="tj"> <div class="tj">
<div class="sshi">
<el-card class="kar" >
<div class="tj-num">总发卡量</div>
</el-card>
<el-card class="kar" v-for="(item,index) in onelist" :key="index" >
<div class="ds" >
<div class="tj-num">
面值:{{item.cardAmount || 0}}
</div>
<div class="tj-num">
总发卡金额:{{item.total || 0}}
</div>
<div class="tj-num">
总数量:{{item.count || 0}}
</div>
</div>
</el-card>
</div>
<div class="sshi">
<el-card class="kar" >
<div class="tj-num">已使用卡量</div>
</el-card>
<el-card class="kar" v-for="(item,index) in twolist" :key="index" >
<div class="ds">
<div class="tj-num">
面值:{{item.cardAmount || 0}}
</div>
<div class="tj-num">
总发卡金额:{{item.total || 0}}
</div>
<div class="tj-num">
总数量:{{item.count || 0}}
</div>
</div>
</el-card>
</div>
<div class="sshi">
<el-card class="kar" >
<div class="tj-num">未使用卡量</div>
</el-card>
<el-card class="kar" v-for="(item,index) in threelist" :key="index" >
<div class="ds">
<div class="tj-num">
面值:{{item.cardAmount || 0}}
</div>
<div class="tj-num">
总发卡金额:{{item.total || 0}}
</div>
<div class="tj-num">
总数量:{{item.count || 0}}
</div>
</div>
</el-card>
</div>
<el-card class="kar" >
<div class="tj-num">{{tjdata.tatol || 0}}</div>
<div class="tj-siez">礼品卡总数</div>
</el-card>
<el-card class="kar" >
<div class="tj-num">{{tjdata.alreadyTatal || 0}}</div>
<div class="tj-siez">已激活</div>
</el-card>
<el-card class="kar" >
<div class="tj-num">{{tjdata.total_amount || 0}}</div>
<div class="tj-siez">总额度</div>
</el-card>
<el-card class="kar" >
<div class="tj-num">{{tjdata.remaining_amount || 0}}</div>
<div class="tj-siez">剩余额度</div>
</el-card>
<!-- <el-card class="kar" style="cursor: pointer;height: 106px " >
<div class="tj-num"> <el-tag v-if="tjdata.exchangeStatus == 0" @click="putStatus(1)">启用</el-tag> <el-tag type="info" v-if="tjdata.exchangeStatus == 1 " @click="putStatus(0)">禁用</el-tag> </div>
<div class="tj-siez">兑换功能状态</div>
</el-card>-->
</div> </div>
<el-card style="margin-bottom: 20px"> <el-card style="margin-bottom: 20px">
@ -60,34 +126,25 @@
label="ID" label="ID"
width="80"> width="80">
</el-table-column> </el-table-column>
<el-table-column
prop="batchNumber"
label="批次号"
width="220">
</el-table-column>
<el-table-column
prop="cardAmount"
label="面值金额"
width="180">
</el-table-column>
<el-table-column <el-table-column
prop="number" prop="number"
label="礼品卡号" label="电子礼品卡号"
width="210"> width="210">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="cardPassword" prop="cardAmount"
label="兑换卡密" label="面值"
width="180"> width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="activateStatus" prop="effectiveTimeStart"
label="激活状态" label="使用时间"
width="120"> width="220">
<template slot-scope="scope"> </el-table-column>
<span v-if="scope.row.activateStatus == 1"> <el-tag type="success">已使用</el-tag> </span> <el-table-column
<span v-if="scope.row.activateStatus != 1"> <el-tag type="info">未激活</el-tag> </span> prop="sailTime"
</template> label="售出时间"
width="180">
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="status" prop="status"
@ -106,12 +163,32 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="createTime" prop="createTime"
label="创建时间" label="创建时间"
width="220" width="220"
> >
</el-table-column> </el-table-column>
<el-table-column
prop="effectiveTimeStart"
label="有效期"
width="220"
>
<template slot-scope="scope">
<div>{{scope.row.effectiveTimeStart}}</div>- <div>{{scope.row.effectiveTimeEnd}}</div>
</template>
</el-table-column>
<el-table-column
prop="createBy"
label="操作员"
width="220"
>
</el-table-column>
<el-table-column <el-table-column
prop="remark" prop="remark"
label="备注信息" label="备注信息"
@ -126,6 +203,7 @@
@pagination="getlist" @pagination="getlist"
/> />
</el-card> </el-card>
<el-dialog <el-dialog
title="生产礼品卡" title="生产礼品卡"
:visible.sync="centerDialogVisible" :visible.sync="centerDialogVisible"
@ -161,11 +239,34 @@
</template> </template>
<script> <script>
import { getList,getListtj,addList,eitList,deleteList,oilDepotConfiguration } from "@/api/EventMarketing/giftBlock"; import {
getList,
getListtj,
addList,
eitList,
deleteList,
oilDepotConfiguration,
getdownload,
getselectGiftValue,
getyi,
getwei,
getqb
} from "@/api/EventMarketing/giftBlock";
import {getToken} from "@/utils/auth";
export default { export default {
name: 'index', name: 'index',
data() { data() {
return { return {
jglist:[],
onelist:[],
twolist:[],
threelist:[],
headers: {
'Access-Token': getToken(),
},
uploading: false,
fileList: [],
labelPosition:'left', labelPosition:'left',
queryParams: { queryParams: {
number:'', number:'',
@ -252,6 +353,20 @@
}, },
methods:{ methods:{
//
handleChange(file, fileList) {
this.uploading = true;
console.log(file)
if(file.status === 'success'){
this.uploading = false;
this.openUpload = false;
this.openUser = false;
this.fileList.splice(0,1)
this.result = file.response.data
}
},
putStatus(id){ putStatus(id){
let data = { let data = {
id:1, id:1,
@ -266,6 +381,21 @@
}, },
getlist(){ getlist(){
getselectGiftValue().then(res=>{
console.log(res)
this.jglist = res.data
})
getqb().then(res=>{
this.onelist = res.data
console.log(this.onelist)
})
getyi().then(res=>{
this.twolist = res.data
})
getwei().then(res=>{
this.threelist = res.data
})
this.queryParams.pageNo=this.pageNo this.queryParams.pageNo=this.pageNo
this.queryParams.pageSize=this.pageSize this.queryParams.pageSize=this.pageSize
getList(this.queryParams).then(res=>{ getList(this.queryParams).then(res=>{
@ -322,13 +452,20 @@
.tj{ .tj{
width: 100%; width: 100%;
display: flex; display: flex;
align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 20px; margin-bottom: 20px;
} }
.kar{ .kar{
width: 25%; width: 100%;
margin-right: 10px; background: #FFFFFF;
margin-bottom: 10px;
}
.ds{
width: 100%;
display: flex;
align-items: center;
} }
.tj-num{ .tj-num{
margin: 5px auto; margin: 5px auto;
@ -347,4 +484,15 @@
display: flex; display: flex;
align-items: center; align-items: center;
} }
.butoon{
box-sizing: border-box;
padding: 6px 10px;
border: 1px solid #409eff;
border-radius: 6px;
font-size: 16px;
margin-left: 15px;
}
.sshi{
width: 33%;
}
</style> </style>