fix(wms/coil/info): 修复生产数据加载依赖字段错误的问题
调整生产数据加载逻辑,先通过热轧卷号查询计划详情获取卷号,再调用时序数据接口,修复直接使用当前卷号可能取不到数据的问题
This commit is contained in:
@@ -766,7 +766,7 @@ import { listTransferOrderItem } from '@/api/wms/transferOrderItem'
|
||||
import { listCoilQualityRejudge } from '@/api/wms/coilQualityRejudge'
|
||||
// 引入 ECharts 和 L2 时序数据 API
|
||||
import * as echarts from 'echarts'
|
||||
import { getTimingSegByEncoilId } from '@/api/l2/timing'
|
||||
import { getTimingSegByEncoilId, getTimingPlanDetailByHotcoilId } from '@/api/l2/timing'
|
||||
|
||||
import AbnormalTable from '@/views/wms/coil/components/AbnormalTable.vue';
|
||||
import FileList from "@/components/FileList";
|
||||
@@ -1176,11 +1176,16 @@ export default {
|
||||
},
|
||||
// 加载生产数据
|
||||
async loadProductionData() {
|
||||
const encoilId = this.coilInfo.currentCoilNo;
|
||||
if (!encoilId) return;
|
||||
const hotCoilId = this.coilInfo.enterCoilNo;
|
||||
if (!hotCoilId) return;
|
||||
|
||||
this.perfLoading = true;
|
||||
try {
|
||||
// 先查询详情
|
||||
const detail = await getTimingPlanDetailByHotcoilId(hotCoilId);
|
||||
const encoilId = detail?.data?.firstRow?.coilid || '';
|
||||
if (!encoilId) return;
|
||||
|
||||
const res = await getTimingSegByEncoilId(encoilId);
|
||||
const series = res?.data?.series || null;
|
||||
const rows = res?.data?.rows || [];
|
||||
|
||||
Reference in New Issue
Block a user