身份证核验
This commit is contained in:
@@ -70,6 +70,12 @@ export interface Order {
|
||||
emergentUser: string;
|
||||
officeAddress: string;
|
||||
homeAddress: string;
|
||||
// 真名
|
||||
realName?: string;
|
||||
// 身份证
|
||||
idCode?: string;
|
||||
// 身份证地址
|
||||
address?: string;
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -212,18 +212,22 @@
|
||||
<a-tag
|
||||
v-if="Number(record.equipmentCategory) === 10"
|
||||
color="success"
|
||||
>销售</a-tag
|
||||
>销售
|
||||
</a-tag
|
||||
>
|
||||
<a-tag v-if="Number(record.equipmentCategory) === 20" color="red"
|
||||
>分期</a-tag
|
||||
>分期
|
||||
</a-tag
|
||||
>
|
||||
<a-tag
|
||||
v-if="Number(record.equipmentCategory) === 30"
|
||||
color="orange"
|
||||
>以租代购</a-tag
|
||||
>以租代购
|
||||
</a-tag
|
||||
>
|
||||
<a-tag v-if="Number(record.equipmentCategory) === 40" color="blue"
|
||||
>租赁</a-tag
|
||||
>租赁
|
||||
</a-tag
|
||||
>
|
||||
</template>
|
||||
<template v-if="column.key === 'more'">
|
||||
@@ -254,17 +258,15 @@
|
||||
</a-card>
|
||||
<a-card title="换电记录" class="order-card">
|
||||
<a-spin :spinning="loading">
|
||||
<ele-pro-table
|
||||
:datasource="equipmentRecordList"
|
||||
<a-table
|
||||
:data-source="equipmentRecordList"
|
||||
:columns="columns3"
|
||||
row-key="id"
|
||||
ref="tableRef3"
|
||||
size="small"
|
||||
:toolkit="[]"
|
||||
:pagination="false"
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'batteryModel'">
|
||||
<div>电池租金:¥{{ record.batteryRent }}</div>
|
||||
<div>电池租金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池押金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池保险:¥{{ record.batteryInsurance }}</div>
|
||||
</template>
|
||||
@@ -272,7 +274,7 @@
|
||||
<span class="ele-text-danger">{{ expirationDay(record) }}</span>
|
||||
</template>
|
||||
</template>
|
||||
</ele-pro-table>
|
||||
</a-table>
|
||||
</a-spin>
|
||||
</a-card>
|
||||
<a-card title="缴费记录" class="order-card">
|
||||
@@ -285,7 +287,7 @@
|
||||
>
|
||||
<template #bodyCell="{ column, record }">
|
||||
<template v-if="column.key === 'batteryModel'">
|
||||
<div>电池租金:¥{{ record.batteryRent }}</div>
|
||||
<div>电池租金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池押金:¥{{ record.batteryDeposit }}</div>
|
||||
<div>电池保险:¥{{ record.batteryInsurance }}</div>
|
||||
</template>
|
||||
@@ -304,7 +306,6 @@
|
||||
<a-spin :spinning="loading">
|
||||
<ele-image-upload
|
||||
v-model:value="files"
|
||||
da
|
||||
disabled
|
||||
:item-style="{ width: '150px', height: '99px' }"
|
||||
/>
|
||||
@@ -321,7 +322,7 @@
|
||||
>
|
||||
<a-form-item label="收货人姓名" name="orderNo">
|
||||
<router-link :to="'/system/user/details?id=' + data.userId">
|
||||
<span class="ele-text-primary">{{ data.nickname }}</span>
|
||||
<span class="ele-text-primary">{{ data.realName }}</span>
|
||||
</router-link>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
@@ -332,22 +333,7 @@
|
||||
: { span: 8 }
|
||||
"
|
||||
>
|
||||
<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-form-item label="联系电话" name="phone"/>
|
||||
</a-col>
|
||||
<a-col
|
||||
v-bind="
|
||||
@@ -356,9 +342,7 @@
|
||||
: { span: 8 }
|
||||
"
|
||||
>
|
||||
<a-form-item label="单位地址" name="officeAddress">
|
||||
<span>{{ data.officeAddress }}</span>
|
||||
</a-form-item>
|
||||
<a-form-item label="身份证号" name="idCode"/>
|
||||
</a-col>
|
||||
<a-col
|
||||
v-bind="
|
||||
@@ -367,9 +351,7 @@
|
||||
: { span: 8 }
|
||||
"
|
||||
>
|
||||
<a-form-item label="家庭地址" name="homeAddress">
|
||||
<span>{{ data.homeAddress }}</span>
|
||||
</a-form-item>
|
||||
<a-form-item label="详细地址" name="address"/>
|
||||
</a-col>
|
||||
</a-row>
|
||||
</a-card>
|
||||
@@ -385,14 +367,11 @@
|
||||
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';
|
||||
@@ -421,7 +400,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[]>();
|
||||
|
||||
@@ -554,7 +533,7 @@
|
||||
customRender: ({text}) => '¥' + text
|
||||
},
|
||||
{
|
||||
title: '设备型号',
|
||||
title: '设备租金',
|
||||
dataIndex: 'batteryModel',
|
||||
key: 'batteryModel'
|
||||
},
|
||||
@@ -568,21 +547,6 @@
|
||||
dataIndex: 'payTime',
|
||||
key: 'payTime'
|
||||
},
|
||||
{
|
||||
title: '电池租金',
|
||||
dataIndex: 'batteryRent',
|
||||
key: 'batteryRent'
|
||||
},
|
||||
{
|
||||
title: '电池押金',
|
||||
dataIndex: 'batteryDeposit',
|
||||
key: 'batteryDeposit'
|
||||
},
|
||||
{
|
||||
title: '电池保险',
|
||||
dataIndex: 'batteryInsurance',
|
||||
key: 'batteryInsurance'
|
||||
},
|
||||
{
|
||||
title: '逾期状态',
|
||||
dataIndex: 'expirationDay',
|
||||
@@ -720,34 +684,21 @@
|
||||
|
||||
};
|
||||
|
||||
/* const getEquipmentRecordList: DatasourceFunction = () => {
|
||||
return EquipmentRecordApi.pageEquipmentRecord({
|
||||
const getEquipmentRecordList = () => {
|
||||
EquipmentRecordApi.listEquipmentRecord({
|
||||
orderId: order.orderId,
|
||||
userId: order.userId,
|
||||
limit: 5
|
||||
userId: order.userId
|
||||
}).then((data) => {
|
||||
equipmentRecordList.value = data;
|
||||
});
|
||||
}; */
|
||||
|
||||
// 表格实例
|
||||
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) {
|
||||
@@ -769,7 +720,8 @@
|
||||
};
|
||||
|
||||
/* 保存编辑 */
|
||||
const save = () => {};
|
||||
const save = () => {
|
||||
};
|
||||
|
||||
watch(
|
||||
() => props.visible,
|
||||
@@ -783,7 +735,7 @@
|
||||
getEquipmentOrderGoods();
|
||||
getRenewOrder();
|
||||
getEquipment();
|
||||
// getEquipmentRecordList();
|
||||
getEquipmentRecordList();
|
||||
}
|
||||
} else {
|
||||
resetFields();
|
||||
@@ -795,6 +747,7 @@
|
||||
.order-card {
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.ant-form-item {
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user