Browse Source

Merge branches 'dev' and 'master' of https://git.lotus-wallet.com/fmk/huixiang_app

 Conflicts:
	lib/retrofit/data/shoppingCart.dart
	lib/store/store_order.dart
	lib/store/store_view/settlement.dart
	lib/store/store_view/shop_goods.dart
master
fmk 3 years ago
parent
commit
973aeff7d0
  1. 6
      lib/order/order_detail_page.dart
  2. 46
      lib/order/order_view/order_status.dart
  3. 787
      lib/retrofit/data/settleOrderInfo.dart
  4. 90
      lib/store/store_view/settlement.dart

6
lib/order/order_detail_page.dart

@ -70,6 +70,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
if (mounted) if (mounted)
setState(() { setState(() {
statusTitle(); statusTitle();
}); });
} }
} }
@ -95,8 +96,8 @@ class _OrderDetailPage extends State<OrderDetailPage> {
child: Scaffold( child: Scaffold(
backgroundColor: Colors.transparent, backgroundColor: Colors.transparent,
appBar: MyAppBar( appBar: MyAppBar(
title: title ?? S.of(context).jinxingzhongdedingdan, title: "订单详情",
titleColor: Colors.transparent, titleColor: Colors.white,
background: Colors.transparent, background: Colors.transparent,
leadingColor: Colors.white, leadingColor: Colors.white,
// toolbarHeight: (orderStatus >= 4 ? 118.h : 118.h) + // toolbarHeight: (orderStatus >= 4 ? 118.h : 118.h) +
@ -260,6 +261,7 @@ class _OrderDetailPage extends State<OrderDetailPage> {
} }
} }
Widget couponRemarks() { Widget couponRemarks() {
return Container( return Container(
margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 8.h, bottom: 2.h), margin: EdgeInsets.only(left: 16.w, right: 16.w, top: 8.h, bottom: 2.h),

46
lib/order/order_view/order_status.dart

@ -3,8 +3,8 @@ import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart'; import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/order_info.dart'; import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/utils/flutter_utils.dart'; import 'package:huixiang/utils/flutter_utils.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/border_text.dart'; import 'package:huixiang/view_widget/border_text.dart';
import 'package:huixiang/view_widget/icon_text.dart';
import 'package:huixiang/view_widget/round_button.dart'; import 'package:huixiang/view_widget/round_button.dart';
class OrderStatus extends StatefulWidget { class OrderStatus extends StatefulWidget {
@ -37,21 +37,21 @@ class _OrderStatus extends State<OrderStatus> {
padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 10.h), padding: EdgeInsets.fromLTRB(16.w, 0, 16.w, 10.h),
child: Column( child: Column(
children: [ children: [
Visibility( // Visibility(
visible: widget.center != null && widget.center != "", // visible: widget.center != null && widget.center != "",
child: Container( // child: Container(
child: IconText( // child: IconText(
(widget.center != null && widget.center != "") ? widget.center : "", // (widget.center != null && widget.center != "") ? widget.center : "",
leftImage: "assets/image/icon_order_ok.png", // // leftImage: "assets/image/icon_order_ok.png",
iconSize: 40.w, // // iconSize: 40.w,
textStyle: TextStyle( // textStyle: TextStyle(
fontSize: 24.sp, // fontSize: 18.sp,
fontWeight: FontWeight.bold, // fontWeight: MyFontWeight.semi_bold,
color: Colors.white, // color: Colors.white,
), // ),
), // ),
), // ),
), // ),
Expanded( Expanded(
child: Row( child: Row(
mainAxisAlignment: MainAxisAlignment.end, mainAxisAlignment: MainAxisAlignment.end,
@ -78,13 +78,25 @@ class _OrderStatus extends State<OrderStatus> {
backgroup: Color(0xFF32A060), backgroup: Color(0xFF32A060),
radius: 15.w, radius: 15.w,
), ),
Row(
mainAxisAlignment:MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.end,
children: [
Text( Text(
widget.title, widget.title,
style: TextStyle( style: TextStyle(
color: Colors.white, color: Colors.white,
fontSize: 12.sp, fontWeight: MyFontWeight.regular,
fontSize: 15.sp,
), ),
), ),
Image.asset(
"assets/image/order_ok.png",
height: 66.h,
width:66.w,
),
],
),
], ],
), ),
flex: 1, flex: 1,

787
lib/retrofit/data/settleOrderInfo.dart

@ -0,0 +1,787 @@
/// couponList : [{"allProduct":true,"bizId":"","bizType":0,"couponId":0,"discountAmount":0,"discountPercent":0,"fullAmount":0,"fullNumber":0,"id":0,"mid":0,"productList":[{"applyPrice":0,"attrStyle":0,"categoryId":0,"groupId":0,"id":0,"isDelete":0,"materialId":0,"needLogistics":0,"oversold":0,"posShow":true,"price":0,"printerFlag":"","productCode":"","productName":"","productNumber":0,"productType":0,"sellCount":0,"sellDesc":"","setMeal":0,"shortName":"","status":0,"stock":0,"storeId":0,"supplierName":"","weight":0}],"promotionId":0,"promotionName":"","publishEndTime":"","publishStartTime":"","receiveTime":"","status":0,"storeId":0,"tenantCode":"","type":0,"usable":true,"useEndTime":"","useStartTime":"","useTime":""}]
/// discountAmount : 0
/// freePostAge : 0
/// memberVO : {"addressId":0,"age":0,"balance":0,"birth":"","createTime":"","headimg":"","isBind":true,"level":0,"memberRankVo":{"id":0,"nextId":0,"nextName":"","nextOrigin":0,"rankContent":"","rankImg":"","rankName":"","rankOrigin":0,"status":true},"money":0,"nickname":"","phone":"","points":0,"remark":"","sex":"","userType":true,"vipNo":""}
/// mins : 0
/// orderNum : 0
/// orderProductList : [{"actInfo":{"couponDiscountAmount":0,"couponDiscountRate":0,"couponId":0,"couponType":0,"discountAmount":0,"discountRate":0,"promotionId":0,"promotionType":0},"applyPrice":0,"batch":0,"buyNum":0,"discountAmount":0,"discountPercent":0,"id":0,"isDelete":0,"orderId":0,"postPay":0,"productId":0,"productName":"","reason":"","refundNum":0,"sellPrice":0,"skuId":0,"skuImg":"","skuNameStr":"","status":true,"storeId":0,"tenantCode":"","type":0,"weight":0}]
/// orderSum : 0
/// postAge : 0
/// price : 0
/// productNum : 0
/// promotionInfoList : [{"activityEndTime":"","activityStartTime":"","applyEndTime":"","applyStartTime":"","canPartake":true,"channels":[],"description":"","doEndTime":{"hour":0,"minute":0,"nano":0,"second":0},"doStartTime":{"hour":0,"minute":0,"nano":0,"second":0},"id":0,"image":"","isDelete":0,"isNeedSecurityDeposit":0,"isVip":true,"name":"","promotionDetail":[{}],"promotionPlan":0,"promotionProuctList":[{"id":0,"isDelete":0,"productId":0,"promotionId":0,"tenantCode":""}],"promotionType":0,"securityDeposit":0,"status":0,"storeId":0,"tag":""}]
/// threshold : 0
class SettleOrderInfo {
List<CouponListBean> couponList;
int discountAmount;
int freePostAge;
MemberVOBean memberVO;
int mins;
int orderNum;
List<OrderProductListBean> orderProductList;
int orderSum;
int postAge;
int price;
int productNum;
List<PromotionInfoListBean> promotionInfoList;
int threshold;
static SettleOrderInfo fromJson(Map<String, dynamic> map) {
if (map == null) return null;
SettleOrderInfo settleOrderInfoBean = SettleOrderInfo();
settleOrderInfoBean.couponList = List()..addAll(
(map['couponList'] as List ?? []).map((o) => CouponListBean.fromJson(o))
);
settleOrderInfoBean.discountAmount = map['discountAmount'];
settleOrderInfoBean.freePostAge = map['freePostAge'];
settleOrderInfoBean.memberVO = MemberVOBean.fromJson(map['memberVO']);
settleOrderInfoBean.mins = map['mins'];
settleOrderInfoBean.orderNum = map['orderNum'];
settleOrderInfoBean.orderProductList = List()..addAll(
(map['orderProductList'] as List ?? []).map((o) => OrderProductListBean.fromJson(o))
);
settleOrderInfoBean.orderSum = map['orderSum'];
settleOrderInfoBean.postAge = map['postAge'];
settleOrderInfoBean.price = map['price'];
settleOrderInfoBean.productNum = map['productNum'];
settleOrderInfoBean.promotionInfoList = List()..addAll(
(map['promotionInfoList'] as List ?? []).map((o) => PromotionInfoListBean.fromJson(o))
);
settleOrderInfoBean.threshold = map['threshold'];
return settleOrderInfoBean;
}
Map toJson() => {
"couponList": couponList,
"discountAmount": discountAmount,
"freePostAge": freePostAge,
"memberVO": memberVO,
"mins": mins,
"orderNum": orderNum,
"orderProductList": orderProductList,
"orderSum": orderSum,
"postAge": postAge,
"price": price,
"productNum": productNum,
"promotionInfoList": promotionInfoList,
"threshold": threshold,
};
}
/// activityEndTime : ""
/// activityStartTime : ""
/// applyEndTime : ""
/// applyStartTime : ""
/// canPartake : true
/// channels : []
/// description : ""
/// doEndTime : {"hour":0,"minute":0,"nano":0,"second":0}
/// doStartTime : {"hour":0,"minute":0,"nano":0,"second":0}
/// id : 0
/// image : ""
/// isDelete : 0
/// isNeedSecurityDeposit : 0
/// isVip : true
/// name : ""
/// promotionDetail : [{}]
/// promotionPlan : 0
/// promotionProuctList : [{"id":0,"isDelete":0,"productId":0,"promotionId":0,"tenantCode":""}]
/// promotionType : 0
/// securityDeposit : 0
/// status : 0
/// storeId : 0
/// tag : ""
class PromotionInfoListBean {
String activityEndTime;
String activityStartTime;
String applyEndTime;
String applyStartTime;
bool canPartake;
List<dynamic> channels;
String description;
DoEndTimeBean doEndTime;
DoStartTimeBean doStartTime;
int id;
String image;
int isDelete;
int isNeedSecurityDeposit;
bool isVip;
String name;
List<PromotionDetailBean> promotionDetail;
int promotionPlan;
List<PromotionProuctListBean> promotionProuctList;
int promotionType;
int securityDeposit;
int status;
int storeId;
String tag;
static PromotionInfoListBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
PromotionInfoListBean promotionInfoListBean = PromotionInfoListBean();
promotionInfoListBean.activityEndTime = map['activityEndTime'];
promotionInfoListBean.activityStartTime = map['activityStartTime'];
promotionInfoListBean.applyEndTime = map['applyEndTime'];
promotionInfoListBean.applyStartTime = map['applyStartTime'];
promotionInfoListBean.canPartake = map['canPartake'];
promotionInfoListBean.channels = map['channels'];
promotionInfoListBean.description = map['description'];
promotionInfoListBean.doEndTime = DoEndTimeBean.fromJson(map['doEndTime']);
promotionInfoListBean.doStartTime = DoStartTimeBean.fromJson(map['doStartTime']);
promotionInfoListBean.id = map['id'];
promotionInfoListBean.image = map['image'];
promotionInfoListBean.isDelete = map['isDelete'];
promotionInfoListBean.isNeedSecurityDeposit = map['isNeedSecurityDeposit'];
promotionInfoListBean.isVip = map['isVip'];
promotionInfoListBean.name = map['name'];
promotionInfoListBean.promotionDetail = List()..addAll(
(map['promotionDetail'] as List ?? []).map((o) => PromotionDetailBean.fromJson(o))
);
promotionInfoListBean.promotionPlan = map['promotionPlan'];
promotionInfoListBean.promotionProuctList = List()..addAll(
(map['promotionProuctList'] as List ?? []).map((o) => PromotionProuctListBean.fromJson(o))
);
promotionInfoListBean.promotionType = map['promotionType'];
promotionInfoListBean.securityDeposit = map['securityDeposit'];
promotionInfoListBean.status = map['status'];
promotionInfoListBean.storeId = map['storeId'];
promotionInfoListBean.tag = map['tag'];
return promotionInfoListBean;
}
Map toJson() => {
"activityEndTime": activityEndTime,
"activityStartTime": activityStartTime,
"applyEndTime": applyEndTime,
"applyStartTime": applyStartTime,
"canPartake": canPartake,
"channels": channels,
"description": description,
"doEndTime": doEndTime,
"doStartTime": doStartTime,
"id": id,
"image": image,
"isDelete": isDelete,
"isNeedSecurityDeposit": isNeedSecurityDeposit,
"isVip": isVip,
"name": name,
"promotionDetail": promotionDetail,
"promotionPlan": promotionPlan,
"promotionProuctList": promotionProuctList,
"promotionType": promotionType,
"securityDeposit": securityDeposit,
"status": status,
"storeId": storeId,
"tag": tag,
};
}
/// id : 0
/// isDelete : 0
/// productId : 0
/// promotionId : 0
/// tenantCode : ""
class PromotionProuctListBean {
int id;
int isDelete;
int productId;
int promotionId;
String tenantCode;
static PromotionProuctListBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
PromotionProuctListBean promotionProuctListBean = PromotionProuctListBean();
promotionProuctListBean.id = map['id'];
promotionProuctListBean.isDelete = map['isDelete'];
promotionProuctListBean.productId = map['productId'];
promotionProuctListBean.promotionId = map['promotionId'];
promotionProuctListBean.tenantCode = map['tenantCode'];
return promotionProuctListBean;
}
Map toJson() => {
"id": id,
"isDelete": isDelete,
"productId": productId,
"promotionId": promotionId,
"tenantCode": tenantCode,
};
}
class PromotionDetailBean {
static PromotionDetailBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
PromotionDetailBean promotionDetailBean = PromotionDetailBean();
return promotionDetailBean;
}
Map toJson() => {
};
}
/// hour : 0
/// minute : 0
/// nano : 0
/// second : 0
class DoStartTimeBean {
int hour;
int minute;
int nano;
int second;
static DoStartTimeBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
DoStartTimeBean doStartTimeBean = DoStartTimeBean();
doStartTimeBean.hour = map['hour'];
doStartTimeBean.minute = map['minute'];
doStartTimeBean.nano = map['nano'];
doStartTimeBean.second = map['second'];
return doStartTimeBean;
}
Map toJson() => {
"hour": hour,
"minute": minute,
"nano": nano,
"second": second,
};
}
/// hour : 0
/// minute : 0
/// nano : 0
/// second : 0
class DoEndTimeBean {
int hour;
int minute;
int nano;
int second;
static DoEndTimeBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
DoEndTimeBean doEndTimeBean = DoEndTimeBean();
doEndTimeBean.hour = map['hour'];
doEndTimeBean.minute = map['minute'];
doEndTimeBean.nano = map['nano'];
doEndTimeBean.second = map['second'];
return doEndTimeBean;
}
Map toJson() => {
"hour": hour,
"minute": minute,
"nano": nano,
"second": second,
};
}
/// actInfo : {"couponDiscountAmount":0,"couponDiscountRate":0,"couponId":0,"couponType":0,"discountAmount":0,"discountRate":0,"promotionId":0,"promotionType":0}
/// applyPrice : 0
/// batch : 0
/// buyNum : 0
/// discountAmount : 0
/// discountPercent : 0
/// id : 0
/// isDelete : 0
/// orderId : 0
/// postPay : 0
/// productId : 0
/// productName : ""
/// reason : ""
/// refundNum : 0
/// sellPrice : 0
/// skuId : 0
/// skuImg : ""
/// skuNameStr : ""
/// status : true
/// storeId : 0
/// tenantCode : ""
/// type : 0
/// weight : 0
class OrderProductListBean {
ActInfoBean actInfo;
int applyPrice;
int batch;
int buyNum;
int discountAmount;
int discountPercent;
int id;
int isDelete;
int orderId;
int postPay;
int productId;
String productName;
String reason;
int refundNum;
int sellPrice;
int skuId;
String skuImg;
String skuNameStr;
bool status;
int storeId;
String tenantCode;
int type;
int weight;
static OrderProductListBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
OrderProductListBean orderProductListBean = OrderProductListBean();
orderProductListBean.actInfo = ActInfoBean.fromJson(map['actInfo']);
orderProductListBean.applyPrice = map['applyPrice'];
orderProductListBean.batch = map['batch'];
orderProductListBean.buyNum = map['buyNum'];
orderProductListBean.discountAmount = map['discountAmount'];
orderProductListBean.discountPercent = map['discountPercent'];
orderProductListBean.id = map['id'];
orderProductListBean.isDelete = map['isDelete'];
orderProductListBean.orderId = map['orderId'];
orderProductListBean.postPay = map['postPay'];
orderProductListBean.productId = map['productId'];
orderProductListBean.productName = map['productName'];
orderProductListBean.reason = map['reason'];
orderProductListBean.refundNum = map['refundNum'];
orderProductListBean.sellPrice = map['sellPrice'];
orderProductListBean.skuId = map['skuId'];
orderProductListBean.skuImg = map['skuImg'];
orderProductListBean.skuNameStr = map['skuNameStr'];
orderProductListBean.status = map['status'];
orderProductListBean.storeId = map['storeId'];
orderProductListBean.tenantCode = map['tenantCode'];
orderProductListBean.type = map['type'];
orderProductListBean.weight = map['weight'];
return orderProductListBean;
}
Map toJson() => {
"actInfo": actInfo,
"applyPrice": applyPrice,
"batch": batch,
"buyNum": buyNum,
"discountAmount": discountAmount,
"discountPercent": discountPercent,
"id": id,
"isDelete": isDelete,
"orderId": orderId,
"postPay": postPay,
"productId": productId,
"productName": productName,
"reason": reason,
"refundNum": refundNum,
"sellPrice": sellPrice,
"skuId": skuId,
"skuImg": skuImg,
"skuNameStr": skuNameStr,
"status": status,
"storeId": storeId,
"tenantCode": tenantCode,
"type": type,
"weight": weight,
};
}
/// couponDiscountAmount : 0
/// couponDiscountRate : 0
/// couponId : 0
/// couponType : 0
/// discountAmount : 0
/// discountRate : 0
/// promotionId : 0
/// promotionType : 0
class ActInfoBean {
int couponDiscountAmount;
int couponDiscountRate;
int couponId;
int couponType;
int discountAmount;
int discountRate;
int promotionId;
int promotionType;
static ActInfoBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
ActInfoBean actInfoBean = ActInfoBean();
actInfoBean.couponDiscountAmount = map['couponDiscountAmount'];
actInfoBean.couponDiscountRate = map['couponDiscountRate'];
actInfoBean.couponId = map['couponId'];
actInfoBean.couponType = map['couponType'];
actInfoBean.discountAmount = map['discountAmount'];
actInfoBean.discountRate = map['discountRate'];
actInfoBean.promotionId = map['promotionId'];
actInfoBean.promotionType = map['promotionType'];
return actInfoBean;
}
Map toJson() => {
"couponDiscountAmount": couponDiscountAmount,
"couponDiscountRate": couponDiscountRate,
"couponId": couponId,
"couponType": couponType,
"discountAmount": discountAmount,
"discountRate": discountRate,
"promotionId": promotionId,
"promotionType": promotionType,
};
}
/// addressId : 0
/// age : 0
/// balance : 0
/// birth : ""
/// createTime : ""
/// headimg : ""
/// isBind : true
/// level : 0
/// memberRankVo : {"id":0,"nextId":0,"nextName":"","nextOrigin":0,"rankContent":"","rankImg":"","rankName":"","rankOrigin":0,"status":true}
/// money : 0
/// nickname : ""
/// phone : ""
/// points : 0
/// remark : ""
/// sex : ""
/// userType : true
/// vipNo : ""
class MemberVOBean {
int addressId;
int age;
int balance;
String birth;
String createTime;
String headimg;
bool isBind;
int level;
MemberRankVoBean memberRankVo;
int money;
String nickname;
String phone;
int points;
String remark;
String sex;
bool userType;
String vipNo;
static MemberVOBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
MemberVOBean memberVOBean = MemberVOBean();
memberVOBean.addressId = map['addressId'];
memberVOBean.age = map['age'];
memberVOBean.balance = map['balance'];
memberVOBean.birth = map['birth'];
memberVOBean.createTime = map['createTime'];
memberVOBean.headimg = map['headimg'];
memberVOBean.isBind = map['isBind'];
memberVOBean.level = map['level'];
memberVOBean.memberRankVo = MemberRankVoBean.fromJson(map['memberRankVo']);
memberVOBean.money = map['money'];
memberVOBean.nickname = map['nickname'];
memberVOBean.phone = map['phone'];
memberVOBean.points = map['points'];
memberVOBean.remark = map['remark'];
memberVOBean.sex = map['sex'];
memberVOBean.userType = map['userType'];
memberVOBean.vipNo = map['vipNo'];
return memberVOBean;
}
Map toJson() => {
"addressId": addressId,
"age": age,
"balance": balance,
"birth": birth,
"createTime": createTime,
"headimg": headimg,
"isBind": isBind,
"level": level,
"memberRankVo": memberRankVo,
"money": money,
"nickname": nickname,
"phone": phone,
"points": points,
"remark": remark,
"sex": sex,
"userType": userType,
"vipNo": vipNo,
};
}
/// id : 0
/// nextId : 0
/// nextName : ""
/// nextOrigin : 0
/// rankContent : ""
/// rankImg : ""
/// rankName : ""
/// rankOrigin : 0
/// status : true
class MemberRankVoBean {
int id;
int nextId;
String nextName;
int nextOrigin;
String rankContent;
String rankImg;
String rankName;
int rankOrigin;
bool status;
static MemberRankVoBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
MemberRankVoBean memberRankVoBean = MemberRankVoBean();
memberRankVoBean.id = map['id'];
memberRankVoBean.nextId = map['nextId'];
memberRankVoBean.nextName = map['nextName'];
memberRankVoBean.nextOrigin = map['nextOrigin'];
memberRankVoBean.rankContent = map['rankContent'];
memberRankVoBean.rankImg = map['rankImg'];
memberRankVoBean.rankName = map['rankName'];
memberRankVoBean.rankOrigin = map['rankOrigin'];
memberRankVoBean.status = map['status'];
return memberRankVoBean;
}
Map toJson() => {
"id": id,
"nextId": nextId,
"nextName": nextName,
"nextOrigin": nextOrigin,
"rankContent": rankContent,
"rankImg": rankImg,
"rankName": rankName,
"rankOrigin": rankOrigin,
"status": status,
};
}
/// allProduct : true
/// bizId : ""
/// bizType : 0
/// couponId : 0
/// discountAmount : 0
/// discountPercent : 0
/// fullAmount : 0
/// fullNumber : 0
/// id : 0
/// mid : 0
/// productList : [{"applyPrice":0,"attrStyle":0,"categoryId":0,"groupId":0,"id":0,"isDelete":0,"materialId":0,"needLogistics":0,"oversold":0,"posShow":true,"price":0,"printerFlag":"","productCode":"","productName":"","productNumber":0,"productType":0,"sellCount":0,"sellDesc":"","setMeal":0,"shortName":"","status":0,"stock":0,"storeId":0,"supplierName":"","weight":0}]
/// promotionId : 0
/// promotionName : ""
/// publishEndTime : ""
/// publishStartTime : ""
/// receiveTime : ""
/// status : 0
/// storeId : 0
/// tenantCode : ""
/// type : 0
/// usable : true
/// useEndTime : ""
/// useStartTime : ""
/// useTime : ""
class CouponListBean {
bool allProduct;
String bizId;
int bizType;
int couponId;
int discountAmount;
int discountPercent;
int fullAmount;
int fullNumber;
int id;
int mid;
List<ProductListBean> productList;
int promotionId;
String promotionName;
String publishEndTime;
String publishStartTime;
String receiveTime;
int status;
int storeId;
String tenantCode;
int type;
bool usable;
String useEndTime;
String useStartTime;
String useTime;
static CouponListBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
CouponListBean couponListBean = CouponListBean();
couponListBean.allProduct = map['allProduct'];
couponListBean.bizId = map['bizId'];
couponListBean.bizType = map['bizType'];
couponListBean.couponId = map['couponId'];
couponListBean.discountAmount = map['discountAmount'];
couponListBean.discountPercent = map['discountPercent'];
couponListBean.fullAmount = map['fullAmount'];
couponListBean.fullNumber = map['fullNumber'];
couponListBean.id = map['id'];
couponListBean.mid = map['mid'];
couponListBean.productList = List()..addAll(
(map['productList'] as List ?? []).map((o) => ProductListBean.fromJson(o))
);
couponListBean.promotionId = map['promotionId'];
couponListBean.promotionName = map['promotionName'];
couponListBean.publishEndTime = map['publishEndTime'];
couponListBean.publishStartTime = map['publishStartTime'];
couponListBean.receiveTime = map['receiveTime'];
couponListBean.status = map['status'];
couponListBean.storeId = map['storeId'];
couponListBean.tenantCode = map['tenantCode'];
couponListBean.type = map['type'];
couponListBean.usable = map['usable'];
couponListBean.useEndTime = map['useEndTime'];
couponListBean.useStartTime = map['useStartTime'];
couponListBean.useTime = map['useTime'];
return couponListBean;
}
Map toJson() => {
"allProduct": allProduct,
"bizId": bizId,
"bizType": bizType,
"couponId": couponId,
"discountAmount": discountAmount,
"discountPercent": discountPercent,
"fullAmount": fullAmount,
"fullNumber": fullNumber,
"id": id,
"mid": mid,
"productList": productList,
"promotionId": promotionId,
"promotionName": promotionName,
"publishEndTime": publishEndTime,
"publishStartTime": publishStartTime,
"receiveTime": receiveTime,
"status": status,
"storeId": storeId,
"tenantCode": tenantCode,
"type": type,
"usable": usable,
"useEndTime": useEndTime,
"useStartTime": useStartTime,
"useTime": useTime,
};
}
/// applyPrice : 0
/// attrStyle : 0
/// categoryId : 0
/// groupId : 0
/// id : 0
/// isDelete : 0
/// materialId : 0
/// needLogistics : 0
/// oversold : 0
/// posShow : true
/// price : 0
/// printerFlag : ""
/// productCode : ""
/// productName : ""
/// productNumber : 0
/// productType : 0
/// sellCount : 0
/// sellDesc : ""
/// setMeal : 0
/// shortName : ""
/// status : 0
/// stock : 0
/// storeId : 0
/// supplierName : ""
/// weight : 0
class ProductListBean {
int applyPrice;
int attrStyle;
int categoryId;
int groupId;
int id;
int isDelete;
int materialId;
int needLogistics;
int oversold;
bool posShow;
int price;
String printerFlag;
String productCode;
String productName;
int productNumber;
int productType;
int sellCount;
String sellDesc;
int setMeal;
String shortName;
int status;
int stock;
int storeId;
String supplierName;
int weight;
static ProductListBean fromJson(Map<String, dynamic> map) {
if (map == null) return null;
ProductListBean productListBean = ProductListBean();
productListBean.applyPrice = map['applyPrice'];
productListBean.attrStyle = map['attrStyle'];
productListBean.categoryId = map['categoryId'];
productListBean.groupId = map['groupId'];
productListBean.id = map['id'];
productListBean.isDelete = map['isDelete'];
productListBean.materialId = map['materialId'];
productListBean.needLogistics = map['needLogistics'];
productListBean.oversold = map['oversold'];
productListBean.posShow = map['posShow'];
productListBean.price = map['price'];
productListBean.printerFlag = map['printerFlag'];
productListBean.productCode = map['productCode'];
productListBean.productName = map['productName'];
productListBean.productNumber = map['productNumber'];
productListBean.productType = map['productType'];
productListBean.sellCount = map['sellCount'];
productListBean.sellDesc = map['sellDesc'];
productListBean.setMeal = map['setMeal'];
productListBean.shortName = map['shortName'];
productListBean.status = map['status'];
productListBean.stock = map['stock'];
productListBean.storeId = map['storeId'];
productListBean.supplierName = map['supplierName'];
productListBean.weight = map['weight'];
return productListBean;
}
Map toJson() => {
"applyPrice": applyPrice,
"attrStyle": attrStyle,
"categoryId": categoryId,
"groupId": groupId,
"id": id,
"isDelete": isDelete,
"materialId": materialId,
"needLogistics": needLogistics,
"oversold": oversold,
"posShow": posShow,
"price": price,
"printerFlag": printerFlag,
"productCode": productCode,
"productName": productName,
"productNumber": productNumber,
"productType": productType,
"sellCount": sellCount,
"sellDesc": sellDesc,
"setMeal": setMeal,
"shortName": shortName,
"status": status,
"stock": stock,
"storeId": storeId,
"supplierName": supplierName,
"weight": weight,
};
}

90
lib/store/store_view/settlement.dart

@ -26,6 +26,7 @@ class Settlement extends StatefulWidget {
class _Settlement extends State<Settlement> { class _Settlement extends State<Settlement> {
ApiService apiService; ApiService apiService;
MinApiService minService;
int selectedBtn = 0; int selectedBtn = 0;
@override @override
@ -38,7 +39,7 @@ class _Settlement extends State<Settlement> {
context: context, context: context,
token: value.getString("token"), token: value.getString("token"),
); );
queryDetails(); queryOrderInfo();
}); });
} }
@ -73,6 +74,20 @@ class _Settlement extends State<Settlement> {
} }
} }
///
queryOrderInfo() async {
BaseData<SettleOrderInfo> baseData = await minService.getOrderInfo({
"addressId":0,
"isTake": 0,
"memberCouponId": 0,
"orderId": widget.arguments["orderId"],
"promotionId": 0
});
if (baseData != null && baseData.isSuccess) {
setState(() {});
}
}
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
return Stack( return Stack(
@ -118,9 +133,10 @@ class _Settlement extends State<Settlement> {
// if (payStatus == 0) couponRemarks(), // if (payStatus == 0) couponRemarks(),
/*(payStatus == 0) ? paySelector() : */ /*(payStatus == 0) ? paySelector() : */
/// ////
activityRemarks(), activityRemarks(),
///
payMethod(), payMethod(),
], ],
), ),
@ -385,19 +401,18 @@ class _Settlement extends State<Settlement> {
decoration: BoxDecoration( decoration: BoxDecoration(
image: selectedBtn == 2 image: selectedBtn == 2
? DecorationImage( ? DecorationImage(
image: image: AssetImage(
AssetImage("assets/image/order_btn3.png"), "assets/image/order_btn3.png"),
fit: BoxFit.fill, fit: BoxFit.fill,
) )
: null, : null,
borderRadius: BorderRadius.only( borderRadius: BorderRadius.only(
topRight: Radius.circular(8), topRight: Radius.circular(8))),
),
),
child: GestureDetector( child: GestureDetector(
onTap: () { onTap: () {
setState(() { setState(() {
selectedBtn = 2; // selectedBtn = 2;
SmartDialog.showToast("该功能暂未开放!", alignment: Alignment.center);
}); });
}, },
child: Stack( child: Stack(
@ -413,12 +428,12 @@ class _Settlement extends State<Settlement> {
), ),
], ],
), ),
), )),
),
), ),
], ],
), ),
), ),
selectedBtn == 0 ?
Container( Container(
width: double.infinity, width: double.infinity,
padding: EdgeInsets.only(left: 16, right: 16, top: 15), padding: EdgeInsets.only(left: 16, right: 16, top: 15),
@ -527,6 +542,61 @@ class _Settlement extends State<Settlement> {
) )
], ],
), ),
)
: Container(
width: double.infinity,
padding: EdgeInsets.only(left: 16, right: 16, top: 15),
child: Column(
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Image.asset(
"assets/image/icon_permission_location.png",
height:24.h,
width:24.w,
), Text(
"张先生",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF4C4C4C),
),
),
SizedBox(
width: 13,
),
Expanded(child: Text(
"12309090909",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 15.sp,
fontWeight: MyFontWeight.medium,
color: Color(0xFF4C4C4C),
),
),),
Icon(
Icons.keyboard_arrow_right,
size:24,
),
],
),
Padding(padding:EdgeInsets.only(top: 4,left:25),
child: Text(
"武昌区中国铁建凯德1818蓝调步行街中北路109附33门牌号05",
overflow: TextOverflow.ellipsis,
maxLines: 2,
style: TextStyle(
fontSize: 12.sp,
fontWeight: MyFontWeight.regular,
color: Color(0xFF727272),
),
),),
],
),
), ),
], ],
), ),

Loading…
Cancel
Save