zhangafei 2 tygodni temu
rodzic
commit
84534c62f8

+ 13 - 11
src/views/billet/operator/components/car.vue

@@ -1,6 +1,6 @@
 <template>
   <a-spin :spinning="isSpinning" wrapperClassName="car-info-spin">
-    <a-tabs v-model:activeKey="activeKey" type="card">
+    <a-tabs v-model:activeKey="activeKey" type="card" @change="tabChange">
       <a-tab-pane :key="item" :tab="'车位' + item" v-for="item in carPosition[ccmNo]">
         <div class="car-info-wrapper">
           <div class="licensePlate"
@@ -186,17 +186,13 @@
                   oldBrandNum: item.records[0].brandNum,
                   oldSize: item.records[0].size,
                 };
-
-                setTimeout(
-                  () => {
-                    printCarInfoRefs[`infoRef${index + 1}`] &&
-                      printCarInfoRefs[`infoRef${index + 1}`].value &&
-                      printCarInfoRefs[`infoRef${index + 1}`].value[0].getTableList();
-                  },
-                  50 * (index + 1)
-                );
               }
             });
+            setTimeout(() => {
+              printCarInfoRefs[`infoRef${activeKey.value}`] &&
+                printCarInfoRefs[`infoRef${activeKey.value}`].value &&
+                printCarInfoRefs[`infoRef${activeKey.value}`].value[0].getTableList();
+            }, 50);
           }
         });
       }
@@ -215,7 +211,7 @@
     }
   };
 
-  const { start, stop } = useTimeoutFn(getInfo, 10000);
+  const { start, stop } = useTimeoutFn(getInfo, 10000, true);
 
   // 获取堆垛机堆垛信息
   // 获取当前堆垛信息
@@ -387,6 +383,12 @@
     }
   };
 
+  const tabChange = (key) => {
+    printCarInfoRefs[`infoRef${key}`] &&
+      printCarInfoRefs[`infoRef${key}`].value &&
+      printCarInfoRefs[`infoRef${key}`].value[0].getTableList();
+  };
+
   const handleStackClick = (v) => {
     const index = selectedAddressId.value.indexOf(v.id);
     if (index > -1) {

+ 26 - 5
src/views/billet/operator/components/headTop.vue

@@ -25,7 +25,7 @@
       </div>
       <div class="type-item" v-for="ele of item.dtlList">
         <div class="type-item-dtl">
-          <span class="type-title">{{ Number(ele.size) / 1000 }}:</span> {{ ele.amount }}支 / {{ ele.weight }}t
+          <span class="type-title">{{ ele.size }}:</span> {{ ele.amount }}支 / {{ ele.weight }}t
         </div>
       </div>
     </a-col>
@@ -155,17 +155,38 @@
           stackingData: any = [];
         if (Array.isArray(hotSendDetailStatisticsList)) {
           hotsendData = hotSendDetailStatisticsList.map((item) => {
-            return { size: item.size, amount: item.amountTotal || 0, weight: item.blankOutput || 0 };
+            return {
+              size: item.size
+                .split(',')
+                .map((s) => Number(s) / 1000)
+                .join(','),
+              amount: item.amountTotal || 0,
+              weight: item.blankOutput || 0,
+            };
           });
         }
         if (Array.isArray(hotChargeDetailStatisticsList)) {
           hotchargeData = hotChargeDetailStatisticsList.map((item) => {
-            return { size: item.size, amount: item.amountTotal || 0, weight: item.blankOutput || 0 };
+            return {
+              size: item.size
+                .split(',')
+                .map((s) => Number(s) / 1000)
+                .join(','),
+              amount: item.amountTotal || 0,
+              weight: item.blankOutput || 0,
+            };
           });
         }
         if (Array.isArray(stackingDetailStatisticsList)) {
           stackingData = stackingDetailStatisticsList.map((item) => {
-            return { size: item.size, amount: item.amountTotal || 0, weight: item.blankOutput || 0 };
+            return {
+              size: item.size
+                .split(',')
+                .map((s) => Number(s) / 1000)
+                .join(','),
+              amount: item.amountTotal || 0,
+              weight: item.blankOutput || 0,
+            };
           });
         }
 
@@ -183,7 +204,7 @@
     }
   };
 
-  const { start, stop } = useTimeoutFn(getInfo, 5000);
+  const { start, stop } = useTimeoutFn(getInfo, 5000, true);
 
   // 换炉
   const changeHeatLoading = ref(false);

+ 311 - 16
src/views/billet/operator/components/heatList.vue

@@ -2,7 +2,7 @@
   <div class="cc-heatList flex flex-col">
     <div class="tips-title flex" v-if="showAction">
       <div class="left-tip">当班浇铸炉次</div>
-      <div class="flex flex-1 items-center" style="display: none">
+      <div class="flex flex-1 items-center">
         <div class="flex flex-1">
           <template v-for="item in 8">
             <JSearchSelect
@@ -16,9 +16,22 @@
             />
           </template>
         </div>
-        <div style="margin-right: 6px">
+        <div style="margin-right: 6px; display: none">
           <a-button type="primary" danger style="font-size: 16px" @click="handlerChangeLength"> 变更定尺 </a-button>
         </div>
+        <div style="margin-right: 6px">
+          <a-button
+            type="primary"
+            @click="
+              () => {
+                stop();
+                reload();
+              }
+            "
+          >
+            刷新
+          </a-button>
+        </div>
       </div>
     </div>
     <div class="current-table-list flex-1">
@@ -40,14 +53,80 @@
       <!--字段回显插槽-->
       <!-- <template v-slot:bodyCell="{ column, record, index, text }"> </template> -->
     </BasicTable>
+    <!-- 流切换定尺 -->
+    <a-modal
+      v-model:open="openSizeModal"
+      title="切换定尺"
+      centered
+      width="400px"
+      ok-text="确认"
+      :okButtonProps="{ loading: okLoading }"
+      cancel-text="取消"
+      @ok="switchSteelOne"
+      @cancel="
+        () => {
+          openSizeModal = false;
+          newSizeNum = '';
+        }
+      "
+    >
+      <div class="flex justify-center items-center" style="margin: 20px 0">
+        <div>选择定尺:</div>
+        <JSearchSelect type="list" style="width: 277px" v-model:value="newSizeNum" dict="lg_dcgg" placeholder="请选择" allowClear />
+      </div>
+    </a-modal>
+    <!-- 补录钢坯 -->
+    <a-modal
+      v-model:open="openCompensateModal"
+      :title="'补录钢坯' + (heatInfo.heatNo ? ',炉号:' + heatInfo.heatNo : '')"
+      centered
+      width="700px"
+      ok-text="确认"
+      :okButtonProps="{ loading: okLoading }"
+      cancel-text="取消"
+      @ok="confirmCompensate"
+      @cancel="closeCompensateModal"
+    >
+      <div class="strand-list">
+        <div class="flex justify-between strand-item" v-if="isAllHeat" style="margin: 20px 0">
+          <div class="flex" style="height: 40px; line-height: 40px">
+            <span class="mr-2">炉号:</span>
+            <a-input v-model:value="newHeatNo" style="width: 180px" size="large" placeholder="请输入炉号" />
+          </div>
+        </div>
+        <div v-for="(item, index) in Object.keys(strandNums)" class="flex justify-between items-center strand-item" style="margin: 20px 0">
+          <div class="strand-num">{{ index + 1 }}流</div>
+          <div class="flex items-center" style="position: relative; width: 120px">
+            <component :is="formatDefineSize(heatInfo[strandArr[index]], heatInfo[lengthArr[index]])" />
+          </div>
+          <div>
+            <JSearchSelect
+              type="list"
+              style="width: 96px"
+              v-model:value="strandLength[item]"
+              dict="lg_dcgg"
+              :placeholder="`${index + 1}流定尺`"
+              allowClear
+            />
+          </div>
+          <div><a-input-number id="inputNumber" v-model:value="strandNums[item]" :min="0" :max="10" /></div>
+          <div style="width: 140px" v-if="isAllHeat">
+            <div class="flex items-center" v-if="isAllHeat && Object.keys(rollClubOneList).includes(item)">
+              <span class="mr-2" style="color: #f50">去棒一:</span>
+              <a-input type="number" v-model:value="rollClubOneList[item]" style="width: 80px" suffix="支" placeholder="棒一" :min="0" />
+            </div>
+          </div>
+        </div>
+      </div>
+    </a-modal>
   </div>
 </template>
 
 <script lang="ts" name="billetLiftingBill" setup>
   import { BasicTable, TableAction, ActionItem } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
-  import { columns } from '../operator.data';
-  import { queryHeatsActualsByCcmNo, addHotCharge, stackingUpAdd, changeDefiningLength } from '../operator.api';
+  import { getColumns, renderStrandCell } from '../operator.data';
+  import { queryHeatsActualsByCcmNo, addHotCharge, stackingUpAdd, changeDefiningLength, changeStrandLength, addBilletBasic } from '../operator.api';
   import { h, onMounted, onUnmounted, ref, watch } from 'vue';
   import { mapTableTotalSummary } from '/@/utils/common/compUtils';
   import { useTimeoutFn } from '/@/hooks/core/useTimeout';
@@ -122,6 +201,211 @@
 
   const otherShiftTableData = ref<any[]>([]);
 
+  // 流修改定尺
+  const openSizeModal = ref(false); // 打开定尺modal
+  const newSizeNum = ref(''); // 新定尺
+  const okLoading = ref(false); // 确定按钮loading
+  const heatInfo = ref<any>({}); // 炉信息
+  const strandNum = ref<number>(); // 流号
+  const orgSizeNum = ref<number>(); // 原定尺
+  const isAllHeat = ref<boolean>(false); // 是否是整炉添加
+  const columns = getColumns({
+    clickCb: ({ record, size, strandNo }) => {
+      newSizeNum.value = size;
+      orgSizeNum.value = size;
+      openSizeModal.value = true;
+      heatInfo.value = record;
+      strandNum.value = strandNo;
+    },
+    openCompensateModal: (record) => {
+      openCompensateModal.value = true;
+      if (record.dataIndex && record.dataIndex === 'totalInfo') {
+        heatInfo.value = {};
+        isAllHeat.value = true;
+      } else {
+        heatInfo.value = record;
+        isAllHeat.value = false;
+      }
+    },
+  });
+
+  // 补录钢坯
+  const openCompensateModal = ref(false);
+  const strandNums = ref<any>({
+    oneStrandNoSum: 0,
+    twoStrandNoSum: 0,
+    threeStrandNoSum: 0,
+    fourStrandNoSum: 0,
+    fiveStrandNoSum: 0,
+    sixStrandNoSum: 0,
+    sevenStrandNoSum: 0,
+    eightStrandNoSum: 0,
+  });
+  const strandLength = ref({
+    oneStrandNoSum: undefined,
+    twoStrandNoSum: undefined,
+    threeStrandNoSum: undefined,
+    fourStrandNoSum: undefined,
+    fiveStrandNoSum: undefined,
+    sixStrandNoSum: undefined,
+    sevenStrandNoSum: undefined,
+    eightStrandNoSum: undefined,
+  });
+  const closeCompensateModal = () => {
+    openCompensateModal.value = false;
+    strandNums.value = {
+      oneStrandNoSum: 0,
+      twoStrandNoSum: 0,
+      threeStrandNoSum: 0,
+      fourStrandNoSum: 0,
+      fiveStrandNoSum: 0,
+      sixStrandNoSum: 0,
+      sevenStrandNoSum: 0,
+      eightStrandNoSum: 0,
+    };
+    strandLength.value = {
+      oneStrandNoSum: undefined,
+      twoStrandNoSum: undefined,
+      threeStrandNoSum: undefined,
+      fourStrandNoSum: undefined,
+      fiveStrandNoSum: undefined,
+      sixStrandNoSum: undefined,
+      sevenStrandNoSum: undefined,
+      eightStrandNoSum: undefined,
+    };
+    rollClubOneList.value = {
+      oneStrandNoSum: 0,
+      twoStrandNoSum: 0,
+      threeStrandNoSum: 0,
+      fourStrandNoSum: 0,
+      fiveStrandNoSum: 0,
+      sixStrandNoSum: 0,
+    };
+    newHeatNo.value = '';
+  };
+  // 格式化定尺
+  const formatDefineSize = (num, jsonStr) => {
+    if (!num) {
+      return h('div', { style: { color: '#f50' } }, 0);
+    }
+    return renderStrandCell({ num, lengthJsonStr: jsonStr });
+  };
+
+  const staticStrandInfo = {
+    oneStrandNoSum: { size: 'oneLength', no: 'oneStrandNo', noNum: 1 },
+    twoStrandNoSum: { size: 'twoLength', no: 'twoStrandNo', noNum: 2 },
+    threeStrandNoSum: { size: 'threeLength', no: 'threeStrandNo', noNum: 3 },
+    fourStrandNoSum: { size: 'fourLength', no: 'fourStrandNo', noNum: 4 },
+    fiveStrandNoSum: { size: 'fiveLength', no: 'fiveStrandNo', noNum: 5 },
+    sixStrandNoSum: { size: 'sixLength', no: 'sixStrandNo', noNum: 6 },
+    sevenStrandNoSum: { size: 'sevenLength', no: 'sevenStrandNo', noNum: 7 },
+    eightStrandNoSum: { size: 'eightLength', no: 'eightStrandNo', noNum: 8 },
+  };
+
+  // 新炉号
+  const newHeatNo = ref('');
+  const rollClubOneList = ref({
+    oneStrandNoSum: 0,
+    twoStrandNoSum: 0,
+    threeStrandNoSum: 0,
+    fourStrandNoSum: 0,
+    fiveStrandNoSum: 0,
+    sixStrandNoSum: 0,
+  });
+  // 确认添加定尺
+  const confirmCompensate = async () => {
+    try {
+      // 整炉添加钢坯
+      if (isAllHeat.value) {
+        if (!newHeatNo.value) {
+          createMessage.error('整炉补录钢坯, 需输入新炉号');
+          return;
+        }
+      }
+
+      // 获取根数
+      const changeStrandNums = Object.keys(strandNums.value).filter((item) => strandNums.value[item]);
+      if (changeStrandNums.length === 0) {
+        createMessage.error('请输入要增加的根数');
+        return;
+      }
+
+      // 整炉补录,判断支数先减去棒一支数后是否是4的倍数
+      const allNums = changeStrandNums.reduce((pre, cur) => pre + Number(strandNums.value[cur]), 0);
+      const rollOneList = Object.keys(rollClubOneList.value).filter((item) => rollClubOneList.value[item]);
+      const rollOneNums = rollOneList.reduce((pre, cur) => pre + Number(rollClubOneList.value[cur]), 0);
+
+      let rollClubOneListParams: any[] = [];
+      if (isAllHeat.value && rollOneNums) {
+        if ((allNums - rollOneNums) % 4 !== 0) {
+          createMessage.error('减去棒一支数,剩下的钢坯支数必须为4的倍数');
+          return;
+        }
+
+        rollClubOneListParams = rollOneList.map((item) => {
+          return {
+            strandNo: staticStrandInfo[item].noNum,
+            addSum: Number(rollClubOneList.value[item]),
+            length: Number(strandLength.value[item]),
+          };
+        });
+      }
+
+      okLoading.value = true;
+      let params = {
+        ccmNo: props.ccmNo,
+        heatNo: isAllHeat.value ? newHeatNo.value : heatInfo.value.heatNo,
+        shift: heatInfo.value.shift || props.curShiftInfo.shift,
+        shiftGroup: heatInfo.value.shiftGroup || props.curShiftInfo.shiftGroup,
+        addType: isAllHeat.value ? 1 : 2,
+        rollClubOneList: rollClubOneListParams,
+        addCount: allNums,
+      };
+
+      changeStrandNums.forEach((item) => {
+        if (strandLength.value[item]) {
+          params = Object.assign(params, {
+            [item]: strandNums.value[item],
+            [staticStrandInfo[item].size]: strandLength.value[item],
+            [staticStrandInfo[item].no]: staticStrandInfo[item].noNum,
+          });
+        }
+      });
+
+      await addBilletBasic(params);
+      reload();
+      closeCompensateModal();
+      okLoading.value = false;
+    } catch (error) {
+      okLoading.value = false;
+      console.log(error);
+    }
+  };
+
+  const switchSteelOne = async () => {
+    try {
+      if (newSizeNum.value == '') {
+        createMessage.error('请选择牌号');
+        return;
+      }
+      okLoading.value = true;
+      await changeStrandLength({
+        ccmNo: props.ccmNo,
+        heatNo: heatInfo.value.heatNo,
+        originalLength: Number(orgSizeNum.value),
+        length: Number(newSizeNum.value),
+        strandNo: strandNum.value,
+      });
+
+      reload();
+      openSizeModal.value = false;
+      newSizeNum.value = '';
+      okLoading.value = false;
+    } catch (error) {
+      okLoading.value = false;
+    }
+  };
+
   //注册table数据
   const { tableContext } = useListPage({
     tableProps: {
@@ -180,19 +464,12 @@
    * 计算合计
    * @param tableData
    */
+  const strandArr = ['oneStrandNo', 'twoStrandNo', 'threeStrandNo', 'fourStrandNo', 'fiveStrandNo', 'sixStrandNo', 'sevenStrandNo', 'eightStrandNo'];
+  const lengthArr = ['oneLength', 'twoLength', 'threeLength', 'fourLength', 'fiveLength', 'sixLength', 'sevenLength', 'eightLength'];
   function onSummary(tableData: Recordable[]) {
     const newTableData = tableData.filter((ele) => ele.shift === props.curShiftInfo.shift && ele.shiftGroup === props.curShiftInfo.shiftGroup);
     // 可用工具方法自动计算合计
-    const totals = mapTableTotalSummary(newTableData, [
-      'oneStrandNo',
-      'twoStrandNo',
-      'threeStrandNo',
-      'fourStrandNo',
-      'fiveStrandNo',
-      'sixStrandNo',
-      'sevenStrandNo',
-      'eightStrandNo',
-    ]);
+    const totals = mapTableTotalSummary(newTableData, strandArr);
     // 直轧,热装,堆垛,总计
     let directRollingTotalCount = 0,
       directRollingTotalWeight = 0,
@@ -277,8 +554,8 @@
 
   const { start, stop } = useTimeoutFn(() => {
     if (!props.changeShiftId) {
-      reload();
-      start();
+      // reload();
+      // start();
     }
   }, 10000);
 
@@ -529,4 +806,22 @@
       }
     }
   }
+  .strand-list {
+    padding: 0 30px;
+    font-family: 'Kingsoft_Cloud_Font';
+    color: #000;
+
+    .strand-num {
+      color: #f50;
+    }
+
+    .strand-item {
+      border-bottom: 1px solid #eee;
+      padding-bottom: 10px;
+
+      &:last-child {
+        border-bottom: none;
+      }
+    }
+  }
 </style>

+ 18 - 3
src/views/billet/operator/components/printCarInfo.vue

@@ -16,7 +16,14 @@
             ref="destinationRef"
           />
           <span v-else>{{ info.destination }}</span>
-          <a-button style="margin-left: 20px" v-if="!info.outTime && info.id && info.destination" type="primary" :loading="btnLoading" @click="sendCar">发车</a-button>
+          <a-button
+            style="margin-left: 20px"
+            v-if="!info.outTime && info.id && info.destination"
+            type="primary"
+            :loading="btnLoading"
+            @click="sendCar"
+            >发车</a-button
+          >
         </div>
         <div class="flex-1" style="text-align: center; font-size: 16px">{{ dayjs(info.arrivalTime).format('YYYY 年 MM 月 DD 日 HH 时 mm 分') }}</div>
         <div class="flex-1" style="text-align: right; font-size: 16px"></div>
@@ -56,10 +63,18 @@
             <component :is="renderDictTag(info.brandNum, 'billet_spec')" />
           </span>
         </a-descriptions-item>
-        <a-descriptions-item style="position: relative; text-align: left;" label="炉号">
+        <a-descriptions-item style="position: relative; text-align: left" label="炉号">
           <div v-for="item in headDtl" :key="item.id">{{ item.heatNo }} - {{ item.billetNos.length }}</div>
           <div class="correct" v-if="!info.outTime && info.id && headDtl.length > 0">
-            <a-button size="small" type="primary" @click="() => openDetailModal(true, { record: info, isUpdate: true })"> 修正 </a-button>
+            <a-button
+              size="small"
+              type="primary"
+              @click="
+                () => openDetailModal(true, { record: { ...info, typeConfigId: !info.typeConfigId ? '1024' : info.typeConfigId }, isUpdate: true })
+              "
+            >
+              修正
+            </a-button>
           </div>
         </a-descriptions-item>
         <a-descriptions-item label="规格">

+ 14 - 0
src/views/billet/operator/operator.api.ts

@@ -15,6 +15,10 @@ enum Api {
   returnFurnaceChange = '/billetHotsendBase/billetHotsendBase/returnFurnaceChange',
   // 变更定尺
   changeDefiningLength = '/billetHotsendBase/billetHotsendBase/pushStrandNoSize',
+  // 留改变定尺
+  changeStrandLength = '/storageBill/editBilletBasicInfoLength',
+  // 增加钢坯
+  addBilletBasic = '/actualControl/billetActual/addBilletBasic',
 }
 
 // 炉次信息
@@ -51,3 +55,13 @@ export const returnFurnaceChange = (params: any) => {
 export const changeDefiningLength = (params: any) => {
   return defHttp.post({ url: Api.changeDefiningLength, params });
 };
+
+// 留改变定尺
+export const changeStrandLength = (params: any) => {
+  return defHttp.put({ url: Api.changeStrandLength, params });
+};
+
+// 添加钢坯
+export const addBilletBasic = (params: any) => {
+  return defHttp.post({ url: Api.addBilletBasic, params });
+};

+ 241 - 205
src/views/billet/operator/operator.data.ts

@@ -13,7 +13,8 @@ const renderNum = (num, weight, backArr?: boolean, tag = 'div') => {
   return h('div', {}, arr);
 };
 
-const renderStrandCell = (num, lengthJsonStr) => {
+export const renderStrandCell = (options) => {
+  const { num, lengthJsonStr, clickCb, record, strandNo } = options;
   try {
     if (lengthJsonStr) {
       const lengthJson = JSON.parse(lengthJsonStr);
@@ -22,7 +23,19 @@ const renderStrandCell = (num, lengthJsonStr) => {
         return h('div', { style: { textAlign: 'left', padding: '20px 0 0' } }, [
           h('div', { style: { color: '#f50', position: 'absolute', top: '0px' } }, num),
           ...lengthKeys.map((key) => {
-            return h('div', {}, [h('span', {}, Number(key) / 1000 + ': '), h('span', { style: { color: '#0085ff' } }, lengthJson[key])]);
+            return h('div', {}, [
+              h(
+                'span',
+                {
+                  style: { cursor: 'pointer' },
+                  onClick() {
+                    clickCb && clickCb({ record, size: key, strandNo });
+                  },
+                },
+                Number(key) / 1000 + ': '
+              ),
+              h('span', { style: { color: '#0085ff' } }, lengthJson[key]),
+            ]);
           }),
         ]);
       }
@@ -34,225 +47,248 @@ const renderStrandCell = (num, lengthJsonStr) => {
 };
 
 // 列表数据
-export const columns: BasicColumn[] = [
-  {
-    title: '#',
-    align: 'center',
-    dataIndex: 'columnIndex',
-    width: 36,
-    fixed: 'left',
-  },
-  {
-    title: '炉号',
-    align: 'center',
-    dataIndex: 'heatNo',
-    width: 90,
-    fixed: 'left',
-    customRender(opt) {
-      return h('div', {}, [
-        h('div', { style: { color: '#6bd000', position: 'absolute', top: '0px' } }, render.renderDict(opt.record.shiftGroup, 'lg_bz')),
-        h('span', {}, opt.record.heatNo),
-      ]);
+export const getColumns = ({ clickCb, openCompensateModal }): BasicColumn[] => {
+  return [
+    {
+      title: '#',
+      align: 'center',
+      dataIndex: 'columnIndex',
+      width: 36,
+      fixed: 'left',
     },
-  },
-  {
-    title: '牌号',
-    align: 'center',
-    width: 80,
-    dataIndex: 'brandNum',
-    customRender(opt) {
-      return render.renderDict(opt.record.brandNum, 'billet_spec');
-    },
-  },
-  {
-    title: '1流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'oneStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.oneStrandNo, opt.record.oneLength);
-    },
-  },
-  {
-    title: '2流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'twoStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.twoStrandNo, opt.record.twoLength);
+    {
+      title: '炉号',
+      align: 'center',
+      dataIndex: 'heatNo',
+      width: 90,
+      fixed: 'left',
+      customRender(opt) {
+        return h('div', {}, [
+          h('div', { style: { color: '#6bd000', position: 'absolute', top: '0px' } }, render.renderDict(opt.record.shiftGroup, 'lg_bz')),
+          h('span', {}, opt.record.heatNo),
+        ]);
+      },
     },
-  },
-  {
-    title: '3流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'threeStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.threeStrandNo, opt.record.threeLength);
+    {
+      title: '牌号',
+      align: 'center',
+      width: 80,
+      dataIndex: 'brandNum',
+      customRender(opt) {
+        return render.renderDict(opt.record.brandNum, 'billet_spec');
+      },
     },
-  },
-  {
-    title: '4流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'fourStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.fourStrandNo, opt.record.fourLength);
+    {
+      title: '1流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'oneStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.oneStrandNo, lengthJsonStr: opt.record.oneLength, clickCb, record: opt.record, strandNo: 1 });
+      },
     },
-  },
-  {
-    title: '5流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'fiveStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.fiveStrandNo, opt.record.fiveLength);
+    {
+      title: '2流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'twoStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.twoStrandNo, lengthJsonStr: opt.record.twoLength, clickCb, record: opt.record, strandNo: 2 });
+      },
     },
-  },
-  {
-    title: '6流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'sixStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.sixStrandNo, opt.record.sixLength);
+    {
+      title: '3流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'threeStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.threeStrandNo, lengthJsonStr: opt.record.threeLength, clickCb, record: opt.record, strandNo: 3 });
+      },
     },
-  },
-  {
-    title: '7流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'sevenStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.sevenStrandNo, opt.record.sevenLength);
+    {
+      title: '4流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'fourStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.fourStrandNo, lengthJsonStr: opt.record.fourLength, clickCb, record: opt.record, strandNo: 4 });
+      },
     },
-  },
-  {
-    title: '8流',
-    width: 90,
-    align: 'center',
-    dataIndex: 'eightStrandNo',
-    customRender(opt) {
-      return renderStrandCell(opt.record.eightStrandNo, opt.record.eightLength);
+    {
+      title: '5流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'fiveStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.fiveStrandNo, lengthJsonStr: opt.record.fiveLength, clickCb, record: opt.record, strandNo: 5 });
+      },
     },
-  },
-  {
-    title: '棒一',
-    align: 'center',
-    width: 75,
-    dataIndex: 'directRolling',
-    customRender({ record }) {
-      const { hotSend, directRolling } = record;
-      try {
-        if (hotSend) {
-          const obj = JSON.parse(hotSend);
-          // return obj.hotSendTotalCount + ' / ' + obj.hotSendTotalWeight.toFixed(2);
-          return renderNum(obj.hotSendTotalCount, obj.hotSendTotalWeight);
-        }
-        if (directRolling) {
-          const obj = JSON.parse(directRolling);
-          // return obj.directRollingTotalCount + ' / ' + obj.directRollingTotalWeight.toFixed(2);
-          return renderNum(obj.directRollingTotalCount, obj.directRollingTotalWeight);
-        }
-      } catch (error) {}
-      return '';
+    {
+      title: '6流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'sixStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.sixStrandNo, lengthJsonStr: opt.record.sixLength, clickCb, record: opt.record, strandNo: 6 });
+      },
     },
-  },
-  {
-    title: '热装',
-    align: 'center',
-    width: 75,
-    dataIndex: 'hotCharge',
-    customRender({ record }) {
-      const { hotCharge } = record;
-      try {
-        if (hotCharge) {
-          const obj = JSON.parse(hotCharge);
-          // return obj.hotChargeTotalCount + ' / ' + obj.hotChargeTotalWeight.toFixed(2);
-          return renderNum(obj.hotChargeTotalCount, obj.hotChargeTotalWeight);
-        }
-      } catch (error) {}
-      return '';
+    {
+      title: '7流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'sevenStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.sevenStrandNo, lengthJsonStr: opt.record.sevenLength, clickCb, record: opt.record, strandNo: 7 });
+      },
     },
-  },
-  {
-    title: '堆垛',
-    align: 'center',
-    width: 75,
-    dataIndex: 'stacking',
-    customRender({ record }) {
-      const { stacking } = record;
-      try {
-        if (stacking) {
-          const obj = JSON.parse(stacking);
-          // return obj.stackingTotalCount + ' / ' + obj.stackingTotalWeight.toFixed(2);
-          return renderNum(obj.stackingTotalCount, obj.stackingTotalWeight);
-        }
-      } catch (error) {}
-      return '';
+    {
+      title: '8流',
+      width: 90,
+      align: 'center',
+      dataIndex: 'eightStrandNo',
+      customRender(opt) {
+        return renderStrandCell({ num: opt.record.eightStrandNo, lengthJsonStr: opt.record.eightLength, clickCb, record: opt.record, strandNo: 8 });
+      },
     },
-  },
-  {
-    title: '定尺',
-    align: 'center',
-    width: 100,
-    dataIndex: 'length',
-    customRender({ record }) {
-      const { length } = record;
-      try {
-        if (length) {
-          const obj = JSON.parse(length);
-          let lengthCC: any[] = [];
-          Object.keys(obj).forEach((key) => {
-            // lengthCC.push(h('div', {},  key + ' : ' + obj[key].lengthTotalCount + ' / ' + obj[key].lengthTotalWeight.toFixed(2)));
-            const lengthStlArr = renderNum(obj[key].lengthTotalCount, null, true, 'span') as any[];
-            lengthCC.push(h('div', {}, [h('span', {}, Number(key) / 1000 + ': '), ...lengthStlArr]));
-          });
-          return h('div', { style: { fontSize: '12px', textAlign: 'left' } }, lengthCC);
-        }
-      } catch (error) {}
-      return '';
+    {
+      title: '棒一',
+      align: 'center',
+      width: 75,
+      dataIndex: 'directRolling',
+      customRender({ record }) {
+        const { hotSend, directRolling } = record;
+        try {
+          if (hotSend) {
+            const obj = JSON.parse(hotSend);
+            // return obj.hotSendTotalCount + ' / ' + obj.hotSendTotalWeight.toFixed(2);
+            return renderNum(obj.hotSendTotalCount, obj.hotSendTotalWeight);
+          }
+          if (directRolling) {
+            const obj = JSON.parse(directRolling);
+            // return obj.directRollingTotalCount + ' / ' + obj.directRollingTotalWeight.toFixed(2);
+            return renderNum(obj.directRollingTotalCount, obj.directRollingTotalWeight);
+          }
+        } catch (error) {}
+        return '';
+      },
     },
-  },
-  {
-    title: '总计',
-    align: 'center',
-    width: 75,
-    dataIndex: 'totalInfo',
-    customRender({ record }) {
-      try {
-        const { totalInfo, hotCharge, stacking, hotSend, directRolling } = record;
-        if (totalInfo) {
-          const obj = JSON.parse(totalInfo);
-          // return obj.totalCount + ' / ' + obj.totalWeight;
-          let quXiaongGen = 0;
-          // 热装
+    {
+      title: '热装',
+      align: 'center',
+      width: 75,
+      dataIndex: 'hotCharge',
+      customRender({ record }) {
+        const { hotCharge } = record;
+        try {
           if (hotCharge) {
-            const hotChargeObj = JSON.parse(hotCharge);
-            quXiaongGen = quXiaongGen + (hotChargeObj.hotChargeTotalCount || 0);
+            const obj = JSON.parse(hotCharge);
+            // return obj.hotChargeTotalCount + ' / ' + obj.hotChargeTotalWeight.toFixed(2);
+            return renderNum(obj.hotChargeTotalCount, obj.hotChargeTotalWeight);
           }
-          // 堆垛
+        } catch (error) {}
+        return '';
+      },
+    },
+    {
+      title: '堆垛',
+      align: 'center',
+      width: 75,
+      dataIndex: 'stacking',
+      customRender({ record }) {
+        const { stacking } = record;
+        try {
           if (stacking) {
-            const stackingObj = JSON.parse(stacking);
-            quXiaongGen = quXiaongGen + (stackingObj.stackingTotalCount || 0);
+            const obj = JSON.parse(stacking);
+            // return obj.stackingTotalCount + ' / ' + obj.stackingTotalWeight.toFixed(2);
+            return renderNum(obj.stackingTotalCount, obj.stackingTotalWeight);
           }
-          // 棒一或者高线
-          if (directRolling) {
-            const directRollingObj = JSON.parse(directRolling);
-            quXiaongGen = quXiaongGen + (directRollingObj.directRollingTotalCount || 0);
-          }
-          if (hotSend) {
-            const hotSendObj = JSON.parse(hotSend);
-            quXiaongGen = quXiaongGen + (hotSendObj.hotSendTotalCount || 0);
+        } catch (error) {}
+        return '';
+      },
+    },
+    {
+      title: '定尺',
+      align: 'center',
+      width: 100,
+      dataIndex: 'length',
+      customRender({ record }) {
+        const { length } = record;
+        try {
+          if (length) {
+            const obj = JSON.parse(length);
+            let lengthCC: any[] = [];
+            Object.keys(obj).forEach((key) => {
+              // lengthCC.push(h('div', {},  key + ' : ' + obj[key].lengthTotalCount + ' / ' + obj[key].lengthTotalWeight.toFixed(2)));
+              const lengthStlArr = renderNum(obj[key].lengthTotalCount, null, true, 'span') as any[];
+              lengthCC.push(h('div', {}, [h('span', {}, Number(key) / 1000 + ': '), ...lengthStlArr]));
+            });
+            return h('div', { style: { fontSize: '12px', textAlign: 'left' } }, lengthCC);
           }
+        } catch (error) {}
+        return '';
+      },
+    },
+    {
+      title: '总计',
+      align: 'center',
+      width: 75,
+      dataIndex: 'totalInfo',
+      customRender({ record }) {
+        try {
+          const { totalInfo, hotCharge, stacking, hotSend, directRolling } = record;
+          if (totalInfo) {
+            const obj = JSON.parse(totalInfo);
+            // return obj.totalCount + ' / ' + obj.totalWeight;
+            let quXiaongGen = 0;
+            // 热装
+            if (hotCharge) {
+              const hotChargeObj = JSON.parse(hotCharge);
+              quXiaongGen = quXiaongGen + (hotChargeObj.hotChargeTotalCount || 0);
+            }
+            // 堆垛
+            if (stacking) {
+              const stackingObj = JSON.parse(stacking);
+              quXiaongGen = quXiaongGen + (stackingObj.stackingTotalCount || 0);
+            }
+            // 棒一或者高线
+            if (directRolling) {
+              const directRollingObj = JSON.parse(directRolling);
+              quXiaongGen = quXiaongGen + (directRollingObj.directRollingTotalCount || 0);
+            }
+            if (hotSend) {
+              const hotSendObj = JSON.parse(hotSend);
+              quXiaongGen = quXiaongGen + (hotSendObj.hotSendTotalCount || 0);
+            }
 
-          return renderNum(
-            h('span', {}, [h('span', {}, obj.totalCount), h('span', { style: { color: '#999' } }, '/' + (obj.totalCount - quXiaongGen))]),
-            obj.totalWeight
-          );
-        }
-      } catch (error) {}
-      return '';
+            return h(
+              'div',
+              {
+                style: { cursor: 'pointer' },
+                onClick: () => {
+                  if (!record.heatNo) return;
+                  openCompensateModal && openCompensateModal(record);
+                },
+              },
+              renderNum(
+                h('span', {}, [h('span', {}, obj.totalCount), h('span', { style: { color: '#999' } }, '/' + (obj.totalCount - quXiaongGen))]),
+                obj.totalWeight
+              )
+            );
+          }
+        } catch (error) {}
+        return '';
+      },
+      customHeaderCell: (columns) => {
+        return {
+          style: {
+            cursor: 'pointer',
+          },
+          onClick: () => {
+            console.log('columns', columns);
+            openCompensateModal && openCompensateModal(columns);
+          },
+        };
+      },
     },
-  },
-];
+  ];
+};