From b8b4a256a8b6cb540887ba702204b7af938de9d7 Mon Sep 17 00:00:00 2001 From: zhaoxuebing <1291173720@qq.com> Date: Thu, 18 Jul 2024 16:51:01 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A5=E5=BA=8F=E6=8A=A5=E4=BA=A7=E4=BF=AE?= =?UTF-8?q?=E6=94=B9HL-3797?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../wms/processproductionRequestMain/index.ts | 12 + .../processproductionRequest/index.vue | 36 +-- .../processproductionRequestMain.data.ts | 245 ++++++++++++------ 3 files changed, 195 insertions(+), 98 deletions(-) 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