|
@@ -2,7 +2,7 @@
|
|
|
<div class="cc-heatList">
|
|
|
<div class="tips-title flex" v-if="showAction">
|
|
|
<div class="left-tip">当班浇铸炉次</div>
|
|
|
- <div class="flex flex-1 items-center">
|
|
|
+ <div class="flex flex-1 items-center" style="display: none">
|
|
|
<div class="flex flex-1">
|
|
|
<template v-for="item in 8">
|
|
|
<JSearchSelect
|
|
@@ -30,6 +30,14 @@
|
|
|
<!--字段回显插槽-->
|
|
|
<!-- <template v-slot:bodyCell="{ column, record, index, text }"> </template> -->
|
|
|
</BasicTable>
|
|
|
+ <BasicTable @register="registerExtraTable" v-if="otherShiftTableData.length > 0" :dataSource="otherShiftTableData">
|
|
|
+ <!--操作栏-->
|
|
|
+ <template #action="{ record }">
|
|
|
+ <TableAction class="flex flex-col" style="gap: 4px" :actions="getTableAction(record)" />
|
|
|
+ </template>
|
|
|
+ <!--字段回显插槽-->
|
|
|
+ <!-- <template v-slot:bodyCell="{ column, record, index, text }"> </template> -->
|
|
|
+ </BasicTable>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -101,8 +109,17 @@
|
|
|
'8': undefined,
|
|
|
}),
|
|
|
},
|
|
|
+ curShiftInfo: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({
|
|
|
+ shift: '',
|
|
|
+ shiftGroup: '',
|
|
|
+ }),
|
|
|
+ },
|
|
|
});
|
|
|
|
|
|
+ const otherShiftTableData = ref<any[]>([]);
|
|
|
+
|
|
|
//注册table数据
|
|
|
const { tableContext } = useListPage({
|
|
|
tableProps: {
|
|
@@ -111,8 +128,25 @@
|
|
|
return Object.assign(params, { ccmNo: props.ccmNo, queryType: props.queryType, changeShiftId: props.changeShiftId });
|
|
|
},
|
|
|
afterFetch: (data) => {
|
|
|
- const length = data.length;
|
|
|
- return data.map((item, index) => {
|
|
|
+ let cunShift: any[] = [],
|
|
|
+ otherShift: any[] = [];
|
|
|
+ data.forEach((item) => {
|
|
|
+ if (item.shift === props.curShiftInfo.shift && item.shiftGroup === props.curShiftInfo.shiftGroup) {
|
|
|
+ cunShift.push(item);
|
|
|
+ } else {
|
|
|
+ otherShift.push(item);
|
|
|
+ }
|
|
|
+ });
|
|
|
+
|
|
|
+ const length = cunShift.length;
|
|
|
+ otherShiftTableData.value = otherShift.map((item) => {
|
|
|
+ return {
|
|
|
+ ...item,
|
|
|
+ columnIndex: '#',
|
|
|
+ };
|
|
|
+ });
|
|
|
+
|
|
|
+ return cunShift.map((item, index) => {
|
|
|
return {
|
|
|
...item,
|
|
|
columnIndex: length - index,
|
|
@@ -141,8 +175,9 @@
|
|
|
* @param tableData
|
|
|
*/
|
|
|
function onSummary(tableData: Recordable[]) {
|
|
|
+ const newTableData = tableData.filter((ele) => ele.shift === props.curShiftInfo.shift && ele.shiftGroup === props.curShiftInfo.shiftGroup);
|
|
|
// 可用工具方法自动计算合计
|
|
|
- const totals = mapTableTotalSummary(tableData, [
|
|
|
+ const totals = mapTableTotalSummary(newTableData, [
|
|
|
'oneStrandNo',
|
|
|
'twoStrandNo',
|
|
|
'threeStrandNo',
|
|
@@ -162,7 +197,7 @@
|
|
|
totalCount = 0,
|
|
|
totalWeight = 0;
|
|
|
try {
|
|
|
- tableData.forEach((item) => {
|
|
|
+ newTableData.forEach((item) => {
|
|
|
const { hotSend, directRolling, hotCharge, stacking, totalInfo } = item;
|
|
|
// 直轧
|
|
|
if (hotSend) {
|
|
@@ -213,6 +248,27 @@
|
|
|
|
|
|
const [registerTable, { reload, setLoading }] = tableContext;
|
|
|
|
|
|
+ // 额外的表格
|
|
|
+ const { tableContext: extraTableContext } = useListPage({
|
|
|
+ tableProps: {
|
|
|
+ columns,
|
|
|
+ showIndexColumn: false,
|
|
|
+ canResize: false,
|
|
|
+ striped: true,
|
|
|
+ showTableSetting: false,
|
|
|
+ pagination: false,
|
|
|
+ actionColumn: {
|
|
|
+ width: 60,
|
|
|
+ title: '操作',
|
|
|
+ fixed: 'right',
|
|
|
+ },
|
|
|
+ showActionColumn: props.showAction,
|
|
|
+ showHeader: false,
|
|
|
+ },
|
|
|
+ });
|
|
|
+
|
|
|
+ const [registerExtraTable] = extraTableContext;
|
|
|
+
|
|
|
const { start, stop } = useTimeoutFn(() => {
|
|
|
if (!props.changeShiftId) {
|
|
|
reload();
|
|
@@ -229,7 +285,7 @@
|
|
|
});
|
|
|
|
|
|
// 热装
|
|
|
- const hotCharge = async (record) => {
|
|
|
+ const doHotCharge = async (record) => {
|
|
|
try {
|
|
|
const valiDesRes = props.carRef && props.carRef.valirDest ? props.carRef.valirDest() : true;
|
|
|
if (!valiDesRes) {
|
|
@@ -246,6 +302,8 @@
|
|
|
ccmNo: props.ccmNo,
|
|
|
heatNo: record.heatNo,
|
|
|
storageId: chargeInfo.id,
|
|
|
+ shift: record.shift,
|
|
|
+ shiftGroup: record.shiftGroup,
|
|
|
};
|
|
|
|
|
|
setLoading(true);
|
|
@@ -295,6 +353,8 @@
|
|
|
heatNo: record.heatNo,
|
|
|
billetHotsendTypeConfigId: stackInfo.id,
|
|
|
stackingAndLoadingVehiclesIds: sortedStackList.map((item) => item.id),
|
|
|
+ shift: record.shift,
|
|
|
+ shiftGroup: record.shiftGroup,
|
|
|
};
|
|
|
|
|
|
setLoading(true);
|
|
@@ -376,7 +436,7 @@
|
|
|
disabled: !chargeInfo.id || !!chargeInfo.outTime,
|
|
|
type: 'primary',
|
|
|
onClick: () => {
|
|
|
- hotCharge(record);
|
|
|
+ doHotCharge(record);
|
|
|
},
|
|
|
},
|
|
|
{
|