feat:订单详情里面,学费记录,期数倒序

This commit is contained in:
yangqingyuan
2024-09-15 18:31:35 +08:00
parent a5c61de2e1
commit cd8588a021
2 changed files with 32 additions and 18 deletions

View File

@@ -80,6 +80,8 @@ export interface Order {
address?: string; address?: string;
//是否申请退租1为申请2为取消 //是否申请退租1为申请2为取消
isRefund?:number; isRefund?:number;
currPeriods?:number;//当前期数
} }
export interface OrderPay { export interface OrderPay {
@@ -113,6 +115,8 @@ export interface OrderPay {
//关联订单(即内部订单) //关联订单(即内部订单)
rentOrderNo?:string; rentOrderNo?:string;
currPeriods?:number;//当前期数
} }

View File

@@ -313,6 +313,16 @@
>续费该设备</a-button> >续费该设备</a-button>
</view> </view>
</template> </template>
<template v-if="column.key === 'currPeriods'">
<view v-if="record.orderSource === 10" >
<span>一次性购买</span>
</view>
<view v-else>
<span>第{{ record.currPeriods }}期</span>
</view>
</template>
</template> </template>
</a-table> </a-table>
@@ -571,24 +581,24 @@ const tableRef2 = ref<InstanceType<typeof EleProTable> | null>(null);
const columns2 = ref<ColumnItem[]>([ const columns2 = ref<ColumnItem[]>([
{ {
title: '当前期数', title: '当前期数',
dataIndex: 'index', dataIndex: 'currPeriods',
key: 'index', key: 'currPeriods'
customRender: ({index}) => { // customRender: ({currPeriods}) => {
console.log({...order}); // console.log({...order});
//
if (props.data.orderSource == 20) { // if (props.data.orderSource == 20) {
if (index == 0) { // if (currPeriods == 0) {
return '首期'; // return '首期';
} else { // } else {
return '第' + index + '期'; // return '第' + currPeriods + '期';
} // }
} else if (props.data.orderSource == 30 || props.data.orderSource == 40) { // } else if (props.data.orderSource == 30 || props.data.orderSource == 40) {
return '第' + (index + 1) + '期'; // return '第' + (currPeriods + 1) + '期';
} else if (props.data.orderSource == 10) { // } else if (props.data.orderSource == 10) {
return '一次性购买'; // return '一次性购买';
} // }
//
} // }
}, },
{ {
title: '订单号', title: '订单号',