fix: 修复保洁绿植bug
This commit is contained in:
parent
031c744877
commit
b44caa166a
@ -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();
|
||||||
|
@ -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'
|
||||||
},
|
},
|
||||||
|
|
||||||
];
|
];
|
||||||
|
@ -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>
|
||||||
|
@ -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',
|
||||||
|
@ -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',
|
||||||
|
Loading…
Reference in New Issue
Block a user