Browse Source

修改原始数据卡片

zhangafei 3 weeks ago
parent
commit
0166328894

+ 4 - 4
.env.development

@@ -6,16 +6,16 @@ VITE_PUBLIC_PATH = /
 
 # 跨域代理,您可以配置多个 ,请注意,没有换行符
 # VITE_PROXY = [["/jeecgboot","http://192.168.1.53:9999"],["/upload","http://localhost:3300/upload"]]
-VITE_PROXY = [["/jeecgboot","http://192.168.1.6:9999"],["/upload","http://localhost:3300/upload"]]
+# VITE_PROXY = [["/jeecgboot","http://192.168.1.6:9999"],["/upload","http://localhost:3300/upload"]]
 # VITE_PROXY = [["/jeecgboot","http://192.168.0.119:9999"],["/upload","http://localhost:3300/upload"]]
-# VITE_PROXY = [["/jeecgboot","http://123.57.213.14:9898"],["/upload","http://localhost:3300/upload"]]
+VITE_PROXY = [["/jeecgboot","http://123.57.213.14:9898"],["/upload","http://localhost:3300/upload"]]
 
 #后台接口全路径地址(必填)
 # VITE_GLOB_DOMAIN_URL=http://localhost:9999
-VITE_GLOB_DOMAIN_URL=http://192.168.1.6:9999
+# VITE_GLOB_DOMAIN_URL=http://192.168.1.6:9999
 # VITE_GLOB_DOMAIN_URL=http://192.168.1.53:9999
 # VITE_GLOB_DOMAIN_URL=http://192.168.0.119:9999
-# VITE_GLOB_DOMAIN_URL=http://123.57.213.14:9898
+VITE_GLOB_DOMAIN_URL=http://123.57.213.14:9898
 
 
 

+ 6 - 0
src/views/billet/ShiftPerformance/ShiftPerformance.api.ts

@@ -2,6 +2,7 @@ import { defHttp } from '/@/utils/http/axios';
 
 enum Api {
   list = '/billetHotsend/billetHotsendChangeShift/list',
+  edit = '/billetHotsend/billetHotsendChangeShift/edit',
   exportXls = '/billetHotsend/billetHotsendChangeShift/exportXls',
 }
 /**
@@ -14,3 +15,8 @@ export const getExportUrl = Api.exportXls;
  * @param params
  */
 export const list = (params) => defHttp.get({ url: Api.list, params });
+
+// 编辑
+export const edit = (params) => {
+  return defHttp.put({ url: Api.edit, params }, { joinParamsToUrl: true });
+};

+ 2 - 1
src/views/billet/operator/components/headTop.vue

@@ -31,7 +31,7 @@
       <!-- 冷床 -->
       <template v-if="item.title == '堆垛'">
         <template v-for="lc in coldBed">
-          <div class="type-item" style="border-top: 1px solid #108ee9;">
+          <div class="type-item" style="border-top: 1px solid #108ee9">
             <span class="type-title" :style="{ color: lc.titleColor }">{{ lc.title }}:</span> {{ lc.amount }} 支 / {{ lc.weight }} t
           </div>
           <div class="type-item" v-for="lele of lc.dtlList">
@@ -132,6 +132,7 @@
     emits('onShiftChange', {
       shift: info.value.billetHotsendChangeShift.shift,
       shiftGroup: info.value.billetHotsendChangeShift.shiftGroup,
+      changeShiftId: info.value.billetHotsendChangeShift.id,
     });
   };
 

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

@@ -169,6 +169,8 @@
   //     weight.value = allWeight;
   //     sizeInfo.value = sizeArr;
   const headDtl = computed(() => {
+    if (!props.info || !props.info.heatNoCountMap) return [];
+
     return Object.keys(props.info.heatNoCountMap).map((item) => {
       return { heatNo: item, nums: props.info.heatNoCountMap[item] };
     });
@@ -219,7 +221,7 @@
         return acc;
       }, []);
 
-      headDtl.value = newArr;
+      // headDtl.value = newArr;
       weight.value = allWeight;
       sizeInfo.value = sizeArr;
     } catch (error) {

+ 299 - 169
src/views/billet/operator/components/printOriginalRecords.vue

@@ -16,7 +16,10 @@
       :key="printKey"
     >
       <div class="ticket next-ticket">
-        <div style="text-align: center">
+        <div style="text-align: center; position: relative">
+          <div class="noprint" style="position: absolute">
+            <a-button type="primary" @click="addHeatNo">添加炉号</a-button>
+          </div>
           <p style="font-size: 24px; font-weight: 800; display: inline-block; margin-bottom: 16px; line-height: 30px">
             <span class="ccmno">{{ hostNumber }}</span> #机推钢室生产原始记录
           </p>
@@ -24,7 +27,9 @@
         <div class="flex ccmno-info" style="line-height: 24px">
           <div class="flex-1"> 班组:<component :is="renderDictTag(shiftInfo.shiftGroup, 'lg_bz')" /> </div>
           <div class="flex-1"> 班次:<component :is="renderDictTag(shiftInfo.shift, 'lg_bb')" /> </div>
-          <div class="flex-1 flex"><span> 定尺:</span><a-input v-model:value="mainSize" style="flex: 1" :bordered="false" size="small" /> </div>
+          <div class="flex-1 flex"
+            ><span> 定尺:</span><a-input v-model:value="mainSize" @blur="handleSizeBlur" style="flex: 1" :bordered="false" size="small" />
+          </div>
           <div class="flex-1" style="text-align: center; font-size: 13px">
             {{ dayjs(curTime).format('YYYY 年 MM 月 DD 日') }}
           </div>
@@ -41,7 +46,7 @@
             <a-table-summary-row class="summary-row-no-border">
               <a-table-summary-cell :row-span="2" :col-span="remakeColSpan">
                 <div class="summary-cell-remark">
-                  <a-textarea v-model:value="mainRemark" style="min-height: 160px" :bordered="false" />
+                  <a-textarea v-model:value="mainRemark" @blur="handleRemarkBlur" style="min-height: 160px" :bordered="false" />
                 </div>
               </a-table-summary-cell>
               <a-table-summary-cell :row-span="1" :col-span="1"> 热送 </a-table-summary-cell>
@@ -149,7 +154,9 @@
         <a-input-number
           size="large"
           v-model:value="item.totalCount"
-          :addon-before="headText[item.hotChargeDestination] + ' ' + Number(item.hotChargeLength) / 1000 + 'm'"
+          :addon-before="
+            headText[item.hotChargeDestination] + ' ' + Number(item.hotChargeLength) / 1000 + 'm ' + ' ' + (item.hotChargeBtype === '0' ? '热' : '冷')
+          "
           :min="0"
           :step="4"
           @change="
@@ -168,6 +175,13 @@
       <div style="font-size: 16px; color: #f50">注:请输入4或4的倍数.</div>
     </div>
   </a-modal>
+
+  <!-- 新增炉号 -->
+  <a-modal v-model:open="openNewHeatNo" title="新增炉次" centered width="500px" :zIndex="1000" @ok="confirmAddHeatNo">
+    <div style="padding: 60px 30px 30px; font-size: 16px">
+      <a-input size="large" v-model:value="newHeatNo"></a-input>
+    </div>
+  </a-modal>
 </template>
 <script lang="ts" setup>
   import { ref, computed, h } from 'vue';
@@ -175,7 +189,7 @@
   import dayjs from 'dayjs';
   import { printJS } from '/@/hooks/web/usePrintJS';
   import type { TableColumnsType } from 'ant-design-vue';
-  import { queryBilletRecordByCcmNo, editBilletRecord } from '../operator.api';
+  import { queryBilletRecordByCcmNo, editBilletRecord, addBilletNo, editOriginalProductRecord } from '../operator.api';
   import { render } from '/@/utils/common/renderUtils';
   import { isArray, isNumber } from '/@/utils/is';
   import Icon from '/@/components/Icon';
@@ -217,87 +231,87 @@
         return render.renderDict(text, 'billet_spec');
       },
     },
-    {
-      title: '支数(根)',
-      align: 'center',
-      width: 570,
-      children: [
-        {
-          title: 'I',
-          dataIndex: 'oneFlow',
-          key: 'oneFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: 'II',
-          dataIndex: 'twoFlow',
-          key: 'twoFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: 'III',
-          dataIndex: 'threeFlow',
-          key: 'threeFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: 'IV',
-          dataIndex: 'fourFlow',
-          key: 'fourFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: 'V',
-          dataIndex: 'fiveFlow',
-          key: 'fiveFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: 'VI',
-          dataIndex: 'sixFlow',
-          key: 'sixFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: 'VII',
-          dataIndex: 'sevenFlow',
-          key: 'sevenFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: 'VIII',
-          dataIndex: 'eightFlow',
-          key: 'eightFlow',
-          align: 'center',
-          width: 40,
-        },
-        {
-          title: '合计',
-          dataIndex: 'total',
-          key: 'total',
-          align: 'center',
-          width: 40,
-          customRender({ text, record }) {
-            if (!record.heatNo) {
-              return '';
-            }
-            const allCount = handleTotalSum(record.orgData);
-            return h(
-              Input,
-              { class: 'total-input', size: 'small', bordered: false, value: allCount, onBlur: (e) => handleTotalChange(e, record) },
-              ''
-            );
-          },
-        },
-      ],
-    },
+    // {
+    //   title: '支数(根)',
+    //   align: 'center',
+    //   width: 570,
+    //   children: [
+    //     {
+    //       title: 'I',
+    //       dataIndex: 'oneFlow',
+    //       key: 'oneFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: 'II',
+    //       dataIndex: 'twoFlow',
+    //       key: 'twoFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: 'III',
+    //       dataIndex: 'threeFlow',
+    //       key: 'threeFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: 'IV',
+    //       dataIndex: 'fourFlow',
+    //       key: 'fourFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: 'V',
+    //       dataIndex: 'fiveFlow',
+    //       key: 'fiveFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: 'VI',
+    //       dataIndex: 'sixFlow',
+    //       key: 'sixFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: 'VII',
+    //       dataIndex: 'sevenFlow',
+    //       key: 'sevenFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: 'VIII',
+    //       dataIndex: 'eightFlow',
+    //       key: 'eightFlow',
+    //       align: 'center',
+    //       width: 40,
+    //     },
+    //     {
+    //       title: '合计',
+    //       dataIndex: 'total',
+    //       key: 'total',
+    //       align: 'center',
+    //       width: 40,
+    //       customRender({ text, record }) {
+    //         if (!record.heatNo) {
+    //           return '';
+    //         }
+    //         const allCount = handleTotalSum(record.orgData);
+    //         return h(
+    //           Input,
+    //           { class: 'total-input', size: 'small', bordered: false, value: allCount, onBlur: (e) => handleTotalChange(e, record) },
+    //           ''
+    //         );
+    //       },
+    //     },
+    //   ],
+    // },
     {
       title: () => {
         return h('div', { style: { position: 'relative' } }, [
@@ -355,7 +369,7 @@
                   dataIndex: 'newSize',
                   key: 'newSize',
                   align: 'center',
-                  width: 40,
+                  width: 100,
                   customRender({ text, record }) {
                     if (!record.heatNo) {
                       return '';
@@ -373,7 +387,7 @@
           ),
         ]);
       },
-      width: 40,
+      width: 100,
       align: 'center',
       dataIndex: 'rollOne',
       key: 'rollOne',
@@ -381,6 +395,23 @@
     },
   ];
 
+  const totalColum: TableColumnsType = [
+    {
+      title: '合计',
+      dataIndex: 'total',
+      key: 'total',
+      align: 'center',
+      width: 100,
+      customRender({ text, record }) {
+        if (!record.heatNo) {
+          return '';
+        }
+        const allCount = handleTotalSum(record.orgData);
+        return h(Input, { class: 'total-input', size: 'small', bordered: false, value: allCount, onBlur: (e) => handleTotalChange(e, record) }, '');
+      },
+    },
+  ];
+
   const columns = ref<TableColumnsType>(defaultColumns);
   const dataSource = ref<any[]>([]);
   const shiftInfoTxt = ref(['', '']);
@@ -463,23 +494,24 @@
   // 堆垛统计
   const stackingList = ref<any>([]);
   // 定尺和备注
+  const mainOrgSize = ref('');
   const mainSize = ref('');
+  const mainOrgRemark = ref('');
   const mainRemark = ref('');
   const getHeatList = async (params) => {
     try {
       changeLoading(true);
       const { billetOriginalProductRecordList, content, sizeInfo } = await queryBilletRecordByCcmNo(params);
       let newArr: any[] = [];
-      mainSize.value = sizeInfo;
-      mainRemark.value = content;
+      mainOrgSize.value = sizeInfo || '';
+      mainSize.value = sizeInfo || '';
+      mainRemark.value = content || '';
+      mainOrgRemark.value = content || '';
       if (billetOriginalProductRecordList && Array.isArray(billetOriginalProductRecordList)) {
         // 根据时间排序
         newArr = billetOriginalProductRecordList.sort((a, b) => {
           return dayjs(a.createTime).isBefore(dayjs(b.createTime)) ? -1 : 1;
         });
-
-        let sizeColumn: string | number[] = [];
-        let sizeHeadContent = {};
         // 棒一
         const rollOneColumns: TableColumnsType = [];
         const rollOneSize = {};
@@ -549,7 +581,7 @@
                       dataIndex: 'newSize',
                       key: 'newSize',
                       align: 'center',
-                      width: 40,
+                      width: 100,
                       customRender({ text, record }) {
                         if (!record.heatNo) {
                           return '';
@@ -569,9 +601,44 @@
           },
           dataIndex: 'stackLength',
           key: 'stackLength',
-          width: 40,
+          width: 100,
           children: [],
         };
+
+        const hotChargeColumns: any = {
+          // 棒二字段
+          roll_club_two: {
+            title: '棒二',
+            dataIndex: 'roll_club_two',
+            key: 'roll_club_two',
+            width: 100,
+            children: [],
+          },
+          // 棒三字段
+          roll_club_three: {
+            title: '棒三',
+            dataIndex: 'roll_club_three',
+            key: 'roll_club_three',
+            width: 100,
+            children: [],
+          },
+          // 上若字段
+          roll_out_shipp: {
+            title: '上若',
+            dataIndex: 'roll_out_shipp',
+            key: 'roll_out_shipp',
+            width: 100,
+            children: [],
+          },
+        };
+
+        // 热装字段
+        let columnsHotCharge: any = {
+          roll_club_two: [],
+          roll_club_three: [],
+          roll_out_shipp: [],
+        };
+
         dataSource.value = dataSource.value.map((item, index) => {
           if (!newArr[index]) return item;
           const { hotChargeLength, rollClubOneDetails, stackLength } = newArr[index];
@@ -631,7 +698,7 @@
                     dataIndex: columnKey,
                     key: columnKey,
                     align: 'center',
-                    width: 40,
+                    width: 100,
                     customRender({ text, record }) {
                       if (!record.heatNo) {
                         return '';
@@ -662,28 +729,20 @@
             }
           }
 
-          // 定尺
+          // 热装
           let sizeArr = {};
           if (hotChargeLength) {
-            // "[{\"hotChargeLength\":\"11820\",\"hotChargeDestination\":\"roll_club_three\",\"totalWeight\":\"5.3545\",\"totalCount\":2}]"
+            // "[{\"hotChargeLength\":\"11820\",\"hotChargeDestination\":\"roll_club_three\",\"totalWeight\":\"74.9624\",\"hotChargeBtype\":\"0\",\"totalCount\":28}]"
             const hotChargeArr = JSON.parse(hotChargeLength);
             hotChargeArr.forEach((k) => {
               const sizeFormat = Number(k.hotChargeLength) / 1000;
-              if (!sizeArr[sizeFormat + 'Arr']) {
-                sizeArr[sizeFormat + 'Arr'] = {};
-              }
-              sizeColumn.push(sizeFormat);
-
-              // 判断是否有该字段,列头显示
-              if (!sizeHeadContent[sizeFormat]) {
-                sizeHeadContent[sizeFormat] = [];
-              }
-
+              const dataKey = sizeFormat + k.hotChargeDestination + k.hotChargeBtype;
+              sizeArr[dataKey] = k.totalCount;
               // 热送统计
               // 棒二
               if (k.hotChargeDestination === 'roll_club_two' && k.totalCount > 0) {
-                sizeArr[sizeFormat + 'Arr'].rollClubTwoCount = k.totalCount;
-                sizeHeadContent[sizeFormat].push('rollClubTwoCount');
+                // 添加定尺
+                columnsHotCharge.roll_club_two.push(sizeFormat);
 
                 if (!rollTwoSize[k.hotChargeLength]) {
                   rollTwoSize[k.hotChargeLength] = {
@@ -698,8 +757,8 @@
               }
               // 棒三
               if (k.hotChargeDestination === 'roll_club_three' && k.totalCount > 0) {
-                sizeArr[sizeFormat + 'Arr'].rollClubThreeCount = k.totalCount;
-                sizeHeadContent[sizeFormat].push('rollClubThreeCount');
+                // 添加定尺
+                columnsHotCharge.roll_club_three.push(sizeFormat);
 
                 if (!rollThreeSize[k.hotChargeLength]) {
                   rollThreeSize[k.hotChargeLength] = {
@@ -714,8 +773,8 @@
               }
               // 上若
               if (k.hotChargeDestination === 'roll_out_shipp' && k.totalCount > 0) {
-                sizeArr[sizeFormat + 'Arr'].rollClubShippCount = k.totalCount;
-                sizeHeadContent[sizeFormat].push('rollClubShippCount');
+                // 添加定尺
+                columnsHotCharge.roll_out_shipp.push(sizeFormat);
 
                 if (!rollShippSize[k.hotChargeLength]) {
                   rollShippSize[k.hotChargeLength] = {
@@ -771,7 +830,7 @@
                   },
                   dataIndex: sSize + 'stackLength',
                   key: sSize + 'stackLength',
-                  width: 40,
+                  width: 100,
                   customRender({ text, record }) {
                     if (!record.heatNo) {
                       return '';
@@ -822,59 +881,57 @@
           };
         });
 
-        const otherColumn: TableColumnsType = [...new Set(sizeColumn)].map((item) => {
-          return {
-            title: () => {
-              const subHead = Object.keys(headText)
-                .filter((key) => sizeHeadContent[item].includes(key))
-                .map((key) => headText[key]);
-
-              return h('div', {}, [h('div', { style: { fontSize: '12px' } }, subHead.join(' / ')), h('div', {}, item)]);
-            },
-            dataIndex: item,
-            key: item,
-            align: 'center',
-            width: 50,
-            customRender: ({ text, record }) => {
-              if (record[item + 'Arr']) {
-                const subHead = Object.keys(headText)
-                  .filter((key) => sizeHeadContent[item].includes(key))
-                  .map((key) => record[item + 'Arr'][key] || '~');
-                return h(
-                  'div',
-                  {
-                    class: 'size-st-num',
-                    onClick: () => {
-                      if (subHead.length === 0) return;
-                      const { orgData } = record;
-                      if (!orgData || !orgData.hotChargeLength) return;
-
-                      const { hotChargeLength } = orgData;
-                      editSizeNumRecord.value = {
-                        ...orgData,
-                        hotChargeLengthArr: JSON.parse(hotChargeLength),
-                      };
-                      openSetSizeNumModal.value = true;
+        let otherColumnsNums = 0;
+        const otherColumns = Object.keys(columnsHotCharge)
+          .filter((item) => columnsHotCharge[item].length)
+          .map((item) => {
+            const childSizesColumn = [...new Set(columnsHotCharge[item])].map((childItem) => {
+              return {
+                title: childItem,
+                dataIndex: `${item}.${childItem}`,
+                key: `${item}.${childItem}`,
+                width: 100,
+                align: 'center',
+                customRender: ({ record }) => {
+                  const hotKey = childItem + item + '0';
+                  const coldKey = childItem + item + '1';
+                  if (!record[hotKey] && !record[coldKey]) return '';
+                  const sizeArr = [h('div', { class: 'line' }, ''), h('div', { class: 'size-st-item' }, record[hotKey] || '~')];
+
+                  sizeArr.push(h('div', { class: ' size-st-num' }, record[coldKey] || '~'));
+                  return h(
+                    'div',
+                    {
+                      class: 'size-st-wrapper',
+                      onClick: () => {
+                        if (!record[hotKey] && !record[coldKey]) return;
+
+                        const { orgData } = record;
+                        if (!orgData || !orgData.hotChargeLength) return;
+                        const { hotChargeLength } = orgData;
+                        editSizeNumRecord.value = {
+                          ...orgData,
+                          hotChargeLengthArr: JSON.parse(hotChargeLength),
+                        };
+                        openSetSizeNumModal.value = true;
+                      },
                     },
-                  },
-                  subHead.join('/')
-                );
-              }
-              return '';
-            },
-          };
-        });
-
-        // 添加空白列
-        otherColumn.push(stackLengthColumn);
-        columns.value = [...defaultColumns, ...otherColumn];
-        (columns.value[4] as any).children = rollOneColumns.length ? rollOneColumns : [];
-        // if (rollOneColumns.length) {
-        //   columns.value[4].children = rollOneColumns;
-        // } else {
-        //   columns.value[4].children = [];
-        // }
-        const allSpan = 12 + rollOneColumns.length + otherColumn.length + stackLengthColumn.children.length;
+                    sizeArr
+                  );
+                },
+              };
+            });
+            otherColumnsNums += childSizesColumn.length;
+            return {
+              ...hotChargeColumns[item],
+              children: childSizesColumn,
+            };
+          });
+
+        columns.value = [...defaultColumns, ...otherColumns, ...[stackLengthColumn], ...totalColum];
+        const rollOneIndex = defaultColumns.findIndex((ele: any) => ele.dataIndex === 'rollOne');
+        (columns.value[rollOneIndex] as any).children = rollOneColumns.length ? rollOneColumns : [];
+        const allSpan = 4 + rollOneColumns.length + otherColumnsNums + stackLengthColumn.children.length;
         remakeColSpan.value = Math.ceil(allSpan / 3);
         const nnColSpan = Math.ceil((allSpan - remakeColSpan.value) / 2);
         const newNNColSpan = nnColSpan % 2 === 0 ? nnColSpan : nnColSpan + 1;
@@ -1335,6 +1392,74 @@
     }
   };
 
+  // 确定修改定尺
+  const handleSizeBlur = throttle((e) => {
+    if (mainOrgSize.value.trim() === e.target.value.trim()) return;
+    handleEditShiftInfo({
+      id: fetchChangeShiftId.value,
+      sizeInfo: e.target.value,
+    });
+  }, 500);
+
+  // 修改备注
+  const handleRemarkBlur = throttle((e) => {
+    if (mainOrgRemark.value.trim() === e.target.value.trim()) return;
+    handleEditShiftInfo({
+      id: fetchChangeShiftId.value,
+      content: e.target.value,
+    });
+  }, 500);
+
+  // 编辑定尺和备注
+  const handleEditShiftInfo = async (params) => {
+    try {
+      changeLoading(true);
+      await editOriginalProductRecord(params);
+
+      await getHeatList({
+        ccmNo: hostNumber.value,
+        queryType: fetchQueryType.value,
+        changeShiftId: fetchChangeShiftId.value,
+      });
+      changeLoading(false);
+    } catch (e) {
+      console.log(e);
+      changeLoading(false);
+    }
+  };
+
+  // 添加炉次
+  const newHeatNo = ref('');
+  const openNewHeatNo = ref(false);
+  const addHeatNo = () => {
+    newHeatNo.value = '';
+    openNewHeatNo.value = true;
+  };
+  const confirmAddHeatNo = async () => {
+    try {
+      if (!newHeatNo.value) {
+        createMessage.error('请输入炉次号');
+        return;
+      }
+
+      changeLoading(true);
+      await addBilletNo({
+        ccmNo: hostNumber.value,
+        heatNo: newHeatNo.value,
+      });
+
+      await getHeatList({
+        ccmNo: hostNumber.value,
+        queryType: fetchQueryType.value,
+        changeShiftId: fetchChangeShiftId.value,
+      });
+      changeLoading(false);
+    } catch (e) {
+      console.log(e);
+      changeLoading(false);
+    }
+  };
+
   function onPrint() {
     changeOkLoading(true);
     printJS({
@@ -1456,6 +1581,8 @@
             left: 1px;
             right: 1px;
             bottom: 1px;
+            font-weight: 600;
+            cursor: pointer;
 
             .line {
               content: '';
@@ -1480,12 +1607,15 @@
               position: absolute;
               top: -4px;
               left: 2px;
-              color: #108ee9;
+              color: #f50;
             }
           }
           .size-st-num {
-            color: #f50;
+            color: #108ee9;
             cursor: pointer;
+            position: absolute;
+            right: 1px;
+            bottom: -4px;
           }
 
           // 自定义啊

+ 4 - 1
src/views/billet/operator/index.vue

@@ -13,7 +13,9 @@
             type="primary"
             style="margin-right: 20px"
             size="large"
-            @click="() => openPrintOriginalRecordsModal(true, { ccmNo, queryType: '1', shiftText, curShiftInfo })"
+            @click="
+              () => openPrintOriginalRecordsModal(true, { ccmNo, queryType: '1', shiftText, curShiftInfo, changeShiftId: curShiftInfo.changeShiftId })
+            "
           >
             原始记录
           </a-button>
@@ -111,6 +113,7 @@
   const curShiftInfo = ref({
     shift: undefined,
     shiftGroup: undefined,
+    changeShiftId: undefined,
   });
   // 时钟
   const clockObj = ref({

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

@@ -34,6 +34,10 @@ enum Api {
   billetRecordEdit = '/billet/billetOriginalProductRecord/edit',
   // 送样卡
   sampleCardDelivery = '/billet/billetOriginalProductRecord/lengthDetailsTable',
+  // 添加炉号
+  addHeatNo = '/billet/billetOriginalProductRecord/add',
+  // 编辑原始数据定尺和备注
+  editOriginalProductRecord = '/billetHotsend/billetHotsendChangeShift/editOriginalProductRecord',
 }
 
 // 炉次信息
@@ -118,3 +122,13 @@ export const editBilletRecord = (params: any) => {
 export const querySampleCard = (params: any) => {
   return defHttp.get({ url: Api.sampleCardDelivery, params });
 };
+
+// 添加炉号
+export const addBilletNo = (params: any) => {
+  return defHttp.post({ url: Api.addHeatNo, params });
+};
+
+// 编辑原始数据定尺和备注
+export const editOriginalProductRecord = (params: any) => {
+  return defHttp.post({ url: Api.editOriginalProductRecord, params });
+};