|
@ -173,25 +173,31 @@ const basicFormRef = ref() |
|
|
const openForm = (type: string, row?: any) => { |
|
|
const openForm = (type: string, row?: any) => { |
|
|
if(type == "update"){ |
|
|
if(type == "update"){ |
|
|
Itempackaging.allSchemas.formSchema.forEach((item) => { |
|
|
Itempackaging.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'itemCode') { |
|
|
if (item.field == 'itemCode') { |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.isSearchList = false |
|
|
item.componentProps.isSearchList = false |
|
|
} |
|
|
} |
|
|
if (item.field == 'packUnit') { |
|
|
if (item.field == 'packUnit') { |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.disabled = true |
|
|
item.componentProps.isSearchList = false |
|
|
item.componentProps.isSearchList = false |
|
|
} |
|
|
} |
|
|
}) |
|
|
if (item.field == 'packType') { |
|
|
|
|
|
item.componentProps.disabled = false |
|
|
|
|
|
} |
|
|
|
|
|
}) |
|
|
}else { |
|
|
}else { |
|
|
Itempackaging.allSchemas.formSchema.forEach((item) => { |
|
|
Itempackaging.allSchemas.formSchema.forEach((item) => { |
|
|
if (item.field == 'itemCode') { |
|
|
if (item.field == 'itemCode') { |
|
|
item.componentProps.disabled = false |
|
|
item.componentProps.disabled = false |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.isSearchList = true |
|
|
} |
|
|
} |
|
|
if (item.field == 'packUnit') { |
|
|
if (item.field == 'packUnit') { |
|
|
item.componentProps.disabled = false |
|
|
item.componentProps.disabled = false |
|
|
item.componentProps.isSearchList = true |
|
|
item.componentProps.isSearchList = true |
|
|
} |
|
|
} |
|
|
|
|
|
if (item.field == 'packType') { |
|
|
|
|
|
item.componentProps.disabled = true |
|
|
|
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
basicFormRef.value.open(type, row) |
|
|
basicFormRef.value.open(type, row) |
|
@ -261,6 +267,9 @@ const searchTableSuccess = (formField, searchField, val, formRef) => { |
|
|
if('itemCode'==formField){ |
|
|
if('itemCode'==formField){ |
|
|
setV['uom'] = val[0]['uom'] |
|
|
setV['uom'] = val[0]['uom'] |
|
|
} |
|
|
} |
|
|
|
|
|
if('packUnit'==formField){ |
|
|
|
|
|
setV['packType'] = val[0]['type'] |
|
|
|
|
|
} |
|
|
formRef.setValues(setV) |
|
|
formRef.setValues(setV) |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|