|
@@ -6545,7 +6545,17 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
+ // 对于先分组负责人审核再项目经理审核的模式,分组要必选
|
|
|
+ let { next, error } = this.handleGroupAuditorData(this.zhoData)
|
|
|
+ if(!next) {
|
|
|
+ this.$message({
|
|
|
+ message: `【${error.join('、')}】请填写任务分组`,
|
|
|
+ type: 'error'
|
|
|
+ })
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
// 自定义维度
|
|
|
this.submitingReport = true;
|
|
|
this.http.uploadFile( this.port.report.editPort, formData,
|
|
@@ -6582,6 +6592,37 @@
|
|
|
});
|
|
|
});
|
|
|
},
|
|
|
+ handleGroupAuditorData(data) {
|
|
|
+ const { reportAuditType } = this.user.timeType
|
|
|
+ if(reportAuditType != 1 && reportAuditType != 2) {
|
|
|
+ return {next: true}
|
|
|
+ }
|
|
|
+
|
|
|
+ let arrList = [];
|
|
|
+ Object.entries(data).forEach(([key, obj]) => {
|
|
|
+ Object.entries(obj).forEach(([projectName, projectData]) => {
|
|
|
+ if (projectData.workingTime && !projectData.groupId) {
|
|
|
+ arrList.push({
|
|
|
+ projectName,
|
|
|
+ date: obj.zhoDataTime,
|
|
|
+ dateText: obj.zhoDataTimeTxt
|
|
|
+ });
|
|
|
+ }
|
|
|
+ });
|
|
|
+ });
|
|
|
+
|
|
|
+ if(arrList.length > 0) {
|
|
|
+ return {
|
|
|
+ next: false,
|
|
|
+ error: arrList.map(item => `【${item.date} ${item.dateText} 中的 (${item.projectName})项目】`),
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+ return {
|
|
|
+ next: true,
|
|
|
+ error: [],
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
ChangeHourMinutestr (str) {
|
|
|
if (str !== "0" && str !== "" && str !== null) {
|
|
|
return ((Math.floor(str / 60)).toString().length < 2 ? "0" + (Math.floor(str / 60)).toString() :
|