Browse Source

更改

master
w-R 3 years ago
parent
commit
11059124ae
  1. BIN
      assets/image/2x/browse.png
  2. BIN
      assets/image/2x/follow.png
  3. BIN
      assets/image/2x/leaving_message.png
  4. BIN
      assets/image/3x/browse.png
  5. BIN
      assets/image/3x/follow.png
  6. BIN
      assets/image/3x/leaving_message.png
  7. BIN
      assets/image/browse.png
  8. BIN
      assets/image/follow.png
  9. BIN
      assets/image/leaving_message.png
  10. 56
      lib/mine/release_page.dart
  11. 1012
      lib/retrofit/data/settleOrderInfo.dart
  12. 361
      lib/store/store_view/settlement_order_commodity.dart

BIN
assets/image/2x/browse.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1003 B

BIN
assets/image/2x/follow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 808 B

BIN
assets/image/2x/leaving_message.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 583 B

BIN
assets/image/3x/browse.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

BIN
assets/image/3x/follow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/image/3x/leaving_message.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 988 B

BIN
assets/image/browse.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 432 B

BIN
assets/image/follow.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 429 B

BIN
assets/image/leaving_message.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 317 B

56
lib/mine/release_page.dart

@ -192,17 +192,42 @@ class _ReleasePage extends State<ReleasePage> {
height: 310.h,
),
SizedBox(height: 17.h),
Padding(padding: EdgeInsets.only(bottom: 16),
child:Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
children: [
InkWell(
onTap: () {
},
child: Image.asset(
"assets/image/browse.png",
height: 16.h,
width: 16.w,
),
),
SizedBox(width:4),
Text(
"15",
style: TextStyle(
fontSize: 12.sp,
color:Color(0xFF1A1A1A),
fontWeight: MyFontWeight.regular,
),
),
],
),
Row(
children: [
InkWell(
onTap: () {
},
child: Icon(
Icons.close,
color: Colors.black,
size: 16,
child: Image.asset(
"assets/image/leaving_message.png",
height: 16.h,
width: 16.w,
),
),
SizedBox(width:4),
@ -216,9 +241,30 @@ class _ReleasePage extends State<ReleasePage> {
),
],
),
Row(
children: [
InkWell(
onTap: () {
},
child: Image.asset(
"assets/image/follow.png",
height: 16.h,
width: 16.w,
),
),
SizedBox(width:4),
Text(
"25",
style: TextStyle(
fontSize: 12.sp,
color:Color(0xFF1A1A1A),
fontWeight: MyFontWeight.regular,
),
),
],
),
SizedBox(height: 16.h),
],
),),
],
),
);

1012
lib/retrofit/data/settleOrderInfo.dart

File diff suppressed because it is too large Load Diff

361
lib/store/store_view/settlement_order_commodity.dart

@ -0,0 +1,361 @@
import 'package:flutter/material.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:huixiang/generated/l10n.dart';
import 'package:huixiang/retrofit/data/order_info.dart';
import 'package:huixiang/retrofit/data/settleOrderInfo.dart';
import 'package:huixiang/utils/font_weight.dart';
import 'package:huixiang/view_widget/custom_image.dart';
import 'package:huixiang/view_widget/separator.dart';
class SettlementOrderCommodity extends StatefulWidget {
final int isTakeOut;
final SettleOrderInfo orderInfo;
SettlementOrderCommodity(this.orderInfo,this.isTakeOut);
@override
State<StatefulWidget> createState() {
return _SettlementOrderCommodity();
}
}
class _SettlementOrderCommodity extends State<SettlementOrderCommodity> {
@override
Widget build(BuildContext context) {
return Stack(
alignment: Alignment.centerRight,
children: [
Container(
margin: EdgeInsets.only(
left: 16.w,
right: 16.w,
top: 16.h,
bottom: 8.h,
),
padding: EdgeInsets.only(
left: 20.w,
right: 20.w,
top: 12.h,
bottom: 12.h,
),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(12),
offset: Offset(0, 1),
blurRadius: 12,
spreadRadius: 0,
),
],
borderRadius: BorderRadius.circular(8),
),
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
children: commodityList(),
),
),
Visibility(
child: buildQrCode(),
visible: false,
),
],
);
}
List<Widget> commodityList() {
if (widget.orderInfo == null) return [];
List<Widget> widgets = [];
if (widget.orderInfo.orderProductList != null) {
widgets
.addAll(widget.orderInfo.orderProductList.map((e) => commodityItem(e)).toList());
}
widgets.add(SizedBox(height: 20.h));
if (widget.isTakeOut != 0) {
//
widgets.add(discountItem(
Color(0xFFFF7A1A),
widget.isTakeOut == 1
? S.of(context).peisongfei
: S.of(context).yunfei,
"",
"+${widget.orderInfo.postAge}"));
}
widgets.add(Container(
margin: EdgeInsets.only(
top: 24.h,
bottom: 4.h,
),
child: MySeparator(
height: 1,
width: 5.w,
color: Colors.grey,
),
));
widgets.add(buildTotalPrice());
return widgets;
}
Widget commodityItem(OrderProductListBean productList) {
return Container(
margin: EdgeInsets.only(top: 8.h, bottom: 8.h),
child: Row(
children: [
MImage(
productList.skuImg,
width: 44.w,
height: 44,
fit: BoxFit.cover,
errorSrc: "assets/image/default_1.png",
fadeSrc: "assets/image/default_1.png",
),
Expanded(
flex: 1,
child: Container(
margin: EdgeInsets.only(
left: 16.w,
),
height: 44.h,
child: Column(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
productList.productName,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 14.sp,
color: Color(0xFF353535),
),
),
Text(
"x${productList.buyNum}",
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF727272),
),
),
],
),
Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Expanded(
flex: 1,
child: Text(
productList.weight != null
? "${productList.weight}kg"
: "",
overflow: TextOverflow.ellipsis,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFFA29E9E),
),
),
),
Text(
S.of(context).yuan_(productList.sellPrice),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12.sp,
color: Color(0xFF4C4C4C),
),
)
],
),
],
),
),
),
],
),
);
}
Widget discountItem(Color color, textName, condition, amount) {
return Container(
margin: EdgeInsets.only(top: 9.h, bottom: 9.h),
child: Row(
children: [
Container(
padding: EdgeInsets.fromLTRB(4.w, 2.h, 4.w, 2.h),
decoration: BoxDecoration(
borderRadius: BorderRadius.all(Radius.circular(2)),
border: Border.all(
width: 1,
color: color,
style: BorderStyle.solid,
),
),
child: Text(
textName,
style: TextStyle(
fontSize: 10.sp,
color: color,
),
),
),
SizedBox(
width: 27.w,
),
Expanded(
child: Text(
condition ?? "",
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
),
),
flex: 1,
),
Text(
S.of(context).yuan_("$amount"),
style: TextStyle(
fontSize: 12.sp,
color: color,
),
),
],
),
);
}
Widget buildQrCode() {
return Container(
margin: EdgeInsets.only(right: 16.w),
child: Stack(
children: [
Container(
width: 94.w,
height: 33.h,
margin: EdgeInsets.only(left: 12.w),
padding: EdgeInsets.only(left: 16.w),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 1),
blurRadius: 12,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.only(
topLeft: Radius.circular(2),
bottomLeft: Radius.circular(2),
),
),
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceAround,
crossAxisAlignment: CrossAxisAlignment.center,
children: [
Text(
S.of(context).qujianma,
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12.sp,
color: Colors.black,
),
),
Icon(
Icons.keyboard_arrow_right,
color: Colors.black,
size: 16,
)
],
),
),
Container(
margin: EdgeInsets.only(top: 6.h, bottom: 6.h),
// padding: EdgeInsets.all(2),
decoration: BoxDecoration(
color: Colors.white,
boxShadow: [
BoxShadow(
color: Colors.black.withAlpha(25),
offset: Offset(0, 1),
blurRadius: 12,
spreadRadius: 0,
)
],
borderRadius: BorderRadius.circular(2),
),
child: Icon(
Icons.qr_code,
size: 20,
color: Color(0xFF32A060),
),
),
],
),
);
}
Widget buildTotalPrice() {
return Container(
margin: EdgeInsets.only(top: 7.h, bottom: 11.h),
child: Row(
mainAxisAlignment: MainAxisAlignment.end,
crossAxisAlignment: CrossAxisAlignment.baseline,
textBaseline: TextBaseline.alphabetic,
children: [
Expanded(
child: Text(
S.of(context).gongjijianshangpin(
(widget.orderInfo != null && widget.orderInfo.orderProductList != null)
? widget.orderInfo.orderProductList.length
: "0"),
style: TextStyle(
fontSize: 10.sp,
color: Color(0xFFA29E9E),
fontWeight: MyFontWeight.semi_bold
),
),
flex: 1,
),
Container(
child: Text(
S.of(context).jiesuanjine,
style: TextStyle(
fontSize: 12.sp,
color: Color(0xFF353535),
fontWeight:MyFontWeight.semi_bold
),
),
),
SizedBox(
width: 5.w,
),
Text(
totalPrice(),
textAlign: TextAlign.end,
style: TextStyle(
fontSize:14.sp,
color: Color(0xFF32A060),
fontWeight: MyFontWeight.semi_bold
),
)
],
),
);
}
String totalPrice() {
if (widget.orderInfo == null) return "";
double totalPrice = (double.tryParse(widget.orderInfo.orderSum) +
double.tryParse(widget.orderInfo.postAge));
return "$totalPrice";
}
}
Loading…
Cancel
Save