From a1c49eabb69bae2aa33647b0327d867ea4a40b2b Mon Sep 17 00:00:00 2001
From: Mr.Zhang <710666463@qq.com>
Date: 星期一, 21 八月 2023 08:31:40 +0800
Subject: [PATCH] 1.0.2 上线包

---
 web_standard/src/views/ext/workorderRecordExt.vue |   32 +++++++++++++++++++++++++++-----
 1 files changed, 27 insertions(+), 5 deletions(-)

diff --git a/web_standard/src/views/ext/workorderRecordExt.vue b/web_standard/src/views/ext/workorderRecordExt.vue
index 02af8b7..efe86cf 100644
--- a/web_standard/src/views/ext/workorderRecordExt.vue
+++ b/web_standard/src/views/ext/workorderRecordExt.vue
@@ -127,12 +127,12 @@
         </el-table-column> -->
         <el-table-column prop="qualifiedNum" label="鍚堟牸鏁伴噺" min-width="100px">
           <template slot-scope="{row}">
-            <span class="valid-style">{{ row.qualifiedNum + row.umodel.name }}</span>
+            <span class="valid-style">{{ (row.qualifiedNum || 0) + row.umodel.name }}</span>
           </template>
         </el-table-column>
         <el-table-column prop="unqualifiedNum" label="涓嶈壇鏁伴噺" min-width="100px">
           <template slot-scope="{row}">
-            <span class="unvalid-style">{{ row.unqualifiedNum + row.umodel.name}}</span>
+            <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>
@@ -141,7 +141,11 @@
             <span>{{ row.num + 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="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>
@@ -269,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;
@@ -287,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