Commit 0d730f79 authored by Achilles's avatar Achilles

提交明细列表界面

parent 1387bc58
......@@ -139,6 +139,10 @@
C16BA62A1BD3952E001ACB26 /* VankePassengerFlowAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = C16BA6291BD3952E001ACB26 /* VankePassengerFlowAPI.m */; };
C16BA62E1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C16BA62C1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.m */; };
C16BA62F1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.xml in Resources */ = {isa = PBXBuildFile; fileRef = C16BA62D1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.xml */; };
C17ABD4D1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C17ABD4B1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.m */; };
C17ABD4E1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C17ABD4C1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml */; };
C17ABD521BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C17ABD501BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m */; };
C17ABD531BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C17ABD511BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml */; };
C19ADE351BC6C71F00206213 /* floor-def.jpg in Resources */ = {isa = PBXBuildFile; fileRef = C19ADE341BC6C71F00206213 /* floor-def.jpg */; };
C19ADE381BC80DD400206213 /* VankeSaleVolumeAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = C19ADE371BC80DD400206213 /* VankeSaleVolumeAPI.m */; };
C19ADE3D1BC8147800206213 /* left_arrow.png in Resources */ = {isa = PBXBuildFile; fileRef = C19ADE391BC8147800206213 /* left_arrow.png */; };
......@@ -837,6 +841,12 @@
C16BA62B1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = NoDataCell_iPhoneCell.h; path = common/NoDataCell_iPhoneCell.h; sourceTree = "<group>"; };
C16BA62C1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = NoDataCell_iPhoneCell.m; path = common/NoDataCell_iPhoneCell.m; sourceTree = "<group>"; };
C16BA62D1BD3ABF1001ACB26 /* NoDataCell_iPhoneCell.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = NoDataCell_iPhoneCell.xml; path = common/NoDataCell_iPhoneCell.xml; sourceTree = "<group>"; };
C17ABD4A1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VankeStatementDetailListBoard_iPhone.h; path = statement/VankeStatementDetailListBoard_iPhone.h; sourceTree = "<group>"; };
C17ABD4B1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VankeStatementDetailListBoard_iPhone.m; path = statement/VankeStatementDetailListBoard_iPhone.m; sourceTree = "<group>"; };
C17ABD4C1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = VankeStatementDetailListBoard_iPhone.xml; path = statement/VankeStatementDetailListBoard_iPhone.xml; sourceTree = "<group>"; };
C17ABD4F1BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VankeStatementDetailMonthCell_iPhone.h; path = statement/VankeStatementDetailMonthCell_iPhone.h; sourceTree = "<group>"; };
C17ABD501BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VankeStatementDetailMonthCell_iPhone.m; path = statement/VankeStatementDetailMonthCell_iPhone.m; sourceTree = "<group>"; };
C17ABD511BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = VankeStatementDetailMonthCell_iPhone.xml; path = statement/VankeStatementDetailMonthCell_iPhone.xml; sourceTree = "<group>"; };
C19ADE341BC6C71F00206213 /* floor-def.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = "floor-def.jpg"; path = "img/floor-def.jpg"; sourceTree = "<group>"; };
C19ADE361BC80DD400206213 /* VankeSaleVolumeAPI.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VankeSaleVolumeAPI.h; sourceTree = "<group>"; };
C19ADE371BC80DD400206213 /* VankeSaleVolumeAPI.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VankeSaleVolumeAPI.m; sourceTree = "<group>"; };
......@@ -1986,18 +1996,24 @@
C10F185C1BF8EC470065F18C /* statement */ = {
isa = PBXGroup;
children = (
C10F185D1BF8ED5D0065F18C /* VankeStatementMonthCell_iPhone.h */,
C10F185E1BF8ED5D0065F18C /* VankeStatementMonthCell_iPhone.m */,
C10F185F1BF8ED5D0065F18C /* VankeStatementMonthCell_iPhone.xml */,
C10F18621BF8EE020065F18C /* VankeStatementListItemCell_iPhone.h */,
C10F18631BF8EE020065F18C /* VankeStatementListItemCell_iPhone.m */,
C10F18641BF8EE020065F18C /* VankeStatementListItemCell_iPhone.xml */,
C17ABD4A1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.h */,
C17ABD4B1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.m */,
C17ABD4C1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml */,
C10F18671BF8EE2D0065F18C /* VankeStatementDetailListCell_iPhone.h */,
C10F18681BF8EE2D0065F18C /* VankeStatementDetailListCell_iPhone.m */,
C10F18691BF8EE2D0065F18C /* VankeStatementDetailListCell_iPhone.xml */,
C17ABD4F1BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.h */,
C17ABD501BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m */,
C17ABD511BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml */,
C10F186C1BF8EE600065F18C /* VankeStatementListBoard_iPhone.h */,
C10F186D1BF8EE600065F18C /* VankeStatementListBoard_iPhone.m */,
C10F186E1BF8EE600065F18C /* VankeStatementListBoard_iPhone.xml */,
C10F18621BF8EE020065F18C /* VankeStatementListItemCell_iPhone.h */,
C10F18631BF8EE020065F18C /* VankeStatementListItemCell_iPhone.m */,
C10F18641BF8EE020065F18C /* VankeStatementListItemCell_iPhone.xml */,
C10F185D1BF8ED5D0065F18C /* VankeStatementMonthCell_iPhone.h */,
C10F185E1BF8ED5D0065F18C /* VankeStatementMonthCell_iPhone.m */,
C10F185F1BF8ED5D0065F18C /* VankeStatementMonthCell_iPhone.xml */,
);
name = statement;
sourceTree = "<group>";
......@@ -3849,6 +3865,7 @@
C1D5948B1BB2E5DD00D297FE /* arrow-down@2x.png in Resources */,
C1D594971BB2E5DD00D297FE /* navigation-back@2x.png in Resources */,
C19BBC291BBE894D00831290 /* user_icon.png in Resources */,
C17ABD531BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.xml in Resources */,
C10F18611BF8ED5D0065F18C /* VankeStatementMonthCell_iPhone.xml in Resources */,
C1DED3321BCEC4B40049BB2D /* business@2x.png in Resources */,
C14D6F871BB8268800210172 /* right_icon.png in Resources */,
......@@ -3897,6 +3914,7 @@
C1D599B21BB58FD600D297FE /* icon_username@2x.png in Resources */,
C19BBC1C1BBE865400831290 /* VankeFloorListBoardCell_iPhone.xml in Resources */,
C1D595041BB42A6800D297FE /* splash1.xml in Resources */,
C17ABD4E1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml in Resources */,
C1D595071BB42A6800D297FE /* splash4.xml in Resources */,
C14D6F751BB8098400210172 /* car.png in Resources */,
C14D6F821BB813D300210172 /* little_down_icon@2x.png in Resources */,
......@@ -4039,6 +4057,7 @@
C1D598B81BB44B2000D297FE /* Bee_UIWebView.m in Sources */,
C12804FD1BC417A6001ECBAA /* VankeProjectSummaryModel.m in Sources */,
C1D5988C1BB44B2000D297FE /* UIView+Animation.m in Sources */,
C17ABD4D1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.m in Sources */,
C1D598591BB44B2000D297FE /* Bee_UIConfig.m in Sources */,
C12805091BC55773001ECBAA /* VankeBaseAPI.m in Sources */,
C1D599041BB44B2000D297FE /* BeeUISignal+SourceModel.m in Sources */,
......@@ -4418,6 +4437,7 @@
C10F18351BF7ACA80065F18C /* IBTTableViewCellInfo.m in Sources */,
C1D598601BB44B2000D297FE /* BeeUIBoard+ModalStack.m in Sources */,
C1D598771BB44B2000D297FE /* UIImageView+BeeUIStyle.m in Sources */,
C17ABD521BFCD92200908573 /* VankeStatementDetailMonthCell_iPhone.m in Sources */,
C10F18281BF7ACA80065F18C /* ICRAttachmentView.m in Sources */,
C1D5992B1BB44B2100D297FE /* Bee_Database.mm in Sources */,
C1D599021BB44B2000D297FE /* UIViewController+Transition.m in Sources */,
......
......@@ -65,7 +65,7 @@
@property (nonatomic, strong) NSString *shopCode;
@property (nonatomic, strong) NSString *shopName;
@property (nonatomic, strong) NSString *picture;
@property (nonatomic, strong) NSString *settle;
@property (nonatomic, strong) NSDate *settle;
@property (nonatomic, strong) NSNumber *amount;
@property (nonatomic, strong) NSString *state;
@property (nonatomic, strong) NSArray *items; // SubjectItem
......
......@@ -165,7 +165,7 @@ CONVERT_PROPERTY_CLASS(records, StatementShop)
summary.shopCode = [NSString stringWithFormat:@"%03d", i];
summary.shopName = @"肯得起";
summary.picture = @"";
summary.settle = @"2015-12-20";
summary.settle = [NSDate date];
double val = floorf(((double)arc4random() / ARC4RANDOM_MAX) * 10000.0f);
summary.amount = [NSNumber numberWithDouble:val];
......@@ -181,7 +181,7 @@ CONVERT_PROPERTY_CLASS(records, StatementShop)
NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:10];
for( int i = 0; i < 100; ++i) {
SubjectItem *item = [[SubjectItem alloc] init];
item.subject = @"A01-01 星巴克";
item.subject = @"月固定租金";
item.beginDate = @"2015-12-01";
item.endDate = @"2015-12-30";
item.direction = [NSNumber numberWithInt:0];
......
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementDetailListBoard_iPhone.h
// vanke
// 对账单列表
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#import "VankeBaseBoard.h"
#import "VankeStatementListModel.h"
#import "VankeStatementDetailMonthCell_iPhone.h"
#pragma mark -
@interface VankeStatementDetailListBoard_iPhone : VankeBaseBoard
AS_MODEL( VankeStatementListModel, model )
AS_OUTLET( BeeUIScrollView, list )
AS_OUTLET( VankeStatementDetailMonthCell_iPhone, settlementBar)
@property (nonatomic, strong) StatementShop *data;
@end
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementDetailListBoard_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStatementDetailListBoard_iPhone.h"
#import "PullLoader.h"
#import "FootLoader.h"
#import "VankeUtil.h"
#import "GEToast.h"
#import "NoDataCell_iPhoneCell.h"
#import "VankeStatementDetailListCell_iPhone.h"
#import "VankeStatementDetailMonthCell_iPhone.h"
#pragma mark -
@interface VankeStatementDetailListBoard_iPhone()
{
//<#@private var#>
}
@end
@implementation VankeStatementDetailListBoard_iPhone
SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )
@synthesize data = _data;
DEF_MODEL( VankeStatementListModel, model )
DEF_OUTLET( BeeUIScrollView, list )
DEF_OUTLET( VankeStatementDetailMonthCell_iPhone, settlementBar)
- (void)load
{
self.model = [VankeStatementListModel modelWithObserver:self];
}
- (void)unload
{
self.model = nil;
}
#pragma mark - Signal
ON_CREATE_VIEWS( signal )
{
[UIApplication sharedApplication].statusBarHidden = NO;
self.navigationBarShown = YES;
self.allowedSwipeToBack = YES;
self.title = [_data codeName];
self.list.headerClass = [PullLoader class];
self.list.headerShown = YES;
self.list.footerClass = [FootLoader class];
self.list.footerShown = YES;
self.list.lineCount = 1;
self.list.animationDuration = 0.2f;
self.list.baseInsets = bee.ui.config.baseInsets;
self.list.whenReloading = ^
{
self.list.total = self.model.shops.count;
INFO(@"total = %d", self.model.shops.count);
if (self.model.loaded && self.list.total <= 0) {
self.list.total = 1;
BeeUIScrollItem * item = self.list.items[0];
item.size = CGSizeMake( self.list.width, 50);
item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [NoDataCell_iPhoneCell class];
item.data = @"没有数据,请稍后重试!";
} else {
for ( BeeUIScrollItem *item in self.list.items )
{
item.size = CGSizeMake( self.list.width / self.list.lineCount, 80 );
item.order = 0;
item.rule = BeeUIScrollLayoutRule_Fall;
item.clazz = [VankeStatementDetailListCell_iPhone class];
SubjectItem *subject = [_data.items safeObjectAtIndex:item.index];
item.data = subject;
}
}
};
self.list.whenReloaded = ^
{
};
self.list.whenAnimated = ^
{
};
self.list.whenScrolling = ^
{
};
self.list.whenStop = ^
{
};
self.list.whenHeaderRefresh = ^
{
[self.model firstPage];
};
self.list.whenFooterRefresh = ^
{
[self.model nextPage];
};
// TODO
// self.model.classificationEquals = _projectCategory;
// self.model.nameLike = _projectNameLike;
// self.model.salesDateEquals = _salesDate;
// _searchBar.text = _projectNameLike;
_model.settleEquals = [NSDate date];
}
ON_DELETE_VIEWS( signal )
{
}
ON_LAYOUT_VIEWS( signal )
{
}
ON_WILL_APPEAR( signal )
{
self.navigationBarShown = YES;
// [self.list reloadData];
if ( NO == self.model.loaded )
{
[self.model firstPage];
}
UIColor *color = [VankeUtil rgbStringToColor: @"144,76,245"];
if ( IOS7_OR_LATER ) {
self.navigationController.navigationBar.barTintColor = color;
} else {
self.navigationController.navigationBar.tintColor = color;
}
[BeeUIRouter sharedInstance].view.pannable = YES;
}
ON_DID_APPEAR( signal )
{
}
ON_WILL_DISAPPEAR( signal )
{
[BeeUIRouter sharedInstance].view.pannable = NO;
}
ON_DID_DISAPPEAR( signal )
{
}
#pragma mark model
ON_SIGNAL3( VankeStatementListModel, RELOADING, signal )
{
[GEToast showProgress:self.view];
self.list.headerLoading = YES;
self.list.footerLoading = YES;
}
ON_SIGNAL3( VankeStatementListModel, RELOADED, signal )
{
[GEToast hideProgress];
self.list.headerLoading = NO;
self.list.footerLoading = NO;
self.list.footerMore = self.model.more;
[self.list reloadData];
$(self.settlementBar).DATA(_data);
}
#pragma UISearchBarDelegate
-(void) searchBarSearchButtonClicked:(UISearchBar *)searchBar {
// NSString *nameLike = [VankeUtil trim:_searchBar.text];
// self.model.nameLike = nameLike;
[self.model firstPage];
}
#pragma VankeStatementMonthCell_iPhone
ON_SIGNAL3(VankeStatementMonthCell_iPhone, pickerMask, signal) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"\n\n\n\n\n\n\n\n\n\n" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIDatePicker *picker = [[UIDatePicker alloc] init];
[picker setDatePickerMode:UIDatePickerModeDate];
[picker setLocale:[[NSLocale alloc]initWithLocaleIdentifier:@"zh_Hans_CN"]];
[alertController.view addSubview:picker];
[alertController addAction:({
UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
// 立即设置账期
self.model.settleEquals = picker.date;
[self.model firstPage];
}];
action;
})];
UIPopoverPresentationController *popoverController = alertController.popoverPresentationController;
popoverController.sourceView = self.view;
popoverController.sourceRect = [self.view bounds];
[self presentViewController:alertController animated:YES completion:nil];
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeStatementDetailListBoard_iPhone">
<linear class="wrapper">
<image class="bg" />
<list id="list"/>
<VankeStatementDetailMonthCell_iPhone id="settlementBar" />
</linear>
<style type="text/css">
.wrapper {
height: 100%;
width: 100%;
}
.bg {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
}
.wrapper > .bg {
background-color: #fafafa;
}
#list {
position: absolute;
left: 0px;
top: 75px;
width: 100%;
height: 100%;
}
#settlementBar {
height: 75px;
width: 100%;
position: absolute;
left: 0px;
top: 64px;
}
</style>
</ui>
......@@ -20,4 +20,11 @@
#pragma mark -
@interface VankeStatementDetailListCell_iPhone : BeeUICell
AS_OUTLET(BeeUIImageView, imgPhoto)
AS_OUTLET(BeeUILabel, lblName)
AS_OUTLET(BeeUIImageView, lblState)
AS_OUTLET(BeeUILabel, lblAmount)
AS_OUTLET(BeeUILabel, lblDateRange)
@end
......@@ -16,6 +16,7 @@
//
#import "VankeStatementDetailListCell_iPhone.h"
#import "VankeSettlementListAPI.h"
#pragma mark -
......@@ -24,6 +25,12 @@
SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )
DEF_OUTLET(BeeUIImageView, imgPhoto)
DEF_OUTLET(BeeUILabel, lblName)
DEF_OUTLET(BeeUIImageView, lblState)
DEF_OUTLET(BeeUILabel, lblAmount)
DEF_OUTLET(BeeUILabel, lblDateRange)
- (void)load
{
}
......@@ -34,7 +41,17 @@ SUPPORT_RESOURCE_LOADING( YES )
- (void)dataDidChanged
{
// TODO: fill data
SubjectItem *item = (SubjectItem*) self.data;
if (!item) {
return;
}
$(self.imgPhoto).DATA(@"bill.png");
$(self.lblName).DATA(item.subject);
$(self.lblState).DATA(@"已确认");
$(self.lblAmount).DATA(item.amount.description);
$(self.lblDateRange).DATA([NSString stringWithFormat:@"%@ 至 %@", item.beginDate, item.endDate]);
}
- (void)layoutDidFinish
......
<?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeStatementDetailListCell_iPhone">
<!--
<row></row>
-->
<col class="wrapper">
<!-- add your UI elements here -->
</col>
<style type="text/css">
.wrapper {
width: 100%;
height: 100%;
}
<linear orientation="v" class="wrapper">
<image class="bg"/>
<linear orientation="h" class="inner-wrapper">
<image class="inner-bg"/>
<linear orientation="v" class="col photo-col">
<image id="imgPhoto" class="photo"/>
</linear>
<linear orientation="v" class="col name-col">
<linear orientation="v" class="name-wrapper">
<label id="lblName" class="name"/>
<label id="lblDateRange" class="date-range"/>
</linear>
</linear>
<linear orientation="h" class="col amount-col">
<linear orientation="h" class="amount-wrapper">
<label id="lblAmount" class="amount" />
<label class="unit"></label>
</linear>
</linear>
</linear>
</linear>
<style type="text/css">
.wrapper {
width: 100%;
height: 100%;
}
.bg {
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
background-color: #c5c4ca;
}
.inner-wrapper {
width: 100%;
height: 100%;
padding-bottom: 1px;
}
.inner-bg {
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
background-color: white;
}
.col {
height: 100%;
}
.photo-col {
width: 25%;
h-align: center;
}
.photo-col .photo {
width: 100%;
height: 100%;
image-mode: fit;
image-loading: white;
padding: 2px;
}
.name-col {
width: 50%;
margin-right: 5px;
height: 100%;
v-align: center;
}
.name-col .name-wrapper {
height: auto;
width: 100%;
}
.name-col .name {
font-size: 18px;
font-style: bold;
width: 100%;
height: auto;
}
.name-col .date-range {
width: 100%;
font-size: 12px;
color: #aaaaaa;
height: auto;
padding-top: 5px;
}
.amount-col {
width: 25%;
align: right;
position: absolute;
right: 10px;
}
.amount-col .amount-wrapper {
width: auto;
height: 100%;
}
.amount-col .amount {
font-size: 18px;
width: auto;
}
.amount-col .unit {
font-size: 12px;
width: auto;
color: #aaaaaa;
}
</style>
</ui>
\ No newline at end of file
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementDetailMonthCell_iPhone.h
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#pragma mark -
@class StatementMonth;
@interface VankeStatementDetailMonthCell_iPhone : BeeUICell
AS_OUTLET( BeeUILabel, lblYear )
AS_OUTLET( BeeUILabel, lblMonth )
AS_OUTLET( BeeUILabel, lblAmount )
AS_OUTLET( BeeUILabel, lblTotalPrefix )
-(void) setSettleDate: (NSDate*) date;
@end
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementDetailMonthCell_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStatementDetailMonthCell_iPhone.h"
#import "VankeSettlementListAPI.h"
#pragma mark -
@implementation VankeStatementDetailMonthCell_iPhone
SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )
DEF_OUTLET( BeeUILabel, lblYear )
DEF_OUTLET( BeeUILabel, lblMonth )
DEF_OUTLET( BeeUILabel, lblAmount )
DEF_OUTLET( BeeUILabel, lblTotalPrefix )
- (void)load
{
}
- (void)unload
{
}
- (void)dataDidChanged
{
StatementShop *shop = (StatementShop*) self.data;
if (nil == shop) {
return;
}
[self setSettleDate:shop.settle];
$(self.lblAmount).DATA(shop.amount.description);
}
- (void)layoutDidFinish
{
// TODO: custom layout here
}
-(void) setSettleDate: (NSDate*) date {
if (nil == date) {
$(self.lblYear).DATA(@"");
$(self.lblMonth).DATA(@"");
} else {
$(self.lblYear).DATA([NSString stringWithFormat:@"%lu", date.year]);
$(self.lblMonth).DATA([NSString stringWithFormat:@"%lu", date.month]);
}
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeStatementDetailMonthCell_iPhone">
<linear orientation="h" class="wrapper">
<image class="bg"/>
<linear orientation="v" class="col-wrapper date-col">
<linear orientation="h" class="col-body">
<linear orientation="h" class="row">
<label class="lbl">账单日期</label>
</linear>
<linear orientation="h" class="row">
<button id="pickerMask" />
<linear orientation="h" class="row-wrapper">
<label id="lblYear" class="lbl year-val"></label>
<label class="lbl year"></label>
<label id="lblMonth" class="lbl mon-val"></label>
<label class="lbl month"></label>
<image id="imgDatePicker" class="date-picker" />
</linear>
</linear>
</linear>
</linear>
<linear orientation="v" class="col-wrapper summary-col">
<linear orientation="h" class="col-body">
<linear orientation="h" class="row">
<linear orientation="h" class="row1-wrapper">
<label id="lblTotalPrefix" class="lbl">本期应付总额</label>
</linear>
</linear>
<linear orientation="h" class="row">
<linear orientation="h" class="row2-wrapper">
<label id="lblAmount" class="lbl amount"></label>
<label class="lbl unit"></label>
</linear>
</linear>
</linear>
</linear>
</linear>
<style type="text/css">
.wrapper {
width: 100%;
height: 100%;
}
.bg {
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
background-color: white;
}
.col-wrapper {
width: 50%;
height: 100%;
v-align: center;
}
.col-wrapper .col-body {
width: 100%;
height: auto;
}
.lbl {
width: auto;
color: #aaaaaa;
font-size: 14px;
}
.row {
width: 100%;
height: 20px;
margin-bottom: 5px;
}
.row-wrapper {
width: auto;
height: 100%;
}
/** 左边日期列 */
.date-col {
padding-left: 10px;
}
.date-col .row {
align: left;
}
.date-col .year-val,
.date-col .mon-val {
color: #904cf5;
font-size: 20px;
font-style: bold;
}
.date-col .month,
.date-col .year {
color: black;
font-size: 12px;
padding-top: 2px;
}
#pickerMask {
position: absolute;
left: 0px;
top: 0px;
height: 100%;
width: 100%;
}
/** 右边汇总列 */
.summary-col {
padding-right: 10px;
}
.summary-col .row {
align: right;
}
.summary-col .row1-wrapper,
.summary-col .row2-wrapper {
width: auto;
}
.summary-col .amount {
color: red;
font-size: 20px;
font-style: bold;
}
.summary-col .unit {
color: black;
font-size: 12px;
padding-top: 2px;
}
</style>
</ui>
\ No newline at end of file
......@@ -22,6 +22,7 @@
#import "GEToast.h"
#import "NoDataCell_iPhoneCell.h"
#import "VankeStatementListItemCell_iPhone.h"
#import "VankeStatementDetailListBoard_iPhone.h"
#pragma mark -
......@@ -61,13 +62,6 @@ ON_CREATE_VIEWS( signal )
self.allowedSwipeToBack = YES;
self.title = @"对账单";
UIColor *color = [VankeUtil rgbStringToColor: @"144,76,245"];
if ( IOS7_OR_LATER ) {
self.navigationController.navigationBar.barTintColor = color;
} else {
self.navigationController.navigationBar.tintColor = color;
}
self.list.headerClass = [PullLoader class];
self.list.headerShown = YES;
......@@ -204,14 +198,6 @@ ON_SIGNAL3( VankeStatementListModel, RELOADED, signal )
$(self.settlementBar).DATA(_model.lastResp);
}
#pragma UISearchBarDelegate
-(void) searchBarSearchButtonClicked:(UISearchBar *)searchBar {
// NSString *nameLike = [VankeUtil trim:_searchBar.text];
// self.model.nameLike = nameLike;
[self.model firstPage];
}
#pragma VankeStatementMonthCell_iPhone
ON_SIGNAL3(VankeStatementMonthCell_iPhone, pickerMask, signal) {
......@@ -235,4 +221,13 @@ ON_SIGNAL3(VankeStatementMonthCell_iPhone, pickerMask, signal) {
[self presentViewController:alertController animated:YES completion:nil];
}
#pragma VankeStatementListItemCell_iPhone
ON_SIGNAL3(VankeStatementListItemCell_iPhone, mask, signal) {
StatementShop *cellValue = signal.sourceCell.data;
VankeStatementDetailListBoard_iPhone *board = [VankeStatementDetailListBoard_iPhone board];
board.data = cellValue;
[self.stack pushBoard:board animated:YES];
}
@end
......@@ -48,12 +48,7 @@ DEF_OUTLET(BeeUILabel, lblAmount)
$(self.imgPhoto).DATA([item getPictureUrlOrDefault]);
$(self.lblName).DATA([item codeName]);
$(self.lblState).DATA(@"已确认");
double amount = [item.amount doubleValue];
$(self.lblAmount).DATA([NSString stringWithFormat:@"%@%.2f元", @"", amount]);
if (amount < 0) {
$(self.lblAmount).ADD_CLASS(@"red");
}
$(self.lblAmount).DATA(item.amount.description);
}
- (void)layoutDidFinish
......
......@@ -15,13 +15,12 @@
<linear orientation="v" class="col name-col">
<label id="lblName" class="name"/>
</linear>
<!-- <linear orientation="v" class="col state-col">-->
<!-- <label id="lblState" class="state" />-->
<!-- </linear>-->
<linear orientation="v" class="col amount-col">
<label id="lblAmount" class="amount" />
<linear orientation="h" class="col amount-col">
<linear orientation="h" class="amount-wrapper">
<label id="lblAmount" class="amount" />
<label class="unit"></label>
</linear>
</linear>
</linear>
</linear>
......@@ -70,7 +69,7 @@
}
.photo-col {
width: 80px;
width: 25%;
}
.photo-col .photo {
......@@ -82,36 +81,39 @@
}
.name-col {
width: 100px;
width: 50%;
margin-right: 5px;
}
.name-col .name {
word-wrap: break-word;
text-overflow: ellipsis;
font-size: 15px;
font-size: 18px;
font-style: bold;
}
.state-col {
width: 40px;
margin-right: 5px;
.amount-col {
width: 25%;
align: right;
position: absolute;
right: 10px;
}
.amount-col {
.amount-col .amount-wrapper {
width: auto;
height: 100%;
}
.amount-col .amount {
word-wrap: break-word;
text-valign: right;
font-size: 15px;
font-size: 18px;
width: auto;
}
.amount-col .red {
color: red;
.amount-col .unit {
font-size: 12px;
width: auto;
color: #aaaaaa;
}
</style>
</ui>
\ No newline at end of file
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