diff --git a/apps/web-antd/src/api/property/rentalPlan/model.d.ts b/apps/web-antd/src/api/property/rentalPlan/model.d.ts index 207ff539..b51af708 100644 --- a/apps/web-antd/src/api/property/rentalPlan/model.d.ts +++ b/apps/web-antd/src/api/property/rentalPlan/model.d.ts @@ -35,14 +35,17 @@ export interface RentalPlanVO { * 备注 */ remarks: string; - + /** + * 绿植产品包 + */ + productList: any[]; } export interface RentalPlanForm extends BaseEntity { /** * 主键 */ - id?: string | number; + id?: string | number | undefined; /** * 方案名称 diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue b/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue index 83cd446f..f4272eaf 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/clean-detail-modal.vue @@ -31,6 +31,7 @@ const detailSchema = [ fieldName: 'name', component: 'ApiSelect', componentProps: { + disabled: isView, api: async () => { const res = await cleanList({stater:1}); cleanListData = res.rows || []; @@ -64,6 +65,7 @@ const detailSchema = [ component: 'InputNumber', rules: 'required', componentProps: { + disabled: isView, onChange: async (value: number) => { const formValues = await formApi.getValues(); if (formValues.peices && value) { @@ -182,8 +184,7 @@ const [BasicModal, modalApi] = useVbenModal({ if(!data || Object.keys(data).length === 0){ //modalApi.getData()为空时表示添加 isAdd.value = true; - }else if(detailIndex.value == undefined || detailIndex.value == null){ - //不存在detailIndex.value时表示查看 + }else if(data.readonly){ isView.value = true; }else{ //表示编辑 @@ -203,22 +204,21 @@ async function handleConfirm() { if (!valid) { return; } - const data = cloneDeep(await formApi.getValues()); - console.log(data); - + let data = cloneDeep(await formApi.getValues()); // 获取选中的服务名称 const selectedService = cleanListData.find(item => item.id === data.name); if (selectedService) { data.name = selectedService.name; data.id = selectedService.id } - //index>=0时表示编辑 - if (detailIndex.value! >= 0) { + if (isUpdate.value) { + data.index = detailIndex.value; emit('editReload', data); + }else if(isAdd.value){ + emit('reload', data); } handleClosed() await markInitialized(); - emit('reload', data); modalApi.close(); } catch (error) { console.error(error); diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue index 551b9a80..1a7a0774 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/clean-modal.vue @@ -275,11 +275,16 @@ function handleAddDetail() { } // 添加订单服务详情 function handleDetailReload(data: any) { + console.log(data,'afawed'); + detailTable.value.push(data); } // 编辑订单服务详情 function handleEditDetailReload(data: any) { + console.log(data,'1203342423'); + detailTable.value[data.index] = data; + } // 删除订单服务详情 function handleDeleteDetail(record: any, index: number) { diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/data.ts b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/data.ts index 2cb2cbf6..4e746939 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/data.ts +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/data.ts @@ -54,6 +54,9 @@ export const columns: VxeGridProps['columns'] = [ { title: '租赁周期', field: 'rentalPeriod', + slots: { + default: 'rentalPeriod' + }, }, { title: '适用场景', @@ -124,16 +127,7 @@ export const modalSchema: FormSchemaGetter = () => [ component: 'Select', componentProps: { // 可选从DictEnum中获取 DictEnum.WY_KG 便于维护 - options: [ - { - label: '待支付', - value: 0, - }, - { - label: '已支付', - value: 1, - }, - ], + options: getDictOptions('wy_kg'), }, rules: 'selectRequired', }, diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue index 2e083765..ec31daa2 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/index.vue @@ -103,7 +103,7 @@ async function handleDelete(row: Required) { await tableApi.query(); } async function handleView(row: Required) { - modalApi.setData({ id: row.id, readonly: true,ab:"wegqw" }); + modalApi.setData({ id: row.id, readonly: true,}); modalApi.open(); } function handleMultiDelete() { @@ -156,10 +156,14 @@ function handleDownloadExcel() { +