|
@@ -22,7 +22,7 @@
|
|
|
</div>
|
|
|
<div class="flex-1" style="text-align: right"> lg/R05 </div>
|
|
|
</div>
|
|
|
- <a-table :columns="columns" size="small" :data-source="dataSource" bordered :pagination="false">
|
|
|
+ <a-table :columns="columns" size="small" :data-source="dataSource" rowKey="id" bordered :pagination="false">
|
|
|
<template #summary>
|
|
|
<a-table-summary-row>
|
|
|
<a-table-summary-cell :col-span="remakeColSpan" style="text-align: center">备注</a-table-summary-cell>
|
|
@@ -171,7 +171,7 @@
|
|
|
import { ref, computed, h, onMounted } from 'vue';
|
|
|
import dayjs from 'dayjs';
|
|
|
import type { TableColumnsType } from 'ant-design-vue';
|
|
|
- import { queryBilletRecordByCcmNo, editBilletRecord, addBilletNo, editOriginalProductRecord } from '../operator.api';
|
|
|
+ import { queryBilletRecordByCcmNo, editBilletRecord, addBilletNo, editOriginalProductRecord, deleteBilletRecord } from '../operator.api';
|
|
|
import { render } from '/@/utils/common/renderUtils';
|
|
|
import { isArray, isNumber } from '/@/utils/is';
|
|
|
import Icon from '/@/components/Icon';
|
|
@@ -200,7 +200,6 @@
|
|
|
return render.renderDict(value, dictCode);
|
|
|
};
|
|
|
|
|
|
- const paiHao = ref('5');
|
|
|
// 主机号
|
|
|
const hostNumber = ref('5');
|
|
|
const defaultColumns: TableColumnsType = [
|
|
@@ -210,6 +209,44 @@
|
|
|
dataIndex: 'SerialNumber',
|
|
|
align: 'center',
|
|
|
key: 'SerialNumber',
|
|
|
+ customRender: ({ text, record }) => {
|
|
|
+ if (!record.heatNo) return text;
|
|
|
+ const { orgData } = record;
|
|
|
+ return h(
|
|
|
+ 'div',
|
|
|
+ {
|
|
|
+ style: { position: 'relative' },
|
|
|
+ },
|
|
|
+ [
|
|
|
+ h('span', {}, text),
|
|
|
+ h(
|
|
|
+ 'div',
|
|
|
+ {
|
|
|
+ class: 'noprint delete-heat',
|
|
|
+ onClick: () => {
|
|
|
+ console.log('record', orgData);
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: '删除确认',
|
|
|
+ content: `确定删除【${record.heatNo}】吗?删除后无法恢复!`,
|
|
|
+ onOk: () => {
|
|
|
+ return deleteBilletRecord({
|
|
|
+ id: orgData.id,
|
|
|
+ }).then(() => {
|
|
|
+ getHeatList({
|
|
|
+ ...props.openData,
|
|
|
+ hostNumber: hostNumber.value,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ },
|
|
|
+ h(Icon, { icon: 'ant-design:delete-outlined', size: '20' }, '')
|
|
|
+ ),
|
|
|
+ ]
|
|
|
+ );
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '炉号',
|
|
@@ -217,6 +254,50 @@
|
|
|
width: 100,
|
|
|
align: 'center',
|
|
|
key: 'heatNo',
|
|
|
+ customRender: ({ text, record }) => {
|
|
|
+ if (!record.heatNo) return '';
|
|
|
+ const { orgData } = record;
|
|
|
+ return h(Input, {
|
|
|
+ key: orgData.heatNo + record.keyDate,
|
|
|
+ bordered: false,
|
|
|
+ value: text,
|
|
|
+ onBlur: throttle(
|
|
|
+ (e) => {
|
|
|
+ const v = e.target.value.trim();
|
|
|
+ if (!v || orgData.heatNo === v) return;
|
|
|
+ createConfirm({
|
|
|
+ iconType: 'warning',
|
|
|
+ title: '交班确认',
|
|
|
+ content: `确定修改【${record.heatNo}】吗?`,
|
|
|
+ onOk: () => {
|
|
|
+ return editBilletRecord({
|
|
|
+ ...orgData,
|
|
|
+ heatNo: v,
|
|
|
+ }).then(() => {
|
|
|
+ getHeatList({
|
|
|
+ ccmNo: hostNumber.value,
|
|
|
+ queryType: fetchQueryType.value,
|
|
|
+ changeShiftId: fetchChangeShiftId.value,
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
+ onCancel: () => {
|
|
|
+ getHeatList({
|
|
|
+ ccmNo: hostNumber.value,
|
|
|
+ queryType: fetchQueryType.value,
|
|
|
+ changeShiftId: fetchChangeShiftId.value,
|
|
|
+ });
|
|
|
+ },
|
|
|
+ });
|
|
|
+ },
|
|
|
+ 500,
|
|
|
+ {
|
|
|
+ leading: true,
|
|
|
+ trailing: false,
|
|
|
+ }
|
|
|
+ ),
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
{
|
|
|
title: '钢种',
|
|
@@ -224,7 +305,7 @@
|
|
|
align: 'center',
|
|
|
dataIndex: 'brandNum',
|
|
|
key: 'brandNum',
|
|
|
- customRender: ({ text, index, record }) => {
|
|
|
+ customRender: ({ text, record }) => {
|
|
|
if (!record.heatNo) return '';
|
|
|
const { orgData } = record;
|
|
|
return h(
|
|
@@ -850,10 +931,13 @@
|
|
|
});
|
|
|
}
|
|
|
|
|
|
+ const curTime = new Date().getTime();
|
|
|
+
|
|
|
return {
|
|
|
...item,
|
|
|
+ id: newArr[index].id || curTime,
|
|
|
heatNo: newArr[index].heatNo,
|
|
|
- keyDate: new Date().getTime(),
|
|
|
+ keyDate: curTime,
|
|
|
brandNum: newArr[index].grade,
|
|
|
oneFlow: newArr[index].oneStrandSum || '',
|
|
|
twoFlow: newArr[index].twoStrandSum || '',
|
|
@@ -1428,7 +1512,7 @@
|
|
|
};
|
|
|
});
|
|
|
|
|
|
- editSizeNumRecord.value.hotChargeLength = arr.length ? JSON.stringify(arr) : null;
|
|
|
+ editSizeNumRecord.value.hotChargeLength = JSON.stringify(arr);
|
|
|
|
|
|
await editBilletRecord({
|
|
|
...editSizeNumRecord.value,
|
|
@@ -1763,6 +1847,13 @@
|
|
|
color: rgba(255, 255, 255, 0.8);
|
|
|
}
|
|
|
|
|
|
+ .delete-heat {
|
|
|
+ position: absolute;
|
|
|
+ top: 0;
|
|
|
+ color: #f50;
|
|
|
+ cursor: pointer;
|
|
|
+ }
|
|
|
+
|
|
|
.size-st-wrapper {
|
|
|
position: absolute;
|
|
|
top: 1px;
|