|
|
@ -44,6 +44,7 @@ |
|
|
|
ref="formRef" |
|
|
|
@success="getList" |
|
|
|
:rules="ItemareaRules" |
|
|
|
:isOpenSearchTable="true" |
|
|
|
:formAllSchemas="Itemarea.allSchemas" |
|
|
|
:tableAllSchemas="ItemareaDetail.allSchemas" |
|
|
|
:tableFormRules="ItemareaDetailRules" |
|
|
@ -118,11 +119,16 @@ const updataTableColumns = (val) => { |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(() => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
val.forEach(item=>{ |
|
|
|
const newRow = {...row} |
|
|
|
if(formField == 'locationCode') { |
|
|
|
row['locationCode'] = val[0]['code'] |
|
|
|
newRow['locationCode'] = item['code'] |
|
|
|
}else{ |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
newRow[formField] = item[searchField] |
|
|
|
} |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
|
|
|
|
}else{ |
|
|
|
const setV = {} |
|
|
|
if(formField == 'areaCode') { |
|
|
@ -135,8 +141,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
setV['outPackUnit'] = val[0]['packUnit'] |
|
|
|
}else if(formField == 'itemCode') { |
|
|
|
setV['itemCode'] = val[0]['code'] |
|
|
|
}else if(formField == 'repleinshFromArea') { |
|
|
|
setV['repleinshFromArea'] = val[0]['code'] |
|
|
|
}else{ |
|
|
|
setV[formField] = setV[0][searchField] |
|
|
|
} |
|
|
|