|
@@ -169,6 +169,7 @@
|
|
|
import { initDictOptions } from '/@/utils/dict';
|
|
|
import { useTimeoutFn } from '/@/hooks/core/useTimeout';
|
|
|
import { getMachineConfig, MachineConfigType } from '../../hotDelivery/common.data';
|
|
|
+ import { steelPlateFormula } from '../operator.data';
|
|
|
|
|
|
const emits = defineEmits(['statistics']);
|
|
|
|
|
@@ -487,7 +488,7 @@
|
|
|
return {
|
|
|
title: () => {
|
|
|
return h('div', { style: { position: 'relative' } }, [
|
|
|
- h('span', {}, stack.typeName),
|
|
|
+ h('span', {}, stack.aliasName),
|
|
|
h(
|
|
|
'div',
|
|
|
{
|
|
@@ -689,11 +690,11 @@
|
|
|
rollOneSize[key] = {
|
|
|
size: Number(column) / 1000 + 'm',
|
|
|
amount: lengthGroupCount[key],
|
|
|
- weight: lengthGroupCount[key] * (Number(column) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(column, lengthGroupCount[key]),
|
|
|
};
|
|
|
} else {
|
|
|
rollOneSize[key].amount += lengthGroupCount[key];
|
|
|
- rollOneSize[key].weight += lengthGroupCount[key] * (Number(column) / 1000) * 0.2265;
|
|
|
+ rollOneSize[key].weight += steelPlateFormula(column, lengthGroupCount[key]);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -720,11 +721,11 @@
|
|
|
type: k.hotChargeBtype,
|
|
|
size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
amount: k.totalCount,
|
|
|
- weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
};
|
|
|
} else {
|
|
|
rollTwoSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollTwoSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
|
|
|
+ rollTwoSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
}
|
|
|
} else {
|
|
|
if (!rollTwoColdSize[k.hotChargeLength]) {
|
|
@@ -732,11 +733,11 @@
|
|
|
type: k.hotChargeBtype,
|
|
|
size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
amount: k.totalCount,
|
|
|
- weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
};
|
|
|
} else {
|
|
|
rollTwoColdSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollTwoColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
|
|
|
+ rollTwoColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -751,11 +752,11 @@
|
|
|
type: k.hotChargeBtype,
|
|
|
size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
amount: k.totalCount,
|
|
|
- weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
};
|
|
|
} else {
|
|
|
rollThreeSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollThreeSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
|
|
|
+ rollThreeSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
}
|
|
|
} else {
|
|
|
if (!rollThreeColdSize[k.hotChargeLength]) {
|
|
@@ -763,11 +764,11 @@
|
|
|
type: k.hotChargeBtype,
|
|
|
size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
amount: k.totalCount,
|
|
|
- weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
};
|
|
|
} else {
|
|
|
rollThreeColdSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollThreeColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
|
|
|
+ rollThreeColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -782,11 +783,11 @@
|
|
|
type: k.hotChargeBtype,
|
|
|
size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
amount: k.totalCount,
|
|
|
- weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
};
|
|
|
} else {
|
|
|
rollShippSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollShippSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
|
|
|
+ rollShippSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
}
|
|
|
} else {
|
|
|
if (!rollShippColdSize[k.hotChargeLength]) {
|
|
@@ -794,11 +795,11 @@
|
|
|
type: k.hotChargeBtype,
|
|
|
size: Number(k.hotChargeLength) / 1000 + 'm',
|
|
|
amount: k.totalCount,
|
|
|
- weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
};
|
|
|
} else {
|
|
|
rollShippColdSize[k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollShippColdSize[k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
|
|
|
+ rollShippColdSize[k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -808,11 +809,11 @@
|
|
|
rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength] = {
|
|
|
size: sizeFormat + 'm',
|
|
|
amount: k.totalCount,
|
|
|
- weight: k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(k.hotChargeLength, k.totalCount),
|
|
|
};
|
|
|
} else {
|
|
|
rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].amount += k.totalCount;
|
|
|
- rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].weight += k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265;
|
|
|
+ rollChargeSizeType[k.hotChargeBtype][k.hotChargeLength].weight += steelPlateFormula(k.hotChargeLength, k.totalCount);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -857,7 +858,11 @@
|
|
|
},
|
|
|
''
|
|
|
),
|
|
|
- h('div', { class: 'noprint', onClick: () => deleteStackColumn(sSize) }, h(Icon, { icon: 'ant-design:delete-outlined' }, '')),
|
|
|
+ h(
|
|
|
+ 'div',
|
|
|
+ { class: 'noprint', onClick: () => deleteStackColumn(sSize, v.stackingBhtcId) },
|
|
|
+ h(Icon, { icon: 'ant-design:delete-outlined' }, '')
|
|
|
+ ),
|
|
|
]);
|
|
|
},
|
|
|
dataIndex: stackKey,
|
|
@@ -889,11 +894,11 @@
|
|
|
stackingSize[sSize] = {
|
|
|
size: Number(sSize) / 1000 + 'm',
|
|
|
amount: v.stackingCount,
|
|
|
- weight: v.stackingCount * (Number(sSize) / 1000) * 0.2265,
|
|
|
+ weight: steelPlateFormula(sSize, v.stackingCount),
|
|
|
};
|
|
|
} else {
|
|
|
stackingSize[sSize].amount += v.stackingCount;
|
|
|
- stackingSize[sSize].weight += v.stackingCount * (Number(sSize) / 1000) * 0.2265;
|
|
|
+ stackingSize[sSize].weight += steelPlateFormula(sSize, v.stackingCount);
|
|
|
}
|
|
|
});
|
|
|
}
|
|
@@ -1233,27 +1238,27 @@
|
|
|
createMessage.error('补数量必须是4的倍数');
|
|
|
return;
|
|
|
}
|
|
|
- stackInfo = val + '-' + size + '-10';
|
|
|
+ stackInfo = val + '-' + size + '-' + stackingId;
|
|
|
} else {
|
|
|
- stackInfo = null;
|
|
|
+ stackInfo = '0-' + size + '-' + stackingId;
|
|
|
}
|
|
|
|
|
|
if (lengthGroupCount === -1) {
|
|
|
obj.push({
|
|
|
stackingCount: val,
|
|
|
stackingLength: size,
|
|
|
- stackingWeight: val * (Number(size) / 1000) * 0.2265,
|
|
|
+ stackingWeight: steelPlateFormula(size, val),
|
|
|
stackingBhtcId: stackingId,
|
|
|
});
|
|
|
} else {
|
|
|
if (obj[lengthGroupCount].stackingCount === val) return;
|
|
|
obj[lengthGroupCount].stackingCount = val;
|
|
|
- obj[lengthGroupCount].stackingWeight = val * (Number(size) / 1000) * 0.2265;
|
|
|
+ obj[lengthGroupCount].stackingWeight = steelPlateFormula(size, val);
|
|
|
}
|
|
|
|
|
|
const params = {
|
|
|
...orgData,
|
|
|
- stackLength: JSON.stringify(obj),
|
|
|
+ stackLength: JSON.stringify(obj.filter((v) => v.stackingCount > 0)),
|
|
|
stackInfo,
|
|
|
};
|
|
|
const amount = handleTotalSum(params);
|
|
@@ -1414,7 +1419,7 @@
|
|
|
};
|
|
|
|
|
|
// 删除堆垛定尺
|
|
|
- const deleteStackColumn = async (size) => {
|
|
|
+ const deleteStackColumn = async (size, stackingId) => {
|
|
|
try {
|
|
|
changeLoading(true);
|
|
|
const fetchArr: any[] = [];
|
|
@@ -1423,14 +1428,14 @@
|
|
|
const { stackLength } = item.orgData;
|
|
|
if (stackLength) {
|
|
|
const obj = JSON.parse(stackLength);
|
|
|
- const hasStackItem = obj.findIndex((n) => n.stackingLength == size);
|
|
|
+ const hasStackItem = obj.findIndex((n) => n.stackingLength == size && n.stackingBhtcId == stackingId);
|
|
|
if (hasStackItem > -1) {
|
|
|
- const lengthGroupCount = obj.filter((m) => m.stackingLength != size);
|
|
|
-
|
|
|
+ const lengthGroupCount = obj.filter((m) => m.stackingLength != size || m.stackingBhtcId != stackingId);
|
|
|
// 请求push了
|
|
|
const params = {
|
|
|
...item.orgData,
|
|
|
stackLength: JSON.stringify(lengthGroupCount),
|
|
|
+ stackInfo: '0-' + size + '-' + stackingId,
|
|
|
};
|
|
|
|
|
|
const amount = handleTotalSum(params);
|
|
@@ -1478,7 +1483,7 @@
|
|
|
.map((k) => {
|
|
|
return {
|
|
|
...k,
|
|
|
- totalWeight: (k.totalCount * (Number(k.hotChargeLength) / 1000) * 0.2265).toFixed(4),
|
|
|
+ totalWeight: steelPlateFormula(k.hotChargeLength, k.totalCount).toFixed(4),
|
|
|
};
|
|
|
});
|
|
|
|