Selaa lähdekoodia

禅道 3526 【零部件DVP】【生产环境】新建DVP计划,“是否等效试验”选择“等效实验”,进入DVP验证流程时,点击编辑,试验项目无选择项,点击确定,控制台报错

weibowen 4 kuukautta sitten
vanhempi
commit
11d35835c6
1 muutettua tiedostoa jossa 8 lisäystä ja 1 poistoa
  1. 8 1
      src/views/componentsDVP/verify/dvpVerify.vue

+ 8 - 1
src/views/componentsDVP/verify/dvpVerify.vue

@@ -125,7 +125,7 @@
 <!--            {{ $t('global-btn.upload.test.report') }}-->
 <!--          </a-button>-->
           <!-- 批量编辑 -->
-          <a-button class="mr12" type="primary" :disabled="isLook" @click='batchEdit' style="right: 6px">
+          <a-button class="mr12" type="primary" :disabled="isLook || batchEditButtonDisabled" @click='batchEdit' style="right: 6px">
             {{ $t('global-btn.edit') }}
           </a-button>
           <!-- 导出 -->
@@ -673,6 +673,8 @@ export default {
       /** 高度计算 */
       tableHeight: window.innerHeight - 352 + 'px',
       tableHeightValue: window.innerHeight - 380,
+      /** 批量编辑按钮是否disabled */
+      batchEditButtonDisabled: false
     }
   },
   watch: {
@@ -853,6 +855,11 @@ export default {
         if (!res.flag) {
           this.$notification.error({message: res.message});
         }
+        // 若查询条件为:非等效试验 查询结果为:0
+        // 批量编辑按钮置灰
+        if (data.isEquivalent === '1' && res.data.total === 0) {
+          this.batchEditButtonDisabled = true;
+        }
         _that.tableData = res.data.data || [];
         _that.pagination.total = res.data.total || 0;
       }).finally(() => {