|
|
@@ -2,12 +2,7 @@
|
|
|
<div class="app-list-content">
|
|
|
<x-crud class="liu-crud-wrap" @load="onLoad">
|
|
|
<template #slot-tabs="{ scope }">
|
|
|
- <el-tabs
|
|
|
- class="liu-tabs"
|
|
|
- type="border-card"
|
|
|
- v-model="tabIndex"
|
|
|
- @tab-click="handleClick"
|
|
|
- >
|
|
|
+ <el-tabs class="liu-tabs" type="border-card" v-model="tabIndex" @tab-click="handleClick">
|
|
|
<el-tab-pane
|
|
|
v-for="(item, index) in tabsData"
|
|
|
:key="index"
|
|
|
@@ -38,16 +33,15 @@
|
|
|
</template>
|
|
|
|
|
|
<template #table-column-orderTime="{scope}">
|
|
|
- <div v-if="scope.row.status == 1">{{ item.orderTime | formatTime }}</div>
|
|
|
- <div v-else-if="scope.row.status == 1">{{ item.giveTime | formatTime }}</div>
|
|
|
- <div v-else>-</div>
|
|
|
+ <div>{{ scope.row.orderTime | formatTime }}</div>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-giveTime="{scope}">
|
|
|
+ <div>{{ scope.row.giveTime | formatTime }}</div>
|
|
|
</template>
|
|
|
|
|
|
- <!-- 兑奖 -->
|
|
|
<template #slot-column-redeem="{scope}">
|
|
|
- <el-button v-if="scope.row.status == 1" type="text" @click="redeemFn(scope.row)"
|
|
|
- >兑奖</el-button
|
|
|
- >
|
|
|
+ <el-button v-if="scope.row.status == 1" type="text" @click="redeemFn(scope.row)">兑奖</el-button>
|
|
|
<div v-else>-</div>
|
|
|
</template>
|
|
|
</x-crud>
|
|
|
@@ -70,15 +64,10 @@
|
|
|
></cl-avatar>
|
|
|
</div>
|
|
|
<div class="list-right">
|
|
|
- <div class="app-color-0 app-size-30 app-blod">
|
|
|
- {{ redeemData.userName }}
|
|
|
- </div>
|
|
|
+ <div class="app-color-0 app-size-30 app-blod">{{ redeemData.userName }}</div>
|
|
|
<div>普通客户</div>
|
|
|
<div>
|
|
|
- <span class="list-time">{{
|
|
|
- redeemData.orderTime | formatTime
|
|
|
- }}</span>
|
|
|
- <span>下单: {{ redeemData.amount }}</span>
|
|
|
+ <span class="list-time">{{redeemData.orderTime | formatTime}} 下单</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -96,15 +85,9 @@
|
|
|
></cl-avatar>
|
|
|
</div>
|
|
|
<div class="list-right">
|
|
|
- <div class="app-color-0 app-size-30 app-blod">
|
|
|
- {{ redeemData.introUserName }}
|
|
|
- </div>
|
|
|
+ <div class="app-color-0 app-size-30 app-blod">{{ redeemData.introUserName }}</div>
|
|
|
<div>普通客户</div>
|
|
|
<div>
|
|
|
- <span class="list-time"
|
|
|
- >累计邀请: {{ redeemData.inviteNum }}</span
|
|
|
- >
|
|
|
- <span>介绍下单数: {{ redeemData.orderNum }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -112,7 +95,7 @@
|
|
|
<!-- 总览 -->
|
|
|
<div class="redeem-total">
|
|
|
<span>奖励:</span>
|
|
|
- <span class="app-price">¥{{ redeemData.prize }}</span>
|
|
|
+ <span class="app-price">{{ redeemData.prize }}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
</template>
|
|
|
@@ -162,28 +145,38 @@ export default {
|
|
|
this.redeemVisible = true;
|
|
|
},
|
|
|
confirmRedeemFn() {
|
|
|
- this.$service.invite.give({ id: this.redeemData.is }).then(res => {
|
|
|
+ this.$service.invite.give({ id: this.redeemData.id }).then(res => {
|
|
|
this.$message.success('兑奖成功!');
|
|
|
- this.redeemVisible = true;
|
|
|
+ this.redeemVisible = false;
|
|
|
this.app.refresh({ type: this.tabIndex });
|
|
|
});
|
|
|
},
|
|
|
- // x-crud 组件
|
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
|
ctx.service(this.$service.invite)
|
|
|
.set('table', {
|
|
|
columns: [
|
|
|
+ {
|
|
|
+ prop: 'userName',
|
|
|
+ label: '新客户',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'mobile',
|
|
|
+ label: '新客手机',
|
|
|
+ align: 'center'
|
|
|
+ },
|
|
|
{
|
|
|
prop: 'introUserName',
|
|
|
- label: '邀请人',
|
|
|
+ label: '介绍人',
|
|
|
align: 'center',
|
|
|
'min-width': 100
|
|
|
},
|
|
|
{
|
|
|
- prop: 'mobile',
|
|
|
- label: '邀请人手机',
|
|
|
- align: 'center'
|
|
|
+ prop: 'introMobile',
|
|
|
+ label: '介绍人手机',
|
|
|
+ align: 'center',
|
|
|
+ 'min-width': 100
|
|
|
},
|
|
|
{
|
|
|
prop: 'addTime',
|
|
|
@@ -191,13 +184,13 @@ export default {
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'userName',
|
|
|
- label: '新客户',
|
|
|
+ prop: 'orderTime',
|
|
|
+ label: '下单时间',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|
|
|
- prop: 'orderTime',
|
|
|
- label: '下单时间',
|
|
|
+ prop: 'giveTime',
|
|
|
+ label: '兑奖时间',
|
|
|
align: 'center'
|
|
|
},
|
|
|
{
|