|
@@ -60,16 +60,43 @@
|
|
|
</template>
|
|
|
<template slot-scope="{ row }" slot="card_name">
|
|
|
<div>
|
|
|
- <div class="title">{{ row.card_name }}(ID:{{ row.servicecard.id}})</div>
|
|
|
+ <div class="title">{{ row.card_name }}</div>
|
|
|
+ <div class="title">
|
|
|
+ 订单号:{{row.order.order_id}}
|
|
|
+ </div>
|
|
|
+ <div class="title">ID:{{ row.servicecard.id}}</div>
|
|
|
<div class="title" v-if="row.order">价格:{{ row.order.pay_price }}</div>
|
|
|
<div class="title" v-if="row.servicecard">折扣:{{ row.servicecard
|
|
|
.discount }}%</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
+ <template slot-scope="{ row }" slot="serviceCard">
|
|
|
+ <div class="product">
|
|
|
+ <div class="image" v-viewer>
|
|
|
+ <img v-lazy="row.serviceCard.image">
|
|
|
+ </div>
|
|
|
+ <div class="title">
|
|
|
+ <div>
|
|
|
+ {{ row.serviceCard.card_name }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ 服务卡ID:{{row.serviceCard.id}}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }" slot="number">
|
|
|
+ <div>
|
|
|
+ <span v-if="row.pm==1">+</span>
|
|
|
+ <span v-else>-</span>
|
|
|
+ <span>{{row.number}}</span>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
<template slot-scope="{ row }" slot="add_time">
|
|
|
<div>
|
|
|
<div class="title" v-if="row.order">
|
|
|
- {{row.add_time}}</div>
|
|
|
+ {{row.add_time}}
|
|
|
+ </div>
|
|
|
<div class="title" v-else>已失效</div>
|
|
|
</div>
|
|
|
</template>
|
|
@@ -80,7 +107,31 @@
|
|
|
</div>
|
|
|
<div class="title">
|
|
|
<div>
|
|
|
- {{ item.product.store_name }}(ID:{{item.product.id}})
|
|
|
+ {{ item.product.store_name }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ ID:{{item.product.id}}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ 原价:{{ item.product.price }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ 剩余次数:{{ item.repertory }}
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <template slot-scope="{ row }" slot="serveInfo">
|
|
|
+ <div class="product" v-for="item in row.info">
|
|
|
+ <div class="image" v-viewer>
|
|
|
+ <img v-lazy="item.product.image">
|
|
|
+ </div>
|
|
|
+ <div class="title">
|
|
|
+ <div>
|
|
|
+ {{ item.product.store_name }}
|
|
|
+ </div>
|
|
|
+ <div>
|
|
|
+ ID:{{item.product.id}}
|
|
|
</div>
|
|
|
<div>
|
|
|
原价:{{ item.product.price }}
|
|
@@ -150,8 +201,8 @@
|
|
|
label: '服务卡'
|
|
|
},
|
|
|
{
|
|
|
- val: 'service_list',
|
|
|
- label: '服务记录'
|
|
|
+ val: 'service_card_record',
|
|
|
+ label: '服务卡变动'
|
|
|
},
|
|
|
{
|
|
|
val: 'balance_change',
|
|
@@ -397,15 +448,23 @@
|
|
|
}
|
|
|
infoApi(data).then(async res => {
|
|
|
if (res.status === 200) {
|
|
|
- let data = res.data
|
|
|
+ let data = res.data;
|
|
|
if (this.userFrom.type == 'service_card') {
|
|
|
this.userLists = data.list.map((res) => {
|
|
|
if (res.order) {
|
|
|
const date = new Date(res.order.add_time * 1000);
|
|
|
- res.add_time = this.formatDate(date ,'yyyy-MM-dd hh:mm:ss');
|
|
|
+ res.add_time = this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
|
|
|
}
|
|
|
return res
|
|
|
});
|
|
|
+ } else if (this.userFrom.type == 'service_card_record') {
|
|
|
+ console.log(data,'data');
|
|
|
+ this.userLists = data.list.map((res) => {
|
|
|
+ const date = new Date(res.add_time * 1000);
|
|
|
+ res.add_time = this.formatDate(date, 'yyyy-MM-dd hh:mm:ss');
|
|
|
+ return res
|
|
|
+ });
|
|
|
+ console.log(this.userLists, 'this.userLists ')
|
|
|
} else {
|
|
|
this.userLists = data.list;
|
|
|
}
|
|
@@ -530,6 +589,41 @@
|
|
|
// }
|
|
|
]
|
|
|
break;
|
|
|
+ case 'service_card_record':
|
|
|
+ this.columns = [
|
|
|
+ {
|
|
|
+ title: '服务订单号',
|
|
|
+ key: 'link_id',
|
|
|
+ minWidth: 200
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '服务卡',
|
|
|
+ slot: 'serviceCard',
|
|
|
+ minWidth: 250
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '变化数量',
|
|
|
+ slot: 'number',
|
|
|
+ minWidth: 80
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '变化后数量',
|
|
|
+ key: 'banlance',
|
|
|
+ minWidth: 80
|
|
|
+ },
|
|
|
+
|
|
|
+ {
|
|
|
+ title: '说明',
|
|
|
+ key: 'mark',
|
|
|
+ minWidth: 100
|
|
|
+ },
|
|
|
+ {
|
|
|
+ title: '变动时间',
|
|
|
+ key: 'add_time',
|
|
|
+ minWidth: 120
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ break;
|
|
|
case 'coupon':
|
|
|
this.columns = [{
|
|
|
title: '优惠券名称',
|