fix: 修复保洁绿植bug

This commit is contained in:
fyy 2025-07-11 11:37:04 +08:00
parent 031c744877
commit b44caa166a
5 changed files with 36 additions and 29 deletions

View File

@ -41,6 +41,7 @@ const isUpdate = ref(false);
const isReadonly = ref(false); const isReadonly = ref(false);
const isAudit = ref(false); const isAudit = ref(false);
const isRefund = ref(false); const isRefund = ref(false);
const rowData = ref<any>({});
const title = computed(() => { const title = computed(() => {
return isUpdate.value ? $t('pages.common.edit') : isReadonly.value ? '详情' : $t('pages.common.add'); return isUpdate.value ? $t('pages.common.edit') : isReadonly.value ? '详情' : $t('pages.common.add');
}); });
@ -123,16 +124,18 @@ const [BasicModal, modalApi] = useVbenModal({
// //
setupCommunitySelect() setupCommunitySelect()
modalApi.modalLoading(true); modalApi.modalLoading(true);
const { id, readonly,audit,refund } = modalApi.getData() as { const { id, readonly,audit,refund,row } = modalApi.getData() as {
id?: string; id?: string;
readonly?: boolean; readonly?: boolean;
audit?: boolean; audit?: boolean;
refund?: boolean; refund?: boolean;
row?: any;
}; };
editCleanOrderId.value = id || ''; editCleanOrderId.value = id || '';
isReadonly.value = !!readonly; isReadonly.value = !!readonly;
isAudit.value = !!audit; isAudit.value = !!audit;
isRefund.value = !!refund; isRefund.value = !!refund;
rowData.value = row;
// //
if(isReadonly.value){ if(isReadonly.value){
isUpdate.value = false; isUpdate.value = false;
@ -400,6 +403,10 @@ async function handleAudit(params: any) {
return; return;
} }
const data = cloneDeep(await formApi.getValues()); const data = cloneDeep(await formApi.getValues());
if(rowData.value){
data.state = rowData.value.state;
data.isUnbooking = rowData.value?.isUnbooking;
}
// //
if (unitListData.length === 0) { if (unitListData.length === 0) {
const res = await resident_unitList(); const res = await resident_unitList();
@ -426,7 +433,6 @@ async function handleAudit(params: any) {
}else{ }else{
data.state = 2; data.state = 2;
} }
console.log(data,'data');
// 0 1 2 // 0 1 2
await clean_orderUpdate({...data,id:editCleanOrderId.value}) await clean_orderUpdate({...data,id:editCleanOrderId.value})
resetInitialized(); resetInitialized();

View File

@ -83,24 +83,24 @@ export const columns: VxeGridProps['columns'] = [
field: 'payState', field: 'payState',
width: '120', width: '120',
slots: { slots: {
default: ({ row }) => (row.state === 1 ? '已支付' : '待支付'), default: ({ row }) => (row.payState === 1 ? '已支付' : '待支付'),
}, },
}, },
{ {
title: '服务开始时间', title: '服务开始时间',
field: 'starTime', field: 'starTime',
width: 'auto', width: '200',
}, },
{ {
title: '服务结束时间', title: '服务结束时间',
field: 'endTime', field: 'endTime',
width: 'auto', width: '200',
},
{
title: '申请单位',
field: 'unit',
width: '150',
}, },
// {
// title: '申请单位',
// field: 'unit',
// width: '150',
// },
{ {
title: '申请人', title: '申请人',
field: 'persion', field: 'persion',
@ -109,7 +109,7 @@ export const columns: VxeGridProps['columns'] = [
{ {
title: '联系电话', title: '联系电话',
field: 'phone', field: 'phone',
width: 'auto', width: '250',
}, },
{ {
title: '订单状态', title: '订单状态',
@ -126,6 +126,7 @@ export const columns: VxeGridProps['columns'] = [
fixed: 'right', fixed: 'right',
slots: { default: 'action' }, slots: { default: 'action' },
title: '操作', title: '操作',
width:'200'
}, },
]; ];

View File

@ -136,7 +136,7 @@ function handleAudit(row:any) {
// //
// TODO: // TODO:
console.log('审核', row); 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(); modalApi.open();
} }
@ -144,7 +144,7 @@ function handleRefund(row:any) {
// 退 // 退
// TODO: 退 // TODO: 退
console.log('退定', row); 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(); modalApi.open();
} }
</script> </script>

View File

@ -103,14 +103,14 @@ const detailSchema = [
options: getDictOptions('pro_product_classification'), options: getDictOptions('pro_product_classification'),
}, },
}, },
{ // {
label: '图片', // label: '',
fieldName: 'imgPath', // fieldName: 'imgPath',
component: 'InputNumber', // component: 'InputNumber',
componentProps: { // componentProps: {
disabled: true, // disabled: true,
}, // },
}, // },
{ {
label: '规格', label: '规格',
fieldName: 'specification', fieldName: 'specification',

View File

@ -70,9 +70,9 @@ const [BasicModal, modalApi] = useVbenModal({
if ((isUpdate.value || isReadonly.value) && id) { if ((isUpdate.value || isReadonly.value) && id) {
const record = await rentalPlanInfo(id); const record = await rentalPlanInfo(id);
// 绿 // 绿
detailTable.value = record.productList.map((item:any) => {...item.product,Item.productNum}); // 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); // console.log(detailTable.value);
await formApi.setValues(record); await formApi.setValues(record);
} }
@ -120,11 +120,11 @@ const detailColumns = [
{ title: '产品名称', dataIndex: 'plantName', key: 'plantName' }, { title: '产品名称', dataIndex: 'plantName', key: 'plantName' },
{ title: '产品分类', dataIndex: 'plantType', key: 'plantType' }, { title: '产品分类', dataIndex: 'plantType', key: 'plantType' },
{ title: '产品数量', dataIndex: 'productNum', key: 'productNum' }, { title: '产品数量', dataIndex: 'productNum', key: 'productNum' },
{ // {
title: '图片', // title: '',
dataIndex: 'imgPath', // dataIndex: 'imgPath',
key: 'imgPath', // key: 'imgPath',
}, // },
{ {
title: '规格', title: '规格',
dataIndex: 'specification', dataIndex: 'specification',