فهرست منبع

2022.5.27 9:32

山水共长天一色 3 سال پیش
والد
کامیت
18f9e3f213
1فایلهای تغییر یافته به همراه10 افزوده شده و 3 حذف شده
  1. 10 3
      fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

+ 10 - 3
fhKeeper/formulahousekeeper/timesheet_h5/src/views/review/index.vue

@@ -6,8 +6,8 @@
             <div class="formBatch">
                 <van-checkbox v-model="isAllChecked" @click="allChecked" shape="square" style="padding-left:3vw"></van-checkbox>
                 <div style="padding:1vh 2vw">
-                <van-button @click="batchAgree(true)" type="info" size="small">批量通过</van-button>
-                <van-button @click="batchAgree(false)" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button>
+                <van-button @click="batchAgree(true)" :disabled="!isCanAgree" type="info" size="small">批量通过</van-button>
+                <van-button @click="batchAgree(false)" :disabled="!isCanAgree" type="danger" size="small" style="margin-left:2vw">批量驳回</van-button>
                 </div>
             </div>
             <van-skeleton  v-for="(item,index) in report" :key="index" title avatar :row="3" :loading="false">
@@ -130,7 +130,8 @@
                 nowTime: this.format(new Date(new Date()),"yyyy-MM-dd"),
                 showPicker: false,
                 report: [],
-                flg: false
+                flg: false,
+                isCanAgree: false
             };
         },
         created() {
@@ -142,20 +143,26 @@
                     for(let i in this.report){
                         this.report[i].checked = true
                     }
+                    this.isCanAgree = true
                 }else{
                     for(let i in this.report){
                         this.report[i].checked = false
                     }
+                    this.isCanAgree = false
                 }
             },
             itemChecked(){
                 let isall = true
+                let iscan = false
                 for(let i in this.report){
                     if(!this.report[i].checked){
                         isall = false
+                    }else {
+                        iscan = true
                     }
                 }
                 this.isAllChecked = isall
+                this.isCanAgree = iscan
             },
             batchAgree(bol){
                 const toast = this.$toast.loading({