|
|
@ -42,6 +42,8 @@ |
|
|
|
<!-- 表单弹窗:添加/修改 --> |
|
|
|
<BasicForm |
|
|
|
ref="formRef" |
|
|
|
:isOpenSearchTable="true" |
|
|
|
fieldTableColumn="itemCode" |
|
|
|
@success="getList" |
|
|
|
:rules="ProductredressRequestMainRules" |
|
|
|
:formAllSchemas="ProductredressRequestMain.allSchemas" |
|
|
@ -123,19 +125,24 @@ const tableColumns = ref([...ProductredressRequestMain.allSchemas.tableColumns,. |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(() => { |
|
|
|
if (type == 'tableForm') { |
|
|
|
if (formField == 'itemCode') { |
|
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
|
row['qty'] = val[0]['qty'] |
|
|
|
row['uom'] = val[0]['uom'] |
|
|
|
row['packingNumber'] = val[0]['packingNumber'] |
|
|
|
row['batch'] = val[0]['batch'] |
|
|
|
row['packQty'] = val[0]['packQty'] |
|
|
|
row['packUnit'] = val[0]['packUnit'] |
|
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
|
row['toLocationCode'] = val[0]['locationCode'] |
|
|
|
} |
|
|
|
// 明细查询页赋值 |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
if (formField == 'itemCode') { |
|
|
|
if(tableData.value.find(item1=>item1['id'] == item['id'])) return |
|
|
|
val.forEach(item=>{ |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow['itemCode'] = item['itemCode'] |
|
|
|
newRow['qty'] = item['qty'] |
|
|
|
newRow['uom'] = item['uom'] |
|
|
|
newRow['packingNumber'] = item['packingNumber'] |
|
|
|
newRow['batch'] = item['batch'] |
|
|
|
newRow['packQty'] = item['packQty'] |
|
|
|
newRow['packUnit'] = item['packUnit'] |
|
|
|
newRow['inventoryStatus'] = item['inventoryStatus'] |
|
|
|
newRow['toLocationCode'] = item['locationCode'] |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
setV[formField] = val[0][searchField] |
|
|
|