feat(发货单): 增加发货单钢卷选择范围限制功能

- 在CoilSelector组件中新增rangeMode和rangeData属性,支持传入可选钢卷列表
- 发货单明细表增加对可选钢卷列表的支持,并在增删改时刷新列表
- 发货单打印时自动填充取货地点为实际库位前三位
- 调整操作列固定显示在表格右侧
This commit is contained in:
砂糖
2025-12-09 14:37:46 +08:00
parent d4e882610b
commit 2d30a2f3fb
7 changed files with 74 additions and 35 deletions

View File

@@ -18,7 +18,7 @@
<el-dialog title="选择钢卷" :visible.sync="dialogVisible" width="900px" :close-on-click-modal="false"
@close="handleClose" append-to-body>
<!-- 搜索区域 -->
<el-form :inline="true" :model="queryParams" class="search-form">
<el-form v-if="!rangeMode" :inline="true" :model="queryParams" class="search-form">
<el-form-item label="卷号">
<el-input v-model="queryParams.currentCoilNo" placeholder="请输入卷号" clearable size="small"
@keyup.enter.native="handleQuery" />
@@ -47,7 +47,7 @@
</el-table>
<!-- 分页 -->
<pagination v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
<pagination v-if="!rangeMode" v-show="total > 0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
@pagination="getList" />
<div slot="footer" class="dialog-footer">
@@ -91,6 +91,15 @@ export default {
type: Object,
default: null
},
rangeMode: {
type: Boolean,
default: false
},
// 返回选择模式不再通过list借口获取而是传入可以选择的钢卷数据
rangeData: {
type: Array,
default: () => []
}
},
data() {
return {
@@ -178,6 +187,12 @@ export default {
methods: {
// 获取钢卷列表
async getList() {
// 如果是范围模式,直接使用传入数据
if (this.rangeMode) {
this.coilList = this.rangeData || [];
this.total = this.coilList.length;
return;
}
try {
this.loading = true;
const params = { ...this.queryParams, ...this.filters };