diff --git a/src/pages/components/AttendanceDetailDialog.vue b/src/pages/components/AttendanceDetailDialog.vue
index 361d6a1..277f425 100644
--- a/src/pages/components/AttendanceDetailDialog.vue
+++ b/src/pages/components/AttendanceDetailDialog.vue
@@ -2,38 +2,43 @@
今日出勤
-
总包人员
-
监理人员
-
劳务人员
+
总包人员
+
监理人员
+
劳务人员
-
+
-
-
-
-
-
-
- {{ row.workerGender==1?'女':'男' }}
-
-
-
-
-
-
- {{ row.attendanceTime|formatTime }}
-
-
-
-
-
- {{ row.attendanceOutTime|formatTime }}
-
-
-
+
+
+
+
+
+
+ {{ row.workerGender == 1 ? '女' : '男' }}
+
+
+
+
+
+
+ {{ row.attendanceTime | formatTime }}
+
+
+
+
+
+ {{ row.attendanceOutTime | formatTime }}
+
+
+
-
-
+
+
@@ -49,57 +54,69 @@ export default {
data() {
return {
- loading:false,
+ loading: false,
show: false,
tableData: [],
- projectId:0,
- deptId:0,
- size:10,
- index:1,
- total:0,
- nav:101
+ projectId: 0,
+ deptId: 0,
+ size: 10,
+ index: 1,
+ total: 0,
+ nav: 101
};
},
mounted() {
-
+
},
methods: {
- handleCurrentChange(n){
- this.index=n;
+ handleCurrentChange(n) {
+ this.index = n;
this.loadData();
},
- doNav(n){
- this.nav=n;
- this.index=1;
+ doNav(n) {
+ this.nav = n;
+ this.index = 1;
this.loadData();
},
showDialog(data) {
- this.projectId=data?.projectId||0;
- this.deptId=data?.deptId||0;
- this.size=10;
- this.index=1;
+ this.projectId = data?.projectId || 0;
+ this.deptId = data?.deptId || 0;
+ this.size = 10;
+ this.index = 1;
this.loadData();
this.show = true
},
- loadData(){
- let postData={
- attendanceTime:this.$dt(new Date()).format("YYYY-MM-DD"),
- projectId:this.projectId,
- pageSize:this.size,
- pageNum:this.index,
- companyTypeId:this.nav
+ loadData() {
+ let postData = {
+ attendanceTime: this.$dt(new Date()).format("YYYY-MM-DD"),
+ projectId: this.projectId,
+ pageSize: this.size,
+ pageNum: this.index,
+ companyTypeId: this.nav
}
- this.tableData=[];
- this.loading=true;
- this.$api.attendance.listAttendance(postData).then(d=>{
- this.total=d.total||0;
- this.tableData=(d.rows||[]).map(it=>{
- it.scanPhoto=it.scanPhoto && it.scanPhoto.indexOf("/profile")==0?"/jhapi"+it.scanPhoto:it.scanPhoto;
+ this.tableData = [];
+ this.loading = true;
+ this.$api.attendance.listAttendance(postData).then(d => {
+ this.total = d.total || 0;
+ this.tableData = (d.rows || []).map(it => {
+ let dt1 = it.attendanceTime;
+ let dt2 = it.attendanceOutTime;
+ if ((!dt1 || !dt2) || dt1 == dt2) {
+ let dt = dt1 || dt2;
+ if (it.remark == "E") {
+ it.attendanceTime = dt;
+ it.attendanceOutTime = "";
+ } else {
+ it.attendanceTime = "";
+ it.attendanceOutTime = dt;
+ }
+ }
+ it.scanPhoto = it.scanPhoto && it.scanPhoto.indexOf("/profile") == 0 ? "/jhapi" + it.scanPhoto : it.scanPhoto;
return it;
});
- this.loading=false;
+ this.loading = false;
})
}
},
@@ -107,27 +124,30 @@ export default {
\ No newline at end of file