Quellcode durchsuchen

Merge branch 'master' of http://47.100.37.243:10191/wutt/manHourHousekeeper

Min vor 1 Jahr
Ursprung
Commit
9c21be2b9a

+ 5 - 2
fhKeeper/formulahousekeeper/management-platform-import/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -4752,7 +4752,11 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             User curUser = userMapper.selectById(request.getHeader("Token"));
             Integer companyId = curUser.getCompanyId();
             Integer isEngeering = companyMapper.selectById(companyId).getPackageEngineering();
-            //根据权限,日报审核员只看自己负责的人员的日报
+            //根据权限,日报审核员只看自己负责的人员的日报;有审核全员日报权限的查看全部
+            boolean auditAll = sysFunctionService.hasPriviledge(curUser.getRoleId(), "审核全员日报");
+            if (auditAll) {
+                leaderId = null;
+            }
             List<Integer> filterDeptIds = null;
             if (departmentId != null) {
                 filterDeptIds = new ArrayList<>();
@@ -4774,7 +4778,6 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             }
             //pageIndex从1开始
             Integer startIndex = (pageIndex -1) * pageSize;
-            System.out.println("startIndex="+startIndex+", pageSize="+pageSize);
             List<Map<String, Object>> auditReportList = reportMapper.getDeptImportAuditList(companyId, leaderId, startDate, endDate, filterDeptIds, projectId, startIndex, pageSize);
             long total = reportMapper.getDeptImportAuditListCount(companyId, leaderId, startDate, endDate, filterDeptIds, projectId);
             HashMap result = new HashMap();

+ 2 - 1
fhKeeper/formulahousekeeper/management-platform-import/src/main/resources/mapper/ReportMapper.xml

@@ -668,7 +668,8 @@
         a.end_time as endTime, b.incharger_id as inchargerId,
         a.creator_id as creatorId, d.name as subProjectName,a.task_id as taskId, task.name as taskName, a.is_overtime as isOvertime,a.progress as progress,
         a.department_audit_state as departmentAuditState, a.stage, a.pic_str as picStr, multi_worktime as multiWorktime
-        , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName, a.custom_data as customData
+        , reject_reason as rejectReason, reject_username as rejectUsername, reject_userid as rejectUserid, degree_id as degree_id,report_extra_degree.name as degreeName, a.custom_data as customData,
+        a.plate1, a.plate2, a.plate3, a.plate4, a.plate5
         FROM report AS a
         left join user on user.id = a.creator_id
         JOIN project AS b ON a.project_id=b.id

+ 23 - 78
fhKeeper/formulahousekeeper/timesheet-import/src/views/workReport/daily.vue

@@ -172,7 +172,7 @@
                                         </span>
                                     </span>
                                     <div class="checkbtn" style="padding-right:20px;">
-                                        <el-button v-if="item1.state >= 2 && user.id == item1.id" type="primary" size="small" @click="isSubstitude=false; fillInReport(index1,0)">{{$t('btn.editWorkReport')}}</el-button>
+                                        <!-- <el-button v-if="item1.state >= 2 && user.id == item1.id" type="primary" size="small" @click="isSubstitude=false; fillInReport(index1,0)">{{$t('btn.editWorkReport')}}</el-button> -->
                                         <el-button v-if="permissions.reportsDeleteAll && item1.state != 1" size="small" @click="guanli(item1)" style="float: right;">{{$t('btn.delete')}}</el-button>
                                     </div>
                                     <div class="one_daily_body">
@@ -262,22 +262,7 @@
                                                     <p v-if="user.timeType.customDegreeActive==1 && item2.degree_id != null && item2.degree_id != -1">{{user.timeType.customDegreeName}}:{{item2.degreeName}}</p>
                                                     <p v-if="user.timeType.customDataActive==1">{{user.timeType.customDataName}}:{{item2.customData}}</p>
                                                     <!-- 自定义日报文本 -->
-                                                    <p v-if="user.timeType.customTextActive==1">{{user.timeType.customTextName}}:{{item2.customText}}</p>
-
-                                                    <p v-if="user.company.packageEngineering == 1">
-                                                        {{$t('other.professionalProgress')}}:
-                                                        <span style="margin-right:10px;" v-for="progressItem in item2.professionProgress" :key="progressItem.id">{{progressItem.professionName}}({{progressItem.progress}}%) 
-                                                            <el-tooltip v-if="progressItem.auditState == 0"  :content="$t('state.WaitingAudit')" effect="light" placement="top">
-                                                            <i class="iconfont firerock-icondaibandengdaishenhe"></i>
-                                                            </el-tooltip>
-                                                            <el-tooltip v-if="progressItem.auditState == 1" :content="$t('state.alreadyPassed')" effect="light" placement="top">
-                                                            <i  class="iconfont firerock-iconshenhetongguo"></i>
-                                                            </el-tooltip>
-                                                            <el-tooltip v-if="progressItem.auditState == 2" :content="$t('state.notThrough')" effect="light" placement="top">
-                                                            <i  class="iconfont firerock-iconshenhebohui"></i>
-                                                            </el-tooltip>
-                                                            </span>
-                                                    </p>
+                                                    <p v-if="user.timeType.customTextActive==1">{{user.timeType.customTextName}}:{{item2.customText}}</p>            
                                                     <p v-if="item2.taskId != null">{{$t('other.task')}}:{{item2.taskName}}
                                                     </p>
                                                     <div v-if="item2.multiWorktime==0">
@@ -288,28 +273,8 @@
                                                     <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{$t('other.WorkOvertime')}}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag>
                                                     </p>
                                                     <p>{{$t('other.matters')}}:<span v-html="item2.content"></span></p>
+                                                    <p v-for="(cusItem, index) in reportCustomList" :key="cusItem.id">{{cusItem.customName}}:<span>{{item2['plate'+(index+1)]}}</span></p>
                                                     </div>
-                                                    <div v-if="item2.multiWorktime==1" >
-                                                        <p>{{$t('other.projectDuration')}}:{{item2.time.toFixed(1)}}h  <el-tag type="danger" size="mini" style="margin-left: 65px" v-if="item2.isOvertime === 1">{{ $t('other.WorkOvertime') }}<span v-if="item2.overtimeHours">{{item2.overtimeHours.toFixed(1)}}h</span></el-tag></p>
-                                                        <div v-for="(timeItem, tIndex) in item2.worktimeList" :key="tIndex"
-                                                            style="border: 0.5px #ddd solid;margin-bottom:5px;padding:5px;">
-                                                            <p style="display: inline-block;">{{$t('time.duration')}}:
-                                                                <span v-if="item2.reportTimeType == 2" style="margin-right:10px;">{{timeItem.startTime+'-'+timeItem.endTime}}</span>
-                                                            {{timeItem.time.toFixed(1)}}h  
-                                                            </p>
-                                                            <p>{{$t('other.matters')}}:<span v-html="timeItem.content"></span></p>
-                                                        </div>
-                                                    </div>
-                                                    <p v-if="item2.state == 1 && user.timeType.needEvaluate == 1">{{$t('other.evaluation')}}:<span v-html="item2.evaluate"></span></p>
-                                                    
-                                                    <!--照片的显示 -->
-                                                    <p v-if="item2.pics != null && item2.pics.length > 0"> 
-                                                        <el-image v-for="(pic, index) in item2.pics" :key="index"
-                                                            style="width: 100px; height: 100px; margin-right:10px;"
-                                                            :src="pic" 
-                                                            :preview-src-list="item2.pics">
-                                                        </el-image>
-                                                    </p>
                                                 </el-card>
                                             </el-timeline-item>
                                         </el-timeline>
@@ -1384,17 +1349,6 @@
           </el-table>
           <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isFlag" :title="$t('message.loading')+'...'" type="success" center :closable="false" show-icon></el-alert>
           <el-alert style="position:absolute;bottom:0;z-index:10;" v-if="isMore" :title="$t('message.noMoreData')" type="warning" center show-icon></el-alert>
-
-          <!-- <div slot="title" class="dialog-title selectworktime_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-tab-pane label="未提交人员列表" name="second" >
@@ -1492,16 +1446,7 @@
                 <el-button type="primary" :loading="isDenying" @click="deny()" >{{$t('btn.submit')}}</el-button>
             </div>
         </el-dialog>
-        <!--  通过弹出框 -->
-        <el-dialog :title="$t('other.reviewEvaluation')" v-if="approveinDialog" :visible.sync="approveinDialog" :close-on-click-modal="false" customClass="customWidth" width="500px">
-            <div>
-                <el-input type="textarea" v-model="approveinData.evaluate" rows="2" :placeholder="$t('defaultText.Pleaseenterthereviewyoudecidetopass')" />
-            </div>
-            <div slot="footer" class="dialog-footer">
-                <el-button  @click="approveinDialog = false" >{{$t('btn.cancel')}}</el-button>
-                <el-button type="primary" @click="approveinfun()" >{{$t('btn.submit')}}</el-button>
-            </div>
-        </el-dialog>
+        
 
         <!--批量导入日报 -->
         <el-dialog :title="$t('other.Batchimportofworkinghours')" v-if="importDialog" :visible.sync="importDialog" customClass="customWidth" width="500px">
@@ -1807,7 +1752,6 @@
                 </el-timeline>
             </div>
         </el-dialog>
-        
     </section>
 </template>
 
@@ -1832,6 +1776,7 @@
         },
         data() {
             return {
+                reportCustomList: [],
                 modItemDataId: null,
                 modImportTime: null,
                 modImportUserId: null,
@@ -2144,6 +2089,7 @@
             this.today = t;
             var startStr = util.formatDate.format(new Date(), 'yyyy-MM') + "-01";
             this.exportParam.dateRange = [startStr,t];
+            this.getReportCustom();
             this.getAllDate(1);
             this.getReportList();
             this.getProjectList();
@@ -2177,6 +2123,22 @@
                 this.showModImportTimeDialog = true;
                 this.modItemDataId = row.id;
             },
+            getReportCustom() {
+                this.http.post('/report-custom/getReportCustom', {},
+                res => {
+                    if(res.code == 'ok') {
+                        this.reportCustomList = res.data
+                    } else {
+                        
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
             delImportTime(row) {
                 let rowId = row.id;
                 this.$confirm('您确定要删除该条记录吗?',this.$t('other.prompts'), {
@@ -5425,24 +5387,7 @@
                 const d = (dt.getDate() + '').padStart(2, '0')
                 return `${y}-${m}-${d}`
             },
-            // 按周填报
-            fillInReportss() {
-                window.addEventListener('scroll', this.handleScroll, true)
-                // this.jiazai()
-                this.fillWeekDialogVisi = true
-                this.getCurrentWeek();
-                if (!this.timeBasecostList || this.timeBasecostList.length == 0) {
-                    //重新获取工时预警类型的预算项
-                    this.http.post('/project-basecost-setting/getReportBasecostList', {
-                        companyId: this.user.companyId
-                    },
-                    res => {
-                        if (res.code == "ok") {
-                            this.timeBasecostList = res.data;
-                        }
-                    });
-                }
-            },
+            
             // 按周填报的项目筛选
             selListFun(){
                 this.selProjectList = []

+ 23 - 61
fhKeeper/formulahousekeeper/timesheet-import/src/views/workReport/list_import.vue

@@ -27,14 +27,10 @@
                             </el-select>
                             <el-date-picker v-if="search.dateType == 0" v-model="search.date" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="small" 
                                 @change="getList()" :clearable="true" type="date" :placeholder="$t('defaultText.selectWorkDate')"></el-date-picker>
-                            <!-- <el-date-picker v-if="search.dateType == 0" v-model="date" type="daterange" range-separator="至" start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd"  @change="getList()" :clearable="true">
-                            </el-date-picker> -->
                              <el-date-picker size="small" v-if="search.dateType == 1" v-model="search.date" type="month" :placeholder="$t('peaseselectmonth')" format="yyyy-MM" value-format="yyyy-MM"  @change="dataYue()" :clearable="true">
                              </el-date-picker>
                         </div>
                     </template>
-                    <!-- <el-date-picker v-model="search.date" :editable="false" format="yyyy-MM-dd" value-format="yyyy-MM-dd" 
-                    @change="getList()" :clearable="true" type="date" placeholder="选择工作日期"></el-date-picker> -->
                 </el-form-item>
                 <el-form-item   style="margin-left:20px;">
                     <el-button @click="batchApprove(true)" style="margin-left:10px;" :disabled="multipleSelection.length==0" size="small">{{ $t('Batchthrough') }}</el-button>
@@ -50,63 +46,6 @@
         <el-table :data="list" ref="multipleTable" highlight-current-row v-loading="listLoading" :height="tableHeight" style="width: 100%;"
             @selection-change="handleSelectionChange">
             <el-table-column type="selection" width="55"></el-table-column>
-            <!-- <el-table-column type="expand">
-                <template slot-scope="props">
-                    <el-timeline>
-                        <el-timeline-item v-for="(item,index) in props.row.data" :key="index">
-                            <el-card shadow="never">
-                                <p>项目:<b>{{item.project}}<span v-if="item.subProjectName != null"> / {{item.subProjectName}}</span></b></p>
-                                <p v-if="user.timeType.customDegreeActive==1 && item.degree_id != null">{{user.timeType.customDegreeName}}:{{item.degreeName}}</p>
-                                <p v-if="user.company.packageEngineering == 1">
-                                    专业进度:
-                                    <span style="margin-right:10px;" v-for="progressItem in item.professionProgressList" :key="progressItem.id">
-                                        {{progressItem.professionName}}({{progressItem.progress}}%)
-                                        <el-tooltip v-if="progressItem.auditState == 0"  content="待审核" effect="light" placement="top">
-                                        <i class="iconfont firerock-icondaibandengdaishenhe"></i>
-                                        </el-tooltip>
-                                        <el-tooltip v-if="progressItem.auditState == 1" content="已通过" effect="light" placement="top">
-                                        <i  class="iconfont firerock-iconshenhetongguo"></i>
-                                        </el-tooltip>
-                                        <el-tooltip v-if="progressItem.auditState == 2" content="不通过" effect="light" placement="top">
-                                        <i  class="iconfont firerock-iconshenhebohui"></i>
-                                        </el-tooltip>
-                                        </span>
-                                </p>
-                                <p v-if="item.taskId != null">任务:{{item.taskName}}</p>
-                                <div v-if="item.multiWorktime==0">
-                                <p>时长:{{item.time}}h <span class="propsbtn" v-if="item.isOvertime === 1">
-                                    <el-tag type="danger" size="mini" style="margin-left: 65px">加班</el-tag></span>
-                                    阶段
-                                    <span v-if="item.stage != null" style="margin-left:10px;"> 投入阶段:{{item.stage}}</span>
-                                </p>
-                                <p v-if="user.role == 1 || user.role == 2 || user.role == 6">成本:{{item.cost}}元</p>
-                                <p>事项:<span v-html="item.content"></span></p>
-                                </div>
-                                <div v-if="item.multiWorktime==1" >
-                                    <div v-for="(timeItem, tIndex) in item.worktimeList" :key="tIndex"
-                                        style="border: 0.5px #ddd solid;margin:5px 0px;padding:5px; ">
-                                        <p style="line-height:20px;margin:5px 0px;">时长:
-                                            <span v-if="item.reportTimeType == 2" style="margin-right:10px;">{{timeItem.startTime+'-'+timeItem.endTime}}</span>
-                                        {{timeItem.time.toFixed(1)}}h  
-                                        </p>
-                                        <p style="line-height:20px;margin:5px 0px;">事项:<span v-html="timeItem.content"></span></p>
-                                    </div>
-                                </div>
-
-                                照片的显示
-                                <p v-if="item.pics != null && item.pics.length > 0"> 
-                                    <el-image v-for="(pic, index) in item.pics" :key="index"
-                                        style="width: 100px; height: 100px; margin-right:10px;"
-                                        :src="pic" 
-                                        :preview-src-list="item.pics">
-                                    </el-image>
-                                </p>
-                            </el-card>
-                        </el-timeline-item>
-                    </el-timeline>
-                </template>
-            </el-table-column> -->
-            
             <el-table-column prop="name" :label="$t('lable.name')" sortable>
                 <template slot-scope="scope">
                     <div>
@@ -128,6 +67,11 @@
                     <span>{{scope.row.time.toFixed(1)}}</span>
                 </template>
             </el-table-column>
+            <el-table-column v-for="(cusItem, index) in reportCustomList" :key="cusItem.id" :label="cusItem.customName"  width="180">
+                <template slot-scope="scope">
+                    <span>{{scope.row['plate'+(index+1)]}}</span>
+                </template>
+            </el-table-column>
             <el-table-column prop="state" :label="$t('state.states')">
                 <template slot-scope="scope">
                     <span v-if="scope.row.state == -1" style="color:#DAA520;">{{ $t('state.WaitingAudit') }}</span>
@@ -238,6 +182,7 @@
         },
         data() {
             return {
+                reportCustomList: [],
                 denyForm:null,
                 denyReasonDialog:false,
                 isAllSelect:false,
@@ -277,6 +222,22 @@
             };
         },
         methods: {
+            getReportCustom() {
+                this.http.post('/report-custom/getReportCustom', {},
+                res => {
+                    if(res.code == 'ok') {
+                        this.reportCustomList = res.data
+                    } else {
+                        
+                    }
+                },
+                error => {
+                    this.$message({
+                        message: error,
+                        type: "error"
+                    });
+                });
+            },
             // 获取审核记录
             recordList() {
                 // this.recordDialogVisible = true
@@ -616,6 +577,7 @@
             };
         },
         mounted() {
+            this.getReportCustom();
             this.getList();
             this.getDepartment();
             this.getProjectList();