Browse Source

订单结算修改

zyh
w-R 3 years ago
parent
commit
0ee9dc7c1d
  1. 66
      lib/settlement/settlement_view/settlement_order_commodity.dart
  2. 2
      pubspec.yaml

66
lib/settlement/settlement_view/settlement_order_commodity.dart

@ -125,8 +125,8 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
children: [ children: [
MImage( MImage(
productList.skuImg, productList.skuImg,
width: 44, width: 55,
height: 44, height: 55,
fit: BoxFit.cover, fit: BoxFit.cover,
radius: BorderRadius.circular(4), radius: BorderRadius.circular(4),
errorSrc: "assets/image/default_1.webp", errorSrc: "assets/image/default_1.webp",
@ -136,18 +136,14 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
flex: 1, flex: 1,
child: Container( child: Container(
margin: EdgeInsets.only( margin: EdgeInsets.only(
left: 16.w, left:8.w,
), ),
// height: 44.h, // height: 44.h,
child: Column( child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround, mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start, crossAxisAlignment: CrossAxisAlignment.start,
children: [ children: [
Row( Text(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(child: Text(
productList.productName, productList.productName,
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -156,8 +152,18 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
fontSize: 14.sp, fontSize: 14.sp,
color: Color(0xFF353535), color: Color(0xFF353535),
), ),
),), ),
SizedBox(height: 4.h,),
Text(
productList.skuNameStr != null
? "${productList.skuNameStr ?? ""}"
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
),
),
Text( Text(
"x${productList.buyNum}", "x${productList.buyNum}",
style: TextStyle( style: TextStyle(
@ -165,39 +171,35 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
color: Color(0xFF727272), color: Color(0xFF727272),
), ),
), ),
], ],
), ),
Row( ),
mainAxisAlignment: MainAxisAlignment.spaceBetween, ),
crossAxisAlignment: CrossAxisAlignment.center, Column(
mainAxisAlignment: MainAxisAlignment.start,
crossAxisAlignment: CrossAxisAlignment.end,
children: [ children: [
Expanded( Text(
flex: 1, S.of(context).yuan_(AppUtils.calculateDouble(double.tryParse(productList.sellPrice ?? "0") - double.tryParse(productList.discountAmount ?? "0"))),
child: Text(
productList.skuNameStr != null
? "${productList.skuNameStr ?? ""}"
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle( style: TextStyle(
fontSize: 12.sp, fontWeight: FontWeight.bold,
color: Color(0xFFA29E9E), fontSize: 14.sp,
), color: Color(0xFF4C4C4C),
), ),
), ),
if(productList.discountAmount != null)
Text( Text(
S.of(context).yuan_(productList.sellPrice), S.of(context).yuan_(productList.sellPrice),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold, fontWeight: MyFontWeight.regular,
fontSize: 12.sp, fontSize: 12.sp,
color: Color(0xFF4C4C4C), decoration: TextDecoration.lineThrough,
color: Color(0xFFA29E9E),
), ),
) )
], ],
), )
],
),
),
),
], ],
), ),
); );
@ -409,9 +411,9 @@ class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
String totalPrice() { String totalPrice() {
if (widget.minOrderInfo != null && if (widget.minOrderInfo != null &&
widget.minOrderInfo.orderProductVOList != null) { widget.minOrderInfo.orderProductVOList != null) {
return "${widget.minOrderInfo.finalPayPrice}"; return "${widget.minOrderInfo.finalPayPrice}";
} }
if (widget.settleOrderInfo.orderProductList == null) return ""; if (widget.settleOrderInfo.orderProductList == null) return "";
return "${widget.settleOrderInfo.price}"; return "${widget.settleOrderInfo.price}";
} }
} }

2
pubspec.yaml

@ -3,7 +3,7 @@ description: 一心回乡.
publish_to: 'none' # Remove this line if you wish to publish to pub.dev publish_to: 'none' # Remove this line if you wish to publish to pub.dev
version: 2.0.34+22 version: 2.0.35+23
environment: environment:
sdk: ">=2.7.0 <3.0.0" sdk: ">=2.7.0 <3.0.0"

Loading…
Cancel
Save