ysy 1 rok temu
rodzic
commit
f82ee417d7

+ 9 - 3
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -158,7 +158,7 @@
           </ele-pro-table>
         </el-tab-pane>
         <el-tab-pane label="质检项参数" name="质检项参数">
-          <term></term>
+          <term :qualityParam="qualityParam"></term>
         </el-tab-pane>
         <el-tab-pane label="生产节拍" name="生产节拍">
           <el-form label-width="100px" ref="form" :model="beatParam">
@@ -1305,7 +1305,9 @@
         currentIndex: 0,
         tableData: {},
         beatParam: {},
-        normalHours: {}
+        normalHours: {},
+        qualityParam: [],
+        qualityPointParam: []
       };
     },
     created() {
@@ -1550,7 +1552,11 @@
           this.$refs.table.setData(
             this.tableData.taskParam[this.currentIndex].produceList || []
           );
-        } else if (this.activeName === '生产节拍') {
+        }  else  if (this.activeName === '质检项参数') {
+           this.qualityParam =  this.tableData.taskParam[this.currentIndex].qualityParam  || []
+        } 
+        
+        else if (this.activeName === '生产节拍') {
           console.log(this.tableData.taskParam[this.currentIndex].beatParam);
           this.beatParam =
             this.tableData.taskParam[this.currentIndex].beatParam || {};

+ 41 - 8
src/views/material/BOMmanage/qualityTesting/term.vue

@@ -32,13 +32,24 @@
 
         <div class="content_ll">
           <div class="name">状态</div>
-          <div class="">
+          <div
+            style="width: 100%; display: flex; justify-content: space-between"
+          >
             <el-tag size="small">{{
               item.qualityStandard && item.qualityStandard.status == 1
                 ? '启用'
                 : '停用'
-            }}</el-tag></div
-          >
+            }}</el-tag>
+
+            <el-link
+              type="danger"
+              :underline="false"
+              icon="el-icon-delete"
+              @click="handDel(index)"
+            >
+              删除
+            </el-link>
+          </div>
         </div>
 
         <el-form ref="form" style="width: 100%">
@@ -46,7 +57,6 @@
             style="margin-top: 15px"
             :data="item.qualityStandard.parameterStandards"
             border
-            
           >
             <el-table-column
               :label="item.qualityStandard.singleWeightDivision"
@@ -139,15 +149,26 @@
   import { EventBus } from '@/utils/eventBus';
   export default {
     components: { termPop },
+
+    props: {
+        qualityParam: {
+            type: Array,
+            default() {
+
+                return [];
+            }
+        }
+    },
     data() {
       return {
         list: []
       };
     },
 
+    
+
     created() {
       EventBus.$on('inspectionSelection', (data) => {
-
         let _arr = this.updateOrCreateObjectInArray(this.list, data.message);
         this.list = JSON.parse(JSON.stringify(_arr));
         this.$forceUpdate();
@@ -168,6 +189,16 @@
           // 如果不存在,将新对象添加到数组中
           return [...array, newObj];
         }
+      },
+
+      handDel(index) {
+        this.$confirm('是否删除该质检项', '删除', {
+          type: 'warning'
+        })
+          .then(() => {
+            this.list.splice(index, 1);
+          })
+          .catch(() => {});
       }
     }
   };
@@ -188,15 +219,17 @@
   }
 
   .content_ll {
-    width: 50%;
+    width: 48%;
     display: flex;
     flex-direction: row;
-    margin-top: 4px;
+
+    margin: auto;
+    margin-top: 10px;
 
     .name {
       width: 130px;
       color: #000;
-      font-weight: 700;
+      font-weight: 500;
     }
   }
 </style>