绿植管理

This commit is contained in:
FLL
2025-07-02 11:02:14 +08:00
parent b6f7558aaa
commit 79fe4c6412
17 changed files with 1031 additions and 133 deletions

View File

@@ -8,13 +8,12 @@ import {
type VxeGridProps
} from '#/adapter/vxe-table';
import {
orderChargeExport,
orderChargeList,
orderChargeRemove,
} from '#/api/property/chargeManagement';
import type { OrderChargeForm } from '#/api/property/chargeManagement/model';
import { commonDownloadExcel } from '#/utils/file/download';
import orderChargeModal from './orderCharge-modal.vue';
import orderChargeDetail from './orderCharge-detail.vue';
import { columns, querySchema } from './data';
const formOptions: VbenFormProps = {
@@ -63,6 +62,15 @@ const [OrderChargeModal, modalApi] = useVbenModal({
connectedComponent: orderChargeModal,
});
const [orderChargeDetailModal, orderChargeDetailApi] = useVbenModal({
connectedComponent: orderChargeDetail,
});
async function handleInfo(row: Required<OrderChargeForm>) {
orderChargeDetailApi.setData({ id: row.id });
orderChargeDetailApi.open();
}
function handleAdd() {
modalApi.setData({});
modalApi.open();
@@ -91,12 +99,6 @@ function handleMultiDelete() {
},
});
}
function handleDownloadExcel() {
commonDownloadExcel(orderChargeExport, '绿植租赁-订单收费数据', tableApi.formApi.form.values, {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
</script>
<template>
@@ -104,12 +106,6 @@ function handleDownloadExcel() {
<BasicTable table-title="绿植租赁-订单收费列表">
<template #toolbar-tools>
<Space>
<a-button
v-access:code="['property:orderCharge:export']"
@click="handleDownloadExcel"
>
{{ $t('pages.common.export') }}
</a-button>
<a-button
:disabled="!vxeCheckboxChecked(tableApi)"
danger
@@ -129,6 +125,11 @@ function handleDownloadExcel() {
</template>
<template #action="{ row }">
<Space>
<ghost-button
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}
</ghost-button>
<ghost-button
v-access:code="['property:orderCharge:edit']"
@click.stop="handleEdit(row)"
@@ -153,5 +154,6 @@ function handleDownloadExcel() {
</template>
</BasicTable>
<OrderChargeModal @reload="tableApi.query()" />
<orderChargeDetailModal/>
</Page>
</template>