fix:修复

dev_ksck
chenhc 1 month ago
parent 29d37a14cc
commit 5e3ce75514

@ -361,6 +361,7 @@ import {getInvListByUser} from "@/api/system/invWarehouse";
import invCountCodes from "@/views/inventory/count/InvCountCodes.vue"; import invCountCodes from "@/views/inventory/count/InvCountCodes.vue";
import {updateBizProduct} from "@/api/inout/orderDetailCode"; import {updateBizProduct} from "@/api/inout/orderDetailCode";
export default { export default {
props: { props: {
countOrder: { countOrder: {
@ -381,6 +382,7 @@ export default {
} }
}, },
data() { data() {
return { return {
formData: { formData: {
@ -679,36 +681,40 @@ export default {
this.$message.warning("请选择产品"); this.$message.warning("请选择产品");
return; return;
} }
let existsMsg = ""
let exists = this.multiProduct.some(product => {
if (this.countProductList.total != 0) {
return this.countProductList.some(item => {
existsMsg = product.nameCode
return item && item.productId == product.relIdFk && item.batchNo == product.batchNo;
});
}
});
if (exists){
this.$message.error("当前产品【"+ existsMsg + "】不能重复选入!");
return;
}
// //
this.multiProduct.forEach(product => { this.multiProduct.forEach(product => {
let detailData = {
if (this.countProductList.length != 0) { orderIdFk: this.formData.orderId,
this.countProductList.some(item => { productId: product.relIdFk,
if (item.product && item.product.relIdFk == product.relIdFk && nameCode: product.nameCode,
item.product.batchNo == product.batchNo ){ batchNo: product.batchNo,
this.$message.error("当前产品【"+ product.nameCode + "】不能重复选入!"); produceDate: product.productionDate,
return; expireDate: product.expireDate,
} invCode: this.formData.invStorageCode,
}); invSpaceCode: this.formData.invSpaceCode,
} invNum: product.reCount,
supId: product.supId
let detailData = { };
orderIdFk: this.formData.orderId, this.countProductList.push(detailData);
productId: product.relIdFk,
nameCode: product.nameCode,
batchNo: product.batchNo,
produceDate: product.productionDate,
expireDate: product.expireDate,
invCode: this.formData.invStorageCode,
invSpaceCode: this.formData.invSpaceCode,
invNum: product.reCount,
supId: product.supId
};
this.countProductList.push(detailData);
}); });
this.saveOrder(1);
this.selectInvProductVisible = false; this.saveOrder(1);
this.selectInvProductVisible = false;
}, },
getRowKeys(row) { getRowKeys(row) {
return row.id; return row.id;

Loading…
Cancel
Save