|
|
@ -1,4 +1,7 @@
|
|
|
|
// Flutter imports:
|
|
|
|
// Flutter imports:
|
|
|
|
|
|
|
|
import 'package:akuCommunity/base/base_style.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/model/manager/goods_out_model.dart';
|
|
|
|
|
|
|
|
import 'package:akuCommunity/utils/bee_map.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/cupertino.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
import 'package:flutter/material.dart';
|
|
|
|
|
|
|
|
|
|
|
@ -8,11 +11,46 @@ import 'goods_info_card_button.dart';
|
|
|
|
import 'image_horizontal_list.dart';
|
|
|
|
import 'image_horizontal_list.dart';
|
|
|
|
|
|
|
|
|
|
|
|
class GoodsInfoCard extends StatelessWidget {
|
|
|
|
class GoodsInfoCard extends StatelessWidget {
|
|
|
|
final List<String> listImage;
|
|
|
|
final GoodsOutModel model;
|
|
|
|
final String status;
|
|
|
|
GoodsInfoCard({
|
|
|
|
final List<Map<String, dynamic>> detoInfoList;
|
|
|
|
Key key,
|
|
|
|
GoodsInfoCard({Key key,this.listImage,this.status,this.detoInfoList}) : super(key: key);
|
|
|
|
this.model,
|
|
|
|
|
|
|
|
}) : super(key: key);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Widget _builTile(String title, String text) {
|
|
|
|
|
|
|
|
return Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(top: 8.w),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
title,
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 28.sp, color: Color(0xff999999)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
text,
|
|
|
|
|
|
|
|
style: TextStyle(fontSize: 28.sp, color: Color(0xff333333)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Color _getColor(int state) {
|
|
|
|
|
|
|
|
switch (state) {
|
|
|
|
|
|
|
|
case 1:
|
|
|
|
|
|
|
|
case 2:
|
|
|
|
|
|
|
|
case 3:
|
|
|
|
|
|
|
|
return kDarkPrimaryColor;
|
|
|
|
|
|
|
|
case 4:
|
|
|
|
|
|
|
|
case 5:
|
|
|
|
|
|
|
|
case 6:
|
|
|
|
|
|
|
|
case 7:
|
|
|
|
|
|
|
|
return ktextSubColor;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return kDangerColor;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
@override
|
|
|
|
@override
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
Widget build(BuildContext context) {
|
|
|
|
return Container(
|
|
|
|
return Container(
|
|
|
@ -41,18 +79,15 @@ class GoodsInfoCard extends StatelessWidget {
|
|
|
|
blurRadius: 10.0),
|
|
|
|
blurRadius: 10.0),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
padding: EdgeInsets.only(
|
|
|
|
padding: EdgeInsets.only(top: 25.w, left: 24.w, right: 24.w),
|
|
|
|
top: 25.w,
|
|
|
|
|
|
|
|
left: 24.w,
|
|
|
|
|
|
|
|
right: 24.w),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
child: Column(
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
padding: EdgeInsets.only(bottom: 24.w),
|
|
|
|
padding: EdgeInsets.only(bottom: 24.w),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
bottom:
|
|
|
|
color: Color(0xffeeeeee), width: 0.5)),
|
|
|
|
BorderSide(color: Color(0xffeeeeee), width: 0.5)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
child: Row(
|
|
|
|
child: Row(
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
@ -64,13 +99,11 @@ class GoodsInfoCard extends StatelessWidget {
|
|
|
|
fontSize: 32.sp,
|
|
|
|
fontSize: 32.sp,
|
|
|
|
color: Color(0xff333333)),
|
|
|
|
color: Color(0xff333333)),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Text(
|
|
|
|
Text(BeeMap().fixState[model.status],
|
|
|
|
status,
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontWeight: FontWeight.w600,
|
|
|
|
fontSize: 28.sp,
|
|
|
|
fontSize: 28.sp,
|
|
|
|
color: _getColor(model.status))),
|
|
|
|
color: Color(0xff333333))
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
@ -81,35 +114,16 @@ class GoodsInfoCard extends StatelessWidget {
|
|
|
|
),
|
|
|
|
),
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
decoration: BoxDecoration(
|
|
|
|
border: Border(
|
|
|
|
border: Border(
|
|
|
|
bottom: BorderSide(
|
|
|
|
bottom:
|
|
|
|
color: Color(0xffeeeeee), width: 0.5)),
|
|
|
|
BorderSide(color: Color(0xffeeeeee), width: 0.5)),
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Column(
|
|
|
|
|
|
|
|
children: detoInfoList
|
|
|
|
|
|
|
|
.map(
|
|
|
|
|
|
|
|
(item) => Container(
|
|
|
|
|
|
|
|
padding: EdgeInsets.only(top: 8.w),
|
|
|
|
|
|
|
|
child: Row(
|
|
|
|
|
|
|
|
mainAxisAlignment: MainAxisAlignment.spaceBetween,
|
|
|
|
|
|
|
|
children: [
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
item['title'],
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 28.sp,
|
|
|
|
|
|
|
|
color: Color(0xff999999)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
Text(
|
|
|
|
|
|
|
|
item['content'],
|
|
|
|
|
|
|
|
style: TextStyle(
|
|
|
|
|
|
|
|
fontSize: 28.sp,
|
|
|
|
|
|
|
|
color: Color(0xff333333)),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
),
|
|
|
|
|
|
|
|
)
|
|
|
|
|
|
|
|
.toList(),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
|
|
|
|
child: Column(children: [
|
|
|
|
|
|
|
|
_builTile('物品重量', BeeMap().goodsOutweight[model.weight]),
|
|
|
|
|
|
|
|
_builTile('出户时间', model.expectedTime),
|
|
|
|
|
|
|
|
_builTile('物品名称', model.name),
|
|
|
|
|
|
|
|
_builTile(
|
|
|
|
|
|
|
|
'搬运方式', BeeMap().goodsOutApproach[model.approach]),
|
|
|
|
|
|
|
|
]),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
|
margin: EdgeInsets.only(
|
|
|
@ -120,22 +134,25 @@ class GoodsInfoCard extends StatelessWidget {
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
crossAxisAlignment: CrossAxisAlignment.start,
|
|
|
|
children: [
|
|
|
|
children: [
|
|
|
|
Container(
|
|
|
|
Container(
|
|
|
|
|
|
|
|
alignment: Alignment.centerLeft,
|
|
|
|
margin: EdgeInsets.only(bottom: 25.w),
|
|
|
|
margin: EdgeInsets.only(bottom: 25.w),
|
|
|
|
child: Text(
|
|
|
|
child: Text(
|
|
|
|
'图片信息',
|
|
|
|
'图片信息',
|
|
|
|
style: TextStyle(
|
|
|
|
style: TextStyle(
|
|
|
|
fontSize: 28.sp,
|
|
|
|
fontSize: 28.sp, color: Color(0xff333333)),
|
|
|
|
color: Color(0xff333333)),
|
|
|
|
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
ImageHorizontalList(imageUrl: listImage),
|
|
|
|
ImageHorizontalList(imageUrl: []),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
),
|
|
|
|
GoodsInfoCardButton()
|
|
|
|
GoodsInfoCardButton(
|
|
|
|
|
|
|
|
id:model.id,
|
|
|
|
|
|
|
|
tel: model.movingCompanyTel,
|
|
|
|
|
|
|
|
)
|
|
|
|
],
|
|
|
|
],
|
|
|
|
),
|
|
|
|
),
|
|
|
|
);
|
|
|
|
);
|
|
|
|