From 1f4e7d0f73a73e7350cf5a1df279d5f30904c5d5 Mon Sep 17 00:00:00 2001
From: jiangping <jp@doumee.com>
Date: 星期三, 06 十二月 2023 08:41:32 +0800
Subject: [PATCH] bug

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

diff --git a/web_standard/src/views/ext/workorderRecordExt.vue b/web_standard/src/views/ext/workorderRecordExt.vue
index 02af8b7..1ae2f6e 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,21 @@
             <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="salaryType" label="璁′环鏂瑰紡" min-width="100px">
+         <template slot-scope="{row}">
+                    {{ row.salaryType == 0 ? '璁′欢' : (row.salaryType == 1 ? '璁℃椂' : '-') }}
+        </template>
+        </el-table-column>
+        <el-table-column prop="salaryYuan" label="璁′环宸ヨ祫(鍏�)" min-width="100px">
+          <!-- <template slot-scope="{row}">
+            <span>{{accDiv(Math.round(row.salaryyuan),100) }}</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 +283,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 +302,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