Преглед изворни кода

refactor(订单审批): 物品清单增加列设置组件

liujt пре 5 месеци
родитељ
комит
44511acd26

+ 17 - 16
src/BIZComponents/inventoryTableDetails.vue

@@ -4,9 +4,8 @@
       ref="table"
       :needPage="false"
       :columns="columns"
-      :toolkit="[]"
       :datasource="form.datasource"
-      cache-key="systemRoleTable17"
+      :cache-key="cacheKeyUrl"
       class="time-form"
     >
       <template v-slot:technicalDrawings="scope">
@@ -90,9 +89,10 @@
   const dayjs = require('dayjs');
   import { lbjtList, levelList, pricingWayList } from '@/enum/dict.js';
   import timeDialog from '@/components/timeDialog/index.vue';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin.js';
 
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins, tableColumnsMixin],
     components: {
       // fileMain,
       timeDialog
@@ -167,6 +167,7 @@
     },
     data() {
       return {
+        cacheKeyUrl: 'sales-order-bizcomponent-InventoryTableDetails',
         allPrice: 0,
         supplierObj: [],
         form: {
@@ -195,7 +196,7 @@
             isNone: !this.isOrderNo
           },
           {
-            width: 280,
+            width: 240,
             prop: 'productName',
             label: '名称',
             slot: 'productName',
@@ -203,14 +204,14 @@
             align: 'center'
           },
           {
-            width: 120,
+            width: 210,
             prop: 'productCode',
             label: '编码',
             slot: 'productCode',
             align: 'center'
           },
           {
-            width: 200,
+            width: 180,
             prop: 'productCategoryName',
             label: '类型',
             slot: 'productCategoryName',
@@ -384,7 +385,7 @@
             }
           },
           {
-            width: 180,
+            width: 120,
             prop: 'saleCount',
             label: '数量',
             slot: 'saleCount',
@@ -400,7 +401,7 @@
             showOverflowTooltip: true
           },
           {
-            width: 150,
+            width: 120,
             prop: 'totalCount',
             label: '计量数量',
             slot: 'totalCount',
@@ -415,7 +416,7 @@
           },
 
           {
-            width: 140,
+            width: 120,
             prop: 'singleWeight',
             label: '单重',
             slot: 'singleWeight',
@@ -428,7 +429,7 @@
             align: 'center'
           },
           {
-            width: 140,
+            width: 120,
             prop: 'totalWeight',
             label: '总重',
             slot: 'totalWeight',
@@ -440,7 +441,7 @@
             align: 'center'
           },
           {
-            width: 180,
+            width: 120,
             prop: 'increaseTotalWeight',
             label: '增重重量',
             slot: 'increaseTotalWeight',
@@ -463,7 +464,7 @@
             align: 'center'
           },
           {
-            width: 200,
+            width: 150,
             prop: 'singlePrice',
             label: '单价',
             slot: 'singlePrice',
@@ -473,7 +474,7 @@
           },
 
           {
-            width: 160,
+            width: 150,
             prop: 'taxRate',
             label: '税率',
             isNone: this.quoteType === 2,
@@ -491,7 +492,7 @@
             align: 'center'
           },
           {
-            width: 160,
+            width: 150,
             prop: 'discountSinglePrice',
             label: '折让单价',
             align: 'center',
@@ -510,7 +511,7 @@
             align: 'center'
           },
           {
-            width: 160,
+            width: 150,
             prop: 'discountTotalPrice',
             label: '折让合计',
             align: 'center',
@@ -660,7 +661,7 @@
             }
           },
           {
-            width: 200,
+            width: 160,
             prop: 'guaranteePeriodDeadline',
             label: '有效期截止日期',
             slot: 'guaranteePeriodDeadline',

+ 4 - 2
src/views/bpm/handleTask/components/purchaseOrder/detailDialog.vue

@@ -157,9 +157,9 @@
           ref="table"
           :needPage="false"
           :columns="competAnalysisListcolumns"
-          :toolkit="[]"
           :datasource="detailData.productList"
           row-key="id"
+          :cache-key="cacheKeyUrl"
         >
           <template v-slot:toolbar>
             <div class="headbox">
@@ -221,8 +221,9 @@
   import { orderSourceType, outsourceSceneList } from '@/enum/dict';
   import { lbjtList } from '@/enum/dict.js';
   import { levelList, pricingWayList } from '@/enum/dict.js';
+  import tableColumnsMixin from '@/mixins/tableColumnsMixin.js';
   export default {
-    mixins: [dictMixins],
+    mixins: [dictMixins, tableColumnsMixin],
     // components: { fileMain },
     props: {
       businessId: {
@@ -231,6 +232,7 @@
     },
     data() {
       return {
+        cacheKeyUrl: 'purchase-order-bizcomponent-InventoryTableDetails',
         orderSourceType,
         outsourceSceneList,
         visible: false,