Browse Source

装运列表炉号显示

zhangafei 1 week ago
parent
commit
2d2a052be6
1 changed files with 15 additions and 2 deletions
  1. 15 2
      src/views/billet/shippingBill/shippingBill.data.ts

+ 15 - 2
src/views/billet/shippingBill/shippingBill.data.ts

@@ -1,5 +1,5 @@
 import { BasicColumn } from '/@/components/Table';
 import { BasicColumn } from '/@/components/Table';
-import { ref, computed } from 'vue';
+import { ref, computed, h } from 'vue';
 import { initDictOptions } from '/@/utils/dict';
 import { initDictOptions } from '/@/utils/dict';
 import { render } from '/@/utils/common/renderUtils';
 import { render } from '/@/utils/common/renderUtils';
 import { groupArray } from '/@/views/billet/hotDelivery/common.data';
 import { groupArray } from '/@/views/billet/hotDelivery/common.data';
@@ -103,8 +103,21 @@ export const columns: BasicColumn[] = computed(() => [
   {
   {
     title: '炉号',
     title: '炉号',
     align: 'center',
     align: 'center',
-    width: 80,
+    width: 120,
     dataIndex: 'heatNo',
     dataIndex: 'heatNo',
+    customRender({ record }) {
+      if (!record.heatNoCountMap) return record.heatNo || '';
+      try {
+        return h(
+          'div',
+          Object.keys(record.heatNoCountMap).map((e) => {
+            return h('div', null, e + ':' + record.heatNoCountMap[e]);
+          })
+        );
+      } catch (e) {
+        return record.heatNo || '';
+      }
+    },
   },
   },
   {
   {
     title: '组坯号',
     title: '组坯号',