1
This commit is contained in:
@@ -273,7 +273,7 @@
|
||||
</a-table>
|
||||
</a-spin>
|
||||
</a-card>
|
||||
<a-card title="续费订单" class="order-card">
|
||||
<a-card title="缴费记录" class="order-card">
|
||||
<a-spin :spinning="loading">
|
||||
<a-table
|
||||
:data-source="renewOrderList"
|
||||
@@ -368,7 +368,7 @@
|
||||
import * as EquipmentApi from '@/api/apps/equipment';
|
||||
import * as EquipmentRecordApi from '@/api/apps/equipment/record';
|
||||
import { ColumnItem } from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { listOrder } from '@/api/order';
|
||||
import { listOrder, listOrderPay } from '@/api/order';
|
||||
import { CopyOutlined } from '@ant-design/icons-vue';
|
||||
import { EquipmentRecord } from '@/api/apps/equipment/record/model';
|
||||
|
||||
@@ -501,9 +501,27 @@
|
||||
dataIndex: 'index',
|
||||
key: 'index',
|
||||
customRender: ({ index }) => {
|
||||
return '第' + (index + 1) + '期';
|
||||
console.log({ ...order });
|
||||
|
||||
if(props.data.orderSource == 20) {
|
||||
if(index == 0) {
|
||||
return '首期';
|
||||
}else {
|
||||
return '第' + index + '期';
|
||||
}
|
||||
}else if(props.data.orderSource == 30 || props.data.orderSource == 40) {
|
||||
return '第' + (index + 1) + '期';
|
||||
}else if(props.data.orderSource == 10) {
|
||||
return '一次性购买';
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderNo'
|
||||
},
|
||||
{
|
||||
title: '订单金额',
|
||||
dataIndex: 'orderPrice',
|
||||
@@ -640,13 +658,26 @@
|
||||
|
||||
const getRenewOrder = () => {
|
||||
loading.value = true;
|
||||
listOrder({
|
||||
rentOrderId: order.orderId,
|
||||
payStatus: 20
|
||||
}).then((data) => {
|
||||
renewOrderList.value = data;
|
||||
loading.value = false;
|
||||
});
|
||||
console.log(order);
|
||||
if(order.orderId > 28798) {
|
||||
listOrderPay({
|
||||
rentOrderId: order.orderId,
|
||||
sort: ' create_time asc'
|
||||
}).then((data) => {
|
||||
renewOrderList.value = data;
|
||||
loading.value = false;
|
||||
});
|
||||
}else {
|
||||
listOrder({
|
||||
rentOrderId: order.orderId,
|
||||
payStatus: 20,
|
||||
sort: 'create_time asc',
|
||||
}).then((data) => {
|
||||
renewOrderList.value = data;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const getEquipmentRecordList = () => {
|
||||
@@ -660,8 +691,10 @@
|
||||
|
||||
const expirationDay = (order) => {
|
||||
const setTime = new Date(order.expirationTime);
|
||||
const nowTime = new Date(order.payTime);
|
||||
const nowTime = new Date();
|
||||
const restSec = setTime.getTime() - nowTime.getTime();
|
||||
console.log("计算剩余天数");
|
||||
console.log(restSec);
|
||||
// 剩余天数
|
||||
const day = parseInt(String(restSec / (60 * 60 * 24 * 1000)));
|
||||
if (day < 0) {
|
||||
|
||||
@@ -73,7 +73,7 @@
|
||||
</template>
|
||||
<template v-if="column.key === 'payStatus'">
|
||||
<div class="ele-text-placeholder">
|
||||
付款状态:
|
||||
<!-- 付款状态:-->
|
||||
<a-tag
|
||||
v-if="record.payStatus === 10"
|
||||
@click="onAlipayQuery(record.orderId)"
|
||||
@@ -84,24 +84,27 @@
|
||||
>
|
||||
</div>
|
||||
<div class="ele-text-placeholder">
|
||||
发货状态:
|
||||
<!-- 发货状态:-->
|
||||
<a-tag v-if="record.deliveryStatus === 10">未发货</a-tag>
|
||||
<a-tag v-if="record.deliveryStatus === 20" color="success"
|
||||
>已发货</a-tag
|
||||
>
|
||||
</div>
|
||||
<div class="ele-text-placeholder">
|
||||
收货状态:
|
||||
<!-- 收货状态:-->
|
||||
<a-tag v-if="record.receiptStatus === 10">未收货</a-tag>
|
||||
<a-tag v-if="record.receiptStatus === 20" color="success"
|
||||
>已收货</a-tag
|
||||
>
|
||||
<a-tag v-if="record.receiptStatus === 21" color="purple"
|
||||
>退租中</a-tag
|
||||
>
|
||||
<a-tag v-if="record.receiptStatus === 30" color="error"
|
||||
>已退租</a-tag
|
||||
>
|
||||
</div>
|
||||
<div class="ele-text-placeholder" v-if="record.orderSource != 10">
|
||||
分期状态:
|
||||
<!-- 分期状态:-->
|
||||
<a-tag v-if="record.fenqiStatus == 1" color="success"
|
||||
>已完成</a-tag
|
||||
>
|
||||
@@ -163,6 +166,12 @@
|
||||
<template v-if="column.key === 'nickname'">
|
||||
<User :record="record" />
|
||||
</template>
|
||||
<template v-if="column.key === 'batteryModel'">
|
||||
{{ record.equipmentGoods.batteryModel }}
|
||||
</template>
|
||||
<template v-if="column.key === 'equipmentCode'">
|
||||
{{ record.equipment?.equipmentCode }}
|
||||
</template>
|
||||
<template v-if="column.key === 'createTime'">
|
||||
{{ record.createTime }}
|
||||
</template>
|
||||
@@ -261,8 +270,8 @@
|
||||
},
|
||||
{
|
||||
title: '订单号',
|
||||
dataIndex: 'orderId',
|
||||
key: 'orderId',
|
||||
dataIndex: 'orderNo',
|
||||
key: 'orderNo',
|
||||
sorter: true
|
||||
},
|
||||
{
|
||||
@@ -270,6 +279,16 @@
|
||||
dataIndex: 'goodsId',
|
||||
key: 'goodsId'
|
||||
},
|
||||
{
|
||||
title: '电池型号',
|
||||
dataIndex: 'batteryModel',
|
||||
key: 'batteryModel'
|
||||
},
|
||||
{
|
||||
title: '电池编号',
|
||||
dataIndex: 'equipmentCode',
|
||||
key: 'equipmentCode'
|
||||
},
|
||||
{
|
||||
title: '所属商户',
|
||||
dataIndex: 'merchantName',
|
||||
@@ -419,6 +438,7 @@
|
||||
}
|
||||
where.tenantId = localStorage.getItem('tenantId');
|
||||
where.isRenew = 0;
|
||||
where.isFreeze = 1;
|
||||
return pageOrder({
|
||||
...where,
|
||||
...orders,
|
||||
|
||||
Reference in New Issue
Block a user