ysy пре 1 година
родитељ
комит
2c997c6afb

+ 13 - 42
src/views/material/BOMmanage/components/attribute.vue

@@ -1,26 +1,7 @@
 <template>
   <div>
     <el-form label-width="100px" ref="form" :model="attributeData">
-      <el-row>
-        <el-col :span="16" label-width="100px">
-          <el-form-item label="类型" prop="type">
-            <el-select
-              style="width: 100%"
-              :disabled="true"
-              v-model="attributeData.bomType"
-              placeholder="请选择"
-            >
-              <el-option
-                v-for="item in bomTypeOptions"
-                :label="item.label"
-                :value="item.value"
-                :key="item.value"
-              >
-              </el-option>
-            </el-select>
-          </el-form-item>
-        </el-col>
-      </el-row>
+
 
       <el-row>
         <el-col :span="16" label-width="100px">
@@ -30,14 +11,6 @@
         </el-col>
       </el-row>
 
-      <el-row>
-        <el-col :span="16" label-width="100px">
-          <el-form-item label="图号" prop="code">
-            <el-input placeholder="" v-model="attributeData.imgCode"></el-input>
-          </el-form-item>
-        </el-col>
-      </el-row>
-
       <el-row>
         <el-col :span="16" label-width="100px">
           <el-form-item label="名称" prop="name">
@@ -46,8 +19,6 @@
         </el-col>
       </el-row>
 
-
-
       <el-row>
         <el-col :span="8" label-width="100px">
           <el-form-item label="材料" prop="name">
@@ -66,8 +37,6 @@
             ></el-input>
           </el-form-item>
         </el-col>
-
-    
       </el-row>
 
       <el-row>
@@ -287,22 +256,24 @@
         bomTypeOptions: [
           {
             label: 'PBOM',
-            value: 1
+            value: '1'
           },
           {
             label: 'MBOM',
-            value: 2
+            value: '2'
+          },
+          {
+            label: 'ABOM',
+            value: '3'
           }
         ]
       };
     },
 
-    created() {
- 
-    },
+    created() {},
 
     beforeDestroy() {
-      this.category =  {    name: ''}
+      this.category = { name: '' };
     },
     methods: {
       handleProduct() {
@@ -324,13 +295,13 @@
 
     watch: {
       attributeData(val) {
-        console.log(val)
-        console.log(Object.prototype.hasOwnProperty.call(val, 'category'))
+        console.log(val);
+        console.log(Object.prototype.hasOwnProperty.call(val, 'category'));
         if (Object.prototype.hasOwnProperty.call(val, 'category')) {
           this.category = val.category;
 
-          this.$forceUpdate()
-        } 
+          this.$forceUpdate();
+        }
       }
     }
   };

+ 19 - 5
src/views/material/BOMmanage/components/baseInfo.vue

@@ -1,7 +1,19 @@
 <template>
   <div class="baseInfo">
+  
+
     <el-form label-width="100px" ref="form" :model="dataInfo">
-      <el-row>
+     
+      
+      <el-col :span="6" label-width="100px">
+      <el-form-item label="类型" prop="type">
+
+        {{ dataInfo.bomType == 1 ? "PBOM" :  dataInfo.bomType == 2 ? 'MBOM' :   dataInfo.bomType == 3 ? 'ABOM' : ''}}
+          </el-form-item>
+          </el-col>
+
+
+      <el-row v-if="dataInfo.bomType == 2">
         <el-col :span="6" label-width="100px">
           <el-form-item label="BOM编码" prop="type">
             <el-input
@@ -47,9 +59,8 @@
             </el-select>
           </el-form-item>
         </el-col>
-      </el-row>
 
-      <el-row>
+
         <el-col :span="6" label-width="100px">
           <el-form-item label="所属工厂" prop="code">
             <el-input
@@ -59,7 +70,10 @@
             ></el-input>
           </el-form-item>
         </el-col>
+
       </el-row>
+
+    
     </el-form>
   </div>
 </template>
@@ -93,9 +107,9 @@
 
 <style lang="scss" scoped>
   .baseInfo {
-    padding: 10px 10px 0 10px;
+    padding: 6px;
     box-sizing: border-box;
     border: 1px solid #f1f2f2;
-    margin-bottom: 20px;
+    margin-bottom: 10px;
   }
 </style>

+ 6 - 7
src/views/material/BOMmanage/components/bomTreeDialog.vue

@@ -62,11 +62,6 @@
           </el-form-item>
         </el-col>
 
-        <el-col :span="12" label-width="100px">
-          <el-form-item label="图号" prop="imgCode">
-            <el-input placeholder="" v-model="attributeData.imgCode"></el-input>
-          </el-form-item>
-        </el-col>
 
         <el-col :span="12" label-width="100px">
           <el-form-item label="名称" prop="name">
@@ -309,11 +304,15 @@
         bomTypeOptions: [
           {
             label: 'PBOM',
-            value: 1
+            value: "1"
           },
           {
             label: 'MBOM',
-            value: 2
+            value: "2"
+          },
+          {
+            label: 'ABOM',
+            value: "3"
           }
         ]
       };

+ 5 - 1
src/views/material/BOMmanage/details.vue

@@ -86,10 +86,14 @@
               </div>
             </div>
 
+     
+
             <baseInfo
               :dataInfo="currentNodeData"
-              v-if="currentNodeData.bomType == 2"
+            
             />
+
+
             <el-tabs
               v-model="activeName"
               class="tab-box"

+ 12 - 18
src/views/material/product/detail.vue

@@ -82,7 +82,6 @@
             </el-form-item>
           </el-col>
 
-
           <el-col :span="8">
             <el-form-item label="牌号" prop="brandNum">
               <el-input v-model="form.brandNum" />
@@ -155,8 +154,6 @@
             </el-form-item>
           </el-col>
 
-
-
           <el-col :span="8">
             <el-form-item label="净重">
               <div class="form-line">
@@ -258,15 +255,13 @@
   import personSelect from '@/components/CommomSelect/person-select.vue';
   import linkMsg from './components/link-msg.vue';
   import { getDetails } from '@/api/classifyManage/itemInformation';
-  import {getByCode} from "@/api/system/dictionary-data";
+  import { getByCode } from '@/api/system/dictionary-data';
   import { getCode, rootCategoryCode } from '@/api/codeManagement';
 
   import { addMaterial } from '@/api/material/list.js';
   import { deepClone } from '@/utils/index';
   import { finishPageTab, reloadPageTab } from '@/utils/page-tab-util';
 
-
-
   export default {
     name: 'ManageMaterial',
     components: {
@@ -365,14 +360,13 @@
       };
     },
 
-
     async created() {
       this.status = this.$route.query.status;
 
       if (this.$route.query.id) {
         this._getDetails();
       }
-      this.getDictList('productionType')
+      this.getDictList('productionType');
     },
     methods: {
       async _getDetails() {
@@ -472,16 +466,16 @@
       },
 
       async getDictList(code) {
-      let {data: res} = await getByCode(code)
-        this.dictList =  res.map(item => {
-        let values = Object.keys(item)
-        return {
-          value: values[0],
-          label: item[values[0]]
-        }
-      })
-      console.log(123, this.dictList);
-    },
+        let { data: res } = await getByCode(code);
+        this.dictList = res.map((item) => {
+          let values = Object.keys(item);
+          return {
+            value: values[0],
+            label: item[values[0]]
+          };
+        });
+        console.log(123, this.dictList);
+      },
 
       openCategory() {
         this.$refs.categoryRefs.open();