|
|
|
|
@ -138,19 +138,13 @@
|
|
|
|
|
<span class="detail-label">小时轴数:</span>
|
|
|
|
|
<span class="detail-value">{{ calculateAxlesPerHour() }} 轴</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="detail-row">
|
|
|
|
|
<span class="detail-label">每天重量:</span>
|
|
|
|
|
<span class="detail-value">{{ calculateDailyWeight() }} kg</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="detail-row daily-production-row">
|
|
|
|
|
<div class="daily-production-item">
|
|
|
|
|
<span class="detail-label">每天轴数:</span>
|
|
|
|
|
<span class="detail-value">{{ calculateAxlesPerDay() }} 轴</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div class="daily-production-item">
|
|
|
|
|
<span class="detail-label">每天箱数:</span>
|
|
|
|
|
<span class="detail-value">{{ calculateBoxesPerDay() }} 箱</span>
|
|
|
|
|
</div>
|
|
|
|
|
<div v-if="selectedAxle.update_time && selectedAxle.total_quantity && productionScheduleData && productionScheduleData.axle_final_average_speed && productionScheduleData.axle_final_average_weight" class="detail-row stock-row">
|
|
|
|
|
<span class="detail-label stock-label">每天重量:</span>
|
|
|
|
|
<span class="detail-value stock-item-weight">{{ calculateDailyWeight() }} kg</span>
|
|
|
|
|
<span class="detail-label stock-label">每天轴数:</span>
|
|
|
|
|
<span class="detail-value stock-item-number">{{ calculateAxlesPerDay() }} 轴</span>
|
|
|
|
|
<span class="detail-label stock-label">每天箱数:</span>
|
|
|
|
|
<span class="detail-value stock-item-number">{{ calculateBoxesPerDay() }} 箱</span>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
@ -734,19 +728,24 @@ const calculateDailyWeight = () => {
|
|
|
|
|
// 计算每天箱数,根据wire_disc进行判断
|
|
|
|
|
const calculateBoxesPerDay = () => {
|
|
|
|
|
const axlesPerDay = calculateAxlesPerDay();
|
|
|
|
|
|
|
|
|
|
// 如果没有选中轴或者没有线盘信息,返回0
|
|
|
|
|
if (!selectedAxle.value || !selectedAxle.value.raw_wire_disc) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 确保axlesPerDay是数字类型
|
|
|
|
|
const axlesPerDayNum = parseFloat(axlesPerDay);
|
|
|
|
|
if (isNaN(axlesPerDayNum)) {
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// 根据wire_disc判断计算方法
|
|
|
|
|
if (selectedAxle.value.wire_disc === 'PT-25') {
|
|
|
|
|
// 如果是'PT-25',则每天轴数/4
|
|
|
|
|
return (axlesPerDay / 4).toFixed(2);
|
|
|
|
|
if (selectedAxle.value.wire_disc === 'PT-4') {
|
|
|
|
|
// 如果是'PT-4',则每天轴数/4
|
|
|
|
|
return (axlesPerDayNum / 4).toFixed(2);
|
|
|
|
|
} else {
|
|
|
|
|
// 其他情况,每天轴数/1
|
|
|
|
|
return axlesPerDay.toFixed(2);
|
|
|
|
|
return axlesPerDayNum.toFixed(2);
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
@ -1354,7 +1353,7 @@ const updateCharts = () => {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
.daily-production-item {
|
|
|
|
|
min-width: 45%;
|
|
|
|
|
min-width: 30%;
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
display: flex;
|
|
|
|
|
}
|
|
|
|
|
|