From 2837bdd57f72e386bbf9a725e7b3a13e5eb9e930 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期一, 21 八月 2023 09:19:57 +0800
Subject: [PATCH] 修复bug

---
 web_standard/src/views/ext/workorderRecordExt.vue |   46 ++++++++++++++++++++++++++++++++++++++++++----
 1 files changed, 42 insertions(+), 4 deletions(-)

diff --git a/web_standard/src/views/ext/workorderRecordExt.vue b/web_standard/src/views/ext/workorderRecordExt.vue
index 31273cf..efe86cf 100644
--- a/web_standard/src/views/ext/workorderRecordExt.vue
+++ b/web_standard/src/views/ext/workorderRecordExt.vue
@@ -112,7 +112,7 @@
           </template>
         </el-table-column>
         <el-table-column prop="procedureName" label="鐢熶骇鍛樺伐" min-width="100px"></el-table-column>
-        <el-table-column prop="doneType" label="鎶ュ伐绫诲瀷" min-width="100px">
+        <!-- <el-table-column prop="doneType" label="鎶ュ伐绫诲瀷" min-width="100px">
           <template slot-scope="{row}">
             <span v-if="row.doneType==0" class="valid-style">鍚堟牸</span>
             <span v-else-if="row.doneType==1" class="unvalid-style">涓嶈壇</span>
@@ -124,8 +124,28 @@
           <template slot-scope="{row}">
             <span :class="row.doneType==0 ? 'valid-style' : (row.doneType==1 ? 'unvalid-style' : (row.doneType==2 ? 'scrap-style' : ''))">{{ row.num + row.umodel.name }}</span>
           </template>
+        </el-table-column> -->
+        <el-table-column prop="qualifiedNum" label="鍚堟牸鏁伴噺" min-width="100px">
+          <template slot-scope="{row}">
+            <span class="valid-style">{{ (row.qualifiedNum || 0) + row.umodel.name }}</span>
+          </template>
         </el-table-column>
-        <!-- <el-table-column prop="amodel.code" label="宸ヨ鍣ㄥ叿" min-width="100px"></el-table-column> -->
+        <el-table-column prop="unqualifiedNum" label="涓嶈壇鏁伴噺" min-width="100px">
+          <template slot-scope="{row}">
+            <span class="unvalid-style">{{ (row.unqualifiedNum||0) + row.umodel.name}}</span>
+            <!-- <span :class="row.materialDonetype==0 ? 'valid-style' : ''">{{ row.num + row.umodel.name }}</span> -->
+          </template>
+        </el-table-column>
+        <el-table-column prop="num" label="鎶ュ伐鏁伴噺" min-width="100px">
+          <template slot-scope="{row}">
+            <span>{{ row.num + row.umodel.name}}</span>
+          </template>
+        </el-table-column>
+        <el-table-column prop="duration" label="鎶ュ伐鏃堕暱" min-width="100px">
+          <template slot-scope="{row}">
+            <span>{{ timesToStr(row.duration) }}</span>
+          </template>
+        </el-table-column>
         <el-table-column prop="deviceCode" label="璁惧" show-overflow-tooltip min-width="100px">
           <template slot-scope="{row}">
             <span class="long-title-style" :title="row.deviceCode + ' | ' + row.deviceName">{{ row.deviceCode + ' | ' + row.deviceName}}</span>
@@ -253,12 +273,13 @@
     },
     getSummaries (param) {
       const { columns, data } = param;
+      console.log(param);
       const sums = [];
       columns.forEach((column, index) => {
         if (index === 0) {
           sums[index] = '鍚堣';
           return;
-        } else if (index === 4 || index === 8 || index === 6 || index === 10) {
+        } else if (index === 4 || index === 7) {
           // || index === 8 || index === 9 || index === 16 || index === 17
           sums[index] = '-';
           return;
@@ -271,17 +292,34 @@
           }
           
         });
+
         if (!values.every(value => isNaN(value))) {
           sums[index] = 0
           values.forEach(item => {
             sums[index] = addPrecision(item, sums[index])
           })
-        } else {
+          if (index===11) {
+            sums[index] = this.timesToStr(sums[index])
+          }
+        }  else {
           sums[index] = '-';
         }
+
       });
+      
       return sums
+    },
+    timesToStr(times) {
+      if (times==0||!times) {
+        return '-'
+      }
+      // let sec = times%60
+      let lesMin = Math.floor(times/60)
+      let min = lesMin%60
+      let hours =  Math.floor(lesMin/60)
+      return `${hours}鏃�${min}鍒哷
     }
+    
   }
 }
 

--
Gitblit v1.9.3