diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index ef854e67a..2f6dfc3bf 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -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 { diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index 0afec4008..4d196be98 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -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"; // 装配计划 defineOptions({ name: 'ProductionMainAssemble' }) @@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // }).catch(err =>{ // console.log(err); // }) - val.forEach(item=>{ + val.forEach(async item=>{ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow[formField] = item[searchField] newRow['uom'] = item['uom'] + // 查看BOM版本 + 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 { diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 41164cefb..0592934c1 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -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"; // 装配备件计划 defineOptions({ name: 'ProductionMainASparePart' }) @@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // }).catch(err =>{ // console.log(err); // }) - val.forEach(item=>{ + val.forEach(async item=>{ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow[formField] = item[searchField] newRow['uom'] = item['uom'] + // 查看BOM版本 + 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 { diff --git a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue index 6aa22fecd..a4d22853c 100644 --- a/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainPredictSparePart/index.vue @@ -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"; // 预生产备件计划 defineOptions({ name: 'ProductionMainPredictSparePart' }) @@ -116,10 +117,25 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // }).catch(err =>{ // console.log(err); // }) - val.forEach(item=>{ + val.forEach(async item=>{ const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow[formField] = item[searchField] newRow['uom'] = item['uom'] + // 查看BOM版本 + 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 { diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 8263f8d62..c3a97d551 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -149,6 +149,7 @@ import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' import dayjs from 'dayjs' import { getJmreportBaseUrl } from '@/utils/systemParam' +import * as BomApi from "@/api/wms/bom"; // 制品收货申请 // 预生产收货申请 defineOptions({ name: 'ProductreceiptRequestMain' }) @@ -212,6 +213,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row['uom'] = val[0]['uom'] row['produceDate'] = dayjs().valueOf() row[formField] = val[0][searchField] + // 查看BOM版本 + const param1 = { + productItemCode: val[0]['itemCode'], + available: 'TRUE', + pageSize: 20, + pageNo: 1, + sort: '', + by: 'ASC', + } + BomApi.getBomPage(param1).then(res => { + console.log(res) + if(res?.list?.length>0){ + row['bomVersion'] = res.list[0].version + } + }) }else if (formField == 'workStationCode') { // 明细查询页赋值 val.forEach(item=>{ diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 6296dda1e..a066d3239 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -149,6 +149,7 @@ import * as PackageApi from '@/api/wms/package' import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' +import * as BomApi from "@/api/wms/bom"; // 装配收货申请 defineOptions({ name: 'ProductreceiptRequestMainA' }) @@ -213,6 +214,21 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => row['uom'] = val[0]['uom'] row['produceDate'] = dayjs().valueOf() row[formField] = val[0][searchField] + // 查看BOM版本 + const param1 = { + productItemCode: val[0]['itemCode'], + available: 'TRUE', + pageSize: 20, + pageNo: 1, + sort: '', + by: 'ASC', + } + BomApi.getBomPage(param1).then(res => { + console.log(res) + if(res?.list?.length>0){ + row['bomVersion'] = res.list[0].version + } + }) }else if (formField == 'workStationCode') { // 明细查询页赋值 val.forEach(item=>{ diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index d2be36d10..e9a80a163 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -136,6 +136,7 @@ import * as ItembasicApi from '@/api/wms/itembasic' import * as PackageApi from '@/api/wms/package' import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' +import * as BomApi from "@/api/wms/bom"; import { SupplierdeliverRequestPackage } from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' @@ -204,8 +205,21 @@ const searchTableSuccess = async (formField, searchField, val, formRef, type, ro row['uom'] = res[0]['uom'] } row[formField] = val[0][searchField] - - console.log('获取计量单位',res) + // 查看BOM版本 + const param1 = { + productItemCode: val[0]['itemCode'], + available: 'TRUE', + pageSize: 20, + pageNo: 1, + sort: '', + by: 'ASC', + } + BomApi.getBomPage(param1).then(res => { + console.log(res) + if(res?.list?.length>0){ + row['bomVersion'] = res.list[0].version + } + }) }else{ //添加明细 val.forEach(item=>{