|
@ -246,39 +246,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
const index1 = 0 |
|
|
const index1 = 0 |
|
|
setTableFormsValues(val, index1) |
|
|
setTableFormsValues(val, index1) |
|
|
} else if (formField == 'workStationCode') { |
|
|
} else if (formField == 'workStationCode') { |
|
|
const params = { |
|
|
// 获取管理精度 |
|
|
available: 'TRUE', |
|
|
const res = await ruleApi.getManagementPrecision({ |
|
|
pageSize: 20, |
|
|
itemCodes: [row['itemCode']], |
|
|
pageNo: 1, |
|
|
locationCode:val[0]['fgLocationCode'] |
|
|
code: val[0]['fgLocationCode'], |
|
|
}) |
|
|
name: '', |
|
|
if (res[0].ManagementPrecision == 'BY_BATCH') { |
|
|
areaCode: '', |
|
|
|
|
|
sort: '', |
|
|
|
|
|
by: 'ASC', |
|
|
|
|
|
} |
|
|
|
|
|
const res = await LocationApi.getLocationPage(params) |
|
|
|
|
|
console.log(222,res) |
|
|
|
|
|
const params1 = { |
|
|
|
|
|
available: 'TRUE', |
|
|
|
|
|
pageSize: 20, |
|
|
|
|
|
pageNo: 1, |
|
|
|
|
|
code: res.list[0].areaCode, |
|
|
|
|
|
name: '', |
|
|
|
|
|
type: '', |
|
|
|
|
|
manageMode:'' , |
|
|
|
|
|
sort: '', |
|
|
|
|
|
by: 'ASC', |
|
|
|
|
|
} |
|
|
|
|
|
const res1 = await AreaApi.getAreaPage(params1) |
|
|
|
|
|
if (res1.list[0].manageMode == 'BY_BATCH') { |
|
|
|
|
|
row['batch'] = formatTime(new Date(), 'yyyyMMdd') |
|
|
row['batch'] = formatTime(new Date(), 'yyyyMMdd') |
|
|
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
if(item.field == 'batch') |
|
|
if(item.field == 'batch') |
|
|
item.tableForm.disabled = false |
|
|
item.tableForm.disabled = false |
|
|
}) |
|
|
}) |
|
|
ProductreceiptRequestDetailRules.batch[0].required = true |
|
|
ProductreceiptRequestDetailRules.batch[0].required = true |
|
|
|
|
|
// 按数量管理批次清空不可输入 |
|
|
} else if (res1.list[0].manageMode == 'BY_QUANTITY') { |
|
|
} else if (res[0].ManagementPrecision == 'BY_QUANTITY') { |
|
|
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
ProductreceiptRequestDetail.allSchemas.tableFormColumns.forEach(item => { |
|
|
if(item.field == 'batch') |
|
|
if(item.field == 'batch') |
|
|
item.tableForm.disabled = true |
|
|
item.tableForm.disabled = true |
|
@ -286,7 +267,6 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
row['batch'] = '' |
|
|
row['batch'] = '' |
|
|
ProductreceiptRequestDetailRules.batch[0].required = false |
|
|
ProductreceiptRequestDetailRules.batch[0].required = false |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|
} else{ |
|
|
} else{ |
|
|
row[formField] = val[0][searchField] |
|
|
row[formField] = val[0][searchField] |
|
|