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
Nov 26, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
选择转运单按钮显示出来以及报表首页接口
parent
92405e42
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
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
];
}
...
...
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"
...
...
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
;
...
...
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
];
...
...
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
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
{
...
...
XFFruit/ViewControllers/Report/Controllers/ReportViewController.m
View file @
d61f432e
...
...
@@ -68,19 +68,6 @@
[
super
viewDidLoad
];
//布局
#if 1
UISwipeGestureRecognizerDirection
num
[
4
]
=
{
UISwipeGestureRecognizerDirectionRight
,
UISwipeGestureRecognizerDirectionLeft
,
};
//创建四个方向的滑动手势
for
(
int
i
=
0
;
i
<
2
;
i
++
)
{
//创建一个滑动手势
UISwipeGestureRecognizer
*
swipe
=
[[
UISwipeGestureRecognizer
alloc
]
initWithTarget
:
self
action
:
@selector
(
swipe
:
)];
swipe
.
direction
=
num
[
i
];
//给当前界面增加滑动手势
[
self
.
view
addGestureRecognizer
:
swipe
];
}
self
.
dataArr
=
[
NSMutableArray
array
];
self
.
totalArr
=
[
NSMutableArray
array
];
self
.
selectArr
=
[
NSMutableArray
array
];
...
...
@@ -106,137 +93,6 @@
[
self
PushViewController
:
srvc
animated
:
YES
];
}
#pragma mark - 假数据
-
(
void
)
setTestValue
{
Compass
*
compass
=
[[
Compass
alloc
]
init
];
compass
.
dateScope
=
@"2012-03-04"
;
compass
.
sales
=
@"222,33"
;
compass
.
salesChainSign
=
ReportChainSignPlus
;
compass
.
salesChainRate
=
@12.35
;
compass
.
salesYoYSign
=
ReportChainSignPlus
;
compass
.
salesYoYRate
=
@33.43
;
compass
.
salesTargetRate
=
@55.5
;
compass
.
dailysalesPerStore
=
@"98.4"
;
compass
.
passengerdate
=
@"2015-04-06"
;
compass
.
passenger
=
@"345.44"
;
compass
.
passengerChainSign
=
ReportChainSignMinus
;
compass
.
passengerChainRate
=
@44.5
;
compass
.
passengerYoYSign
=
ReportChainSignPlus
;
compass
.
passengerYoYRate
=
@33.4
;
compass
.
persalesdate
=
@"2013-07-04"
;
compass
.
persales
=
@"332,55"
;
compass
.
persalesChainSign
=
ReportChainSignPlus
;
compass
.
persalesChainRate
=
@66
;
compass
.
persalesYoYRate
=
@44.4
;
compass
.
persalesYoYSign
=
ReportChainSignMinus
;
compass
.
grossprofitdate
=
@"2001-03-04"
;
compass
.
grossprofitChainSign
=
ReportChainSignPlus
;
compass
.
grossprofitChainRate
=
@11.11
;
compass
.
grossprofitYoYSign
=
ReportChainSignMinus
;
compass
.
grossprofitYoYRate
=
@44.55
;
self
.
compass
=
compass
;
}
-
(
NSArray
*
)
setOrgTestValue
{
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
Compass
*
compass
=
[[
Compass
alloc
]
init
];
compass
.
orgUuid
=
[
NSString
stringWithFormat
:
@"%d"
,
i
+
1
];
compass
.
orgCode
=
[
NSString
stringWithFormat
:
@"00%d"
,
i
];
compass
.
orgName
=
[
NSString
stringWithFormat
:
@"第一片区%d"
,
i
];
compass
.
isleaf
=
NO
;
compass
.
sales
=
@"222,33"
;
compass
.
salesChainSign
=
ReportChainSignPlus
;
compass
.
salesChainRate
=
@12.3
;
compass
.
salesTargetRate
=
@55.5
;
compass
.
passenger
=
@"345.44"
;
compass
.
passengerChainSign
=
ReportChainSignMinus
;
compass
.
passengerChainRate
=
@44.5
;
compass
.
persales
=
@"332,55"
;
compass
.
persalesChainSign
=
ReportChainSignPlus
;
compass
.
persalesChainRate
=
@66
;
compass
.
grossprofit
=
@"4444"
;
compass
.
grossprofitChainSign
=
ReportChainSignPlus
;
compass
.
grossprofitChainRate
=
@11.11
;
compass
.
expand
=
YES
;
compass
.
level
=
0
;
[
arr
addObject
:
compass
];
}
return
arr
;
}
-
(
NSArray
*
)
setTwoOrgTestValue
{
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
5
;
i
++
)
{
Compass
*
compass
=
[[
Compass
alloc
]
init
];
compass
.
upperuuid
=
@"1"
;
compass
.
orgUuid
=
[
NSString
stringWithFormat
:
@"%d"
,
i
+
6
];
compass
.
orgCode
=
[
NSString
stringWithFormat
:
@"00%d"
,
i
];
compass
.
orgName
=
[
NSString
stringWithFormat
:
@"%d第一片区"
,
i
];
compass
.
isleaf
=
NO
;
compass
.
sales
=
@"222,33"
;
compass
.
salesChainSign
=
ReportChainSignPlus
;
compass
.
salesChainRate
=
@12.3
;
compass
.
salesTargetRate
=
@55.57
;
compass
.
passenger
=
@"345.44"
;
compass
.
passengerChainSign
=
ReportChainSignMinus
;
compass
.
passengerChainRate
=
@44.5
;
compass
.
persales
=
@"332,55"
;
compass
.
persalesChainSign
=
ReportChainSignPlus
;
compass
.
persalesChainRate
=
@66
;
compass
.
grossprofit
=
@"4444"
;
compass
.
grossprofitChainSign
=
ReportChainSignPlus
;
compass
.
grossprofitChainRate
=
@11.11
;
compass
.
expand
=
NO
;
compass
.
level
=
1
;
[
arr
addObject
:
compass
];
}
return
arr
;
}
-
(
NSArray
*
)
setThreeOrgTestValue
{
NSMutableArray
*
arr
=
[
NSMutableArray
array
];
for
(
int
i
=
0
;
i
<
10
;
i
++
)
{
Compass
*
compass
=
[[
Compass
alloc
]
init
];
compass
.
upperuuid
=
@"6"
;
compass
.
orgUuid
=
[
NSString
stringWithFormat
:
@"%d"
,
i
+
11
];
compass
.
orgCode
=
[
NSString
stringWithFormat
:
@"00%d"
,
i
];
compass
.
orgName
=
[
NSString
stringWithFormat
:
@"%d第一片区"
,
i
];
compass
.
isleaf
=
YES
;
compass
.
sales
=
@"222,33"
;
compass
.
salesChainSign
=
ReportChainSignPlus
;
compass
.
salesChainRate
=
@12.3
;
compass
.
salesTargetRate
=
@55.5
;
compass
.
passenger
=
@"345.44"
;
compass
.
passengerChainSign
=
ReportChainSignMinus
;
compass
.
passengerChainRate
=
@44.5
;
compass
.
persales
=
@"332,55"
;
compass
.
persalesChainSign
=
ReportChainSignPlus
;
compass
.
persalesChainRate
=
@66
;
compass
.
grossprofit
=
@"4444"
;
compass
.
grossprofitChainSign
=
ReportChainSignPlus
;
compass
.
grossprofitChainRate
=
@11.11
;
compass
.
expand
=
NO
;
compass
.
level
=
2
;
[
arr
addObject
:
compass
];
}
return
arr
;
}
#pragma mark - 获取上部数据
-
(
void
)
getDataFromServer
{
...
...
@@ -244,21 +100,14 @@
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
//赋值
[
IBTLoadingView
hideHUDWithText
:
nil
];
// [strongSelf prepareDataInScrollView:data];
// [strongSelf getBottomData:nil];
[
self
setTestValue
];
[
self
setValueInScrollView
];
// [IBTLoadingView hideHUDWithText:nil];
[
strongSelf
prepareDataInScrollView
:
data
];
[
strongSelf
getBottomData
:
nil
];
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
#warning 测试数据
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
[
self
setTestValue
];
[
self
setValueInScrollView
];
[
strongSelf
getBottomData
:
nil
];
};
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
NSMutableArray
*
orderArr
=
[
NSMutableArray
array
];
...
...
@@ -271,12 +120,11 @@
}
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
NSDictionary
*
dict
=
@{
// @"userUuid":userUtil.userId,
@"dataScopeType"
:
@""
,
@"dataScope"
:
@""
,
@"dataScopeType"
:
self
.
dayType
,
@"dataScope"
:
self
.
scopeType
,
@"orgUuid"
:
userUtil
.
org_uuid
,
@"fetchScope"
:
@"owner"
,
//
@"queryOrders":orderArr,
@"queryOrders"
:
orderArr
,
@"pageNumber"
:
@0
,
@"pageSize"
:
@100
};
...
...
@@ -318,46 +166,12 @@
void
(
^
succ
)(
id
)
=
^
(
id
data
)
{
__strong
__typeof
(
weakSelf
)
strongSelf
=
weakSelf
;
//赋值
// [IBTLoadingView hideHUDWithText:nil];
//
// [strongSelf downLoadData:data indexPath:indexPath];
#warning mark - 测试数据
self
.
storeCount
=
33333
;
NSArray
*
arr
=
[
self
setOrgTestValue
];
if
(
indexPath
)
{
arr
=
[
self
setTwoOrgTestValue
];
}
else
{
[
self
.
dataArr
addObjectsFromArray
:
arr
];
//刷新tableView
[
self
refreshAllTable
];
}
[
self
.
totalArr
addObjectsFromArray
:
arr
];
if
(
indexPath
)
{
[
self
actionTableView
:
indexPath
];
}
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
strongSelf
downLoadData
:
data
indexPath
:
indexPath
];
};
void
(
^
fail
)(
id
)
=
^
(
id
data
)
{
[
IBTLoadingView
hideHUDWithText
:
nil
];
[
IBTLoadingView
showTips
:
data
];
#warning mark - 测试数据
self
.
storeCount
=
33333
;
NSArray
*
arr
=
[
self
setOrgTestValue
];
if
(
indexPath
)
{
arr
=
[
self
setTwoOrgTestValue
];
}
else
{
[
self
.
dataArr
addObjectsFromArray
:
arr
];
//刷新tableView
[
self
refreshAllTable
];
}
[
self
.
totalArr
addObjectsFromArray
:
arr
];
if
(
indexPath
)
{
[
self
actionTableView
:
indexPath
];
}
};
ICRUserUtil
*
userUtil
=
[
ICRUserUtil
sharedInstance
];
if
(
!
self
.
orgScope
)
{
...
...
@@ -370,12 +184,15 @@
order
.
direction
=
@"desc"
;
[
orderArr
addObject
:[
order
dictForCommit
]];
}
if
(
indexPath
)
{
[
IBTLoadingView
showProgressLabel
:
@"正在加载..."
];
}
NSDictionary
*
dict
=
@{
@"dataScopeType"
:
@""
,
@"dataScope"
:
@""
,
@"dataScopeType"
:
self
.
dayType
,
@"dataScope"
:
self
.
scopeType
,
@"orgUuid"
:
self
.
orgScope
,
@"fetchScope"
:
@"childs"
,
//
@"queryOrders":orderArr,
@"queryOrders"
:
orderArr
,
@"pageNumber"
:
@0
,
@"pageSize"
:
@100
};
...
...
@@ -387,31 +204,33 @@
NSInteger
success
=
[
data
[
@"success"
]
integerValue
];
NSString
*
message
=
data
[
@"message"
]
;
if
(
success
==
1
)
{
NSArray
*
recodesArr
=
data
[
@"data"
][
@"records"
];
self
.
storeCount
=
[
data
[
@"data"
][
@"storeamount"
]
integerValue
];
NSDictionary
*
recodesDict
=
data
[
@"data"
][
@"salesData"
];
NSArray
*
recodesArr
=
recodesDict
[
@"records"
];
if
(
!
indexPath
)
{
self
.
storeCount
=
[
data
[
@"data"
][
@"stores"
]
integerValue
];
if
(
self
.
dataArr
.
count
>
0
)
{
[
self
.
dataArr
removeAllObjects
];
}
if
(
self
.
totalArr
.
count
>
0
)
{
[
self
.
totalArr
removeAllObjects
];
}
if
(
self
.
selectArr
.
count
>
0
)
{
[
self
.
selectArr
removeAllObjects
];
}
}
for
(
NSDictionary
*
orgDict
in
recodesArr
)
{
Compass
*
orgCompass
=
[[
Compass
alloc
]
init
];
[
orgCompass
setValuesForKeysWithDictionary
:
orgDict
];
if
([
self
.
orgScope
isEqualToString
:
@""
])
{
if
(
self
.
dataArr
.
count
>
0
)
{
[
self
.
dataArr
removeAllObjects
];
}
if
(
self
.
totalArr
.
count
>
0
)
{
[
self
.
totalArr
removeAllObjects
];
}
if
(
self
.
selectArr
.
count
>
0
)
{
[
self
.
selectArr
removeAllObjects
];
}
[
self
.
dataArr
addObject
:
orgCompass
];
//刷新tableView
[
self
refreshAllTable
];
if
(
!
indexPath
)
{
[
self
.
dataArr
addObject
:
orgCompass
];
}
[
self
.
totalArr
addObject
:
orgCompass
];
if
(
indexPath
)
{
[
self
actionTableView
:
indexPath
];
}
}
//刷新tableView
[
self
refreshAllTable
];
if
(
indexPath
)
{
[
self
actionTableView
:
indexPath
];
}
}
else
{
[
IBTLoadingView
showTips
:
message
];
}
...
...
@@ -450,7 +269,7 @@
self
.
scrollView
.
showsHorizontalScrollIndicator
=
NO
;
self
.
scrollView
.
showsVerticalScrollIndicator
=
NO
;
self
.
scrollView
.
pagingEnabled
=
YES
;
//
[self.view addSubview:self.scrollView];
[
self
.
view
addSubview
:
self
.
scrollView
];
svc
=
[
SaleViewController
new
];
[
self
addChildViewController
:
svc
];
...
...
@@ -464,72 +283,25 @@
gvc
=
[
GrossRateViewController
new
];
[
self
addChildViewController
:
gvc
];
rect
=
CGRectMake
(
0
,
self
.
segView
.
bottom
,
ScreenSize
.
width
,
ScreenSize
.
height
-
49
-
64
-
self
.
segView
.
bottom
);
rect
=
CGRectMake
(
0
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
-
49
-
64
-
self
.
segView
.
bottom
);
svc
.
view
.
frame
=
rect
;
[
self
.
view
addSubview
:
svc
.
view
];
_currentRect
=
rect
;
_currentView
=
0
;
[
self
.
scrollView
addSubview
:
svc
.
view
];
rect
=
CGRectMake
(
self
.
scrollView
.
width
,
0
,
ScreenSize
.
width
,
ScreenSize
.
height
-
49
-
64
-
self
.
segView
.
bottom
);
pvc
.
view
.
frame
=
rect
;
//
[self.scrollView addSubview:pvc.view];
[
self
.
scrollView
addSubview
:
pvc
.
view
];
rect
=
CGRectMake
(
self
.
scrollView
.
width
*
2
,
0
,
ScreenSize
.
width
,
self
.
scrollView
.
height
);
ppvc
.
view
.
frame
=
rect
;
//
[self.scrollView addSubview:ppvc.view];
[
self
.
scrollView
addSubview
:
ppvc
.
view
];
rect
=
CGRectMake
(
self
.
scrollView
.
width
*
3
,
0
,
ScreenSize
.
width
,
self
.
scrollView
.
height
);
gvc
.
view
.
frame
=
rect
;
[
self
.
scrollView
addSubview
:
gvc
.
view
];
// [self.scrollView addSubview:gvc.view];
// self.scrollView.contentSize = CGSizeMake(self.scrollView.width * 4, self.scrollView.height);
self
.
scrollView
.
contentSize
=
CGSizeMake
(
self
.
scrollView
.
width
*
4
,
self
.
scrollView
.
height
);
}
-
(
void
)
swipe
:
(
UISwipeGestureRecognizer
*
)
sw
{
switch
(
sw
.
direction
)
{
//手势的方向
//向右滑动
case
UISwipeGestureRecognizerDirectionRight
:
{
if
(
_currentView
==
0
)
{
return
;
}
else
{
_oldView
=
_currentView
;
_currentView
--
;
}
}
break
;
//向左滑动
case
UISwipeGestureRecognizerDirectionLeft
:
{
if
(
_currentView
==
3
)
{
return
;
}
else
{
_oldView
=
_currentView
;
_currentView
++
;
}
}
break
;
default
:
break
;
}
//1.移除旧的viewController
UIViewController
*
old
=
self
.
childViewControllers
[
_oldView
];
[
old
.
view
removeFromSuperview
];
//2.添加新的viewController
UIViewController
*
new
=
self
.
childViewControllers
[
_currentView
];
//拉伸高度和宽度
new
.
view
.
autoresizingMask
=
UIViewAutoresizingFlexibleHeight
|
UIViewAutoresizingFlexibleWidth
;
//设置位置
new
.
view
.
frame
=
_currentRect
;
[
self
.
view
addSubview
:
new
.
view
];
}
#pragma mark - segViewDelegate
-
(
void
)
customSegOneClick
:
(
NSString
*
)
title
{
//日周年切换
...
...
@@ -544,9 +316,9 @@
dayType
=
@"month"
;
self
.
scopeType
=
[
IBTCommon
stringFromDateWithFormat
:[
NSDate
date
]
format
:
@"yyyy-MM"
];
}
self
.
orgScope
=
@""
;
CLog
(
@"-------%@"
,
self
.
scopeType
);
self
.
dayType
=
dayType
;
self
.
orgScope
=
nil
;
[
self
getDataFromServer
];
}
-
(
void
)
customSegTwoClick
:
(
NSString
*
)
title
{
...
...
@@ -613,9 +385,8 @@
}
else
if
([
type
isEqualToString
:
SaleEnMonth
])
{
self
.
selectMonth
=
time
;
}
self
.
scopeType
=
time
;
self
.
orgScope
=
@""
;
self
.
orgScope
=
nil
;
[
self
getDataFromServer
];
}
#pragma mark - 取消
...
...
@@ -635,21 +406,13 @@
Compass
*
parentCompass
=
[
self
.
dataArr
objectAtIndex
:
indexPath
.
row
];
//如果当前点击的不是删除,则要先获取数据在进行插入
if
(
!
[
self
isHaveIndexPath
:
indexPath
])
{
self
.
orgScope
=
parentCompass
.
orgUuid
;
if
(
parentCompass
.
isleaf
)
{
#warning 要修改的
if
(
parentCompass
.
isleaf
||
parentCompass
.
level
==
3
)
{
//如果是子节点就不用进行网络请求
return
;
}
//不是子节点进行网络请求
if
([
parentCompass
.
upperuuid
isEqualToString
:
@"1"
])
{
NSArray
*
arr
=
[
self
setThreeOrgTestValue
];
[
self
.
totalArr
addObjectsFromArray
:
arr
];
if
(
indexPath
)
{
[
self
actionTableView
:
indexPath
];
}
}
else
{
[
self
getBottomData
:
indexPath
];
}
self
.
orgScope
=
parentCompass
.
orgUuid
;
[
self
getBottomData
:
indexPath
];
return
;
}
[
self
actionTableView
:
indexPath
];
...
...
@@ -661,7 +424,7 @@
BOOL
expand
=
NO
;
for
(
int
i
=
0
;
i
<
self
.
totalArr
.
count
;
i
++
)
{
Compass
*
node
=
[
self
.
totalArr
objectAtIndex
:
i
];
if
([
node
.
upper
u
uid
isEqualToString
:
parentCompass
.
orgUuid
])
{
if
([
node
.
upper
U
uid
isEqualToString
:
parentCompass
.
orgUuid
])
{
//修改二级节点的属性为为原属性相反属性
node
.
expand
=
!
node
.
expand
;
if
(
node
.
expand
)
{
...
...
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
];
}
...
...
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(减)
...
...
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
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
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
];
...
...
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
];
}
...
...
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
;
}
...
...
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
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
}
...
...
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
{
...
...
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