Explorar o código

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

Lijy %!s(int64=2) %!d(string=hai) anos
pai
achega
541e9f76c8

+ 45 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/corpreport/list.vue

@@ -100,6 +100,11 @@
           <el-select v-if="ins == 6 || ins == 8 || ins == 9 || ins == 10 || ins == 11" v-model="userId" placeholder="请选择人员" @change="selcts()" clearable filterable size="small" style="margin-left:10px;width:150px">
             <el-option v-for="(item, index) in selUserList" :key="index" :label="item.name" :value="item.id"></el-option>
           </el-select>
+
+          <!-- 项目阶段筛选 -->
+          <el-select v-if="ins == 5" multiple v-model="stageNames" @visible-change="visibleSelcts" @clear="visibleSelcts(false)" clearable size="small" filterable collapse-tags placeholder="请选择阶段" style="margin-left:10px;">
+            <el-option v-for="item in firstStages" :key="item" :label="item" :value="item"></el-option>
+          </el-select>
       </div>
       <p style="float: right;margin-right: 25px;" ><el-button type="primary" @click="exportExcel" size="mini">报表导出</el-button></p>
     </div>
@@ -359,7 +364,7 @@
             </el-table>
             <el-table v-if="ins == 12" border :data="groupWorktimeList.right" key="12"
             highlight-current-row v-loading="listLoading" :height="tableHeight" 
-             style="width: 66%;float:right;" ref="table">
+             style="width: 66%;float:right;" ref="grouptable">
                 <el-table-column label="按项目统计" header-align="center">
                   <el-table-column prop="projectCode" label="项目编号" min-width="75"></el-table-column>
                   <el-table-column prop="projectName" label="项目名称" min-width="125"></el-table-column>
@@ -673,6 +678,8 @@ export default {
       detailList:[],
       detailVisible: false,
       stages:[],
+      firstStages: [],
+      stageNames: [],
       addFormVisible:false,
       title:'',
       childrenList:[],
@@ -1062,6 +1069,14 @@ export default {
         } else if (this.ins == 5) {
           fName = "项目阶段工时报表.xls";
           url += "/exportProjectStagesCost";
+          if(this.stageNames.length){
+            let stagestr = ''
+            for(let i in this.stageNames){
+              stagestr += this.stageNames[i] + ','
+            }
+            stagestr = stagestr.substring(0,stagestr.length - 1)
+            sl.stageNames = stagestr
+          }
         } else if (this.ins == 6) {
           fName = "加班情况统计报表.xls";
           url += "/exportOvertimeList";
@@ -1352,20 +1367,43 @@ export default {
             });
         });
     },
+    visibleSelcts(e){
+      console.log('show show way',e);
+      if(!e){
+        this.getProjectStages(true)
+      }
+    },
     //获取项目阶段的汇总工时
-    getProjectStages() {
+    getProjectStages(e) {
+      
       this.listLoading = true;
-      this.http.post('/project/getProjectStagesCost', {
-                    pageIndex: this.page,
-                    pageSize: this.size,
-                    projectId: this.proJuctId
-                    },
+      let parameter = {
+        pageIndex: this.page,
+        pageSize: this.size,
+        projectId: this.proJuctId
+      }
+      if(!e){
+        this.stageNames = []
+      }else{
+        if(this.stageNames.length){
+          let stagestr = ''
+          for(let i in this.stageNames){
+            stagestr += this.stageNames[i] + ','
+          }
+          stagestr = stagestr.substring(0,stagestr.length - 1)
+          parameter.stageNames = stagestr
+        }
+      }
+      this.http.post('/project/getProjectStagesCost', parameter,
         res => {
             if (res.code == "ok") {
                 this.list5 = res.data.records;
                 // console.log(this.list);
                 this.total = res.data.total;
                 this.stages = res.data.stages;
+                if(!e){
+                  this.firstStages = res.data.stages;
+                }
                 this.listLoading = false; 
                 this.$nextTick(()=>{this.$refs.table.doLayout()})
             } else {

+ 10 - 2
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -265,10 +265,16 @@
         <el-row v-if="timeType.customDataActive && user.company.packageProject==1" :gutter="20" style="padding-top:10px;width:100%;margin:0 auto;padding-left:10px;padding-right:10px;">
             <el-col :span="24" >
                 <div class="panel" style="height:60px;">
-                    <el-form :inline="true" :model="timeType"  style="margin-top:10px;">
+                    <el-form :inline="true" :model="timeType" style="margin-top:10px;">
                         <el-form-item label="字段名称 ">
                             <el-input placeholder="请输入字段名称" maxlength="5" size="small" v-model="timeType.customDataName" clearable> </el-input>
                         </el-form-item>
+                        <el-form-item label="是否开启最大值限制 " style="margin-left:10px;">
+                            <el-switch v-model="timeType.customDataMaxStatus" active-color="#13ce66" inactive-color="#ff4949"> </el-switch>
+                        </el-form-item>
+                        <el-form-item label="最大值 " style="margin-left:10px;" v-if="timeType.customDataMaxStatus">
+                            <el-input-number v-model="timeType.customDataMaxValue"></el-input-number>
+                        </el-form-item>
                     </el-form>
                 </div>
             </el-col>
@@ -934,7 +940,7 @@
                         param.customTextStatus = param.customTextStatus && param.customTextActive ? 1 : 0
                         param.customDegreeStatus = param.customDegreeStatus && param.customDegreeActive ? 1 : 0
                         param.customDataStatus = param.customDataStatus && param.customDataActive ? 1 : 0
-
+                        param.customDataMaxStatus = param.customDataMaxStatus && param.customDataActive ? 1 : 0
 
                         param.workContentState = param.workContentState ? 1 : 0
                         // console.log(param, '将要提交的值')
@@ -984,6 +990,8 @@
                             this.timeType.customDataStatus = this.timeType.customDataStatus ? true : false
                             this.timeType.fillAhead = this.timeType.fillAhead ? true : false
                             this.timeType.mainProjectState = this.timeType.mainProjectState ? true : false
+                            this.timeType.customDataMaxStatus = this.timeType.customDataMaxStatus ? true : false
+                            this.timeType.customDataMaxValue = this.timeType.customDataMaxValue ? this.timeType.customDataMaxValue : 100
                             this.timeChange();
                             let userlist = res.data.userList
                             this.whiteList = []

+ 50 - 29
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -25,7 +25,7 @@
                 </div>
                 <div style="display:flex;">
                 <div class="grand flex">
-                    <div class="left-laowang" style="flex: 0 0 180px;overflow: hidden;">
+                    <div class="left-laowang" style="flex: 0 0 210px;overflow: hidden;">
                         <div v-if="permissions.reportsCompany || user.manageDeptId != 0 || permissions.reportsDept" :style="'overflow-x:hidden;overflow-y:auto;height:' + tableHeight + 'px;'">
                             <div style="width: 100%;box-sizing: border-box;padding-right: 10px;">
                                 <el-select v-model="selectState" size="small" @change="stateChange" style="100%">
@@ -318,8 +318,8 @@
                         </el-time-picker>
                         </span>
                         <div class="overtime" v-if="user.timeType.fillOvertime || isWeekend">
-                            <el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
-                            <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
+                            <el-checkbox :disabled="!domain.canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
+                            <el-input :disabled="!domain.canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
                         </div>
                     </el-form-item>
                     
@@ -346,7 +346,7 @@
                         </el-select>
                         </template>
                         
-                        <el-link v-if="index >= 1&&canEdit" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;"
+                        <el-link v-if="index >= 1&&domain.canEdit" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;"
                             :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>
@@ -358,7 +358,7 @@
                     </el-form-item>
                     <!--如果设置了工时成本预警的预算成本项-->
                     <el-form-item label="预算来源" v-if="user.company.packageProject==1&&timeBasecostList &&timeBasecostList.length>0">
-                        <el-select v-model="domain.basecostId" :disabled="!canEdit" @change="$forceUpdate()">
+                        <el-select v-model="domain.basecostId" :disabled="!domain.canEdit" @change="$forceUpdate()">
                             <el-option v-for="item in timeBasecostList" :label="item.name" :value="item.id" :key="item.id"></el-option>
                         </el-select>
                     </el-form-item>
@@ -379,33 +379,33 @@
                         </el-select>
                     </el-form-item>
                     <el-form-item :label="user.companyId==781?'审核人':'项目审核人'">
-                        <el-select v-model="domain.projectAuditorId" :disabled="!canEdit" @change="$forceUpdate()">
+                        <el-select v-model="domain.projectAuditorId" :disabled="!domain.canEdit" @change="$forceUpdate()">
                             <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id"></el-option>
                         </el-select>
                     </el-form-item>
                     <!-- 相关维度/自定义维度 -->
                     <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList != undefined && domain.wuduList.length != 0 ? { required: true, message: '请选择' + yonghuUser.customDegreeName, trigger: ['change','blur'] } : null" :prop="'domains.' + index + '.degreeId'">
-                        <el-select v-model="domain.degreeId" clearable placeholder="请选择" :disabled="!canEdit">
+                        <el-select v-model="domain.degreeId" clearable placeholder="请选择" :disabled="!domain.canEdit">
                             <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
                             </el-option>
                         </el-select>
                     </el-form-item>
                     <!-- 相关数值 -->
                     <el-form-item :label="yonghuUser.customDataName" v-if="yonghuUser.customDataActive == 1" :prop="'domains.' + index + '.customData'" :rules="user.timeType.customDataStatus == 1 ? { type: 'number', required: true, message: '请填写' + yonghuUser.customDataName, trigger: ['change','blur'] } : null">
-                        <el-input-number :id="'numberData_'+index" :disabled="!canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
+                        <el-input-number :id="'numberData_'+index" :disabled="!domain.canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)" :max="user.timeType.customDataMaxStatus == 1 ? user.timeType.customDataMaxValue : 'infinity'"></el-input-number>
                     </el-form-item>
                     <!-- 自定义文本 -->
                     <el-form-item :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1" :prop="'domains.' + index + '.customText'" :rules="user.timeType.customTextStatus == 1 ? { required: true, message: '请填写' + yonghuUser.customTextName, trigger: ['change','blur'] } : null">
-                        <el-input :disabled="!canEdit" v-model="domain.customText" type="textarea" :rows="1" style="width:75%;margin-right:7%" maxlength="1000" show-word-limit></el-input>
+                        <el-input :disabled="!domain.canEdit" v-model="domain.customText" type="textarea" :rows="1" style="width:75%;margin-right:7%" maxlength="1000" show-word-limit></el-input>
                     </el-form-item>
                     <el-form-item v-if="reportTimeType.type == 3" label="用时占比" :prop="'domains.' + index + '.'+timeFields[reportTimeType.type]"
                         :rules="{ required: true, message: '请设置用时占比', trigger: 'blur' }">
                         <div style="width:300px;">
-                            <el-col span="14"><el-slider :disabled="!canEdit" v-model="domain.progress" :min="5" :show-tooltip="false" :step="5" style="width:180px;" @input="domain.workingTime = (reportTimeType.allday*domain.progress/100).toFixed(1)" @change="seleChn(0)"></el-slider></el-col>
+                            <el-col span="14"><el-slider :disabled="!domain.canEdit" v-model="domain.progress" :min="5" :show-tooltip="false" :step="5" style="width:180px;" @input="domain.workingTime = (reportTimeType.allday*domain.progress/100).toFixed(1)" @change="seleChn(0)"></el-slider></el-col>
                             <el-col span="10"><span style="margin-left:10px;float:right;"><span style="margin-right:10px;">{{domain.progress}}%</span>{{domain.workingTime}}小时</span></el-col>
                         </div>
-                        <div class="overtime" v-if="user.timeType.fillOvertime || isWeekend"><el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">加班</el-checkbox>
-                        <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours"  @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
+                        <div class="overtime" v-if="user.timeType.fillOvertime || isWeekend"><el-checkbox :disabled="!domain.canEdit" v-model="domain.isOvertime">加班</el-checkbox>
+                        <el-input :disabled="!domain.canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours"  @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
                         </div>
                     </el-form-item>
                     <!--工程专业版本模式下, 各个专业的进度填报 -->
@@ -454,13 +454,13 @@
                             </el-select>
                             </template>
 
-                            <el-link v-if="index >= 1&&canEdit" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;"
+                            <el-link v-if="index >= 1&&domain.canEdit" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;"
                                 :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" v-if="user.timeType.fillOvertime || isWeekend"><el-checkbox :disabled="!canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
-                            <el-input :disabled="!canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
+                            <div class="overtime" v-if="user.timeType.fillOvertime || isWeekend"><el-checkbox :disabled="!domain.canEdit" v-model="domain.isOvertime">含加班</el-checkbox>
+                            <el-input :disabled="!domain.canEdit || domain.isOvertime==null || domain.isOvertime==0 || !domain.isOvertime" v-model="domain.overtimeHours" @blur="triggerCalculateOT(index)" @input="domain.overtimeHours=domain.overtimeHours.replace(/[^\d.]/g,'')" style="width: 100px;"></el-input><span style="margin-left:5px">小时</span>
                             </div>
                             
                             <!-- <el-link type="primary" v-if="canEdit"
@@ -471,7 +471,7 @@
                         </el-form-item>
                         <!--如果设置了工时成本预警的预算成本项-->
                         <el-form-item label="预算来源" v-if="user.company.packageProject==1&&timeBasecostList &&timeBasecostList.length>0">
-                            <el-select v-model="domain.basecostId" :disabled="!canEdit" @change="$forceUpdate()">
+                            <el-select v-model="domain.basecostId" :disabled="!domain.canEdit" @change="$forceUpdate()">
                                 <el-option v-for="item in timeBasecostList" :label="item.name" :value="item.id" :key="item.id"></el-option>
                             </el-select>
                         </el-form-item>
@@ -492,7 +492,7 @@
                             </el-select>
                         </el-form-item>
                         <el-form-item label="项目审核人" >
-                            <el-select v-model="domain.projectAuditorId" :disabled="!canEdit" @change="$forceUpdate()">
+                            <el-select v-model="domain.projectAuditorId" :disabled="!domain.canEdit" @change="$forceUpdate()">
                                 <el-option v-for="item in domain.auditUserList" :label="item.auditorName" :value="item.auditorId" :key="item.id"></el-option>
                             </el-select>
                         </el-form-item>
@@ -507,18 +507,18 @@
                         </el-form-item>
                         <!-- 相关维度 -->
                         <el-form-item :label="yonghuUser.customDegreeName" v-if="domain.projectId && yonghuUser.customDegreeActive == 1" :rules="user.timeType.customDegreeStatus == 1 && domain.wuduList.length != 0 ? { required: true, message: '请选择' + yonghuUser.customDegreeName, trigger: ['change','blur'] } : null" :prop="'domains.' + index + '.degreeId'">
-                            <el-select v-model="domain.degreeId" :disabled="!canEdit" clearable placeholder="请选择">
+                            <el-select v-model="domain.degreeId" :disabled="!domain.canEdit" clearable placeholder="请选择">
                                 <el-option v-for="item in domain.wuduList" :key="item.value" :label="item.name" :value="item.id">
                                 </el-option>
                             </el-select>
                         </el-form-item>
                         <!-- 相关数值 -->
                         <el-form-item :label="yonghuUser.customDataName" v-if="domain.projectId && yonghuUser.customDataActive == 1" :prop="'domains.' + index + '.customData'" :rules="user.timeType.customDataStatus == 1 ? { type: 'number', required: true, message: '请填写' + yonghuUser.customDataName, trigger: ['change','blur'] } : null">
-                            <el-input-number :id="'numberData_'+index" :disabled="!canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)"></el-input-number>
+                            <el-input-number :id="'numberData_'+index" :disabled="!domain.canEdit" v-model="domain.customData" style="width:200px;" @keyup.native="restrictNumber('numberData_'+index)" :max="user.timeType.customDataMaxStatus == 1 ? user.timeType.customDataMaxValue : 'infinity'"></el-input-number>
                         </el-form-item>
                         <!-- 自定义文本 -->
                         <el-form-item :label="yonghuUser.customTextName" v-if="yonghuUser.customTextActive == 1" :prop="'domains.' + index + '.customText'" :rules="user.timeType.customTextStatus == 1 ? { required: true, message: '请填写' + yonghuUser.customTextName, trigger: ['change','blur'] } : null">
-                            <el-input :disabled="!canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" type="textarea" :rows="1" maxlength="1000"></el-input>
+                            <el-input :disabled="!domain.canEdit" v-model="domain.customText" style="width:75%;margin-right:7%" type="textarea" :rows="1" maxlength="1000"></el-input>
                         </el-form-item>
                         <!--项目管理专业版模式下,项目下的近期执行的任务 -->
                         <el-form-item label="任务/里程碑" :prop="'domains.' + index + '.taskId'" v-if="user.company.packageProject==1" >
@@ -585,10 +585,10 @@
                     </p>
                     <el-divider v-if="workForm.domains.length>1" style="margin-bottom:10px;"></el-divider>
                 </div>
-                <el-link v-if="showAddMore"  :disabled="!canEdit" type="primary" :underline="false" @click="addDomain(reportTimeType.type)" style="margin-left:40px">添加更多</el-link>
+                <el-link v-if="showAddMore" type="primary" :underline="false" @click="addDomain(reportTimeType.type)" style="margin-left:40px">添加更多</el-link>
             </el-form>
             <span slot="footer" class="dialog-footer">
-                <!-- <el-button @click="cancelReport"  v-if="workForm.domains[0].id != null && workForm.domains[0].state == 0">撤回</el-button> -->
+                <el-button @click="cancel(workForm.domains,true)" v-if="canCancelInDialog" style="float:left;">撤回</el-button>
                 <el-button @click="deleteReport"  v-if="workForm.domains[0].id != null && canEdit">删除</el-button>
                 <el-button @click="dialogVisible = false">取消</el-button>
                 <el-button v-if="!isSubstitude" @click="submitReport(1)" :loading="submitingReport" :disabled="workForm.domains.length==0?true:(canEdit?false:true)">暂存</el-button>
@@ -729,12 +729,12 @@
                 <!-- 自定义数值 -->
                 <div class="zhoFel" v-if="user.timeType.customDataActive">
                     <p>{{user.timeType.customDataName}}</p>
-                    <el-input-number :id="'weekData_num'" :disabled="!canEdit" v-model="zhoBao.customData" style="width:200px;margin-right:155px;" @keyup.native="restrictNumber('weekData_num')"></el-input-number>
+                    <el-input-number :id="'weekData_num'" v-model="zhoBao.customData" style="width:200px;margin-right:155px;" @keyup.native="restrictNumber('weekData_num')" :max="user.timeType.customDataMaxStatus == 1 ? user.timeType.customDataMaxValue : 'infinity'"></el-input-number>
                 </div>
                 <!-- 自定义文本 -->
                 <div class="zhoFel" v-if="user.timeType.customTextActive == 1">
                     <p>{{user.timeType.customTextName}}</p>
-                    <el-input :disabled="!canEdit" v-model="zhoBao.customText" type="textarea" :rows="1" style="width:355px;" maxlength="1000" show-word-limit></el-input>
+                    <el-input v-model="zhoBao.customText" type="textarea" :rows="1" style="width:355px;" maxlength="1000" show-word-limit></el-input>
                 </div>
                 <div class="zhoFel" v-if="reportTimeType.type == 2">
                     <p>选择时间</p>
@@ -1551,7 +1551,9 @@
                 approvalProcessDialog: false,
                 approvalProcessData: [],
                 leaveTypeName: ['事假','病假','年假','产假','婚假','丧假','调休假','陪产假','其他',],
-                isWeekend: false
+                isWeekend: false,
+
+                canCancelInDialog: false
             };
         },
         watch: {
@@ -3767,6 +3769,7 @@
                         var list = res.data;
                         this.report = list;
                         
+                        this.canCancelInDialog = false
                         if(list.report.length != 0) {
                             var arr = [];
                             this.canEdit = false;
@@ -3807,10 +3810,14 @@
                                     overtimeHours: list.report[i].overtimeHours,
                                     customText: list.report[i].customText,
                                     basecostId: list.report[i].basecostId,
+                                    canEdit: list.report[i].state >= 2 ? true : false
                                 })
                                 if (list.report[i].state >= 2) {
                                     this.canEdit = true;
                                 }
+                                if (list.report[i].state == 0){
+                                    this.canCancelInDialog = true
+                                }
                             }
                             this.workForm = {
                                 createDate: this.workForm.createDate,
@@ -3832,6 +3839,7 @@
                                     timeType:0,
                                     multiWorktime: this.reportTimeType.multiWorktime,
                                     worktimeList:[{}],
+                                    canEdit: true
                                 }],
                                 userId:null,
                                 userNames:null,
@@ -3921,6 +3929,7 @@
                                     timeType:0,
                                     multiWorktime: this.reportTimeType.multiWorktime,
                                     worktimeList:[{}],
+                                    canEdit: true
                                 }],
                             }
                             if(this.user.timeType.type == 1) {
@@ -4757,6 +4766,7 @@
                         state:2,//2-表示待提交
                         multiWorktime: this.reportTimeType.multiWorktime,
                         worktimeList:[{}],
+                        canEdit: true
                         // degreeId: '',
                 };
                 if(this.isWeekend){
@@ -4770,7 +4780,7 @@
                     addItem.basecostId = this.timeBasecostList[0].id;
                 }
                 this.workForm.domains.push(addItem);
-                
+                this.canEdit = true
                 if (this.reportTimeType.type == 0) {
                     //全天上下午模式下,检测时间段数量,达到2个,不能再加了
                     var length = this.workForm.domains.length;
@@ -4786,6 +4796,13 @@
             // 移除模块
             delDomain(i) {
                 this.workForm.domains.splice(i,1)
+                let iscan = false
+                for(let i in this.workForm.domains){
+                    if(this.workForm.domains[i].canEdit){
+                        iscan = true
+                    }
+                }
+                this.canEdit = iscan
                 //检测当前剩下的一个,时间类型是否是全天
                 if (this.reportTimeType.type == 0) {
                     if (this.workForm.domains[0].timeType == 0) {
@@ -5276,13 +5293,16 @@
             },
 
             //撤回日报
-            cancel(item) {
+            cancel(item,e) {
+                console.log('can can need',item);
                 this.logining = true;
                 
                 var ids = '';
-                var data = item.data;
+                var data = e ? item : item.data;
                 data.forEach(element => {
-                    ids +=(element.id+',');
+                    if(element.id){
+                        ids +=(element.id+',');
+                    }
                 });
                 this.http.post(this.port.report.cancelReport, {userId: this.user.id, reportIds: ids},
                 res => {
@@ -5293,6 +5313,7 @@
                             type: "success"
                         });
                         this.getReportList();
+                        if(e){this.getReport()}
                         this.getDepartment();
                     } else {
                         this.$message({