feat: 更新业务需求

This commit is contained in:
fyy
2025-09-12 22:58:12 +08:00
parent 917a16f941
commit 5cf469844a
6 changed files with 164 additions and 85 deletions

View File

@@ -33,6 +33,16 @@ const modalSchema = [
triggerFields: [''],
},
},
{
label: '订单号',
fieldName: 'orderNo',
component: 'Input',
dependencies: {
show: () => isUpdate.value,
triggerFields: [''],
},
disabled: true,
},
{
label: '订单号',
fieldName: 'orderId',
@@ -42,15 +52,20 @@ const modalSchema = [
resultField: 'rows',
labelField: 'orderNo',
valueField: 'id',
onChange: async (value: string, option: any) => {
onChange: async (value: any, option: any) => {
console.log(option);
await formApi.setValues({
residentUnitId: option.residentUnitId, // 假设订单数据中有 residentUnitId 字段
// 其他需要自动填充的字段
});
},
},
disabled: isUpdate.value ? true : false,
rules: 'required',
dependencies: {
show: () => !isUpdate.value,
triggerFields: [''],
},
},
{
component: 'ApiSelect',
@@ -214,7 +229,7 @@ const [BasicModal, modalApi] = useVbenModal({
record.paymentMethod = record.paymentMethod?.toString();
record.invoiceType = record.invoiceType?.toString();
record.invoiceStatus = record.invoiceStatus?.toString();
record.orderId = record.orderId;
record.orderNo = record.rentalOrder?.orderNo;
record.residentUnitId = record.residentUnitId;
await formApi.setValues(record);
}