|
@@ -1633,10 +1633,10 @@
|
|
// 提交日报
|
|
// 提交日报
|
|
submitReport() {
|
|
submitReport() {
|
|
this.form[this.inbtn] = this.currentForm
|
|
this.form[this.inbtn] = this.currentForm
|
|
|
|
+ const { allday, workContentState } = this.user.timeType // 系统设置的每日工作时间
|
|
|
|
|
|
// 针对物奇做的判断
|
|
// 针对物奇做的判断
|
|
if(this.user.timeType.enableNewWeeklyfill == 1){
|
|
if(this.user.timeType.enableNewWeeklyfill == 1){
|
|
- const { allday } = this.user.timeType // 系统设置的每日工作时间
|
|
|
|
const { next, error, group } = this.judgeStrange(this.form)
|
|
const { next, error, group } = this.judgeStrange(this.form)
|
|
if(!next){
|
|
if(!next){
|
|
if(error.length > 0) {
|
|
if(error.length > 0) {
|
|
@@ -1648,7 +1648,16 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+ console.log(workContentState)
|
|
|
|
+ // 判断工作事项是否为必填
|
|
|
|
+ if(workContentState == '1') {
|
|
|
|
+ const { error, next } = this.judgeWorkContent(this.form)
|
|
|
|
+ if(!next) {
|
|
|
|
+ this.$toast(`【${error.join('、')}】请工作事项`)
|
|
|
|
+ return
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
//检查子项目
|
|
//检查子项目
|
|
if (this.user.timeType.subProMustFill == 1) {
|
|
if (this.user.timeType.subProMustFill == 1) {
|
|
for(let i in this.form){
|
|
for(let i in this.form){
|
|
@@ -2133,6 +2142,36 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ // 提交数据,工作事项的判断
|
|
|
|
+ judgeWorkContent(from) {
|
|
|
|
+ console.log(from, '<======== 要判断的fom表单')
|
|
|
|
+ const newFrom = JSON.parse(JSON.stringify(from))
|
|
|
|
+ const arrList = []
|
|
|
|
+ for(var i in newFrom) {
|
|
|
|
+ const { domains, createDate } = newFrom[i]
|
|
|
|
+ for(var j in domains) {
|
|
|
|
+ if(domains[j].projectId && !domains[j].content) {
|
|
|
|
+ arrList.push({
|
|
|
|
+ dateTime: createDate,
|
|
|
|
+ projectName: domains[j].projectName,
|
|
|
|
+ weeks: this.getNewWeek(createDate)
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ console.log(arrList.map(item => `【${item.dateTime} ${item.weeks} 中的 (${item.projectName})项目】`), '查看对象')
|
|
|
|
+ if(arrList.length > 0) {
|
|
|
|
+ return {
|
|
|
|
+ next: false,
|
|
|
|
+ error: arrList.map(item => `【${item.dateTime} ${item.weeks} 中的 (${item.projectName})项目】`),
|
|
|
|
+ }
|
|
|
|
+ } else {
|
|
|
|
+ return {
|
|
|
|
+ next: true,
|
|
|
|
+ error: [],
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ },
|
|
// 判断是否小于系统设置的每日工作时间
|
|
// 判断是否小于系统设置的每日工作时间
|
|
judgmentData(data) {
|
|
judgmentData(data) {
|
|
const { allday } = this.user.timeType // 系统设置的每日工作时间
|
|
const { allday } = this.user.timeType // 系统设置的每日工作时间
|