|
|
@@ -1,6 +1,51 @@
|
|
|
<template>
|
|
|
<div class="app-list-content">
|
|
|
- <x-crud class="liu-crud-wrap" @load="onLoad"> </x-crud>
|
|
|
+ <x-crud class="liu-crud-wrap" @load="onLoad">
|
|
|
+
|
|
|
+ <template #table-column-beforeDeadline="{ scope }">
|
|
|
+ <span v-if="scope.row.status == 0">-</span>
|
|
|
+ <span v-else>
|
|
|
+ <span v-if="scope.row.beforeDeadline == '0000-00-00 00:00:00'">-</span>
|
|
|
+ <span v-else>{{ scope.row.beforeDeadline ? scope.row.beforeDeadline.substr(0,16):'' }}</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-deadline="{ scope }">
|
|
|
+ <span v-if="scope.row.status == 0">-</span>
|
|
|
+ <span v-else>
|
|
|
+ <span v-if="scope.row.deadline == '0000-00-00 00:00:00'">-</span>
|
|
|
+ <span v-else>{{ scope.row.deadline ? scope.row.deadline.substr(0,16):'' }}</span>
|
|
|
+ </span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-addTime="{ scope }">
|
|
|
+ <span v-if="scope.row.addTime == '0000-00-00 00:00:00'">-</span>
|
|
|
+ <span v-else>{{ scope.row.addTime ? scope.row.addTime.substr(0,16):'' }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-payTime="{ scope }">
|
|
|
+ <span v-if="scope.row.payTime == '0000-00-00 00:00:00'">-</span>
|
|
|
+ <span v-else>{{ scope.row.payTime ? scope.row.payTime.substr(0,16):'' }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #table-column-status="{ scope }">
|
|
|
+ <span v-if="scope.row.status == 0">待续期</span>
|
|
|
+ <span v-else style="color:#3385FF;">已续期</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #slot-total-amount>
|
|
|
+ <span style="font-size:15px;font-weight:bold;">累计续费:{{ totalAmount }}</span>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ <template #slot-cp-classStyle="{scope}">
|
|
|
+ <el-radio-group v-model="status" @change="renewShop" style="margin-right:20px;padding-top:6px;margin-left:20px;">
|
|
|
+ <el-radio label="-1">全部</el-radio>
|
|
|
+ <el-radio label="0">待续期</el-radio>
|
|
|
+ <el-radio label="1">已续期</el-radio>
|
|
|
+ </el-radio-group>
|
|
|
+ </template>
|
|
|
+
|
|
|
+ </x-crud>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
@@ -8,90 +53,132 @@
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
- // x-crud
|
|
|
- app: null
|
|
|
+ app: null,
|
|
|
+ status:'-1',
|
|
|
+ totalAmount:0
|
|
|
};
|
|
|
},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
- // crud
|
|
|
+ renewShop(e){
|
|
|
+ this.status = e
|
|
|
+ this.app.refresh({ status:this.status })
|
|
|
+ },
|
|
|
onLoad({ ctx, app }) {
|
|
|
this.app = app;
|
|
|
- let applyHost = () => {
|
|
|
- return this.$service.saasShop.buyList();
|
|
|
- };
|
|
|
- ctx.service({
|
|
|
- page: applyHost
|
|
|
- })
|
|
|
+ ctx.service(this.$service.renew)
|
|
|
.set('table', {
|
|
|
columns: [
|
|
|
{
|
|
|
prop: 'id',
|
|
|
label: 'ID',
|
|
|
- align: 'center'
|
|
|
+ align: 'center',
|
|
|
+ width: 90,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'orderSn',
|
|
|
+ label: '编号',
|
|
|
+ align: 'center',
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'payWay',
|
|
|
+ label: '支付方式',
|
|
|
+ align: 'center',
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'shopAdminName',
|
|
|
+ label: '付款人',
|
|
|
+ align: 'center',
|
|
|
+ width: 100,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'sjName',
|
|
|
+ label: '商家',
|
|
|
+ align: 'center',
|
|
|
+ width: 130,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'shopName',
|
|
|
+ label: '门店',
|
|
|
+ align: 'center',
|
|
|
+ width: 80,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'name',
|
|
|
- label: '花店名称',
|
|
|
- align: 'center'
|
|
|
+ prop: 'pfLevel',
|
|
|
+ label: '等级',
|
|
|
+ align: 'center',
|
|
|
+ width: 80,
|
|
|
+ },
|
|
|
+ {
|
|
|
+ prop: 'actPrice',
|
|
|
+ label: '金额',
|
|
|
+ align: 'center',
|
|
|
+ emptyText: '',
|
|
|
+ width: 100,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'userName',
|
|
|
- label: '店长',
|
|
|
- align: 'center'
|
|
|
+ prop: 'year',
|
|
|
+ label: '年数',
|
|
|
+ align: 'center',
|
|
|
+ emptyText: '',
|
|
|
+ width: 60,
|
|
|
},
|
|
|
{
|
|
|
- prop: 'mobile',
|
|
|
- label: '手机号',
|
|
|
- align: 'center'
|
|
|
+ prop: 'payTime',
|
|
|
+ label: '支付时间',
|
|
|
+ align: 'center',
|
|
|
+ emptyText: ''
|
|
|
},
|
|
|
{
|
|
|
- prop: 'prePrice',
|
|
|
- label: '付款金额',
|
|
|
+ prop: 'status',
|
|
|
+ label: '状态',
|
|
|
align: 'center',
|
|
|
- emptyText: '无'
|
|
|
+ emptyText: ''
|
|
|
},
|
|
|
{
|
|
|
- prop: 'createTime',
|
|
|
- label: '付款时间',
|
|
|
+ prop: 'beforeDeadline',
|
|
|
+ label: '续期前',
|
|
|
align: 'center',
|
|
|
- emptyText: '无'
|
|
|
+ emptyText: ''
|
|
|
},
|
|
|
{
|
|
|
- prop: 'updateTime',
|
|
|
- label: '到期时间',
|
|
|
+ prop: 'deadline',
|
|
|
+ label: '续期后',
|
|
|
align: 'center',
|
|
|
- emptyText: '无'
|
|
|
+ emptyText: ''
|
|
|
},
|
|
|
{
|
|
|
- prop: 'setName',
|
|
|
- label: '套餐',
|
|
|
+ prop: 'addTime',
|
|
|
+ label: '创建时间',
|
|
|
align: 'center',
|
|
|
- emptyText: '无'
|
|
|
- }
|
|
|
+ emptyText: ''
|
|
|
+ },
|
|
|
],
|
|
|
- // 操作列
|
|
|
op: {
|
|
|
- visible: false, // 是否显示
|
|
|
- // 同 element-ui Table-column Attributes
|
|
|
+ visible: true,
|
|
|
props: {
|
|
|
- width: 150,
|
|
|
+ width: 100,
|
|
|
align: 'center',
|
|
|
fixed: 'right',
|
|
|
label: '操作'
|
|
|
},
|
|
|
- // 布局,请移步 `layout`
|
|
|
layout: []
|
|
|
}
|
|
|
})
|
|
|
.set('layout', [
|
|
|
['slot-tabs'],
|
|
|
- ['flex1', 'refresh-btn'],
|
|
|
+ ['slot-cp-classStyle','flex1', 'refresh-btn'],
|
|
|
['data-table'],
|
|
|
- ['flex1', 'pagination']
|
|
|
+ ['slot-total-amount','flex1', 'pagination']
|
|
|
])
|
|
|
+ .on('refresh', async (params, { next }) => {
|
|
|
+ let res = await next(params)
|
|
|
+ this.totalAmount = res.totalAmount?res.totalAmount:0
|
|
|
+ })
|
|
|
.done();
|
|
|
- app.refresh();
|
|
|
+ app.refresh({ status:this.status })
|
|
|
}
|
|
|
}
|
|
|
};
|