Browse Source

工时管家加任务分组必填

Lijy 1 year ago
parent
commit
1deb4a86a0

+ 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>
             <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>
             <span style="margin:0px 0 10px 10px;color:#999;">{{ $t('parametermandatory') }}</span>
         </div>
         </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">
         <div class="yanjiu">
             <span style="margin-left:10px;color:#666;">{{user.companyId==781?$t('other.specificcontentandresults'):$t('other.workMatters')}}</span>
             <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>
             <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.hideStages = param.hideStages ? 1 : 0
                         param.hideTask = param.hideTask ? 1 : 0
                         param.hideTask = param.hideTask ? 1 : 0
                         param.taskRequired = param.taskRequired ? 1 : 0
                         param.taskRequired = param.taskRequired ? 1 : 0
+                        param.taskGroupRequired = param.taskGroupRequired ? 1 : 0
 
 
                         var oneseet = 0
                         var oneseet = 0
                         var twoset = 0
                         var twoset = 0
@@ -1405,6 +1411,7 @@
                             this.timeType.hideStages = this.timeType.hideStages? true: false;
                             this.timeType.hideStages = this.timeType.hideStages? true: false;
                             this.timeType.hideTask = this.timeType.hideTask? true: false;
                             this.timeType.hideTask = this.timeType.hideTask? true: false;
                             this.timeType.taskRequired = this.timeType.taskRequired? 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
                             // this.timeType.alertNonWorkday = this.timeType.alertNonWorkday ? true : false
 
 
                             if(this.timeType.alertNonWorkday) {
                             if(this.timeType.alertNonWorkday) {

+ 4 - 3
fhKeeper/formulahousekeeper/timesheet/src/views/workReport/daily.vue

@@ -6058,9 +6058,9 @@
                     }
                     }
                 }
                 }
                 // 检查任务分组
                 // 检查任务分组
-                if(this.user.timeType.taskGroupRequired == 1 && this.zhoBao.groupId){
+                if(this.user.timeType.taskGroupRequired == 1 && !this.zhoBao.groupId){
                     this.$message({
                     this.$message({
-                        message: '任务分组,请检查',
+                        message: '任务分组必填,请检查',
                         type: "error"
                         type: "error"
                     });
                     });
                     return
                     return
@@ -7740,11 +7740,12 @@
                             if (this.user.companyId == this.yisibeiCompId) {
                             if (this.user.companyId == this.yisibeiCompId) {
                                 formData.append('sapServiceId', this.workForm.domains[i].sapServiceId);
                                 formData.append('sapServiceId', this.workForm.domains[i].sapServiceId);
                             }
                             }
-                            if(this.user.timeType.taskGroupRequired == 1 && this.workForm.domains[i].groupId) {
+                            if(this.user.timeType.taskGroupRequired == 1 && !this.workForm.domains[i].groupId) {
                                 this.$message({
                                 this.$message({
                                     message: this.$t('defaultText.pleaseset') + "["+this.workForm.domains[i].projectName+"]"+this.$t('message.Projectgroupleader'),
                                     message: this.$t('defaultText.pleaseset') + "["+this.workForm.domains[i].projectName+"]"+this.$t('message.Projectgroupleader'),
                                     type: "error"
                                     type: "error"
                                 });
                                 });
+                                return
                             }
                             }
                         }
                         }
                         this.submitingReport = true;
                         this.submitingReport = true;

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

@@ -2470,6 +2470,11 @@ export default {
                 if (this.user.companyId == 3092) {
                 if (this.user.companyId == 3092) {
                     formData.append('sapServiceId', this.form.domains[i].sapServiceId);
                     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) {
             if (!this.flgLg) {
                 return
                 return

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

@@ -2143,7 +2143,10 @@
                             formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g,"@"));
                             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) {
                         if (this.user.timeType.customDegreeActive == 1) {