From 2e4a6c4526b6c22808d5877f2050da852bfaebe7 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 30 十二月 2025 14:31:47 +0800
Subject: [PATCH] 外购成品检验功能迁移v1

---
 src/views/business/materialOrder/index.vue |   37 ++++++++++++++++++++++++++-----------
 1 files changed, 26 insertions(+), 11 deletions(-)

diff --git a/src/views/business/materialOrder/index.vue b/src/views/business/materialOrder/index.vue
index 770931d..cf30a2a 100644
--- a/src/views/business/materialOrder/index.vue
+++ b/src/views/business/materialOrder/index.vue
@@ -48,7 +48,7 @@
               <el-option v-for="(a, i) in inspectStatusList" :key="i" :label="a.label" :value="a.value"></el-option>
             </el-select>
           </el-form-item>
-          <el-form-item label="涓嬪彂鏃堕棿" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
+          <el-form-item label="鎶ユ鏃堕棿" prop="date" v-if="(tabIndex === 2 || tabIndex === 3 || tabIndex === 4) && more">
             <el-date-picker v-model="entity.date" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡" @change="goSearch"
               range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="daterange" value-format="yyyy-MM-dd">
             </el-date-picker>
@@ -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' },
@@ -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) {
@@ -1357,6 +1368,7 @@
       } else {
         params = {...this.entity}
       }
+      params.orderType = "01raw";
       rawAllExport(params).then(res => {
         this.outLoading = false
         const blob = new Blob([res], { type: 'application/octet-stream' });
@@ -1393,8 +1405,11 @@
       this.multipleSelection = val
     },
     changeRowClass({ row, rowIndex }) {
-      if (row.isFirst == 1) {
-        return 'highlight-danger-row-border'
+      if (row.isFirst != 1 && row.lotBatchNoHasRepeat) {
+        return 'highlight-warning-row-border'
+      }
+      if(row.isFirst == 1){
+        return "highlight-danger-row-border";
       }
       return ''
     },

--
Gitblit v1.9.3