2、退费审核 3、房间添加套内面积
This commit is contained in:
@@ -15,6 +15,8 @@ import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup';
|
||||
|
||||
import {modalSchema} from './data';
|
||||
import {getMachineTypeTree} from "#/api/property/machineType";
|
||||
import {personList} from "#/api/property/resident/person";
|
||||
import {renderDictValue} from "#/utils/render";
|
||||
|
||||
const emit = defineEmits<{ reload: [] }>();
|
||||
|
||||
@@ -62,12 +64,16 @@ const [BasicModal, modalApi] = useVbenModal({
|
||||
const {id} = modalApi.getData() as { id?: number | string };
|
||||
isUpdate.value = !!id;
|
||||
await setupTypeSelect();
|
||||
await queryPersonData()
|
||||
if (isUpdate.value && id) {
|
||||
const record = await maintainPlanInfo(id);
|
||||
record.planDate = [record.startDate, record.endDate]
|
||||
if (record.planPeriod == '1') {
|
||||
record.maintainanceMonth = record.maintainanceMonth?.split(',')
|
||||
record.maintainanceDay = record.maintainanceDay?.split(',')
|
||||
record.maintainMonth = record.maintainMonth?.split(',')
|
||||
record.maintainDay = record.maintainDay?.split(',')
|
||||
}
|
||||
if (record.machineMaintainPlanStaffBoList) {
|
||||
record.userId = record.machineMaintainPlanStaffBoList.map(item=>item.userId)
|
||||
}
|
||||
await formApi.setValues(record);
|
||||
}
|
||||
@@ -91,13 +97,19 @@ async function handleConfirm() {
|
||||
data.endDate = data.planDate[1]
|
||||
}
|
||||
if (data.planPeriod == '1') {
|
||||
data.maintainanceMonth = data.maintainanceMonth?.join(',')
|
||||
data.maintainanceDay = data.maintainanceDay?.join(',')
|
||||
data.maintainanceEveryday = undefined
|
||||
data.maintainMonth = data.maintainMonth?.join(',')
|
||||
data.maintainDay = data.maintainDay?.join(',')
|
||||
data.maintainEveryday = undefined
|
||||
} else {
|
||||
data.maintainanceMonth = undefined
|
||||
data.maintainanceDay = undefined
|
||||
data.maintainMonth = undefined
|
||||
data.maintainDay = undefined
|
||||
}
|
||||
data.machineMaintainPlanStaffBoList = []
|
||||
data.userId.forEach((item: string) => {
|
||||
data.machineMaintainPlanStaffBoList.push({
|
||||
userId: item
|
||||
})
|
||||
})
|
||||
await (isUpdate.value ? maintainPlanUpdate(data) : maintainPlanAdd(data));
|
||||
resetInitialized();
|
||||
emit('reload');
|
||||
@@ -143,6 +155,29 @@ async function setupTypeSelect() {
|
||||
},
|
||||
]);
|
||||
}
|
||||
|
||||
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 + '-' + user.unitName,
|
||||
value: user.id,
|
||||
}));
|
||||
formApi.updateSchema([{
|
||||
componentProps: () => ({
|
||||
options: options,
|
||||
showSearch: true,
|
||||
optionFilterProp: 'label',
|
||||
optionLabelProp: 'label',
|
||||
mode: 'multiple',
|
||||
}),
|
||||
fieldName: 'userId',
|
||||
}])
|
||||
}
|
||||
</script>
|
||||
|
||||
<template>
|
||||
|
Reference in New Issue
Block a user