fix(GenerateDeliveryForm): 修复配货时采购单截断及提示错误问题

- 显式传递分页参数避免采购单被截断
- 更新错误提示为当前无可用采购单时的场景
cp_1.0.0
kangwenjing 2026-10-28 11:03:37 +08:00
parent 8494a26570
commit 0eea95f20d
1 changed files with 4 additions and 2 deletions

View File

@ -186,6 +186,7 @@ export default {
return this.purchaseOrderList.filter(purchase => {
const phNum = purchase.phNum || 0;
const bhNum = purchase.bhNum || 0;
// 只保留本订单已配备货绑定、且还有未配货发完数量的采购单
return phNum > 0 && phNum > bhNum;
});
},
@ -260,7 +261,8 @@ export default {
this.getSnList();
return;
}
productMatchBindList(orderCode, productCode).then(response => {
// 显式传分页参数:后端 startPage() 默认只返回 10 条,会把已绑定的采购单截断导致页签缺失
productMatchBindList(orderCode, productCode, { pageNum: 1, pageSize: 100 }).then(response => {
this.purchaseOrderList = response.rows || [];
const filtered = this.filteredPurchaseOrderList;
if (filtered.length > 0) {
@ -445,7 +447,7 @@ export default {
handleSelectPurchaseBeforeAssign() {
// 指定发货直接使用当前选中的采购单号
if (!this.activePurchaseNo) {
this.$message.error('请先选择一个采购单标签页');
this.$message.error('当前产品没有可用采购单,无法指定发货');
return;
}