feat(wms): 优化钢卷选择器及发货计划界面

- 重构钢卷选择器组件,支持自定义列配置和对话框宽度
- 调整发货计划界面布局比例,增加质量状态等显示列
- 更新钢卷详情表单字段映射关系
This commit is contained in:
砂糖
2025-12-17 16:34:07 +08:00
parent a0652ca5fb
commit afac697752
3 changed files with 157 additions and 24 deletions

View File

@@ -15,7 +15,7 @@
</slot>
</div>
<el-dialog title="选择钢卷" :visible.sync="dialogVisible" width="900px" :close-on-click-modal="false"
<el-dialog title="选择钢卷" :visible.sync="dialogVisible" :width="dialogWidth" :close-on-click-modal="false"
@close="handleClose" append-to-body>
<!-- 搜索区域 -->
<el-form v-if="!rangeMode" :inline="true" :model="queryParams" class="search-form">
@@ -46,14 +46,15 @@
<!-- 数据表格 -->
<el-table v-loading="loading" :data="coilList" @row-click="handleRowClick" highlight-current-row height="400px"
style="width: 100%">
<el-table-column label="卷号" align="center" prop="currentCoilNo" :show-overflow-tooltip="true" />
<el-table-column label="存储位置" align="center" prop="actualWarehouseName" width="120" :show-overflow-tooltip="true" />
<el-table-column label="物料" align="center" prop="itemName" width="100" />
<el-table-column label="规格" align="center" prop="specification" width="100" />
<el-table-column label="材质" align="center" prop="material" width="100" />
<el-table-column label="厂家" align="center" prop="manufacturer" width="100" />
<el-table-column label="重量(t)" align="center" prop="netWeight" width="100" />
<el-table-column label="库区" align="center" prop="warehouseName" width="120" :show-overflow-tooltip="true" />
<!-- 自定义列 -->
<el-table-column
v-for="column in renderColumns"
:label="column.label"
:align="column.align"
:prop="column.prop"
:width="column.width"
:show-overflow-tooltip="column.showOverflowTooltip"
/>
</el-table>
<!-- 分页 -->
@@ -85,6 +86,10 @@ export default {
type: Boolean,
default: false
},
dialogWidth: {
type: String,
default: '900px'
},
// 过滤条件(可以预设一些查询条件)
filters: {
type: Object,
@@ -116,6 +121,11 @@ export default {
rangeData: {
type: Array,
default: () => []
},
// 自定义钢卷列的配置
coilColumn: {
type: Array,
default: () => []
}
},
data() {
@@ -134,7 +144,59 @@ export default {
grade: null,
selectType: 'raw_material',
dataType: 1 // 只查询当前数据,不查询历史数据
}
},
columns: [
{
label: '卷号',
align: 'center',
prop: 'currentCoilNo',
showOverflowTooltip: true
},
{
label: '存储位置',
align: 'center',
prop: 'actualWarehouseName',
width: '120',
showOverflowTooltip: true
},
{
label: '物料',
align: 'center',
prop: 'itemName',
width: '100'
},
{
label: '规格',
align: 'center',
prop: 'specification',
width: '100'
},
{
label: '材质',
align: 'center',
prop: 'material',
width: '100'
},
{
label: '厂家',
align: 'center',
prop: 'manufacturer',
width: '100'
},
{
label: '重量(t)',
align: 'center',
prop: 'netWeight',
width: '100'
},
{
label: '库区',
align: 'center',
prop: 'warehouseName',
width: '120',
showOverflowTooltip: true
},
]
};
},
computed: {
@@ -157,6 +219,10 @@ export default {
this.$emit('update:visible', val);
}
}
},
renderColumns() {
// 如果有自定义列配置,使用它;否则使用默认列
return this.coilColumn.length > 0 ? this.coilColumn : this.columns;
}
},
watch: {