|
|
|
@ -595,7 +595,7 @@ export default {
|
|
|
|
|
if (response.code === 20000) {
|
|
|
|
|
this.$message.success("保存成功!");
|
|
|
|
|
this.selectedIndex = null;
|
|
|
|
|
this.getCountOrderList();
|
|
|
|
|
this.getList();
|
|
|
|
|
} else {
|
|
|
|
|
this.$message.error(response.message);
|
|
|
|
|
}
|
|
|
|
@ -680,9 +680,19 @@ export default {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// if (this.countProductList.length === 0) {
|
|
|
|
|
//添加第一个产品,先保存单据,再添加单据详情
|
|
|
|
|
this.multiProduct.forEach(product => {
|
|
|
|
|
|
|
|
|
|
if (this.countProductList.length != 0) {
|
|
|
|
|
this.countProductList.some(item => {
|
|
|
|
|
if (item.product && item.product.relIdFk == product.relIdFk &&
|
|
|
|
|
item.product.batchNo == product.batchNo ){
|
|
|
|
|
this.$message.error("当前产品【"+ product.nameCode + "】不能重复选入!");
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
let detailData = {
|
|
|
|
|
orderIdFk: this.formData.orderId,
|
|
|
|
|
productId: product.relIdFk,
|
|
|
|
@ -697,9 +707,7 @@ export default {
|
|
|
|
|
};
|
|
|
|
|
this.countProductList.push(detailData);
|
|
|
|
|
});
|
|
|
|
|
// this.saveOrderDetail();
|
|
|
|
|
this.saveOrder(1);
|
|
|
|
|
// }
|
|
|
|
|
this.selectInvProductVisible = false;
|
|
|
|
|
},
|
|
|
|
|
getRowKeys(row) {
|
|
|
|
|