Forráskód Böngészése

单日考勤统计修改。

zhengqiang 4 éve
szülő
commit
e0ecde7e6c
1 módosított fájl, 13 hozzáadás és 3 törlés
  1. 13 3
      src/views/business/workScheduleAttendance-day-stat.vue

+ 13 - 3
src/views/business/workScheduleAttendance-day-stat.vue

@@ -132,16 +132,15 @@
                   <td>上班时间:</td>
                   <td>{{item.workTime}}</td>
                   <td>打卡时间:</td>
-                  <td>{{item.workBeginAttendance!=null ? item.workBeginAttendance.recordTime : ""}}</td>
+                  <td v-html="showAttendanceTime(item.workBeginAttendance)"></td>
                 </tr>
                 <tr>
                   <td>下班时间:</td>
                   <td>{{item.closingTime}}</td>
                   <td>打卡时间:</td>
-                  <td>{{item.workEndAttendance!=null ? item.workEndAttendance.recordTime : ""}}</td>
+                  <td v-html="showAttendanceTime(item.workEndAttendance)"></td>
                 </tr>
               </table>
-              
             </div>
           </div>
         </template>
@@ -228,6 +227,17 @@ export default {
     });
   },
   methods: {
+    showAttendanceTime(workAttendance) {
+      if(workAttendance==null){
+        return "无记录";
+      }
+      if(workAttendance.result=="0"){
+        return "缺卡";
+      }
+      else{
+        return workAttendance.recordTime;
+      }
+    },
     indexMethod(index) {
       return (this.pageIndex - 1) * this.pageSize + (index + 1);
     },