修改退款审核、订单详情等页面显示
This commit is contained in:
@@ -254,15 +254,17 @@
|
||||
</a-card>
|
||||
<a-card title="换电记录" class="order-card">
|
||||
<a-spin :spinning="loading">
|
||||
<a-table
|
||||
:data-source="equipmentRecordList"
|
||||
<ele-pro-table
|
||||
:datasource="equipmentRecordList"
|
||||
:columns="columns3"
|
||||
row-key="id"
|
||||
ref="tableRef3"
|
||||
:pagination="false"
|
||||
size="small"
|
||||
:toolkit="[]"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'batteryModel'">
|
||||
<div>电池租金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池租金:¥{{ record.batteryRent }}</div>
|
||||
<div>电池押金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池保险:¥{{ record.batteryInsurance }}</div>
|
||||
</template>
|
||||
@@ -270,7 +272,7 @@
|
||||
<span class="ele-text-danger">{{ expirationDay(record) }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</a-table>
|
||||
</ele-pro-table>
|
||||
</a-spin>
|
||||
</a-card>
|
||||
<a-card title="缴费记录" class="order-card">
|
||||
@@ -283,7 +285,7 @@
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'batteryModel'">
|
||||
<div>电池租金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池租金:¥{{ record.batteryRent }}</div>
|
||||
<div>电池押金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池保险:¥{{ record.batteryInsurance }}</div>
|
||||
</template>
|
||||
@@ -302,6 +304,7 @@
|
||||
<a-spin :spinning="loading">
|
||||
<ele-image-upload
|
||||
v-model:value="files"
|
||||
da
|
||||
disabled
|
||||
:item-style="{ width: '150px', height: '99px' }"
|
||||
/>
|
||||
@@ -329,7 +332,22 @@
|
||||
: { span: 8 }
|
||||
"
|
||||
>
|
||||
<a-form-item label="联系电话" name="payPrice" />
|
||||
<a-form-item label="联系电话" name="receiptPhone">
|
||||
<span>{{ data.receiptPhone }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
<a-row :gutter="16">
|
||||
<a-col
|
||||
v-bind="
|
||||
styleResponsive
|
||||
? { xl: 8, lg: 12, md: 12, sm: 24, xs: 24 }
|
||||
: { span: 8 }
|
||||
"
|
||||
>
|
||||
<a-form-item label="紧急联系人" name="emergentUser">
|
||||
<span>{{ data.emergentUser }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
v-bind="
|
||||
@@ -338,7 +356,9 @@
|
||||
: { span: 8 }
|
||||
"
|
||||
>
|
||||
<a-form-item label="所在地区" name="payMethod" />
|
||||
<a-form-item label="单位地址" name="officeAddress">
|
||||
<span>{{ data.officeAddress }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col
|
||||
v-bind="
|
||||
@@ -347,7 +367,9 @@
|
||||
: { span: 8 }
|
||||
"
|
||||
>
|
||||
<a-form-item label="详细地址" name="payMethod" />
|
||||
<a-form-item label="家庭地址" name="homeAddress">
|
||||
<span>{{ data.homeAddress }}</span>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
@@ -363,11 +385,14 @@
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { copyText } from '@/utils/common';
|
||||
import { Order } from '@/api/order/model';
|
||||
import type {
|
||||
DatasourceFunction,
|
||||
ColumnItem
|
||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||
import { listEquipmentOrderGoods } from '@/api/apps/equipment/order/goods';
|
||||
import { EquipmentOrderGoods } from '@/api/apps/equipment/order/goods/model';
|
||||
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, listOrderPay } from '@/api/order';
|
||||
import { CopyOutlined } from '@ant-design/icons-vue';
|
||||
import { EquipmentRecord } from '@/api/apps/equipment/record/model';
|
||||
@@ -396,7 +421,7 @@
|
||||
const maxAble = ref(true);
|
||||
const EquipmentOrderGoodsList = ref<EquipmentOrderGoods[]>([]);
|
||||
const renewOrderList = ref<Order[]>([]);
|
||||
const equipmentRecordList = ref<EquipmentRecord[]>([]);
|
||||
// const equipmentRecordList = ref<EquipmentRecord[]>([]);
|
||||
const bindEquipmentCode = ref<string>();
|
||||
const files = ref<any[]>();
|
||||
|
||||
@@ -490,6 +515,26 @@
|
||||
dataIndex: 'num',
|
||||
key: 'num',
|
||||
customRender: ({}) => 1
|
||||
},
|
||||
{
|
||||
title: '收货人手机号',
|
||||
key: 'receiptPhone',
|
||||
dataIndex: 'receiptPhone'
|
||||
},
|
||||
{
|
||||
title: '紧急联系人',
|
||||
key: 'emergentUser',
|
||||
dataIndex: 'emergentUser'
|
||||
},
|
||||
{
|
||||
title: '单位地址',
|
||||
key: 'officeAddress',
|
||||
dataIndex: 'officeAddress'
|
||||
},
|
||||
{
|
||||
title: '家庭地址',
|
||||
key: 'homeAddress',
|
||||
dataIndex: 'homeAddress'
|
||||
}
|
||||
]);
|
||||
|
||||
@@ -529,7 +574,7 @@
|
||||
customRender: ({ text }) => '¥' + text
|
||||
},
|
||||
{
|
||||
title: '设备租金',
|
||||
title: '设备型号',
|
||||
dataIndex: 'batteryModel',
|
||||
key: 'batteryModel'
|
||||
},
|
||||
@@ -543,6 +588,21 @@
|
||||
dataIndex: 'payTime',
|
||||
key: 'payTime'
|
||||
},
|
||||
{
|
||||
title: '电池租金',
|
||||
dataIndex: 'batteryRent',
|
||||
key: 'batteryRent'
|
||||
},
|
||||
{
|
||||
title: '电池押金',
|
||||
dataIndex: 'batteryDeposit',
|
||||
key: 'batteryDeposit'
|
||||
},
|
||||
{
|
||||
title: '电池保险',
|
||||
dataIndex: 'batteryInsurance',
|
||||
key: 'batteryInsurance'
|
||||
},
|
||||
{
|
||||
title: '逾期状态',
|
||||
dataIndex: 'expirationDay',
|
||||
@@ -680,21 +740,34 @@
|
||||
|
||||
};
|
||||
|
||||
const getEquipmentRecordList = () => {
|
||||
EquipmentRecordApi.listEquipmentRecord({
|
||||
/* const getEquipmentRecordList: DatasourceFunction = () => {
|
||||
return EquipmentRecordApi.pageEquipmentRecord({
|
||||
orderId: order.orderId,
|
||||
userId: order.userId
|
||||
}).then((data) => {
|
||||
equipmentRecordList.value = data;
|
||||
userId: order.userId,
|
||||
limit: 5
|
||||
});
|
||||
}; */
|
||||
|
||||
// 表格实例
|
||||
const tableRef3 = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||
const equipmentRecordList: DatasourceFunction = ({
|
||||
page,
|
||||
limit,
|
||||
where,
|
||||
orders,
|
||||
filters
|
||||
}) => {
|
||||
where.orderId = order.orderId
|
||||
where.userId = order.userId
|
||||
return EquipmentRecordApi.pageEquipmentRecord({ ...where, ...orders, page, limit });
|
||||
};
|
||||
|
||||
const expirationDay = (order) => {
|
||||
const setTime = new Date(order.expirationTime);
|
||||
const nowTime = new Date();
|
||||
const restSec = setTime.getTime() - nowTime.getTime();
|
||||
console.log("计算剩余天数");
|
||||
console.log(restSec);
|
||||
// console.log("计算剩余天数");
|
||||
// console.log(restSec);
|
||||
// 剩余天数
|
||||
const day = parseInt(String(restSec / (60 * 60 * 24 * 1000)));
|
||||
if (day < 0) {
|
||||
@@ -730,7 +803,7 @@
|
||||
getEquipmentOrderGoods();
|
||||
getRenewOrder();
|
||||
getEquipment();
|
||||
getEquipmentRecordList();
|
||||
// getEquipmentRecordList();
|
||||
}
|
||||
} else {
|
||||
resetFields();
|
||||
|
||||
Reference in New Issue
Block a user