|
|
@ -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') { |
|
|
|
if(formField == 'locationCode') { |
|
|
|
row['locationCode'] = val[0]['code'] |
|
|
|
}else{ |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
val.forEach(item=>{ |
|
|
|
const newRow = {...row} |
|
|
|
if(formField == 'locationCode') { |
|
|
|
newRow['locationCode'] = item['code'] |
|
|
|
}else{ |
|
|
|
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] |
|
|
|
} |
|
|
|