|
|
|
@ -139,9 +139,20 @@
|
|
|
|
<span class="detail-value">{{ calculateAxlesPerHour() }} 轴</span>
|
|
|
|
<span class="detail-value">{{ calculateAxlesPerHour() }} 轴</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<div class="detail-row">
|
|
|
|
<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-label">每天轴数:</span>
|
|
|
|
<span class="detail-value">{{ calculateAxlesPerDay() }} 轴</span>
|
|
|
|
<span class="detail-value">{{ calculateAxlesPerDay() }} 轴</span>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div class="daily-production-item">
|
|
|
|
|
|
|
|
<span class="detail-label">每天箱数:</span>
|
|
|
|
|
|
|
|
<span class="detail-value">{{ calculateBoxesPerDay() }} 箱</span>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
@ -707,6 +718,38 @@ const calculateAxlesPerDay = () => {
|
|
|
|
return (axlesPerHour * 24).toFixed(2);
|
|
|
|
return (axlesPerHour * 24).toFixed(2);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 计算每天重量 = 产速 * 24小时 * 总轴数
|
|
|
|
|
|
|
|
const calculateDailyWeight = () => {
|
|
|
|
|
|
|
|
if (!productionScheduleData.value || !productionScheduleData.value.axle_final_average_speed || !editableTotalQuantity.value) {
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
const speed = productionScheduleData.value.axle_final_average_speed;
|
|
|
|
|
|
|
|
const totalQuantity = editableTotalQuantity.value;
|
|
|
|
|
|
|
|
// 公式:产速 * 24小时 * 总轴数
|
|
|
|
|
|
|
|
const result = speed * 24 * totalQuantity;
|
|
|
|
|
|
|
|
return result.toFixed(2);
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 计算每天箱数,根据wire_disc进行判断
|
|
|
|
|
|
|
|
const calculateBoxesPerDay = () => {
|
|
|
|
|
|
|
|
const axlesPerDay = calculateAxlesPerDay();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 如果没有选中轴或者没有线盘信息,返回0
|
|
|
|
|
|
|
|
if (!selectedAxle.value || !selectedAxle.value.raw_wire_disc) {
|
|
|
|
|
|
|
|
return 0;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 根据wire_disc判断计算方法
|
|
|
|
|
|
|
|
if (selectedAxle.value.wire_disc === 'PT-25') {
|
|
|
|
|
|
|
|
// 如果是'PT-25',则每天轴数/4
|
|
|
|
|
|
|
|
return (axlesPerDay / 4).toFixed(2);
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 其他情况,每天轴数/1
|
|
|
|
|
|
|
|
return axlesPerDay.toFixed(2);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
// 总轴数变更处理函数
|
|
|
|
// 总轴数变更处理函数
|
|
|
|
const onTotalQuantityChange = (newValue) => {
|
|
|
|
const onTotalQuantityChange = (newValue) => {
|
|
|
|
// 更新计算结果
|
|
|
|
// 更新计算结果
|
|
|
|
@ -1305,6 +1348,21 @@ const updateCharts = () => {
|
|
|
|
margin-top: 10px;
|
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* 每天生产数据在同一行显示的特殊样式 */
|
|
|
|
|
|
|
|
.daily-production-row {
|
|
|
|
|
|
|
|
flex-wrap: wrap;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.daily-production-item {
|
|
|
|
|
|
|
|
min-width: 45%;
|
|
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
|
|
display: flex;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.daily-production-item .detail-label {
|
|
|
|
|
|
|
|
margin-right: 5px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/* 可编辑输入框样式 */
|
|
|
|
/* 可编辑输入框样式 */
|
|
|
|
.editable-input {
|
|
|
|
.editable-input {
|
|
|
|
width: 100px;
|
|
|
|
width: 100px;
|
|
|
|
|