ysy преди 1 година
родител
ревизия
7950612a3d
променени са 2 файла, в които са добавени 21 реда и са изтрити 28 реда
  1. 3 1
      src/views/material/BOMmanage/detailsPop.vue
  2. 18 27
      src/views/material/BOMmanage/index.vue

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

@@ -376,7 +376,9 @@
 
 
         searchObj: {
         searchObj: {
           versions: '',
           versions: '',
-          categoryId: ''
+          categoryId: '',
+          isProduct: false,
+          isTemp: 0
         },
         },
 
 
         activeName: '属性',
         activeName: '属性',

+ 18 - 27
src/views/material/BOMmanage/index.vue

@@ -76,6 +76,8 @@
     </el-dialog>
     </el-dialog>
 
 
     <LCdetail ref="detailRef"></LCdetail>
     <LCdetail ref="detailRef"></LCdetail>
+
+    <BomDetailsPop  ref="bomDrawer"  ></BomDetailsPop>
   </div>
   </div>
 </template>
 </template>
 
 
@@ -90,9 +92,11 @@
     deleteBomTreeList
     deleteBomTreeList
   } from '@/api/material/BOM';
   } from '@/api/material/BOM';
   import LCdetail from './components/LCdetail.vue';
   import LCdetail from './components/LCdetail.vue';
+
+    import BomDetailsPop from '../BOMmanage/detailsPop.vue'
   export default {
   export default {
     name: 'SystemDictionary',
     name: 'SystemDictionary',
-    components: { BOMSearch, LCdetail },
+    components: { BOMSearch, LCdetail, BomDetailsPop },
     data() {
     data() {
       return {
       return {
         // 表格列配置
         // 表格列配置
@@ -213,20 +217,9 @@
             pageNum: 1,
             pageNum: 1,
             size: 10
             size: 10
           }).then((data) => {
           }).then((data) => {
-            if (data.count > 1) {
-              this.$refs.table.setData(data.list || []);
-            } else {
-              this.handelDetail(
-                data.list[0]
-                  ? data.list[0]
-                  : { categoryId: this.where.categoryId },
-                true
-              );
-            }
+            this.$refs.table.setData(data.list || []);
           });
           });
-        } else {
-          this.reload();
-        }
+        } 
       },
       },
       /* 启用关闭BOM */
       /* 启用关闭BOM */
       openBom(row, boolean) {
       openBom(row, boolean) {
@@ -290,19 +283,17 @@
           size: limit
           size: limit
         });
         });
       },
       },
-      handelDetail(row, noBack) {
-        this.$router.push({
-          path: '/material/BOMmanage/details',
-          query: {
-            versions: row.versions,
-            categoryId: row.categoryId,
-            noBack,
-            bType: this.activeName,
-            categoryLevelPathIdParent: row.rootCategoryLevelId,
-            isProduct: true,
-            isTemp: row.isTemp
-          }
-        });
+      handelDetail(row) {
+        let rowData = {
+          categoryId: row.id,
+          code: row.code,
+          versions: row.versions,
+          categoryLevelPathIdParent: row.categoryLevelPathIdParent,
+          isProduct:true,
+          isTemp: 1
+        };
+        this.$refs.bomDrawer.open(rowData);
+
       },
       },
       /* 刷新表格 */
       /* 刷新表格 */
       reload(where) {
       reload(where) {