|
@@ -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;
|
|
|
}
|
|
|
|
|
|
// 自定义啊
|