소스 검색

自定义维度移动端加必填

Lijy 1 년 전
부모
커밋
74a750d1d5

+ 1 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/index.vue

@@ -2261,8 +2261,6 @@ export default {
                     formData.append("auditorSettingArray", JSON.stringify(audItem).replace(/,/g, "@"));
                 }
 
-
-
                 if (this.user.timeType.customDegreeActive == 1) {
                     let customDegreeMultiple = this.user.timeType.customDegreeMultiple
                     if (this.form.domains[i].degreeId) {
@@ -2274,7 +2272,7 @@ export default {
                             formData.append("multiDegrId", JSON.stringify(newDegreeId).replace(/,/g, '@'))
                         }
                     } else {
-                        if (this.user.timeType.customDegreeStatus && this.form.domains[i].wuduList.length) {
+                        if (this.user.timeType.customDegreeStatus && !this.form.domains[i].degreeId) {
                             this.$toast.fail('请选择' + this.user.timeType.customDegreeName)
                             return
                         } else {

+ 8 - 2
fhKeeper/formulahousekeeper/timesheet_h5/src/views/edit/weekEdit.vue

@@ -177,13 +177,13 @@
                             <div class="chooseSomeone">
                                 <div class="chooseSomeoneFlex1">
                                     <!-- 复选 -->
-                                    <van-radio-group v-model="item.radioPickDegree" v-if="!user.timeType.customDegreeMultiple">
+                                    <van-radio-group v-model="item.radioPickDegree" v-if="!user.timeType.customDegreeMultiple" @change="$forceUpdate()">
                                         <van-radio v-for="uitem in item.wuduList" :key="uitem.id" :name="uitem.id" style="padding:10px">
                                             {{ uitem.name ? uitem.name : '' }}
                                         </van-radio>
                                     </van-radio-group>
                                     <!-- 多选 -->
-                                    <van-checkbox-group v-model="item.radioPickDegree" v-if="user.timeType.customDegreeMultiple">
+                                    <van-checkbox-group v-model="item.radioPickDegree" v-if="user.timeType.customDegreeMultiple" @change="$forceUpdate()">
                                         <van-checkbox v-for="uitem in item.wuduList" :key="uitem.id" :name="uitem.id" style="padding:10px">
                                             {{ uitem.name ? uitem.name : '' }}
                                         </van-checkbox>
@@ -2151,6 +2151,12 @@
                                     formData.append("multiDegrId", JSON.stringify(newDegreeId).replace(/,/g, '@'))
                                 }
                             } else {
+                                if(this.user.timeType.customDegreeStatus == 1) {
+                                    let times = this.form[formIndex].createDate
+                                    console.log(times)
+                                    this.$toast.fail(`[${this.getWeekDay(this.formatTime(times))}] 请选择 ${this.user.timeType.customDegreeName}`)
+                                    return
+                                }
                                 formData.append("degreeId", !customDegreeMultiple ? -1 : "[]");
                             }
                         } else {