Browse Source

增加修改定尺

zhangafei 3 weeks ago
parent
commit
06f7bb0e23

+ 2 - 2
.env.development

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

+ 106 - 0
src/views/billet/ShiftPerformance/components/history.vue

@@ -0,0 +1,106 @@
+<template>
+  <BasicModal
+    wrapClassName="historyHeatModal"
+    v-bind="$attrs"
+    @register="registerModal"
+    destroyOnClose
+    :footer="null"
+    :title="modalTitle"
+    :height="900"
+    width="80%"
+  >
+    <heatList class="historyModal" :changeShiftId="recordInfo.id" :ccmNo="ccmNo" queryType="2" :showAction="false"></heatList>
+  </BasicModal>
+</template>
+<script setup lang="ts">
+  import { ref } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import heatList from '../../operator/components/heatList.vue';
+  import { getTeamShift } from '../../Dashboard/dashboard.api';
+
+  const recordInfo = ref<any>({});
+  const modalTitle = ref('推钢室生产原始记录');
+  const ccmNo = ref('5');
+
+  //表单赋值
+  const [registerModal, {}] = useModalInner(async (data) => {
+    console.log('record', data);
+    try {
+      recordInfo.value = data.record;
+      ccmNo.value = data.ccmNo;
+      modalTitle.value =
+        (data.ccmNo == '5' ? '5#机' : '6#机') +
+        '推钢室 - ' +
+        getTeamShift(data.record.shift, data.record.shiftGroup) +
+        ' - 【 ' +
+        (data.record.createTime ? data.record.createTime.substring(5, 16) : '') +
+        ' ~ ' +
+        (data.record.changeShiftTime ? data.record.changeShiftTime.substring(5, 16) : '') +
+        ' 】';
+    } catch (error) {
+      console.log(error);
+    }
+  });
+</script>
+<style lang="less" scoped>
+  .historyModal {
+    :deep(.ant-table-body) {
+      max-height: 770px !important;
+    }
+  }
+</style>
+<style lang="less">
+  .historyHeatModal .ant-modal .ant-modal-content {
+    background-color: #01396c;
+
+    .ant-modal-header {
+      background: transparent;
+
+      .jeecg-basic-title {
+        color: #fff;
+      }
+    }
+
+    .ant-modal-close {
+      color: #fff;
+    }
+
+    .ant-table {
+      color: var(--fn-color);
+    }
+
+    .jeecg-basic-table .ant-table-wrapper {
+      background: var(--bg-s-color);
+
+      .ant-table {
+        background: var(--bg-s-color);
+
+        .ant-btn-primary:disabled {
+          color: rgba(51 51 51, 0.65);
+          background-color: rgb(211 211 211);
+        }
+      }
+
+      .ant-table-cell-fix-left,
+      .ant-table-cell-fix-right {
+        background: var(--bg-s-color);
+        color: var(--fn-color);
+      }
+
+      .jeecg-basic-table-row__striped td {
+        background: var(--bg-color);
+      }
+
+      .ant-table-thead > tr > th,
+      .ant-table-thead > tr > td {
+        background: var(--bg-color);
+        color: var(--fn-color);
+      }
+
+      .ant-table-tbody > tr.ant-table-row:hover > td,
+      .ant-table-tbody > tr > td.ant-table-cell-row-hover {
+        background-color: #00509c;
+      }
+    }
+  }
+</style>

+ 28 - 11
src/views/billet/ShiftPerformance/index.vue

@@ -24,17 +24,28 @@
                       </a-tag>
                     </div>
                   </div>
-                  <div class="statistic-wrapper">
-                    <a-card v-for="item in statisticColums" :bodyStyle="{ padding: '0 10px' }">
-                      <a-statistic
-                        :title="item.title"
-                        :value="
-                          shiftPerformanceColumns[currentShift] && shiftPerformanceColumns[currentShift][item.dataIndex]
-                            ? shiftPerformanceColumns[currentShift][item.dataIndex]
-                            : 0
-                        "
-                      />
-                    </a-card>
+                  <div class="flex flex-1 items-center">
+                    <div class="statistic-wrapper">
+                      <a-card v-for="item in statisticColums" :bodyStyle="{ padding: '0 10px' }">
+                        <a-statistic
+                          :title="item.title"
+                          :value="
+                            shiftPerformanceColumns[currentShift] && shiftPerformanceColumns[currentShift][item.dataIndex]
+                              ? shiftPerformanceColumns[currentShift][item.dataIndex]
+                              : 0
+                          "
+                        />
+                      </a-card>
+                    </div>
+                    <div class="chart-wrapper-right ml-5">
+                      <a-button
+                        size="large"
+                        type="primary"
+                        @click="openDetailModal(true, { record: shiftPerformanceColumns[currentShift], ccmNo: machine, isUpdate: true })"
+                      >
+                        浇铸炉次
+                      </a-button>
+                    </div>
                   </div>
                 </div>
               </a-col>
@@ -185,6 +196,7 @@
       </a-tab-pane>
     </a-tabs>
   </div>
+  <history @register="registerDetailModal" />
 </template>
 <script lang="ts" setup>
   import { BasicTable } from '/@/components/Table';
@@ -201,9 +213,14 @@
   import Chart from '../Dashboard/components/chart.vue';
   import type { Dayjs } from 'dayjs';
   import dayjs from 'dayjs';
+  import { useModal } from '/@/components/Modal';
+  import history from './components/history.vue';
 
   const currentDate = ref<Dayjs>(dayjs());
 
+  // 棒线堆垛明细
+  const [registerDetailModal, { openModal: openDetailModal }] = useModal();
+
   const machine = getMachineNum();
 
   const changeColumns = [

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

@@ -189,7 +189,9 @@
 
                 setTimeout(
                   () => {
-                    printCarInfoRefs[`infoRef${index + 1}`] && printCarInfoRefs[`infoRef${index + 1}`].value[0].getTableList();
+                    printCarInfoRefs[`infoRef${index + 1}`] &&
+                      printCarInfoRefs[`infoRef${index + 1}`].value &&
+                      printCarInfoRefs[`infoRef${index + 1}`].value[0].getTableList();
                   },
                   50 * (index + 1)
                 );

+ 261 - 0
src/views/billet/operator/components/correct.vue

@@ -0,0 +1,261 @@
+<template>
+  <BasicModal v-bind="$attrs" @register="registerModal" destroyOnClose :footer="null" :title="modalTitle" :height="800" width="80%">
+    <div class="rod-line-details-modal">
+      <BasicTable class="rod-line-details-table" :scroll="{ y: 670 }" :dataSource="tableData" @register="registerTable">
+        <!-- <template v-slot:bodyCell="{ column, record, text }">
+          <div v-if="column.dataIndex === 'billetNo'">
+            <div v-if="record.billetNo">
+              <div v-for="(item, index) in record.billetNos" :key="index">{{ item }}</div>
+            </div>
+            <span v-else>{{ text }}</span>
+          </div>
+        </template> -->
+        <!--操作栏-->
+        <template #action="{ record }">
+          <TableAction :actions="getTableAction(record)" />
+        </template>
+      </BasicTable>
+    </div>
+  </BasicModal>
+</template>
+<script setup lang="ts">
+  import { ref, nextTick } from 'vue';
+  import { BasicModal, useModalInner } from '/@/components/Modal';
+  import { BasicTable, TableAction, BasicColumn } from '/@/components/Table';
+  import { useListPage } from '/@/hooks/system/useListPage';
+  import { listShippingBill, removeBillets } from '../../shippingBill/shippingBill.api';
+  import { useMessage } from '/@/hooks/web/useMessage';
+  import { groupArray } from '/@/views/billet/hotDelivery/common.data';
+
+  const { createConfirm } = useMessage();
+
+  const recordInfo = ref<any>({});
+  // 表格数据
+  const tableData = ref<any[]>([]);
+  const modalTitle = ref('装运明细');
+  const detailColumns: BasicColumn[] = [
+    {
+      title: '炉号',
+      align: 'center',
+      dataIndex: 'heatNo',
+    },
+    {
+      title: '组坯号',
+      align: 'center',
+      width: 280,
+      dataIndex: 'assemblyNumber',
+      ellipsis: false,
+      customRender(opt) {
+        const ph = opt.record.assemblyNumber;
+        if (!ph) return '';
+        const phArr = groupArray(ph.split(','), 2);
+
+        return phArr.join('\n\r').replaceAll(',', '、');
+      },
+    },
+    {
+      title: '坯号',
+      align: 'center',
+      width: 300,
+      dataIndex: 'billetNo',
+      customRender(opt) {
+        const { billetNos, billetNo } = opt.record;
+        if (billetNos) {
+          const phArr = groupArray(billetNos, 2);
+          return phArr.join('\n\r').replaceAll(',', '、');
+        }
+        return billetNo;
+      },
+    },
+    {
+      title: '定尺',
+      align: 'center',
+      width: 80,
+      dataIndex: 'size',
+      customRender: ({ record }) => {
+        return record.size || record.length;
+      },
+    },
+    {
+      title: '垛位',
+      align: 'center',
+      width: 90,
+      dataIndex: 'stackAddr',
+    },
+    {
+      title: '堆垛层号(1-20)',
+      align: 'center',
+      width: 110,
+      dataIndex: 'stackStorey',
+    },
+    {
+      title: '堆垛编号(1-9)',
+      align: 'center',
+      width: 110,
+      dataIndex: 'stackNum',
+    },
+    {
+      dataIndex: 'createTime',
+      title: '创建日期',
+    },
+  ];
+
+  const props = defineProps({
+    info: {
+      type: Object,
+      default: () => ({}),
+    },
+    api: {
+      type: Function as PropType<(params: any) => Promise<any>>,
+      default: listShippingBill,
+    },
+    showActionColumn: {
+      type: Boolean,
+      default: false,
+    },
+  });
+
+  // Emits声明
+  const emit = defineEmits(['register', 'success']);
+
+  const { tableContext } = useListPage({
+    designScope: 'rod-line-details-table',
+    tableProps: {
+      // api: listShippingBill,
+      // beforeFetch: (params) => {
+      //   return Object.assign(params, { ...recordInfo.value });
+      // },
+      // afterFetch: async (record) => {
+      //   // emit('success');
+      // },
+      immediate: false,
+      columns: detailColumns,
+      size: 'small',
+      useSearchForm: false,
+      showTableSetting: false,
+      striped: true,
+      showActionColumn: props.showActionColumn,
+      pagination: {
+        defaultPageSize: 50,
+        pageSize: 50,
+      },
+      actionColumn: {
+        width: 80,
+        title: '操作',
+        dataIndex: 'action',
+        fixed: 'right',
+      },
+    },
+  });
+
+  // BasicTable绑定注册
+  const [registerTable, { setLoading }, {}] = tableContext;
+
+  /**
+   * 操作栏
+   */
+  function getTableAction(record) {
+    return [
+      {
+        label: '移除',
+        onClick: () => {
+          createConfirm({
+            iconType: 'warning',
+            title: '确认移除',
+            content: '是否移除选中数据',
+            okText: '确认',
+            cancelText: '取消',
+            onOk: () => {
+              const { storageBillId, ccmNo, heatNo, billetNos, shiftGroup, shift, assemblyNumber, stackStorey, stackNum, stackAddr } = record;
+
+              const params = {
+                id: storageBillId,
+                ccmNo,
+                heatNo,
+                billNos: billetNos.join(','),
+                shiftGroup,
+                shift,
+                assemblyNumber,
+                stackStorey,
+                stackNum,
+                stackAddr,
+                typeConfigId: recordInfo.value.typeConfigId,
+                destination: recordInfo.value.destination,
+              };
+
+              return removeBillets(params).then(() => {
+                getTableList();
+                emit('success');
+              });
+            },
+          });
+        },
+      },
+    ];
+  }
+
+  const getTableList = async () => {
+    try {
+      setLoading(true);
+      const { id, ccmNo, heatNo, typeConfigId } = recordInfo.value;
+      const data = await props.api({
+        id,
+        ccmNo,
+        heatNo,
+        typeConfigId,
+      });
+
+      let newArr: any[] = [];
+      if (Array.isArray(data)) {
+        newArr = data;
+      } else {
+        for (let item in data) {
+          if (data[item] && data[item].length > 0) {
+            newArr = newArr.concat(data[item]);
+          }
+        }
+      }
+
+      // 数据结果按组批号分组
+      newArr = newArr.reduce((acc, cur) => {
+        const index = acc.findIndex((item) => cur.assemblyNumber && item.assemblyNumber === cur.assemblyNumber);
+        if (index === -1) {
+          acc.push({
+            ...cur,
+            billetNos: [cur.billetNo],
+            sizeList: cur.size ? [cur.size] : cur.length ? [cur.length] : [],
+          });
+        } else {
+          acc[index].billetNos.push(cur.billetNo);
+          acc[index].sizeList.push(cur.size || cur.length);
+        }
+        return acc;
+      }, []);
+
+      tableData.value = newArr.map((ele) => {
+        return {
+          ...ele,
+          size: ele.sizeList.filter((item, index) => ele.sizeList.indexOf(item) === index).join(',\n\r') + ',',
+        };
+      });
+    } catch (error) {
+      console.log(error);
+    } finally {
+      setLoading(false);
+    }
+  };
+
+  //表单赋值
+  const [registerModal, {}] = useModalInner(async (data) => {
+    try {
+      recordInfo.value = data.record;
+      nextTick(() => {
+        modalTitle.value = data.title || '装运明细-> ' + data.record.licensePlate;
+        getTableList();
+      });
+    } catch (error) {
+      console.log(error);
+    }
+  });
+</script>
+<style lang="less" scoped></style>

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

@@ -75,7 +75,7 @@
   // 注册打印modal
   const [registerChangeHeatModal, { openModal: openChangeHeatModal }] = useModal();
 
-  const emits = defineEmits(['shiftChange']);
+  const emits = defineEmits(['shiftChange', 'lengthChange']);
 
   const props = defineProps({
     ccmNo: {
@@ -105,7 +105,6 @@
     { title: '热装', titleColor: '#f50', amount: 0, weight: 0, dtlList: [] },
     { title: '堆垛', titleColor: '#b8ceff', amount: 0, weight: 0, dtlList: [] },
   ]);
-
   // 渲染字典标签
   const renderDictTag = (value: string, dictCode: string) => {
     return render.renderDict(value, dictCode);
@@ -122,6 +121,15 @@
       const infoRes = await getOnDutyInfo({ ccmNo: props.ccmNo });
       if (infoRes) {
         info.value = infoRes;
+        try {
+          let standObj = {};
+          (JSON.parse(infoRes.standNoSize) || []).forEach((item) => {
+            standObj[item.strandNo] = item.length;
+          });
+          emits('lengthChange', standObj);
+        } catch (error) {
+          console.log(error);
+        }
       }
 
       // 获取明细
@@ -172,7 +180,7 @@
     }
   };
 
-  const { start, stop } = useTimeoutFn(getInfo, 5000);
+  const { start, stop } = useTimeoutFn(getInfo, 5000, true);
 
   // 换炉
   const changeHeatLoading = ref(false);
@@ -227,6 +235,13 @@
   onUnmounted(() => {
     stop();
   });
+
+  defineExpose({
+    reload: () => {
+      stop();
+      getInfo();
+    },
+  });
 </script>
 <style lang="less" scoped>
   .head-top {

+ 135 - 10
src/views/billet/operator/components/heatList.vue

@@ -1,8 +1,25 @@
 <template>
   <div class="cc-heatList">
-    <div class="tips-title flex">
+    <div class="tips-title flex" v-if="showAction">
       <div class="left-tip">当班浇铸炉次</div>
-      <div class="flex-1">支数(根) / 重量(t)</div>
+      <div class="flex flex-1 items-center">
+        <div class="flex flex-1">
+          <template v-for="item in 8">
+            <JSearchSelect
+              type="list"
+              style="width: 96px"
+              v-model:value="strandNoSelected[item]"
+              dict="lg_dcgg"
+              :placeholder="`${item}流定尺`"
+              :class="{ changele: strandNoSelectedOrg[item] !== strandNoSelected[item] }"
+              allowClear
+            />
+          </template>
+        </div>
+        <div style="margin-right: 6px">
+          <a-button type="primary" danger style="font-size: 16px" @click="handlerChangeLength"> 变更定尺 </a-button>
+        </div>
+      </div>
     </div>
     <!--引用表格-->
     <BasicTable @register="registerTable">
@@ -20,13 +37,16 @@
   import { BasicTable, TableAction, ActionItem } from '/@/components/Table';
   import { useListPage } from '/@/hooks/system/useListPage';
   import { columns } from '../operator.data';
-  import { queryHeatsActualsByCcmNo, addHotCharge, stackingUpAdd } from '../operator.api';
-  import { onMounted, onUnmounted } from 'vue';
+  import { queryHeatsActualsByCcmNo, addHotCharge, stackingUpAdd, changeDefiningLength } from '../operator.api';
+  import { h, onMounted, onUnmounted, ref, watch } from 'vue';
   import { mapTableTotalSummary } from '/@/utils/common/compUtils';
   import { useTimeoutFn } from '/@/hooks/core/useTimeout';
   import { useMessage } from '/@/hooks/web/useMessage';
+  import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
 
-  const { createMessage } = useMessage();
+  const { createMessage, createConfirm } = useMessage();
+
+  const emits = defineEmits(['changeLengthSuccess']);
 
   const props = defineProps({
     ccmNo: {
@@ -39,6 +59,48 @@
         return {};
       },
     },
+    queryType: {
+      type: String,
+      default: '1',
+    },
+    changeShiftId: {
+      type: String,
+      default: '',
+    },
+    showAction: {
+      type: Boolean,
+      default: true,
+    },
+    canResize: {
+      type: Boolean,
+      default: true,
+    },
+    lengthList: {
+      type: Object,
+      default: () => ({
+        '1': undefined,
+        '2': undefined,
+        '3': undefined,
+        '4': undefined,
+        '5': undefined,
+        '6': undefined,
+        '7': undefined,
+        '8': undefined,
+      }),
+    },
+    lengthOrgList: {
+      type: Object,
+      default: () => ({
+        '1': undefined,
+        '2': undefined,
+        '3': undefined,
+        '4': undefined,
+        '5': undefined,
+        '6': undefined,
+        '7': undefined,
+        '8': undefined,
+      }),
+    },
   });
 
   //注册table数据
@@ -46,7 +108,7 @@
     tableProps: {
       api: queryHeatsActualsByCcmNo,
       beforeFetch: (params) => {
-        return Object.assign(params, { ccmNo: props.ccmNo });
+        return Object.assign(params, { ccmNo: props.ccmNo, queryType: props.queryType, changeShiftId: props.changeShiftId });
       },
       afterFetch: (data) => {
         const length = data.length;
@@ -59,7 +121,7 @@
       },
       columns,
       showIndexColumn: false,
-      canResize: true,
+      canResize: props.canResize,
       striped: true,
       showTableSetting: false,
       pagination: false,
@@ -68,7 +130,7 @@
         title: '操作',
         fixed: 'right',
       },
-      showActionColumn: true,
+      showActionColumn: props.showAction,
       showSummary: true,
       summaryFunc: onSummary,
     },
@@ -152,8 +214,10 @@
   const [registerTable, { reload, setLoading }] = tableContext;
 
   const { start, stop } = useTimeoutFn(() => {
-    reload();
-    start();
+    if (!props.changeShiftId) {
+      reload();
+      start();
+    }
   }, 10000);
 
   onMounted(() => {
@@ -244,6 +308,60 @@
     }
   };
 
+  // 变更定尺
+  const strandNoSelectedOrg = ref(props.lengthOrgList);
+  const strandNoSelected = ref(props.lengthList);
+
+  watch(
+    () => props.lengthOrgList,
+    (val) => {
+      strandNoSelectedOrg.value = props.lengthOrgList;
+      strandNoSelected.value = props.lengthList;
+    },
+    {
+      deep: true,
+      immediate: true,
+    }
+  );
+  const handlerChangeLength = async () => {
+    const record = strandNoSelected.value;
+    const sizeList = Object.keys(record)
+      .filter((ele) => record[ele] && record[ele] !== strandNoSelectedOrg.value[ele])
+      .map((item) => ({
+        strandNo: item,
+        length: record[item],
+      }));
+
+    if (!sizeList.length) {
+      createMessage.error('请选择需要变更的定尺');
+      return;
+    }
+    createConfirm({
+      title: '变更定尺确认',
+      content: h(
+        'div',
+        null,
+        sizeList.map((item) => h('div', null, ` ${item.strandNo}流: ${item.length / 1000}`))
+      ),
+      iconType: 'warning',
+      onOk: () => {
+        const params = {
+          ccmNo: props.ccmNo,
+          strandNoSizeList: Object.keys(record)
+            .filter((ele) => record[ele])
+            .map((item) => ({
+              strandNo: item,
+              length: record[item],
+            })),
+        };
+
+        return changeDefiningLength(params).then(() => {
+          emits('changeLengthSuccess');
+        });
+      },
+    });
+  };
+
   /**
    * 操作栏
    */
@@ -330,5 +448,12 @@
         padding: 0;
       }
     }
+
+    .changele {
+      :deep(.ant-select-selector) {
+        background-color: #faa19d;
+        color: #fff;
+      }
+    }
   }
 </style>

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

@@ -56,8 +56,11 @@
             <component :is="renderDictTag(info.brandNum, 'billet_spec')" />
           </span>
         </a-descriptions-item>
-        <a-descriptions-item 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>
+          </div>
         </a-descriptions-item>
         <a-descriptions-item label="规格">
           170 /
@@ -86,20 +89,26 @@
       </a-descriptions>
     </div>
   </section>
+  <!-- 详情  -->
+  <correct @register="registerDetailModal" showActionColumn @success="() => getTableList()" />
 </template>
 
 <script lang="ts" setup>
   import { ref } from 'vue';
   import dayjs from 'dayjs';
-  import { listShippingBill } from '../../shippingBill/shippingBill.api';
+  import { listShippingBill, startCar } from '../../shippingBill/shippingBill.api';
   import { destinationOptions } from '../../hotDelivery/common.data';
   import JSearchSelect from '/@/components/Form/src/jeecg/components/JSearchSelect.vue';
-  import { startCar } from '../../shippingBill/shippingBill.api';
   import { useMessage } from '/@/hooks/web/useMessage';
   import { render } from '/@/utils/common/renderUtils';
+  import correct from './correct.vue';
+  import { useModal } from '/@/components/Modal';
 
   const { createConfirm, createMessage } = useMessage();
 
+  // 棒线堆垛明细
+  const [registerDetailModal, { openModal: openDetailModal }] = useModal();
+
   const emits = defineEmits(['change', 'refresh']);
 
   const props = defineProps({
@@ -238,6 +247,12 @@
       margin-bottom: 4px;
     }
 
+    .correct {
+      position: absolute;
+      right: 2px;
+      top: -32px;
+    }
+
     :deep(.ant-descriptions-view) {
       .ant-descriptions-item-label,
       .ant-descriptions-item-content {

+ 32 - 2
src/views/billet/operator/index.vue

@@ -16,10 +16,16 @@
         </div>
       </a-layout-header>
       <a-layout-content class="operator-content">
-        <head-top @shiftChange="(v) => (shiftText = v)" />
+        <head-top @shiftChange="(v) => (shiftText = v)" ref="headTopRef" @lengthChange="(v) => ((lengthList = v), (lengthorgList = cloneDeep(v)))" />
         <div class="operator-content-wrapper flex">
           <div class="operator-content-left">
-            <heat-list :ccmNo="ccmNo" :carRef="carRef" />
+            <heat-list
+              :ccmNo="ccmNo"
+              :carRef="carRef"
+              :lengthList="lengthList"
+              :lengthOrgList="lengthorgList"
+              @changeLengthSuccess="() => headTopRef && headTopRef.reload()"
+            />
           </div>
           <div class="operator-content-right">
             <car :ccmNo="ccmNo" ref="carRef" />
@@ -37,10 +43,12 @@
   import car from './components/car.vue';
   import heatList from './components/heatList.vue';
   import { getMachineNum } from '../hotDelivery/common.data';
+  import { cloneDeep } from 'lodash-es';
 
   const ccmNo = getMachineNum();
 
   const carRef = ref();
+  const headTopRef = ref();
   // 班次信息
   const shiftText = ref('');
   // 时钟
@@ -49,6 +57,28 @@
     week: '',
     time: '',
   });
+
+  const lengthList = ref({
+    '1': undefined,
+    '2': undefined,
+    '3': undefined,
+    '4': undefined,
+    '5': undefined,
+    '6': undefined,
+    '7': undefined,
+    '8': undefined,
+  });
+
+  const lengthorgList = ref({
+    '1': undefined,
+    '2': undefined,
+    '3': undefined,
+    '4': undefined,
+    '5': undefined,
+    '6': undefined,
+    '7': undefined,
+    '8': undefined,
+  });
   const clock = () => {
     try {
       const dateStr = getDateTimeWeek().split(' ');

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

@@ -13,6 +13,8 @@ enum Api {
   stackingUpAdd = '/billet/stackingAndLoadingVehicles/stackingUpAdd',
   // 换炉信息
   returnFurnaceChange = '/billetHotsendBase/billetHotsendBase/returnFurnaceChange',
+  // 变更定尺
+  changeDefiningLength = '/billetHotsendBase/billetHotsendBase/pushStrandNoSize',
 }
 
 // 炉次信息
@@ -44,3 +46,8 @@ export const stackingUpAdd = (params: any) => {
 export const returnFurnaceChange = (params: any) => {
   return defHttp.post({ url: Api.returnFurnaceChange, params });
 };
+
+// 变更定尺
+export const changeDefiningLength = (params: any) => {
+  return defHttp.post({ url: Api.changeDefiningLength, params });
+};

+ 0 - 1
src/views/billet/operator/operator.data.ts

@@ -17,7 +17,6 @@ const renderStrandCell = (num, lengthJsonStr) => {
   try {
     if (lengthJsonStr) {
       const lengthJson = JSON.parse(lengthJsonStr);
-      console.log('lengthJson', lengthJson);
       const lengthKeys = Object.keys(lengthJson);
       if (lengthKeys.length) {
         return h('div', { style: { textAlign: 'left', padding: '20px 0 0' } }, [

+ 1 - 1
src/views/billet/shippingBill/shippingBill.api.ts

@@ -36,7 +36,7 @@ enum Api {
   // 装运单,以车次为主
   listShippingBillDetails = '/storageBill/queryOnDutyStorageBillStatistics',
   // 移除钢坯
-  removeBillets = 'storageBill/deleteByAssemblyNumber',
+  removeBillets = '/storageBill/deleteByAssemblyNumber',
   // 发车
   startCar = '/storageBill/startCar',
 }