From 97f298d8c7f0f0baccda8b658d37fc05291fc8f8 Mon Sep 17 00:00:00 2001 From: dev_ljl <2590379346@qq.com> Date: Sat, 19 Jul 2025 17:25:17 +0800 Subject: [PATCH] =?UTF-8?q?1=E3=80=81=E8=80=83=E5=8B=A4=E7=BB=84=E7=AE=A1?= =?UTF-8?q?=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../attendanceGroupSettings/index.ts | 61 ++++++ .../attendanceGroupSettings/model.d.ts | 69 +++++++ .../costManagement/houseCharge/index.ts | 4 + .../attendanceGroupSettings/data.ts | 169 ++++++++++++++++ .../attendanceGroupSettings/group-modal.vue | 146 ++++++++++++++ .../attendanceGroupSettings/index.vue | 180 +++++++++++++++++- .../costManagement/houseCharge/data.ts | 3 +- .../houseCharge/house-charge-refund.vue | 10 +- .../costManagement/returnPayFee/data.ts | 10 +- 9 files changed, 636 insertions(+), 16 deletions(-) create mode 100644 apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/index.ts create mode 100644 apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts create mode 100644 apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/data.ts create mode 100644 apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue diff --git a/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/index.ts b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/index.ts new file mode 100644 index 00000000..a7260b35 --- /dev/null +++ b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/index.ts @@ -0,0 +1,61 @@ +import type { GroupVO, GroupForm, GroupQuery } from './model'; + +import type { ID, IDS } from '#/api/common'; +import type { PageResult } from '#/api/common'; + +import { commonExport } from '#/api/helper'; +import { requestClient } from '#/api/request'; + +/** +* 查询考勤组基本信息列表 +* @param params +* @returns 考勤组基本信息列表 +*/ +export function groupList(params?: GroupQuery) { + return requestClient.get>('/Property/group/list', { params }); +} + +/** + * 导出考勤组基本信息列表 + * @param params + * @returns 考勤组基本信息列表 + */ +export function groupExport(params?: GroupQuery) { + return commonExport('/Property/group/export', params ?? {}); +} + +/** + * 查询考勤组基本信息详情 + * @param id id + * @returns 考勤组基本信息详情 + */ +export function groupInfo(id: ID) { + return requestClient.get(`/Property/group/${id}`); +} + +/** + * 新增考勤组基本信息 + * @param data + * @returns void + */ +export function groupAdd(data: GroupForm) { + return requestClient.postWithMsg('/Property/group', data); +} + +/** + * 更新考勤组基本信息 + * @param data + * @returns void + */ +export function groupUpdate(data: GroupForm) { + return requestClient.putWithMsg('/Property/group', data); +} + +/** + * 删除考勤组基本信息 + * @param id id + * @returns void + */ +export function groupRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/Property/group/${id}`); +} diff --git a/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts new file mode 100644 index 00000000..e189227b --- /dev/null +++ b/apps/web-antd/src/api/property/attendanceManagement/attendanceGroupSettings/model.d.ts @@ -0,0 +1,69 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface GroupVO { + /** + * 主键id + */ + id: string | number; + + /** + * 考勤组名称 + */ + groupName: string; + + /** + * 状态(1:启用,0:禁用) + */ + status: number; + + /** + * 考勤类型(0:固定班制,1:排班制) + */ + attendanceType: number; + +} + +export interface GroupForm extends BaseEntity { + /** + * 主键id + */ + id?: string | number; + + /** + * 考勤组名称 + */ + groupName?: string; + + /** + * 状态(1:启用,0:禁用) + */ + status?: number; + + /** + * 考勤类型(0:固定班制,1:排班制) + */ + attendanceType?: number; + +} + +export interface GroupQuery extends PageQuery { + /** + * 考勤组名称 + */ + groupName?: string; + + /** + * 状态(1:启用,0:禁用) + */ + status?: number; + + /** + * 考勤类型(0:固定班制,1:排班制) + */ + attendanceType?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/costManagement/houseCharge/index.ts b/apps/web-antd/src/api/property/costManagement/houseCharge/index.ts index c48acb4e..cbf2d544 100644 --- a/apps/web-antd/src/api/property/costManagement/houseCharge/index.ts +++ b/apps/web-antd/src/api/property/costManagement/houseCharge/index.ts @@ -42,6 +42,10 @@ export function houseChargeAdd(data: HouseChargeForm) { return requestClient.postWithMsg('/property/houseCharge', data); } +export function houseChargeRefund(data: HouseChargeForm) { + return requestClient.postWithMsg('/property/houseCharge/returnFee', data); +} + /** * 更新房屋收费 * @param data diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/data.ts b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/data.ts new file mode 100644 index 00000000..d270af7e --- /dev/null +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/data.ts @@ -0,0 +1,169 @@ +import type { FormSchemaGetter } from '#/adapter/form'; +import type { VxeGridProps } from '#/adapter/vxe-table'; +import {getDictOptions} from "#/utils/dict"; +import {renderDict} from "#/utils/render"; + + +export const querySchema: FormSchemaGetter = () => [ + { + component: 'Input', + fieldName: 'groupName', + label: '考勤组名称', + }, + { + component: 'Select', + componentProps: { + options:getDictOptions('wy_kqlx') + }, + fieldName: 'attendanceType', + label: '考勤类型', + }, +]; + +// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 +// export const columns: () => VxeGridProps['columns'] = () => [ +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '考勤组名称', + field: 'groupName', + minWidth:180, + }, + + { + title: '考勤类型', + field: 'attendanceType', + slots:{ + default: ({row})=>{ + return renderDict(row.attendanceType,'wy_kqlx') + } + }, + width:150 + }, + { + title: '状态', + field: 'status', + slots:{ + default: 'status' + }, + width:180 + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键id', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '考勤组名称', + fieldName: 'groupName', + component: 'Input', + rules: 'required', + }, + { + label: '考勤类型',//(0:固定班制,1:排班制) + fieldName: 'attendanceType', + component: 'RadioGroup', + componentProps: { + buttonStyle: 'solid', + options: getDictOptions('wy_kqlx'), + }, + rules: 'selectRequired', + defaultValue:'0' + }, + { + label: '工作日设置', + fieldName: 'weekdaySetting', + component: 'Input', + dependencies: { + show: (formValue) => formValue.attendanceType=='0', + triggerFields: ['attendanceType'], + }, + slots:{ + default:'weekdaySetting' + }, + rules:'required', + defaultValue:'1', + }, + { + label: '', + fieldName: 'settingItem', + component: 'Input', + dependencies: { + show: (formValue) => formValue.attendanceType=='0', + triggerFields: ['attendanceType'], + }, + slots:{ + default:'settingItem' + }, + }, + { + label: '考勤班次', + fieldName: 'attendanceShift', + component: 'Input', + dependencies: { + show: (formValue) => formValue.attendanceType=='1', + triggerFields: ['attendanceType'], + }, + slots:{ + default:'attendanceShift' + }, + rules:'required', + defaultValue:'1', + }, + { + label: '排班周期', + fieldName: 'schedulingCycle', + component: 'Input', + dependencies: { + show: (formValue) => formValue.attendanceType=='1', + triggerFields: ['attendanceType'], + }, + slots:{ + default:'schedulingCycle' + }, + defaultValue:'1', + rules:'required' + }, +]; + +export const weekdayColumns: VxeGridProps['columns'] = [ + { + title: '工作日', + name: 'label', + width:180, + align:'center', + dataIndex:'label' + }, + { + title: '班次', + name: 'shift', + minWidth:180, + align:'center', + dataIndex:'shift' + }, + { + title: '操作', + name: 'action', + dataIndex:'action', + width:180, + align:'center', + slots:{ + default:'action' + }, + + }, +] diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue new file mode 100644 index 00000000..769c01c1 --- /dev/null +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/group-modal.vue @@ -0,0 +1,146 @@ + + + + diff --git a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/index.vue b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/index.vue index 63016dc2..9b6c5ef0 100644 --- a/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/index.vue +++ b/apps/web-antd/src/views/property/attendanceManagement/attendanceGroupSettings/index.vue @@ -1,11 +1,181 @@ - - 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 62608784..d5a19777 100644 --- a/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts +++ b/apps/web-antd/src/views/property/costManagement/houseCharge/data.ts @@ -211,6 +211,7 @@ export const modalSchemaRefund: FormSchemaGetter = () => [ label: '退费原因', fieldName: 'reason', component: 'Textarea', - formItemClass: 'col-span-2' + formItemClass: 'col-span-2', + rules:'required' }, ] 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 31daf8da..4d068e2f 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 @@ -7,7 +7,7 @@ import {cloneDeep} from '@vben/utils'; import {useVbenForm} from '#/adapter/form'; import { houseChargeAdd, - houseChargeInfo, + houseChargeInfo, houseChargeRefund, houseChargeUpdate } from '#/api/property/costManagement/houseCharge'; import {defaultFormValueGetter, useBeforeCloseDiff} from '#/utils/popup'; @@ -83,9 +83,9 @@ async function handleConfirm() { } // getValues获取为一个readonly的对象 需要修改必须先深拷贝一次 const data = cloneDeep(await formApi.getValues()); - record.value.reason=data.reason - record.value.chargeStatus = '5' - await houseChargeUpdate(record.value) ; + data.costItemsId = record.value.costItemsId + data.personId = record.value.personId + await houseChargeRefund(data); resetInitialized(); emit('reload'); modalApi.close(); @@ -115,7 +115,7 @@ async function handleClosed() { diff --git a/apps/web-antd/src/views/property/costManagement/returnPayFee/data.ts b/apps/web-antd/src/views/property/costManagement/returnPayFee/data.ts index 1a89c3e7..0355a4ad 100644 --- a/apps/web-antd/src/views/property/costManagement/returnPayFee/data.ts +++ b/apps/web-antd/src/views/property/costManagement/returnPayFee/data.ts @@ -36,11 +36,11 @@ export const columns: VxeGridProps['columns'] = [ field: 'payAcount', width: 100, }, - { - title: '支付时间', - field: 'payTime', - width: 180, - }, + // { + // title: '支付时间', + // field: 'payTime', + // width: 180, + // }, { title: '退款原因', field: 'reason',