身份证核验
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -63,7 +63,7 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<a-form-item label="支付方式" name="payMethod">
|
<a-form-item label="支付方式" name="payMethod">
|
||||||
<Tag dict-code="payMethod" v-model:value="data.payMethod" />
|
<Tag dict-code="payMethod" v-model:value="data.payMethod"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col
|
<a-col
|
||||||
@@ -74,7 +74,7 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<a-form-item label="配送方式" name="deliveryType">
|
<a-form-item label="配送方式" name="deliveryType">
|
||||||
<Tag dict-code="deliveryType" v-model:value="data.deliveryType" />
|
<Tag dict-code="deliveryType" v-model:value="data.deliveryType"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col
|
<a-col
|
||||||
@@ -96,7 +96,7 @@
|
|||||||
"
|
"
|
||||||
>
|
>
|
||||||
<a-form-item label="订单状态" name="orderStatus">
|
<a-form-item label="订单状态" name="orderStatus">
|
||||||
<Tag dict-code="orderStatus" v-model:value="data.orderStatus" />
|
<Tag dict-code="orderStatus" v-model:value="data.orderStatus"/>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
</a-col>
|
</a-col>
|
||||||
<a-col
|
<a-col
|
||||||
@@ -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,13 +287,13 @@
|
|||||||
>
|
>
|
||||||
<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>
|
||||||
<template v-if="column.key === 'expirationTime'">
|
<template v-if="column.key === 'expirationTime'">
|
||||||
<div>{{ record.startTime }}</div>
|
<div>{{ record.startTime }}</div>
|
||||||
<div>{{ record.expirationTime}}</div>
|
<div>{{ record.expirationTime }}</div>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'expirationDay'">
|
<template v-if="column.key === 'expirationDay'">
|
||||||
<span class="ele-text-danger">{{ expirationDay(record) }}</span>
|
<span class="ele-text-danger">{{ expirationDay(record) }}</span>
|
||||||
@@ -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>
|
||||||
@@ -377,56 +359,53 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup>
|
<script lang="ts" setup>
|
||||||
import { ref, reactive, watch } from 'vue';
|
import {ref, reactive, watch} from 'vue';
|
||||||
import { Form } from 'ant-design-vue';
|
import {Form} from 'ant-design-vue';
|
||||||
import { assignObject, EleProTable, timeAgo } from 'ele-admin-pro';
|
import {assignObject, EleProTable, timeAgo} from 'ele-admin-pro';
|
||||||
import { useThemeStore } from '@/store/modules/theme';
|
import {useThemeStore} from '@/store/modules/theme';
|
||||||
import { formatNumber } from 'ele-admin-pro/es';
|
import {formatNumber} from 'ele-admin-pro/es';
|
||||||
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 {
|
import {listEquipmentOrderGoods} from '@/api/apps/equipment/order/goods';
|
||||||
DatasourceFunction,
|
import {EquipmentOrderGoods} from '@/api/apps/equipment/order/goods/model';
|
||||||
ColumnItem
|
import * as EquipmentApi from '@/api/apps/equipment';
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
import * as EquipmentRecordApi from '@/api/apps/equipment/record';
|
||||||
import { listEquipmentOrderGoods } from '@/api/apps/equipment/order/goods';
|
import {ColumnItem} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import { EquipmentOrderGoods } from '@/api/apps/equipment/order/goods/model';
|
import {listOrder, listOrderPay} from '@/api/order';
|
||||||
import * as EquipmentApi from '@/api/apps/equipment';
|
import {CopyOutlined} from '@ant-design/icons-vue';
|
||||||
import * as EquipmentRecordApi from '@/api/apps/equipment/record';
|
import {EquipmentRecord} from '@/api/apps/equipment/record/model';
|
||||||
import { listOrder, listOrderPay } from '@/api/order';
|
|
||||||
import { CopyOutlined } from '@ant-design/icons-vue';
|
|
||||||
import { EquipmentRecord } from '@/api/apps/equipment/record/model';
|
|
||||||
|
|
||||||
const useForm = Form.useForm;
|
const useForm = Form.useForm;
|
||||||
// 是否开启响应式布局
|
// 是否开启响应式布局
|
||||||
const themeStore = useThemeStore();
|
const themeStore = useThemeStore();
|
||||||
const { styleResponsive } = storeToRefs(themeStore);
|
const {styleResponsive} = storeToRefs(themeStore);
|
||||||
|
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
// 弹窗是否打开
|
// 弹窗是否打开
|
||||||
visible: boolean;
|
visible: boolean;
|
||||||
// 修改回显的数据
|
// 修改回显的数据
|
||||||
data?: Order | null;
|
data?: Order | null;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
export interface step {
|
export interface step {
|
||||||
title?: String | undefined;
|
title?: String | undefined;
|
||||||
subTitle?: String | undefined;
|
subTitle?: String | undefined;
|
||||||
description?: String | undefined;
|
description?: String | undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
// 是否是修改
|
// 是否是修改
|
||||||
const isUpdate = ref(false);
|
const isUpdate = ref(false);
|
||||||
// 是否显示最大化切换按钮
|
// 是否显示最大化切换按钮
|
||||||
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[]>();
|
||||||
|
|
||||||
// 步骤条
|
// 步骤条
|
||||||
const steps = ref<step[]>([
|
const steps = ref<step[]>([
|
||||||
{
|
{
|
||||||
title: '下单',
|
title: '下单',
|
||||||
description: undefined
|
description: undefined
|
||||||
@@ -447,33 +426,33 @@
|
|||||||
title: '完成',
|
title: '完成',
|
||||||
description: undefined
|
description: undefined
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
const active = ref(2);
|
const active = ref(2);
|
||||||
|
|
||||||
const emit = defineEmits<{
|
const emit = defineEmits<{
|
||||||
(e: 'done'): void;
|
(e: 'done'): void;
|
||||||
(e: 'update:visible', visible: boolean): void;
|
(e: 'update:visible', visible: boolean): void;
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 订单信息
|
// 订单信息
|
||||||
const order = reactive<Order>({
|
const order = reactive<Order>({
|
||||||
orderId: undefined,
|
orderId: undefined,
|
||||||
orderNo: '',
|
orderNo: '',
|
||||||
userId: undefined,
|
userId: undefined,
|
||||||
orderSourceData: ''
|
orderSourceData: ''
|
||||||
});
|
});
|
||||||
|
|
||||||
// 请求状态
|
// 请求状态
|
||||||
const loading = ref(true);
|
const loading = ref(true);
|
||||||
|
|
||||||
const { resetFields } = useForm(order);
|
const {resetFields} = useForm(order);
|
||||||
|
|
||||||
/* 更新visible */
|
/* 更新visible */
|
||||||
const updateVisible = (value: boolean) => {
|
const updateVisible = (value: boolean) => {
|
||||||
emit('update:visible', value);
|
emit('update:visible', value);
|
||||||
};
|
};
|
||||||
|
|
||||||
const columns = ref<ColumnItem[]>([
|
const columns = ref<ColumnItem[]>([
|
||||||
// {
|
// {
|
||||||
// title: '商品ID',
|
// title: '商品ID',
|
||||||
// dataIndex: 'goodsId'
|
// dataIndex: 'goodsId'
|
||||||
@@ -497,13 +476,13 @@
|
|||||||
title: '电池价格',
|
title: '电池价格',
|
||||||
dataIndex: 'batteryPrice',
|
dataIndex: 'batteryPrice',
|
||||||
key: 'batteryPrice',
|
key: 'batteryPrice',
|
||||||
customRender: ({ text }) => '¥' + text
|
customRender: ({text}) => '¥' + text
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '电池租金',
|
title: '电池租金',
|
||||||
dataIndex: 'batteryRent',
|
dataIndex: 'batteryRent',
|
||||||
key: 'batteryRent',
|
key: 'batteryRent',
|
||||||
customRender: ({ text }) => '¥' + text
|
customRender: ({text}) => '¥' + text
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '分期方案',
|
title: '分期方案',
|
||||||
@@ -516,27 +495,27 @@
|
|||||||
key: 'num',
|
key: 'num',
|
||||||
customRender: ({}) => 1
|
customRender: ({}) => 1
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
// 表格实例
|
// 表格实例
|
||||||
const tableRef2 = ref<InstanceType<typeof EleProTable> | null>(null);
|
const tableRef2 = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||||
const columns2 = ref<ColumnItem[]>([
|
const columns2 = ref<ColumnItem[]>([
|
||||||
{
|
{
|
||||||
title: '当前期数',
|
title: '当前期数',
|
||||||
dataIndex: 'index',
|
dataIndex: 'index',
|
||||||
key: 'index',
|
key: 'index',
|
||||||
customRender: ({ index }) => {
|
customRender: ({index}) => {
|
||||||
console.log({ ...order });
|
console.log({...order});
|
||||||
|
|
||||||
if(props.data.orderSource == 20) {
|
if (props.data.orderSource == 20) {
|
||||||
if(index == 0) {
|
if (index == 0) {
|
||||||
return '首期';
|
return '首期';
|
||||||
}else {
|
} else {
|
||||||
return '第' + index + '期';
|
return '第' + index + '期';
|
||||||
}
|
}
|
||||||
}else if(props.data.orderSource == 30 || props.data.orderSource == 40) {
|
} else if (props.data.orderSource == 30 || props.data.orderSource == 40) {
|
||||||
return '第' + (index + 1) + '期';
|
return '第' + (index + 1) + '期';
|
||||||
}else if(props.data.orderSource == 10) {
|
} else if (props.data.orderSource == 10) {
|
||||||
return '一次性购买';
|
return '一次性购买';
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -551,10 +530,10 @@
|
|||||||
title: '订单金额',
|
title: '订单金额',
|
||||||
dataIndex: 'orderPrice',
|
dataIndex: 'orderPrice',
|
||||||
key: 'orderPrice',
|
key: 'orderPrice',
|
||||||
customRender: ({ text }) => '¥' + text
|
customRender: ({text}) => '¥' + text
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '设备型号',
|
title: '设备租金',
|
||||||
dataIndex: 'batteryModel',
|
dataIndex: 'batteryModel',
|
||||||
key: 'batteryModel'
|
key: 'batteryModel'
|
||||||
},
|
},
|
||||||
@@ -568,28 +547,13 @@
|
|||||||
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',
|
||||||
key: 'expirationDay'
|
key: 'expirationDay'
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
const columns3 = ref<ColumnItem[]>([
|
const columns3 = ref<ColumnItem[]>([
|
||||||
{
|
{
|
||||||
title: '设备编号',
|
title: '设备编号',
|
||||||
dataIndex: 'equipmentCode',
|
dataIndex: 'equipmentCode',
|
||||||
@@ -619,10 +583,10 @@
|
|||||||
dataIndex: 'createTime',
|
dataIndex: 'createTime',
|
||||||
key: 'createTime'
|
key: 'createTime'
|
||||||
}
|
}
|
||||||
]);
|
]);
|
||||||
|
|
||||||
/* 制作步骤条 */
|
/* 制作步骤条 */
|
||||||
const loadSteps = (order) => {
|
const loadSteps = (order) => {
|
||||||
steps.value = [];
|
steps.value = [];
|
||||||
steps.value.push({
|
steps.value.push({
|
||||||
title: '下单'
|
title: '下单'
|
||||||
@@ -678,28 +642,28 @@
|
|||||||
if (order.orderStatus == 20) {
|
if (order.orderStatus == 20) {
|
||||||
active.value = 4;
|
active.value = 4;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getEquipmentOrderGoods = () => {
|
const getEquipmentOrderGoods = () => {
|
||||||
const orderId = props.data?.orderId;
|
const orderId = props.data?.orderId;
|
||||||
const goodsId = props.data?.goodsId;
|
const goodsId = props.data?.goodsId;
|
||||||
listEquipmentOrderGoods({ orderId,goodsId }).then((data) => {
|
listEquipmentOrderGoods({orderId, goodsId}).then((data) => {
|
||||||
EquipmentOrderGoodsList.value = data;
|
EquipmentOrderGoodsList.value = data;
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const getEquipment = () => {
|
const getEquipment = () => {
|
||||||
EquipmentApi.listEquipment({ orderId: order.orderId }).then((data) => {
|
EquipmentApi.listEquipment({orderId: order.orderId}).then((data) => {
|
||||||
if (data.length > 0) {
|
if (data.length > 0) {
|
||||||
bindEquipmentCode.value = data[0].equipmentCode;
|
bindEquipmentCode.value = data[0].equipmentCode;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const getRenewOrder = () => {
|
const getRenewOrder = () => {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
console.log(order);
|
console.log(order);
|
||||||
if(order.orderId > 28798) {
|
if (order.orderId > 28798) {
|
||||||
listOrderPay({
|
listOrderPay({
|
||||||
rentOrderId: order.orderId,
|
rentOrderId: order.orderId,
|
||||||
sort: ' create_time asc'
|
sort: ' create_time asc'
|
||||||
@@ -707,7 +671,7 @@
|
|||||||
renewOrderList.value = data;
|
renewOrderList.value = data;
|
||||||
loading.value = false;
|
loading.value = false;
|
||||||
});
|
});
|
||||||
}else {
|
} else {
|
||||||
listOrder({
|
listOrder({
|
||||||
rentOrderId: order.orderId,
|
rentOrderId: order.orderId,
|
||||||
payStatus: 20,
|
payStatus: 20,
|
||||||
@@ -718,44 +682,31 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 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 expirationDay = (order) => {
|
||||||
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 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) {
|
||||||
return '逾期' + Math.abs(day) + '天';
|
return '逾期' + Math.abs(day) + '天';
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getFiles = () => {
|
const getFiles = () => {
|
||||||
if (order.orderSourceData != '') {
|
if (order.orderSourceData != '') {
|
||||||
const array = JSON.parse(<string>order.orderSourceData);
|
const array = JSON.parse(<string>order.orderSourceData);
|
||||||
files.value = array.map((url, id) => {
|
files.value = array.map((url, id) => {
|
||||||
@@ -766,12 +717,13 @@
|
|||||||
};
|
};
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
/* 保存编辑 */
|
/* 保存编辑 */
|
||||||
const save = () => {};
|
const save = () => {
|
||||||
|
};
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
() => props.visible,
|
() => props.visible,
|
||||||
(visible) => {
|
(visible) => {
|
||||||
if (visible) {
|
if (visible) {
|
||||||
@@ -783,19 +735,20 @@
|
|||||||
getEquipmentOrderGoods();
|
getEquipmentOrderGoods();
|
||||||
getRenewOrder();
|
getRenewOrder();
|
||||||
getEquipment();
|
getEquipment();
|
||||||
// getEquipmentRecordList();
|
getEquipmentRecordList();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resetFields();
|
resetFields();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
</script>
|
</script>
|
||||||
<style lang="less" scoped>
|
<style lang="less" scoped>
|
||||||
.order-card {
|
.order-card {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 20px;
|
||||||
}
|
}
|
||||||
.ant-form-item {
|
|
||||||
|
.ant-form-item {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user