twt 3 年之前
父节点
当前提交
adb777228e
共有 1 个文件被更改,包括 9 次插入9 次删除
  1. 9 9
      pages/module/maintain.vue

+ 9 - 9
pages/module/maintain.vue

@@ -459,24 +459,24 @@ export default {
 					item.listPackage.forEach((list,i)=>{
 						if(list.listGoodsAll.length>0){
 									list.listGoodsAll.forEach((goods,index)=>{
-										console.log(goods.goodsGroupDetail)
+										//console.log(goods.goodsGroupDetail)
 										
-										/* if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
+										 if(goods.goodsList[0].capacity&&!goods.goodsList[0].del){
 											//console.log(Number(list.referenceDosageQty)/goods[0].capacity)
 											if(Number(list.referenceDosageQty)/goods.goodsList[0].capacity>1){
 												console.log("添加一条")
-												var addDta=list.listGoodsAll.goodsList[index];
-												
-												addDta.forEach(add=>{
+												var addDta=goods.goodsList[0];
+												addDta.del=true;
+												/* addDta.forEach(add=>{
 													add.del=true;
-												})
+												}) */
 												//addDta.splice(1,0)
-												//console.log(addDta)
+												console.log(addDta)
 												var add=JSON.parse(JSON.stringify(addDta))
-												//list.listGoodsAll[0].goodsList.splice(index+1, 0,add)
+												list.listGoodsAll[0].goodsList.splice(index+1, 0,add)
 												
 											}
-										} */
+										} 
 									})
 								
 						}