修改 生活缴费

hmxc
张萌 4 years ago
parent 8c67e8c28f
commit 268a48d617

@ -212,17 +212,16 @@ class _LifePayPageState extends State<LifePayPage> {
return BeeScaffold(
title: '生活缴费',
actions: [
//TODO
// InkWell(
// onTap: () {
InkWell(
onTap: () {
// LifePayRecordPage().to();
// },
// child: Container(
// padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
// alignment: Alignment.center,
// child: '缴费记录'.text.black.size(28.sp).make(),
// ),
// ),
},
child: Container(
padding: EdgeInsets.fromLTRB(32.w, 28.w, 32.w, 20.w),
alignment: Alignment.center,
child: '缴费记录'.text.black.size(28.sp).make(),
),
),
],
body: BeeListView(
path: API.manager.dailyPaymentList,

@ -42,6 +42,27 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
return listLength == _selectItems.length;
}
@override
void initState() {
super.initState();
for (var i = 0; i < widget.model.dailyPaymentTypeVos.length; i++) {
for (var j = 0;
j < widget.model.dailyPaymentTypeVos[i].detailedVoList.length;
j++) {
String id = widget.model.dailyPaymentTypeVos[i].id.toString() +
widget.model.dailyPaymentTypeVos[i].detailedVoList[j].groupId
.toString();
if (!_selectItems.contains(id)) {
_selectItems.add(id);
_payNum += 1;
_payTotal += widget
.model.dailyPaymentTypeVos[i].detailedVoList[j].paymentPrice
.toDouble();
}
}
}
}
Widget _buildTile(int groupId, int id, int years, double price) {
return GestureDetector(
onTap: () {
@ -75,10 +96,6 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
.bold
.make(),
24.w.widthBox,
Icon(
CupertinoIcons.chevron_forward,
size: 40.w,
),
],
).material(color: Colors.transparent),
);
@ -131,7 +148,6 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
children: [
GestureDetector(
onTap: () {
setState(() {
if (isAllSelect) {
_selectItems.clear();
_payNum = 0;
@ -141,10 +157,10 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
i < widget.model.dailyPaymentTypeVos.length;
i++) {
for (var j = 0;
i <
j <
widget.model.dailyPaymentTypeVos[i].detailedVoList
.length;
i++) {
j++) {
String id =
widget.model.dailyPaymentTypeVos[i].id.toString() +
widget.model.dailyPaymentTypeVos[i]
@ -160,7 +176,7 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
}
}
}
});
setState(() {});
},
child: AnimatedContainer(
duration: Duration(milliseconds: 300),
@ -205,6 +221,7 @@ class _LifePayDetailPageState extends State<LifePayDetailPage> {
'已选$_payNum'.text.color(ktextSubColor).size(20.sp).make(),
],
),
8.w.widthBox,
MaterialButton(
elevation: 0,
shape: RoundedRectangleBorder(

Loading…
Cancel
Save