Merge remote-tracking branch 'origin/0.8.X' into 0.8.X

# Conflicts:
#	klp-admin/src/main/resources/application-prod.yml
This commit is contained in:
2026-05-23 19:35:22 +08:00
85 changed files with 11908 additions and 843 deletions

View File

@@ -11,6 +11,27 @@
</div>
</div>
<div class="section basic-info-section">
<div class="section-header">
<span class="section-icon">💰</span>
<span class="section-title">成本信息</span>
</div>
<div class="section-body">
<el-descriptions :column="3" border size="small">
<el-descriptions-item label="囤积成本">
<span class="cost-value">{{ hoardingCost }}</span>
<span class="cost-unit">t·</span>
</el-descriptions-item>
<el-descriptions-item label="囤积天数">
<span>{{ hoardingDays }} </span>
</el-descriptions-item>
<el-descriptions-item label="钢卷净重">
<span>{{ coilInfo.netWeight || 0 }} t</span>
</el-descriptions-item>
</el-descriptions>
</div>
</div>
<div class="section trace-section">
<div class="section-header">
<span class="section-icon">🔄</span>
@@ -1218,12 +1239,30 @@ export default {
salesInfo() {
return this.coilInfo.orderList?.[0] || {};
},
// 判断是否为冷硬卷
isColdHardCoil() {
return this.coilInfo.itemName && this.coilInfo.itemName.includes('冷硬卷');
},
hasPerfData() {
return this.perfSeries && this.perfSegCount > 0;
},
hoardingDays() {
const inboundTime = this.getInboundTime();
if (!inboundTime) return 0;
const inboundDate = new Date(inboundTime);
let endDate;
if (this.coilInfo.status == 1) {
endDate = new Date(this.coilInfo.exportTime);
} else {
endDate = new Date();
}
// const today = new Date();
const diffTime = endDate.getTime() - inboundDate.getTime();
const diffDays = Math.floor(diffTime / (1000 * 60 * 60 * 24));
return Math.max(0, diffDays);
},
hoardingCost() {
const netWeight = parseFloat(this.coilInfo.netWeight) || 0;
return (this.hoardingDays * netWeight).toFixed(2);
}
},
async created() {
@@ -1343,7 +1382,7 @@ export default {
async getInspectionTasks() {
this.inspectionLoading = true;
try {
const res = await listInspectionTask({ coilIds: this.coilId, pageNum: 1, pageSize: 100 });
const res = await listInspectionTask({ enterCoilNos: this.coilInfo.enterCoilNo, pageNum: 1, pageSize: 100 });
this.inspectionTaskList = res.rows || [];
} catch (e) {
console.error('获取检验任务异常:', e);
@@ -1367,6 +1406,18 @@ export default {
this.$set(this.inspectionItemLoadingMap, taskId, false);
}
},
getInboundTime() {
if (!this.traceResult || !this.traceResult.steps) {
return this.coilInfo.createTime || null;
}
const createStep = this.traceResult.steps.find(step =>
step.action === '新增' || step.action === '创建'
);
if (createStep) {
return createStep.create_time || createStep.update_time || createStep.time;
}
return this.coilInfo.createTime || null;
},
formatTime(timeStamp) {
if (!timeStamp) return '-';
const date = new Date(timeStamp);
@@ -3332,4 +3383,17 @@ export default {
color: #c0c4cc;
font-size: 13px;
}
.cost-value {
font-size: 20px;
font-weight: 700;
color: #d97706;
text-shadow: 0 0 8px rgba(217, 119, 6, 0.4);
}
.cost-unit {
font-size: 12px;
color: #64748b;
margin-left: 4px;
}
</style>