Explorar o código

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

Min hai 1 ano
pai
achega
e362197b33

+ 7 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/settings/timetype.vue

@@ -415,6 +415,11 @@
             <el-switch style="margin:0px 0 10px 81px;" v-model="timeType.taskRequired" active-color="#20a0ff"></el-switch>
             <span style="margin:0px 0 10px 10px;color:#999;">{{ $t('parametermandatory') }}</span>
         </div>
+        <div class="yanjiu">
+            <span style="margin:0px 0 10px 10px;color:#666;">任务分组</span>
+            <el-switch style="margin-left:108px;" v-model="timeType.taskGroupRequired" active-color="#20a0ff"></el-switch>
+            <span style="margin:0px 0 10px 10px;color:#999;">{{ $t('parametermandatory') }}</span>
+        </div>
         <div class="yanjiu">
             <span style="margin-left:10px;color:#666;">{{user.companyId==781?$t('other.specificcontentandresults'):$t('other.workMatters')}}</span>
             <el-switch :style="user.companyId==781?'margin-left:66px;':'margin-left:108px;'" v-model="timeType.workContentState" active-color="#20a0ff" > </el-switch>
@@ -1336,6 +1341,7 @@
                         param.hideStages = param.hideStages ? 1 : 0
                         param.hideTask = param.hideTask ? 1 : 0
                         param.taskRequired = param.taskRequired ? 1 : 0
+                        param.taskGroupRequired = param.taskGroupRequired ? 1 : 0
 
                         var oneseet = 0
                         var twoset = 0
@@ -1405,6 +1411,7 @@
                             this.timeType.hideStages = this.timeType.hideStages? true: false;
                             this.timeType.hideTask = this.timeType.hideTask? true: false;
                             this.timeType.taskRequired = this.timeType.taskRequired? true: false;
+                            this.timeType.taskGroupRequired = this.timeType.taskGroupRequired? true: false;
                             // this.timeType.alertNonWorkday = this.timeType.alertNonWorkday ? true : false
 
                             if(this.timeType.alertNonWorkday) {

+ 16 - 0
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -6046,6 +6046,7 @@
             },
             // 按周填报里内容的填写点击确定
             setWeekProItemData() {
+                
                 //专业版模式下,任务分组和阶段必填
                 if (this.user.company.packageProject == 1 && this.user.companyId === 3917) {
                     if (!this.zhoBao.groupId || !this.zhoBao.stage) {
@@ -6056,6 +6057,14 @@
                         return;
                     }
                 }
+                // 检查任务分组
+                if(this.user.timeType.taskGroupRequired == 1 && !this.zhoBao.groupId){
+                    this.$message({
+                        message: '任务分组必填,请检查',
+                        type: "error"
+                    });
+                    return
+                }
                 //检查子项目是否必填
                 if (this.user.timeType.subProMustFill == 1 && this.zhoBao.subProjectList && this.zhoBao.subProjectList.length > 0 && !this.zhoBao.subProjectId) {
                     this.$message({
@@ -7731,6 +7740,13 @@
                             if (this.user.companyId == this.yisibeiCompId) {
                                 formData.append('sapServiceId', this.workForm.domains[i].sapServiceId);
                             }
+                            if(this.user.timeType.taskGroupRequired == 1 && !this.workForm.domains[i].groupId) {
+                                this.$message({
+                                    message: this.$t('defaultText.pleaseset') + "["+this.workForm.domains[i].projectName+"]"+this.$t('message.Projectgroupleader'),
+                                    type: "error"
+                                });
+                                return
+                            }
                         }
                         this.submitingReport = true;
                         this.http.uploadFile( this.port.report.editPort, formData,

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

@@ -2470,6 +2470,11 @@ export default {
                 if (this.user.companyId == 3092) {
                     formData.append('sapServiceId', this.form.domains[i].sapServiceId);
                 }
+
+                if(this.user.timeType.taskGroupRequired == 1 && !this.form.domains[i].groupId) {
+                    this.$toast.fail("请选择[" + this.form.domains[i].projectName + "]项目的任务分组");
+                    return;
+                }
             }
             if (!this.flgLg) {
                 return

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

@@ -2143,7 +2143,10 @@
                             formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
                         }
 
-
+                        if(this.user.timeType.taskGroupRequired == 1 && !this.form[formIndex].domains[i].groupId){
+                            this.$toast.fail('请指定' + this.weekArr[formIndex] + '的任务分组')
+                            return
+                        }
 
 
                         if (this.user.timeType.customDegreeActive == 1) {