diff --git a/src/api/wms/processproductionRequestMain/index.ts b/src/api/wms/processproductionRequestMain/index.ts index 8783aebdb..d21a2406c 100644 --- a/src/api/wms/processproductionRequestMain/index.ts +++ b/src/api/wms/processproductionRequestMain/index.ts @@ -26,6 +26,18 @@ export const getProcessproductionRequestMainPage = async (params) => { } } + +// 查询工序报产子物料 +export const getProcessproductionChildBomPage = async (params) => { + if (params.isSearch) { + delete params.isSearch + const data = {...params} + return await request.post({ url: '/wms/processproduction-request-main/queryChildItemByParentCodeSenior', data }) + } else { + return await request.get({ url: `/wms/processproduction-request-main/queryChildItemByParentCodePage`, params }) + } +} + // 查询工序报产申请主详情 export const getProcessproductionRequestMain = async (id: number) => { return await request.get({ url: `/wms/processproduction-request-main/get?id=` + id }) diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index c6d753817..e4708e8f2 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -98,7 +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' }) @@ -119,20 +119,20 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => // 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 - } - }) + // 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) }) }else if(formField === 'processCode'){ @@ -140,7 +140,11 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => }else if(formField === 'locationCode'){ row['locationCode']=val[0]['code'] }else if(formField === 'componentItemCode'){ - row['componentItemCode']=val[0]['componentItemCode'] + row['componentItemCode']=val[0]['itemCode'] + row['locationCode']=val[0]['locationCode'] + row['batch']=val[0]['batch'] + row['componentItemcodeQty']=val[0]['qty'] + row['effectiveDate']=val[0]['produceDate'] } else { row[formField] = val[0][searchField] } diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts index b7fc626e8..469b3e238 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/processproductionRequestMain.data.ts @@ -10,6 +10,10 @@ import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import {Bom} from "@/views/wms/basicDataManage/itemManage/bom/bom.data"; import * as BomApi from "@/api/wms/bom"; +import * as BalanceApi from '@/api/wms/balance' +import * as ProcessproductionRequestMainApi from '@/api/wms/processproductionRequestMain' +import { Balance } from '@/views/wms/inventoryManage/balance/balance.data' + import { fa } from 'element-plus/es/locale' export const ProcessproductionRequestMain = useCrudSchemas(reactive([ @@ -447,63 +451,6 @@ export const ProcessproductionRequestDetail = useCrudSchemas(reactive