Selaa lähdekoodia

增加打印钢坯送样卡;
交班选择班组;
推钢室页面可以补录棒一;

zhangafei 3 päivää sitten
vanhempi
sitoutus
bfe2cee8bc

+ 28 - 28
src/views/billet/hotDelivery/common.data.ts

@@ -98,20 +98,6 @@ export const configAll5 = [
     remark: null,
     belongTable: 'stacking_and_loading_vehicles',
   },
-  {
-    id: '17',
-    createBy: 'admin',
-    createTime: '2025-06-05 08:56:03',
-    updateBy: null,
-    updateTime: null,
-    sysOrgCode: null,
-    castMachine: '5',
-    typeName: '付跨',
-    belongType: 0,
-    isTrucking: 1,
-    remark: null,
-    belongTable: 'roll_deputy_cross',
-  },
   {
     id: '2',
     createBy: 'admin',
@@ -154,6 +140,20 @@ export const configAll5 = [
     remark: null,
     belongTable: 'roll_out_shipp',
   },
+  {
+    id: '17',
+    createBy: 'admin',
+    createTime: '2025-06-05 08:56:03',
+    updateBy: null,
+    updateTime: null,
+    sysOrgCode: null,
+    castMachine: '5',
+    typeName: '付跨',
+    belongType: 0,
+    isTrucking: 1,
+    remark: null,
+    belongTable: 'roll_deputy_cross',
+  },
 ];
 // 六号机所有目的地、堆垛配置信息
 export const configAll6 = [
@@ -213,20 +213,6 @@ export const configAll6 = [
     remark: null,
     belongTable: 'roll_out_shipp',
   },
-  {
-    id: '18',
-    createBy: 'admin',
-    createTime: '2025-06-05 08:56:03',
-    updateBy: null,
-    updateTime: null,
-    sysOrgCode: null,
-    castMachine: '6',
-    typeName: '付跨',
-    belongType: 0,
-    isTrucking: 1,
-    remark: null,
-    belongTable: 'roll_deputy_cross',
-  },
   {
     id: '6',
     createBy: 'admin',
@@ -283,6 +269,20 @@ export const configAll6 = [
     remark: null,
     belongTable: 'stacking_and_loading_vehicles',
   },
+  {
+    id: '18',
+    createBy: 'admin',
+    createTime: '2025-06-05 08:56:03',
+    updateBy: null,
+    updateTime: null,
+    sysOrgCode: null,
+    castMachine: '6',
+    typeName: '付跨',
+    belongType: 0,
+    isTrucking: 1,
+    remark: null,
+    belongTable: 'roll_deputy_cross',
+  },
 ];
 
 // 根据铸机号获取配置信息

+ 3 - 3
src/views/billet/operator/components/headTop.vue

@@ -61,7 +61,7 @@
 <script setup lang="ts">
   import { ref, onMounted, onUnmounted } from 'vue';
   import AStatistic from 'ant-design-vue/lib/statistic/Statistic';
-  import { getOnDutyInfo, getTeamShift, getSteelPileBaseInfo, groupBy } from '../../Dashboard/dashboard.api';
+  import { getOnDutyInfo, getSteelPileBaseInfo, groupBy } from '../../Dashboard/dashboard.api';
   import { useTimeoutFn } from '/@/hooks/core/useTimeout';
   import { switchSteel, returnFurnaceChange } from '../operator.api';
   import { useMessage } from '/@/hooks/web/useMessage';
@@ -75,7 +75,7 @@
   // 注册打印modal
   const [registerChangeHeatModal, { openModal: openChangeHeatModal }] = useModal();
 
-  const emits = defineEmits(['shiftChange', 'lengthChange']);
+  const emits = defineEmits(['onShiftChange', 'lengthChange']);
 
   const props = defineProps({
     ccmNo: {
@@ -112,7 +112,7 @@
 
   // 获取班组班别
   const getShiftInfo = () => {
-    emits('shiftChange', getTeamShift(info.value.billetHotsendChangeShift.shift, info.value.billetHotsendChangeShift.shiftGroup), {
+    emits('onShiftChange', {
       shift: info.value.billetHotsendChangeShift.shift,
       shiftGroup: info.value.billetHotsendChangeShift.shiftGroup,
     });

+ 39 - 5
src/views/billet/operator/components/heatList.vue

@@ -20,9 +20,8 @@
           <a-button type="primary" danger style="font-size: 16px" @click="handlerChangeLength"> 变更定尺 </a-button>
         </div>
         <div style="margin-right: 6px">
-          <a-select style="width: 120px" @change="changeShortLength">
-            <a-select-option value="短尺">短尺</a-select-option>
-          </a-select>
+          <span style="font-size: 16px; color: #f50">短尺:</span>
+          <a-select style="width: 120px" :options="shortSizeOptions" @change="changeShortLength" />
         </div>
         <div style="margin-right: 6px">
           <a-button
@@ -107,6 +106,12 @@
             />
           </div>
         </div>
+        <div class="strand-item" v-else style="margin: 20px 0">
+          <a-radio-group v-model:value="isRollOne">
+            <a-radio-button value="default">默认</a-radio-button>
+            <a-radio-button value="rollOne">棒一</a-radio-button>
+          </a-radio-group>
+        </div>
         <div v-for="(item, index) in Object.keys(strandFormInfo)" class="flex justify-between items-center strand-item" style="margin: 20px 0">
           <div class="strand-num">{{ strandFormInfo[item].no }}流</div>
           <div class="flex items-center" style="position: relative; width: 120px">
@@ -121,6 +126,7 @@
               :placeholder="`${strandFormInfo[item].no}流定尺`"
               allowClear
               :status="strandFormInfo[item].sizeStatus"
+              :disabled="isRollOne === 'rollOne' ? (strandFormInfo[item].hasOne ? false : true) : false"
               @change="handlerChange($event, 'sizeStatus', item)"
             />
           </div>
@@ -130,6 +136,7 @@
               :status="strandFormInfo[item].sumStatus"
               @change="handlerChange($event, 'sumStatus', item)"
               v-model:value="strandFormInfo[item].sum"
+              :disabled="isRollOne === 'rollOne' ? (strandFormInfo[item].hasOne ? false : true) : false"
               :min="0"
               :max="10"
             />
@@ -161,6 +168,7 @@
     addBilletBasic,
     addHeatBillet,
     queryChangeShortLength,
+    addRollOneBilletBasic,
   } from '../operator.api';
   import { h, onMounted, onUnmounted, ref, watch } from 'vue';
   import { mapTableTotalSummary } from '/@/utils/common/compUtils';
@@ -168,6 +176,7 @@
   import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
   import { useModal } from '/@/components/Modal';
   import rollLinePrint from './rollLinePrint.vue';
+  import { getDictItems } from '/@/utils/dict/JDictSelectUtil';
 
   // 注册打印modal
   const [registerPrintModal, { openModal: openPrintModal }] = useModal();
@@ -227,6 +236,7 @@
   const strandNum = ref<number>(); // 流号
   const orgSizeNum = ref<number>(); // 原定尺
   const isAllHeat = ref<boolean>(false); // 是否是整炉添加
+  const isRollOne = ref<string>('default'); // 是否是去棒一,不是整炉添加时有效
   const columns = getColumns({
     clickCb: ({ record, size, strandNo }) => {
       newSizeNum.value = size;
@@ -309,6 +319,7 @@
         heatInfo.value = record;
         isAllHeat.value = false;
       }
+      isRollOne.value = 'default';
     },
   });
 
@@ -406,6 +417,19 @@
         });
       }
 
+      // 如果是补录棒一,就把数据放到补录棒一的列表中
+      if (isRollOne.value === 'rollOne') {
+        rollClubOneListParams = Object.keys(strandFormInfo.value)
+          .filter((item) => strandFormInfo.value[item].sum)
+          .map((item: any) => {
+            return {
+              strandNo: strandFormInfo.value[item].no,
+              addSum: Number(strandFormInfo.value[item].sum),
+              length: Number(strandFormInfo.value[item].size),
+            };
+          });
+      }
+
       okLoading.value = true;
       let params = {
         ccmNo: props.ccmNo,
@@ -427,7 +451,7 @@
         }
       });
 
-      const fetchFn = isAllHeat.value ? addHeatBillet : addBilletBasic;
+      const fetchFn = isAllHeat.value ? addHeatBillet : isRollOne.value === 'rollOne' ? addRollOneBilletBasic : addBilletBasic;
       await fetchFn(params);
       reload();
       closeCompensateModal();
@@ -462,6 +486,14 @@
     }
   };
 
+  // 获取短尺
+  const shortSizeOptions = ref([]);
+  const getShortRuler = async () => {
+    getDictItems('lg_dcgg', {}).then((res) => {
+      shortSizeOptions.value = res.filter((item) => Number(item.value) < 10000);
+    });
+  };
+
   //注册table数据
   const { tableContext } = useListPage({
     tableProps: {
@@ -636,6 +668,8 @@
 
   onMounted(() => {
     start();
+    // 获取短尺
+    getShortRuler();
   });
 
   onUnmounted(() => {
@@ -810,7 +844,7 @@
       onOk: () => {
         return queryChangeShortLength({
           ccmNo: props.ccmNo,
-          length: '短尺',
+          length: v,
         });
       },
     });

+ 324 - 0
src/views/billet/operator/components/printBilletSampleCard.vue

@@ -0,0 +1,324 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose title="打印钢坯送样卡" :width="800" :height="930" ok-text="打印" @ok="onPrint">
+    <section
+      ref="print"
+      style="padding: 10px 10px 0; position: relative; border: 1px solid #c5c5c5; background: #fff; width: 98%"
+      id="printBilletSampleCard"
+    >
+      <div class="ticket next-ticket">
+        <div style="text-align: center">
+          <p style="font-size: 24px; font-weight: 800; display: inline-block; border-bottom: 2px solid #000; margin-bottom: 16px; line-height: 30px">
+            钢 坯 送 样 卡
+          </p>
+        </div>
+        <div class="flex ccmno-info" style="line-height: 24px">
+          <div class="flex-1">
+            <span class="ccmno">{{ hostNumber }}</span>
+            号连铸机
+          </div>
+          <div class="flex-1" style="text-align: center; font-size: 13px">
+            {{ dayjs().format('YYYY 年 MM 月 DD 日') }}&nbsp;&nbsp; {{ shiftInfoTxt }}
+          </div>
+          <div class="flex-1" style="text-align: right; font-size: 12px"> zj / R177 </div>
+        </div>
+        <a-descriptions style="margin-top: 6px; margin-bottom: 4px" bordered :column="6" size="small">
+          <a-descriptions-item label="序号" :labelStyle="labelStyle" :contentStyle="contentStyle">炉号</a-descriptions-item>
+          <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+            <div class="size-items-title">
+              定尺&nbsp;&nbsp;&nbsp;&nbsp;
+              <span class="s-txt">{{ sizeArrs[0] ? '170' : '' }}</span>
+            </div>
+            <div class="size-num-title">
+              支数 <span class="s-txt">{{ sizeArrs[0] ? Number(sizeArrs[0]) / 1000 + 'm' : '' }}</span>
+            </div>
+          </a-descriptions-item>
+          <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+            <div class="size-items-title">
+              定尺&nbsp;&nbsp;&nbsp;&nbsp;
+              <span class="s-txt">{{ sizeArrs[1] ? '170' : '' }}</span>
+            </div>
+            <div class="size-num-title">
+              支数 <span class="s-txt">{{ sizeArrs[1] ? Number(sizeArrs[1]) / 1000 + 'm' : '' }}</span>
+            </div>
+          </a-descriptions-item>
+          <a-descriptions-item label="序号" :labelStyle="labelStyle" :contentStyle="contentStyle">
+            炉号
+            <div class="two-num-wrapper">
+              <span class="s-txt">{{ sizeArrs[2] ? '170' : '' }}</span>
+              <span class="s-txt">{{ sizeArrs[2] ? Number(sizeArrs[2]) / 1000 + 'm' : '' }}</span>
+            </div>
+          </a-descriptions-item>
+          <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+            <div class="size-items-title">
+              定尺&nbsp;&nbsp;&nbsp;&nbsp;
+              <span class="s-txt">{{ sizeArrs[3] ? '170' : '' }}</span>
+            </div>
+            <div class="size-num-title">
+              支数 <span class="s-txt">{{ sizeArrs[3] ? Number(sizeArrs[3]) / 1000 + 'm' : '' }}</span>
+            </div>
+          </a-descriptions-item>
+          <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+            <div class="size-items-title">
+              定尺&nbsp;&nbsp;&nbsp;&nbsp;
+              <span class="s-txt">
+                {{ sizeArrs[4] ? '170' : '' }}
+              </span>
+            </div>
+            <div class="size-num-title">
+              支数 <span class="s-txt">{{ sizeArrs[4] ? Number(sizeArrs[4]) / 1000 + 'm' : '' }}</span>
+            </div>
+          </a-descriptions-item>
+
+          <template v-for="i in 20">
+            <!-- 第一组 -->
+            <a-descriptions-item :label="i - 1" :labelStyle="labelStyle" :contentStyle="contentStyle">{{
+              heatList[i - 1] ? heatList[i - 1].heatNo : ''
+            }}</a-descriptions-item>
+            <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+              <div class="size-items-content">{{
+                heatList[i - 1] && heatList[i - 1].sizeInfo && heatList[i - 1].sizeInfo[sizeArrs[0]]
+                  ? heatList[i - 1].sizeInfo[sizeArrs[0]].lengthTotalCount
+                  : ''
+              }}</div>
+            </a-descriptions-item>
+            <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+              <div class="size-items-content">{{
+                heatList[i - 1] && heatList[i - 1].sizeInfo && heatList[i - 1].sizeInfo[sizeArrs[1]]
+                  ? heatList[i - 1].sizeInfo[sizeArrs[1]].lengthTotalCount
+                  : ''
+              }}</div>
+            </a-descriptions-item>
+
+            <!-- 第二组 -->
+            <a-descriptions-item :label="19 + i" :labelStyle="labelStyle" :contentStyle="contentStyle">
+              {{
+                heatList[i - 1] && heatList[i - 1].sizeInfo && heatList[i - 1].sizeInfo[sizeArrs[2]]
+                  ? heatList[i - 1].sizeInfo[sizeArrs[2]].lengthTotalCount
+                  : ''
+              }}
+            </a-descriptions-item>
+            <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+              <div class="size-items-content">{{
+                heatList[i - 1] && heatList[i - 1].sizeInfo && heatList[i - 1].sizeInfo[sizeArrs[3]]
+                  ? heatList[i - 1].sizeInfo[sizeArrs[3]].lengthTotalCount
+                  : ''
+              }}</div>
+            </a-descriptions-item>
+            <a-descriptions-item :labelStyle="sizeLabelStyle" :contentStyle="sizeContentStyle">
+              <div class="size-items-content">{{
+                heatList[i - 1] && heatList[i - 1].sizeInfo && heatList[i - 1].sizeInfo[sizeArrs[4]]
+                  ? heatList[i - 1].sizeInfo[sizeArrs[4]].lengthTotalCount
+                  : ''
+              }}</div>
+            </a-descriptions-item>
+          </template>
+        </a-descriptions>
+        <a-descriptions style="padding: 0" size="small" :column="6">
+          <a-descriptions-item label="备注" :span="1">
+            <div class="size-items-remark flex">
+              <div class="size-remark-item" v-for="(ele, size) in sizeObjs">
+                <span class="size-remark-size">{{ Number(size) / 1000 }} m:</span>
+                <span class="size-remark-num">{{ ele.num }}</span>
+                <span>{{ ele.weight.toFixed(3) }}t</span>
+              </div>
+            </div>
+          </a-descriptions-item>
+        </a-descriptions>
+      </div>
+    </section>
+  </BasicModal>
+</template>
+
+<script lang="ts" setup>
+  import { ref } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import dayjs from 'dayjs';
+  import { printJS } from '/@/hooks/web/usePrintJS';
+  import { queryHeatsActualsByCcmNo } from '../operator.api';
+
+  // 主机号
+  const hostNumber = ref('5');
+  const shiftInfoTxt = ref('');
+  // label 样式
+  const labelStyle = {
+    width: '60px',
+    textAlign: 'center',
+    padding: '0',
+    background: '#fff',
+    border: '1px solid #bfbfbf',
+  };
+  const sizeLabelStyle = {
+    padding: '0',
+    border: '1px solid #bfbfbf',
+    display: 'none',
+  };
+  // content 样式
+  const contentStyle = {
+    width: '120px',
+    textAlign: 'center',
+    padding: '0',
+    color: '#000',
+    border: '1px solid #bfbfbf',
+    position: 'relative',
+  };
+  const sizeContentStyle = {
+    padding: '0',
+    color: '#000',
+    border: '1px solid #bfbfbf',
+  };
+
+  //表单赋值
+  const [registerModal, { changeOkLoading }] = useModalInner(async (data) => {
+    const { ccmNo, shiftText, queryType } = data;
+    hostNumber.value = ccmNo;
+    shiftInfoTxt.value = shiftText.replace('-', '/');
+
+    getHeatList({
+      ccmNo,
+      queryType,
+    });
+  });
+
+  // 获取当前班次所有的炉次信息
+  const sizeArrs = ref<string[]>([]);
+  const heatList = ref<any[]>([]);
+  const sizeObjs = ref<any>({});
+  const getHeatList = async (params) => {
+    try {
+      let sizeList: string[] = [];
+      let sizeObj: any = {};
+      const res = await queryHeatsActualsByCcmNo(params);
+      if (res && Array.isArray(res)) {
+        res.forEach((item) => {
+          const lengthObj: Record<string, any> = JSON.parse(item.length);
+          const sizeArr: string[] = Object.keys(lengthObj);
+          sizeList = sizeList.concat(sizeArr);
+
+          item.sizeInfo = lengthObj;
+
+          sizeArr.forEach((size) => {
+            if (!sizeObj[size]) {
+              sizeObj[size] = {
+                num: lengthObj[size].lengthTotalCount,
+                weight: lengthObj[size].lengthTotalWeight,
+              };
+            } else {
+              sizeObj[size].num += lengthObj[size].lengthTotalCount;
+              sizeObj[size].weight += lengthObj[size].lengthTotalWeight;
+            }
+          });
+        });
+
+        sizeList = [...new Set(sizeList)];
+        console.log('111111111111111111', sizeObj);
+        sizeArrs.value = sizeList;
+        heatList.value = res;
+        sizeObjs.value = sizeObj;
+      }
+    } catch (error) {
+      console.log(error);
+    }
+  };
+
+  function onPrint() {
+    changeOkLoading(true);
+    printJS({
+      printable: '#printBilletSampleCard',
+      type: 'html',
+    });
+    setTimeout(() => {
+      changeOkLoading(false);
+    }, 1000);
+  }
+</script>
+<style scoped lang="less">
+  .ticket {
+    .ccmno-info {
+      font-family: 'Kingsoft_Cloud_Font';
+    }
+    .ccmno {
+      display: inline-block;
+      width: 60px;
+      border-bottom: 1px solid black;
+      text-align: center;
+    }
+
+    .size-items-title {
+      font-size: 12px;
+      line-height: 32px;
+      border-bottom: 1px solid #bfbfbf;
+      padding-left: 10px;
+      min-width: 100px;
+    }
+
+    .size-num-title {
+      font-size: 12px;
+      line-height: 32px;
+      padding-left: 10px;
+    }
+
+    .size-items-content {
+      height: 32px;
+      text-align: center;
+      line-height: 32px;
+    }
+
+    .size-items-remark {
+      width: 100%;
+      min-height: 90px;
+      flex-wrap: wrap;
+      font-family: 'Kingsoft_Cloud_Font';
+      align-content: flex-start;
+
+      .size-remark-item {
+        width: 50%;
+        height: 30px;
+        color: #000;
+      }
+
+      .size-remark-size {
+        display: inline-block;
+        width: 80px;
+      }
+
+      .size-remark-num {
+        display: inline-block;
+        width: 80px;
+        padding: 0 40px 0 0;
+        font-size: 12px;
+      }
+    }
+
+    .two-num-wrapper {
+      position: absolute;
+      left: 0;
+      top: 0;
+      width: 100%;
+      height: 100%;
+      z-index: 10;
+      display: flex;
+      flex-direction: column;
+      justify-content: center;
+      align-items: flex-end;
+      padding-right: 20px;
+    }
+
+    .s-txt {
+      font-family: 'Kingsoft_Cloud_Font';
+    }
+  }
+</style>
+<style lang="less">
+  @media print {
+    header,
+    footer,
+    .noprint {
+      display: none;
+    }
+
+    @page :first {
+      margin-top: 10px; /* 第一页的页眉距离顶部为0 */
+      margin-bottom: 0; /* 第一页的页脚距离底部为0 */
+    }
+  }
+</style>

+ 5 - 0
src/views/billet/operator/index.less

@@ -41,10 +41,15 @@
       }
     }
 
+    .print-billet-card {
+      margin-right: 30px;
+    }
+
     .clock-wrapper {
       display: flex;
       align-items: center;
       font-family: 'Kingsoft_Cloud_Font';
+      width: 240px;
       font-weight: 400;
       color: #ffffff;
       font-size: 14px;

+ 54 - 6
src/views/billet/operator/index.vue

@@ -8,9 +8,12 @@
   >
     <a-layout class="operator-large-layout">
       <a-layout-header class="operator-header cover">
+        <div class="change-shift print-billet-card">
+          <a-button type="primary" size="large" @click="() => openModal(true, { ccmNo, queryType: '1', shiftText })"> 打印钢坯送样卡 </a-button>
+        </div>
         <div class="shift-wrapper"> {{ shiftText }} </div>
         <div class="change-shift">
-          <a-button type="primary" size="large" danger @click="() => confirmChangeShift()"> 交班 </a-button>
+          <a-button type="primary" size="large" danger @click="() => (openJiaobanModal = true)"> 交班 </a-button>
         </div>
         <div class="clock-wrapper">
           <div class="date">{{ clockObj.date }}</div>
@@ -19,7 +22,7 @@
         </div>
       </a-layout-header>
       <a-layout-content class="operator-content">
-        <head-top @shiftChange="curShiftChange" ref="headTopRef" @lengthChange="(v) => (lengthList = v)" />
+        <head-top @onShiftChange="curShiftChange" ref="headTopRef" @lengthChange="(v) => (lengthList = v)" />
         <div class="operator-content-wrapper flex">
           <div class="operator-content-left">
             <heat-list
@@ -38,6 +41,31 @@
         </div>
       </a-layout-content>
     </a-layout>
+
+    <!-- 打印钢坯送样卡 -->
+    <print-billet-sample-card @register="registerPrintModal" />
+    <!-- 交班 -->
+    <a-modal
+      v-model:open="openJiaobanModal"
+      title="切换牌号"
+      centered
+      width="400px"
+      ok-text="确认"
+      :okButtonProps="{ loading: okLoading }"
+      cancel-text="取消"
+      @ok="confirmChangeShift"
+      @cancel="
+        () => {
+          openJiaobanModal = false;
+          newShiftGroup = '';
+        }
+      "
+    >
+      <div class="flex justify-center items-center" style="margin: 20px 0">
+        <div>选择班组:</div>
+        <JSearchSelect type="list" style="width: 277px" v-model:value="newShiftGroup" dict="lg_bz" placeholder="请选择" allowClear />
+      </div>
+    </a-modal>
   </div>
 </template>
 <script setup lang="ts" name="OperatorRoom">
@@ -47,11 +75,17 @@
   import headTop from './components/headTop.vue';
   import car from './components/car.vue';
   import heatList from './components/heatList.vue';
-  import { getMachineNum } from '../hotDelivery/common.data';
+  import { getMachineNum, getMachineDict } from '../hotDelivery/common.data';
   import { changeShift } from '../hotDelivery/hotDelivery.api';
   import { useMessage } from '/@/hooks/web/useMessage';
+  import { useModal } from '/@/components/Modal';
+  import printBilletSampleCard from './components/printBilletSampleCard.vue';
+  import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
 
-  const { createConfirm } = useMessage();
+  const { createConfirm, createMessage } = useMessage();
+
+  // 注册打印送样卡modal
+  const [registerPrintModal, { openModal }] = useModal();
 
   const ccmNo = getMachineNum();
 
@@ -89,13 +123,24 @@
   const { start, stop } = useTimeoutFn(clock, 1000);
 
   // 获取班次信息
-  const curShiftChange = (v, shiftInfo) => {
-    shiftText.value = v;
+  const curShiftChange = (shiftInfo) => {
+    if (shiftInfo) {
+      const { shift, shiftGroup } = shiftInfo;
+      shiftText.value = `${getMachineDict(shift, 'lg_bb')} - ${getMachineDict(shiftGroup, 'lg_bz')}`;
+    }
     curShiftInfo.value = shiftInfo;
   };
 
   // 交班
+  const newShiftGroup = ref('');
+  const openJiaobanModal = ref(false);
+  const okLoading = ref(false);
   const confirmChangeShift = () => {
+    if (!newShiftGroup.value) {
+      createMessage.error('请选择班组');
+      return;
+    }
+
     createConfirm({
       iconType: 'warning',
       title: '交班确认',
@@ -103,10 +148,13 @@
       onOk: () => {
         return changeShift({
           ccmNo,
+          shiftGroup: newShiftGroup.value,
         }).then(() => {
           headTopRef && headTopRef.value.reload();
           carRef && carRef.value.refreshCarList();
           heatListRef && heatListRef.value.reload();
+          
+          openJiaobanModal.value = false;
         });
       },
     });

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

@@ -23,6 +23,8 @@ enum Api {
   addHeatBillet = '/billetHotsendBase/billetHotsendBase/addBilletBasic',
   // 变更短尺
   pushCcmNoSize = '/billetHotsendBase/billetHotsendBase/pushCcmNoSize',
+  // 补录棒一的钢坯
+  addRollOneBilletBasic = '/rollClubOneDetails/addBilletBasic',
 }
 
 // 炉次信息
@@ -79,3 +81,8 @@ export const addHeatBillet = (params: any) => {
 export const queryChangeShortLength = (params: any) => {
   return defHttp.post({ url: Api.pushCcmNoSize, params });
 };
+
+// 补录棒一钢坯
+export const addRollOneBilletBasic = (params: any) => {
+  return defHttp.post({ url: Api.addRollOneBilletBasic, params });
+};