Explorar el Código

BOM列表优化:调整规格、型号和单位字段为category对象属性,版本号显示格式化为Vx.0

yusheng hace 10 meses
padre
commit
18f67b8f12
Se han modificado 1 ficheros con 10 adiciones y 7 borrados
  1. 10 7
      src/BIZComponents/cBom-list.vue

+ 10 - 7
src/BIZComponents/cBom-list.vue

@@ -103,7 +103,7 @@
 
 <script>
   import { getCBomAPI } from '@/api/main';
-  import {getInventoryTotalAPI} from "@/api/wms";
+  import { getInventoryTotalAPI } from '@/api/wms';
 
   export default {
     props: {
@@ -132,7 +132,7 @@
         where: {
           name: '',
           code: '',
-          specification:''
+          specification: ''
         }
       };
     },
@@ -183,13 +183,13 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'specification',
+            prop: 'category.specification',
             label: '规格',
             align: 'center',
             showOverflowTooltip: true
           },
           {
-            prop: 'modelType',
+            prop: 'category.modelType',
             label: '型号',
             align: 'center',
             showOverflowTooltip: true
@@ -201,7 +201,7 @@
             showOverflowTooltip: true
           },
           {
-            prop: 'unit',
+            prop: 'category.measuringUnit',
             label: '单位',
             align: 'center',
             showOverflowTooltip: true
@@ -210,7 +210,10 @@
             prop: 'versions',
             label: '版本',
             align: 'center',
-            showOverflowTooltip: true
+            showOverflowTooltip: true,
+            formatter: (_row, _column, cellValue) => {
+              return  cellValue?'V'+cellValue+'.0':'';
+            }
           }
         ];
       }
@@ -224,7 +227,7 @@
         this.loading = true;
         this.datasource = await getCBomAPI({
           categoryId: this.currentRow?.id,
-          bomType: 1,
+          bomType: 1
           // produceType: 2
         });
         this.oldDatasource = this.datasource;