feat(wms/acid): 出口卷实绩新增筛选条件并优化搜索功能

1.  为出口卷实绩接口新增钢卷号模糊搜索和时间范围过滤能力
2.  给入场/当前卷号输入框添加清除按钮
3.  优化酸洗实绩页面的布局样式
4.  重构实绩列表分页和搜索逻辑
This commit is contained in:
2026-05-28 13:24:58 +08:00
parent 1c272792f7
commit d9f9c948cc
6 changed files with 90 additions and 49 deletions

View File

@@ -127,19 +127,20 @@ export function getRollHistoryCount(rollId, standId) {
}
// 出口卷实绩列表分页PLTCM_PDO_EXCOIL
export function getExcoilList(page = 1, pageSize = 50) {
export function getExcoilList(page = 1, pageSize = 50, coilId, startDate, endDate) {
return request({
url: '/sql-server-api/excoil',
method: 'get',
params: { page, pageSize }
params: { page, pageSize, coilId, startDate, endDate }
})
}
// 出口卷实绩总数
export function getExcoilCount() {
export function getExcoilCount(coilId, startDate, endDate) {
return request({
url: '/sql-server-api/excoil/count',
method: 'get'
method: 'get',
params: { coilId, startDate, endDate }
})
}

View File

@@ -1,5 +1,5 @@
<template>
<div>
<div class="actual-page">
<div class="actual-container">
<!-- 顶部实绩列表 (PLTCM_PDO_EXCOIL) -->
<div class="top-section">
@@ -403,6 +403,7 @@ export default {
searchStartDate: '',
searchEndDate: '',
pagination: { page: 1, pageSize: 50, total: 0 },
currentFilters: { coilId: null, startDate: null, endDate: null },
topTableHeight: 'calc(40vh - 80px)',
chartInstances: [],
resizeHandler: null,
@@ -417,16 +418,16 @@ export default {
this.disposeAllCharts()
},
methods: {
async loadExcoilCount() {
async loadExcoilCount(coilId, startDate, endDate) {
try {
const res = await getExcoilCount()
const res = await getExcoilCount(coilId, startDate, endDate)
this.pagination.total = res?.data?.total ?? 0
} catch (_) {}
},
async loadExcoilList() {
async loadExcoilList(coilId, startDate, endDate) {
this.excoilLoading = true
try {
const res = await getExcoilList(this.pagination.page, this.pagination.pageSize)
const res = await getExcoilList(this.pagination.page, this.pagination.pageSize, coilId, startDate, endDate)
this.excoilRows = res?.data?.rows || []
} finally {
this.excoilLoading = false
@@ -434,7 +435,7 @@ export default {
},
handlePageChange(page) {
this.pagination.page = page
this.loadExcoilList()
this.loadExcoilList(this.currentFilters.coilId, this.currentFilters.startDate, this.currentFilters.endDate)
},
async handleRowClick(row) {
// 快速点击防重:每次点击递增版本号,旧的 sync 任务检测到版本号变更后自动放弃
@@ -840,26 +841,26 @@ export default {
},
// ── 查找 ─────────────────────────────────────
handleFindSearch() {
if (this.searchType === 'coil' && this.searchCoilId) {
const found = this.excoilRows.find(r =>
(r.EXCOILID || r.excoilid || '').includes(this.searchCoilId)
)
if (found) {
this.$refs.excoilTable && this.$refs.excoilTable.setCurrentRow(found)
this.handleRowClick(found)
} else {
this.$message.info('当前页未找到该卷号,请翻页查找')
}
} else {
this.pagination.page = 1
this.loadExcoilList()
}
async handleFindSearch() {
const coilId = this.searchType === 'coil' ? (this.searchCoilId || null) : null
const startDate = this.searchType === 'time' ? (this.searchStartDate || null) : null
const endDate = this.searchType === 'time' ? (this.searchEndDate || null) : null
this.currentFilters = { coilId, startDate, endDate }
this.pagination.page = 1
this.selectedRow = null
this.segData = null
this.gaugeRows = null
this.shapeRows = null
this.selectedTrendParam = null
this.disposeAllCharts()
await this.loadExcoilCount(coilId, startDate, endDate)
await this.loadExcoilList(coilId, startDate, endDate)
},
handleFindReset() {
this.searchCoilId = ''
this.searchStartDate = ''
this.searchEndDate = ''
this.currentFilters = { coilId: null, startDate: null, endDate: null }
this.selectedRow = null
this.segData = null
this.gaugeRows = null
@@ -899,6 +900,14 @@ export default {
</script>
<style scoped lang="scss">
/* 外层 wrapper必须限定高度否则 flex 百分比高度失效,导致内容溢出屏幕 */
.actual-page {
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
}
.actual-container {
display: flex;
flex-direction: column;
@@ -907,6 +916,7 @@ export default {
background: #f0f2f5;
gap: 6px;
box-sizing: border-box;
overflow: hidden;
}
.top-section {
@@ -948,6 +958,7 @@ export default {
display: flex;
flex-direction: column;
min-height: 0;
overflow: hidden;
::v-deep .el-tabs__content {
flex: 1;

View File

@@ -16,10 +16,10 @@
<!-- 常规筛选区, 通过调拨前库区和调拨后库区查询 -->
<el-form :model="queryParams" inline>
<el-form-item label="入场卷号">
<el-input v-model="queryParams.enterCoilNo" placeholder="请输入入场卷号"></el-input>
<el-input v-model="queryParams.enterCoilNo" placeholder="请输入入场卷号" clearable></el-input>
</el-form-item>
<el-form-item label="当前卷号">
<el-input v-model="queryParams.currentCoilNo" placeholder="请输入当前卷号"></el-input>
<el-input v-model="queryParams.currentCoilNo" placeholder="请输入当前卷号" clearable></el-input>
</el-form-item>
<el-form-item label="调拨前库区">
<WarehouseSelect v-model="queryParams.warehouseIdBefore" placeholder="请选择调拨前库区">