twt 3 yıl önce
ebeveyn
işleme
c7846272a2
1 değiştirilmiş dosya ile 12 ekleme ve 12 silme
  1. 12 12
      pages/module/maintain.vue

+ 12 - 12
pages/module/maintain.vue

@@ -358,18 +358,18 @@ export default {
 										this.goodsTotal=this.goodsTotal.toFixed(2) 
 									}) 
 									//goods[0].salePrice=1;*/
-									/* this.goodsTotal=Number(this.goodsTotal)
-									if(!isNaN(goods[0].salePrice)){
-										this.goodsTotal+=goods[0].salePrice*goods[0].qty
+								    this.goodsTotal=Number(this.goodsTotal)
+									if(!isNaN(goods.goodsList[0].salePrice)){
+										this.goodsTotal+=goods.goodsList[0].salePrice*goods.goodsList[0].qty
 										this.goodsTotal=this.goodsTotal.toFixed(2)
 										
 									}else{
 									   this.isNull=false
 							     	}
-									if(goods[0].salePrice==null){
+									if(goods.goodsList[0].salePrice==null){
 										this.isNull=false
 									}
-									obj.listGoodsAll.push(goods[0]) */
+									obj.listGoodsAll.push(goods.goodsList[0]) 
 									
 								})
 								
@@ -454,7 +454,7 @@ export default {
 					     }
 					 });
 				 }
-				/* res.data.forEach(item=>{
+				 res.data.forEach(item=>{
 					//console.log(item)
 					item.listPackage.forEach((list,i)=>{
 						if(list.listGoodsAll.length>0){
@@ -462,11 +462,11 @@ export default {
 									list.listGoodsAll.forEach((goods,index)=>{
 										console.log(goods.goodsGroupDetail)
 										
-										if(goods[0].capacity&&!goods[0].del){
+										if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
 											//console.log(Number(list.referenceDosageQty)/goods[0].capacity)
-											if(Number(list.referenceDosageQty)/goods[0].capacity>1){
+											if(Number(list.referenceDosageQty)/goods.goodsList[0].capacity>1){
 												console.log("添加一条")
-												var addDta=list.listGoodsAll[index];
+												var addDta=list.listGoodsAll.goodsList[index];
 												
 												addDta.forEach(add=>{
 													add.del=true;
@@ -474,7 +474,7 @@ export default {
 												//addDta.splice(1,0)
 												//console.log(addDta)
 												var add=JSON.parse(JSON.stringify(addDta))
-												list.listGoodsAll.splice(index+1, 0,add)
+												//list.listGoodsAll[0].goodsList.splice(index+1, 0,add)
 												
 											}
 										}
@@ -482,11 +482,11 @@ export default {
 								
 						}
 					})
-				}) */
+				}) 
 				this.mealData=res.data;
 				this.mealData.splice(1,0)
 				console.log(this.mealData)
-				//this.calculation();
+				this.calculation();
 			})
 		},
         handbook(){