收货地址显示;家庭成员头像显示;缴费记录时间显示

pull/1/head
戴余标 3 years ago
parent 452deaf97d
commit 835a266194

@ -101,66 +101,74 @@ class _LifePayRecordPageState extends State<LifePayRecordPage> {
borderRadius: BorderRadius.circular(8.w),
),
child: DateUtil.formatDate(DateUtil.getDateTime(model.createDate),
format: 'MM-dd HH-mm')
format: 'MM-dd HH:mm')
.text
.size(24.sp)
.color(Colors.black.withOpacity(0.45))
.make(),
),
Row(
Column(
children: [
model.chargesName.text
.size(30.sp)
.color(ktextPrimary)
.bold
.make(),
Spacer(),
'${model.buildingName + '' + model.unitName + '单元' + model.estateName}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make()
],
),
16.w.heightBox,
Row(
children: [
'缴纳金额'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.payAmount}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
Row(
children: [
'付款方式'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${getPayType[model.payType]}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
],
),
Row(
children: [
'流水号'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
Row(
children: [
'流水号'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
].sepWidget(separate: 24.w.heightBox),
)
.box
.color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 32.w, horizontal: 20.w))
.make(),
Row(
children: [
model.chargesName.text
.size(30.sp)
.color(ktextPrimary)
.bold
.make(),
Spacer(),
'${model.buildingName + '' + model.unitName + '单元' + model.estateName}'
.text
.size(24.sp)
.color(Color(0xFF999999))
.make()
],
),
16.w.heightBox,
Row(
children: [
'缴纳金额'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.payAmount}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
],
),
Row(
children: [
'付款方式'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${getPayType[model.payType]}'
.text
.color(ktextPrimary)
.size(28.sp)
.make(),
],
),
Row(
children: [
'流水号'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
Row(
children: [
'流水号'.text.color(ktextSubColor).size(28.sp).make(),
Spacer(),
'${model.code}'.text.color(ktextPrimary).size(28.sp).make(),
],
),
].sepWidget(separate: 24.w.heightBox),
)
.box
.color(Colors.white)
.padding(EdgeInsets.symmetric(vertical: 32.w, horizontal: 20.w))
.make(),
],
),
);
}
}

@ -68,6 +68,7 @@ class _MyAddressItemState extends State<MyAddressItem> {
if (result) {
await appProvider.getMyAddress();
widget.refreshController!.callRefresh();
Get.back();
}
},
child: Container(

@ -1,5 +1,7 @@
import 'package:json_annotation/json_annotation.dart';
import '../../model/common/img_model.dart';
part 'my_family_member_list_model.g.dart';
@JsonSerializable()
@ -29,6 +31,7 @@ class Member {
final int id;
final String name;
final int identity;
final List<ImgModel> avatarImgList;
factory Member.fromJson(Map<String, dynamic> json) => _$MemberFromJson(json);
@ -36,5 +39,6 @@ class Member {
required this.id,
required this.name,
required this.identity,
required this.avatarImgList,
});
}

@ -23,4 +23,7 @@ Member _$MemberFromJson(Map<String, dynamic> json) => Member(
id: json['id'] as int,
name: json['name'] as String,
identity: json['identity'] as int,
avatarImgList: (json['imgList'] as List<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
);

@ -74,8 +74,9 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
if (appProvider.defaultAddressModel == null) {
return '选择收货地址';
} else {
return (appProvider.defaultAddressModel!.locationName ?? '') +
(appProvider.defaultAddressModel!.addressDetail ?? '');
return (_goodDetail!.stockStatus == 1) ? '有货' : '无货';
// (appProvider.defaultAddressModel!.locationName ?? '') +
// (appProvider.defaultAddressModel!.addressDetail ?? '');
}
} else {
return (_addressModel!.locationName ?? '') +
@ -393,6 +394,7 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
var result = await Get.to(() => AddressListPage(
canBack: true,
));
_addressModel = null;
if (result != null) {
_addressModel = result;
_refreshController.callRefresh();
@ -418,8 +420,9 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
width: 430.w,
child: Text(
receiveAddress,
style:
TextStyle(fontSize: 24.sp, color: ktextPrimary),
style: receiveAddress == '无货'
? TextStyle(fontSize: 24.sp, color: kDangerColor)
: TextStyle(fontSize: 24.sp, color: ktextPrimary),
maxLines: 1,
overflow: TextOverflow.ellipsis,
),
@ -433,27 +436,27 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
16.wb,
],
),
Row(
crossAxisAlignment: CrossAxisAlignment.start,
children: [
120.wb,
20.hb,
Offstage(
offstage: receiveAddress == '选择收货地址',
child: (_goodDetail!.stockStatus == 1)
? '有货'
.text
.color(Color(0xFFE52E2E))
.size(28.sp)
.make()
: '无货'
.text
.color(Color(0xFFE52E2E))
.size(28.sp)
.make(),
)
],
),
// Row(
// crossAxisAlignment: CrossAxisAlignment.start,
// children: [
// 120.wb,
// 20.hb,
// Offstage(
// offstage: receiveAddress == '选择收货地址',
// child: (_goodDetail!.stockStatus == 1)
// ? '有货'
// .text
// .color(Color(0xFFE52E2E))
// .size(28.sp)
// .make()
// : '无货'
// .text
// .color(Color(0xFFE52E2E))
// .size(28.sp)
// .make(),
// )
// ],
// ),
],
),
),
@ -779,5 +782,4 @@ class _GoodDetailPageState extends State<GoodDetailPage> {
return count + '';
}
}

@ -12,6 +12,9 @@ import 'package:flutter_easyrefresh/easy_refresh.dart';
import 'package:flutter_screenutil/flutter_screenutil.dart';
import 'package:velocity_x/velocity_x.dart';
import '../../../model/common/img_model.dart';
import '../../../widget/bee_avatar_widget.dart';
class MemberView extends StatefulWidget {
const MemberView({Key? key}) : super(key: key);
@ -65,7 +68,7 @@ class _MemberViewState extends State<MemberView> {
children: [
Padding(
padding: EdgeInsets.symmetric(horizontal: 32.w, vertical: 24.w),
child: '${model.buildingName}${model.unitName}单元${model.estateName}房间'
child: '${model.buildingName}${model.unitName}单元${model.estateName}'
.text
.size(32.sp)
.color(Colors.black.withOpacity(0.85))
@ -79,7 +82,7 @@ class _MemberViewState extends State<MemberView> {
crossAxisCount: 4,
children: [
...model.members
.map((e) => _avatar(Identify.values[e.identity], e.name))
.map((e) => _avatar(e.avatarImgList,Identify.values[e.identity], e.name))
.toList()
],
shrinkWrap: true,
@ -92,6 +95,7 @@ class _MemberViewState extends State<MemberView> {
}
Widget _avatar(
List<ImgModel> imgModel,
Identify identify,
String name,
) {
@ -108,8 +112,11 @@ class _MemberViewState extends State<MemberView> {
decoration: BoxDecoration(
borderRadius: BorderRadius.circular(40.w),
border: Border.all(color: kPrimaryColor, width: 4.w)),
child: Assets.newIcon.avatarPlaceholder
.image(width: 80.w, height: 80.w),
child: BeeAvatarWidget(
width: 80.w,
height: 80.w,
imgs: imgModel,
),
),
Positioned(
bottom: -20.w,

Loading…
Cancel
Save