From 4ef09716dc93b7259751034fdd42f380225e6730 Mon Sep 17 00:00:00 2001
From: XiaoRuby <3114200645@qq.com>
Date: 星期一, 11 九月 2023 11:25:27 +0800
Subject: [PATCH] Crunchy-09/11

---
 src/components/view/rawUnqualified/raw.vue |   62 +++++++++++++++++++++++++++---
 1 files changed, 55 insertions(+), 7 deletions(-)

diff --git a/src/components/view/rawUnqualified/raw.vue b/src/components/view/rawUnqualified/raw.vue
index a92a38f..527f21c 100644
--- a/src/components/view/rawUnqualified/raw.vue
+++ b/src/components/view/rawUnqualified/raw.vue
@@ -108,25 +108,61 @@
           </el-table-column>
           <el-table-column prop="deal_reasult" label="澶勭悊缁撴灉" width="100">
             <template slot-scope="scope">
-              <span style="color:#34BD66;" v-if="scope.row.deal_reasult == 1"
+              <span style="color:#E84738;" v-if="scope.row.deal_reasult == 0"
                 >涓嶉�氳繃</span
               >
               <span
-                style="color:#E84738;"
-                v-else-if="scope.row.deal_reasult == 0"
+                style="color:#34BD66;"
+                v-else-if="scope.row.deal_reasult == 1"
                 >閫氳繃</span
               >
             </template>
           </el-table-column>
           <el-table-column label="鎿嶄綔" width="100">
-            <template>
+            <template slot-scope="scope">
               <div style="display: flex;">
-                <el-button type="text" siae="small" size="mini">璇勫</el-button>
+                <el-popover
+                  placement="left"
+                  width="160"
+                  :ref="`popover-${scope.$index}`"
+                >
+                  <div style="padding: 6px">璇勫鏄惁閫氳繃锛�</div>
+                  <div style="text-align: right; margin: 6px;">
+                    <el-button
+                      size="mini"
+                      type="text"
+                      style="color: #E84738;"
+                      @click="
+                        scope._self.$refs[`popover-${scope.$index}`].doClose();
+                        rawEvaluate(scope.row, 0);
+                      "
+                      >涓嶉�氳繃</el-button
+                    >
+                    <el-button
+                      type="text"
+                      style="color: #34bd66;"
+                      size="mini"
+                      @click="
+                        scope._self.$refs[`popover-${scope.$index}`].doClose();
+                        rawEvaluate(scope.row, 1);
+                      "
+                      >閫氳繃</el-button
+                    >
+                  </div>
+                  <el-button
+                    slot="reference"
+                    type="text"
+                    siae="small"
+                    size="mini"
+                    >璇勫</el-button
+                  >
+                </el-popover>
+
                 <el-button
                   type="text"
                   siae="small"
                   size="mini"
-                  style=" color:87, 138, 193 ;"
+                  style=" color:87, 138, 193 ; margin-left: 10px;"
                   >鏌ョ湅</el-button
                 >
               </div>
@@ -165,7 +201,8 @@
         supplier: "" // 渚涘簲鍟�
       },
       unqualifiedTable: [], // 椤甸潰琛ㄦ牸鏁版嵁
-      total: 0
+      total: 0,
+      visible: false
     };
   },
   mounted() {
@@ -200,6 +237,17 @@
         supplier: "" // 渚涘簲鍟�
       };
       this.getDetailInfo();
+    },
+    rawEvaluate(row, passOrNo) {
+      this.$axios
+        .post(this.$api.url.evaluatePassOrNo, {
+          rawId: row.id,
+          passOrNo: passOrNo
+        })
+        .then(res => {
+          this.unqualifiedTable = [];
+          this.getDetailInfo();
+        });
     }
   }
 };

--
Gitblit v1.9.3