Răsfoiți Sursa

Merge branch 'dev' of http://110.41.163.243:9980/kd-aiot/kd-aiot-frontend into dev

chencc 1 an în urmă
părinte
comite
43eca940b6

+ 13 - 2
src/api/material/list.js

@@ -70,15 +70,26 @@ export async function removeMaterial(id) {
   return Promise.reject(new Error(res.data.message));
 }
 
-//根据产品ID获取bom列表、工艺路线列表【产品管理】
+//根据产品ID bom获取工艺路线列表【产品管理】
 export async function getBomRoutingList(categoryId) {
-  const res = await request.get(`/main/category/getSourceList/${categoryId}`);
+  const res = await request.get(`/main/bomCategory/bomRoutingListByCategoryId/${categoryId}`);
   if (res.data.code == 0) {
     return res.data.data;
   }
   return Promise.reject(new Error(res.data.message));
 }
 
+
+// 根据产品ID获取bom列表
+export async function getBomAssociationList(params) {
+  const res = await request.get(`/main/bomCategory/getList`, { params });
+  if (res.data.code == 0) {
+    return res.data.data;
+  }
+  return Promise.reject(new Error(res.data.message));
+}
+
+
 // 产品工序与模具关联
 export async function categoryTaskPallet(data) {
   const res = await request.post(`/main/category/categoryTaskPallet`, data);

+ 35 - 3
src/views/material/BOMmanage/components/workingProcedure.vue

@@ -1,7 +1,36 @@
 <template>
-  <el-dialog :title="title" :visible.sync="visible" :before-close="handleClose" :close-on-click-modal="false"
-    :close-on-press-escape="false" append-to-body width="85%">
+    <ele-modal custom-class="ele-dialog-form long-dialog-form"
+             :centered="true" :visible.sync="visible" :title="title"
+             append-to-body
+             :close-on-click-modal="false" width="85%" :maxable="true">
+
     <el-card shadow="never">
+      <header-title title="物品信息"></header-title>
+      <el-form label-width="100px" ref="form" :model="rowData" class="item-height">
+        <el-row>
+          <el-col :span="6" label-width="100px">
+            <el-form-item label="名称" prop="name">
+              <el-input disabled placeholder="物品名称" v-model="treeData.name"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" label-width="100px">
+            <el-form-item label="编码" prop="code">
+              <el-input disabled placeholder="物品编码" v-model="treeData.code"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" label-width="100px">
+            <el-form-item label="型号" prop="modelType">
+              <el-input disabled placeholder="物品型号" v-model="treeData.modelType"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="6" label-width="100px">
+            <el-form-item label="规格" prop="specification">
+              <el-input disabled placeholder="物品规格" v-model="treeData.specification"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      
       <header-title title="工序信息"></header-title>
       <el-form label-width="100px" ref="form" :model="rowData">
         <el-row>
@@ -434,7 +463,7 @@
         }}</el-button>
       <el-button size="small" @click="handleClose">关闭</el-button>
     </div>
-  </el-dialog>
+   </ele-modal>
 </template>
 
 <script>
@@ -1456,4 +1485,7 @@ export default {
     }
   }
 }
+.item-height{
+  margin-bottom: 20px;
+}
 </style>

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

@@ -141,7 +141,7 @@
               @tab-click="handleClick"
             >
               <el-tab-pane label="属性" name="属性">
-                <attribute :attributeData="currentNodeData"attribute></attribute>
+                <attribute :attributeData="currentNodeData"></attribute>
               </el-tab-pane>
               <el-tab-pane
                 :label="

+ 75 - 56
src/views/material/product/components/index-data.vue

@@ -443,6 +443,27 @@
             align: 'center',
             showOverflowTooltip: true
           },
+          {
+            prop: 'isUnpack',
+            label: '是否允许拆包',
+            align: 'center',
+            minWidth: 120,
+            formatter: (row, column) => {
+              return row.isUnpack == 1 ? '是' : '否';
+            },
+            showOverflowTooltip: true
+          },
+          {
+            prop: 'isComeCheck',
+            label: '是否来料检验',
+            align: 'center',
+            minWidth: 120,
+            formatter: (row, column) => {
+              return row.isComeCheck == 1 ? '是' : '否';
+            },
+            showOverflowTooltip: true
+          },
+
           {
             prop: 'measuringUnit',
             label: '计量单位',
@@ -614,34 +635,33 @@
         return this.sxtList.find((item) => item.value == Number(e));
       },
 
-    toBomManager(row) {
-      let rowData = {
-        categoryId: row.id,
-        categoryName: row.name,
-        code: row.code,
-        
+      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);
-    },
-    //采购
-    moveTo() {
-      this.$refs.DialogMoveToRef.open(this.selection);
-    },
-    successUpload(response) {
-      this.isLoading = false;
-    },
-    errorUpload(response) {
-      this.isLoading = false;
-    },
-    // 上传备品备件
-    beforeUpload(file) {
-      if (file.size / 1024 / 1024 > this.size) {
-        this.$message.error(`大小不能超过 ${this.size}MB`);
-        return false;
-      }
+          rootPathIdParent: row.categoryLevelPathIdParent,
+          isProduct: row.isProduct == 1
+        };
+        this.$refs.bomDrawer.open(rowData);
+      },
+      //采购
+      moveTo() {
+        this.$refs.DialogMoveToRef.open(this.selection);
+      },
+      successUpload(response) {
+        this.isLoading = false;
+      },
+      errorUpload(response) {
+        this.isLoading = false;
+      },
+      // 上传备品备件
+      beforeUpload(file) {
+        if (file.size / 1024 / 1024 > this.size) {
+          this.$message.error(`大小不能超过 ${this.size}MB`);
+          return false;
+        }
 
         if (this.limit > 0 && this.fileList.length === this.limit) {
           this.$message.error(`最多上传 ${this.limit}个文件`);
@@ -834,37 +854,36 @@
         this.reload();
       },
 
-    $route: {
-      handler(route) {
-        this.pageShow = false;
-
-        if (route.query && route.query.isWt) {
-
-          getBomGetById(route.query.businessId).then((res) => {
-            let rowData = {
-              categoryId: res.data.categoryId,
-              categoryName: res.data.name,
-              code: res.data.categoryCode,
-              rootPathIdParent: res.data.rootCategoryLevelId,
-              isProduct: res.data.rootCategoryLevelId == 9 ? true : false,
-              versions: res.data.versions,
-              bomType: res.data.bomType,
-              isWt: true,
-              isBtn: route.query.isBtn,
-            };
-            this.$nextTick(() => {
-              this.$refs.bomDrawer.open(rowData);
-              this.pageShow = true;
+      $route: {
+        handler(route) {
+          this.pageShow = false;
+
+          if (route.query && route.query.isWt) {
+            getBomGetById(route.query.businessId).then((res) => {
+              let rowData = {
+                categoryId: res.data.categoryId,
+                categoryName: res.data.name,
+                code: res.data.categoryCode,
+                rootPathIdParent: res.data.rootCategoryLevelId,
+                isProduct: res.data.rootCategoryLevelId == 9 ? true : false,
+                versions: res.data.versions,
+                bomType: res.data.bomType,
+                isWt: true,
+                isBtn: route.query.isBtn
+              };
+              this.$nextTick(() => {
+                this.$refs.bomDrawer.open(rowData);
+                this.pageShow = true;
+              });
             });
-          });
-        } else {
-          this.pageShow = true;
-        }
-      },
-      immediate: true
+          } else {
+            this.pageShow = true;
+          }
+        },
+        immediate: true
+      }
     }
-  }
-};
+  };
 </script>
 <style lang="scss" scoped>
   .upload {

+ 40 - 10
src/views/material/product/components/link-msg.vue

@@ -12,6 +12,9 @@
       ></el-tab-pane>
       <el-tab-pane label="工艺路线">
         <ele-pro-table :columns="pathColumn" :datasource="pathData">
+          <template v-slot:bomCategoryType="{ row }">
+            {{ row.bomCategoryType == 2 ? 'MBOM' : row.bomCategoryType == 1 ? 'PBOM' : row.bomCategoryType == 3 ? 'ABom' : '' }}
+          </template>
         </ele-pro-table
       ></el-tab-pane>
       <!-- <el-tab-pane label="质量标准"></el-tab-pane> -->
@@ -104,7 +107,7 @@
 </template>
 
 <script>
-  import { getBomRoutingList } from '@/api/material/list.js';
+  import { getBomRoutingList, getBomAssociationList } from '@/api/material/list.js';
   import { saveSupplier, deleteSupplie } from '@/api/material/BOM.js';
   import { getRelatesInformationList } from '@/api/material/product.js';
   import dictMixins from '@/mixins/dictMixins';
@@ -176,7 +179,7 @@
           },
           {
             label: '版本号',
-            prop: 'version'
+            prop: 'versions'
           },
           {
             label: '基本数量',
@@ -184,10 +187,27 @@
           },
           {
             label: '单位',
-            prop: 'baseCountUnit'
+            prop: 'unit'
           }
         ],
         pathColumn: [
+          {
+            label: 'BOM编码',
+            prop: 'bomCategoryCode'
+          },
+          {
+            label: 'BOM名称',
+            prop: 'bomCategoryName'
+          },
+          {
+            slot: 'bomCategoryType',
+            label: 'BOM类型',
+            showOverflowTooltip: true
+          },
+          {
+            label: 'BOM版本',
+            prop: 'bomCategoryVersion'
+          },
           {
             label: '工艺路线编码',
             prop: 'code'
@@ -356,7 +376,8 @@
       id: {
         handler(val) {
           if (val) {
-            this.getData();
+            this.getBomData();
+            this.getRoutingData();
             this.contactQueryByCategoryIdsAPI(2);
             this.contactQueryByCategoryIdsAPI(3);
           }
@@ -377,11 +398,20 @@
       this.requestDict('重量单位');
     },
     methods: {
-      async getData() {
-        const data = await getBomRoutingList(this.id);
-
-        this.bomData = data?.bomList || [];
-        this.pathData = data?.routingList || [];
+      //BOM列表
+      async getBomData() {
+        const data = await getBomAssociationList({
+            categoryId: this.id,
+            versions: '',
+            bomType: 1,
+            isTemp: 0
+        });
+        this.bomData = data || [];
+      },
+      //工艺路线
+      async getRoutingData(){
+        const data =await getBomRoutingList(this.id);
+        this.pathData = data || [];
       },
       // 关联设备
       async getEqData() {
@@ -463,4 +493,4 @@
 
     padding: 1px 17px;
   }
-</style>
+</style>