diff --git a/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts b/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts index 46089c13..2188b2fb 100644 --- a/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts +++ b/apps/web-antd/src/api/property/costManagement/houseCharge/model.d.ts @@ -1,4 +1,6 @@ import type {PageQuery, BaseEntity} from '#/api/common'; +import type {RoomVO} from "#/api/property/room/model"; +import type {CostItemSettingVO} from "#/api/property/costManagement/costItemSetting/model"; export interface HouseChargeVO { /** @@ -46,7 +48,16 @@ export interface HouseChargeVO { * 缴费周期 */ chargeCycle: number; + /** + * 支付方式 + */ + payType: string; + roomVo: RoomVO; + + costItemsVo: CostItemSettingVO; + + chargeStatus: string; } export interface HouseChargeForm extends BaseEntity { @@ -90,6 +101,10 @@ export interface HouseChargeForm extends BaseEntity { */ remark?: string; + /** + * 缴费状态 + */ + chargeStatus?: string; } export interface HouseChargeQuery extends PageQuery { diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts b/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts index 3ff35ae1..62608784 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts @@ -25,10 +25,10 @@ export const querySchema: FormSchemaGetter = () => [ }, { component: 'Select', - fieldName: 'state', - label: '状态', + fieldName: 'chargeStatus', + label: '缴费状态', componentProps: { - options: getDictOptions('wy_fysfzt') + options: getDictOptions('wy_fyshzt') }, }, ]; @@ -60,15 +60,25 @@ export const columns: VxeGridProps['columns'] = [ width: 150, }, { - title: '状态', - field: 'state', + title: '缴费状态', + field: 'chargeStatus', width: 150, slots: { default: ({row}) => { - return renderDict(row.state, 'wy_fysfzt') + return renderDict(row.chargeStatus, 'wy_fyshzt') } } }, + // { + // title: '状态', + // field: 'state', + // width: 150, + // slots: { + // default: ({row}) => { + // return renderDict(row.state, 'wy_fysfzt') + // } + // } + // }, { title: '说明', field: 'remark', @@ -101,6 +111,14 @@ export const modalSchema: FormSchemaGetter = () => [ }, rules: 'selectRequired', }, + { + label: '业主', + fieldName: 'personId', + component: 'ApiSelect', + componentProps: { + }, + rules: 'selectRequired', + }, { label: '费用类型', fieldName: 'costType', @@ -179,3 +197,20 @@ export const modalSchemaUpdate: FormSchemaGetter = () => [ rules: 'selectRequired', }, ] +export const modalSchemaRefund: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '退费原因', + fieldName: 'reason', + component: 'Textarea', + formItemClass: 'col-span-2' + }, +] diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue index 65d12bac..c10c48cf 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-detail.vue @@ -23,8 +23,9 @@ const [BasicModal, modalApi] = useVbenModal({ }); const houseChargeDetail = shallowRef(null); -const room=ref(); -const costItem=ref(); +const room = ref(); +const costItem = ref(); + async function handleOpenChange(open: boolean) { if (!open) { return null; @@ -32,9 +33,9 @@ async function handleOpenChange(open: boolean) { modalApi.modalLoading(true); const {id} = modalApi.getData() as { id: number | string }; houseChargeDetail.value = await houseChargeInfo(id); - if(houseChargeDetail.value){ - room.value=houseChargeDetail.value.roomVo - costItem.value=houseChargeDetail.value.costItemsVo + if (houseChargeDetail.value) { + room.value = houseChargeDetail.value.roomVo + costItem.value = houseChargeDetail.value.costItemsVo } modalApi.modalLoading(false); } @@ -52,39 +53,46 @@ async function handleOpenChange(open: boolean) { - {{ houseChargeDetail.startTime+' 至 '+houseChargeDetail.endTime }} + {{ houseChargeDetail.startTime + ' 至 ' + houseChargeDetail.endTime }} - {{room?.roomNumber}} + {{ room?.roomNumber }} - {{`建筑面积:${room?.area} 套内面积:${room?.insideInArea}`}} + {{ `建筑面积:${room?.area} 套内面积:${room?.insideInArea}` }} {{ costItem?.unitPrice }} - {{costItem?.surcharge}} + {{ costItem?.surcharge }} - - ¥ {{houseChargeDetail.amountReceivable}} - +
+ + ¥ {{ houseChargeDetail.amountReceivable }} + +
+
+ + - {{houseChargeDetail.chargeCycle}}月 + {{ houseChargeDetail.chargeCycle }}月 - {{houseChargeDetail.remark}} + {{ houseChargeDetail.remark }} diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-refund.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-refund.vue new file mode 100644 index 00000000..31daf8da --- /dev/null +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/house-charge-refund.vue @@ -0,0 +1,147 @@ + + + + diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue index b11da258..fd8d9861 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-add.vue @@ -18,6 +18,8 @@ import {communityTree} from "#/api/property/community"; import {costItemSettingList} from "#/api/property/costManagement/costItemSetting"; import type {CostItemSettingVO} from "#/api/property/costManagement/costItemSetting/model"; import {getDictOptions} from "#/utils/dict"; +import {personList} from "#/api/property/resident/person"; +import {renderDictValue} from "#/utils/render"; const emit = defineEmits<{ reload: [] }>(); @@ -65,6 +67,7 @@ const [BasicModal, modalApi] = useVbenModal({ await initRoomOptions() await queryCostItemOptions() await initCostTypeOptions() + await queryPersonData() const {id} = modalApi.getData() as { id?: number | string }; isUpdate.value = !!id; @@ -191,6 +194,28 @@ async function initCostTypeOptions(){ fieldName: 'costType' }]) } + +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', + }), + fieldName: 'personId', + }]) +}