Lijy преди 6 месеца
родител
ревизия
eab532fadd
променени са 1 файла, в които са добавени 32 реда и са изтрити 6 реда
  1. 32 6
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

+ 32 - 6
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -31,7 +31,7 @@
                 <van-grid-item v-if="user.timeType.enableNewWeeklyfill == 1" :class="999 == inbtn ? 'inbtn' : ''">
                     <van-button class="selectgxbtn"
                     type="default"
-                    size="mini" @click="switchWeekly(999)">周总结</van-button>
+                    size="mini" @click="switchWeekly(999)">{{ user.companyId == wuqiId ? '周报' : '周总结' }}</van-button>
                 </van-grid-item>
                 <van-grid-item v-if="weekIndex != 7 && user.timeType.enableNewWeeklyfill != 1">
                     <van-button type="default" size="mini" class="selectgxbtn" @click="addWeekIndex()" icon="plus"></van-button>
@@ -297,8 +297,8 @@
                             </template>
                         </van-cell>
                         <van-field class="form_input"
-                        v-model="item.content" name="content" type="textarea" :label="user.companyId==781?'具体内容与结果':'工作事项'" placeholder="请输入" :disabled="item.state<=1"
-                        rows="3" autosize :rules="user.timeType.workContentState == 1 ? [{ required: true, message: user.companyId==781?'具体内容与结果':'工作事项' }] : null" />
+                        v-model="item.content" name="content" type="textarea" :label="user.companyId==781?'具体内容与结果': user.companyId == wuqiId ? '日报' : '工作事项'" :placeholder="user.companyId == wuqiId ? '所在项目负责哪一模块(可重复填写),无需涉及技术细节。' : '请输入'" :disabled="item.state<=1"
+                        rows="3" autosize :rules="user.timeType.workContentState == 1 ? [{ required: true, message: user.companyId==781?'具体内容与结果':user.companyId == wuqiId ? '日报' : '工作事项' }] : null" :maxlength="user.companyId == wuqiId && 30" />
                         </div>
                         
                         <!-- 多个时间和工作事项的选择方式 -->
@@ -402,7 +402,7 @@
 
             <!-- 周总结 -->
             <div v-if="user.timeType.enableNewWeeklyfill == 1 && inbtn == 999">
-                <div class="van-cell-group__title">周总结</div>
+                <div class="van-cell-group__title">{{ user.companyId == wuqiId ? '周报' : '周总结'}}</div>
                 <van-field
                     v-model.trim="summary"
                     rows="9"
@@ -410,7 +410,7 @@
                     type="textarea"
                     maxlength="1000"
                     show-word-limit
-                    placeholder="请输入周总结"
+                    :placeholder="user.companyId == wuqiId ? '本周主要工作回顾、遗留事宜的初步处理方案和预计完成时间、下周工作的计划,尽可能详细。' : '请输入周总结'"
                 />
             </div>
              
@@ -580,6 +580,8 @@
                 summary: '', // 周总结
 
                 temporaryStorage: false, // 是否开启暂存
+
+                wuqiId: '1071'
             };
         },
         methods: {
@@ -1963,7 +1965,31 @@
                 }
                 console.log(this.form)
                 console.log(this.currentForm)
-                // return
+                // 针对物奇的判断
+                let wuqiflag = false
+                for(let idx in this.form) {
+                    const item = this.form[idx].domains || []
+                    const createDate = this.form[idx].createDate
+                    for (let index in item) {
+                        if(item[index].projectId && !item[index].content && this.user.companyId == this.wuqiId) {
+                            this.$toast(`${createDate} 日报请填写完整`)
+                            wuqiflag = true
+                            return
+                        } else {
+                            wuqiflag = false
+                        }
+                    }
+                }
+                const hasProjectIdValue = this.form.some(obj => 
+                    obj.domains.some(domain => domain.projectId && domain.projectId !== '')
+                );
+                if(hasProjectIdValue && !this.summary && this.user.companyId == this.wuqiId) {
+                    this.$toast(`请填写周报`)
+                    return
+                }
+                if(flag) {
+                    return
+                }
                 const { allday, workContentState, enableNewWeeklyfill, reportAuditType } = this.user.timeType // 系统设置的每日工作时间
                 // 针对物奇做的判断
                 if(this.user.timeType.enableNewWeeklyfill == 1){