From b2d64ecd82cbb3cb869169b9856444aeaaad8680 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Tue, 20 Aug 2024 15:24:52 +0800 Subject: [PATCH] =?UTF-8?q?HL-5463=20=E6=8A=A5=E5=B7=A5=E7=94=B3=E8=AF=B7?= =?UTF-8?q?=E4=B8=AD=E8=BD=A6=E9=97=B4=E4=BB=A3=E7=A0=81=E5=AD=97=E6=AE=B5?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E9=BB=98=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceiptRequestMain/index.vue | 21 +++++++++-------- .../index.vue | 23 ++++++++++--------- 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index ae2cdc531..a5be22d72 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -185,6 +185,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' import * as BomApi from '@/api/wms/bom' import { formatDate } from '@/utils/formatTime' import * as WorkshopApi from '@/api/wms/workshop' +import * as ConfigApi from '@/api/infra/config' // 制品收货申请 // 预生产收货申请 @@ -909,17 +910,17 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ }) } const getDefaultWorkshopCode = async () => { - let res = await WorkshopApi.getWorkshopPage({ - available: 'TRUE' + const data = await ConfigApi.getConfigPage({ + 'key':'predictProductreceiptWorkshopCode', + 'pageNo':1, + 'pageSize':10 }) - if (res && res.list.length > 0) { - if (res.list.find((item) => item.code == 'PRC')) { - ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => { - if (itemColumns.field == 'workshopCode') { - itemColumns.value = 'PRC' - } - }) - } + if(data&&data.list&&data.list.length>0){ + ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => { + if (itemColumns.field == 'workshopCode') { + itemColumns.value = data.list[0]['value'] + } + }) } } /** 初始化 **/ diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 8f147cfbe..dd7b5f91a 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -152,6 +152,7 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' import * as BomApi from "@/api/wms/bom"; import { formatDate } from '@/utils/formatTime' import * as WorkshopApi from '@/api/wms/workshop' +import * as ConfigApi from '@/api/infra/config' // 装配收货申请 defineOptions({ name: 'ProductreceiptRequestMainA' }) @@ -813,18 +814,18 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r message.error('创建标签失败') }) } -const getDefaultWorkshopCode = async ()=>{ - let res = await WorkshopApi.getWorkshopPage({ - available: "TRUE" +const getDefaultWorkshopCode = async () => { + const data = await ConfigApi.getConfigPage({ + 'key':'assembleProductreceiptWorkshopCode', + 'pageNo':1, + 'pageSize':10 }) - if(res&&res.list.length>0){ - if(res.list.find(item=>item.code=='PRA')){ - ProductreceiptRequestMain.allSchemas.formSchema.map(itemColumns => { - if(itemColumns.field == 'workshopCode') { - itemColumns.value = 'PRA' - } - }) - } + if(data&&data.list&&data.list.length>0){ + ProductreceiptRequestMain.allSchemas.formSchema.map((itemColumns) => { + if (itemColumns.field == 'workshopCode') { + itemColumns.value = data.list[0]['value'] + } + }) } } /** 初始化 **/