Commit 938068475e738f6bc9419e178502a393854080e1

Authored by wdn127929
2 parents b563aac8 97b8b6ce

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

... ... @@ -524,6 +524,7 @@
CURRENT_PROJECT_VERSION = 506;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ... @@ -718,6 +719,7 @@
CURRENT_PROJECT_VERSION = 506;
DEVELOPMENT_TEAM = 8J59HM8B82;
ENABLE_BITCODE = NO;
FLUTTER_BUILD_MODE = release;
... ...
... ... @@ -128,6 +128,9 @@ class SellerList extends Object {
@JsonKey(name: 'cdate')
String cdate;
@JsonKey(name: 'remaining_time')
int remainingTime;
String get cdateStr {
if (cdate != null) {
DateTime dateTime = DateTime.fromMillisecondsSinceEpoch(
... ... @@ -145,18 +148,18 @@ class SellerList extends Object {
}
SellerList(
this.id,
this.sellerid,
this.createUser,
this.uid,
this.aid,
this.gid,
this.content,
this.isUpdate,
this.finishedStatus,
this.edate,
this.cdate,
);
this.id,
this.sellerid,
this.createUser,
this.uid,
this.aid,
this.gid,
this.content,
this.isUpdate,
this.finishedStatus,
this.edate,
this.cdate,
this.remainingTime);
factory SellerList.fromJson(Map<String, dynamic> srcJson) =>
_$SellerListFromJson(srcJson);
... ...
... ... @@ -79,6 +79,7 @@ SellerList _$SellerListFromJson(Map<String, dynamic> json) {
json['finished_status'] as String,
json['edate'] as String,
json['cdate'] as String,
json['remaining_time'] as int,
);
}
... ... @@ -95,4 +96,5 @@ Map<String, dynamic> _$SellerListToJson(SellerList instance) =>
'finished_status': instance.finishedStatus,
'edate': instance.edate,
'cdate': instance.cdate,
'remaining_time': instance.remainingTime,
};
... ...
... ... @@ -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);
... ...
... ... @@ -146,9 +146,9 @@ class _MyMarketingRecordsPageState extends State<MyMarketingRecordsPage> {
HEmptyView(10),
Expanded(
child: Text(
data.edate == null
data.remainingTime == null
? '无限制'
: '剩余${11111}天',
: '剩余${data.remainingTime}天',
overflow: TextOverflow.ellipsis,
style: TextStyle(
color: MyColours.color_333333,
... ...