|
@@ -52,7 +52,7 @@
|
|
|
<view class="contZk">
|
|
|
<view class="contZkMain" v-show="item.planItem">
|
|
|
<view v-for="(vf,findex) in item.listGoodsAll">
|
|
|
- <view class="goodsItemLIne" v-for="(v,i) in vf" v-if="i==0" @click="goGoods(v)">
|
|
|
+ <view class="goodsItemLIne" v-for="(v,i) in vf.goodsList" v-if="i==0" @click="goGoods(v)">
|
|
|
<image :src="v.picUrl" mode="" class="goodsImg" v-if="v.picUrl"></image>
|
|
|
<image src="../../static/img/noimg.png" mode="" class="goodsImg sm" v-else></image>
|
|
|
<view class="goodsCont">
|
|
@@ -351,24 +351,25 @@ export default {
|
|
|
}
|
|
|
if(i.listGoodsAll.length>0){
|
|
|
i.listGoodsAll.forEach((goods,goodsIndex)=>{
|
|
|
+ console.log(goods.goodsGroupDetail)
|
|
|
/* goods.forEach(sp=>{
|
|
|
this.goodsTotal=Number(this.goodsTotal)
|
|
|
this.goodsTotal+=sp.salePrice*sp.qty
|
|
|
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
|
|
|
+ })
|
|
|
+ //goods[0].salePrice=1;*/
|
|
|
+ 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])
|
|
|
|
|
|
})
|
|
|
|
|
@@ -453,21 +454,19 @@ export default {
|
|
|
}
|
|
|
});
|
|
|
}
|
|
|
- res.data.forEach(item=>{
|
|
|
+ res.data.forEach(item=>{
|
|
|
//console.log(item)
|
|
|
item.listPackage.forEach((list,i)=>{
|
|
|
if(list.listGoodsAll.length>0){
|
|
|
- //console.log(list)
|
|
|
- //if(true){
|
|
|
- //if(list.listGoodsAll[i]!=list.listGoodsAll[i-1]){
|
|
|
+
|
|
|
list.listGoodsAll.forEach((goods,index)=>{
|
|
|
- //console.log(goods[0])
|
|
|
+ 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;
|
|
@@ -475,32 +474,15 @@ 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.splice(1,0)
|
|
|
- //list.listGoodsAll.push(list.listGoodsAll[index])
|
|
|
+ //list.listGoodsAll[0].goodsList.splice(index+1, 0,add)
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
})
|
|
|
- //}
|
|
|
- /* }else{
|
|
|
- list.listGoodsAll.forEach((goods,index)=>{
|
|
|
- //console.log(goods[0])
|
|
|
-
|
|
|
- if(goods[0].capacity){
|
|
|
- console.log(Number(list.referenceDosageQty)/goods[0].capacity)
|
|
|
- if(Number(list.referenceDosageQty)/goods[0].capacity>1){
|
|
|
- console.log("添加一条")
|
|
|
- list.listGoodsAll.splice(index+1, 0,list.listGoodsAll[index])
|
|
|
- //list.listGoodsAll.push(list.listGoodsAll[index])
|
|
|
- }
|
|
|
- }
|
|
|
- })
|
|
|
- } */
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
}
|
|
|
})
|
|
|
- })
|
|
|
+ })
|
|
|
this.mealData=res.data;
|
|
|
this.mealData.splice(1,0)
|
|
|
console.log(this.mealData)
|