客户服务
Some checks are pending
Gitea Actions Demo / Explore-Gitea-Actions (push) Waiting to run

This commit is contained in:
FLL
2025-07-23 20:50:49 +08:00
parent 447ad7f004
commit 9d75dd2168
10 changed files with 266 additions and 88 deletions

View File

@@ -7,11 +7,12 @@ import {
vxeCheckboxChecked,
type VxeGridProps
} from '#/adapter/vxe-table';
import {onMounted} from "vue";
import {
contingenPlanExport,
contingenPlanList,
contingenPlanRemove,
contingenPlanUpdate
} from '#/api/property/customerService/contingenPlan';
import type { ContingenPlanForm } from '#/api/property/customerService/contingenPlan/model';
import { commonDownloadExcel } from '#/utils/file/download';
@@ -19,6 +20,8 @@ import { commonDownloadExcel } from '#/utils/file/download';
import contingenPlanModal from './contingenPlan-modal.vue';
import contingenPlanDetail from './contingenPlan-detail.vue';
import { columns, querySchema } from './data';
import {personList} from "#/api/property/resident/person";
import {renderDictValue} from "#/utils/render";
const formOptions: VbenFormProps = {
commonConfig: {
@@ -93,6 +96,12 @@ async function handleDelete(row: Required<ContingenPlanForm>) {
await tableApi.query();
}
async function handleExamine(row: Required<ContingenPlanForm>) {
row.status = '1'
await contingenPlanUpdate(row);
await tableApi.query();
}
function handleMultiDelete() {
const rows = tableApi.grid.getCheckboxRecords();
const ids = rows.map((row: Required<ContingenPlanForm>) => row.id);
@@ -112,6 +121,36 @@ function handleDownloadExcel() {
fieldMappingTime: formOptions.fieldMappingTime,
});
}
async function queryPersonData() {
let params = {
pageSize: 1000,
pageNum: 1,
}
const res = await personList(params);
const options = res.rows.map((user) => ({
label: user.userName + '-' + renderDictValue(user.gender, 'sys_user_sex') + '-' + user.phone,
value: user.id,
}));
tableApi.formApi.updateSchema([
{
componentProps: () => ({
options: options,
showSearch:true,
filterOption: filterOption
}),
fieldName: 'dutyPersion',
}
])
}
const filterOption = (input: string, option: any) => {
return option.label.toLowerCase().indexOf(input.toLowerCase()) >= 0;
};
onMounted(async () => {
await queryPersonData()
})
</script>
<template>
@@ -144,12 +183,26 @@ function handleDownloadExcel() {
</template>
<template #action="{ row }">
<Space>
<Popconfirm
v-if="row.status === '0'"
:get-popup-container="getVxePopupContainer"
placement="left"
title="确认审核?"
@confirm="handleExamine(row)"
>
<ghost-button
@click.stop=""
>
{{ '审核' }}
</ghost-button>
</Popconfirm>
<ghost-button
@click.stop="handleInfo(row)"
>
{{ $t('pages.common.info') }}
</ghost-button>
<ghost-button
v-if="row.status === '0'"
v-access:code="['system:contingenPlan:edit']"
@click.stop="handleEdit(row)"
>