ysy hace 1 año
padre
commit
ad4b45c540

+ 1 - 1
src/views/material/BOMmanage/components/baseInfoSave.vue

@@ -124,7 +124,7 @@
       },
 
       categoryId: {
-        type: [Number, String],
+        type: String,
         default: ''
       },
 

+ 7 - 18
src/views/material/BOMmanage/components/detailedList.vue

@@ -5,13 +5,12 @@
       ref="table"
       :columns="columns"
       :datasource="datasource"
-      :initLoad="false"
       class="dict-table"
       tool-class="ele-toolbar-actions"
     >
       <template v-slot:toolbar>
         <div class="toolbar_box">
-          <div  v-if="attributeData.status != 1">
+          <div v-if="attributeData.status != 1">
             <el-button type="primary" size="mini" @click="handleAdd"
               >新增</el-button
             >
@@ -100,7 +99,7 @@
       <!-- 表头工具栏 -->
       <template v-slot:action="{ row }">
         <el-link
-         v-if="attributeData.status != 1"
+          v-if="attributeData.status != 1"
           type="danger"
           :underline="false"
           icon="el-icon-delete"
@@ -252,7 +251,7 @@
 
         gysList: [],
 
-        attrObj: {},
+
         newTreeId: null,
 
         dictList: []
@@ -278,15 +277,7 @@
     },
 
     watch: {
-      attributeData(val) {
-        this.attrObj = val;
-        this.$refs.table.setData([]);
-        this.$nextTick(() => {
-          this.$refs.table.reload({
-            pageNum: 1
-          });
-        });
-      },
+ 
 
       treeId(val) {
         this.newTreeId = val;
@@ -296,16 +287,14 @@
     methods: {
       /* 表格数据源 */
       datasource({ where, page, limit }) {
-        if (!this.attrObj.id) {
-          return false;
-        }
+
 
         return getBomPageCategoryId({
           ...where,
           pageNum: page,
           size: limit,
-          id: this.attrObj.id,
-          bomType: this.attrObj.bomType
+          id: this.attributeData.id,
+          bomType: this.attributeData.bomType
         });
       },
 

+ 3 - 3
src/views/material/BOMmanage/detailsPop.vue

@@ -235,7 +235,6 @@
             >
               <el-tab-pane label="属性" name="属性">
                 <attribute
-                  v-if="activeName == '属性'"
                   :attributeData="currentNodeData"
                 ></attribute>
               </el-tab-pane>
@@ -253,6 +252,7 @@
                 name="明细表"
               >
                 <detailedList
+                   v-if="activeName == '明细表'"
                   :attributeData="currentNodeData"
                   :treeId="treeId"
                 ></detailedList>
@@ -282,7 +282,7 @@
                 <workmanship
                   v-if="activeName == '工序配置'"
                   ref="workmanshipRef"
-                    :attributeData="currentNodeData"
+                  :attributeData="currentNodeData"
                   :taskParam="currentNodeData"
                 ></workmanship>
               </el-tab-pane>
@@ -311,7 +311,7 @@
       v-if="baseInfoShow"
       @close="baseClose"
       :categoryObj="currentNodeData"
-        :categoryId="categoryObj.categoryId"
+      :categoryId="searchObj.categoryId"
     ></baseInfoSave>
 
     <importDialog