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
3ebd6243
Commit
3ebd6243
authored
Nov 28, 2015
by
陈俊俊
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报表bug修复
parent
00f687c6
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
46 additions
and
48 deletions
+46
-48
ReportDetailViewController.m
...ntrollers/Report/Controllers/ReportDetailViewController.m
+1
-0
ReportViewController.m
...ViewControllers/Report/Controllers/ReportViewController.m
+6
-6
PasengerCell.m
XFFruit/ViewControllers/Report/Views/PasengerCell.m
+2
-2
PassengerHeaderCell.m
XFFruit/ViewControllers/Report/Views/PassengerHeaderCell.m
+0
-2
RPassgerView.m
XFFruit/ViewControllers/Report/Views/RPassgerView.m
+23
-20
RSaleView.m
XFFruit/ViewControllers/Report/Views/RSaleView.m
+10
-11
SaleHeaderView.m
XFFruit/ViewControllers/Report/Views/SaleHeaderView.m
+0
-3
SaleViewCell.m
XFFruit/ViewControllers/Report/Views/SaleViewCell.m
+4
-4
No files found.
XFFruit/ViewControllers/Report/Controllers/ReportDetailViewController.m
View file @
3ebd6243
...
...
@@ -45,6 +45,7 @@
//初始化数据
self
.
dayType
=
@"day"
;
self
.
scopeType
=
@""
;
self
.
title
=
self
.
compass
.
orgName
;
[
self
bulidLayout
];
[
self
getDataFromServer
];
}
...
...
XFFruit/ViewControllers/Report/Controllers/ReportViewController.m
View file @
3ebd6243
...
...
@@ -408,7 +408,7 @@
NSIndexPath
*
indexPath
=
dict
[
@"indexPath"
];
Compass
*
parentCompass
=
[
self
.
dataArr
objectAtIndex
:
indexPath
.
row
];
//如果当前点击的不是删除,则要先获取数据在进行插入
if
(
!
[
self
isHaveIndexPath
:
indexPath
])
{
if
(
!
[
self
isHaveIndexPath
:
parentCompass
.
orgUuid
])
{
if
(
parentCompass
.
isLeaf
)
{
//如果是子节点就不用进行网络请求
return
;
...
...
@@ -450,13 +450,13 @@
//插入或者删除相关节点
if
(
expand
)
{
[
self
.
selectArr
addObject
:
indexPath
];
[
self
.
selectArr
addObject
:
parentCompass
.
orgUuid
];
[
self
insertDataWithTable
:
svc
.
tableView
arr
:
indexPathArray
];
[
self
insertDataWithTable
:
ppvc
.
tableView
arr
:
indexPathArray
];
[
self
insertDataWithTable
:
pvc
.
tableView
arr
:
indexPathArray
];
[
self
insertDataWithTable
:
gvc
.
tableView
arr
:
indexPathArray
];
}
else
{
[
self
.
selectArr
removeObject
:
indexPath
];
[
self
.
selectArr
removeObject
:
parentCompass
.
orgUuid
];
[
self
deleteDataWithTable
:
svc
.
tableView
arr
:
indexPathArray
];
[
self
deleteDataWithTable
:
pvc
.
tableView
arr
:
indexPathArray
];
[
self
deleteDataWithTable
:
ppvc
.
tableView
arr
:
indexPathArray
];
...
...
@@ -510,9 +510,9 @@
return
endPosition
;
}
-
(
BOOL
)
isHaveIndexPath
:
(
NS
IndexPath
*
)
indexPath
{
for
(
NS
IndexPath
*
path
in
self
.
selectArr
)
{
if
(
path
.
row
==
indexPath
.
row
)
{
-
(
BOOL
)
isHaveIndexPath
:
(
NS
String
*
)
orgUuid
{
for
(
NS
String
*
selectoUuid
in
self
.
selectArr
)
{
if
(
[
selectoUuid
isEqualToString
:
orgUuid
]
)
{
return
YES
;
}
}
...
...
XFFruit/ViewControllers/Report/Views/PasengerCell.m
View file @
3ebd6243
...
...
@@ -70,16 +70,16 @@
rect
=
CGRectMake
(
self
.
dqLabel
.
right
,
0
,
width
,
Sale_Cell_Height
);
self
.
saleLabel
=
[
IBTCommon
labelWithTitle
:
@"60.0"
frame
:
rect
textFont
:
self
.
textFont
];
self
.
saleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
self
.
saleLabel
];
rect
=
CGRectMake
(
self
.
saleLabel
.
right
,
0
,
width
,
Sale_Cell_Height
);
self
.
lastWeekLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
ReportContentColor
];
self
.
lastWeekLabel
.
enabled
=
NO
;
self
.
lastWeekLabel
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentLeft
;
[
self
.
contentView
addSubview
:
self
.
lastWeekLabel
];
rect
=
CGRectMake
(
self
.
lastWeekLabel
.
right
,
0
,
35
,
Sale_Cell_Height
);
self
.
detailBtn
=
[
IBTCommon
buttonWithTitle
:
@"
详"
Image
:
nil
frame
:
rect
fontSize
:
20
fontColor
:
ReportBgColor
];
self
.
detailBtn
=
[
IBTCommon
buttonWithTitle
:
@"
"
Image
:[
UIImage
imageNamed
:
@"more_detail"
]
frame
:
rect
fontSize
:
20
fontColor
:
ReportBgColor
];
self
.
detailBtn
.
titleLabel
.
font
=
[
UIFont
boldSystemFontOfSize
:
15
];
[
self
.
contentView
addSubview
:
self
.
detailBtn
];
...
...
XFFruit/ViewControllers/Report/Views/PassengerHeaderCell.m
View file @
3ebd6243
...
...
@@ -64,14 +64,12 @@
rect
=
CGRectMake
(
self
.
searchLabel
.
right
,
0
,
width
,
Sale_Header_Height
);
UILabel
*
ksjLabel
=
[
IBTCommon
labelWithTitle
:
titleStr
frame
:
rect
textFont
:
self
.
textFont
];
ksjLabel
.
textColor
=
ReportTitleColor
;
ksjLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
ksjLabel
];
rect
=
CGRectMake
(
ksjLabel
.
right
,
0
,
width
,
Sale_Header_Height
);
UILabel
*
bszLabel
=
[
IBTCommon
labelWithTitle
:
@"比上周"
frame
:
rect
textFont
:
self
.
textFont
];
bszLabel
.
textColor
=
ReportTitleColor
;
bszLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
bszLabel
];
rect
=
CGRectMake
(
0
,
Sale_Header_Height
-
1
,
ScreenSize
.
width
,
1
);
...
...
XFFruit/ViewControllers/Report/Views/RPassgerView.m
View file @
3ebd6243
...
...
@@ -67,7 +67,7 @@
CGFloat
bottomWidth
=
(
ScreenSize
.
width
-
20
*
2
)
/
2
;
rect
=
CGRectMake
(
20
,
self
.
dateLabel
.
bottom
,
bottomWidth
,
ContentHeight
);
self
.
lastWeekLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
ReportContentColor
];
self
.
lastWeekLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
[
UIColor
lightGrayColor
]
];
self
.
lastWeekLabel
.
enabled
=
NO
;
[
self
addSubview
:
self
.
lastWeekLabel
];
...
...
@@ -82,7 +82,7 @@
rect
=
CGRectMake
(
self
.
lastWeekLabel
.
right
,
self
.
dateLabel
.
bottom
,
bottomWidth
,
ContentHeight
);
self
.
lastYearLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
GXF_NAVIGAYION_COLOR
];
self
.
lastYearLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
[
UIColor
lightGrayColor
]
];
self
.
lastYearLabel
.
enabled
=
NO
;
[
self
addSubview
:
self
.
lastYearLabel
];
...
...
@@ -111,97 +111,100 @@
-
(
void
)
setPassengerWithCompass
:
(
Compass
*
)
compass
{
//客流数
self
.
centerLabel
.
text
=
compass
.
passenger
?[
compass
.
passenger
stringValue
]:
@"0"
;
self
.
centerLabel
.
text
=
compass
.
passenger
?[
compass
.
passenger
stringValue
]:
@"---"
;
//客流统计时间
NSString
*
weekday
=
@""
;
if
([
IBTCommon
convertToDateFrom
:
compass
.
passengerdate
])
{
weekday
=
[
IBTCommon
weekdayStringFromDate
:[
IBTCommon
convertToDateFrom
:
compass
.
passengerdate
]];
}
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@累计客流量"
,
compass
.
passengerdate
?
compass
.
passengerdate
:
@"无"
,
weekday
]
;
self
.
dateLabel
.
text
=
compass
.
passengerdate
?[
NSString
stringWithFormat
:
@"%@%@累计客流量"
,
compass
.
passengerdate
,
weekday
]:
@"无"
;
//客流数环比变化率
if
([
compass
.
passengerChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateDisabled
];
}
else
{
}
else
if
([
compass
.
passengerChainSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerChainRate
?
compass
.
passengerChainRate
:
@"0"
]
;
NSString
*
salesYoStr
=
compass
.
passengerChainRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerChainRate
]:
@"---"
;
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//客流数同比变化率
if
([
compass
.
passengerYoYSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateDisabled
];
}
else
{
}
else
if
([
compass
.
passengerYoYSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerYoYRate
?
compass
.
passengerYoYRate
:
@"0"
]
;
NSString
*
passengerYoYRateStr
=
compass
.
passengerYoYRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
passengerYoYRate
]:
@"---"
;
[
self
.
lastYearLabel
setTitle
:
passengerYoYRateStr
forState
:
UIControlStateNormal
];
}
//客单价
-
(
void
)
setPersalesWithCompass
:
(
Compass
*
)
compass
{
//客单价
self
.
centerLabel
.
text
=
compass
.
persales
?[
compass
.
persales
stringValue
]:
@"0"
;
self
.
centerLabel
.
text
=
compass
.
persales
?[
compass
.
persales
stringValue
]:
@"---"
;
//客单价统计时间
NSString
*
weekday
=
@""
;
if
([
IBTCommon
convertToDateFrom
:
compass
.
persalesdate
])
{
weekday
=
[
IBTCommon
weekdayStringFromDate
:[
IBTCommon
convertToDateFrom
:
compass
.
persalesdate
]];
}
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@累计客单价"
,
compass
.
persalesdate
?
compass
.
persalesdate
:
@"无"
,
weekday
]
;
self
.
dateLabel
.
text
=
compass
.
persalesdate
?[
NSString
stringWithFormat
:
@"%@%@累计客单价"
,
compass
.
persalesdate
,
weekday
]:
@"无"
;
//客单价环比变化率
if
([
compass
.
persalesChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateDisabled
];
}
else
{
}
else
if
([
compass
.
persalesChainSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesChainRate
?
compass
.
persalesChainRate
:
@"0"
]
;
NSString
*
salesYoStr
=
compass
.
persalesChainRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesChainRate
]:
@"---"
;
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//客单价同比变化率
if
([
compass
.
persalesYoYSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateDisabled
];
}
else
{
}
else
if
([
compass
.
persalesYoYSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesYoYRate
?
compass
.
persalesYoYRate
:
@"0"
]
;
NSString
*
passengerYoYRateStr
=
compass
.
persalesYoYRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
persalesYoYRate
]:
@"---"
;
[
self
.
lastYearLabel
setTitle
:
passengerYoYRateStr
forState
:
UIControlStateNormal
];
}
//毛利率
-
(
void
)
setGrossprofitWithCompass
:
(
Compass
*
)
compass
{
//毛利率
self
.
centerLabel
.
text
=
compass
.
grossprofit
?[
compass
.
grossprofit
stringValue
]:
@"0"
;
self
.
centerLabel
.
text
=
compass
.
grossprofit
?[
compass
.
grossprofit
stringValue
]:
@"---"
;
//毛利率统计时间
NSString
*
weekday
=
@""
;
if
([
IBTCommon
convertToDateFrom
:
compass
.
grossprofitdate
])
{
weekday
=
[
IBTCommon
weekdayStringFromDate
:[
IBTCommon
convertToDateFrom
:
compass
.
grossprofitdate
]];
}
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@累计毛利率"
,
compass
.
grossprofitdate
?
compass
.
grossprofitdate
:
@"无"
,
weekday
]
;
self
.
dateLabel
.
text
=
compass
.
grossprofitdate
?[
NSString
stringWithFormat
:
@"%@%@累计毛利率"
,
compass
.
grossprofitdate
,
weekday
]:
@"无"
;
//毛利率环比变化率
if
([
compass
.
grossprofitChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateDisabled
];
}
else
{
}
else
if
([
compass
.
grossprofitChainSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitChainRate
?
compass
.
grossprofitChainRate
:
@"0"
]
;
NSString
*
salesYoStr
=
compass
.
grossprofitChainRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitChainRate
]:
@"---"
;
[
self
.
lastWeekLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//毛利率同比变化率
if
([
compass
.
grossprofitYoYSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateDisabled
];
}
else
{
}
else
if
([
compass
.
grossprofitYoYSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateDisabled
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateDisabled
];
}
NSString
*
passengerYoYRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitYoYRate
?
compass
.
grossprofitYoYRate
:
@"0"
]
;
NSString
*
passengerYoYRateStr
=
compass
.
grossprofitYoYRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
grossprofitYoYRate
]:
@"---"
;
[
self
.
lastYearLabel
setTitle
:
passengerYoYRateStr
forState
:
UIControlStateNormal
];
}
...
...
XFFruit/ViewControllers/Report/Views/RSaleView.m
View file @
3ebd6243
...
...
@@ -79,7 +79,7 @@
CGFloat
bottomWidth
=
(
ScreenSize
.
width
-
20
)
/
4
;
rect
=
CGRectMake
(
10
,
self
.
dateLabel
.
bottom
+
5
,
bottomWidth
,
ContentHeight
);
self
.
lastWeekLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
ReportContentColor
];
self
.
lastWeekLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
[
UIColor
lightGrayColor
]
];
[
self
addSubview
:
self
.
lastWeekLabel
];
rect
=
CGRectMake
(
self
.
lastWeekLabel
.
left
,
self
.
lastWeekLabel
.
bottom
,
bottomWidth
,
20
);
...
...
@@ -91,7 +91,7 @@
[
self
addSubview
:
weekLabel
];
rect
=
CGRectMake
(
self
.
lastWeekLabel
.
right
,
self
.
lastWeekLabel
.
top
,
bottomWidth
,
ContentHeight
);
self
.
lastYearLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
GXF_NAVIGAYION_COLOR
];
self
.
lastYearLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
[
UIColor
lightGrayColor
]
];
[
self
addSubview
:
self
.
lastYearLabel
];
...
...
@@ -147,41 +147,40 @@
-
(
void
)
setValueInSaleView
:
(
Compass
*
)
compass
{
//统计时间
// compass.dataScope = @"2015-01";
NSString
*
weekday
=
@""
;
if
([
IBTCommon
convertToDateFrom
:
compass
.
dataScope
])
{
weekday
=
[
IBTCommon
weekdayStringFromDate
:[
IBTCommon
convertToDateFrom
:
compass
.
dataScope
]];
}
self
.
dateLabel
.
text
=
[
NSString
stringWithFormat
:
@"%@%@累计销售额"
,
compass
.
dataScope
?
compass
.
dataScope
:
@"无"
,
weekday
]
;
self
.
dateLabel
.
text
=
compass
.
dataScope
?[
NSString
stringWithFormat
:
@"%@%@累计销售额"
,
compass
.
dataScope
,
weekday
]:
@"无"
;
//销售额
self
.
centerLabel
.
text
=
compass
.
sales
?[
compass
.
sales
stringValue
]:
@"
0
"
;
self
.
centerLabel
.
text
=
compass
.
sales
?[
compass
.
sales
stringValue
]:
@"
---
"
;
//销售环比变化率
if
([
compass
.
salesChainSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
}
else
{
}
else
if
([
compass
.
salesChainSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastWeekLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastWeekLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateNormal
];
}
NSString
*
salesChainRateStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesChainRate
?
compass
.
salesChainRate
:
@"0"
]
;
NSString
*
salesChainRateStr
=
compass
.
salesChainRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesChainRate
]:
@"---"
;
[
self
.
lastWeekLabel
setTitle
:
salesChainRateStr
forState
:
UIControlStateNormal
];
//销售同比变化率
if
([
compass
.
salesYoYSign
isEqualToString
:
ReportChainSignPlus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainPlusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastYearLabel
setTitleColor
:
ReportContentColor
forState
:
UIControlStateNormal
];
}
else
{
}
else
if
([
compass
.
salesYoYSign
isEqualToString
:
ReportChainSignMinus
])
{
[
self
.
lastYearLabel
setImage
:[
UIImage
imageNamed
:
ReportChainMinusImage
]
forState
:
UIControlStateNormal
];
[
self
.
lastYearLabel
setTitleColor
:
GXF_SAVE_COLOR
forState
:
UIControlStateNormal
];
}
NSString
*
salesYoStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesYoYRate
?
compass
.
salesYoYRate
:
@"0"
]
;
NSString
*
salesYoStr
=
compass
.
salesYoYRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesYoYRate
]:
@"---"
;
[
self
.
lastYearLabel
setTitle
:
salesYoStr
forState
:
UIControlStateNormal
];
//销售目标达成率
NSString
*
salesTargetStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesTargetRate
?
compass
.
salesTargetRate
:
@"0"
]
;
NSString
*
salesTargetStr
=
compass
.
salesTargetRate
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
salesTargetRate
]:
@"---"
;
self
.
rateLabel
.
text
=
salesTargetStr
;
//单店日均销售
NSString
*
dailysalesPerStr
=
[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
dailysalesPerStore
?
compass
.
dailysalesPerStore
:
@"0"
]
;
NSString
*
dailysalesPerStr
=
compass
.
dailysalesPerStore
?[
NSString
stringWithFormat
:
@"%@%%"
,
compass
.
dailysalesPerStore
]:
@"---"
;
self
.
averageLabel
.
text
=
dailysalesPerStr
;
}
...
...
XFFruit/ViewControllers/Report/Views/SaleHeaderView.m
View file @
3ebd6243
...
...
@@ -58,19 +58,16 @@
rect
=
CGRectMake
(
searLabel
.
right
,
0
,
width
+
10
,
Sale_Header_Height
);
UILabel
*
xsBtn
=
[
IBTCommon
labelWithTitle
:
@"销售额"
frame
:
rect
textFont
:
self
.
textFont
];
xsBtn
.
textColor
=
ReportTitleColor
;
xsBtn
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
xsBtn
];
rect
=
CGRectMake
(
xsBtn
.
right
,
0
,
width
,
Sale_Header_Height
);
UILabel
*
bszLabel
=
[
IBTCommon
labelWithTitle
:
@"比上周"
frame
:
rect
textFont
:
self
.
textFont
];
bszLabel
.
textColor
=
ReportTitleColor
;
bszLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
bszLabel
];
rect
=
CGRectMake
(
bszLabel
.
right
,
0
,
width
-
10
,
Sale_Header_Height
);
UILabel
*
sclLabel
=
[
IBTCommon
labelWithTitle
:
@"达成率"
frame
:
rect
textFont
:
self
.
textFont
];
sclLabel
.
textColor
=
ReportTitleColor
;
sclLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
sclLabel
];
rect
=
CGRectMake
(
0
,
Sale_Header_Height
-
1
,
ScreenSize
.
width
,
1
);
...
...
XFFruit/ViewControllers/Report/Views/SaleViewCell.m
View file @
3ebd6243
...
...
@@ -72,22 +72,22 @@
rect
=
CGRectMake
(
self
.
dqLabel
.
right
,
0
,
width
+
10
,
Sale_Cell_Height
);
self
.
saleLabel
=
[
IBTCommon
labelWithTitle
:
@"56,080"
frame
:
rect
textFont
:
self
.
textFont
];
self
.
saleLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
self
.
saleLabel
];
rect
=
CGRectMake
(
self
.
saleLabel
.
right
,
0
,
width
,
Sale_Cell_Height
);
self
.
lastWeekLabel
=
[
IBTCommon
buttonWithTitle
:
@""
Image
:
nil
frame
:
rect
fontSize
:
15
fontColor
:
ReportContentColor
];
self
.
lastWeekLabel
.
enabled
=
NO
;
self
.
lastWeekLabel
.
contentHorizontalAlignment
=
UIControlContentHorizontalAlignmentLeft
;
[
self
.
contentView
addSubview
:
self
.
lastWeekLabel
];
rect
=
CGRectMake
(
self
.
lastWeekLabel
.
right
,
0
,
width
-
10
,
Sale_Cell_Height
);
self
.
rateLabel
=
[
IBTCommon
labelWithTitle
:
@"60%"
frame
:
rect
textFont
:
self
.
textFont
];
self
.
rateLabel
.
textColor
=
GXF_COMMIT_COLOR
;
self
.
rateLabel
.
textAlignment
=
NSTextAlignmentCenter
;
[
self
.
contentView
addSubview
:
self
.
rateLabel
];
rect
=
CGRectMake
(
self
.
rateLabel
.
right
,
0
,
35
,
Sale_Cell_Height
);
self
.
detailBtn
=
[
IBTCommon
buttonWithTitle
:
@"
详"
Image
:
nil
frame
:
rect
fontSize
:
20
fontColor
:
ReportBgColor
];
self
.
detailBtn
=
[
IBTCommon
buttonWithTitle
:
@"
"
Image
:[
UIImage
imageNamed
:
@"more_detail"
]
frame
:
rect
fontSize
:
20
fontColor
:
ReportBgColor
];
self
.
detailBtn
.
titleLabel
.
font
=
[
UIFont
boldSystemFontOfSize
:
15
];
[
self
.
contentView
addSubview
:
self
.
detailBtn
];
...
...
@@ -158,7 +158,7 @@
self
.
dqLabel
.
textColor
=
ReportTwoColor
;
self
.
nameLabel
.
textColor
=
ReportTwoColor
;
[
self
setFontLabel
:
12
];
[
self
setWidthDQ
:
5
];
[
self
setWidthDQ
:
10
];
self
.
contentView
.
backgroundColor
=
XXFBgColor
;
}
...
...
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