|
|
@ -87,6 +87,7 @@ import * as ProductionMainApi from '@/api/wms/productionMain' |
|
|
|
import * as ProductionDetailApi from '@/api/wms/productionDetail' |
|
|
|
import * as defaultButtons from '@/utils/disposition/defaultButtons' |
|
|
|
import * as ItemBasicApi from '@/api/wms/itembasic' |
|
|
|
import * as BomApi from "@/api/wms/bom"; |
|
|
|
|
|
|
|
// 生产计划主 |
|
|
|
// 预生产计划 |
|
|
@ -119,10 +120,26 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => |
|
|
|
// }) |
|
|
|
if(formField=='itemCode'){ |
|
|
|
// row[formField] = val[0][searchField] |
|
|
|
val.forEach(item=>{ |
|
|
|
val.forEach(async item=>{ |
|
|
|
if(tableData.value.find(item1=>item1['id'] == item['id'])) return |
|
|
|
const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) |
|
|
|
newRow['id'] = item['id'] |
|
|
|
// 查看BOM版本 |
|
|
|
console.log(22,item) |
|
|
|
const param1 = { |
|
|
|
productItemCode: item['itemCode'], |
|
|
|
available: 'TRUE', |
|
|
|
pageSize: 20, |
|
|
|
pageNo: 1, |
|
|
|
sort: '', |
|
|
|
by: 'ASC', |
|
|
|
} |
|
|
|
await BomApi.getBomPage(param1).then(res => { |
|
|
|
console.log(res) |
|
|
|
if(res?.list?.length>0){ |
|
|
|
newRow['bomVersion'] = res.list[0].version |
|
|
|
} |
|
|
|
}) |
|
|
|
tableData.value.push(newRow) |
|
|
|
}) |
|
|
|
} else { |
|
|
|