ysy 1 rok temu
rodzic
commit
a4190a4746

+ 3 - 4
src/api/material/jgBom.js

@@ -65,7 +65,7 @@ export async function importPBom (data) {
 
   
 // 获取产品BOM列表
-export async function getBomPageCategoryId(params) {
+export async function getBomPageCategoryTempId(params) {
     const res = await request.get(`/main/bomCategoryTemp/pageByCategoryId`, { params });
     if (res.data.code == 0) {
       return res.data.data;
@@ -87,7 +87,7 @@ export async function saveBomTreeList(data) {
 
 
   // 启用
-export async function startAndStop(data) {
+export async function startAndStopTemp(data) {
     const res = await request.post(`/main/bomCategoryTemp/startAndStop`, data);
     if (res.data.code == 0) {
       return res.data;
@@ -98,7 +98,7 @@ export async function startAndStop(data) {
   
 
   // 修改BOM属性
-export async function bomCategoryUpdate(data) {
+export async function bomCategoryTempUpdate(data) {
     const res = await request.post(`/main/bomCategoryTemp/update`, data);
     if (res.data.code == 0) {
       return res.data;
@@ -108,7 +108,6 @@ export async function bomCategoryUpdate(data) {
   
 
 
-
   
 // 转换
 export async function convert(data) {

+ 7 - 7
src/views/material/BOMmanage/JGDetails.vue

@@ -138,7 +138,7 @@
               @tab-click="handleClick"
             >
               <el-tab-pane label="属性" name="属性">
-                <attribute :attributeData="currentNodeData"></attribute>
+                <attribute  :isJgBom="true" :attributeData="currentNodeData"></attribute>
               </el-tab-pane>
               <el-tab-pane
                 :label="
@@ -150,8 +150,8 @@
                 "
                 name="明细表"
               >
-                <!-- <document></document> -->
-                <detailedList :attributeData="currentNodeData"></detailedList>
+ 
+                <detailedList  :isJgBom="true" :attributeData="currentNodeData"></detailedList>
               </el-tab-pane>
               <el-tab-pane
                 label="工艺路线"
@@ -201,12 +201,12 @@
     convert,
     convertABom,
     deleteBomTreeList
-  } from '@/api/material/jgBom.js';
-  import { getTreeByGroup } from '@/api/classifyManage';
+  } from '@/api/material/jgBom';
+
   import attribute from './components/attribute.vue';
   import routing from './components/routing.vue';
   import baseInfo from './components/baseInfo.vue';
-  // import document from './components/document.vue';
+
   import workmanship from './components/workmanship.vue';
   import bomTreeDialog from './components/bomTreeDialog.vue';
   import importDialog from './qualityTesting/import-dialog.vue';
@@ -216,7 +216,7 @@
     components: {
       attribute,
       baseInfo,
-      // document,
+
       workmanship,
       bomTreeDialog,
       routing,

+ 2 - 10
src/views/material/BOMmanage/components/BOM-search.vue

@@ -7,16 +7,8 @@
     @submit.native.prevent
   >
     <el-row :gutter="10">
-      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
-        <el-form-item label="BOM编码">
-          <el-input clearable v-model.trim="where.code" placeholder="请输入" />
-        </el-form-item>
-      </el-col>
-      <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
-        <el-form-item label="BOM名称">
-          <el-input clearable v-model.trim="where.name" placeholder="请输入" />
-        </el-form-item>
-      </el-col>
+
+
       <el-col v-bind="styleResponsive ? { md: 6 } : { span: 6 }">
         <el-form-item label="编码">
           <el-input

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

@@ -248,8 +248,10 @@
 <script>
   import { getByCode } from '@/api/system/dictionary-data';
   import { bomCategoryUpdate } from '@/api/material/BOM';
+  import {  bomCategoryTempUpdate } from '@/api/material/jgBom';
   export default {
     components: {},
+
     data() {
       return {
         form: {},
@@ -302,7 +304,8 @@
       },
 
       handleUpdate() {
-        bomCategoryUpdate(this.attributeData).then((res) => {
+        let Url = this.isJgBom ? bomCategoryTempUpdate : bomCategoryUpdate;
+        Url(this.attributeData).then((res) => {
           this.$message.success('修改成功');
         });
       }
@@ -311,6 +314,11 @@
       attributeData: {
         type: Object,
         default: {}
+      },
+
+      isJgBom: {
+        type: Boolean,
+        default: false
       }
     },
 

+ 57 - 23
src/views/material/BOMmanage/components/detailedList.vue

@@ -14,17 +14,18 @@
         class="dict-table"
         tool-class="ele-toolbar-actions"
       >
-      
-      <template v-slot:toolbar>
-    
-        <div class="toolbar_box">
-                <div
-                  ><span>基本数量</span>
-                  <el-input placeholder="请输入" v-model.number="attributeData.baseCount">
-                  </el-input>
-                  <DictSelection dictName="计量单位" v-model="attributeData.unit"
-                /></div>
-              </div>
+        <template v-slot:toolbar>
+          <div class="toolbar_box">
+            <div
+              ><span>基本数量</span>
+              <el-input
+                placeholder="请输入"
+                v-model.number="attributeData.baseCount"
+              >
+              </el-input>
+              <DictSelection dictName="计量单位" v-model="attributeData.unit"
+            /></div>
+          </div>
         </template>
 
         <!-- 表头工具栏 -->
@@ -45,10 +46,15 @@
 <script>
   import BOMSearch from './BOM-search.vue';
   import { getBomPageCategoryId, startAndStop } from '@/api/material/BOM';
+  import {
+    getBomPageCategoryTempId,
+    startAndStopTemp
+  } from '@/api/material/jgBom';
 
   export default {
     name: 'SystemDictionary',
     components: { BOMSearch },
+
     data() {
       return {
         // 表格列配置
@@ -62,25 +68,34 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'code',
-            label: 'BOM编码',
+            prop: 'categoryCode',
+            label: '编码',
             showOverflowTooltip: true
           },
           {
-            prop: 'name',
-            label: 'BOM名称',
+            prop: 'categoryName',
+            label: '名称',
             showOverflowTooltip: true
           },
+
           {
-            prop: 'categoryCode',
-            label: '产品编码',
+            prop: 'brandNum',
+            label: '牌号'
+          },
+
+          {
+            prop: 'modelType',
+            label: '型号',
+            align: 'center',
             showOverflowTooltip: true
           },
           {
-            prop: 'categoryName',
-            label: '产品名称',
+            prop: 'specification',
+            label: '规格',
+            align: 'center',
             showOverflowTooltip: true
           },
+
           {
             prop: 'dosage',
             label: '用量',
@@ -96,6 +111,17 @@
             prop: 'versions',
             label: '版本'
           },
+
+          {
+            prop: '',
+            label: '供应商'
+          },
+
+          {
+            prop: '',
+            label: '生产厂家'
+          },
+
           {
             prop: 'status ',
             label: '状态',
@@ -136,6 +162,11 @@
       attributeData: {
         type: Object,
         default: {}
+      },
+
+      isJgBom: {
+        type: Boolean,
+        default: false
       }
     },
 
@@ -159,7 +190,8 @@
           text: boolean ? '启用中...' : '关闭中...',
           background: 'rgba(0, 0, 0, 0.7)'
         });
-        startAndStop({ id: row.id, status: row.status }).then(() => {
+        let ULR = this.isJgBom ? startAndStopTemp : startAndStop;
+        ULR({ id: row.id, status: row.status }).then(() => {
           this.$message.success('操作成功');
           this.loadingInstance.close();
         });
@@ -170,7 +202,11 @@
         if (!this.attrObj.id) {
           return false;
         }
-        return getBomPageCategoryId({
+        let ULR = this.isJgBom
+          ? getBomPageCategoryTempId
+          : getBomPageCategoryId;
+
+        return ULR({
           ...where,
           pageNum: page,
           size: limit,
@@ -210,7 +246,6 @@
     }
   }
 
-
   .toolbar_box {
     float: right;
     margin-right: 10px;
@@ -226,5 +261,4 @@
       }
     }
   }
-  
 </style>

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

@@ -88,12 +88,12 @@
           },
           {
             prop: 'categoryCode',
-            label: '物品编码',
+            label: '编码',
             showOverflowTooltip: true
           },
           {
             prop: 'categoryName',
-            label: '物品名称',
+            label: '名称',
             showOverflowTooltip: true
           },
           {

+ 2 - 1
vue.config.js

@@ -33,8 +33,9 @@ module.exports = {
       '/api': {
         // target: 'http://192.168.1.124:50001',
         // target: 'http://192.168.1.147:18086',
-        target: 'http://192.168.1.107:18086',
+        // target: 'http://192.168.1.107:18086',
         // target: 'http://192.168.1.116:18086',
+        target: 'http://192.168.1.125:18086',
         changeOrigin: true, // 只有这个值为true的情况下 才表示开启跨域
         pathRewrite: {
           '^/api': ''