695593266@qq.com 10 месяцев назад
Родитель
Сommit
c8ebdc2887

+ 2 - 1
src/views/inspectionWork/components/newQualityContentTabs.vue

@@ -474,7 +474,8 @@
           this.templateList = newVal;
           // console.log(newVal, 'schemeList');
         },
-        deep: true
+        deep: true,
+        immediate: true
       },
       activeName: {
         handler(newVal) {

+ 1 - 1
src/views/inspectionWork/edit.vue

@@ -294,7 +294,7 @@
         // 计算合格率和不合格率(百分比形式)
         let sampleQualificationRate = '';
         let sampleNoQualificationRate = '';
-        if (sampleQualifiedNumber) {
+        if (sampleQualifiedNumber || sampleQualifiedNumber == 0) {
           sampleQualificationRate =
             ((sampleQualifiedNumber / sampleQuantity) * 100).toFixed(2) || '';
           sampleNoQualificationRate =

+ 6 - 6
src/views/inspectionWork/index.vue

@@ -457,12 +457,12 @@
       async openEdit(type, row) {
         const menusList = this.$store.state.user.menus;
         let found = false;
-        // if (type == 'edit') {
-        //   const code = await verificationQualityInspector(row.id);
-        //   if (code == '-1') {
-        //     return;
-        //   }
-        // }
+        if (type == 'edit') {
+          const code = await verificationQualityInspector(row.id);
+          if (code == '-1') {
+            return;
+          }
+        }
         for (const item of menusList) {
           if (item.children) {
             for (const item2 of item.children) {