dock interface:dailyPayment/list

hmxc
张萌 4 years ago
parent 7fc9cd8aba
commit 5c08941e34

@ -139,6 +139,9 @@ class _Manager {
///
String get fromLoss => '/user/articleBorrow/frmLoss';
///list
String get dailyPaymentList => '/user/dailyPayment/list';
}
class _Community {

@ -0,0 +1,138 @@
class LifePayMolde {
int years;
int paymentNum;
List<DailyPaymentTypeVos> dailyPaymentTypeVos;
LifePayMolde({this.years, this.paymentNum, this.dailyPaymentTypeVos});
LifePayMolde.fromJson(Map<String, dynamic> json) {
years = json['years'];
paymentNum = json['paymentNum'];
if (json['dailyPaymentTypeVos'] != null) {
dailyPaymentTypeVos = new List<DailyPaymentTypeVos>();
json['dailyPaymentTypeVos'].forEach((v) {
dailyPaymentTypeVos.add(new DailyPaymentTypeVos.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['years'] = this.years;
data['paymentNum'] = this.paymentNum;
if (this.dailyPaymentTypeVos != null) {
data['dailyPaymentTypeVos'] =
this.dailyPaymentTypeVos.map((v) => v.toJson()).toList();
}
return data;
}
}
class DailyPaymentTypeVos {
int id;
String name;
List<DetailedVoList> detailedVoList;
DailyPaymentTypeVos({this.id, this.name, this.detailedVoList});
DailyPaymentTypeVos.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
if (json['detailedVoList'] != null) {
detailedVoList = new List<DetailedVoList>();
json['detailedVoList'].forEach((v) {
detailedVoList.add(new DetailedVoList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
if (this.detailedVoList != null) {
data['detailedVoList'] =
this.detailedVoList.map((v) => v.toJson()).toList();
}
return data;
}
}
class DetailedVoList {
int groupId;
int paymentPrice;
List<DetailsVoList> detailsVoList;
DetailedVoList({this.groupId, this.paymentPrice, this.detailsVoList});
DetailedVoList.fromJson(Map<String, dynamic> json) {
groupId = json['groupId'];
paymentPrice = json['paymentPrice'];
if (json['detailsVoList'] != null) {
detailsVoList = new List<DetailsVoList>();
json['detailsVoList'].forEach((v) {
detailsVoList.add(new DetailsVoList.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['groupId'] = this.groupId;
data['paymentPrice'] = this.paymentPrice;
if (this.detailsVoList != null) {
data['detailsVoList'] =
this.detailsVoList.map((v) => v.toJson()).toList();
}
return data;
}
}
class DetailsVoList {
int id;
String month;
int costPrice;
int paidPrice;
int totalPrice;
String beginDate;
String endDate;
String unitPriceType;
int num;
DetailsVoList(
{this.id,
this.month,
this.costPrice,
this.paidPrice,
this.totalPrice,
this.beginDate,
this.endDate,
this.unitPriceType,
this.num});
DetailsVoList.fromJson(Map<String, dynamic> json) {
id = json['id'];
month = json['month'];
costPrice = json['costPrice'];
paidPrice = json['paidPrice'];
totalPrice = json['totalPrice'];
beginDate = json['beginDate'];
endDate = json['endDate'];
unitPriceType = json['unitPriceType'];
num = json['num'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['month'] = this.month;
data['costPrice'] = this.costPrice;
data['paidPrice'] = this.paidPrice;
data['totalPrice'] = this.totalPrice;
data['beginDate'] = this.beginDate;
data['endDate'] = this.endDate;
data['unitPriceType'] = this.unitPriceType;
data['num'] = this.num;
return data;
}
}

@ -1,18 +1,20 @@
// Flutter imports:
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/constants/api.dart';
import 'package:akuCommunity/model/manager/life_pay_model.dart';
import 'package:akuCommunity/pages/personal/widget/order_card.dart';
import 'package:akuCommunity/pages/things_page/widget/bee_list_view.dart';
import 'package:flutter/cupertino.dart';
import 'package:flutter/material.dart';
import 'package:flutter_easyrefresh/easy_refresh.dart';
// Package imports:
import 'package:velocity_x/velocity_x.dart';
// Project imports:
import 'package:akuCommunity/pages/life_pay/life_pay_info_page/life_pay_info_page.dart';
import 'package:akuCommunity/pages/life_pay/life_pay_record_page/life_pay_record_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
import 'package:akuCommunity/widget/bee_scaffold.dart';
import 'widget/order_card.dart';
import 'widget/submit_bar.dart';
class LifePayPage extends StatefulWidget {
LifePayPage({Key key}) : super(key: key);
@ -22,6 +24,21 @@ class LifePayPage extends StatefulWidget {
}
class _LifePayPageState extends State<LifePayPage> {
EasyRefreshController _controller;
@override
void initState() {
super.initState();
_controller = EasyRefreshController();
}
@override
void dispose() {
_controller?.dispose();
super.dispose();
}
@override
Widget build(BuildContext context) {
return BeeScaffold(
@ -38,45 +55,61 @@ class _LifePayPageState extends State<LifePayPage> {
),
),
],
body: Stack(
children: [
ListView(
padding: EdgeInsets.only(bottom: 130.w),
children: [
Container(
margin: EdgeInsets.only(
top: 32.w,
left: 32.w,
right: 32.w,
),
child: RichText(
text: TextSpan(
style:
TextStyle(fontSize: 28.sp, color: Color(0xff666666)),
children: <InlineSpan>[
TextSpan(
text: '深圳华茂悦峰',
),
TextSpan(
text: '1幢-1单元-702室',
style: TextStyle(fontWeight: FontWeight.bold),
),
]),
),
),
OrderCard(
fun: LifePayInfoPage(
bundle: Bundle()
..putMap('commentMap', {'title': '明细', 'isActions': false}),
).to),
],
),
Positioned(
bottom: 0,
child: SubmitBar(title: '去缴费'),
),
],
),
// body: Stack(
// children: [
// ListView(
// padding: EdgeInsets.only(bottom: 130.w),
// children: [
// Container(
// margin: EdgeInsets.only(
// top: 32.w,
// left: 32.w,
// right: 32.w,
// ),
// child: RichText(
// text: TextSpan(
// style:
// TextStyle(fontSize: 28.sp, color: Color(0xff666666)),
// children: <InlineSpan>[
// TextSpan(
// text: '深圳华茂悦峰',
// ),
// TextSpan(
// text: '1幢-1单元-702室',
// style: TextStyle(fontWeight: FontWeight.bold),
// ),
// ]),
// ),
// ),
// OrderCard(
// fun: LifePayInfoPage(
// bundle: Bundle()
// ..putMap('commentMap', {'title': '明细', 'isActions': false}),
// ).to),
// ],
// ),
// Positioned(
// bottom: 0,
// child: SubmitBar(title: '去缴费'),
// ),
// ],
// ),
body: BeeListView(
path: API.manager.dailyPaymentList,
controller: _controller,
convert: (model) {
return model.tableList
.map((e) => LifePayMolde.fromJson(e))
.toList();
},
builder: (items){
return ListView.builder(itemBuilder: (context, index){
// return _buildCard(items[index]);
return OrderCard();
},
// itemCount: items.length,
) ;
}),
);
}
}

@ -4,20 +4,17 @@ import 'package:flutter/material.dart';
// Project imports:
import 'package:akuCommunity/base/base_style.dart';
import 'package:akuCommunity/pages/life_pay/life_pay_info_page/life_pay_info_page.dart';
import 'package:akuCommunity/routers/page_routers.dart';
import 'package:akuCommunity/utils/headers.dart';
class OrderCard extends StatefulWidget {
final Function fun;
OrderCard({Key key,this.fun}) : super(key: key);
OrderCard({Key key,}) : super(key: key);
@override
_OrderCardState createState() => _OrderCardState();
}
class _OrderCardState extends State<OrderCard> {
Container _orderInfo() {
Widget _orderInfo() {
return Container(
margin: EdgeInsets.only(
top: 20.w,
@ -77,11 +74,11 @@ class _OrderCardState extends State<OrderCard> {
);
}
InkWell _checkInfo(Function fun) {
Widget _checkInfo() {
return InkWell(
onTap: (){
LifePayInfoPage(bundle: Bundle()
..putMap('detailMap', {'title': '去年2019年'}),).to;
// LifePayInfoPage(bundle: Bundle()
// ..putMap('detailMap', {'title': '去年2019年'}),).to;
},
child: Container(
margin: EdgeInsets.only(top: 20.w),
@ -115,7 +112,7 @@ class _OrderCardState extends State<OrderCard> {
padding: EdgeInsets.symmetric(horizontal: 32.w),
decoration: BoxDecoration(
color: Colors.white,
borderRadius: BorderRadius.all(Radius.circular(6)),
borderRadius: BorderRadius.all(Radius.circular(8.w)),
),
child: InkWell(
onTap: () {},
@ -132,8 +129,8 @@ class _OrderCardState extends State<OrderCard> {
mainAxisAlignment: MainAxisAlignment.spaceBetween,
crossAxisAlignment: CrossAxisAlignment.start,
children: [
_orderInfo(),
_checkInfo(widget.fun),
// _orderInfo(),
// _checkInfo(),
],
),
)

Loading…
Cancel
Save