chencc пре 1 година
родитељ
комит
280f4d1d35

+ 15 - 1
src/views/material/BOMmanage/components/attribute.vue

@@ -262,9 +262,21 @@
             ></el-input>
           </el-form-item>
         </el-col>
+
+        <el-col :span="8" label-width="100px">
+         
+          <el-form-item label="来源版本号" prop="name">
+            <!-- {{ attributeData }} -->
+            <el-input
+              placeholder=""
+              disabled
+              v-model="attributeData.resourceBomVersion"
+            ></el-input>
+          </el-form-item>
+        </el-col>
       </el-row>
  
-
+      
       <div class="btn_box" v-if="attributeData.status != 1">
         <el-button type="primary" @click="handleUpdate">保存</el-button>
       </div>
@@ -379,6 +391,8 @@
     watch: {
       attributeData(val) {
         console.log(Object.prototype.hasOwnProperty.call(val, 'category'));
+        console.log(val,'111111111111');
+
         if (Object.prototype.hasOwnProperty.call(val, 'category')) {
           this.category = val.category;
           this.attributeData.produceType = val.category.produceType;

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

@@ -57,7 +57,7 @@
           <el-button
             type="text"
             @click="handleEdit"
-            v-if="dataInfo.approvalStatus != 1"
+            v-if="dataInfo.approvalStatus != 1&&dataInfo.approvalStatus != 2"
           >
             编辑</el-button
           >

+ 19 - 8
src/views/material/BOMmanage/detailsPop.vue

@@ -179,7 +179,6 @@
           >
         </div>
       </div>
-
       <!-- 抽屉内容 -->
       <div class="drawer_content">
         <ele-split-layout
@@ -234,8 +233,9 @@
           </div>
 
           <template v-slot:content v-if="isNotData">
+            <!-- 表头工具栏 -->
             <baseInfo :dataInfo="currentNodeData" />
-
+            
             <el-tabs
               v-model="activeName"
               class="tab-box"
@@ -243,7 +243,7 @@
               @tab-click="handleClick"
             >
               <el-tab-pane label="属性" name="属性">
-             
+                
                 <attribute :attributeData="currentNodeData"></attribute>
               </el-tab-pane>
 
@@ -520,16 +520,27 @@
       },
 
       handleNodeClick(data) {
-        this.treeId = data.id;
-        this.handBomDetails(data.id);
+        console.log(data, 'data');
+        //是子级才替换
+       
+        if(data.parentId!=="0"){
+          this.handBomDetails(data.resourceBomId||data.id,1);
+        }else{
+          this.handBomDetails(data.id,2);
+          this.treeId = data.id;
+        }
+
+        
       },
 
-      handBomDetails(id) {
+      // 获取bom信息
+      handBomDetails(id,type) {
         if (id) {
           getBomGetById(id).then((res) => {
             this.currentNodeData = res.data;
-         
-            this.searchObj.versions = this.currentNodeData.versions;
+            if(type==2){
+              this.searchObj.versions = this.currentNodeData.versions;
+            }
             this.$forceUpdate();
           });
         } else {

+ 2 - 2
vue.config.js

@@ -31,8 +31,8 @@ module.exports = {
     proxy: {
       // 当我们的本地的请求 有/api的时候,就会代理我们的请求地址向另外一个服务器发出请求
       '/api': {
-        // target: 'http://192.168.1.125:18086',
-        target: 'http://192.168.1.251:18086',
+        target: 'http://192.168.1.125:18086',
+        // target: 'http://192.168.1.251:18086',
         // target: 'http://192.168.1.176:18086',
 
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域