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 7abe3229..5d48ef7e 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 @@ -60,6 +60,14 @@ export interface HouseChargeVO { chargeStatus: string; personId: string; + /** + * 单位 + */ + residentUnitText: string; + /** + * 单位面积 + */ + area: number; } export interface HouseChargeForm extends BaseEntity { diff --git a/apps/web-antd/src/api/property/resident/unit/model.d.ts b/apps/web-antd/src/api/property/resident/unit/model.d.ts index 1c6d50df..dfe50c8a 100644 --- a/apps/web-antd/src/api/property/resident/unit/model.d.ts +++ b/apps/web-antd/src/api/property/resident/unit/model.d.ts @@ -36,6 +36,7 @@ export interface Resident_unitVO { */ location: string; locations: string[]; + locationDetail: string; /** * 入驻时间 diff --git a/apps/web-antd/src/assets/property/bg.jpg b/apps/web-antd/src/assets/property/bg.jpg new file mode 100644 index 00000000..1b7e6c45 Binary files /dev/null and b/apps/web-antd/src/assets/property/bg.jpg differ diff --git a/apps/web-antd/src/assets/property/bg.png b/apps/web-antd/src/assets/property/bg.png deleted file mode 100644 index f435684f..00000000 Binary files a/apps/web-antd/src/assets/property/bg.png and /dev/null differ diff --git a/apps/web-antd/src/assets/property/bg1.png b/apps/web-antd/src/assets/property/bg1.png deleted file mode 100644 index 03b7aac0..00000000 Binary files a/apps/web-antd/src/assets/property/bg1.png and /dev/null differ diff --git a/apps/web-antd/src/views/property/businessManagement/workOrders/work-orders-detail.vue b/apps/web-antd/src/views/property/businessManagement/workOrders/work-orders-detail.vue index 00c4f65b..8b182da1 100644 --- a/apps/web-antd/src/views/property/businessManagement/workOrders/work-orders-detail.vue +++ b/apps/web-antd/src/views/property/businessManagement/workOrders/work-orders-detail.vue @@ -27,7 +27,7 @@ const [BasicModal, modalApi] = useVbenModal({ }, }); -const orderDetail = shallowRef(null); +const orderDetail = ref(null); const handleRecords = ref([]) async function handleOpenChange(open: boolean) { 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 a004056d..00b53669 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts @@ -35,8 +35,8 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ {type: 'checkbox', width: 60}, { - title: '房屋', - field: 'roomName', + title: '单位', + field: 'residentUnitText', minWidth: 150, }, { @@ -104,12 +104,33 @@ export const modalSchema: FormSchemaGetter = () => [ }, }, { - label: '房屋', - fieldName: 'roomId', - component: 'TreeSelect', + label: '单位', + fieldName: 'residentUnitId', + component: 'Select', componentProps: { }, rules: 'selectRequired', + formItemClass: 'col-span-2', + }, + { + label: '入驻房间', + fieldName: 'roomInfo', + component: 'Input', + dependencies: { + show: (fromValue) => fromValue.residentUnitId, + triggerFields: ['residentUnitId'], + }, + formItemClass: 'col-span-2', + }, + { + label: '单位面积', + fieldName: 'area', + component: 'Input', + dependencies: { + show: (fromValue) => fromValue.residentUnitId, + triggerFields: ['residentUnitId'], + }, + formItemClass: 'col-span-2', }, { label: '业主', 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 c10c48cf..18da12b9 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 @@ -59,11 +59,11 @@ async function handleOpenChange(open: boolean) { {{ houseChargeDetail.startTime + ' 至 ' + houseChargeDetail.endTime }} - - {{ room?.roomNumber }} + + {{ houseChargeDetail?.residentUnitText }} - - {{ `建筑面积:${room?.area} 套内面积:${room?.insideInArea}` }} + + {{ `${houseChargeDetail?.area} (㎡)` }} {{ costItem?.unitPrice }} 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 index 9a67aad1..dc24e1ac 100644 --- 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 @@ -121,11 +121,11 @@ async function handleClosed() { {{ record.startTime }} - - {{ room?.roomNumber }} + + {{ record.residentUnitText }} - - {{ `${room?.area} (套内面积:${room?.insideInArea})` }} + + {{ `${record.area} (㎡)` }} {{ costItem?.unitPrice }} 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 09442391..9e25ed3e 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 @@ -20,6 +20,7 @@ import type { CostItemSettingVO } from '#/api/property/costManagement/costItemSe import { getDictOptions } from '#/utils/dict'; import { personList } from '#/api/property/resident/person'; import { renderDictValue } from '#/utils/render'; +import {resident_unitInfo, resident_unitList} from "#/api/property/resident/unit"; const emit = defineEmits<{ reload: [] }>(); @@ -32,7 +33,7 @@ const title = computed(() => { const [BasicForm, formApi] = useVbenForm({ commonConfig: { // 默认占满两列 - formItemClass: 'col-span-2', + formItemClass: 'col-span-1', // 默认label宽度 px labelWidth: 80, // 通用配置项 会影响到所有表单项 @@ -54,7 +55,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( const [BasicModal, modalApi] = useVbenModal({ // 在这里更改宽度 - class: 'w-[550px]', + class: 'w-[70%]', fullscreenButton: false, onBeforeClose, onClosed: handleClosed, @@ -64,10 +65,10 @@ const [BasicModal, modalApi] = useVbenModal({ return null; } modalApi.modalLoading(true); - await initRoomOptions(); - await queryCostItemOptions(); + await queryCostItemOptions(null); await initCostTypeOptions(); await queryPersonData(); + await queryUnitData(); const { id } = modalApi.getData() as { id?: number | string }; isUpdate.value = !!id; @@ -111,46 +112,10 @@ async function handleClosed() { resetInitialized(); } -/** - * 房间数据 - */ -async function initRoomOptions() { - const roomList = await communityTree(4); - const splitStr = '/'; - handleNode(roomList, 'label', splitStr, function (node: any) { - if (node.level != 4) { - node.disabled = true; - } - }); - formApi.updateSchema([ - { - componentProps: () => ({ - class: 'w-full', - fieldNames: { - key: 'id', - label: 'label', - value: 'code', - children: 'children', - }, - placeholder: '请选择房间', - showSearch: true, - treeData: roomList, - treeDefaultExpandAll: true, - treeLine: { showLeafIcon: false }, - // 筛选的字段 - treeNodeFilterProp: 'label', - // 选中后显示在输入框的值 - treeNodeLabelProp: 'fullName', - }), - fieldName: 'roomId', - }, - ]); -} - /** * 查询费用项设置 */ -async function queryCostItemOptions(costType: string) { +async function queryCostItemOptions(costType: string|null) { let params = { pageSize: 1000, pageNum: 1, @@ -233,10 +198,57 @@ async function queryPersonData() { }, ]); } +//查询入驻单位数据 +async function queryUnitData() { + let params = { + pageSize: 1000, + pageNum: 1, + }; + const res = await resident_unitList(params); + const options = res.rows.map((unit) => ({ + label:unit.name, + value: unit.id, + })); + formApi.updateSchema([ + { + componentProps: () => ({ + options: options, + showSearch: true, + optionFilterProp: 'label', + optionLabelProp: 'label', + onChange: async (value: string) => { + if (value) { + await queryRoomByUnit(value); + } + }, + }), + fieldName: 'residentUnitId', + }, + ]); +} + +async function queryRoomByUnit(unitId: string) { + let unitInfo = await resident_unitInfo(unitId); + if(unitInfo&&unitInfo.locationDetail){ + await formApi.setFieldValue('roomInfo', unitInfo.locationDetail); + await formApi.setFieldValue('area', unitInfo.area); + } +} diff --git a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue index 620cd3ef..ece8fcf4 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/houseCharge-update.vue @@ -6,7 +6,6 @@ import {cloneDeep} from '@vben/utils'; import {useVbenForm} from '#/adapter/form'; import { - houseChargeAdd, houseChargeInfo, houseChargeUpdate } from '#/api/property/costManagement/houseCharge'; @@ -123,11 +122,11 @@ async function handleClosed() { {{ record.startTime }} - - {{ room?.roomNumber }} + + {{ record.residentUnitText }} - - {{ `${room?.area} (套内面积:${room?.insideInArea})` }} + + {{ `${record.area} (㎡)` }} {{ costItem?.unitPrice }} diff --git a/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts b/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts index f265f3d3..13819166 100644 --- a/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts +++ b/apps/web-antd/src/views/property/costManagement/paymentReview/data.ts @@ -5,11 +5,11 @@ import { getDictOptions } from '#/utils/dict'; import { renderDict } from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ - { - component: 'Input', - fieldName: 'roomNumber', - label: '房屋', - }, + // { + // component: 'Input', + // fieldName: 'roomNumber', + // label: '房屋', + // }, { component: 'Select', componentProps: { diff --git a/apps/web-antd/src/views/screen/property/index.vue b/apps/web-antd/src/views/screen/property/index.vue index d5ab9a0b..540b8da1 100644 --- a/apps/web-antd/src/views/screen/property/index.vue +++ b/apps/web-antd/src/views/screen/property/index.vue @@ -42,7 +42,7 @@
设备总数 - 500 + {{total}}
@@ -160,6 +160,7 @@