From 4fded72156b34982ad6eacd0cbef23b090bd0648 Mon Sep 17 00:00:00 2001 From: "YEJIAXING-PC\\lenovo" <591141169@qq.com> Date: Fri, 27 Dec 2024 09:10:52 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BE=9B=E5=BA=94=E5=95=86=E5=8F=91=E8=B4=A7?= =?UTF-8?q?=E7=94=B3=E8=AF=B7=E6=89=93=E5=8D=B0=E5=8F=91=E8=B4=A7=E5=8D=95?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../supplierdeliverRequestMain/index.vue | 38 ++++++++++++++++--- 1 file changed, 33 insertions(+), 5 deletions(-) diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index b315adf95..308786f2b 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -209,6 +209,7 @@ import { CurriculumVitaeRules } from '../supplierdeliverInspectionDetail/supplierdeliverInspectionDetail.data' import * as SupplierdeliverRequestMainApi from '@/api/wms/supplierdeliverRequestMain' +import * as SupplierdeliverRecordMainApi from '@/api/wms/supplierdeliverRecordMain' import * as SupplierdeliverRequestDetailApi from '@/api/wms/supplierdeliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as PurchasePlanDetailApi from '@/api/wms/purchasePlanDetail' @@ -1273,14 +1274,41 @@ const documentSrc = ref(BASE_URL + '/jmreport/view/1019060741381099520?token=' + // 品番状态是号试显示生准订单的发货单模版 const documentSrc2 = ref(BASE_URL + '/jmreport/view/1019406772438372352?token=' + getAccessToken()) const handleDocumentPrint = async (id, stausId) => { - await SupplierdeliverRequestMainApi.getItemStatus(stausId).then(async (res) => { - if (res) { + // await SupplierdeliverRequestMainApi.getItemStatus(stausId).then(async (res) => { + // if (res) { + // //号试(生准订单)模板 + // window.open(documentSrc2.value + '&id=' + id) + // } else { + // window.open(documentSrc.value + '&id=' + id) + // } + // }) + await SupplierdeliverRecordMainApi.getPoLineType(id).then(async (res) => { + if (res.isM && res.haveNOM == false) { //号试(生准订单)模板 - window.open(documentSrc2.value + '&id=' + id) - } else { - window.open(documentSrc.value + '&id=' + id) + window.open(documentSrc2.value + '&id=' + id + '&type=' + 'M') + } + if (res.isM && res.haveNOM && res.noMAndItemStatus == '生准订单') { + //号试(生准订单)模板 + window.open(documentSrc2.value + '&id=' + id ) + } + if (res.isM && res.haveNOM && res.noMAndItemStatus != '生准订单') { + //(生准订单)模板 M型物料 + window.open(documentSrc.value + '&id=' + id+ '&type=' + 'M') + //(补给品订单)模板 + window.open(documentSrc.value + '&id=' + id) + } + if (res.isM == false) { + await SupplierdeliverRecordMainApi.getItemStatus(id).then(async (res) => { + if (res) { + //号试(生准订单)模板 + window.open(documentSrc2.value + '&id=' + id) + } else { + window.open(documentSrc.value + '&id=' + id) + } + }) } }) + } /**