diff --git a/apps/web-antd/src/api/property/costManagement/costItemSetting/index.ts b/apps/web-antd/src/api/property/costManagement/costItemSetting/index.ts index b97c3125..35f91ca7 100644 --- a/apps/web-antd/src/api/property/costManagement/costItemSetting/index.ts +++ b/apps/web-antd/src/api/property/costManagement/costItemSetting/index.ts @@ -12,7 +12,7 @@ import { requestClient } from '#/api/request'; * @returns 费用项设置列表 */ export function costItemSettingList(params?: CostItemSettingQuery) { - return requestClient.get>('/property/costItemSetting/list', { params }); + return requestClient.get>('/property/costItems/list', { params }); } /** @@ -21,7 +21,7 @@ export function costItemSettingList(params?: CostItemSettingQuery) { * @returns 费用项设置列表 */ export function costItemSettingExport(params?: CostItemSettingQuery) { - return commonExport('/property/costItemSetting/export', params ?? {}); + return commonExport('/property/costItems/export', params ?? {}); } /** @@ -30,7 +30,7 @@ export function costItemSettingExport(params?: CostItemSettingQuery) { * @returns 费用项设置详情 */ export function costItemSettingInfo(id: ID) { - return requestClient.get(`/property/costItemSetting/${id}`); + return requestClient.get(`/property/costItems/${id}`); } /** @@ -39,7 +39,7 @@ export function costItemSettingInfo(id: ID) { * @returns void */ export function costItemSettingAdd(data: CostItemSettingForm) { - return requestClient.postWithMsg('/property/costItemSetting', data); + return requestClient.postWithMsg('/property/costItems', data); } /** @@ -48,7 +48,7 @@ export function costItemSettingAdd(data: CostItemSettingForm) { * @returns void */ export function costItemSettingUpdate(data: CostItemSettingForm) { - return requestClient.putWithMsg('/property/costItemSetting', data); + return requestClient.putWithMsg('/property/costItems', data); } /** @@ -57,5 +57,5 @@ export function costItemSettingUpdate(data: CostItemSettingForm) { * @returns void */ export function costItemSettingRemove(id: ID | IDS) { - return requestClient.deleteWithMsg(`/property/costItemSetting/${id}`); + return requestClient.deleteWithMsg(`/property/costItems/${id}`); } diff --git a/apps/web-antd/src/api/property/costManagement/meterReadingType/index.ts b/apps/web-antd/src/api/property/costManagement/meterReadingType/index.ts new file mode 100644 index 00000000..a68da780 --- /dev/null +++ b/apps/web-antd/src/api/property/costManagement/meterReadingType/index.ts @@ -0,0 +1,61 @@ +import type { MeterReadingTypeVO, MeterReadingTypeForm, MeterReadingTypeQuery } 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 meterReadingTypeList(params?: MeterReadingTypeQuery) { + return requestClient.get>('/property/meterReadingType/list', { params }); +} + +/** + * 导出抄表类型列表 + * @param params + * @returns 抄表类型列表 + */ +export function meterReadingTypeExport(params?: MeterReadingTypeQuery) { + return commonExport('/property/meterReadingType/export', params ?? {}); +} + +/** + * 查询抄表类型详情 + * @param id id + * @returns 抄表类型详情 + */ +export function meterReadingTypeInfo(id: ID) { + return requestClient.get(`/property/meterReadingType/${id}`); +} + +/** + * 新增抄表类型 + * @param data + * @returns void + */ +export function meterReadingTypeAdd(data: MeterReadingTypeForm) { + return requestClient.postWithMsg('/property/meterReadingType', data); +} + +/** + * 更新抄表类型 + * @param data + * @returns void + */ +export function meterReadingTypeUpdate(data: MeterReadingTypeForm) { + return requestClient.putWithMsg('/property/meterReadingType', data); +} + +/** + * 删除抄表类型 + * @param id id + * @returns void + */ +export function meterReadingTypeRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/property/meterReadingType/${id}`); +} diff --git a/apps/web-antd/src/api/property/costManagement/meterReadingType/model.d.ts b/apps/web-antd/src/api/property/costManagement/meterReadingType/model.d.ts new file mode 100644 index 00000000..39ddfe1f --- /dev/null +++ b/apps/web-antd/src/api/property/costManagement/meterReadingType/model.d.ts @@ -0,0 +1,79 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface MeterReadingTypeVO { + /** + * 主键 + */ + id: string | number; + + /** + * 抄表类型 + */ + meterType: string; + + /** + * 名称 + */ + name: string; + + /** + * 说明 + */ + remark: string; + + /** + * 搜索值 + */ + searchValue: string; + +} + +export interface MeterReadingTypeForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 抄表类型 + */ + meterType?: string; + + /** + * 名称 + */ + name?: string; + + /** + * 说明 + */ + remark?: string; + + /** + * 搜索值 + */ + searchValue?: string; + +} + +export interface MeterReadingTypeQuery extends PageQuery { + /** + * 抄表类型 + */ + meterType?: string; + + /** + * 名称 + */ + name?: string; + + /** + * 搜索值 + */ + searchValue?: string; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/views/property/costManagement/costItemSetting/costItemSetting-modal.vue b/apps/web-antd/src/views/property/costManagement/costItemSetting/costItemSetting-modal.vue index 218e5c62..93022224 100644 --- a/apps/web-antd/src/views/property/costManagement/costItemSetting/costItemSetting-modal.vue +++ b/apps/web-antd/src/views/property/costManagement/costItemSetting/costItemSetting-modal.vue @@ -6,7 +6,7 @@ import { $t } from '@vben/locales'; import { cloneDeep } from '@vben/utils'; import { useVbenForm } from '#/adapter/form'; -import { costItemSettingAdd, costItemSettingInfo, costItemSettingUpdate } from '#/api/property/costItemSetting'; +import { costItemSettingAdd, costItemSettingInfo, costItemSettingUpdate } from '#/api/property/costManagement/costItemSetting'; import { defaultFormValueGetter, useBeforeCloseDiff } from '#/utils/popup'; import { modalSchema } from './data'; @@ -21,9 +21,9 @@ const title = computed(() => { const [BasicForm, formApi] = useVbenForm({ commonConfig: { // 默认占满两列 - formItemClass: 'col-span-2', + formItemClass: 'col-span-1', // 默认label宽度 px - labelWidth: 80, + labelWidth: 100, // 通用配置项 会影响到所有表单项 componentProps: { class: 'w-full', @@ -43,7 +43,7 @@ const { onBeforeClose, markInitialized, resetInitialized } = useBeforeCloseDiff( const [BasicModal, modalApi] = useVbenModal({ // 在这里更改宽度 - class: 'w-[550px]', + class: 'w-[60%]', fullscreenButton: false, onBeforeClose, onClosed: handleClosed, diff --git a/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts b/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts index d5240c1e..92f9bc96 100644 --- a/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts +++ b/apps/web-antd/src/views/property/costManagement/costItemSetting/data.ts @@ -5,77 +5,27 @@ import { getDictOptions } from '#/utils/dict'; import { renderDict } from '#/utils/render'; export const querySchema: FormSchemaGetter = () => [ - { - component: 'Select', - componentProps: { - // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 - options: getDictOptions('pro_expense_type'), - }, - fieldName: 'costType', - label: '费用类型', - }, { component: 'Input', fieldName: 'chargeItem', - label: '收费项目', + label: '费用编号', }, { - component: 'Input', + component: 'Select', fieldName: 'costMark', + componentProps: { + options: getDictOptions('pro_cost_identification'), + }, label: '费用标识', }, { component: 'Select', componentProps: { + options: getDictOptions('pro_payment_type'), }, fieldName: 'paymentType', label: '付费类型', }, - { - component: 'Input', - fieldName: 'chargeCycle', - label: '缴费周期', - }, - { - component: 'Input', - fieldName: 'isMobilePay', - label: '是否手机缴费', - }, - { - component: 'Input', - fieldName: 'roundingMode', - label: '进位方式', - }, - { - component: 'Input', - fieldName: 'currencyDecimals', - label: '保留小数', - }, - { - component: 'Input', - fieldName: 'state', - label: '启用状态', - }, - { - component: 'Input', - fieldName: 'formula', - label: '计算公式', - }, - { - component: 'Input', - fieldName: 'unitPrice', - label: '计费单价', - }, - { - component: 'Input', - fieldName: 'surcharge', - label: '附加费', - }, - { - component: 'Input', - fieldName: 'searchValue', - label: '搜索值', - }, ]; // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 @@ -83,8 +33,8 @@ export const querySchema: FormSchemaGetter = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { - title: '主键', - field: 'id', + title: '费用编号', + field: 'chargeItem', }, { title: '费用类型', @@ -103,31 +53,27 @@ export const columns: VxeGridProps['columns'] = [ { title: '费用标识', field: 'costMark', + slots: { + default: ({ row }) => { + // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 + return renderDict(row.costType, 'pro_cost_identification'); + }, + }, }, { title: '付费类型', field: 'paymentType', + slots: { + default: ({ row }) => { + // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 + return renderDict(row.costType, 'pro_payment_type'); + }, + }, }, { - title: '缴费周期', + title: '费用周期(月)', field: 'chargeCycle', }, - { - title: '是否手机缴费', - field: 'isMobilePay', - }, - { - title: '进位方式', - field: 'roundingMode', - }, - { - title: '保留小数', - field: 'currencyDecimals', - }, - { - title: '启用状态', - field: 'state', - }, { title: '计算公式', field: 'formula', @@ -137,13 +83,9 @@ export const columns: VxeGridProps['columns'] = [ field: 'unitPrice', }, { - title: '附加费', + title: '附加费用', field: 'surcharge', }, - { - title: '搜索值', - field: 'searchValue', - }, { field: 'action', fixed: 'right', @@ -182,7 +124,11 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '费用标识', fieldName: 'costMark', - component: 'Input', + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 + options: getDictOptions('pro_cost_identification'), + }, rules: 'required', }, { @@ -190,28 +136,44 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'paymentType', component: 'Select', componentProps: { + options: getDictOptions('pro_payment_type'), }, rules: 'selectRequired', }, { - label: '缴费周期', + label: '费用周期(月)', fieldName: 'chargeCycle', component: 'Input', }, { - label: '是否手机缴费', + label: '手机缴费', fieldName: 'isMobilePay', - component: 'Input', + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 + options: getDictOptions('pro_mobile_payment'), + }, + rules: 'selectRequired', }, { label: '进位方式', fieldName: 'roundingMode', - component: 'Input', + componentProps: { + // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 + options: getDictOptions('pro_carry_method'), + }, + component: 'Select', + rules: 'selectRequired', }, { label: '保留小数', fieldName: 'currencyDecimals', - component: 'Input', + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 + options: getDictOptions('pro_keep_decimals'), + }, + rules: 'selectRequired', }, { label: '启用状态', @@ -221,7 +183,13 @@ export const modalSchema: FormSchemaGetter = () => [ { label: '计算公式', fieldName: 'formula', - component: 'Input', + component: 'Select', + componentProps: { + // 可选从DictEnum中获取 DictEnum.PRO_EXPENSE_TYPE 便于维护 + options: getDictOptions('pro_calculation_formula'), + }, + rules: 'selectRequired', + formItemClass:'col-span-2', }, { label: '计费单价', @@ -233,9 +201,4 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'surcharge', component: 'Input', }, - { - label: '搜索值', - fieldName: 'searchValue', - component: 'Input', - }, ]; diff --git a/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue b/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue index afd89df3..8fc762fe 100644 --- a/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue +++ b/apps/web-antd/src/views/property/costManagement/costItemSetting/index.vue @@ -1,27 +1,20 @@