合计总价

函数

       sum() {//合计
                this.thisPeoData.forEach((value, index) => {
                    value.child.forEach((val, idx) => {
                        val.fine.forEach((v, i) => {
                            if (v.type === '早餐') {
                                this.bMoney += v.num * v.price;
                            } else if (v.type === '午餐') {
                                this.lMoney += v.num * v.price;
                            } else if (v.type === '晚餐') {
                                this.dMoney += v.num * v.price;
                            }
                        })
                    })
                })
            }
posted @ 2020-11-25 10:22  JaneLifeVlog  阅读(173)  评论(0)    收藏  举报