Commit 97b8b6ce994fb58e6d948ced3d701bbefb5fc195

Authored by wdn127929
1 parent 9dae68ee

已点菜品页面总价未计算多份

... ... @@ -83,13 +83,15 @@ class _MessageHasOrderFoodPageState extends State<MessageHasOrderFoodPage> {
double sumMemberPrice = 0;
_orderFoodProvider.createdOrderSunModel.cookbooklist.forEach((element) {
sumPrice +=
element.specPrice == null ? 0 : double.parse(element.specPrice);
sumMemberPrice += double.parse(
element.specMemberPrice == '0' || element.specMemberPrice == null
(element.specPrice == null ? 0 : double.parse(element.specPrice)) *
int.parse(element.number);
sumMemberPrice += double.parse(element.specMemberPrice == '0' ||
element.specMemberPrice == null
? element.specPrice == null
? '0'
: element.specPrice
: element.specMemberPrice);
: element.specMemberPrice) *
int.parse(element.number);
});
sumPriceShow =
(NumUtil.getNumByValueDouble(sumPrice, 2)).toStringAsFixed(2);
... ...