feat:实现保洁管理业务逻辑
This commit is contained in:
@@ -20,6 +20,11 @@ import {
|
||||
cleanList,
|
||||
cleanRemove,
|
||||
} from '#/api/property/clean';
|
||||
import {
|
||||
clean_orderExport,
|
||||
clean_orderList,
|
||||
clean_orderRemove,
|
||||
} from '#/api/property/clean_order';
|
||||
import type { CleanForm } from '#/api/property/clean/model';
|
||||
import { commonDownloadExcel } from '#/utils/file/download';
|
||||
|
||||
@@ -28,7 +33,7 @@ import { columns, querySchema } from './data';
|
||||
|
||||
const formOptions: VbenFormProps = {
|
||||
commonConfig: {
|
||||
labelWidth: 80,
|
||||
labelWidth: 120,
|
||||
componentProps: {
|
||||
allowClear: true,
|
||||
},
|
||||
@@ -64,7 +69,7 @@ const gridOptions: VxeGridProps = {
|
||||
proxyConfig: {
|
||||
ajax: {
|
||||
query: async ({ page }, formValues = {}) => {
|
||||
return await cleanList({
|
||||
return await clean_orderList({
|
||||
pageNum: page.currentPage,
|
||||
pageSize: page.pageSize,
|
||||
...formValues,
|
||||
@@ -99,7 +104,7 @@ async function handleEdit(row: Required<CleanForm>) {
|
||||
}
|
||||
|
||||
async function handleDelete(row: Required<CleanForm>) {
|
||||
await cleanRemove(row.id);
|
||||
await clean_orderRemove(row.id);
|
||||
await tableApi.query();
|
||||
}
|
||||
|
||||
@@ -111,14 +116,14 @@ function handleMultiDelete() {
|
||||
okType: 'danger',
|
||||
content: `确认删除选中的${ids.length}条记录吗?`,
|
||||
onOk: async () => {
|
||||
await cleanRemove(ids);
|
||||
await clean_orderRemove(ids);
|
||||
await tableApi.query();
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
function handleDownloadExcel() {
|
||||
commonDownloadExcel(cleanExport, '保洁管理数据', tableApi.formApi.form.values, {
|
||||
commonDownloadExcel(clean_orderExport, '保洁订单数据', tableApi.formApi.form.values, {
|
||||
fieldMappingTime: formOptions.fieldMappingTime,
|
||||
});
|
||||
}
|
||||
@@ -126,7 +131,7 @@ function handleDownloadExcel() {
|
||||
|
||||
<template>
|
||||
<Page :auto-content-height="true">
|
||||
<BasicTable table-title="保洁管理列表">
|
||||
<BasicTable table-title="保洁订单列表">
|
||||
<template #toolbar-tools>
|
||||
<Space>
|
||||
<a-button
|
||||
|
Reference in New Issue
Block a user