From 3d61c610c0aa2276ad838f5906bf0b25492ab211 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期三, 05 十一月 2025 12:46:51 +0800
Subject: [PATCH] 数采调整

---
 src/views/business/materialOrder/index.vue |   44 ++++++++++++++++++++++++++++++--------------
 1 files changed, 30 insertions(+), 14 deletions(-)

diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 729542a..5b5c439 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -67,7 +67,7 @@
             </ul>
           </div>
           <div>
-            <el-button v-show="tabIndex === 3 || tabIndex === 2" :loading="outLoading" size="small" type="primary"
+            <el-button v-show="tabIndex === 3" :loading="outLoading" size="small" type="primary"
               @click="handleOut">瀵煎嚭</el-button>
             <el-button v-if="tabIndex === 0" size="small" type="primary" @click="copper">閾滄潗鏂欎笅鍗�</el-button>
             <el-button v-if="tabIndex !== 0" size="small" type="primary" @click="openPrint">鏍囩鎵撳嵃</el-button>
@@ -201,7 +201,8 @@
   repealEnterRawOrder,
   repealQuarterRawOrder,
   revokeInspectionReport,
-  updateEntrustCode
+  updateEntrustCode,
+  getOrderCountByIfsId
 } from "@/api/business/rawMaterialOrder";
 import { getWarehouseSubmit } from "@/api/business/materialInspection";
 import {mapGetters} from "vuex";
@@ -239,7 +240,7 @@
             }
           }
         },
-        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore' },
         { label: '鍗曚綅', prop: 'buyUnitMeas' },
         { label: '璁㈠崟鍙�', prop: 'orderNo' },
         { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
@@ -319,7 +320,7 @@
             }
           }
         },
-        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore' },
         { label: '鍗曚綅', prop: 'buyUnitMeas' },
         { label: '璁㈠崟鍙�', prop: 'orderNo' },
         { label: '鎺ユ敹鏃堕棿', prop: 'receiverDate' },
@@ -404,7 +405,7 @@
           }
         },
         { label: '璁㈠崟鍙�', prop: 'orderNo' },
-        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore' },
         { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
         { label: '鎵瑰彿', prop: 'updateBatchNo' },
         { label: '闆朵欢鍙�', prop: 'partNo' },
@@ -590,7 +591,7 @@
           }
         },
         { label: '璁㈠崟鍙�', prop: 'orderNo' },
-        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore' },
         { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
         { label: '鎵瑰彿', prop: 'updateBatchNo' },
         { label: '闆朵欢鍙�', prop: 'partNo' },
@@ -714,7 +715,7 @@
           }
         },
         { label: '璁㈠崟鍙�', prop: 'orderNo' },
-        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'qtyArrived' },
+        { label: '鎶佃揪鐨勯噰璐暟閲�', prop: 'purQtyInStore' },
         { label: '涓嬪彂鏃堕棿', prop: 'sendTime' },
         { label: '鎵瑰彿', prop: 'updateBatchNo' },
         { label: '闆朵欢鍙�', prop: 'partNo' },
@@ -1121,7 +1122,7 @@
         })
       } else {
         this.$router.push({
-          name: "Inspection",
+          path: "/inspectionTask/inspection",
           query: {
             sonLaboratory: '鍘熸潗鏂�',
             state: 3,
@@ -1149,7 +1150,7 @@
         })
       } else {
         this.$router.push({
-          name: "Inspection",
+          path: "/inspectionTask/inspection",
           query: {
             sonLaboratory: '鍘熸潗鏂�',
             state: 3,
@@ -1190,11 +1191,21 @@
     },
     // 涓嬪崟
     playOrder(row) {
-      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 0, customsInspection: row, active: 1 } });
+      //鏌ヨ褰撳墠鎵规鏄惁宸茬粡涓嬪崟
+      getOrderCountByIfsId(row.id).then(res=>{
+        if(res.code===200 && res.data>0){
+          this.$message.warning('璇ユ壒娆″凡涓嬪崟锛岃鍕块噸澶嶄笅鍗�')
+          this.refreshTable('page')
+          return
+        }
+        this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 0, customsInspection: row, active: 1 } });
+      }).catch(error=>{
+        console.error(error)
+      })
     },
     // 瀛e害妫�楠屼笅鍗�
     playOrderSec(row) {
-      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: { orderType: 1, customsInspection: row, active: 1 } });
+      this.$router.push({ path: "/materialOrder/customsInspectionOrder", query: {isOutsourcing:'f', orderType: 1, customsInspection: row, active: 1 } });
     },
     // 鐐瑰嚮鏍峰搧鍚嶇О鏌ョ湅璇︽儏
     selectAllByOne(row) {
@@ -1350,10 +1361,14 @@
     },
     // 瀵煎嚭
     handleOut() {
-      let entity = this.tabIndex === 3 ? { ...this.entity, isInspect: 2 } : { ...this.entity, state: 2, orderState: 4, }
-      delete entity.orderBy
       this.outLoading = true
-      rawAllExport({ entity: entity }).then(res => {
+      let params = {}
+      if (this.multipleSelection.length > 0) {
+        params.ids = this.multipleSelection.map(item => item.id).join(',');
+      } else {
+        params = {...this.entity}
+      }
+      rawAllExport(params).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
         this.$download.saveAs(blob, '鍘熸潗鏂欐娴嬩俊鎭鍑�.xlsx');
@@ -1381,6 +1396,7 @@
     // 鍒囨崲涓嬪崟tab琛ㄦ牸
     handleTab(m) {
       this.tabIndex = m;
+      this.multipleSelection = []
       this.refreshTable()
     },
     // 琛ㄦ牸閫夋嫨鏂规硶

--
Gitblit v1.9.3