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,20 +681,23 @@ export default {
this.$message.warning("请选择产品"); this.$message.warning("请选择产品");
return; return;
} }
let existsMsg = ""
// let exists = this.multiProduct.some(product => {
this.multiProduct.forEach(product => { if (this.countProductList.total != 0) {
return this.countProductList.some(item => {
if (this.countProductList.length != 0) { existsMsg = product.nameCode
this.countProductList.some(item => { return item && item.productId == product.relIdFk && item.batchNo == product.batchNo;
if (item.product && item.product.relIdFk == product.relIdFk && });
item.product.batchNo == product.batchNo ){
this.$message.error("当前产品【"+ product.nameCode + "】不能重复选入!");
return;
} }
}); });
if (exists){
this.$message.error("当前产品【"+ existsMsg + "】不能重复选入!");
return;
} }
//
this.multiProduct.forEach(product => {
let detailData = { let detailData = {
orderIdFk: this.formData.orderId, orderIdFk: this.formData.orderId,
productId: product.relIdFk, productId: product.relIdFk,
@ -707,6 +712,7 @@ export default {
}; };
this.countProductList.push(detailData); this.countProductList.push(detailData);
}); });
this.saveOrder(1); this.saveOrder(1);
this.selectInvProductVisible = false; this.selectInvProductVisible = false;
}, },

Loading…
Cancel
Save