Commit 2d300a22 authored by Achilles's avatar Achilles

update.

parent 96d017a3
This diff is collapsed.
......@@ -123,7 +123,7 @@ CONVERT_PROPERTY_CLASS(items, SubjectItem)
-(NSString*) getPictureUrlOrDefault {
if ([VankeUtil isBlankString:self.picture]) {
return @"bill_icon.png";
return @"bill_default_image.png";
} else {
return [NSString stringWithFormat:@"%@/%@", VANKE_SERVER_MEDIA_BASE_URL, self.picture];
}
......
......@@ -24,7 +24,7 @@
return;
}
NSString *url = [NSString stringWithFormat:@"/wanke/user/login/%@", self.userName];
NSString *url = [NSString stringWithFormat:@"/user/login/%@", self.userName];
NSString *encryptPwd = [VankeUtil md5: self.password];
NSDictionary *dict = [NSDictionary dictionaryWithObjectsAndKeys:
self.authenticode, @"authenticode",
......
......@@ -284,7 +284,7 @@ ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnConfirm, signal) {
} else {
for ( BeeUIScrollItem *item in self.list.items )
{
item.size = CGSizeMake( self.list.width / self.list.lineCount, 80 );
item.size = CGSizeMake( self.list.width / self.list.lineCount, 70 );
item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [VankeStatementDetailListCell_iPhone class];
......
......@@ -17,6 +17,7 @@
#import "VankeStatementDetailListCell_iPhone.h"
#import "VankeSettlementListAPI.h"
#import "VankeUtil.h"
#pragma mark -
......@@ -52,7 +53,13 @@ DEF_OUTLET(BeeUILabel, lblDateRange)
}
$(self.lblName).DATA(item.subject);
$(self.lblAmount).DATA(item.amount.description);
if ([VankeUtil isBlankString:item.remark]) {
$(@"btnRemark").HIDE();
} else {
$(@"btnRemark").SHOW();
}
$(self.lblAmount).DATA([NSString stringWithFormat:@"%.2f ", [item.amount doubleValue]]);
NSString *beginDate = [self trancateToDateString: item.beginDate];
NSString *endDate = [self trancateToDateString: item.endDate];
......@@ -74,4 +81,18 @@ DEF_OUTLET(BeeUILabel, lblDateRange)
// TODO: custom layout here
}
ON_SIGNAL3(VankeStatementDetailListCell_iPhone, btnRemark, signal) {
SubjectItem *item = (SubjectItem*) self.data;
if (!item) {
return;
}
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"备注"
message:item.remark
delegate:nil
cancelButtonTitle:@"确定"
otherButtonTitles:nil, nil];
[alert show];
}
@end
......@@ -13,7 +13,10 @@
<linear orientation="v" class="col name-col">
<linear orientation="v" class="name-wrapper">
<label id="lblName" class="name"/>
<linear orientation="h" class="name-remark-wrapper">
<label id="lblName" class="name"/>
<button id="btnRemark" class="remark" />
</linear>
<label id="lblDateRange" class="date-range"/>
</linear>
</linear>
......@@ -63,16 +66,14 @@
}
.photo-col {
width: 25%;
h-align: center;
width: 50px;
v-align: center;
align: center;
}
.photo-col .photo {
width: 100%;
height: 100%;
image-mode: fit;
image-loading: white;
padding: 2px;
width: auto;
height: auto;
}
.name-col {
......@@ -82,16 +83,24 @@
v-align: center;
}
.name-col .name-wrapper {
.name-col .name-wrapper,
.name-col .name-wrapper .name-remark-wrapper {
height: auto;
width: 100%;
}
.name-col .name {
.name-remark-wrapper .name {
font-size: 18px;
font-style: bold;
width: 100%;
width: auto;
height: auto;
}
.name-remark-wrapper .remark {
width: auto;
height: auto;
padding: 3px 0px 0px 5px;
background-image: url(bill_remark.png);
}
.name-col .date-range {
......
......@@ -50,7 +50,9 @@ DEF_OUTLET( BeeUILabel, lblTotalPrefix )
[dateFormatter setDateFormat:@"yyyyMM"];
NSDate *settleDate = [dateFormatter dateFromString:shop.settle];
[self setSettleDate:settleDate];
$(self.lblAmount).DATA(shop.amount.description);
NSNumber *amount = shop.amount;
$(self.lblAmount).DATA([NSString stringWithFormat:@"%.2f ", nil == amount? 0.0f:[amount doubleValue]]);
}
- (void)layoutDidFinish
......
......@@ -53,7 +53,7 @@
position: absolute;
left: 0px;
top: 0px;
background-color: white;
background-image: url(wave_line.png);
}
.col-wrapper {
......@@ -86,7 +86,11 @@
/** 左边日期列 */
.date-col {
padding-left: 10px;
align: center;
}
.date-col .col-body {
width: 100px;
}
.date-col .row {
......
......@@ -65,6 +65,7 @@ ON_CREATE_VIEWS( signal )
self.allowedSwipeToBack = YES;
self.title = @"对账单";
[self initListAndModel];
// [self.searchBar setBarTintColor :[VankeUtil rgbStringToColor: @"246,246,246"]];
}
ON_DELETE_VIEWS( signal )
......
......@@ -48,8 +48,7 @@ DEF_OUTLET(BeeUIImageView, imgState)
$(self.imgPhoto).DATA([item getPictureUrlOrDefault]);
$(self.lblName).DATA([item codeName]);
$(self.lblState).DATA(@"已确认");
$(self.lblAmount).DATA(item.amount.description);
$(self.lblAmount).DATA([NSString stringWithFormat:@"%.2f ", [item.amount doubleValue]]);
$(self.imgState).DATA([NSString stringWithFormat:@"%@.png", item.state]);
}
......
......@@ -47,14 +47,16 @@ DEF_OUTLET( BeeUILabel, lblTotalPrefix )
StatementListResponse *resp = (StatementListResponse*) self.data;
if (nil == resp) {
[self setSettleDate:[NSDate date]];
$(self.lblCount).DATA(@"0");
$(self.lblAmount).DATA(@"0");
$(self.lblCount).DATA([NSString stringWithFormat:@" %d ", 0]);
$(self.lblAmount).DATA([NSString stringWithFormat:@"%.2f ", 0.0f]);
return;
}
[self setSettleDate:resp.settle];
$(self.lblCount).DATA([NSString stringWithFormat:@"%d", [resp.data.paging.recordCount intValue]]);
$(self.lblAmount).DATA(nil == resp.data.amount? @"0": resp.data.amount.description);
$(self.lblCount).DATA([NSString stringWithFormat:@" %d ", [resp.data.paging.recordCount intValue]]);
NSNumber *amount = resp.data.amount;
$(self.lblAmount).DATA([NSString stringWithFormat:@"%.2f ", nil == amount? 0.0f:[amount doubleValue]]);
}
- (void)layoutDidFinish
......
......@@ -56,7 +56,7 @@
position: absolute;
left: 0px;
top: 0px;
background-color: white;
background-image: url(wave_line.png);
}
.col-wrapper {
......@@ -89,7 +89,11 @@
/** 左边日期列 */
.date-col {
padding-left: 10px;
align: center;
}
.date-col .col-body {
width: 100px;
}
.date-col .row {
......
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