diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index 9979429f2..02730bae1 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -98,6 +98,7 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' +import * as BomApi from "@/api/wms/bom"; defineOptions({ name: 'ProcessproductionRequestMain' }) @@ -114,10 +115,24 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => nextTick(() => { if (type == 'tableForm') { if(formField === 'productionLine'){ - val.forEach(item=>{ + val.forEach(async item=>{ // if(tableData.value.find(item1=>item1['productionLine'] == item['productionLineCode'])) return const newRow = JSON.parse(JSON.stringify(tableFormKeys)) newRow['productionLine'] = item['productionLineCode'] + const param1 = { + productItemCode: formRef.formModel['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['componentItemCode'] = res.list[0].componentItemCode + } + }) tableData.value.push(newRow) }) }