Commit 05bb91f2 authored by Achilles's avatar Achilles

解决 账单明细界面个性日期时,如果没有数据,界面出现数据不正确的

parent 009185bd
...@@ -138,11 +138,22 @@ ON_SIGNAL3( VankeStatementSubjectListModel, RELOADED, signal ) ...@@ -138,11 +138,22 @@ ON_SIGNAL3( VankeStatementSubjectListModel, RELOADED, signal )
[self.list reloadData]; [self.list reloadData];
StatementSubjectListResponseData *respData = _model.lastResp.data; StatementSubjectListResponseData *respData = _model.lastResp.data;
if (nil != respData) { if (nil != respData && respData.items.count > 0) {
self.title = respData.shopName; self.title = respData.shopName;
$(self.settlementBar).DATA(respData); $(self.settlementBar).DATA(respData);
$(self.imgState).DATA([NSString stringWithFormat:@"%@_big.png", respData.state]); $(self.imgState).DATA([NSString stringWithFormat:@"%@_big.png", respData.state]);
[self showOperButtons: [respData unconfirmed]]; [self showOperButtons: [respData unconfirmed]];
} else {
if (nil == respData) {
respData = [[StatementSubjectListResponseData alloc] init];
}
NSDateFormatter *dateFormatter = [[NSDateFormatter alloc] init];
[dateFormatter setDateFormat:@"yyyyMM"];
respData.settle = [dateFormatter stringFromDate:_model.settle];
respData.amount = [NSNumber numberWithDouble:.0f];
$(self.settlementBar).DATA(respData);
$(self.imgState).DATA(nil);
[self showOperButtons: NO];
} }
} }
...@@ -296,7 +307,7 @@ ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnConfirm, signal) { ...@@ -296,7 +307,7 @@ ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnConfirm, signal) {
self.list.total = 1; self.list.total = 1;
BeeUIScrollItem * item = self.list.items[0]; BeeUIScrollItem * item = self.list.items[0];
item.size = CGSizeMake( self.list.width, 150); item.size = CGSizeMake( self.list.width, 200);
item.order = 0; item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall; item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [NoDataCell_iPhoneCell class]; item.clazz = [NoDataCell_iPhoneCell class];
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment