对接:借还管理:查询该用户的所有物品借还信息

hmxc
张萌 4 years ago
parent 4394139404
commit e34ef21ad0

@ -0,0 +1,33 @@
import 'package:akuCommunity/model/common/img_model.dart';
class ArticleBorrowModel {
int id;
String name;
int quantity;
List<ImgModel> imgUrls;
ArticleBorrowModel({this.id, this.name, this.quantity, this.imgUrls});
ArticleBorrowModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
quantity = json['quantity'];
if (json['imgUrls'] != null) {
imgUrls = new List<ImgModel>();
json['imgUrls'].forEach((v) {
imgUrls.add(new ImgModel.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['quantity'] = this.quantity;
if (this.imgUrls != null) {
data['imgUrls'] = this.imgUrls.map((v) => v.toJson()).toList();
}
return data;
}
}

@ -0,0 +1,40 @@
class MineGoodsModel {
int id;
String name;
int code;
String beginDate;
String endDate;
int borrowDate;
int borrowStatus;
MineGoodsModel(
{this.id,
this.name,
this.code,
this.beginDate,
this.endDate,
this.borrowDate,
this.borrowStatus});
MineGoodsModel.fromJson(Map<String, dynamic> json) {
id = json['id'];
name = json['name'];
code = json['code'];
beginDate = json['beginDate'];
endDate = json['endDate'];
borrowDate = json['borrowDate'];
borrowStatus = json['borrowStatus'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = new Map<String, dynamic>();
data['id'] = this.id;
data['name'] = this.name;
data['code'] = this.code;
data['beginDate'] = this.beginDate;
data['endDate'] = this.endDate;
data['borrowDate'] = this.borrowDate;
data['borrowStatus'] = this.borrowStatus;
return data;
}
}

@ -97,26 +97,6 @@ class _GoodsManagePageState extends State<GoodsManagePage> {
alignment: Alignment.center,
child: '我的借还物品'.text.black.size(28.sp).make()))
],
// body: Stack(
// children: [
// Column(
// children: _listGoods
// .map((item) => _goodsCard(
// item['imagePath'],
// item['title'],
// item['goodsNum'],
// ))
// .toList(),
// ),
// Positioned(
// bottom: 0,
// child: BottomButton(
// title: '扫一扫出借',
// fun: () {},
// ),
// ),
// ],
// ),
body: BeeListView(
path: API.manager.articleBorrow,

@ -194,9 +194,12 @@ class _MineGoodsPageState extends State<MineGoodsPage> {
.toList();
},
builder: (items) {
return ListView.builder(itemBuilder: (context, index) {
return ListView.builder(
itemBuilder: (context, index) {
return _goodsCard(items[index]);
});
},
itemCount: items.length,
);
}),
);
}

Loading…
Cancel
Save