|
@ -177,24 +177,30 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
if (type == 'tableForm') { |
|
|
if (type == 'tableForm') { |
|
|
// 明细查询页赋值 |
|
|
// 明细查询页赋值 |
|
|
if(formField == 'itemCode') { |
|
|
if(formField == 'itemCode') { |
|
|
|
|
|
if(tableData.value.find(item1=>item1['itemCode'] == val[0]['itemCode'])){ |
|
|
|
|
|
message.warning(`物料${val[0]['itemCode']}已经存在`) |
|
|
|
|
|
return |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const isType = await isItemType(val[0]['itemCode'], labelType.value) |
|
|
const isType = await isItemType(val[0]['itemCode'], labelType.value) |
|
|
if(!isType){ |
|
|
if(!isType){ |
|
|
message.warning('当前物料可制造与其他数据不一致,请重新选择!') |
|
|
message.warning('当前物料可制造与其他数据不一致,请重新选择!') |
|
|
} else { |
|
|
} else { |
|
|
|
|
|
|
|
|
row['batch'] = val[0]['batch']==''?formatTime(new Date(), 'yyyyMMdd'):val[0]['batch'] |
|
|
row['batch'] = val[0]['batch']==''?formatTime(new Date(), 'yyyyMMdd'):val[0]['batch'] |
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
row['itemCode'] = val[0]['itemCode'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
row['uom'] = val[0]['uom'] |
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
row['inventoryStatus'] = val[0]['inventoryStatus'] |
|
|
row['qty'] = val[0]['qty'] |
|
|
row['qty'] = Number(val[0]['qty']) |
|
|
// 修改 tableform 属性 数量最大值设置为库存余额中数量 |
|
|
// 修改 tableform 属性 数量最大值设置为库存余额中数量 |
|
|
ProductionreturnRequestDetail.allSchemas.tableFormColumns.map(item => { |
|
|
ProductionreturnRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
if(item.field == 'qty') { |
|
|
if(item.field == 'qty' && Number(val[0]['qty'])>item.tableForm.min) { |
|
|
item.tableForm.max = val[0]['qty'] |
|
|
item.tableForm.max = Number(val[0]['qty']) |
|
|
} |
|
|
} |
|
|
if(item.field == 'batch') { |
|
|
if(item.field == 'batch') { |
|
|
item.tableForm.disabled = false |
|
|
item.tableForm.disabled = false |
|
|
} |
|
|
} |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
} else if(formField == 'workStationCode') { |
|
|
} else if(formField == 'workStationCode') { |
|
|
val.forEach(item=>{ |
|
|
val.forEach(item=>{ |
|
|