feat(service): 添加按热卷号查询计划详情功能
- 在 SqlServerApiBusinessService 中实现按热卷号查询计划详情方法 - 新增调用查询扩展卷数据接口并整合到返回结果中 - 修改 PlanDetailView 构造函数以支持扩展卷数据列表 - 添加 excoilRows 属性和相应的 getter 方法 - 提供新的 fromExecuteSqlResponse 静态工厂方法处理双响应对象 - 在 SqlServerApiClient 中新增 queryExcoilByHotCoilId 查询接口
This commit is contained in:
@@ -115,7 +115,15 @@ export default {
|
||||
this.matchLoading = true
|
||||
getTimingPlanDetailByHotcoilId(hotCoilId).then(res => {
|
||||
const fr = res?.data?.firstRow
|
||||
this.bestMatch = (fr && Object.keys(fr).length > 0) ? fr : null
|
||||
if (!fr || Object.keys(fr).length === 0) { this.bestMatch = null; return }
|
||||
const excoilRows = res?.data?.excoilRows || []
|
||||
const excoil = excoilRows.length > 0 ? excoilRows[0] : null
|
||||
if (excoil) {
|
||||
fr.exit_length = excoil.exit_length ?? excoil.EXIT_LENGTH ?? fr.exit_length
|
||||
fr.start_time = excoil.start_date ?? excoil.START_DATE ?? null
|
||||
fr.end_time = excoil.end_date ?? excoil.END_DATE ?? null
|
||||
}
|
||||
this.bestMatch = fr
|
||||
}).catch(() => {}).finally(() => { this.matchLoading = false })
|
||||
},
|
||||
loadRecentList() {
|
||||
|
||||
@@ -641,6 +641,9 @@ export default {
|
||||
if (data.exit_thick != null) this.$set(this.updateForm, 'actualThickness', parseFloat(data.exit_thick))
|
||||
if (data.exit_width != null) this.$set(this.updateForm, 'actualWidth', parseFloat(data.exit_width))
|
||||
|
||||
if (data.start_date) this.$set(this.updateForm, 'productionStartTime', data.start_date)
|
||||
if (data.end_date) this.$set(this.updateForm, 'productionEndTime', data.date)
|
||||
|
||||
const query = {
|
||||
specification: data.exit_thick ? `${data.exit_thick}*${data.exit_width}` : '',
|
||||
material: data.grade,
|
||||
|
||||
Reference in New Issue
Block a user