From 40fee153f5c427c23b7191e8116c342b51ac6009 Mon Sep 17 00:00:00 2001
From: zouyu <2723363702@qq.com>
Date: 星期二, 27 一月 2026 17:10:41 +0800
Subject: [PATCH] 业务管理:问题修复

---
 src/views/business/productOrder/components/addOrder.vue           |   60 +++--
 src/main.js                                                       |    2 
 src/views/business/productOrder/components/addView.vue            |   28 ++
 src/views/statisticalCharts/qualificationRateStatistics/index.vue |   82 ++++++-
 src/views/business/unpass/components/OAProcess.vue                |  420 ++++++++++++++++++-------------------
 src/views/business/unpass/index-manage.vue                        |   28 ++
 6 files changed, 365 insertions(+), 255 deletions(-)

diff --git a/src/main.js b/src/main.js
index 5f2db03..2647808 100644
--- a/src/main.js
+++ b/src/main.js
@@ -67,7 +67,7 @@
 Vue.prototype.HaveJson = (val) => {
   return JSON.parse(JSON.stringify(val));
 };
-Vue.prototype.javaApi = "http://192.168.21.53:7002/lims";
+Vue.prototype.javaApi = process.env.NODE_ENV === "production"?"http://192.168.21.53:7002/lims":"http://127.0.0.1:7002";
 Vue.prototype.checkPermi = checkPermi;
 Vue.prototype.uploadHeader = {
   Authorization: "Bearer " + getToken(),
diff --git a/src/views/business/productOrder/components/addOrder.vue b/src/views/business/productOrder/components/addOrder.vue
index 5714ea0..bef0cef 100644
--- a/src/views/business/productOrder/components/addOrder.vue
+++ b/src/views/business/productOrder/components/addOrder.vue
@@ -49,28 +49,6 @@
                 <el-input v-model="addObj.entrustCode" clearable disabled placeholder="绯荤粺鐢熸垚" size="small"></el-input>
               </el-form-item>
             </el-col>
-            <el-row>
-             <el-col :span="6">
-                <el-form-item label="鏂板鎵瑰彿:" prop="updateBatchNo">
-                  <el-input v-model="addObj.updateBatchNo" clearable placeholder="璇疯緭鍏ユ柊澧炴壒鍙�" size="small">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-
-              <el-col :span="6">
-                <el-form-item label="闆朵欢鎻忚堪:" prop="partDesc">
-                  <el-input v-model="addObj.partDesc" clearable placeholder="璇疯緭鍏ラ浂浠舵弿杩�" size="small">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-
-              <el-col :span="6">
-                <el-form-item label="渚涘簲鍟嗗悕绉�:" prop="supplierName">
-                  <el-input v-model="addObj.supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small">
-                  </el-input>
-                </el-form-item>
-              </el-col>
-            </el-row>
             <el-col :span="6">
               <el-form-item label="妫�楠岀被鍒�:" prop="orderType">
                 <el-select v-model="addObj.orderType" :disabled="active>1&&tabIndex!=4" clearable size="small" style="width: 100%;">
@@ -90,6 +68,34 @@
                     <el-button slot="append" :disabled="active>1&&tabIndex!=4" icon="el-icon-search"
                                @click="openCompanyList"></el-button>
                   </template>
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
+              <el-form-item label="IFS鍩�:" prop="contract">
+                <el-select v-model="addObj.contract" clearable placeholder="璇烽�夋嫨" size="small">
+                  <el-option label="ZTNS" value="ZTNS"/>
+                  <el-option label="KJNS" value="KJNS"/>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="鎵规鍙�:" prop="updateBatchNo">
+                <el-input v-model="addObj.updateBatchNo" clearable placeholder="璇疯緭鍏ユ壒娆″彿" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="闆朵欢鎻忚堪:" prop="partDesc">
+                <el-input v-model="addObj.partDesc" clearable placeholder="璇疯緭鍏ラ浂浠舵弿杩�" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="渚涘簲鍟嗗悕绉�:" prop="supplierName">
+                <el-input v-model="addObj.supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small">
                 </el-input>
               </el-form-item>
             </el-col>
@@ -649,9 +655,10 @@
       templates: [],
       addObj: {
         entrustCode: null,
-        updateBatchNo: null, 
-        partDesc: null,      
-        supplierName: null,  
+        contract:null,
+        updateBatchNo: null,
+        partDesc: null,
+        supplierName: null,
         custom: null,
         company: null,
         userId: null,
@@ -687,6 +694,9 @@
         sampleViewEn: '', // 鏍峰搧鍚嶇О鑻辨枃锛堟姤鍛婂睍绀哄瓧娈碉級
       },
       addObjRules: { // 琛ㄥ崟鏍¢獙瑙勫垯
+        contract: [
+          { required: true, message: '璇烽�夋嫨IFS鍩�', trigger: 'change' }
+        ],
         orderType: [
           { required: true, message: '璇烽�夋嫨妫�楠岀被鍒�', trigger: 'change' }
         ],
diff --git a/src/views/business/productOrder/components/addView.vue b/src/views/business/productOrder/components/addView.vue
index 597a425..44a252a 100644
--- a/src/views/business/productOrder/components/addView.vue
+++ b/src/views/business/productOrder/components/addView.vue
@@ -70,6 +70,34 @@
           </el-row>
           <el-row>
             <el-col :span="6">
+              <el-form-item label="IFS鍩�:" prop="contract">
+                <el-select :disabled="active>1&&tabIndex!=4" v-model="addObj.contract" clearable placeholder="璇烽�夋嫨" size="small">
+                  <el-option label="ZTNS" value="ZTNS"/>
+                  <el-option label="KJNS" value="KJNS"/>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="鎵规鍙�:" prop="updateBatchNo">
+                <el-input :disabled="active>1&&tabIndex!=4" v-model="addObj.updateBatchNo" clearable placeholder="璇疯緭鍏ユ壒娆″彿" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="闆朵欢鎻忚堪:" prop="partDesc">
+                <el-input :disabled="active>1&&tabIndex!=4" v-model="addObj.partDesc" clearable placeholder="璇疯緭鍏ラ浂浠舵弿杩�" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :span="6">
+              <el-form-item label="渚涘簲鍟嗗悕绉�:" prop="supplierName">
+                <el-input :disabled="active>1&&tabIndex!=4" v-model="addObj.supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small">
+                </el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="6">
               <el-form-item label="鑱旂郴鏂瑰紡:" prop="phone">
                 <el-input v-model="addObj.phone" :disabled="active>1&&tabIndex!=4" clearable placeholder="閫夋嫨濮旀墭瀹㈡埛" size="small"></el-input>
               </el-form-item>
diff --git a/src/views/business/unpass/components/OAProcess.vue b/src/views/business/unpass/components/OAProcess.vue
index 5b0b616..eba813d 100644
--- a/src/views/business/unpass/components/OAProcess.vue
+++ b/src/views/business/unpass/components/OAProcess.vue
@@ -1,107 +1,47 @@
 <template>
   <div>
-    <el-dialog :close-on-press-escape="false" :visible.sync="isShow" title="涓嶅悎鏍煎鐞�"
-               width="1040px"
-               @close="$emit('closeOAProcess')">
-
-      <table :border='true' class="table">
-        <tr>
-          <th class="th-title">1妫�楠屽憳</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{oneOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{oneInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{oneName}}<span v-if="oneName">锛�</span>{{oneTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">2妫�娴嬩富绠$‘璁�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{twoOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{twoInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{twoName}}<span v-if="twoName">锛�</span>{{twoTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">3鐗╂祦閮ㄧ‘璁�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{threeOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{threeInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{threeName}}<span v-if="threeName">锛�</span>{{threeTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">4浜у搧宸ョ▼甯堝鐞嗘剰瑙�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{fourOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{fourInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{fourName}}<span v-if="fourName">锛�</span>{{fourTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">5.鎬诲伐鎴栬�呭壇缁忕悊鐨勫鐞嗘剰瑙�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{fiveOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{fiveInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{fiveName}}<span v-if="fiveName">锛�</span>{{fiveTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">6璐ㄩ噺閮�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{sixOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{sixInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{sixName}}<span v-if="sixName">锛�</span>{{sixTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">7璐ㄩ噺閮ㄧ粡鐞�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{sevenOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{sevenInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{sevenName}}<span v-if="sevenName">锛�</span>{{sevenTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">8鏍哥畻鍛�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{eightOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{eightInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{eightName}}<span v-if="eightName">锛�</span>{{eightTime}}</th>
-        </tr>
-        <tr>
-          <th class="th-title">9鐗╂祦閮ㄧ储璧旂粨鏋�</th>
-          <th class="th-titleSec">澶勭悊缁撴灉</th>
-          <th class="th-info1">{{nineOperation}}</th>
-          <th class="th-titleSec">澶勭悊鎰忚</th>
-          <th class="th-info" colspan="3">{{nineInfo}}</th>
-          <th style="display:none;"></th>
-          <th style="display:none;"></th>
-          <th >{{nineName}}<span v-if="nineName">锛�</span>{{nineTime}}</th>
-        </tr>
-      </table>
+    <el-dialog
+      :close-on-press-escape="false"
+      :visible.sync="isShow"
+      title="涓嶅悎鏍煎鐞哋A娴佺▼"
+      width="900px"
+      top="10vh"
+      @close="$emit('closeOAProcess')"
+    >
+      <el-timeline style="height: 80vh; overflow-y: scroll">
+        <el-timeline-item
+          placement="top"
+          v-for="node in nodes"
+          :key="node.id"
+          :timestamp="node.name"
+          :icon="node.hasData ? 'el-icon-check' : 'el-icon-time'"
+          :color="node.hasData ? '#0bbd87' : ''"
+        >
+          <el-card>
+            <h3 class="node-title">{{ node.operation }}</h3>
+            <div class="node-details">
+              <div class="detail-item">
+                <span class="label">澶勭悊浜猴細</span>
+                <span class="value">{{ node.operator || "-" }}</span>
+              </div>
+              <div class="detail-item">
+                <span class="label">澶勭悊鏃堕棿锛�</span>
+                <span class="value">{{ node.time || "-" }}</span>
+              </div>
+              <div class="detail-item">
+                <span class="label">{{node.name && node.name==='1妫�楠屽憳'?'涓嶅悎鏍兼弿杩帮細':'澶勭悊鎰忚锛�'}}</span>
+                <span class="value">{{ node.info || "-" }}</span>
+              </div>
+            </div>
+          </el-card>
+        </el-timeline-item>
+      </el-timeline>
     </el-dialog>
   </div>
 </template>
 
 <script>
-import {getOaFlow} from "../../../../api/business/unqualifiedHandler";
+import { getOaFlow } from "../../../../api/business/unqualifiedHandler";
 
 export default {
   name: "OAProcess",
@@ -110,143 +50,193 @@
   props: {
     OAProcess: {
       type: Boolean,
-      default: () => false
+      default: () => false,
     },
   },
   data() {
     // 杩欓噷瀛樻斁鏁版嵁
     return {
       isShow: this.OAProcess,
-      oneInfo: '',
-      twoInfo: '',
-      threeInfo: '',
-      fourInfo: '',
-      fiveInfo: '',
-      sixInfo: '',
-      sevenInfo: '',
-      eightInfo: '',
-      nineInfo: '',
-      oneTime: '',
-      twoTime: '',
-      threeTime: '',
-      fourTime: '',
-      fiveTime: '',
-      sixTime: '',
-      sevenTime: '',
-      eightTime: '',
-      nineTime: '',
-      oneName: '',
-      twoName: '',
-      threeName: '',
-      fourName: '',
-      fiveName: '',
-      sixName: '',
-      sevenName: '',
-      eightName: '',
-      nineName: '',
-      oneOperation: '',
-      twoOperation: '',
-      threeOperation: '',
-      fourOperation: '',
-      fiveOperation: '',
-      sixOperation: '',
-      sevenOperation: '',
-      eightOperation: '',
-      nineOperation: '',
-    }
+      nodes: [
+        {
+          id: 1,
+          name: "1妫�楠屽憳",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 2,
+          name: "2妫�娴嬩富绠$‘璁�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 3,
+          name: "3鐗╂祦閮ㄧ‘璁�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 4,
+          name: "4浜у搧宸ョ▼甯堝鐞嗘剰瑙�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 5,
+          name: "5.鎬诲伐鎴栬�呭壇缁忕悊鐨勫鐞嗘剰瑙�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 6,
+          name: "6璐ㄩ噺閮�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 7,
+          name: "7璐ㄩ噺閮ㄧ粡鐞�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 8,
+          name: "8鏍哥畻鍛�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+        {
+          id: 9,
+          name: "9鐗╂祦閮ㄧ储璧旂粨鏋�",
+          info: "",
+          time: "",
+          operator: "",
+          operation: "",
+          hasData: false,
+        },
+      ],
+    };
   },
   // 鏂规硶闆嗗悎
   methods: {
-    getInfo (id) {
+    getInfo(id,unqualifiedDesc) {
       getOaFlow({
-        id: id
-      }).then(res => {
-        if (res.code === 200) {
-          const data = res.data
-          if (data.length > 0) {
-            data.forEach(item => {
-              if (item.nodeName === '1妫�楠屽憳') {
-                this.oneInfo = item.approvalOpinion
-                this.oneTime = item.approvalDate
-                this.oneName = item.approver
-                this.oneOperation = item.operation
-              } else if (item.nodeName === '2妫�娴嬩富绠$‘璁�') {
-                this.twoInfo = item.approvalOpinion
-                this.twoTime = item.approvalDate
-                this.twoName = item.approver
-                this.twoOperation = item.operation
-              } else if (item.nodeName === '3鐗╂祦閮ㄧ‘璁�') {
-                this.threeInfo = item.approvalOpinion
-                this.threeTime = item.approvalDate
-                this.threeName = item.approver
-                this.threeOperation = item.operation
-              } else if (item.nodeName === '4浜у搧宸ョ▼甯堝鐞嗘剰瑙�') {
-                this.fourInfo = item.approvalOpinion
-                this.fourTime = item.approvalDate
-                this.fourName = item.approver
-                this.fourOperation = item.operation
-              } else if (item.nodeName === '5.鎬诲伐鎴栬�呭壇缁忕悊鐨勫鐞嗘剰瑙�') {
-                this.fiveInfo = item.approvalOpinion
-                this.fiveTime = item.approvalDate
-                this.fiveName = item.approver
-                this.fiveOperation = item.operation
-              } else if (item.nodeName === '6璐ㄩ噺閮�') {
-                this.sixInfo = item.approvalOpinion
-                this.sixTime = item.approvalDate
-                this.sixName = item.approver
-                this.sixOperation = item.operation
-              } else if (item.nodeName === '7璐ㄩ噺閮ㄧ粡鐞�') {
-                this.sevenInfo = item.approvalOpinion
-                this.sevenTime = item.approvalDate
-                this.sevenName = item.approver
-                this.sevenOperation = item.operation
-              } else if (item.nodeName === '8鏍哥畻鍛�') {
-                this.eightInfo = item.approvalOpinion
-                this.eightTime = item.approvalDate
-                this.eightName = item.approver
-                this.eightOperation = item.operation
-              } else if (item.nodeName === '9鐗╂祦閮ㄧ储璧旂粨鏋�') {
-                this.nineInfo = item.approvalOpinion
-                this.nineTime = item.approvalDate
-                this.nineName = item.approver
-                this.nineOperation = item.operation
-              }
-            })
-          }
-        }
-      }).catch(err => {
-        this.submitDeclareLoading = false
-        console.log(err)
+        id: id,
       })
-    }
+        .then((res) => {
+          if (res.code === 200) {
+            const data = res.data;
+            if (data.length > 0) {
+              data.forEach((item) => {
+                const node = this.nodes.find((n) => n.name === item.nodeName);
+                if (node) {
+                  node.time = item.approvalDate + " " + item.approvalTime;
+                  if(item.nodeName && item.nodeName==="1妫�楠屽憳"){
+                    node.info=unqualifiedDesc;
+                  }else{
+                    node.info = item.approvalOpinion;
+                  }
+                  node.operator = item.approver;
+                  node.operation = item.operation;
+                  node.hasData = true;
+                }
+              });
+            }
+          }
+        })
+        .catch((err) => {
+          this.submitDeclareLoading = false;
+          console.log(err);
+        });
+    },
   },
-}
+};
 </script>
 
 <style scoped>
-.table {
-  width: 100%;
-  height: 500px;
+.timeline-item-content {
+  padding: 15px;
+  border: 1px solid #e4e7ed;
+  border-radius: 4px;
+  margin-bottom: 10px;
+  transition: all 0.3s ease;
 }
-.th-title {
-  width: 160px;
-  text-align: left;
-  background-color: #e0eaf5;
+
+.node-title {
   font-size: 16px;
+  font-weight: bold;
+  margin-bottom: 10px;
+  color: #333;
 }
-.th-titleSec {
-  width: 70px;
-  background-color: #e0eaf5;
-  font-size: 16px;
+
+.node-details {
+  display: flex;
+  flex-wrap: wrap;
+  gap: 15px;
 }
-.th-info {
-  width: 210px;
-  text-align: left;
-  font-size: 16px;
+
+.detail-item {
+  display: flex;
+  align-items: center;
+  min-width: 350px;
 }
-.th-info1 {
-  width: 100px;
-  text-align: center;
-  font-size: 16px;
+
+.label {
+  font-weight: 500;
+  color: #606266;
+  margin-right: 8px;
+  min-width: 90px;
+}
+
+.value {
+  color: #303133;
+}
+
+/* 宸插畬鎴愯妭鐐规牱寮� */
+.node-completed {
+  color: #67c23a;
+}
+
+.node-completed .timeline-item-content {
+  border-color: #c6e2b8;
+  background-color: #f0f9eb;
+}
+
+.node-completed .node-title {
+  color: #67c23a;
+}
+
+/* 鏃堕棿绾垮浘鏍囨牱寮� */
+.el-timeline-item__node {
+  background-color: #909399;
+}
+
+.node-completed .el-timeline-item__node {
+  background-color: #67c23a;
 }
 </style>
diff --git a/src/views/business/unpass/index-manage.vue b/src/views/business/unpass/index-manage.vue
index 27a53f3..39596e6 100644
--- a/src/views/business/unpass/index-manage.vue
+++ b/src/views/business/unpass/index-manage.vue
@@ -3,6 +3,12 @@
     <div class="search">
       <div>
         <el-form :model="entity" ref="entity" size="small" :inline="true">
+          <el-form-item label="IFS鍩�" prop="contract">
+            <el-select @keyup.enter.native="refreshTable" v-model="entity.contract" clearable placeholder="璇烽�夋嫨" size="small">
+              <el-option label="ZTNS" value="ZTNS"/>
+              <el-option label="KJNS" value="KJNS"/>
+            </el-select>
+          </el-form-item>
           <el-form-item label="鎵瑰彿" prop="updateBatchNo">
             <el-input v-model="entity.updateBatchNo" clearable placeholder="璇疯緭鍏�" size="small"
                       @keyup.enter.native="refreshTable()">
@@ -85,12 +91,32 @@
     return {
       handlerId: null,
       entity: {
+        contract: null,
         sample: null,
         specsModels: null,
       },
       tableData: [],
       tableLoading: false,
       column: [
+        {
+          label: 'IFS鍩�',
+          prop: 'contract',
+          width: '120px',
+          dataType: 'tag',
+          formatData: (params) => {
+            return params
+          },
+          formatType: (params) => {
+            if (params === 'ZTNS') {
+              return ''
+            } else if (params === 'KJNS') {
+              return 'success'
+            }else {
+              return null
+            }
+          }
+
+        },
         { label: '缂栧彿', prop: 'no', width: "160px", },
         // {
         //   label: "OA瀹℃牳鐘舵��",
@@ -304,7 +330,7 @@
     OAView (row) {
       this.OAProcess = true
       this.$nextTick(() => {
-        this.$refs.OAProcess.getInfo(row.handlerId)
+        this.$refs.OAProcess.getInfo(row.handlerId,row?row.unqualifiedDesc:"")
       })
     },
     // 鍏抽棴鏌ョ湅OA娴佺▼鐨勫脊妗�
diff --git a/src/views/statisticalCharts/qualificationRateStatistics/index.vue b/src/views/statisticalCharts/qualificationRateStatistics/index.vue
index a1e8649..b009415 100644
--- a/src/views/statisticalCharts/qualificationRateStatistics/index.vue
+++ b/src/views/statisticalCharts/qualificationRateStatistics/index.vue
@@ -1,19 +1,19 @@
 <template>
   <div class="app-container">
     <el-row>
-      <el-col :span="4">
-        <el-radio-group v-model="dateType" @change="changeDateType">
-          <el-radio-button label="1">鏈懆</el-radio-button>
-          <el-radio-button label="2">鏈湀</el-radio-button>
-          <el-radio-button label="3">浠婂勾</el-radio-button>
-        </el-radio-group>
-      </el-col>
+<!--      <el-col :span="4">-->
+<!--        <el-radio-group v-model="dateType" @change="changeDateType">-->
+<!--          <el-radio-button label="1">鏈懆</el-radio-button>-->
+<!--          <el-radio-button label="2">鏈湀</el-radio-button>-->
+<!--          <el-radio-button label="3">浠婂勾</el-radio-button>-->
+<!--        </el-radio-group>-->
+<!--      </el-col>-->
       <el-col :span="20">
         <el-form ref="entity" size="small" :inline="true">
           <el-form-item style="width: 20%;">
-            <el-date-picker v-model="datePicker" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
+            <el-date-picker :picker-options="pickerOptions" v-model="datePicker" end-placeholder="缁撴潫鏃ユ湡" format="yyyy-MM-dd" placeholder="閫夋嫨鏃ユ湡"
               range-separator="鑷�" size="small" start-placeholder="寮�濮嬫棩鏈�" type="daterange" style="width: 100%;"
-              value-format="yyyy-MM-dd" @change="changeDatePicker">
+              value-format="yyyy-MM-dd" clearable @change="changeDatePicker">
             </el-date-picker>
           </el-form-item>
           <el-form-item label="鏍峰搧鍚嶇О" prop="sampleName">
@@ -25,6 +25,13 @@
           <el-form-item label="渚涘簲鍟嗗悕绉�" prop="supplierName">
             <el-input v-model="supplierName" clearable placeholder="璇疯緭鍏ヤ緵搴斿晢鍚嶇О" size="small"
               @change="changeDate"></el-input>
+          </el-form-item>
+          <el-form-item label="IFS鍩�" prop="contract">
+            <el-select v-model="contract" clearable placeholder="璇烽�夋嫨IFS鍩�" size="small"
+                        @change="changeDate">
+              <el-option label="ZTNS" value="ZTNS"/>
+              <el-option label="KJNS" value="KJNS"/>
+            </el-select>
           </el-form-item>
         </el-form>
       </el-col>
@@ -108,11 +115,39 @@
   data() {
     // 杩欓噷瀛樻斁鏁版嵁
     return {
+      pickerOptions: {
+        shortcuts: [{
+          text: '鏈�杩戜竴鍛�',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 6);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '鏈�杩戜竴涓湀',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 30);
+            picker.$emit('pick', [start, end]);
+          }
+        }, {
+          text: '鏈�杩戜竴骞�',
+          onClick(picker) {
+            const end = new Date();
+            const start = new Date();
+            start.setTime(start.getTime() - 3600 * 1000 * 24 * 365);
+            picker.$emit('pick', [start, end]);
+          }
+        }]
+      },
       dateType: '1',
       datePicker: [],
       beginDate: '',
       endDate: '',
       sampleName: '',
+      contract: '',
       modelName: '',
       supplierName: '',
       inspectionTitle: '鍘熸潗鏂�',
@@ -405,7 +440,6 @@
       sum: '',
     }
   },
-
   mounted() {
     this.setBarChartTitle();
     this.getBar();
@@ -414,7 +448,28 @@
     this.getPassRateCom();
     this.getTableData();
   },
-
+watch:{
+  datePicker:{
+    handler(newVal){
+      //璁$畻寮�濮嬫椂闂翠笌缁撴潫鏃堕棿鐨勫ぉ鏁板樊
+      if (newVal && newVal.length === 2) {
+        const startDate = new Date(newVal[0]);
+        const endDate = new Date(newVal[1]);
+        const timeDiff = endDate - startDate;
+        const dayDiff = timeDiff / (1000 * 3600 * 24);
+        if (dayDiff <= 7) {
+          this.dateType = '1';
+        } else if (dayDiff > 7 && dayDiff <= 31) {
+          this.dateType = '2';
+        } else if (dayDiff > 31) {
+          this.dateType = '3';
+        }
+      }else{
+        this.dateType = '1';
+      }
+    },  immediate:true
+  }
+},
   // 鏂规硶闆嗗悎
   methods: {
     // 鑾峰彇鍚堟牸鐜囧浘琛ㄦ暟鎹�
@@ -431,6 +486,7 @@
           sampleName: this.sampleName,
           modelName: this.modelName,
           supplierName: this.supplierName,
+          contract:this.contract,
           materialProp: t,
         };
         return getRawPassRateByBarChart(params);
@@ -489,7 +545,6 @@
         let lineData = [];
         let xAxis = [];
 
-        console.log(sortedDates)
         sortedDates.forEach(date => {
           const { qualified, unQualified } = dateMap[date];
           const total = qualified + unQualified;
@@ -505,7 +560,6 @@
         this.echartsSeries[1].data = unQualifiedData;
         this.echartsSeries[2].data = lineData;
         this.xAxis[0].data = xAxis;
-        console.log(xAxis)
       });
     },
 
@@ -527,6 +581,7 @@
             sampleName: this.sampleName,
             modelName: this.modelName,
             supplierName: this.supplierName,
+            contract:this.contract,
             materialProp: t
           };
           return getRawPassRateByCake(params);
@@ -635,6 +690,7 @@
           sampleName: this.sampleName,
           modelName: this.modelName,
           supplierName: this.supplierName,
+          contract:this.contract,
           materialProp: t,
         };
         return getMaterialPropTable(params);

--
Gitblit v1.9.3