twt 3 years ago
parent
commit
b95a0133af
1 changed files with 10 additions and 2 deletions
  1. 10 2
      pages/module/maintain.vue

+ 10 - 2
pages/module/maintain.vue

@@ -521,7 +521,7 @@ export default {
 													//addDta.splice(1,0)
 													console.log(addDta)
 													if(addDta.goodsList[0].capacity==goods.goodsList[0].capacity){
-																											  
+														 goods.goodsList[0].qty=1									  
 														 goods.goodsList[0].qty++
 													}else{
 														var add=JSON.parse(JSON.stringify(addDta))
@@ -859,6 +859,10 @@ export default {
 									
 									if(goods.goodsGroupDetail.length==0){
 										//同组品为空的情况
+										if(!list.referenceDosageQty){
+											goods.goodsList[0].qty=1;
+											return false;
+										}
 										console.log("同组品为空的情况")
 										var referenceDosageQty=Number(list.referenceDosageQty)
 										referenceDosageQty=Math.ceil(referenceDosageQty)
@@ -897,7 +901,7 @@ export default {
 													  //console.log(addDta)
 													  //console.log("第一个容量"+goods.goodsList[0].capacity)
 													  if(addDta.goodsList[0].capacity==goods.goodsList[0].capacity){
-														  
+														  goods.goodsList[0].qty=1
 														  goods.goodsList[0].qty++
 													  }else{
 														  var add=JSON.parse(JSON.stringify(addDta))
@@ -937,6 +941,10 @@ export default {
 									}else{
 										//同组品不为空的情况 
 										//console.log("同组品不为空的情况 ")
+										if(!list.referenceDosageQty){
+											goods.goodsList[0].qty=1;
+											return false;
+										}
 										var remainder=0;
 										var addNum=index
 										console.log("list.referenceDosageQty - "+list.referenceDosageQty+list.name)