瀏覽代碼

修复导出日报BUG
填写日报时,第一个被驳回的日报支持删除

seyason 2 年之前
父節點
當前提交
d355253ab7

+ 1 - 1
fhKeeper/formulahousekeeper/management-platform/src/main/java/com/management/platform/service/impl/ReportServiceImpl.java

@@ -4583,7 +4583,7 @@ public class ReportServiceImpl extends ServiceImpl<ReportMapper, Report> impleme
             //生成Excel文件
             //生成Excel文件
             //String fileUrlSuffix = (startDate==null?"":(startDate+"至"+endDate))+"工作日报" + System.currentTimeMillis() + ".xls";
             //String fileUrlSuffix = (startDate==null?"":(startDate+"至"+endDate))+"工作日报" + System.currentTimeMillis() + ".xls";
             String fileUrlSuffix = (startDate==null?"":(startDate+MessageUtils.message("leave.to")+endDate))+MessageUtils.message("excel.workReport") + System.currentTimeMillis() + ".xls";
             String fileUrlSuffix = (startDate==null?"":(startDate+MessageUtils.message("leave.to")+endDate))+MessageUtils.message("excel.workReport") + System.currentTimeMillis() + ".xls";
-            excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileUrlSuffix,dataList,path);
+            httpRespMsg = excelExportService.exportGeneralExcelByTitleAndList(wxCorpInfo,fileUrlSuffix,dataList,path);
         } catch (NullPointerException e) {
         } catch (NullPointerException e) {
             //httpRespMsg.setError("验证失败或缺少数据");
             //httpRespMsg.setError("验证失败或缺少数据");
             httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));
             httpRespMsg.setError(MessageUtils.message("access.verErrorOrDataLack"));

+ 14 - 7
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -457,7 +457,7 @@
                             </el-select>
                             </el-select>
                             </template>
                             </template>
                             
                             
-                            <el-link v-if="index >= 1&&domain.canEdit" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:15%;"
+                            <el-link v-if="(index >= 1 || workForm.domains.length > 0)&&domain.canEdit" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:15%;"
                                 :disabled="workForm.domains.length==0?true:(workForm.domains[index].state>=2?false:true)">
                                 :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>
                                 <i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
                             </el-link>
                             </el-link>
@@ -637,7 +637,7 @@
                                 </el-select>
                                 </el-select>
                                 </template>
                                 </template>
 
 
-                                <el-link v-if="index >= 1&&domain.canEdit" type="primary" :underline="false" @click="delDomain(index)" style="float:right;margin-right:10px;"
+                                <el-link v-if="(index >= 1 || workForm.domains.length > 0)&&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)">
                                     :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>
                                     <i class="fa fa-trash" style="color: red;;font-size:18px;"></i>
                                 </el-link>
                                 </el-link>
@@ -1797,6 +1797,7 @@
                 timeFields:['timeType', 'workingTime', 'startTime', 'progress'],
                 timeFields:['timeType', 'workingTime', 'startTime', 'progress'],
                 subProjectList:[],
                 subProjectList:[],
                 canEdit: true,
                 canEdit: true,
+                originCanEdit: true,
                 timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0],
                 timeRange:[0.5,1.0,1.5,2.0,2.5,3.0,3.5,4.0,4.5,5.0,5.5,6.0,6.5,7.0,7.5,8.0,8.5,9.0,9.5,10.0,10.5,11.0,11.5,12.0,12.5,13.0,13.5,14.0,14.5,15.0,15.5,16.0,16.5,17.0,17.5,18.0,18.5,19.0,19.5,20.0],
                 selectTime:null,
                 selectTime:null,
                 reportTimeType:{},
                 reportTimeType:{},
@@ -4706,6 +4707,7 @@
                             
                             
                             this.canEdit = true;
                             this.canEdit = true;
                         }
                         }
+                        this.originCanEdit = this.canEdit;
                         this.seleChn()
                         this.seleChn()
                     } else {
                     } else {
                         this.$message({
                         this.$message({
@@ -5879,13 +5881,18 @@
             // 移除模块
             // 移除模块
             delDomain(i) {
             delDomain(i) {
                 this.workForm.domains.splice(i,1)
                 this.workForm.domains.splice(i,1)
-                let iscan = false
-                for(let i in this.workForm.domains){
-                    if(this.workForm.domains[i].canEdit){
-                        iscan = true
+
+                //最初不可编辑的情况下,可能存在添加后删除,保留的都是审核通过的,则变成不可编辑。 如果最初是可编辑的,则一直可编辑提交。
+                if (!this.originCanEdit) {
+                    let iscan = false
+                    for(let i in this.workForm.domains){
+                        if(this.workForm.domains[i].canEdit){
+                            iscan = true
+                        }
                     }
                     }
+                    this.canEdit = iscan
                 }
                 }
-                this.canEdit = iscan
+                
                 //检测当前剩下的一个,时间类型是否是全天
                 //检测当前剩下的一个,时间类型是否是全天
                 if (this.reportTimeType.type == 0) {
                 if (this.reportTimeType.type == 0) {
                     if (this.workForm.domains[0].timeType == 0) {
                     if (this.workForm.domains[0].timeType == 0) {

+ 1 - 1
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -45,7 +45,7 @@
                 @click="copyProject(index)" style="border: 1px solid #20a0ff;padding:5px;"
                 @click="copyProject(index)" style="border: 1px solid #20a0ff;padding:5px;"
                  icon="plus" type="default" ><span style="color:#666;padding: 0 5px;">复制项目</span></van-tag> -->
                  icon="plus" type="default" ><span style="color:#666;padding: 0 5px;">复制项目</span></van-tag> -->
                 
                 
-                <van-tag v-if="index>0&&item.canEdit" color="#fff" 
+                <van-tag v-if="(index>0 || form.domains.length > 1)&&item.canEdit" color="#fff" 
                 @click="delPro(index)" style="border: 1px solid #ff0000;padding:5px;margin-left:10px;"
                 @click="delPro(index)" style="border: 1px solid #ff0000;padding:5px;margin-left:10px;"
                  icon="plus" type="default" ><span style="color:#666;padding: 0 5px;">删除</span></van-tag>
                  icon="plus" type="default" ><span style="color:#666;padding: 0 5px;">删除</span></van-tag>
                 </div>
                 </div>