fix
This commit is contained in:
@@ -1,7 +1,7 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<a-page-header :ghost="false" title="设备管理">
|
<a-page-header :ghost="false" title="设备管理">
|
||||||
<div class="ele-text-secondary"> 设备管理,云芯威电池管理定制模块。 </div>
|
<div class="ele-text-secondary"> 设备管理,云芯威电池管理定制模块2。 </div>
|
||||||
</a-page-header>
|
</a-page-header>
|
||||||
<div class="ele-body">
|
<div class="ele-body">
|
||||||
<a-card :bordered="false">
|
<a-card :bordered="false">
|
||||||
@@ -23,6 +23,7 @@
|
|||||||
@remove="removeBatch"
|
@remove="removeBatch"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'image'">
|
<template v-if="column.key === 'image'">
|
||||||
<a-image :src="record.image" :width="40" />
|
<a-image :src="record.image" :width="40" />
|
||||||
|
|||||||
@@ -103,6 +103,11 @@
|
|||||||
¥{{ formatNumber(record.expendMoney) }}
|
¥{{ formatNumber(record.expendMoney) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
|
<template v-if="column.key === 'balance'">
|
||||||
|
<span class="ele-text-warning">
|
||||||
|
¥{{record.balance==null ?'0.00': formatNumber(record.balance) }}
|
||||||
|
</span>
|
||||||
|
</template>
|
||||||
<template v-else-if="column.key === 'status'">
|
<template v-else-if="column.key === 'status'">
|
||||||
<a-switch
|
<a-switch
|
||||||
:checked="record.status === 0"
|
:checked="record.status === 0"
|
||||||
@@ -157,7 +162,7 @@
|
|||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
ColumnItem
|
ColumnItem
|
||||||
} from 'ele-admin-pro/es/ele-pro-table/types';
|
} from 'ele-admin-pro/es/ele-pro-table/types';
|
||||||
import {messageLoading, formatNumber, toDateString} from 'ele-admin-pro/es';
|
import { messageLoading, formatNumber, toDateString } from 'ele-admin-pro/es';
|
||||||
import { timeAgo } from 'ele-admin-pro';
|
import { timeAgo } from 'ele-admin-pro';
|
||||||
import UserEdit from './components/user-edit.vue';
|
import UserEdit from './components/user-edit.vue';
|
||||||
import UserImport from './components/user-import.vue';
|
import UserImport from './components/user-import.vue';
|
||||||
|
|||||||
@@ -62,7 +62,7 @@
|
|||||||
<a-input
|
<a-input
|
||||||
allow-clear
|
allow-clear
|
||||||
:maxlength="11"
|
:maxlength="11"
|
||||||
:disabled="form.phone !== ''"
|
|
||||||
placeholder="请输入手机号"
|
placeholder="请输入手机号"
|
||||||
v-model:value="form.phone"
|
v-model:value="form.phone"
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -115,7 +115,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'balance'">
|
<template v-if="column.key === 'balance'">
|
||||||
<span class="ele-text-success">
|
<span class="ele-text-success">
|
||||||
¥{{ formatNumber(record.balance) }}
|
¥{{ record.balance==null?'0.00':formatNumber(record.balance) }}
|
||||||
</span>
|
</span>
|
||||||
</template>
|
</template>
|
||||||
<!-- <template v-if="column.key === 'introduction'">-->
|
<!-- <template v-if="column.key === 'introduction'">-->
|
||||||
|
|||||||
@@ -23,6 +23,12 @@
|
|||||||
@remove="removeBatch"
|
@remove="removeBatch"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<a-button class="ele-btn-icon" @click="handleExport">
|
||||||
|
<template #icon>
|
||||||
|
<DownloadOutlined />
|
||||||
|
</template>
|
||||||
|
<span>导出设备</span>
|
||||||
|
</a-button>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'image'">
|
<template v-if="column.key === 'image'">
|
||||||
<a-image :src="record.image" :width="40" />
|
<a-image :src="record.image" :width="40" />
|
||||||
@@ -119,7 +125,10 @@
|
|||||||
import { timeAgo } from 'ele-admin-pro';
|
import { timeAgo } from 'ele-admin-pro';
|
||||||
import { createVNode, computed, ref } from 'vue';
|
import { createVNode, computed, ref } from 'vue';
|
||||||
import { message, Modal } from 'ant-design-vue';
|
import { message, Modal } from 'ant-design-vue';
|
||||||
import { ExclamationCircleOutlined } from '@ant-design/icons-vue';
|
import {
|
||||||
|
DownloadOutlined,
|
||||||
|
ExclamationCircleOutlined
|
||||||
|
} from '@ant-design/icons-vue';
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
import type {
|
import type {
|
||||||
DatasourceFunction,
|
DatasourceFunction,
|
||||||
@@ -129,14 +138,23 @@
|
|||||||
import Search from './components/search.vue';
|
import Search from './components/search.vue';
|
||||||
import EquipmentEdit from './components/equipment-edit.vue';
|
import EquipmentEdit from './components/equipment-edit.vue';
|
||||||
import { pageEquipment, removeBatchEquipment } from '@/api/apps/equipment';
|
import { pageEquipment, removeBatchEquipment } from '@/api/apps/equipment';
|
||||||
import type { Equipment, EquipmentParam } from '@/api/apps/equipment/model';
|
import { Equipment } from '@/api/apps/equipment/model';
|
||||||
|
import type { EquipmentParam } from '@/api/apps/equipment/model';
|
||||||
|
import { Accessory } from '@/api/tower/accessory/model';
|
||||||
|
import { utils, writeFile } from 'xlsx';
|
||||||
// import { Category } from '@/api/goods/category/model';
|
// import { Category } from '@/api/goods/category/model';
|
||||||
// import { getDictionaryOptions } from '@/utils/common';
|
// import { getDictionaryOptions } from '@/utils/common';
|
||||||
// import { useUserStore } from '@/store/modules/user';
|
// import { useUserStore } from '@/store/modules/user';
|
||||||
|
|
||||||
// 表格实例
|
// 表格实例
|
||||||
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
const tableRef = ref<InstanceType<typeof EleProTable> | null>(null);
|
||||||
|
const props = withDefaults(
|
||||||
|
defineProps<{
|
||||||
|
// 选中的角色
|
||||||
|
selection2?: [];
|
||||||
|
}>(),
|
||||||
|
{}
|
||||||
|
);
|
||||||
// 当前用户信息
|
// 当前用户信息
|
||||||
// const brand = getDictionaryOptions('serverBrand');
|
// const brand = getDictionaryOptions('serverBrand');
|
||||||
|
|
||||||
@@ -227,7 +245,7 @@
|
|||||||
dataIndex: 'leaseStatus',
|
dataIndex: 'leaseStatus',
|
||||||
//sorter: true,
|
//sorter: true,
|
||||||
key: 'leaseStatus',
|
key: 'leaseStatus',
|
||||||
hideInTable:true
|
hideInTable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
title: '电池状态',
|
title: '电池状态',
|
||||||
@@ -297,6 +315,64 @@
|
|||||||
tableRef?.value?.reload({ where: where });
|
tableRef?.value?.reload({ where: where });
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// 导出
|
||||||
|
const handleExport = () => {
|
||||||
|
if (!selection.value?.length) {
|
||||||
|
message.error('请至少选择一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const array: (string | number)[][] = [
|
||||||
|
[
|
||||||
|
'二维码',
|
||||||
|
'设备编号',
|
||||||
|
'所属商户',
|
||||||
|
'在租用户',
|
||||||
|
'设备名称',
|
||||||
|
'激活状态',
|
||||||
|
'电池型号',
|
||||||
|
'绑定状态'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
selection.value?.forEach((d: Equipment) => {
|
||||||
|
const bangding = d.userId > 0 ? '已绑定' : '未绑定';
|
||||||
|
var username = '';
|
||||||
|
if (d.user != null) {
|
||||||
|
username = d.user.mobile ? d.user.mobile : d.user.nickname;
|
||||||
|
}
|
||||||
|
|
||||||
|
array.push([
|
||||||
|
`${d.qrcode}`,
|
||||||
|
`${d.equipmentCode}`,
|
||||||
|
`${d.merchantName}`,
|
||||||
|
`${username}`,
|
||||||
|
`${d.equipmentName}`,
|
||||||
|
`${d.isCtive}`,
|
||||||
|
`${d.batteryModel}`,
|
||||||
|
`${bangding}`,
|
||||||
|
`${d.comments}`
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
const sheetName = '设备列表';
|
||||||
|
const workbook = {
|
||||||
|
SheetNames: [sheetName],
|
||||||
|
Sheets: {}
|
||||||
|
};
|
||||||
|
const sheet = utils.aoa_to_sheet(array);
|
||||||
|
workbook.Sheets[sheetName] = sheet;
|
||||||
|
// 设置列宽
|
||||||
|
sheet['!cols'] = [
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 20 },
|
||||||
|
{ wch: 40 },
|
||||||
|
{ wch: 10 }
|
||||||
|
];
|
||||||
|
writeFile(workbook, '导出设备管理表.xlsx');
|
||||||
|
};
|
||||||
|
|
||||||
// 搜索是否展开
|
// 搜索是否展开
|
||||||
const searchExpand = ref(false);
|
const searchExpand = ref(false);
|
||||||
|
|
||||||
@@ -346,7 +422,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selection.value.filter(item=>item.userId!==0).length>0){
|
if (selection.value.filter((item) => item.userId !== 0).length > 0) {
|
||||||
message.error('不能删除绑定的设备,请重新选择');
|
message.error('不能删除绑定的设备,请重新选择');
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -258,11 +258,12 @@
|
|||||||
</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="datasource3"
|
:datasource="EquipmentRecordList"
|
||||||
:columns="columns3"
|
:columns="columns3"
|
||||||
ref="tableRef3"
|
|
||||||
>
|
>
|
||||||
|
|
||||||
<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.batteryRent }}</div>
|
||||||
@@ -278,7 +279,7 @@
|
|||||||
</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">
|
||||||
@@ -446,8 +447,9 @@ 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[]>();
|
||||||
|
|
||||||
// 步骤条
|
// 步骤条
|
||||||
@@ -732,31 +734,31 @@ const getRenewOrder = () => {
|
|||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// const getEquipmentRecordList = () => {
|
const getEquipmentRecordList = () => {
|
||||||
// EquipmentRecordApi.pageEquipmentRecord({
|
EquipmentRecordApi.pageEquipmentRecord({
|
||||||
// orderId: order.orderId,
|
orderId: order.orderId,
|
||||||
// userId: order.userId
|
userId: order.userId
|
||||||
// }).then((data) => {
|
}).then((data) => {
|
||||||
|
EquipmentRecordList.value = data.list;
|
||||||
// });
|
});
|
||||||
// };
|
};
|
||||||
|
|
||||||
// 表格数据源
|
// 表格数据源
|
||||||
const datasource3: DatasourceFunction = ({
|
// const datasource3: DatasourceFunction = ({
|
||||||
page,
|
// page,
|
||||||
limit,
|
// limit,
|
||||||
where,
|
// where,
|
||||||
orders
|
// orders
|
||||||
}) => {
|
// }) => {
|
||||||
where.orderId = order.orderId
|
// where.orderId = order.orderId
|
||||||
where.userId = order.userId
|
// where.userId = order.userId
|
||||||
return EquipmentRecordApi.pageEquipmentRecord({
|
// return EquipmentRecordApi.pageEquipmentRecord({
|
||||||
...where,
|
// ...where,
|
||||||
...orders,
|
// ...orders,
|
||||||
page,
|
// page,
|
||||||
limit
|
// limit
|
||||||
});
|
// });
|
||||||
};
|
// };
|
||||||
|
|
||||||
const expirationDay = (order) => {
|
const expirationDay = (order) => {
|
||||||
const setTime = new Date(order.expirationTime);
|
const setTime = new Date(order.expirationTime);
|
||||||
@@ -815,7 +817,7 @@ watch(
|
|||||||
getEquipmentOrderGoods();
|
getEquipmentOrderGoods();
|
||||||
getRenewOrder();
|
getRenewOrder();
|
||||||
getEquipment();
|
getEquipment();
|
||||||
// getEquipmentRecordList();
|
getEquipmentRecordList();
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
resetFields();
|
resetFields();
|
||||||
|
|||||||
@@ -22,11 +22,19 @@
|
|||||||
@advanced="openAdvanced"
|
@advanced="openAdvanced"
|
||||||
/>
|
/>
|
||||||
</template>
|
</template>
|
||||||
|
<a-button class="ele-btn-icon" @click="handleExport">
|
||||||
|
<template #icon>
|
||||||
|
<DownloadOutlined />
|
||||||
|
</template>
|
||||||
|
<span>导出订单</span>
|
||||||
|
</a-button>
|
||||||
<template #bodyCell="{ column, record }">
|
<template #bodyCell="{ column, record }">
|
||||||
<template v-if="column.key === 'restDay'">
|
<template v-if="column.key === 'restDay'">
|
||||||
<strong v-if="record.restDay < 0" :style="{ color: 'red' }">{{ record.restDay }}</strong>
|
<strong v-if="record.restDay < 0" :style="{ color: 'red' }">{{
|
||||||
<span v-else-if="record.restDay >= 0">{{ record.restDay }}</span>
|
record.restDay
|
||||||
<span> 天</span>
|
}}</strong>
|
||||||
|
<span v-else-if="record.restDay >= 0">{{ record.restDay }}</span>
|
||||||
|
<span> 天</span>
|
||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'merchantName'">
|
<template v-if="column.key === 'merchantName'">
|
||||||
<div style="display: flex; flex-direction: column">
|
<div style="display: flex; flex-direction: column">
|
||||||
@@ -90,14 +98,21 @@
|
|||||||
<!-- 发货状态:-->
|
<!-- 发货状态:-->
|
||||||
<a-tag v-if="record.deliveryStatus === 10">未发货</a-tag>
|
<a-tag v-if="record.deliveryStatus === 10">未发货</a-tag>
|
||||||
<a-tag v-else-if="record.deliveryStatus === 20" color="success"
|
<a-tag v-else-if="record.deliveryStatus === 20" color="success"
|
||||||
>已发货</a-tag>
|
>已发货</a-tag
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="ele-text-placeholder">
|
<div class="ele-text-placeholder">
|
||||||
<!-- 收货状态:-->
|
<!-- 收货状态:-->
|
||||||
<a-tag v-if="record.receiptStatus === 10">未收货</a-tag>
|
<a-tag v-if="record.receiptStatus === 10">未收货</a-tag>
|
||||||
<a-tag v-else-if="record.receiptStatus === 20" color="success">已收货</a-tag>
|
<a-tag v-else-if="record.receiptStatus === 20" color="success"
|
||||||
<a-tag v-else-if="record.receiptStatus === 21" color="purple">退租中</a-tag>
|
>已收货</a-tag
|
||||||
<a-tag v-else-if="record.receiptStatus === 30" color="error">已退租</a-tag>
|
>
|
||||||
|
<a-tag v-else-if="record.receiptStatus === 21" color="purple"
|
||||||
|
>退租中</a-tag
|
||||||
|
>
|
||||||
|
<a-tag v-else-if="record.receiptStatus === 30" color="error"
|
||||||
|
>已退租</a-tag
|
||||||
|
>
|
||||||
</div>
|
</div>
|
||||||
<div class="ele-text-placeholder" v-if="record.orderSource != 10">
|
<div class="ele-text-placeholder" v-if="record.orderSource != 10">
|
||||||
<!-- 分期状态:-->
|
<!-- 分期状态:-->
|
||||||
@@ -169,23 +184,38 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-if="column.key === 'action'">
|
<template v-if="column.key === 'action'">
|
||||||
<a-space>
|
<a-space>
|
||||||
<a-button class="ele-text-primary" @click="openInfo(record)">详情</a-button>
|
<a-button class="ele-text-primary" @click="openInfo(record)"
|
||||||
|
>详情</a-button
|
||||||
|
>
|
||||||
</a-space>
|
</a-space>
|
||||||
<view v-if="record.deliveryStatus == 40">
|
<view v-if="record.deliveryStatus == 40">
|
||||||
<a-divider type="vertical" />
|
<a-divider type="vertical" />
|
||||||
<a-button class="ele-text-danger" @click="openChange(record)">换电</a-button>
|
<a-button class="ele-text-danger" @click="openChange(record)"
|
||||||
|
>换电</a-button
|
||||||
|
>
|
||||||
<view v-if="record.receiptStatus === 20">
|
<view v-if="record.receiptStatus === 20">
|
||||||
<a-button class="ele-text-danger" @click="openOrderRefund(record)">退租</a-button>
|
<a-button
|
||||||
|
class="ele-text-danger"
|
||||||
|
@click="openOrderRefund(record)"
|
||||||
|
>退租</a-button
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</template>
|
</template>
|
||||||
</ele-pro-table>
|
</ele-pro-table>
|
||||||
</a-card>
|
</a-card>
|
||||||
</div>
|
</div>
|
||||||
<battery-change v-model:visible="showChange" :data="current" @done="reload"/>
|
<battery-change
|
||||||
<order-refund v-model:visible="showOrderRefund" :data="current" @done="reload"/>
|
v-model:visible="showChange"
|
||||||
|
:data="current"
|
||||||
|
@done="reload"
|
||||||
|
/>
|
||||||
|
<order-refund
|
||||||
|
v-model:visible="showOrderRefund"
|
||||||
|
:data="current"
|
||||||
|
@done="reload"
|
||||||
|
/>
|
||||||
|
|
||||||
<!-- 编辑弹窗 -->
|
<!-- 编辑弹窗 -->
|
||||||
<Delivery v-model:visible="deliveryEdit" :data="current" @done="reload" />
|
<Delivery v-model:visible="deliveryEdit" :data="current" @done="reload" />
|
||||||
@@ -219,7 +249,8 @@
|
|||||||
// PlusOutlined,
|
// PlusOutlined,
|
||||||
// DeleteOutlined,
|
// DeleteOutlined,
|
||||||
FormOutlined,
|
FormOutlined,
|
||||||
ExclamationCircleOutlined
|
ExclamationCircleOutlined,
|
||||||
|
DownloadOutlined
|
||||||
} from '@ant-design/icons-vue';
|
} from '@ant-design/icons-vue';
|
||||||
import type { EleProTable } from 'ele-admin-pro';
|
import type { EleProTable } from 'ele-admin-pro';
|
||||||
import type {
|
import type {
|
||||||
@@ -238,7 +269,8 @@
|
|||||||
import { alipayQuery } from '@/api/system/payment';
|
import { alipayQuery } from '@/api/system/payment';
|
||||||
import type { Order, OrderParam } from '@/api/order/model';
|
import type { Order, OrderParam } from '@/api/order/model';
|
||||||
import { getDictionaryOptions } from '@/utils/common';
|
import { getDictionaryOptions } from '@/utils/common';
|
||||||
import { Equipment } from "@/api/apps/equipment/model";
|
import { Equipment } from '@/api/apps/equipment/model';
|
||||||
|
import { utils, writeFile } from 'xlsx';
|
||||||
|
|
||||||
// 当前用户信息
|
// 当前用户信息
|
||||||
// const userStore = useUserStore();
|
// const userStore = useUserStore();
|
||||||
@@ -476,6 +508,63 @@
|
|||||||
limit
|
limit
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
// 导出
|
||||||
|
const handleExport = () => {
|
||||||
|
if (!selection.value?.length) {
|
||||||
|
message.error('请至少选择一条数据');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
const array: (string | number)[][] = [
|
||||||
|
[
|
||||||
|
'订单号',
|
||||||
|
'电池型号',
|
||||||
|
'电池编号',
|
||||||
|
'所属商户',
|
||||||
|
'到期时间',
|
||||||
|
'剩余天数',
|
||||||
|
'买家',
|
||||||
|
'订单金额',
|
||||||
|
'交易状态'
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
selection.value?.forEach((d: Order) => {
|
||||||
|
var username = d.phone ? d.phone : d.nickname;
|
||||||
|
|
||||||
|
var equipmentCode = d.equipment ? d.equipment.equipmentCode : '';
|
||||||
|
|
||||||
|
array.push([
|
||||||
|
`${d.orderNo}`,
|
||||||
|
`${d.equipmentGoods.batteryModel}`,
|
||||||
|
`${equipmentCode}`,
|
||||||
|
`${d.merchantName}`,
|
||||||
|
`${d.expirationTime}`,
|
||||||
|
`${d.expirationDay}`,
|
||||||
|
`${username}`,
|
||||||
|
`${d.totalPrice}`,
|
||||||
|
|
||||||
|
`${d.orderStatus}`
|
||||||
|
]);
|
||||||
|
});
|
||||||
|
const sheetName = '设备列表';
|
||||||
|
const workbook = {
|
||||||
|
SheetNames: [sheetName],
|
||||||
|
Sheets: {}
|
||||||
|
};
|
||||||
|
const sheet = utils.aoa_to_sheet(array);
|
||||||
|
workbook.Sheets[sheetName] = sheet;
|
||||||
|
// 设置列宽
|
||||||
|
sheet['!cols'] = [
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 10 },
|
||||||
|
{ wch: 20 },
|
||||||
|
{ wch: 40 },
|
||||||
|
{ wch: 10 }
|
||||||
|
];
|
||||||
|
writeFile(workbook, '导出订单管理表.xlsx');
|
||||||
|
};
|
||||||
|
|
||||||
/* 搜索 */
|
/* 搜索 */
|
||||||
const reload = (where?: OrderParam) => {
|
const reload = (where?: OrderParam) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user