Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
万
万科
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张杰
万科
Commits
4bcf1b6c
Commit
4bcf1b6c
authored
Nov 16, 2015
by
Achilles
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add settlement view with fake data
parent
88b0f4dc
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
20 changed files
with
1113 additions
and
5 deletions
+1113
-5
project.pbxproj
vanke.xcodeproj/project.pbxproj
+60
-0
Info.plist
vanke/Info.plist
+1
-1
VankeSettlementListAPI.h
vanke/controller/VankeSettlementListAPI.h
+87
-0
VankeSettlementListAPI.m
vanke/controller/VankeSettlementListAPI.m
+170
-0
VankeStatementListModel.h
vanke/model/VankeStatementListModel.h
+33
-0
VankeStatementListModel.m
vanke/model/VankeStatementListModel.m
+113
-0
VankeAffairsBoard_iPhone.m
.../view_iPhone/templates/affairs/VankeAffairsBoard_iPhone.m
+4
-2
PullLoader.m
vanke/view_iPhone/templates/common/PullLoader.m
+2
-2
VankeStatementDetailListCell_iPhone.h
...templates/statement/VankeStatementDetailListCell_iPhone.h
+23
-0
VankeStatementDetailListCell_iPhone.m
...templates/statement/VankeStatementDetailListCell_iPhone.m
+45
-0
VankeStatementDetailListCell_iPhone.xml
...mplates/statement/VankeStatementDetailListCell_iPhone.xml
+17
-0
VankeStatementListBoard_iPhone.h
...hone/templates/statement/VankeStatementListBoard_iPhone.h
+31
-0
VankeStatementListBoard_iPhone.m
...hone/templates/statement/VankeStatementListBoard_iPhone.m
+199
-0
VankeStatementListBoard_iPhone.xml
...ne/templates/statement/VankeStatementListBoard_iPhone.xml
+47
-0
VankeStatementListItemCell_iPhone.h
...e/templates/statement/VankeStatementListItemCell_iPhone.h
+29
-0
VankeStatementListItemCell_iPhone.m
...e/templates/statement/VankeStatementListItemCell_iPhone.m
+59
-0
VankeStatementListItemCell_iPhone.xml
...templates/statement/VankeStatementListItemCell_iPhone.xml
+108
-0
VankeStatementMonthCell_iPhone.h
...hone/templates/statement/VankeStatementMonthCell_iPhone.h
+23
-0
VankeStatementMonthCell_iPhone.m
...hone/templates/statement/VankeStatementMonthCell_iPhone.m
+45
-0
VankeStatementMonthCell_iPhone.xml
...ne/templates/statement/VankeStatementMonthCell_iPhone.xml
+17
-0
No files found.
vanke.xcodeproj/project.pbxproj
View file @
4bcf1b6c
This diff is collapsed.
Click to expand it.
vanke/Info.plist
View file @
4bcf1b6c
...
...
@@ -21,7 +21,7 @@
<
k
e
y
>
CFBundleSignature
<
/k
e
y
>
<
string
>
????
<
/string
>
<
k
e
y
>
CFBundleVersion
<
/k
e
y
>
<
string
>
1.0.
1
<
/string
>
<
string
>
1.0.
3
<
/string
>
<
k
e
y
>
LSRequiresIPhoneOS
<
/k
e
y
>
<
tru
e
/
>
<
k
e
y
>
NSAppTransportSecurity
<
/k
e
y
>
...
...
vanke/controller/VankeSettlementListAPI.h
0 → 100755
View file @
4bcf1b6c
//
// VankeSettlementListAPI.h
// vanke
// 查询对账单列表
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#import "VankeBaseAPI.h"
#import "VankeResponse.h"
@class
Paging
;
@class
SubjectItem
;
@class
StatementSummary
;
@class
StatementListResponse
;
/*
* 查询对账单列表
* http://.../wanke-server/rest/project/queryprojectsby?classificationEquals={classificationEquals}&nameLike={nameLike}&salesDateEquals={salesDateEquals}& passengerDateEquals={passengerDateEquals}&trafficDateEquals={trafficDateEquals}
*/
@interface
VankeSettlementListAPI
:
VankeBaseAPI
// 账期等于
@property
(
nonatomic
,
strong
)
NSString
*
settleEquals
;
// 是否已确认
@property
(
nonatomic
,
assign
)
BOOL
confirmed
;
// 项目列表
@property
(
nonatomic
,
strong
)
NSArray
*
projectsIn
;
// 商铺名称或代码类似于
@property
(
nonatomic
,
strong
)
NSString
*
shopNameOrCodeLike
;
@end
// 分页信息
@interface
Paging
:
BeeActiveObject
@property
(
nonatomic
,
strong
)
NSNumber
*
page
;
@property
(
nonatomic
,
strong
)
NSNumber
*
pageSize
;
@property
(
nonatomic
,
strong
)
NSNumber
*
pageCount
;
@property
(
nonatomic
,
strong
)
NSNumber
*
recordCount
;
@end
// 对账单科目
@interface
SubjectItem
:
BeeActiveObject
@property
(
nonatomic
,
strong
)
NSString
*
subject
;
@property
(
nonatomic
,
strong
)
NSString
*
beginDate
;
@property
(
nonatomic
,
strong
)
NSString
*
endDate
;
@property
(
nonatomic
,
strong
)
NSNumber
*
direction
;
@property
(
nonatomic
,
strong
)
NSNumber
*
amount
;
@property
(
nonatomic
,
strong
)
NSString
*
remark
;
-
(
NSString
*
)
getPictureUrlOrDefault
;
-
(
NSString
*
)
codeName
;
@end
// 对账单合计
@interface
StatementSummary
:
BeeActiveObject
@property
(
nonatomic
,
strong
)
NSString
*
contract
;
@property
(
nonatomic
,
strong
)
NSString
*
settle
;
@property
(
nonatomic
,
strong
)
NSNumber
*
amount
;
@property
(
nonatomic
,
strong
)
NSString
*
state
;
@property
(
nonatomic
,
strong
)
NSArray
*
items
;
// SubjectItem
-
(
BOOL
)
confirmed
;
@end
@interface
StatementListResponse
:
VankeResponse
@property
(
nonatomic
,
strong
)
NSNumber
*
amount
;
@property
(
nonatomic
,
strong
)
Paging
*
paging
;
@property
(
nonatomic
,
strong
)
NSArray
*
records
;
// StatementSummary
-
(
BOOL
)
hasMore
;
+
(
instancetype
)
fakeData
;
@end
\ No newline at end of file
vanke/controller/VankeSettlementListAPI.m
0 → 100644
View file @
4bcf1b6c
//
// VankeSettlementListAPI.m
// vanke
//
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeSettlementListAPI.h"
#import "VankeConfig.h"
#import "VankeUtil.h"
@implementation
VankeSettlementListAPI
@synthesize
settleEquals
=
_settleEquals
;
@synthesize
confirmed
=
_confirmed
;
@synthesize
projectsIn
=
_projectsIn
;
@synthesize
shopNameOrCodeLike
=
_shopNameOrCodeLike
;
-
(
void
)
route
:(
BeeMessage
*
)
msg
{
if
(
self
.
sending
)
{
// if (![self checkToQuery]) {
// return;
// }
// [self http_get:@"/statement/query"].PARAM(@"settleEquals", self.settleEquals).PARAM(@"prjectsIn", [self.projectsIn componentsJoinedByString:@";"]).TIMEOUT(10);
[
self
HTTP_GET
:
@"http://www.baidu.com"
].
TIMEOUT
(
10
);
}
else
if
(
self
.
succeed
)
{
NSLog
(
@"response: %@"
,
self
.
responseString
);
// self.serverResp = [StatementListResponse objectFromDictionary: self.responseJSONDictionary];
// if (nil == self.serverResp)
// {
// self.failed = YES;
// return;
// }
self
.
serverResp
=
[
StatementListResponse
fakeData
];
}
else
if
(
self
.
failed
)
{
NSLog
(
@"response: %@"
,
self
.
responseString
);
self
.
serverResp
=
[
StatementListResponse
objectFromDictionary
:
self
.
responseJSONDictionary
];
}
}
-
(
BOOL
)
checkToQuery
{
if
([
VankeUtil
isBlankString
:
self
.
settleEquals
])
{
[
self
setClientError
:
@"账期不能为空"
];
return
NO
;
}
if
(
nil
==
self
.
projectsIn
||
[
self
.
projectsIn
count
]
<=
0
)
{
[
self
setClientError
:
@"项目列表不能为空"
];
return
NO
;
}
return
YES
;
}
@end
#pragma Paging
@implementation
Paging
@synthesize
page
=
_page
;
@synthesize
pageSize
=
_pageSize
;
@synthesize
pageCount
=
_pageCount
;
@synthesize
recordCount
=
_recordCount
;
@end
#pragma SubjectItem
@implementation
SubjectItem
@synthesize
subject
=
_subject
;
@synthesize
beginDate
=
_beginDate
;
@synthesize
endDate
=
_endDate
;
@synthesize
direction
=
_direction
;
@synthesize
amount
=
_amount
;
@synthesize
remark
=
_remark
;
-
(
NSString
*
)
getPictureUrlOrDefault
{
// if ([VankeUtil isBlankString:self.picture]) {
return
@"bill.png"
;
// } else {
// return [NSString stringWithFormat:@"%@/%@", VANKE_SERVER_MEDIA_BASE_URL, self.picture];
// }
}
-
(
NSString
*
)
codeName
{
return
[
NSString
stringWithFormat
:
@"%@%@"
,
@""
,
_subject
];
}
@end
#pragma StatementSummary
@implementation
StatementSummary
@synthesize
contract
=
_contract
;
@synthesize
settle
=
_settle
;
@synthesize
amount
=
_amount
;
@synthesize
state
=
_state
;
@synthesize
items
=
_items
;
CONVERT_PROPERTY_CLASS
(
items
,
SubjectItem
)
-
(
BOOL
)
confirmed
{
return
[
@"confirmed"
eq
:
_state
];
}
@end
#pragma StatementListResponse
@implementation
StatementListResponse
@synthesize
amount
=
_amount
;
@synthesize
paging
=
_paging
;
@synthesize
records
=
_records
;
CONVERT_PROPERTY_CLASS
(
records
,
StatementSummary
)
-
(
BOOL
)
hasMore
{
return
_paging
&&
_paging
.
pageSize
<=
_paging
.
recordCount
;
}
+
(
instancetype
)
fakeData
{
StatementListResponse
*
resp
=
[[
StatementListResponse
alloc
]
init
];
resp
.
amount
=
[
NSNumber
numberWithInt
:
1000
];
Paging
*
paging
=
[[
Paging
alloc
]
init
];
paging
.
page
=
[
NSNumber
numberWithInt
:
1
];
paging
.
pageSize
=
[
NSNumber
numberWithInt
:
10
];
paging
.
pageCount
=
[
NSNumber
numberWithInt
:
10
];
paging
.
recordCount
=
[
NSNumber
numberWithInt
:
99
];
resp
.
paging
=
paging
;
StatementSummary
*
summary
=
[[
StatementSummary
alloc
]
init
];
summary
.
contract
=
@"112233"
;
summary
.
settle
=
@"2015-12-20"
;
summary
.
amount
=
[
NSNumber
numberWithInt
:
1000
];
summary
.
state
=
@"confirmed"
;
NSMutableArray
*
ary
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
10
];
for
(
int
i
=
0
;
i
<
10
;
++
i
)
{
SubjectItem
*
item
=
[[
SubjectItem
alloc
]
init
];
item
.
subject
=
@"A01-01 星巴克"
;
item
.
beginDate
=
@"2015-12-01"
;
item
.
endDate
=
@"2015-12-30"
;
item
.
direction
=
[
NSNumber
numberWithInt
:
0
];
item
.
amount
=
[
NSNumber
numberWithInt
:
104001
];
item
.
remark
=
@"有意见,不同意"
;
[
ary
addObject
:
item
];
}
summary
.
items
=
ary
;
NSMutableArray
*
ary2
=
[[
NSMutableArray
alloc
]
initWithCapacity
:
1
];
[
ary2
addObject
:
summary
];
resp
.
records
=
ary2
;
return
resp
;
}
@end
vanke/model/VankeStatementListModel.h
0 → 100755
View file @
4bcf1b6c
//
// VankeStatementListModel.h
// vanke
//
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#import "VankeSettlementListAPI.h"
@interface
VankeStatementListModel
:
BeeStreamViewModel
// 账期等于
@property
(
nonatomic
,
strong
)
NSString
*
settleEquals
;
// 是否已确认
@property
(
nonatomic
,
assign
)
BOOL
confirmed
;
// 项目列表
@property
(
nonatomic
,
strong
)
NSArray
*
projectsIn
;
// 商铺名称或代码类似于
@property
(
nonatomic
,
strong
)
NSString
*
shopNameOrCodeLike
;
// 对账单列表
@property
(
nonatomic
,
strong
)
NSMutableArray
*
items
;
// SubjectItem
-
(
NSInteger
)
count
;
@end
vanke/model/VankeStatementListModel.m
0 → 100755
View file @
4bcf1b6c
//
// VankeStatementListModel.m
// vanke
//
// Created by xiaomi on 15/10/8.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStatementListModel.h"
#undef PER_PAGE
#define PER_PAGE (10)
@implementation
VankeStatementListModel
@synthesize
settleEquals
=
_settleEquals
;
@synthesize
confirmed
=
_confirmed
;
@synthesize
projectsIn
=
_projectsIn
;
@synthesize
shopNameOrCodeLike
=
_shopNameOrCodeLike
;
@synthesize
items
=
_items
;
-
(
void
)
load
{
self
.
autoSave
=
YES
;
self
.
autoLoad
=
YES
;
self
.
items
=
[
NSMutableArray
array
];
}
-
(
void
)
unload
{
self
.
settleEquals
=
nil
;
self
.
confirmed
=
nil
;
self
.
projectsIn
=
nil
;
self
.
shopNameOrCodeLike
=
nil
;
self
.
items
=
nil
;
}
#pragma mark - paging query
-
(
void
)
firstPage
{
[
self
gotoPage
:
1
];
}
-
(
void
)
nextPage
{
if
(
self
.
items
.
count
)
{
[
self
gotoPage
:(
self
.
items
.
count
/
PER_PAGE
+
1
)];
}
}
-
(
void
)
gotoPage
:
(
NSUInteger
)
page
{
[
VankeSettlementListAPI
cancel
];
VankeSettlementListAPI
*
api
=
[
VankeSettlementListAPI
api
];
@weakify
(
api
);
@weakify
(
self
);
api
.
settleEquals
=
self
.
settleEquals
;
api
.
confirmed
=
self
.
confirmed
;
api
.
projectsIn
=
self
.
projectsIn
;
api
.
shopNameOrCodeLike
=
self
.
shopNameOrCodeLike
;
api
.
whenUpdate
=
^
{
@normalize
(
api
);
@normalize
(
self
);
if
(
api
.
sending
)
{
[
self
sendUISignal
:
self
.
RELOADING
];
}
else
{
if
(
api
.
succeed
)
{
StatementListResponse
*
resp
=
(
StatementListResponse
*
)
api
.
serverResp
;
if
(
nil
==
resp
||
nil
==
resp
.
records
)
{
api
.
failed
=
YES
;
}
else
{
NSArray
*
records
=
resp
.
records
;
StatementSummary
*
firstRecord
=
(
StatementSummary
*
)
[
records
objectAtIndex
:
0
];
if
(
page
<=
1
)
{
[
self
.
items
removeAllObjects
];
[
self
.
items
addObjectsFromArray
:
firstRecord
.
items
];
}
else
{
[
self
.
items
addObjectsFromArray
:
firstRecord
.
items
];
[
self
.
items
unique
:
^
NSComparisonResult
(
id
left
,
id
right
)
{
return
[((
SubjectItem
*
)
left
).
subject
compare
:((
SubjectItem
*
)
right
).
subject
];
}];
}
self
.
more
=
[
resp
hasMore
];
self
.
loaded
=
YES
;
}
}
[
self
sendUISignal
:
self
.
RELOADED
];
}
};
[
api
send
];
}
@end
vanke/view_iPhone/templates/affairs/VankeAffairsBoard_iPhone.m
View file @
4bcf1b6c
...
...
@@ -17,6 +17,7 @@
#import "VankeAffairsBoard_iPhone.h"
#import "VankeNoticeListBoard_iPhone.h"
#import "VankeStatementListBoard_iPhone.h"
#pragma mark -
...
...
@@ -84,12 +85,13 @@ ON_DID_DISAPPEAR( signal )
}
ON_SIGNAL3
(
VankeAffairsBoard_iPhone
,
btnNotice
,
signal
)
{
VankeNoticeListBoard_iPhone
*
board
=
[
VankeNoticeListBoard_iPhone
board
];
VankeNoticeListBoard_iPhone
*
board
=
[
VankeNoticeListBoard_iPhone
board
];
[
self
.
stack
pushBoard
:
board
animated
:
YES
];
}
ON_SIGNAL3
(
VankeAffairsBoard_iPhone
,
btnBill
,
signal
)
{
INFO
(
@"button bill pressed."
);
VankeStatementListBoard_iPhone
*
board
=
[
VankeStatementListBoard_iPhone
board
];
[
self
.
stack
pushBoard
:
board
animated
:
YES
];
}
ON_SIGNAL3
(
VankeAffairsBoard_iPhone
,
btnSaleInput
,
signal
)
{
...
...
vanke/view_iPhone/templates/common/PullLoader.m
View file @
4bcf1b6c
...
...
@@ -49,7 +49,7 @@ DEF_OUTLET( BeeUIActivityIndicatorView, indicator )
self
.
arrow
.
hidden
=
NO
;
self
.
indicator
.
hidden
=
YES
;
self
.
status
.
data
=
@"Pull to refresh"
;
self
.
date
.
data
=
[
NSString
stringWithFormat
:
@"
Last update
:%@"
,
[[
NSDate
date
]
stringWithDateFormat
:
@"MM/dd/yyyy"
]];
self
.
date
.
data
=
[
NSString
stringWithFormat
:
@"
最后更新时间
:%@"
,
[[
NSDate
date
]
stringWithDateFormat
:
@"MM/dd/yyyy"
]];
}
-
(
void
)
unload
...
...
@@ -74,7 +74,7 @@ ON_SIGNAL3( BeeUIPullLoader, STATE_CHANGED, signal )
self
.
arrow
.
transform
=
CGAffineTransformRotate
(
CGAffineTransformIdentity
,
(
M_PI
/
360
.
0
f
)
*
-
359
.
0
f
);
self
.
indicator
.
hidden
=
YES
;
self
.
status
.
data
=
@"松开刷新数据"
;
self
.
date
.
data
=
[
NSString
stringWithFormat
:
@"
Last update
:%@"
,
[[
NSDate
date
]
stringWithDateFormat
:
@"MM/dd/yyyy"
]];
self
.
date
.
data
=
[
NSString
stringWithFormat
:
@"
最后更新时间
:%@"
,
[[
NSDate
date
]
stringWithDateFormat
:
@"MM/dd/yyyy"
]];
}
else
if
(
self
.
loading
)
{
...
...
vanke/view_iPhone/templates/statement/VankeStatementDetailListCell_iPhone.h
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementDetailListCell_iPhone.h
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#pragma mark -
@interface
VankeStatementDetailListCell_iPhone
:
BeeUICell
@end
vanke/view_iPhone/templates/statement/VankeStatementDetailListCell_iPhone.m
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementDetailListCell_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStatementDetailListCell_iPhone.h"
#pragma mark -
@implementation
VankeStatementDetailListCell_iPhone
SUPPORT_AUTOMATIC_LAYOUT
(
YES
)
SUPPORT_RESOURCE_LOADING
(
YES
)
-
(
void
)
load
{
}
-
(
void
)
unload
{
}
-
(
void
)
dataDidChanged
{
// TODO: fill data
}
-
(
void
)
layoutDidFinish
{
// TODO: custom layout here
}
@end
vanke/view_iPhone/templates/statement/VankeStatementDetailListCell_iPhone.xml
0 → 100644
View file @
4bcf1b6c
<?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%;
}
</style>
</ui>
\ No newline at end of file
vanke/view_iPhone/templates/statement/VankeStatementListBoard_iPhone.h
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementListBoard_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"
#pragma mark -
@interface
VankeStatementListBoard_iPhone
:
VankeBaseBoard
AS_MODEL
(
VankeStatementListModel
,
model
)
AS_OUTLET
(
BeeUIScrollView
,
list
)
AS_OUTLET
(
BeeUISearchBar
,
searchBar
)
@end
vanke/view_iPhone/templates/statement/VankeStatementListBoard_iPhone.m
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementListBoard_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStatementListBoard_iPhone.h"
#import "PullLoader.h"
#import "FootLoader.h"
#import "VankeUtil.h"
#import "GEToast.h"
#import "NoDataCell_iPhoneCell.h"
#import "VankeStatementListItemCell_iPhone.h"
#pragma mark -
@interface
VankeStatementListBoard_iPhone
()
{
//<#@private var#>
}
@end
@implementation
VankeStatementListBoard_iPhone
SUPPORT_AUTOMATIC_LAYOUT
(
YES
)
SUPPORT_RESOURCE_LOADING
(
YES
)
DEF_MODEL
(
VankeStatementListModel
,
model
)
DEF_OUTLET
(
BeeUIScrollView
,
list
)
DEF_OUTLET
(
BeeUISearchBar
,
searchBar
)
-
(
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
=
@"对账单"
;
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
.
2
f
;
self
.
list
.
baseInsets
=
bee
.
ui
.
config
.
baseInsets
;
self
.
list
.
whenReloading
=
^
{
self
.
list
.
total
=
self
.
model
.
items
.
count
;
INFO
(
@"total = %d"
,
self
.
model
.
items
.
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
=
[
VankeStatementListItemCell_iPhone
class
];
SubjectItem
*
subItem
=
[
self
.
model
.
items
safeObjectAtIndex
:
item
.
index
];
item
.
data
=
subItem
;
}
}
};
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;
}
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
];
}
[
BeeUIRouter
sharedInstance
].
view
.
pannable
=
YES
;
}
ON_DID_APPEAR
(
signal
)
{
}
ON_WILL_DISAPPEAR
(
signal
)
{
[
BeeUIRouter
sharedInstance
].
view
.
pannable
=
NO
;
}
ON_DID_DISAPPEAR
(
signal
)
{
}
#pragma mark VankeStatementListBoard_iPhone
ON_SIGNAL3
(
VankeStatementListBoard_iPhone
,
searchBar
,
signal
)
{
// NSString *nameLike = [VankeUtil trim:_searchBar.text];
// self.model.nameLike = nameLike;
[
self
.
model
firstPage
];
}
#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
];
}
#pragma UISearchBarDelegate
-
(
void
)
searchBarSearchButtonClicked
:
(
UISearchBar
*
)
searchBar
{
// NSString *nameLike = [VankeUtil trim:_searchBar.text];
// self.model.nameLike = nameLike;
[
self
.
model
firstPage
];
}
@end
vanke/view_iPhone/templates/statement/VankeStatementListBoard_iPhone.xml
0 → 100644
View file @
4bcf1b6c
<?xml version="1.0" encoding="UTF-8"?>
<ui
namespace=
"VankeStatementListBoard_iPhone"
>
<linear
class=
"wrapper"
>
<image
class=
"bg"
/>
<list
id=
"list"
/>
<searchbar
id=
"searchBar"
class=
"search-wrapper"
/>
</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: 45px;
width: 100%;
height: 100%;
}
.search-wrapper {
height: 45px;
width: 100%;
position: absolute;
left: 0px;
top: 64px;
placeholder: "请输入商铺名称或代码搜索";
}
</style>
</ui>
vanke/view_iPhone/templates/statement/VankeStatementListItemCell_iPhone.h
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementListItemCell_iPhone.h
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#pragma mark -
@interface
VankeStatementListItemCell_iPhone
:
BeeUICell
AS_OUTLET
(
BeeUIImageView
,
imgPhoto
)
AS_OUTLET
(
BeeUILabel
,
lblName
)
AS_OUTLET
(
BeeUIImageView
,
lblState
)
AS_OUTLET
(
BeeUILabel
,
lblAmount
)
@end
vanke/view_iPhone/templates/statement/VankeStatementListItemCell_iPhone.m
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementListItemCell_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStatementListItemCell_iPhone.h"
#import "VankeSettlementListAPI.h"
#pragma mark -
@implementation
VankeStatementListItemCell_iPhone
SUPPORT_AUTOMATIC_LAYOUT
(
YES
)
SUPPORT_RESOURCE_LOADING
(
YES
)
DEF_OUTLET
(
BeeUIImageView
,
imgPhoto
)
DEF_OUTLET
(
BeeUILabel
,
lblName
)
DEF_OUTLET
(
BeeUIImageView
,
lblState
)
DEF_OUTLET
(
BeeUILabel
,
lblAmount
)
-
(
void
)
load
{
}
-
(
void
)
unload
{
}
-
(
void
)
dataDidChanged
{
SubjectItem
*
item
=
(
SubjectItem
*
)
self
.
data
;
if
(
!
item
)
{
return
;
}
$
(
self
.
imgPhoto
).
DATA
([
item
getPictureUrlOrDefault
]);
$
(
self
.
lblName
).
DATA
([
item
codeName
]);
$
(
self
.
lblState
).
DATA
(
@"已确认"
);
$
(
self
.
lblAmount
).
DATA
([
NSString
stringWithFormat
:
@"%@%.2f元"
,
@""
,
[
item
.
amount
doubleValue
]]);
}
-
(
void
)
layoutDidFinish
{
// TODO: custom layout here
}
@end
vanke/view_iPhone/templates/statement/VankeStatementListItemCell_iPhone.xml
0 → 100644
View file @
4bcf1b6c
<?xml version="1.0" encoding="UTF-8"?>
<ui
namespace=
"VankeStatementListItemCell_iPhone"
>
<linear
orientation=
"v"
class=
"wrapper"
>
<button
id=
"mask"
class=
"mask"
/>
<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"
>
<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>
</linear>
</linear>
<style
type=
"text/css"
>
.wrapper {
width: 100%;
height: 100%;
}
.mask {
width: 100%;
height: 100%;
position: absolute;
left: 0px;
top: 0px;
}
.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: 80px;
margin-right: 5px;
}
.name-col {
width: 100px;
margin-right: 5px;
}
.name-col .name {
word-wrap: break-word;
text-overflow: ellipsis;
}
.state-col {
width: 40px;
margin-right: 5px;
}
.amount-col {
width: auto;
}
.amount-col .amount {
word-wrap: break-word;
text-valign: right;
}
.photo-col .photo {
width: 100%;
height: 100%;
image-mode: fit;
image-loading: white;
}
</style>
</ui>
\ No newline at end of file
vanke/view_iPhone/templates/statement/VankeStatementMonthCell_iPhone.h
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementMonthCell_iPhone.h
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#pragma mark -
@interface
VankeStatementMonthCell_iPhone
:
BeeUICell
@end
vanke/view_iPhone/templates/statement/VankeStatementMonthCell_iPhone.m
0 → 100644
View file @
4bcf1b6c
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStatementMonthCell_iPhone.m
// vanke
//
// Created by xiaomi on 15/11/16.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStatementMonthCell_iPhone.h"
#pragma mark -
@implementation
VankeStatementMonthCell_iPhone
SUPPORT_AUTOMATIC_LAYOUT
(
YES
)
SUPPORT_RESOURCE_LOADING
(
YES
)
-
(
void
)
load
{
}
-
(
void
)
unload
{
}
-
(
void
)
dataDidChanged
{
// TODO: fill data
}
-
(
void
)
layoutDidFinish
{
// TODO: custom layout here
}
@end
vanke/view_iPhone/templates/statement/VankeStatementMonthCell_iPhone.xml
0 → 100644
View file @
4bcf1b6c
<?xml version="1.0" encoding="UTF-8"?>
<ui
namespace=
"VankeStatementMonthCell_iPhone"
>
<!--
<row></row>
-->
<col
class=
"wrapper"
>
<!-- add your UI elements here -->
</col>
<style
type=
"text/css"
>
.wrapper {
width: 100%;
height: 100%;
}
</style>
</ui>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment