|
|
@@ -412,6 +412,7 @@
|
|
|
props: {
|
|
|
treeIds: { type: Array, default: () => [] },
|
|
|
returnProductList: { type: Array, default: () => [] },
|
|
|
+ receiveNo: { type: String, default: '' },
|
|
|
bizType: { type: Number, default: null }
|
|
|
},
|
|
|
data() {
|
|
|
@@ -524,14 +525,16 @@
|
|
|
matchesReturnPackage(source, row) {
|
|
|
return String(source.packageNo) === String(row.packageNo)
|
|
|
&& String(source.product.productId) === String(row.categoryId)
|
|
|
- && String(source.product.receiveProductId) === String(row.sourceReceiveProductId)
|
|
|
+ && (row.sourceReceiveProductId == null
|
|
|
+ || String(source.product.receiveProductId) === String(row.sourceReceiveProductId))
|
|
|
&& String(source.product.warehouseId) === String(row.warehouseId)
|
|
|
&& String(source.product.batchNo || '') === String(row.batchNo || '')
|
|
|
&& String(source.product.systemBatchNo || '') === String(row.systemBatchNo || '');
|
|
|
},
|
|
|
matchesReturnProduct(product, row) {
|
|
|
return String(product.productId) === String(row.categoryId)
|
|
|
- && String(product.receiveProductId) === String(row.sourceReceiveProductId)
|
|
|
+ && (row.sourceReceiveProductId == null
|
|
|
+ || String(product.receiveProductId) === String(row.sourceReceiveProductId))
|
|
|
&& String(product.warehouseId) === String(row.warehouseId)
|
|
|
&& (!product.batchNo || String(product.batchNo) === String(row.batchNo || ''))
|
|
|
&& (!product.systemBatchNo || String(product.systemBatchNo) === String(row.systemBatchNo || ''));
|
|
|
@@ -638,14 +641,20 @@
|
|
|
return;
|
|
|
}
|
|
|
const params = this.bizType === 10
|
|
|
- ? { ...this.searchForm, sourceReceiveProductIds: receiveProductIds.join(',') }
|
|
|
+ ? { ...this.searchForm,
|
|
|
+ sourceReceiveProductIds: receiveProductIds.join(','),
|
|
|
+ sourceBizNo: this.receiveNo || undefined }
|
|
|
: this.searchForm;
|
|
|
const data = await storageApi.getBatchList(params);
|
|
|
- for (let i = 0; i < data.list.length; i++) {
|
|
|
- data.list[i].outboundNum = this.getAvailableQuantity(data.list[i]);
|
|
|
+ const rows = this.bizType === 10
|
|
|
+ ? data.list.filter((row) => legacyProducts.some((product) =>
|
|
|
+ this.matchesReturnProduct(product, row)))
|
|
|
+ : data.list;
|
|
|
+ for (let i = 0; i < rows.length; i++) {
|
|
|
+ rows[i].outboundNum = this.getAvailableQuantity(rows[i]);
|
|
|
}
|
|
|
- this.tableData = data.list;
|
|
|
- this.total = data.count;
|
|
|
+ this.tableData = rows;
|
|
|
+ this.total = rows.length;
|
|
|
} else if (this.dimension == 4) {
|
|
|
// 物料维度
|
|
|
const data = await storageApi.getMaterialList(this.searchForm);
|
|
|
@@ -664,6 +673,7 @@
|
|
|
const params = this.bizType === 10
|
|
|
? { ...this.searchForm,
|
|
|
sourceReceiveProductIds: [...new Set(receiveProductIds)].join(','),
|
|
|
+ sourceBizNo: this.receiveNo || undefined,
|
|
|
...(packageSources.length ? {
|
|
|
packageNos: [...new Set(packageSources.map((source) => source.packageNo))].join(',')
|
|
|
} : {}),
|