From b44caa166ad31ee53d07e60bec4fec45898c482d Mon Sep 17 00:00:00 2001 From: fyy <2717885210@qq.com> Date: Fri, 11 Jul 2025 11:37:04 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E4=BF=9D=E6=B4=81?= =?UTF-8?q?=E7=BB=BF=E6=A4=8Dbug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../clean/cleanOrders/clean-modal.vue | 10 ++++++++-- .../views/property/clean/cleanOrders/data.ts | 19 ++++++++++--------- .../property/clean/cleanOrders/index.vue | 4 ++-- .../rentalPlan-detial-modal.vue | 16 ++++++++-------- .../rentalPlan-modal.vue | 16 ++++++++-------- 5 files changed, 36 insertions(+), 29 deletions(-) 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 a7952c01..28d217e5 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 @@ -41,6 +41,7 @@ const isUpdate = ref(false); const isReadonly = ref(false); const isAudit = ref(false); const isRefund = ref(false); +const rowData = ref({}); const title = computed(() => { return isUpdate.value ? $t('pages.common.edit') : isReadonly.value ? '详情' : $t('pages.common.add'); }); @@ -123,16 +124,18 @@ const [BasicModal, modalApi] = useVbenModal({ // 查询服务地址树形结构 setupCommunitySelect() modalApi.modalLoading(true); - const { id, readonly,audit,refund } = modalApi.getData() as { + const { id, readonly,audit,refund,row } = modalApi.getData() as { id?: string; readonly?: boolean; audit?: boolean; refund?: boolean; + row?: any; }; editCleanOrderId.value = id || ''; isReadonly.value = !!readonly; isAudit.value = !!audit; isRefund.value = !!refund; + rowData.value = row; //判断是否是编辑状态需要先判断是否是只读状态 if(isReadonly.value){ isUpdate.value = false; @@ -400,6 +403,10 @@ async function handleAudit(params: any) { return; } const data = cloneDeep(await formApi.getValues()); + if(rowData.value){ + data.state = rowData.value.state; + data.isUnbooking = rowData.value?.isUnbooking; + } // 单位数据缓存 if (unitListData.length === 0) { const res = await resident_unitList(); @@ -426,7 +433,6 @@ async function handleAudit(params: any) { }else{ data.state = 2; } - console.log(data,'data'); // 0:未审核 1:审核通过 2:审核不通过 await clean_orderUpdate({...data,id:editCleanOrderId.value}) resetInitialized(); diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts index e2ba796c..2a37486f 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/data.ts +++ b/apps/web-antd/src/views/property/clean/cleanOrders/data.ts @@ -83,24 +83,24 @@ export const columns: VxeGridProps['columns'] = [ field: 'payState', width: '120', slots: { - default: ({ row }) => (row.state === 1 ? '已支付' : '待支付'), + default: ({ row }) => (row.payState === 1 ? '已支付' : '待支付'), }, }, { title: '服务开始时间', field: 'starTime', - width: 'auto', + width: '200', }, { title: '服务结束时间', field: 'endTime', - width: 'auto', - }, - { - title: '申请单位', - field: 'unit', - width: '150', + width: '200', }, + // { + // title: '申请单位', + // field: 'unit', + // width: '150', + // }, { title: '申请人', field: 'persion', @@ -109,7 +109,7 @@ export const columns: VxeGridProps['columns'] = [ { title: '联系电话', field: 'phone', - width: 'auto', + width: '250', }, { title: '订单状态', @@ -126,6 +126,7 @@ export const columns: VxeGridProps['columns'] = [ fixed: 'right', slots: { default: 'action' }, title: '操作', + width:'200' }, ]; diff --git a/apps/web-antd/src/views/property/clean/cleanOrders/index.vue b/apps/web-antd/src/views/property/clean/cleanOrders/index.vue index 611c21cd..be5b2af8 100644 --- a/apps/web-antd/src/views/property/clean/cleanOrders/index.vue +++ b/apps/web-antd/src/views/property/clean/cleanOrders/index.vue @@ -136,7 +136,7 @@ function handleAudit(row:any) { // 审核逻辑 // TODO: 实现审核功能 console.log('审核', row); - modalApi.setData({ id: row.id, readonly: true,audit:true }); + modalApi.setData({ id: row.id, readonly: true,audit:true,row:row }); modalApi.open(); } @@ -144,7 +144,7 @@ function handleRefund(row:any) { // 退定逻辑 // TODO: 实现退定功能 console.log('退定', row); - modalApi.setData({ id: row.id, readonly: true,refund:true }); + modalApi.setData({ id: row.id, readonly: true,refund:true,row:row }); modalApi.open(); } diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue index eca4a956..f7af2e4f 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-detial-modal.vue @@ -103,14 +103,14 @@ const detailSchema = [ options: getDictOptions('pro_product_classification'), }, }, - { - label: '图片', - fieldName: 'imgPath', - component: 'InputNumber', - componentProps: { - disabled: true, - }, - }, + // { + // label: '图片', + // fieldName: 'imgPath', + // component: 'InputNumber', + // componentProps: { + // disabled: true, + // }, + // }, { label: '规格', fieldName: 'specification', diff --git a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue index a1c3a868..b6a9a9c2 100644 --- a/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue +++ b/apps/web-antd/src/views/property/greenPlantRentalManagement/leasePogramManagement/rentalPlan-modal.vue @@ -70,9 +70,9 @@ const [BasicModal, modalApi] = useVbenModal({ if ((isUpdate.value || isReadonly.value) && id) { const record = await rentalPlanInfo(id); // 后端返回绿植产品包列表结构处理 - detailTable.value = record.productList.map((item:any) => {...item.product,Item.productNum}); - - console.log(detailTable.value); + // detailTable.value = record.productList.map((item:any) => {...item.product,item.productNum,}); + detailTable.value = record.productList.map((item: any) => ({ ...item.product, productNum: item.productNum,productId: item.productId })); + // console.log(detailTable.value); await formApi.setValues(record); } @@ -120,11 +120,11 @@ const detailColumns = [ { title: '产品名称', dataIndex: 'plantName', key: 'plantName' }, { title: '产品分类', dataIndex: 'plantType', key: 'plantType' }, { title: '产品数量', dataIndex: 'productNum', key: 'productNum' }, - { - title: '图片', - dataIndex: 'imgPath', - key: 'imgPath', - }, + // { + // title: '图片', + // dataIndex: 'imgPath', + // key: 'imgPath', + // }, { title: '规格', dataIndex: 'specification',