Browse Source

制品子件报废-编辑得时候,子表字段不可编辑

hella_online_20241024
yufei_wang 1 month ago
parent
commit
c8887e92ab
  1. 31
      src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

31
src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue

@ -776,36 +776,29 @@ const openForm =async (type: string, row?: number) => {
defaultButtons.formCloseBtn(null) //
]
if(type == 'create'){
ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'workshopCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = true
}
if (item.field == 'scrappingReason'){
item.value = ''
}
if(item.field == 'productionLineCode'){
item.componentProps.disabled = false
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
}
if(item.field == 'q3Number' || item.field == 'costCenterCode' || item.field == 'reasonCodeRequisition' || item.field == 'workshopCode' || item.field == 'productionLineCode'){
// Q3 线
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
}
if (item.field == 'scrappingReason'){ //
item.value = ''
item.componentProps.disabled = false
}
})
formRef.value.open(type, row)
}
if(type == 'update'){
ProductscrapRequestMain.allSchemas.formSchema.forEach((item) => {
if (item.field == 'workshopCode') {
item.componentProps.disabled = true
item.componentProps.isSearchList = false
}
if(item.field == 'productionLineCode'){
item.componentProps.enterSearch = true
item.componentProps.isSearchList = true
}
if(item.field == 'productionLineCode'){
item.componentProps.disabled = true
if(item.field == 'q3Number' || item.field == 'costCenterCode' || item.field == 'reasonCodeRequisition' || item.field == 'workshopCode' || item.field == 'productionLineCode'){
// Q3 线
item.componentProps.enterSearch = false
item.componentProps.isSearchList = false
}
@ -817,7 +810,7 @@ const openForm =async (type: string, row?: number) => {
updateData['masterId'] = row['masterId']
tableData.value = updateData.subList||[]
tableData.value.forEach(item=>{
item['bomVersionInitOptions'] = item['bomList'].map(item1=>({
item['bomVersionInitOptions'] = item['bomList']?.map(item1=>({
label:item1,
value:item1
}))

Loading…
Cancel
Save