From 8fd9e43b8ae22e64c62afee56c24df682f8c47c9 Mon Sep 17 00:00:00 2001
From: zhuo <2089219845@qq.com>
Date: 星期日, 16 三月 2025 15:57:54 +0800
Subject: [PATCH] 成品下单下载为pdf

---
 src/views/business/productOrder/index.vue |   15 ++++++++++-----
 1 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/views/business/productOrder/index.vue b/src/views/business/productOrder/index.vue
index 46d1445..5ca78c6 100644
--- a/src/views/business/productOrder/index.vue
+++ b/src/views/business/productOrder/index.vue
@@ -307,7 +307,6 @@
 <script>
 import vueQr from 'vue-qr'
 import PrintJS from 'print-js'
-import file from "@/utils/file";
 import PrintDialog from "@/views/business/productOrder/components/printDialog.vue";
 import AddInspectionDia from "@/views/business/productOrder/components/addInspectionDia.vue";
 import limsTable from "@/components/Table/lims-table.vue";
@@ -321,8 +320,8 @@
 import { selectUserCondition } from "@/api/performance/class";
 import { downFile, getFileList, selectSampleAndProductByOrderId } from "@/api/business/rawMaterialOrder";
 import {mapGetters} from "vuex";
-// import Inspection from "../do/b1-inspect-order-plan/Inspection.vue";
 export default {
+  name: 'ProductOrder',
   components: {
     limsTable,
     AddInspectionDia,
@@ -877,7 +876,8 @@
     },
     // 瀵煎嚭璁板綍
     downLoad() {
-      rawAllInsOrderExport({ ...this.entity }).then(res => {
+      const params = { ...this.entity, state: this.tabList[this.tabIndex].value }
+      rawAllInsOrderExport({ ...params }).then(res => {
         const blob = new Blob([res], { type: 'application/octet-stream' });
         this.$download.saveAs(blob, '濮旀墭妫�娴嬩俊鎭鍑�.xlsx');
       }).catch(err => {
@@ -1004,8 +1004,13 @@
     // 涓嬭浇鎶ュ憡
     download(row) {
       let url = row.urlS ? row.urlS : row.url;
-      if (url) {
-        this.$download.saveAs(url, row.entrustCode);
+      if(url){
+        url = url.split('.')[0]+'.pdf'
+        const link = document.createElement('a');
+        link.href = this.javaApi + url;
+        link.target = '_blank';
+        document.body.appendChild(link);
+        link.click();
       }
     },
     // 鎾ら攢

--
Gitblit v1.9.3