ysy il y a 1 an
Parent
commit
0b933c82d3

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

@@ -71,6 +71,7 @@
 
 <script>
   import { saveBomTreeList, bomCategoryUpdate } from '@/api/material/BOM.js';
+  import { getCode } from '@/api/codeManagement/index.js';
   export default {
     data() {
       return {
@@ -128,12 +129,17 @@
         default: ''
       },
 
+      categoryName: {
+        type: String,
+        default: ''
+      },
+
       isEdit: {
         type: Boolean,
         default: false
       }
     },
-    created() {
+   async  created() {
       if (this.isEdit) {
         this.title = '编辑BOM';
         this.formData = {
@@ -146,8 +152,8 @@
       } else {
         this.title = '新建BOM';
         this.formData = {
-          code: '',
-          name: '',
+          code: await getCode('bom_add_code'),
+          name: this.categoryName || '',
           versions: '',
           status: '0'
         };

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

@@ -310,6 +310,7 @@
       @close="baseClose"
       :categoryObj="currentNodeData"
       :categoryId="searchObj.categoryId"
+      :categoryName="searchObj.categoryName"
     ></baseInfoSave>
 
     <importDialog

+ 2 - 0
src/views/material/BOMmanage/file/index.vue

@@ -209,6 +209,8 @@
             slot: 'action',
             fixed: 'right'
 
+            
+
           }
         ]
       };

+ 1 - 0
src/views/material/BOMmanage/index.vue

@@ -286,6 +286,7 @@
       handelDetail(row) {
         let rowData = {
           categoryId: row.categoryId,
+          categoryName: row.categoryName,
           code: row.code,
           versions: row.versions,
           rootPathIdParent: row.categoryLevelPathIdParent,

+ 4 - 11
src/views/material/product/components/index-data.vue

@@ -130,12 +130,7 @@
           工艺参数
         </el-link>
 
-    
-        <el-link
-          type="primary"
-          :underline="false"
-          @click="toBomManager(row)"
-        >
+        <el-link type="primary" :underline="false" @click="toBomManager(row)">
           结构BOM
         </el-link>
 
@@ -235,8 +230,7 @@
       @success="reload"
     />
 
-    <BomDetailsPop  ref="bomDrawer"  ></BomDetailsPop>
- 
+    <BomDetailsPop ref="bomDrawer"></BomDetailsPop>
   </div>
 </template>
 
@@ -252,7 +246,7 @@
   import linkMaterialDialog from './link-material-dialog.vue';
   import goodsAllocation from './goodsAllocation.vue';
 
-  import BomDetailsPop from '../../BOMmanage/detailsPop.vue'
+  import BomDetailsPop from '../../BOMmanage/detailsPop.vue';
 
   import aridRegion from './aridRegion';
   import importDialog from '@/components/upload/import-dialog.vue';
@@ -403,13 +397,12 @@
       toBomManager(row) {
         let rowData = {
           categoryId: row.id,
+          categoryName: row.name,
           code: row.code,
           rootPathIdParent: row.categoryLevelPathIdParent,
           isProduct: row.isProduct == 1
         };
         this.$refs.bomDrawer.open(rowData);
-
-
       },
 
       successUpload(response) {