Ver Fonte

修复公共项目审核人不可编辑的问题

seyason há 3 anos atrás
pai
commit
23db0ff61c

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet/src/views/project/list.vue

@@ -203,7 +203,7 @@
                     </el-select>
                 </el-form-item>
                 <el-form-item label="日报审核人" >
-                    <el-select v-model="addForm.auditUserIds" multiple="true" :disabled="addForm.userId.length==0 || (user.role==0&&user.id != addForm.inchargerId)" filterable placeholder="默认为项目负责人" style="width:100%;" >
+                    <el-select v-model="addForm.auditUserIds" multiple="true" :disabled=" !(user.role==1 ||user.role==2|| user.id == addForm.inchargerId || user.id == addForm.creatorId)" filterable placeholder="默认为项目负责人" style="width:100%;" >
                         <el-option v-for="item in participator" :key="item.id" :label="item.name" :value="item.id"></el-option>
                     </el-select>
                 </el-form-item>

+ 43 - 177
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -314,6 +314,7 @@
                             :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
                             <i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
                         </el-link>
+
                         <el-link type="primary" v-if="workForm.domains[index].state == 0 || workForm.domains[index].state == 2"
                             :underline="false" style="margin-left:10px;" @click="copyProject(index)">复制</el-link>
                     </el-form-item>
@@ -402,6 +403,9 @@
                                 :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
                                 <i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
                             </el-link>
+
+                            <div class="overtime"><el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">加班</el-checkbox></div>
+                            
                             <el-link type="primary" v-if="workForm.domains[index].state == 0 || workForm.domains[index].state == 2"
                                 :underline="false" style="margin-left:10px;" @click="copyProject(index)">复制</el-link>
                         </el-form-item>
@@ -580,6 +584,12 @@
         <!-- 按周填报弹窗 -->
         <el-dialog title="请填写" :visible.sync="tianxieDialogVisible" width="30%" :before-close="handleClose">
             <div>
+                <div class="zhoFel" v-if="zhoBao.auditUserList != null && zhoBao.auditUserList.length > 0">
+                    <p>审核人</p>
+                    <el-select v-model="zhoBao.projectAuditorId" placeholder="请选择" clearable="true" style="width: 355px">
+                        <el-option v-for="item in zhoBao.auditUserList" :key="item.id" :label="item.auditorName" :value="item.auditorId"></el-option>
+                    </el-select>
+                </div>
                 <div class="zhoFel" v-if="zhoBao.subProjectList != null && zhoBao.subProjectList.length > 0">
                     <p>子项目</p>
                     <el-select v-model="zhoBao.subProjectId" placeholder="请选择" clearable="true" style="width: 355px">
@@ -705,7 +715,7 @@
       <!-- <el-input style="width:100%" v-model="filterName" placeholder="请输入姓名搜索" @change="findUserInTree"></el-input> -->
       <el-tabs v-model="activeName" @tab-click="handleClick">
         <el-tab-pane label="已填工时情况" name="first">
-          <div class="selectworktime_export">
+          <div class="selectworktime_export" style="margin-top:10px;">
             <div class="selectworktime_export_l">
               <el-date-picker
               class="selecteworktime_datapick"
@@ -736,7 +746,7 @@
             >
           </div>
 
-          <el-table
+          <el-table ref="hasworkTbl"
             :data="monthworkDate"
             border
             :height="500"
@@ -753,9 +763,9 @@
             </el-table-column>
             <el-table-column
               width="90"
-              v-for="(item, index) in allDate"
+              v-for="(item, index) in pickDateArray"
               :key="index"
-              :label="item.showDate + '/' + item.weekDay"
+              :label="item.label"
               align="center"
             >
               <template slot-scope="scope">
@@ -764,27 +774,16 @@
                   v-if="
                     scope.row.worktimeList.filter(
                       (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
+                        w.createDate==item.date
                     ).length > 0 &&
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
+                      (w) =>w.createDate==item.date
                     )[0].workingTime < reportTimeType.allday
                   "
                 >
                   {{
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split("-")[2] ==
-                          item.date.split("月")[1].replace("日", "") ||
-                        w.createDate.split("-")[2] ==
-                          "0" + item.date.split("月")[1].replace("日", "")
+                      (w) =>w.createDate==item.date
                     )[0].workingTime
                   }}
                 </div>
@@ -792,67 +791,39 @@
                   style="color: #20a0ff"
                   v-if="
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
+                      (w) =>w.createDate==item.date
                     ).length > 0 &&
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
+                      (w) =>w.createDate==item.date
                     )[0].workingTime > reportTimeType.allday
                   "
                 >
                   {{
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split("-")[2] ==
-                          item.date.split("月")[1].replace("日", "") ||
-                        w.createDate.split("-")[2] ==
-                          "0" + item.date.split("月")[1].replace("日", "")
+                      (w) =>w.createDate==item.date
                     )[0].workingTime
                   }}
                 </div>
                 <div
                   v-if="
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
+                      (w) =>w.createDate==item.date
                     ).length > 0 &&
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
+                      (w) =>w.createDate==item.date
                     )[0].workingTime == reportTimeType.allday
                   "
                 >
                   {{
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split("-")[2] ==
-                          item.date.split("月")[1].replace("日", "") ||
-                        w.createDate.split("-")[2] ==
-                          "0" + item.date.split("月")[1].replace("日", "")
+                      (w) =>w.createDate==item.date
                     )[0].workingTime
                   }}
                 </div>
                 <div
                   v-if="
                     scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
+                      (w) =>w.createDate==item.date
                     ).length == 0
                   "
                 >
@@ -874,8 +845,8 @@
           <!-- </div> -->
         </el-tab-pane>
 
-        <el-tab-pane label="未填人员列表" name="second">
-          <div class="selectworktime_export">
+        <el-tab-pane label="未填人员列表" name="second" >
+          <div class="selectworktime_export" style="margin-top:10px">
             <div class="selectworktime_export_l">
               <el-date-picker
               class="selecteworktime_datapick"
@@ -912,11 +883,7 @@
             style="width: 100%"
           >
             <el-table-column width="300" fixed="left" label="部门" prop="department">
-              <!-- <template slot-scope="scope">
-                {{ scope.$index + 1 }}
-              </template> -->
             </el-table-column>
-
             <el-table-column width="300" prop="name" fixed="left" label="姓名" >
             </el-table-column>
             <el-table-column
@@ -925,120 +892,8 @@
               align="center"
               prop="createDate"
             >
-
-              <!-- <template slot-scope="scope">
-                <div
-                  style="color: red"
-                  v-if="
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
-                    ).length > 0 &&
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
-                    )[0].workingTime < reportTimeType.allday
-                  "
-                >
-                  {{
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split("-")[2] ==
-                          item.date.split("月")[1].replace("日", "") ||
-                        w.createDate.split("-")[2] ==
-                          "0" + item.date.split("月")[1].replace("日", "")
-                    )[0].workingTime
-                  }}
-                </div>
-                <div
-                  style="color: #20a0ff"
-                  v-if="
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
-                    ).length > 0 &&
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
-                    )[0].workingTime > reportTimeType.allday
-                  "
-                >
-                  {{
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split("-")[2] ==
-                          item.date.split("月")[1].replace("日", "") ||
-                        w.createDate.split("-")[2] ==
-                          "0" + item.date.split("月")[1].replace("日", "")
-                    )[0].workingTime
-                  }}
-                </div>
-                <div
-                  v-if="
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
-                    ).length > 0 &&
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
-                    )[0].workingTime == reportTimeType.allday
-                  "
-                >
-                  {{
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split("-")[2] ==
-                          item.date.split("月")[1].replace("日", "") ||
-                        w.createDate.split("-")[2] ==
-                          "0" + item.date.split("月")[1].replace("日", "")
-                    )[0].workingTime
-                  }}
-                </div>
-                <div
-                  v-if="
-                    scope.row.worktimeList.filter(
-                      (w) =>
-                        w.createDate.split('-')[2] ==
-                          item.date.split('月')[1].replace('日', '') ||
-                        w.createDate.split('-')[2] ==
-                          '0' + item.date.split('月')[1].replace('日', '')
-                    ).length == 0
-                  "
-                >
-                  0
-                </div>
-              </template> -->
             </el-table-column>
           </el-table>
-          <!-- <div slot="title" class="dialog-title">
-            <label style="font-size: 16px">员工每日未填报工时数</label>
-            <el-link
-              type="primary"
-              style="float: right; margin-right: 60px"
-              @click="exportMembWorkHours()"
-              >导出未填报数据</el-link
-            > -->
-          <!-- <el-button >导出</el-button> -->
-          <!-- </div> -->
         </el-tab-pane>
       </el-tabs>
     </el-dialog>
@@ -1095,7 +950,14 @@
             <div v-if="active==1" style="padding:10px;">
                 <el-table border :data="checkinList" highlight-current-row v-loading="checkinLoading" :height="395" 
                 style="width: 100%;margin-top:5px;" >
-                <el-table-column prop="createDate" label="工作日期"  ></el-table-column>
+                <el-table-column prop="hasPassed" label="审核状态"  width="100px">
+                    <template slot-scope="scope">
+                         <span v-if="scope.row.hasPassed" style="color:green; margin-left:10px;">已审</span>
+                         <span v-if="!scope.row.hasPassed" style="color:red; margin-left:10px;">未审</span>
+                    </template>
+                </el-table-column>
+                <el-table-column prop="createDate" label="工作日期"  >
+                </el-table-column>
                 <el-table-column prop="weekDayTxt" label="星期"  ></el-table-column>
                 <el-table-column prop="username" label="员工姓名"  ></el-table-column>
                 <el-table-column prop="startTime" label="上班时间"  ></el-table-column>
@@ -1182,7 +1044,7 @@
     export default {
         data() {
             return {
-
+                pickDateArray:[],
       WorktimeDatepickValue1: [],
       WorktimeDatepickValue2: [],
       activeName:"first",
@@ -1823,7 +1685,7 @@
         let nowwd = [this.getAutoWeekDate(nowdate)[0],this.getAutoWeekDate(nowdate)[6]]
         this.WorktimeDatepickValue1 = nowwd
       }
-      this.allDate = this.alreadyAllDate(this.WorktimeDatepickValue1[0],this.WorktimeDatepickValue1[1])
+    //   this.allDate = this.alreadyAllDate(this.WorktimeDatepickValue1[0],this.WorktimeDatepickValue1[1])
       this.http.post(
         "/report/getUserDailyWorkTime",
         // "/report/getNoReportUserList",
@@ -1834,9 +1696,11 @@
         },
         (res) => {
           if (res.code == "ok") {
+            this.pickDateArray = res.data.days;
             this.monthworkDate = res.data.list;
-            this.$forceUpdate();
-            console.log("monthworkdate", this.monthworkDate);
+            this.$nextTick(function(){
+                this.$refs.hasworkTbl.doLayout();
+            });
           }
         },
         (error) => {
@@ -1886,6 +1750,7 @@
       if(e){
         this.WorktimeDatepickValue1 = lastwd 
         this.showMonthWorkTime()
+        
       }else{
         this.WorktimeDatepickValue2 = lastwd 
         this.showMonthNotWorkTime()
@@ -3217,12 +3082,13 @@
                         sss.stage = that.workForm.domains[0].stage
                         sss.subProjectList = that.workForm.domains[0].subProjectList
                         sss.stages = that.workForm.domains[0].stages
+                        // sss.auditUserList = that.workForm.domains[0].auditUserList;
                     } else {
-                        console.log(123)
                         sss.subProjectId = item.subProjectId
                         sss.stage = item.stage
                         sss.subProjectList = item.subProjectList
                         sss.stages = item.stages
+                        // sss.auditUserList = item.auditUserList;
                     }
                     console.log(sss, '数据')
                     that.zhoBaoIdx = i