|
|
@ -293,7 +293,8 @@ const fromManagementPrecision = ref('') |
|
|
|
const toManagementPrecision = ref('') |
|
|
|
// 查询页面返回 |
|
|
|
const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => { |
|
|
|
nextTick(() => { |
|
|
|
nextTick(async () => { |
|
|
|
console.log(formField) |
|
|
|
if (type == 'tableForm') { |
|
|
|
if (formField == 'fromPackingNumber') { |
|
|
|
val = val.filter(item => !tableData.value.find(item1 => item1['itemCode'] == item['itemCode'] && item1['fromBatch'] == item['batch'] && item1['fromPackingNumber'] == item['packingNumber'] && item1['fromLocationCode'] == item['locationCode'] && item1['fromInventoryStatus'] == item['inventoryStatus'])) |
|
|
@ -313,7 +314,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
} else if (formField == 'toLocationCode') {//到库位代码 |
|
|
|
debugger |
|
|
|
//从批次 |
|
|
|
await ruleApi.getManagementPrecision({ |
|
|
|
itemCodes: [row['itemCode']], |
|
|
@ -331,18 +331,19 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
toManagementPrecision.value = res[0].ManagementPrecision |
|
|
|
}) |
|
|
|
if (toManagementPrecision.value != 'BY_QUANTITY') {//到批次+物料管理精度非数量需要添加批次 |
|
|
|
if(newRow['fromBatch']==''){ |
|
|
|
newRow['fromBatch'] = getFormattedDate(); // 获取 YYYYMMDD 格式的日期 |
|
|
|
if (row['fromBatch'] == '') { |
|
|
|
row['fromBatch'] = getFormattedDate(); // 获取 YYYYMMDD 格式的日期 |
|
|
|
} |
|
|
|
newRow['fromBatchFormItemType'] = 'FormDate' |
|
|
|
newRow['disabled_fromBatch'] = false |
|
|
|
row['fromBatchFormItemType'] = 'FormDate' |
|
|
|
row['disabled_fromBatch'] = false |
|
|
|
} else { |
|
|
|
newRow['fromBatchFormItemType'] = '' |
|
|
|
newRow['disabled_fromBatch'] = true |
|
|
|
row['fromBatchFormItemType'] = '' |
|
|
|
row['disabled_fromBatch'] = true |
|
|
|
} |
|
|
|
} else { |
|
|
|
row[formField] = val[0][searchField] |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
const setV = {} |
|
|
|
if (formField == 'fromWarehouseCode') { |
|
|
|