ysy 1 năm trước cách đây
mục cha
commit
5805851095

+ 23 - 2
src/api/material/BOM.js

@@ -208,7 +208,7 @@ export async function bomCategoryUpdate(data) {
 }
 
 
-// 转换 MBOM
+// PBom转换 MBOM
 export async function convert(data) {
   const res = await request.post(`/main/bomCategory/convert`, data);
   if (res.data.code == 0) {
@@ -217,7 +217,7 @@ export async function convert(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
-// 转换 ABOM
+// PBom转换 ABOM
 export async function convertABom(data) {
   const res = await request.post(`/main/bomCategory/convertABom`, data);
   if (res.data.code == 0) {
@@ -226,6 +226,27 @@ export async function convertABom(data) {
   return Promise.reject(new Error(res.data.message));
 }
 
+//PBom转换为EBom
+export async function convertEBOM(data) {
+  const res = await request.post(`/main/bomCategory/convertEBOM`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+// EBom转换为PBom
+export async function convertEBomToPBOM(data) {
+  const res = await request.post(`/main/bomCategory/convertEBomToPBOM`, data);
+  if (res.data.code == 0) {
+    return res.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
+
 
 
 

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

@@ -1,6 +1,7 @@
 <template>
   <div>
     <el-form label-width="100px" ref="form" :model="attributeData">
+
       <el-row>
         <el-col :span="8" label-width="100px">
           <el-form-item label="名称:" prop="name">
@@ -238,7 +239,8 @@
         </el-col>
       </el-row>
 
-      <div class="btn_box">
+
+      <div class="btn_box" v-if=" attributeData.status != 1">
         <el-button type="primary" @click="handleUpdate">保存</el-button>
       </div>
     </el-form>

+ 63 - 4
src/views/material/BOMmanage/detailsPop.vue

@@ -59,6 +59,30 @@
               >导入</el-button
             >
 
+            <el-button
+              type="primary"
+              size="mini"
+              icon="el-icon-refresh"
+              plain
+              @click="transformation('P')"
+              v-if="currentNodeData.bomType == 4"
+              >转换PBOM</el-button
+            >
+
+
+            
+            <el-button
+              type="primary"
+              size="mini"
+              icon="el-icon-refresh"
+              plain
+              @click="transformation('E')"
+              v-if="currentNodeData.bomType == 1"
+              >转换EBOM</el-button
+            >
+
+
+
             <el-button
               type="primary"
               size="mini"
@@ -189,7 +213,8 @@
               @tab-click="handleClick"
             >
               <el-tab-pane label="属性" name="属性">
-                <attribute :attributeData="currentNodeData"></attribute>
+    
+                <attribute  v-if="activeName == '属性'" :attributeData="currentNodeData"></attribute>
               </el-tab-pane>
 
               <el-tab-pane
@@ -206,6 +231,34 @@
               >
                 <detailedList :attributeData="currentNodeData" :treeId="treeId"></detailedList>
               </el-tab-pane>
+
+              <el-tab-pane
+                label="工艺路线"
+                name="工艺路线"
+                v-if="
+                  currentNodeData.bomType != 4
+                "
+              >
+                <routing
+                 v-if="activeName == '工艺路线'"
+                  ref="routingRef"
+                  :taskParam="currentNodeData"
+                ></routing>
+              </el-tab-pane>
+              <el-tab-pane
+                label="工序配置"
+                name="工序配置"
+                v-if="
+                  currentNodeData.bomType != 1
+                "
+              >
+                <workmanship
+                  v-if="activeName == '工序配置'"
+                  ref="workmanshipRef"
+                  :taskParam="currentNodeData"
+                ></workmanship>
+              </el-tab-pane>
+
             </el-tabs>
           </template>
 
@@ -267,6 +320,8 @@
     getBomGetById,
     convert,
     convertABom,
+    convertEBOM,
+    convertEBomToPBOM,
     deleteBomTreeList,
     bomSubmit,
     jsBomSubmit,
@@ -279,6 +334,8 @@
   import detailedList from './components/detailedList.vue';
   import importDialog from './qualityTesting/import-dialog.vue';
   import LCdetail from './components/LCdetail.vue';
+  import routing from './components/routing.vue';
+  import workmanship from './components/workmanship.vue';
 
   export default {
     components: {
@@ -287,7 +344,9 @@
       attribute,
       detailedList,
       importDialog,
-      LCdetail
+      LCdetail,
+      routing,
+      workmanship
     },
     data() {
       return {
@@ -464,8 +523,8 @@
           text: '转换中...',
           background: 'rgba(0, 0, 0, 0.7)'
         });
-        let ULR = tt == 'M' ? convert : tt == 'A' ? convertABom : '';
-        ULR({ versions: this.versions, categoryId: this.categoryId }).then(
+        let ULR = tt == 'M' ? convert : tt == 'A' ? convertABom : tt == 'E' ? convertEBOM :  tt == 'P' ?  convertEBomToPBOM : '';
+        ULR({ versions: this.searchObj.versions, categoryId: this.searchObj.categoryId }).then(
           (data) => {
             if (data.code == '0') {
               this.loadingInstance.close();