From 4819f881edfd4c2a12089e116fa62e29fbb16ee0 Mon Sep 17 00:00:00 2001 From: FLL <2162874245@qq.com> Date: Fri, 27 Jun 2025 15:55:02 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B6=E8=B4=B9=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../api/property/chargeManagement/index.ts | 59 ++++ .../api/property/chargeManagement/model.d.ts | 204 ++++++++++++++ .../api/property/productManagement/index.ts | 2 - .../chargeManagement/data.ts | 257 ++++++++++++++++++ .../chargeManagement/index.vue | 160 ++++++++++- .../chargeManagement/orderCharge-modal.vue | 90 ++++++ .../productManagement/data.ts | 17 +- .../productManagement/index.vue | 22 +- .../plantsProduct-detail.vue | 1 - .../productManagement/plantsProduct-modal.vue | 13 +- 10 files changed, 771 insertions(+), 54 deletions(-) create mode 100644 apps/web-antd/src/api/property/chargeManagement/index.ts create mode 100644 apps/web-antd/src/api/property/chargeManagement/model.d.ts create mode 100644 apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts create mode 100644 apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue diff --git a/apps/web-antd/src/api/property/chargeManagement/index.ts b/apps/web-antd/src/api/property/chargeManagement/index.ts new file mode 100644 index 00000000..37299e2c --- /dev/null +++ b/apps/web-antd/src/api/property/chargeManagement/index.ts @@ -0,0 +1,59 @@ +import type { OrderChargeVO, OrderChargeForm, OrderChargeQuery } 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 orderChargeList(params?: OrderChargeQuery) { + return requestClient.get>('/system/orderCharge/list', { params }); +} + +/** + * 导出绿植租赁-订单收费列表 + * @param params + * @returns 绿植租赁-订单收费列表 + */ +export function orderChargeExport(params?: OrderChargeQuery) { + return commonExport('/system/orderCharge/export', params ?? {}); +} + +/** + * 查询绿植租赁-订单收费详情 + * @param id id + * @returns 绿植租赁-订单收费详情 + */ +export function orderChargeInfo(id: ID) { + return requestClient.get(`/system/orderCharge/${id}`); +} + +/** + * 新增绿植租赁-订单收费 + * @param data + * @returns void + */ +export function orderChargeAdd(data: OrderChargeForm) { + return requestClient.postWithMsg('/system/orderCharge', data); +} + +/** + * 更新绿植租赁-订单收费 + * @param data + * @returns void + */ +export function orderChargeUpdate(data: OrderChargeForm) { + return requestClient.putWithMsg('/system/orderCharge', data); +} + +/** + * 删除绿植租赁-订单收费 + * @param id id + * @returns void + */ +export function orderChargeRemove(id: ID | IDS) { + return requestClient.deleteWithMsg(`/system/orderCharge/${id}`); +} diff --git a/apps/web-antd/src/api/property/chargeManagement/model.d.ts b/apps/web-antd/src/api/property/chargeManagement/model.d.ts new file mode 100644 index 00000000..68cc125c --- /dev/null +++ b/apps/web-antd/src/api/property/chargeManagement/model.d.ts @@ -0,0 +1,204 @@ +import type { PageQuery, BaseEntity } from '#/api/common'; + +export interface OrderChargeVO { + /** + * 主键 + */ + id: string | number; + + /** + * 订单id + */ + orderId: string | number; + + /** + * 租赁人id(系统用户) + */ + userId: string | number; + + /** + * 租赁人名称 + */ + userName: string; + + /** + * 租金 + */ + rent: number; + + /** + * 押金 + */ + deposit: number; + + /** + * 违约金 + */ + penalty: number; + + /** + * 总金额 + */ + totalAmount: number; + + /** + * 收费日期 + */ + chargeDate: string; + + /** + * 支付方式 + */ + paymentMethod: number; + + /** + * 开票状态 + */ + invoiceStatus: number; + + /** + * 发票类型 + */ + invoiceType: number; + + /** + * 收费状态 + */ + chargeStatus: number; + +} + +export interface OrderChargeForm extends BaseEntity { + /** + * 主键 + */ + id?: string | number; + + /** + * 订单id + */ + orderId?: string | number; + + /** + * 租赁人id(系统用户) + */ + userId?: string | number; + + /** + * 租赁人名称 + */ + userName?: string; + + /** + * 租金 + */ + rent?: number; + + /** + * 押金 + */ + deposit?: number; + + /** + * 违约金 + */ + penalty?: number; + + /** + * 总金额 + */ + totalAmount?: number; + + /** + * 收费日期 + */ + chargeDate?: string; + + /** + * 支付方式 + */ + paymentMethod?: number; + + /** + * 开票状态 + */ + invoiceStatus?: number; + + /** + * 发票类型 + */ + invoiceType?: number; + + /** + * 收费状态 + */ + chargeStatus?: number; + +} + +export interface OrderChargeQuery extends PageQuery { + /** + * 订单id + */ + orderId?: string | number; + + /** + * 租赁人id(系统用户) + */ + userId?: string | number; + + /** + * 租赁人名称 + */ + userName?: string; + + /** + * 租金 + */ + rent?: number; + + /** + * 押金 + */ + deposit?: number; + + /** + * 违约金 + */ + penalty?: number; + + /** + * 总金额 + */ + totalAmount?: number; + + /** + * 收费日期 + */ + chargeDate?: string; + + /** + * 支付方式 + */ + paymentMethod?: number; + + /** + * 开票状态 + */ + invoiceStatus?: number; + + /** + * 发票类型 + */ + invoiceType?: number; + + /** + * 收费状态 + */ + chargeStatus?: number; + + /** + * 日期范围参数 + */ + params?: any; +} diff --git a/apps/web-antd/src/api/property/productManagement/index.ts b/apps/web-antd/src/api/property/productManagement/index.ts index 0ea10c5e..f5ca17ec 100644 --- a/apps/web-antd/src/api/property/productManagement/index.ts +++ b/apps/web-antd/src/api/property/productManagement/index.ts @@ -1,8 +1,6 @@ import type { PropertyVO, PropertyForm, PropertyQuery } 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'; diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts new file mode 100644 index 00000000..6df90566 --- /dev/null +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/data.ts @@ -0,0 +1,257 @@ +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: 'orderId', + label: '订单id', + }, + { + component: 'Input', + fieldName: 'userId', + label: '租赁人id', + }, + { + component: 'Input', + fieldName: 'userName', + label: '租赁人名称', + }, + { + component: 'Input', + fieldName: 'rent', + label: '租金', + }, + { + component: 'Input', + fieldName: 'deposit', + label: '押金', + }, + { + component: 'Input', + fieldName: 'penalty', + label: '违约金', + }, + { + component: 'Input', + fieldName: 'totalAmount', + label: '总金额', + }, + { + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + fieldName: 'chargeDate', + label: '收费日期', + }, + { + component: 'Select', + componentProps: { + options: getDictOptions('pro_payment_method'), + }, + fieldName: 'paymentMethod', + label: '支付方式', + }, + { + component: 'Select', + componentProps: { + options: getDictOptions('pro_invoice_status'), + }, + fieldName: 'invoiceStatus', + label: '开票状态', + }, + { + component: 'Input', + fieldName: 'invoiceType', + label: '发票类型', + }, + { + component: 'Select', + componentProps: { + options: getDictOptions('pro_charging_status'), + }, + fieldName: 'chargeStatus', + label: '收费状态', + }, +]; + +export const columns: VxeGridProps['columns'] = [ + { type: 'checkbox', width: 60 }, + { + title: '主键', + field: 'id', + }, + { + title: '订单id', + field: 'orderId', + }, + { + title: '租赁人id', + field: 'userId', + }, + { + title: '租赁人名称', + field: 'userName', + }, + { + title: '租金', + field: 'rent', + }, + { + title: '押金', + field: 'deposit', + }, + { + title: '违约金', + field: 'penalty', + }, + { + title: '总金额', + field: 'totalAmount', + }, + { + title: '收费日期', + field: 'chargeDate', + }, + { + title: '支付方式', + field: 'paymentMethod', + slots: { + default: ({ row }) => { + return renderDict(row.paymentMethod, 'pro_payment_method'); + }, + }, + }, + { + title: '开票状态', + field: 'invoiceStatus', + slots: { + default: ({ row }) => { + return renderDict(row.invoiceStatus, 'pro_invoice_status'); + }, + }, + }, + { + title: '发票类型', + field: 'invoiceType', + }, + { + title: '收费状态', + field: 'chargeStatus', + slots: { + default: ({ row }) => { + return renderDict(row.chargeStatus, 'pro_charging_status'); + }, + }, + }, + { + field: 'action', + fixed: 'right', + slots: { default: 'action' }, + title: '操作', + width: 180, + }, +]; + +export const modalSchema: FormSchemaGetter = () => [ + { + label: '主键', + fieldName: 'id', + component: 'Input', + dependencies: { + show: () => false, + triggerFields: [''], + }, + }, + { + label: '订单id', + fieldName: 'orderId', + component: 'Input', + rules: 'required', + }, + { + label: '租赁人id', + fieldName: 'userId', + component: 'Input', + rules: 'required', + }, + { + label: '租赁人名称', + fieldName: 'userName', + component: 'Input', + rules: 'required', + }, + { + label: '租金', + fieldName: 'rent', + component: 'Input', + rules: 'required', + }, + { + label: '押金', + fieldName: 'deposit', + component: 'Input', + rules: 'required', + }, + { + label: '违约金', + fieldName: 'penalty', + component: 'Input', + rules: 'required', + }, + { + label: '总金额', + fieldName: 'totalAmount', + component: 'Input', + rules: 'required', + }, + { + label: '收费日期', + fieldName: 'chargeDate', + component: 'DatePicker', + componentProps: { + showTime: true, + format: 'YYYY-MM-DD HH:mm:ss', + valueFormat: 'YYYY-MM-DD HH:mm:ss', + }, + rules: 'required', + }, + { + label: '支付方式', + fieldName: 'paymentMethod', + component: 'Select', + componentProps: { + options: getDictOptions('pro_payment_method'), + }, + rules: 'selectRequired', + }, + { + label: '开票状态', + fieldName: 'invoiceStatus', + component: 'Select', + componentProps: { + options: getDictOptions('pro_invoice_status'), + }, + rules: 'selectRequired', + }, + { + label: '发票类型', + fieldName: 'invoiceType', + component: 'Input', + rules: 'required', + }, + { + label: '收费状态', + fieldName: 'chargeStatus', + component: 'Select', + componentProps: { + options: getDictOptions('pro_charging_status'), + }, + rules: 'selectRequired', + }, +]; diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/index.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/index.vue index e52968aa..d861d716 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/index.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/index.vue @@ -1,5 +1,157 @@ + + \ No newline at end of file + + + + + + + + diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue new file mode 100644 index 00000000..786e7715 --- /dev/null +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/chargeManagement/orderCharge-modal.vue @@ -0,0 +1,90 @@ + + + + diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/data.ts index 0aff2409..085d0966 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/data.ts +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/data.ts @@ -1,6 +1,5 @@ import type { FormSchemaGetter } from '#/adapter/form'; import type { VxeGridProps } from '#/adapter/vxe-table'; - import { getDictOptions } from '#/utils/dict'; import { renderDict } from '#/utils/render'; @@ -8,26 +7,23 @@ export const querySchema: FormSchemaGetter = () => [ { component: 'Input', fieldName: 'plantName', - label: '产品名称:', + label: '产品名称', }, { component: 'Input', fieldName: 'specification', - label: '规格:', + label: '规格', }, { component: 'Select', componentProps: { - // 可选从DictEnum中获取 DictEnum.PRODUCT_MANAGEMENT_STATUS 便于维护 options: getDictOptions('product_management_status'), }, fieldName: 'state', - label: '状态:', + label: '状态', }, ]; -// 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 -// export const columns: () => VxeGridProps['columns'] = () => [ export const columns: VxeGridProps['columns'] = [ { type: 'checkbox', width: 60 }, { @@ -72,7 +68,6 @@ export const columns: VxeGridProps['columns'] = [ field: 'state', slots: { default: ({ row }) => { - // 可选从DictEnum中获取 DictEnum.PRODUCT_MANAGEMENT_STATUS 便于维护 return renderDict(row.state, 'product_management_status'); }, }, @@ -153,7 +148,6 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'state', component: 'Select', componentProps: { - // 可选从DictEnum中获取 DictEnum.PRODUCT_MANAGEMENT_STATUS 便于维护 options: getDictOptions('product_management_status'), }, rules: 'selectRequired', @@ -163,9 +157,4 @@ export const modalSchema: FormSchemaGetter = () => [ fieldName: 'remark', component: 'Input', }, - // { - // label: '创建时间', - // fieldName: 'creatTime', - // component: 'Input', - // }, ]; diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/index.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/index.vue index 442d05b2..2fb5b956 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/index.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/index.vue @@ -2,13 +2,11 @@ import { Page, useVbenModal, type VbenFormProps } from '@vben/common-ui'; import { getVxePopupContainer } from '@vben/utils'; import { Modal, Popconfirm, Space } from 'ant-design-vue'; - import { useVbenVxeGrid, vxeCheckboxChecked, type VxeGridProps } from '#/adapter/vxe-table'; - import { plantsProductExport, plantsProductList, @@ -16,12 +14,9 @@ import { } from '#/api/property/productManagement'; import type { PropertyForm } from '#/api/property/productManagement/model'; import { commonDownloadExcel } from '#/utils/file/download'; - import PlantsProductModal from './plantsProduct-modal.vue'; import PlantsProductDetail from './plantsProduct-detail.vue'; import { columns, querySchema } from './data'; -import unitInfoModal from "#/views/property/resident/unit/unit-detail.vue"; -import type {Resident_unitForm} from "#/api/property/resident/unit/model"; const formOptions: VbenFormProps = { commonConfig: { @@ -32,28 +27,13 @@ const formOptions: VbenFormProps = { }, schema: querySchema(), wrapperClass: 'grid-cols-1 md:grid-cols-2 lg:grid-cols-3 xl:grid-cols-4', - // 处理区间选择器RangePicker时间格式 将一个字段映射为两个字段 搜索/导出会用到 - // 不需要直接删除 - // fieldMappingTime: [ - // [ - // 'createTime', - // ['params[beginTime]', 'params[endTime]'], - // ['YYYY-MM-DD 00:00:00', 'YYYY-MM-DD 23:59:59'], - // ], - // ], }; const gridOptions: VxeGridProps = { checkboxConfig: { - // 高亮 highlight: true, - // 翻页时保留选中状态 reserve: true, - // 点击行选中 - // trigger: 'row', }, - // 需要使用i18n注意这里要改成getter形式 否则切换语言不会刷新 - // columns: columns(), columns, height: 'auto', keepSource: true, @@ -72,7 +52,6 @@ const gridOptions: VxeGridProps = { rowConfig: { keyField: 'id', }, - // 表格全局唯一表示 保存列配置需要用到 id: 'property-property-index' }; @@ -88,6 +67,7 @@ const [PlantsProduct, modalApi] = useVbenModal({ const [PlantsProductDetailModal, PlantsProductDetailApi] = useVbenModal({ connectedComponent: PlantsProductDetail, }); + async function handleInfo(row: Required) { PlantsProductDetailApi.setData({ id: row.id }); PlantsProductDetailApi.open(); diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-detail.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-detail.vue index 30b5532e..c6790a26 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-detail.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-detail.vue @@ -22,7 +22,6 @@ async function handleOpenChange(open: boolean) { modalApi.modalLoading(true); const {id} = modalApi.getData() as { id: number | string }; const response = await visitorManagementInfo(id); - // 赋值 plantsProductDetail.value = response; modalApi.modalLoading(false); } diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-modal.vue index fc0576f3..ece04978 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-modal.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/productManagement/plantsProduct-modal.vue @@ -1,30 +1,24 @@