Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
X
xffruit
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
张杰
xffruit
Commits
d61f432e
Commit
d61f432e
authored
9 years ago
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择转运单按钮显示出来以及报表首页接口
parent
92405e42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
398 additions
and
379 deletions
+398
-379
ICRHTTPController.h
XFFruit/Controllers/HTTPController/ICRHTTPController.h
+4
-5
ICRHTTPController.m
XFFruit/Controllers/HTTPController/ICRHTTPController.m
+9
-8
IBTConstants.h
XFFruit/Utilities/IBTUIKit/IBTConstants.h
+3
-1
ICRUserUtil.h
XFFruit/Utilities/UserUtil/ICRUserUtil.h
+4
-4
GXFPopView.m
XFFruit/ViewControllers/ChooseViewController/GXFPopView.m
+7
-2
ReportDetailViewController.h
...ntrollers/Report/Controllers/ReportDetailViewController.h
+2
-0
ReportDetailViewController.m
...ntrollers/Report/Controllers/ReportDetailViewController.m
+37
-6
ReportViewController.m
...ViewControllers/Report/Controllers/ReportViewController.m
+49
-286
SearchReportViewController.m
...ntrollers/Report/Controllers/SearchReportViewController.m
+142
-9
Compass.h
XFFruit/ViewControllers/Report/Models/Compass.h
+8
-8
LowerOrgs.h
XFFruit/ViewControllers/Report/Models/LowerOrgs.h
+22
-0
LowerOrgs.m
XFFruit/ViewControllers/Report/Models/LowerOrgs.m
+13
-0
PasengerCell.m
XFFruit/ViewControllers/Report/Views/PasengerCell.m
+35
-6
RPassgerView.m
XFFruit/ViewControllers/Report/Views/RPassgerView.m
+15
-21
RSaleView.m
XFFruit/ViewControllers/Report/Views/RSaleView.m
+10
-10
RsearchCell.h
XFFruit/ViewControllers/Report/Views/RsearchCell.h
+2
-2
RsearchCell.m
XFFruit/ViewControllers/Report/Views/RsearchCell.m
+4
-0
SaleViewCell.m
XFFruit/ViewControllers/Report/Views/SaleViewCell.m
+32
-11
No files found.
XFFruit/Controllers/HTTPController/ICRHTTPController.h
View file @
d61f432e
...
...
@@ -420,11 +420,10 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
-
(
void
)
queryHomepageWith
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//2.报表首页组织明细(读)
-
(
void
)
queryOrgdataWith
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
//2.查询下级组织列表
-
(
void
)
queryLowerOrgsWith
:(
id
)
data
success
:(
void
(
^
)(
id
))
succ
failure
:(
void
(
^
)(
id
))
fail
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/Controllers/HTTPController/ICRHTTPController.m
View file @
d61f432e
...
...
@@ -133,7 +133,7 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
XFFHttp_getVersionId
,
//报表首页,数据罗盘
XFFHttp_QueryHomepage
,
XFFHttp_Query
Orgdata
,
XFFHttp_Query
LowerOrgs
,
};
...
...
@@ -248,7 +248,7 @@ static NSString * const ICRHTTPInterface[] = {
[
XFFHttp_getVersionId
]
=
@"ipapk"
,
//报表
[
XFFHttp_QueryHomepage
]
=
@"salesdata/query"
,
[
XFFHttp_Query
Orgdata
]
=
@"compass/query_orgdata
"
,
[
XFFHttp_Query
LowerOrgs
]
=
@"organization/queryLowerOrgs
"
,
};
...
...
@@ -522,6 +522,7 @@ acceptTypeJson:(BOOL)bAcceptJson
userUtil
.
org_code
=
dictResult
[
@"org_code"
];
userUtil
.
org_name
=
dictResult
[
@"org_name"
];
userUtil
.
org_uuid
=
dictResult
[
@"org_uuid"
];
userUtil
.
belongOrgPath
=
dictResult
[
@"belongOrgPath"
];
userUtil
.
password
=
nsPassword
;
userUtil
.
isLogout
=
NO
;
[
userUtil
saveArchive
];
...
...
@@ -3053,10 +3054,10 @@ acceptTypeJson:YES
failure
:
failure
];
}
#pragma mark -
报表首页组织明细(读)
-
(
void
)
query
Orgdata
With
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
#pragma mark -
查询下级组织代码
-
(
void
)
query
LowerOrgs
With
:
(
id
)
data
success
:
(
void
(
^
)(
id
))
succ
failure
:
(
void
(
^
)(
id
))
fail
{
if
(
!
data
)
{
if
(
fail
)
{
fail
(
[[
self
class
]
ErrorWithMsg
:
ERROR_PARAMETER
code
:
0
]
);
...
...
@@ -3077,14 +3078,14 @@ acceptTypeJson:YES
}
};
NSDictionary
*
dict
=
data
;
NSString
*
urlStr
=
[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_Query
Orgdata
];
NSString
*
urlStr
=
[[
self
class
]
UrlForPluginHTTPAction
:
XFFHttp_Query
LowerOrgs
];
[
self
POST
:
urlStr
parameters
:
dict
needToken
:
NO
acceptTypeJson
:
YES
success
:
success
failure
:
failure
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/IBTUIKit/IBTConstants.h
View file @
d61f432e
...
...
@@ -107,7 +107,7 @@
#define GXF_LEFTSIX_COLOR HexColor(@"666666")
#define GXF_PopView_COLOR RGBA(24,164,219,1)
#define GXF_TWELVETEEN_SIZE FontSize(12)
#define GXF_TWELVETEEN_SIZE
FontSize(12)
#define GXF_THREETEENTH_SIZE FontSize(13)
#define GXF_FOURTEENTH_SIZE FontSize(14)
#define GXF_FIFTEENTEN_SIZE FontSize(15)
...
...
@@ -127,6 +127,7 @@
#define PurchaseNoticeUpdateDate @"purchaseNoticeUpdateDate"
#define TransferUpdateDate @"TransferUpdateDate"
#define ChooseTransportUpdateDate @"ChooseTransportUpdateDate"
#define SearchReportViewDate @"SearchReportViewDate"
//行情调研状态
...
...
@@ -238,6 +239,7 @@
#define ReportContentColor HexColor(@"f4422e")
#define ReportTitleColor GXF_PLACEHOLDER_COLOR
#define ReportBgColor RGBA(219,219,219,1)
#define ReportTwoColor HexColor(@"A3A3A3")
#define ReportChainSignPlus @"plus"
#define ReportChainSignMinus @"minus"
...
...
This diff is collapsed.
Click to expand it.
XFFruit/Utilities/UserUtil/ICRUserUtil.h
View file @
d61f432e
...
...
@@ -40,10 +40,10 @@
@property
(
assign
,
nonatomic
)
BOOL
isLogout
;
//新增
@property
(
assign
,
nonatomic
)
BOOL
belongOrgIsLeaf
;
@property
(
copy
,
nonatomic
)
NSString
*
org_code
;
//
@property
(
copy
,
nonatomic
)
NSString
*
org_name
;
//
@property
(
copy
,
nonatomic
)
NSString
*
org_uuid
;
//
@property
(
copy
,
nonatomic
)
NSString
*
org_code
;
@property
(
copy
,
nonatomic
)
NSString
*
org_name
;
@property
(
copy
,
nonatomic
)
NSString
*
org_uuid
;
@property
(
copy
,
nonatomic
)
NSString
*
belongOrgPath
;
+
(
instancetype
)
sharedInstance
;
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/ChooseViewController/GXFPopView.m
View file @
d61f432e
...
...
@@ -31,7 +31,11 @@
-
(
void
)
bulidLayout
{
self
.
backgroundColor
=
RGBA
(
0
,
0
,
0
,
0
.
5
);
UIView
*
bgView
=
[[
UIView
alloc
]
initWithFrame
:
CGRectMake
(
GXFPOpView_LeftMargin
,
(
ScreenSize
.
height
-
GXFPOpView_ContentHeight
)
/
2
,
ScreenSize
.
width
-
GXFPOpView_LeftMargin
*
2
,
GXFPOpView_ContentHeight
)];
CGRect
rect
=
CGRectMake
(
GXFPOpView_LeftMargin
,
(
ScreenSize
.
height
-
GXFPOpView_ContentHeight
)
/
2
,
ScreenSize
.
width
-
GXFPOpView_LeftMargin
*
2
,
GXFPOpView_ContentHeight
);
if
(
self
.
titleArr
.
count
==
4
)
{
rect
=
CGRectMake
(
GXFPOpView_LeftMargin
,
(
ScreenSize
.
height
-
GXFPOpView_ContentHeight
)
/
2
,
ScreenSize
.
width
-
GXFPOpView_LeftMargin
*
2
,
GXFPOpView_ContentHeight
+
44
);
}
UIView
*
bgView
=
[[
UIView
alloc
]
initWithFrame
:
rect
];
bgView
.
backgroundColor
=
XXFBgColor
;
bgView
.
layer
.
cornerRadius
=
4
;
bgView
.
layer
.
masksToBounds
=
YES
;
...
...
@@ -47,7 +51,8 @@
lineLabel
.
backgroundColor
=
GXF_PopView_COLOR
;
[
bgView
addSubview
:
lineLabel
];
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
GXFPOpView_TopHeight
,
CGRectGetWidth
(
bgView
.
frame
),
GXFPOpView_ContentHeight
-
GXFPOpView_TopHeight
*
2
)
style
:
UITableViewStylePlain
];
rect
=
CGRectMake
(
0
,
GXFPOpView_TopHeight
,
CGRectGetWidth
(
bgView
.
frame
),
CGRectGetHeight
(
bgView
.
frame
)
-
GXFPOpView_TopHeight
*
2
);
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
rect
style
:
UITableViewStylePlain
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
bgView
addSubview
:
self
.
tableView
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Controllers/ReportDetailViewController.h
View file @
d61f432e
...
...
@@ -11,4 +11,6 @@
@interface
ReportDetailViewController
:
ICRBaseViewController
@property
(
nonatomic
,
strong
)
NSString
*
reportStyle
;
@property
(
nonatomic
,
strong
)
Compass
*
compass
;
@property
(
nonatomic
,
strong
)
NSString
*
orgUuid
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Controllers/ReportDetailViewController.m
View file @
d61f432e
...
...
@@ -11,7 +11,7 @@
#import "RSaleView.h"
#import "RPassgerView.h"
#import "FinishTimeView.h"
#import "QueryOrder.h"
@interface
ReportDetailViewController
()
<
CustomSegViewDelegate
,
FinishTimeViewDelegate
>
@property
(
nonatomic
,
strong
)
CustomSegView
*
segView
;
@property
(
nonatomic
,
strong
)
RSaleView
*
rsaleView
;
...
...
@@ -28,6 +28,7 @@
@property
(
nonatomic
,
strong
)
FinishTimeView
*
startTimeView
;
@property
(
nonatomic
,
strong
)
NSString
*
dayType
;
@property
(
nonatomic
,
strong
)
NSString
*
scopeType
;
@property
(
nonatomic
,
strong
)
NSString
*
selectDay
;
@property
(
nonatomic
,
strong
)
NSString
*
selectMonth
;
...
...
@@ -95,7 +96,38 @@
[
self
.
rgrossView
setGrossprofitWithCompass
:
self
.
compass
];
}
-
(
void
)
getDataFromServer
{
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
//赋值
[
IBTLoadingView
hideHUDWithText
:
nil
];
// [strongSelf prepareDataInScrollView:data];
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
NSMutableArray
*
orderArr
=
[
NSMutableArray
array
];
if
(
orderArr
.
count
==
0
)
{
QueryOrder
*
order
=
[
QueryOrder
new
];
order
.
field
=
@"orgCode"
;
order
.
direction
=
@"desc"
;
[
orderArr
addObject
:[
order
dictForCommit
]];
}
NSDictionary
*
dict
=
@{
@"dataScopeType"
:
self
.
dayType
,
@"dataScope"
:
self
.
scopeType
,
@"orgUuid"
:
self
.
orgUuid
,
@"fetchScope"
:
@"owner"
,
@"queryOrders"
:
orderArr
,
@"pageNumber"
:
@0
,
@"pageSize"
:
@100
};
[[
ICRHTTPController
sharedController
]
queryHomepageWith
:
dict
success
:
succ
failure
:
fail
];
}
#pragma mark -CustomSegViewDelegate
-
(
void
)
customSegOneClick
:
(
NSString
*
)
title
{
...
...
@@ -112,8 +144,8 @@
self
.
scopeType
=
[
IBTCommon
stringFromDateWithFormat
:[
NSDate
date
]
format
:
@"yyyy-MM"
];
}
CLog
(
@"-------%@"
,
self
.
scopeType
);
//
self.dayType = dayType;
//
[self getDataFromServer];
self
.
dayType
=
dayType
;
[
self
getDataFromServer
];
}
-
(
void
)
customSegTwoClick
:
(
NSString
*
)
title
{
//选择历史查看
...
...
@@ -181,8 +213,7 @@
}
self
.
scopeType
=
time
;
#warning 需要修改的
//[self getDataFromServer];
[
self
getDataFromServer
];
}
#pragma mark - 取消
-
(
void
)
clearDatePickView
{
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Controllers/ReportViewController.m
View file @
d61f432e
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Controllers/SearchReportViewController.m
View file @
d61f432e
...
...
@@ -8,11 +8,20 @@
#import "SearchReportViewController.h"
#import "RsearchCell.h"
#import "LowerOrgs.h"
#import "ReportDetailViewController.h"
#import "MJRefresh.h"
@interface
SearchReportViewController
()
<
UITextFieldDelegate
,
UITableViewDataSource
,
UITableViewDelegate
>
{
NSInteger
_currentPage
;
BOOL
_isRefresh
;
BOOL
_isLoadMore
;
}
@property
(
nonatomic
,
strong
)
UITextField
*
selectTextFiled
;
@property
(
nonatomic
,
strong
)
UITableView
*
tableView
;
@property
(
nonatomic
,
strong
)
NSMutableArray
*
dataArr
;
@property
(
nonatomic
,
strong
)
NSString
*
nameAndCode
;
@end
...
...
@@ -21,11 +30,19 @@
-
(
void
)
viewDidLoad
{
[
super
viewDidLoad
];
self
.
title
=
@"搜索组织"
;
_currentPage
=
0
;
self
.
view
.
backgroundColor
=
[
UIColor
whiteColor
];
self
.
dataArr
=
[
NSMutableArray
array
];
self
.
selectTextFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
20
,
5
,
ScreenSize
.
width
-
100
,
30
)];
//布局
[
self
bulidLayout
];
[
self
createRefresh
];
//请求数据
[
self
getOrgDataFromServer
];
}
#pragma mark - 布局
-
(
void
)
bulidLayout
{
//布局
self
.
selectTextFiled
=
[[
UITextField
alloc
]
initWithFrame
:
CGRectMake
(
20
,
5
,
ScreenSize
.
width
-
100
,
40
)];
self
.
selectTextFiled
.
textAlignment
=
NSTextAlignmentLeft
;
self
.
selectTextFiled
.
background
=
[
UIImage
imageNamed
:
@"textFiled"
];
self
.
selectTextFiled
.
delegate
=
self
;
...
...
@@ -33,9 +50,20 @@
self
.
selectTextFiled
.
font
=
GXF_THREETEENTH_SIZE
;
[
self
.
view
addSubview
:
self
.
selectTextFiled
];
UIImageView
*
leftView
=
[[
UIImageView
alloc
]
initWithFrame
:
CGRectMake
(
0
,
0
,
35
,
40
)];
leftView
.
image
=
[
UIImage
imageNamed
:
@"search"
];
self
.
selectTextFiled
.
leftView
=
leftView
;
self
.
selectTextFiled
.
leftViewMode
=
UITextFieldViewModeAlways
;
UIButton
*
rightView
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
[
rightView
setImage
:[
UIImage
imageNamed
:
@"delete"
]
forState
:
UIControlStateNormal
];
rightView
.
frame
=
CGRectMake
(
0
,
0
,
35
,
40
);
[
rightView
addTarget
:
self
action
:
@selector
(
deleteTextFieldStr
)
forControlEvents
:
UIControlEventTouchUpInside
];
self
.
selectTextFiled
.
rightView
=
rightView
;
self
.
selectTextFiled
.
rightViewMode
=
UITextFieldViewModeAlways
;
UIButton
*
btn
=
[
UIButton
buttonWithType
:
UIButtonTypeCustom
];
btn
.
frame
=
CGRectMake
(
self
.
selectTextFiled
.
right
+
5
,
7
,
6
0
,
2
5
);
btn
.
frame
=
CGRectMake
(
self
.
selectTextFiled
.
right
+
5
,
7
,
6
5
,
3
5
);
[
btn
setTitle
:
@"开始查询"
forState
:
UIControlStateNormal
];
btn
.
titleLabel
.
font
=
FontSize
(
13
);
btn
.
layer
.
cornerRadius
=
5
;
...
...
@@ -44,21 +72,114 @@
[
btn
addTarget
:
self
action
:
@selector
(
checkWithBillNumber
)
forControlEvents
:
UIControlEventTouchUpInside
];
[
self
.
view
addSubview
:
btn
];
CGRect
rect
=
CGRectMake
(
0
,
50
,
ScreenSize
.
width
,
ScreenSize
.
height
-
163
);
CGRect
rect
=
CGRectMake
(
0
,
50
,
ScreenSize
.
width
,
ScreenSize
.
height
-
64
-
50
);
self
.
tableView
=
[[
UITableView
alloc
]
initWithFrame
:
rect
style
:
UITableViewStylePlain
];
self
.
tableView
.
delegate
=
self
;
self
.
tableView
.
dataSource
=
self
;
[
self
.
view
addSubview
:
self
.
tableView
];
}
-
(
void
)
deleteTextFieldStr
{
self
.
selectTextFiled
.
text
=
@""
;
}
#pragma mark - 刷新
-
(
void
)
createRefresh
{
self
.
tableView
.
header
=
[
MJRefreshNormalHeader
headerWithRefreshingBlock
:
^
{
if
(
_isRefresh
)
{
return
;
}
_isRefresh
=
YES
;
_currentPage
=
0
;
[
self
getOrgDataFromServer
];
}];
self
.
tableView
.
header
.
lastUpdatedTimeKey
=
SearchReportViewDate
;
self
.
tableView
.
footer
=
[
MJRefreshAutoNormalFooter
footerWithRefreshingBlock
:
^
{
if
(
_isLoadMore
)
{
return
;
}
_isLoadMore
=
YES
;
_currentPage
++
;
[
self
getOrgDataFromServer
];
}
];
}
#pragma mark - 请求服务器
-
(
void
)
getOrgDataFromServer
{
__weak
typeof
(
self
)
weakSelf
=
self
;
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
//赋值
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
strongSelf
prepareDataInTable
:
data
];
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
};
if
(
!
self
.
nameAndCode
)
{
self
.
nameAndCode
=
@""
;
}
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
NSDictionary
*
dict
=
@{
@"path"
:
userUtil
.
belongOrgPath
,
@"code"
:
self
.
nameAndCode
,
@"name"
:
self
.
nameAndCode
,
@"pageNumber"
:
@
(
_currentPage
),
@"pageSize"
:
@20
};
[[
ICRHTTPController
sharedController
]
queryLowerOrgsWith
:
dict
success
:
succ
failure
:
fail
];
}
#pragma mark - 准备数据
-
(
void
)
prepareDataInTable
:
(
id
)
data
{
if
(
data
)
{
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
if
(
_currentPage
==
0
)
{
if
(
self
.
dataArr
.
count
>
0
)
{
[
self
.
dataArr
removeAllObjects
];
}
}
NSArray
*
arr
=
data
[
@"data"
][
@"records"
];
if
(
arr
.
count
>
0
)
{
for
(
NSDictionary
*
comDict
in
arr
)
{
LowerOrgs
*
com
=
[[
LowerOrgs
alloc
]
init
];
[
com
setValuesForKeysWithDictionary
:
comDict
];
[
self
.
dataArr
addObject
:
com
];
}
}
NSDictionary
*
pageDict
=
data
[
@"data"
][
@"paging"
];
NSInteger
pageCount
=
[
pageDict
[
@"pageCount"
]
integerValue
];
[
self
.
tableView
reloadData
];
[
self
endRefreshing
];
if
(
pageCount
<=
_currentPage
)
{
[
self
.
tableView
.
footer
noticeNoMoreData
];
}
if
(
_currentPage
==
0
&&
self
.
dataArr
.
count
>
0
)
{
[
self
.
tableView
scrollToRowAtIndexPath
:[
NSIndexPath
indexPathForRow
:
0
inSection
:
0
]
atScrollPosition
:
UITableViewScrollPositionTop
animated
:
YES
];
}
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
}
else
{
[
IBTLoadingView
showTips
:
@" 无记录 "
];
}
}
#pragma mark - 结束刷新
-
(
void
)
endRefreshing
{
_isLoadMore
=
NO
;
_isRefresh
=
NO
;
[
self
.
tableView
.
header
endRefreshing
];
[
self
.
tableView
.
footer
endRefreshing
];
}
#pragma mark - tableViewDelegate
-
(
NSInteger
)
numberOfSectionsInTableView
:
(
UITableView
*
)
tableView
{
return
1
;
}
-
(
NSInteger
)
tableView
:
(
UITableView
*
)
tableView
numberOfRowsInSection
:
(
NSInteger
)
section
{
return
2
;
return
self
.
dataArr
.
count
;
}
-
(
UITableViewCell
*
)
tableView
:
(
UITableView
*
)
tableView
cellForRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
static
NSString
*
cellID
=
@"SearchCell"
;
...
...
@@ -71,7 +192,11 @@
cell
.
selectionStyle
=
UITableViewCellSelectionStyleNone
;
//取消分割线
tableView
.
separatorStyle
=
UITableViewCellSeparatorStyleNone
;
if
(
self
.
dataArr
.
count
>
0
)
{
LowerOrgs
*
orgs
=
self
.
dataArr
[
indexPath
.
row
];
[
cell
setvalueWithLowerOrgs
:
orgs
];
}
return
cell
;
}
-
(
void
)
tableView
:
(
UITableView
*
)
tableView
didSelectRowAtIndexPath
:
(
NSIndexPath
*
)
indexPath
{
...
...
@@ -85,8 +210,16 @@
{
return
[
RsearchCell
cellHeight
];
}
#pragma mark - 搜索门店
-
(
void
)
checkWithBillNumber
{
[
self
.
selectTextFiled
resignFirstResponder
];
if
(
self
.
selectTextFiled
.
text
.
length
>
0
)
{
self
.
nameAndCode
=
self
.
selectTextFiled
.
text
;
}
else
{
self
.
nameAndCode
=
nil
;
}
_currentPage
=
0
;
[
self
getOrgDataFromServer
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Models/Compass.h
View file @
d61f432e
...
...
@@ -9,9 +9,9 @@
#import "IBTModel.h"
@interface
Compass
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
dat
e
ScopeType
;
@property
(
nonatomic
,
strong
)
NSString
*
dat
a
ScopeType
;
// 统计时间类型 否 String 100 day(日),week(周),month(月)
@property
(
nonatomic
,
strong
)
NSString
*
dat
e
Scope
;
@property
(
nonatomic
,
strong
)
NSString
*
dat
a
Scope
;
// 统计时间 否 String 100 日:2015-10-10周:37,表示今年第几周月:2015-10
@property
(
nonatomic
,
strong
)
NSString
*
orgUuid
;
//组织标识 否 String
...
...
@@ -21,9 +21,9 @@
//组织名称 否 Integer
@property
(
nonatomic
,
assign
)
NSInteger
level
;
//等级 否 String
@property
(
nonatomic
,
strong
)
NSString
*
upper
u
uid
;
@property
(
nonatomic
,
strong
)
NSString
*
upper
U
uid
;
//上级组织uuid 否 String
@property
(
nonatomic
,
strong
)
NS
String
*
sales
;
@property
(
nonatomic
,
strong
)
NS
Number
*
sales
;
// 销售额 是 String 100
@property
(
nonatomic
,
strong
)
NSString
*
salesChainSign
;
// 销售环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
...
...
@@ -35,11 +35,11 @@
//销售同比变化率 是 Double
@property
(
nonatomic
,
strong
)
NSNumber
*
salesTargetRate
;
//销售目标达成率 是 Double
@property
(
nonatomic
,
strong
)
NS
String
*
dailysalesPerStore
;
@property
(
nonatomic
,
strong
)
NS
Number
*
dailysalesPerStore
;
//单店日均销售 是 String 100
@property
(
nonatomic
,
strong
)
NSString
*
passengerdate
;
//客流统计时间 是 String 100
@property
(
nonatomic
,
strong
)
NS
String
*
passenger
;
@property
(
nonatomic
,
strong
)
NS
Number
*
passenger
;
// 客流数 是 String 100
@property
(
nonatomic
,
strong
)
NSString
*
passengerChainSign
;
// 客流数环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
...
...
@@ -51,7 +51,7 @@
// 客流数同比变化率 是 Double
@property
(
nonatomic
,
strong
)
NSString
*
persalesdate
;
//客单价统计时间 是 String 100
@property
(
nonatomic
,
strong
)
NS
String
*
persales
;
@property
(
nonatomic
,
strong
)
NS
Number
*
persales
;
//客单价 是 String 100
@property
(
nonatomic
,
strong
)
NSString
*
persalesChainSign
;
//客单价环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
...
...
@@ -63,7 +63,7 @@
//客单价同比增减率 是 Double
@property
(
nonatomic
,
strong
)
NSString
*
grossprofitdate
;
//毛利率统计时间 是 String 100
@property
(
nonatomic
,
strong
)
NS
String
*
grossprofit
;
@property
(
nonatomic
,
strong
)
NS
Number
*
grossprofit
;
//毛利率 是 String 100
@property
(
nonatomic
,
strong
)
NSString
*
grossprofitChainSign
;
//毛利率环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Models/LowerOrgs.h
0 → 100644
View file @
d61f432e
//
// LowerOrgs.h
// XFFruit
//
// Created by 陈俊俊 on 15/11/25.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface
LowerOrgs
:
IBTModel
@property
(
nonatomic
,
strong
)
NSString
*
uuid
;
// 唯一标识 否 String 40
@property
(
nonatomic
,
strong
)
NSNumber
*
version
;
//版本号 否 long
@property
(
nonatomic
,
strong
)
NSString
*
create_time
;
// 创建时间 是 Date
@property
(
nonatomic
,
strong
)
NSString
*
create_id
;
// 创建人代码 是 String 32
@property
(
nonatomic
,
strong
)
NSString
*
create_operName
;
//创建人名称 是 String 64
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_time
;
//最后修改时间 是 Date
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_id
;
//最后修改人代码 是 String 32
@property
(
nonatomic
,
strong
)
NSString
*
lastModify_operName
;
//最后修改人名称 是 String 64
@property
(
nonatomic
,
strong
)
NSString
*
code
;
// 代码 否 String
@property
(
nonatomic
,
strong
)
NSString
*
name
;
// 名称 否 String 50
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Models/LowerOrgs.m
0 → 100644
View file @
d61f432e
//
// LowerOrgs.m
// XFFruit
//
// Created by 陈俊俊 on 15/11/25.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "LowerOrgs.h"
@implementation
LowerOrgs
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Views/PasengerCell.m
View file @
d61f432e
...
...
@@ -99,14 +99,18 @@
self
.
dqLabel
.
text
=
sale
.
orgCode
;
self
.
nameLabel
.
text
=
sale
.
orgName
;
//客单价
self
.
saleLabel
.
text
=
sale
.
persales
;
self
.
saleLabel
.
text
=
[
sale
.
persales
stringValue
]
;
//客单价比变化率
if
([
sale
.
persalesChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
ReportContentColor
;
}
else
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_NAVIGAYION_COLOR
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
sale
.
persalesChainRate
];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
...
...
@@ -120,14 +124,18 @@
self
.
dqLabel
.
text
=
sale
.
orgCode
;
self
.
nameLabel
.
text
=
sale
.
orgName
;
//客流量
self
.
saleLabel
.
text
=
sale
.
passenger
;
self
.
saleLabel
.
text
=
[
sale
.
passenger
stringValue
]
;
//客流量比变化率
if
([
sale
.
passengerChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
ReportContentColor
;
}
else
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_NAVIGAYION_COLOR
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
sale
.
passengerChainRate
];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
...
...
@@ -141,14 +149,18 @@
self
.
dqLabel
.
text
=
sale
.
orgCode
;
self
.
nameLabel
.
text
=
sale
.
orgName
;
//毛利率
self
.
saleLabel
.
text
=
sale
.
grossprofit
;
self
.
saleLabel
.
text
=
[
sale
.
grossprofit
stringValue
]
;
//毛利率比变化率
if
([
sale
.
grossprofitChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
ReportContentColor
;
}
else
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_NAVIGAYION_COLOR
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
sale
.
grossprofitChainRate
];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
...
...
@@ -160,12 +172,18 @@
if
(
level
==
0
)
{
self
.
dqLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
nameLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
lineLabel
.
hidden
=
NO
;
[
self
setFontLabel
:
17
];
[
self
setWidthDQ
:
0
];
self
.
contentView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
else
if
(
level
==
1
)
{
self
.
dqLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
nameLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
lineLabel
.
hidden
=
NO
;
[
self
setFontLabel
:
15
];
[
self
setWidthDQ
:
0
];
self
.
contentView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
else
if
(
level
==
1
){
}
else
if
(
level
==
2
){
self
.
lineLabel
.
hidden
=
NO
;
self
.
dqLabel
.
textColor
=
GXF_LEFTSIX_COLOR
;
self
.
nameLabel
.
textColor
=
GXF_LEFTSIX_COLOR
;
...
...
@@ -187,11 +205,22 @@
self
.
dqLabel
.
font
=
FontSize
(
fontSize
-
1
);
self
.
nameLabel
.
font
=
FontSize
(
fontSize
);
self
.
saleLabel
.
font
=
FontSize
(
fontSize
);
self
.
lastWeekLabel
.
font
=
FontSize
(
fontSize
);
self
.
lastWeekLabel
.
titleLabel
.
font
=
FontSize
(
fontSize
);
}
-
(
void
)
setWidthDQ
:
(
NSInteger
)
width
{
self
.
lineLabel
.
left
=
width
;
self
.
lineLabel
.
width
=
ScreenSize
.
width
-
width
;
if
(
width
>
0
)
{
self
.
nameLabel
.
left
=
width
+
5
;
self
.
nameLabel
.
width
=
ScreenSize
.
width
-
width
-
5
;
self
.
dqLabel
.
left
=
width
+
5
;
self
.
dqLabel
.
width
=
ScreenSize
.
width
-
width
-
5
;
}
else
{
self
.
nameLabel
.
left
=
5
;
self
.
nameLabel
.
width
=
ScreenSize
.
width
-
5
;
self
.
dqLabel
.
left
=
5
;
self
.
dqLabel
.
width
=
ScreenSize
.
width
-
5
;
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
[
super
setSelected
:
selected
animated
:
animated
];
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Views/RPassgerView.m
View file @
d61f432e
...
...
@@ -77,14 +77,12 @@
//客流
-
(
void
)
setPassengerWithCompass
:
(
Compass
*
)
compass
{
if
(
!
compass
)
{
return
;
}
//客流数
[
self
.
centerLabel
setImage
:[
UIImage
imageNamed
:
@"goSale"
]
forState
:
UIControlStateDisabled
];
[
self
.
centerLabel
setTitle
:
compass
.
passenger
forState
:
UIControlStateNormal
];
[
self
.
centerLabel
setTitle
:
compass
.
passenger
?[
compass
.
passenger
stringValue
]:
@"0"
forState
:
UIControlStateNormal
];
//客流统计时间
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计客流量"
,
compass
.
passengerdate
];
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计客流量"
,
compass
.
passengerdate
?
compass
.
passengerdate
:
@"无"
];
//客流数环比变化率
if
([
compass
.
passengerChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
...
...
@@ -93,7 +91,7 @@
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerChainRate
];
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerChainRate
?
compass
.
passengerChainRate
:
@"0"
];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//客流数同比变化率
...
...
@@ -104,19 +102,17 @@
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerYoYRate
];
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerYoYRate
?
compass
.
passengerYoYRate
:
@"0"
];
[
self
.
lastYearLabel
setTitle
:
passengerYoYRateStr
forState
:
UIControlStateNormal
];
}
//客单价
-
(
void
)
setPersalesWithCompass
:
(
Compass
*
)
compass
{
if
(
!
compass
)
{
return
;
}
//客单价
[
self
.
centerLabel
setImage
:[
UIImage
imageNamed
:
@"goSale"
]
forState
:
UIControlStateDisabled
];
[
self
.
centerLabel
setTitle
:
compass
.
persales
forState
:
UIControlStateNormal
];
[
self
.
centerLabel
setTitle
:
compass
.
persales
?[
compass
.
persales
stringValue
]:
@"0"
forState
:
UIControlStateNormal
];
//客单价统计时间
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计客
流量"
,
compass
.
persalesdate
];
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计客
单价"
,
compass
.
persalesdate
?
compass
.
persalesdate
:
@"无"
];
//客单价环比变化率
if
([
compass
.
persalesChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
...
...
@@ -125,7 +121,7 @@
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesChainRate
];
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesChainRate
?
compass
.
persalesChainRate
:
@"0"
];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//客单价同比变化率
...
...
@@ -136,19 +132,17 @@
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesYoYRate
];
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesYoYRate
?
compass
.
persalesYoYRate
:
@"0"
];
[
self
.
lastYearLabel
setTitle
:
passengerYoYRateStr
forState
:
UIControlStateNormal
];
}
//毛利率
-
(
void
)
setGrossprofitWithCompass
:
(
Compass
*
)
compass
{
if
(
!
compass
)
{
return
;
}
//毛利率
[
self
.
centerLabel
setImage
:[
UIImage
imageNamed
:
@"goSale"
]
forState
:
UIControlStateDisabled
];
[
self
.
centerLabel
setTitle
:
compass
.
persales
forState
:
UIControlStateNormal
];
[
self
.
centerLabel
setTitle
:
compass
.
persales
?[
compass
.
persales
stringValue
]:
@"0"
forState
:
UIControlStateNormal
];
//毛利率统计时间
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计
客流量"
,
compass
.
persalesdate
];
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计
毛利率"
,
compass
.
persalesdate
?
compass
.
persalesdate
:
@"无"
];
//毛利率环比变化率
if
([
compass
.
grossprofitChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
...
...
@@ -157,7 +151,7 @@
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitChainRate
];
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitChainRate
?
compass
.
grossprofitChainRate
:
@"0"
];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//毛利率同比变化率
...
...
@@ -168,7 +162,7 @@
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitYoYRate
];
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitYoYRate
?
compass
.
grossprofitYoYRate
:
@"0"
];
[
self
.
lastYearLabel
setTitle
:
passengerYoYRateStr
forState
:
UIControlStateNormal
];
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Views/RSaleView.m
View file @
d61f432e
...
...
@@ -116,14 +116,14 @@
-
(
void
)
setValueInSaleView
:
(
Compass
*
)
compass
{
//统计时间
if
(
!
compass
)
{
return
;
}
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计销售额"
,
compass
.
dat
eScope
];
//
if (!compass) {
//
return;
//
}
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@累计销售额"
,
compass
.
dat
aScope
?
compass
.
dataScope
:
@"无"
];
//销售额
NSMutableAttributedString
*
attributeStr1
=
[
IBTCommon
setTextViewBoldFontOfString
:
@"$ "
paragraphStyle
:
8
fontSize
:
20
color
:
ReportColor
];
if
(
compass
.
sales
.
length
>
0
&&
compass
.
sales
)
{
[
attributeStr1
appendAttributedString
:[
IBTCommon
setTextViewBoldFontOfString
:
compass
.
sales
paragraphStyle
:
8
fontSize
:
30
color
:
ReportContentColor
]];
if
(
compass
.
sales
)
{
[
attributeStr1
appendAttributedString
:[
IBTCommon
setTextViewBoldFontOfString
:
[
compass
.
sales
stringValue
]
paragraphStyle
:
8
fontSize
:
30
color
:
ReportContentColor
]];
}
self
.
centerLabel
.
attributedText
=
attributeStr1
;
self
.
centerLabel
.
textAlignment
=
NSTextAlignmentCenter
;
...
...
@@ -135,7 +135,7 @@
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateNormal
];
}
NSString
*
salesChainRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesChainRate
];
NSString
*
salesChainRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesChainRate
?
compass
.
salesChainRate
:
@"0"
];
[
self
.
lastWeekLabel
setTitle
:
salesChainRateStr
forState
:
UIControlStateNormal
];
//销售同比变化率
if
([
compass
.
salesYoYSign
isEqualToString
:
ReportChainSignPlus
])
{
...
...
@@ -145,13 +145,13 @@
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateNormal
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesYoYRate
];
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesYoYRate
?
compass
.
salesYoYRate
:
@"0"
];
[
self
.
lastYearLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//销售目标达成率
NSString
*
salesTargetStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesTargetRate
];
NSString
*
salesTargetStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesTargetRate
?
compass
.
salesTargetRate
:
@"0"
];
self
.
rateLabel
.
text
=
salesTargetStr
;
//单店日均销售
NSString
*
dailysalesPerStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
dailysalesPerStore
];
NSString
*
dailysalesPerStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
dailysalesPerStore
?
compass
.
dailysalesPerStore
:
@"0"
];
self
.
averageLabel
.
text
=
dailysalesPerStr
;
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Views/RsearchCell.h
View file @
d61f432e
...
...
@@ -7,10 +7,10 @@
//
#import <UIKit/UIKit.h>
#import "LowerOrgs.h"
@interface
RsearchCell
:
UITableViewCell
+
(
CGFloat
)
cellHeight
;
@property
(
nonatomic
,
strong
)
UILabel
*
titleLabel
;
@property
(
nonatomic
,
strong
)
UILabel
*
lineLabel
;
-
(
void
)
setvalueWithLowerOrgs
:(
LowerOrgs
*
)
orgs
;
@end
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Views/RsearchCell.m
View file @
d61f432e
...
...
@@ -37,6 +37,10 @@
[
self
.
contentView
addSubview
:
self
.
lineLabel
];
}
-
(
void
)
setvalueWithLowerOrgs
:
(
LowerOrgs
*
)
orgs
{
self
.
titleLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@"
,
orgs
.
code
,
orgs
.
name
];
}
-
(
void
)
awakeFromNib
{
// Initialization code
}
...
...
This diff is collapsed.
Click to expand it.
XFFruit/ViewControllers/Report/Views/SaleViewCell.m
View file @
d61f432e
...
...
@@ -108,17 +108,21 @@
//组织name
self
.
dqLabel
.
text
=
sale
.
orgCode
;
self
.
nameLabel
.
text
=
sale
.
orgName
;
//销售额
self
.
saleLabel
.
text
=
sale
.
sales
;
//销售环比变化率
if
([
sale
.
salesChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
ReportContentColor
;
}
else
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_NAVIGAYION_COLOR
forState
:
UIControlStateNormal
];
self
.
saleLabel
.
textColor
=
GXF_NAVIGAYION_COLOR
;
}
//销售额
self
.
saleLabel
.
text
=
sale
.
sales
?[
sale
.
sales
stringValue
]
:
@"0"
;
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
sale
.
salesChainRate
];
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//销售目标达成率
...
...
@@ -131,37 +135,54 @@
self
.
dqLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
nameLabel
.
textColor
=
GXF_CONTENT_COLOR
;
self
.
lineLabel
.
hidden
=
NO
;
[
self
setFontLabel
:
17
];
[
self
setWidthDQ
:
0
];
self
.
contentView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
else
if
(
level
==
1
)
{
self
.
dqLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
nameLabel
.
textColor
=
[
UIColor
blackColor
];
self
.
lineLabel
.
hidden
=
NO
;
[
self
setFontLabel
:
15
];
[
self
setWidthDQ
:
0
];
self
.
contentView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
else
if
(
level
==
1
){
}
else
if
(
level
==
2
){
self
.
lineLabel
.
hidden
=
NO
;
self
.
dqLabel
.
textColor
=
GXF_LEFTSIX_COLOR
;
self
.
nameLabel
.
textColor
=
GXF_LEFTSIX_COLOR
;
[
self
setWidthDQ
:
5
];
[
self
setWidthDQ
:
5
];
[
self
setFontLabel
:
13
];
self
.
contentView
.
backgroundColor
=
[
UIColor
whiteColor
];
}
else
{
self
.
lineLabel
.
hidden
=
YES
;
self
.
dqLabel
.
textColor
=
GXF_LEFTSIX_COLOR
;
self
.
nameLabel
.
textColor
=
GXF_LEFTSIX_COLOR
;
self
.
dqLabel
.
textColor
=
ReportTwoColor
;
self
.
nameLabel
.
textColor
=
ReportTwoColor
;
[
self
setFontLabel
:
12
];
[
self
setWidthDQ
:
0
];
[
self
setWidthDQ
:
5
];
self
.
contentView
.
backgroundColor
=
XXFBgColor
;
}
}
-
(
void
)
setFontLabel
:
(
NSInteger
)
fontSize
{
self
.
dqLabel
.
font
=
FontSize
(
fontSize
-
1
);
self
.
dqLabel
.
font
=
FontSize
(
fontSize
-
2
);
self
.
nameLabel
.
font
=
FontSize
(
fontSize
);
self
.
saleLabel
.
font
=
FontSize
(
fontSize
);
self
.
lastWeekLabel
.
font
=
FontSize
(
fontSize
);
self
.
lastWeekLabel
.
titleLabel
.
font
=
FontSize
(
fontSize
);
self
.
rateLabel
.
font
=
FontSize
(
fontSize
);
}
-
(
void
)
setWidthDQ
:
(
NSInteger
)
width
{
self
.
lineLabel
.
left
=
width
;
self
.
lineLabel
.
width
=
ScreenSize
.
width
-
width
;
if
(
width
>
0
)
{
self
.
nameLabel
.
left
=
width
+
5
;
self
.
nameLabel
.
width
=
ScreenSize
.
width
-
width
-
5
;
self
.
dqLabel
.
left
=
width
+
5
;
self
.
dqLabel
.
width
=
ScreenSize
.
width
-
width
-
5
;
}
else
{
self
.
nameLabel
.
left
=
5
;
self
.
nameLabel
.
width
=
ScreenSize
.
width
-
5
;
self
.
dqLabel
.
left
=
5
;
self
.
dqLabel
.
width
=
ScreenSize
.
width
-
5
;
}
}
-
(
void
)
setSelected
:
(
BOOL
)
selected
animated
:
(
BOOL
)
animated
{
...
...
This diff is collapsed.
Click to expand it.
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