前端
This commit is contained in:
parent
7bda79899f
commit
e98e5bf217
@ -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',
|
||||
})
|
||||
}
|
||||
|
@ -315,9 +315,9 @@
|
||||
border: 1px solid #ccc;
|
||||
}
|
||||
.el-upload {
|
||||
width: 150px;
|
||||
height: 150px;
|
||||
line-height: 150px;
|
||||
//width: 150px;
|
||||
//height: 150px;
|
||||
//line-height: 150px;
|
||||
}
|
||||
.mini-btn {
|
||||
padding: 4px 8px 4px 8px;
|
||||
|
@ -3,7 +3,14 @@
|
||||
<!-- 礼品卡-->
|
||||
<el-card style="margin-bottom: 20px">
|
||||
<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-option
|
||||
v-for="item in option"
|
||||
@ -21,31 +28,90 @@
|
||||
</el-option>
|
||||
</el-select>
|
||||
<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>
|
||||
</el-card>
|
||||
<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>
|
||||
|
||||
<el-card style="margin-bottom: 20px">
|
||||
@ -60,34 +126,25 @@
|
||||
label="ID"
|
||||
width="80">
|
||||
</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
|
||||
prop="number"
|
||||
label="礼品卡卡号"
|
||||
label="电子礼品卡号"
|
||||
width="210">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="cardPassword"
|
||||
label="兑换卡密"
|
||||
prop="cardAmount"
|
||||
label="面值"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="activateStatus"
|
||||
label="激活状态"
|
||||
width="120">
|
||||
<template slot-scope="scope">
|
||||
<span v-if="scope.row.activateStatus == 1"> <el-tag type="success">已使用</el-tag> </span>
|
||||
<span v-if="scope.row.activateStatus != 1"> <el-tag type="info">未激活</el-tag> </span>
|
||||
</template>
|
||||
prop="effectiveTimeStart"
|
||||
label="使用时间"
|
||||
width="220">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="sailTime"
|
||||
label="售出时间"
|
||||
width="180">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="status"
|
||||
@ -106,12 +163,32 @@
|
||||
</el-switch>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
|
||||
|
||||
<el-table-column
|
||||
prop="createTime"
|
||||
label="创建时间"
|
||||
width="220"
|
||||
>
|
||||
</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
|
||||
prop="remark"
|
||||
label="备注信息"
|
||||
@ -126,6 +203,7 @@
|
||||
@pagination="getlist"
|
||||
/>
|
||||
</el-card>
|
||||
|
||||
<el-dialog
|
||||
title="生产礼品卡"
|
||||
:visible.sync="centerDialogVisible"
|
||||
@ -161,11 +239,34 @@
|
||||
</template>
|
||||
|
||||
<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 {
|
||||
name: 'index',
|
||||
data() {
|
||||
return {
|
||||
jglist:[],
|
||||
onelist:[],
|
||||
twolist:[],
|
||||
threelist:[],
|
||||
headers: {
|
||||
'Access-Token': getToken(),
|
||||
},
|
||||
uploading: false,
|
||||
fileList: [],
|
||||
labelPosition:'left',
|
||||
queryParams: {
|
||||
number:'',
|
||||
@ -252,6 +353,20 @@
|
||||
|
||||
},
|
||||
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){
|
||||
let data = {
|
||||
id:1,
|
||||
@ -266,6 +381,21 @@
|
||||
|
||||
},
|
||||
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.pageSize=this.pageSize
|
||||
getList(this.queryParams).then(res=>{
|
||||
@ -322,13 +452,20 @@
|
||||
.tj{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
justify-content: space-between;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
.kar{
|
||||
width: 25%;
|
||||
margin-right: 10px;
|
||||
width: 100%;
|
||||
background: #FFFFFF;
|
||||
margin-bottom: 10px;
|
||||
|
||||
}
|
||||
.ds{
|
||||
width: 100%;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
}
|
||||
.tj-num{
|
||||
margin: 5px auto;
|
||||
@ -347,4 +484,15 @@
|
||||
display: flex;
|
||||
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>
|
||||
|
Loading…
Reference in New Issue
Block a user