+
-
操作栏
-
- 取消操作
-
-
-
-
项目列表
-
+
操作栏
+
+ 取消操作
+ 出差
+
+
+
+ 项目列表
+
+
+
+
+ {{ item.projectName }}
+
+
+
+
+
+
+
工作时长
+
+
+ 天计
+ 小时计
+
-
-
- {{ item.projectName }}
-
-
-
-
-
-
-
工作时长
-
-
- 天计
- 小时计
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
@@ -199,6 +203,9 @@
prop="projectName"
label="项目名"
width="180">
+
+ {{scope.row.projectId===0?'出差':scope.row.projectName}}
+
+
+
@@ -310,16 +322,41 @@ export default {
methods: {
+ // 出差标记
+ toTravel(){
+ if (!this.selectAll) {
+ this.form = {
+ projectId: 0,
+ userId: this.selectUser.userId,
+ attendanceDay: this.selectIndex,
+ }
+ addOaAttendance(this.form).then(res => {
+ this.getList()
+ this.selectUser = this.selectArrayIndex >= this.userList.length - 1 ? this.selectUser : this.userList[this.selectArrayIndex + 1]
+
+ })
+ } else {
+ this.form = {
+ projectId: 0,
+ attendanceDay: this.selectIndex,
+ }
+ // 集体赋予状态
+ addBatchOaAttendance(this.form).then(res => {
+ this.getList()
+ })
+ }
+ },
+
// 删除签到
- removeAttendance(){
- if (!this.selectAll){
- const attendanceId = this.selectUser.attendances.find(item=>item.attendanceDay===this.selectIndex).id
- delOaAttendance(attendanceId).then(res=>{
+ removeAttendance() {
+ if (!this.selectAll) {
+ const attendanceId = this.selectUser.attendances.find(item => item.attendanceDay === this.selectIndex).id
+ delOaAttendance(attendanceId).then(res => {
this.$modal.msgSuccess("操作成功");
this.getList();
})
- }else{
- delOaAttendanceAll(this.selectIndex).then(res=>{
+ } else {
+ delOaAttendanceAll(this.selectIndex).then(res => {
this.$modal.msgSuccess("操作成功");
this.getList();
})
@@ -368,16 +405,17 @@ export default {
listOaAttendance(this.queryParams).then(res => {
this.userList = res.data;
this.total = res.total;
+ this.loading = false;
});
listProject(this.projectQueryParams).then(response => {
this.projectList = response.rows;
this.total = response.total;
- this.loading = false;
+
})
},
changeItemColor(item) {
- updateProject(item).then(res=>{
+ updateProject(item).then(res => {
this.getList();
})
@@ -465,7 +503,8 @@ table {
border-bottom: #cccccc 1px dashed;
margin: 5px 0;
}
-.color-picker{
+
+.color-picker {
font-size: 16px;
width: 30%;