feat: 保洁接口对接
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
fyy
2025-06-27 18:03:13 +08:00
parent f01cb4abce
commit 3e8ba86305
10 changed files with 62158 additions and 366 deletions

View File

@@ -1,31 +1,20 @@
<script setup lang="ts">
import type { Recordable } from '@vben/types';
import type { VbenFormProps } from '@vben/common-ui';
import { ref } from 'vue';
import type { VxeGridProps } from '#/adapter/vxe-table';
import type { CleanForm } from '#/api/property/clean/model';
import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui';
import { Page, useVbenModal } from '@vben/common-ui';
import { getVxePopupContainer } from '@vben/utils';
import { Modal, Popconfirm, Space } from 'ant-design-vue';
import dayjs from 'dayjs';
import {
useVbenVxeGrid,
vxeCheckboxChecked,
type VxeGridProps
} from '#/adapter/vxe-table';
import {
cleanExport,
cleanList,
cleanRemove,
} from '#/api/property/clean';
import { useVbenVxeGrid, vxeCheckboxChecked } from '#/adapter/vxe-table';
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';
import cleanModal from './clean-modal.vue';
@@ -81,7 +70,7 @@ const gridOptions: VxeGridProps = {
keyField: 'id',
},
// 表格全局唯一表示 保存列配置需要用到
id: 'property-clean-index'
id: 'property-clean-index',
};
const [BasicTable, tableApi] = useVbenVxeGrid({
@@ -123,9 +112,19 @@ function handleMultiDelete() {
}
function handleDownloadExcel() {
commonDownloadExcel(clean_orderExport, '保洁订单数据', tableApi.formApi.form.values, {
fieldMappingTime: formOptions.fieldMappingTime,
});
commonDownloadExcel(
clean_orderExport,
'保洁订单数据',
tableApi.formApi.form.values,
{
fieldMappingTime: formOptions.fieldMappingTime,
},
);
}
async function handleView(row: Required<CleanForm>) {
modalApi.setData({ id: row.id, readonly: true });
modalApi.open();
}
</script>
@@ -143,9 +142,10 @@ function handleDownloadExcel() {
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
type="primary"
v-access:code="['property:clean:remove']"
@click="handleMultiDelete">
type="primary"
v-access:code="['property:clean:remove']"
@click="handleMultiDelete"
>
{{ $t('pages.common.delete') }}
</a-button>
<a-button
@@ -159,6 +159,7 @@ function handleDownloadExcel() {
</template>
<template #action="{ row }">
<Space>
<ghost-button @click.stop="handleView(row)"> 查看 </ghost-button>
<ghost-button
v-access:code="['property:clean:edit']"
@click.stop="handleEdit(row)"