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