From ec59c7efb68964e046400ab236fafd8b61849cb1 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Tue, 13 Aug 2024 20:59:00 +0800 Subject: [PATCH] =?UTF-8?q?=E9=82=B1=E6=99=A8=EF=BC=9A=E9=A2=84=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E6=94=B6=E8=B4=A7=E7=94=B3=E8=AF=B7=E6=96=B0=E5=A2=9E?= =?UTF-8?q?,=E9=80=89=E6=8B=A9=E8=BD=A6=E9=97=B4=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E9=BB=98=E8=AE=A4PRC,=E8=A3=85=E9=85=8D=E7=9A=84=E9=BB=98?= =?UTF-8?q?=E8=AE=A4PRA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../productreceiptRequestMain/index.vue | 17 +++++++++++++++++ .../productreceiptAssembleRequestMain/index.vue | 17 ++++++++++++++++- 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 1ba04efcc..8abddc4c0 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -151,6 +151,8 @@ import dayjs from 'dayjs' import { getJmreportBaseUrl } from '@/utils/systemParam' import * as BomApi from "@/api/wms/bom"; import { formatDate } from '@/utils/formatTime' +import * as WorkshopApi from '@/api/wms/workshop' + // 制品收货申请 // 预生产收货申请 defineOptions({ name: 'ProductreceiptRequestMain' }) @@ -798,8 +800,23 @@ const searchTableSuccessLabel = async (formField, searchField, val, formRef, typ message.error('创建标签失败') }) } +const getDefaultWorkshopCode = async ()=>{ + let res = await WorkshopApi.getWorkshopPage({ + available: "TRUE" + }) + 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' + } + }) + } + } +} /** 初始化 **/ onMounted(async () => { + getDefaultWorkshopCode() getList() importTemplateData.templateUrl = await ProductreceiptRequestMainApi.importTemplate() }) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index db480fd1e..953c73c5f 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -151,6 +151,7 @@ import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import * as BomApi from "@/api/wms/bom"; import { formatDate } from '@/utils/formatTime' +import * as WorkshopApi from '@/api/wms/workshop' // 装配收货申请 defineOptions({ name: 'ProductreceiptRequestMainA' }) @@ -800,9 +801,23 @@ const searchTableSuccess1 = async (formField, searchField, val, formRef, type, r message.error('创建标签失败') }) } - +const getDefaultWorkshopCode = async ()=>{ + let res = await WorkshopApi.getWorkshopPage({ + available: "TRUE" + }) + 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 = 'PRA' + } + }) + } + } +} /** 初始化 **/ onMounted(async () => { + getDefaultWorkshopCode() getList() importTemplateData.templateUrl = await ProductreceiptRequestMainApi.importTemplate() })