Commit b364e4c3 authored by 陈俊俊's avatar 陈俊俊

报表界面调整及部分接口

parent 891fff9c
...@@ -159,7 +159,6 @@ ...@@ -159,7 +159,6 @@
728899EE1BEF4A75003CC41E /* PasengerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899ED1BEF4A75003CC41E /* PasengerCell.m */; }; 728899EE1BEF4A75003CC41E /* PasengerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899ED1BEF4A75003CC41E /* PasengerCell.m */; };
728899F11BEF4A8A003CC41E /* PassengerHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F01BEF4A8A003CC41E /* PassengerHeaderCell.m */; }; 728899F11BEF4A8A003CC41E /* PassengerHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F01BEF4A8A003CC41E /* PassengerHeaderCell.m */; };
729735C11BFC9B5800F83CEA /* Compass.m in Sources */ = {isa = PBXBuildFile; fileRef = 729735C01BFC9B5800F83CEA /* Compass.m */; settings = {ASSET_TAGS = (); }; }; 729735C11BFC9B5800F83CEA /* Compass.m in Sources */ = {isa = PBXBuildFile; fileRef = 729735C01BFC9B5800F83CEA /* Compass.m */; settings = {ASSET_TAGS = (); }; };
729735C41BFC9CEC00F83CEA /* OrgCompass.m in Sources */ = {isa = PBXBuildFile; fileRef = 729735C31BFC9CEC00F83CEA /* OrgCompass.m */; settings = {ASSET_TAGS = (); }; };
729A2E931BE60C0200493603 /* GeometryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 729A2E921BE60C0200493603 /* GeometryView.m */; }; 729A2E931BE60C0200493603 /* GeometryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 729A2E921BE60C0200493603 /* GeometryView.m */; };
72A8132D1BCA8BBA003631F3 /* ChooseTransportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */; }; 72A8132D1BCA8BBA003631F3 /* ChooseTransportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */; };
72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; }; 72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; };
...@@ -190,7 +189,6 @@ ...@@ -190,7 +189,6 @@
72B56DE41BF57C710078B5C8 /* RSaleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B56DE31BF57C710078B5C8 /* RSaleView.m */; settings = {ASSET_TAGS = (); }; }; 72B56DE41BF57C710078B5C8 /* RSaleView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B56DE31BF57C710078B5C8 /* RSaleView.m */; settings = {ASSET_TAGS = (); }; };
72B56DE71BF5925A0078B5C8 /* RPassgerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B56DE61BF5925A0078B5C8 /* RPassgerView.m */; settings = {ASSET_TAGS = (); }; }; 72B56DE71BF5925A0078B5C8 /* RPassgerView.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B56DE61BF5925A0078B5C8 /* RPassgerView.m */; settings = {ASSET_TAGS = (); }; };
72B56DED1BF5E40B0078B5C8 /* GrossRateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B56DEC1BF5E40B0078B5C8 /* GrossRateViewController.m */; settings = {ASSET_TAGS = (); }; }; 72B56DED1BF5E40B0078B5C8 /* GrossRateViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B56DEC1BF5E40B0078B5C8 /* GrossRateViewController.m */; settings = {ASSET_TAGS = (); }; };
72B70D601BF772AD0092E00E /* SaleTest.m in Sources */ = {isa = PBXBuildFile; fileRef = 72B70D5F1BF772AD0092E00E /* SaleTest.m */; settings = {ASSET_TAGS = (); }; };
72C4C7461BF31BE300EDC3F8 /* ReportDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C4C7451BF31BE300EDC3F8 /* ReportDetailViewController.m */; settings = {ASSET_TAGS = (); }; }; 72C4C7461BF31BE300EDC3F8 /* ReportDetailViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C4C7451BF31BE300EDC3F8 /* ReportDetailViewController.m */; settings = {ASSET_TAGS = (); }; };
72C803521B7B897B00990363 /* DataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C803511B7B897B00990363 /* DataManager.m */; }; 72C803521B7B897B00990363 /* DataManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 72C803511B7B897B00990363 /* DataManager.m */; };
72D645231BF1E9B80029E146 /* ChooseTransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D645221BF1E9B80029E146 /* ChooseTransferViewController.m */; }; 72D645231BF1E9B80029E146 /* ChooseTransferViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72D645221BF1E9B80029E146 /* ChooseTransferViewController.m */; };
...@@ -759,8 +757,6 @@ ...@@ -759,8 +757,6 @@
728899F01BEF4A8A003CC41E /* PassengerHeaderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PassengerHeaderCell.m; sourceTree = "<group>"; }; 728899F01BEF4A8A003CC41E /* PassengerHeaderCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PassengerHeaderCell.m; sourceTree = "<group>"; };
729735BF1BFC9B5800F83CEA /* Compass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compass.h; sourceTree = "<group>"; }; 729735BF1BFC9B5800F83CEA /* Compass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Compass.h; sourceTree = "<group>"; };
729735C01BFC9B5800F83CEA /* Compass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Compass.m; sourceTree = "<group>"; }; 729735C01BFC9B5800F83CEA /* Compass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = Compass.m; sourceTree = "<group>"; };
729735C21BFC9CEC00F83CEA /* OrgCompass.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = OrgCompass.h; sourceTree = "<group>"; };
729735C31BFC9CEC00F83CEA /* OrgCompass.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = OrgCompass.m; sourceTree = "<group>"; };
729A2E911BE60C0200493603 /* GeometryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeometryView.h; sourceTree = "<group>"; }; 729A2E911BE60C0200493603 /* GeometryView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GeometryView.h; sourceTree = "<group>"; };
729A2E921BE60C0200493603 /* GeometryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeometryView.m; sourceTree = "<group>"; }; 729A2E921BE60C0200493603 /* GeometryView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GeometryView.m; sourceTree = "<group>"; };
72A8132B1BCA8BBA003631F3 /* ChooseTransportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseTransportViewController.h; sourceTree = "<group>"; }; 72A8132B1BCA8BBA003631F3 /* ChooseTransportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseTransportViewController.h; sourceTree = "<group>"; };
...@@ -821,8 +817,6 @@ ...@@ -821,8 +817,6 @@
72B56DE61BF5925A0078B5C8 /* RPassgerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RPassgerView.m; sourceTree = "<group>"; }; 72B56DE61BF5925A0078B5C8 /* RPassgerView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = RPassgerView.m; sourceTree = "<group>"; };
72B56DEB1BF5E40B0078B5C8 /* GrossRateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GrossRateViewController.h; sourceTree = "<group>"; }; 72B56DEB1BF5E40B0078B5C8 /* GrossRateViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = GrossRateViewController.h; sourceTree = "<group>"; };
72B56DEC1BF5E40B0078B5C8 /* GrossRateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GrossRateViewController.m; sourceTree = "<group>"; }; 72B56DEC1BF5E40B0078B5C8 /* GrossRateViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = GrossRateViewController.m; sourceTree = "<group>"; };
72B70D5E1BF772AD0092E00E /* SaleTest.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SaleTest.h; sourceTree = "<group>"; };
72B70D5F1BF772AD0092E00E /* SaleTest.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SaleTest.m; sourceTree = "<group>"; };
72C4C7441BF31BE300EDC3F8 /* ReportDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportDetailViewController.h; sourceTree = "<group>"; }; 72C4C7441BF31BE300EDC3F8 /* ReportDetailViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportDetailViewController.h; sourceTree = "<group>"; };
72C4C7451BF31BE300EDC3F8 /* ReportDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportDetailViewController.m; sourceTree = "<group>"; }; 72C4C7451BF31BE300EDC3F8 /* ReportDetailViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportDetailViewController.m; sourceTree = "<group>"; };
72C803501B7B897B00990363 /* DataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataManager.h; sourceTree = "<group>"; }; 72C803501B7B897B00990363 /* DataManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DataManager.h; sourceTree = "<group>"; };
...@@ -1669,12 +1663,8 @@ ...@@ -1669,12 +1663,8 @@
728899CE1BECADA8003CC41E /* Models */ = { 728899CE1BECADA8003CC41E /* Models */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
72B70D5E1BF772AD0092E00E /* SaleTest.h */,
72B70D5F1BF772AD0092E00E /* SaleTest.m */,
729735BF1BFC9B5800F83CEA /* Compass.h */, 729735BF1BFC9B5800F83CEA /* Compass.h */,
729735C01BFC9B5800F83CEA /* Compass.m */, 729735C01BFC9B5800F83CEA /* Compass.m */,
729735C21BFC9CEC00F83CEA /* OrgCompass.h */,
729735C31BFC9CEC00F83CEA /* OrgCompass.m */,
); );
path = Models; path = Models;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -2909,7 +2899,6 @@ ...@@ -2909,7 +2899,6 @@
72B3C0C11B9D3C7300025D81 /* CostViewController.m in Sources */, 72B3C0C11B9D3C7300025D81 /* CostViewController.m in Sources */,
C1677FCC1AC28A26002613C5 /* ICRAppDelegate.m in Sources */, C1677FCC1AC28A26002613C5 /* ICRAppDelegate.m in Sources */,
C123A8F31B251284003C0C36 /* UIScrollView+Content.m in Sources */, C123A8F31B251284003C0C36 /* UIScrollView+Content.m in Sources */,
72B70D601BF772AD0092E00E /* SaleTest.m in Sources */,
72B56DED1BF5E40B0078B5C8 /* GrossRateViewController.m in Sources */, 72B56DED1BF5E40B0078B5C8 /* GrossRateViewController.m in Sources */,
C1A05CBE1ACCE089006E827D /* ICRSystemHeaderView.m in Sources */, C1A05CBE1ACCE089006E827D /* ICRSystemHeaderView.m in Sources */,
C15918511AC062460013B391 /* IBTUILabel.m in Sources */, C15918511AC062460013B391 /* IBTUILabel.m in Sources */,
...@@ -3096,7 +3085,6 @@ ...@@ -3096,7 +3085,6 @@
0414FF1B1B94959700C7B00E /* ShopDetaileViewController.m in Sources */, 0414FF1B1B94959700C7B00E /* ShopDetaileViewController.m in Sources */,
7217E9F21B72364300FE5C1D /* StartTimeView.m in Sources */, 7217E9F21B72364300FE5C1D /* StartTimeView.m in Sources */,
72F9D47F1BA7E97200795A00 /* NoticeProduct.m in Sources */, 72F9D47F1BA7E97200795A00 /* NoticeProduct.m in Sources */,
729735C41BFC9CEC00F83CEA /* OrgCompass.m in Sources */,
C1FE50351AE020D400C18080 /* IBTAudioController.m in Sources */, C1FE50351AE020D400C18080 /* IBTAudioController.m in Sources */,
7281A0C21B898A040052B1AC /* PurchaseDetailViewController.m in Sources */, 7281A0C21B898A040052B1AC /* PurchaseDetailViewController.m in Sources */,
C14BE3061ADB84350049F1AA /* IBTTextFieldCell.m in Sources */, C14BE3061ADB84350049F1AA /* IBTTextFieldCell.m in Sources */,
......
...@@ -247,7 +247,7 @@ static NSString * const ICRHTTPInterface[] = { ...@@ -247,7 +247,7 @@ static NSString * const ICRHTTPInterface[] = {
//版本升级 //版本升级
[XFFHttp_getVersionId] = @"ipapk", [XFFHttp_getVersionId] = @"ipapk",
//报表 //报表
[XFFHttp_QueryHomepage] = @"compass/query_homepage", [XFFHttp_QueryHomepage] = @"salesdata/query",
[XFFHttp_QueryOrgdata] = @"compass/query_orgdata", [XFFHttp_QueryOrgdata] = @"compass/query_orgdata",
...@@ -519,6 +519,9 @@ acceptTypeJson:(BOOL)bAcceptJson ...@@ -519,6 +519,9 @@ acceptTypeJson:(BOOL)bAcceptJson
userUtil.orgId = dictResult[ @"enterprise_uuid" ]; userUtil.orgId = dictResult[ @"enterprise_uuid" ];
userUtil.authenticode = dictResult[@"authenticode"]; userUtil.authenticode = dictResult[@"authenticode"];
userUtil.permissions = dictResult[@"permissions"]; userUtil.permissions = dictResult[@"permissions"];
userUtil.org_code = dictResult[ @"org_code" ];
userUtil.org_name = dictResult[ @"org_name" ];
userUtil.org_uuid = dictResult[ @"org_uuid" ];
userUtil.password = nsPassword; userUtil.password = nsPassword;
userUtil.isLogout = NO; userUtil.isLogout = NO;
[userUtil saveArchive]; [userUtil saveArchive];
......
{
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "back_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "back_icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "goSale.png", "filename" : "downSale@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "downSale@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
...@@ -6,11 +6,12 @@ ...@@ -6,11 +6,12 @@
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "downSale.png", "filename" : "goSale@2x.png",
"scale" : "2x" "scale" : "2x"
}, },
{ {
"idiom" : "universal", "idiom" : "universal",
"filename" : "goSale@3x.png",
"scale" : "3x" "scale" : "3x"
} }
], ],
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "more_detail@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "more_detail@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "sale_amount_icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "sale_amount_icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "search-icon@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "search-icon@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "white_point@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "white_point@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "yellow_point@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"filename" : "yellow_point@3x.png",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
#define KNOTIFICATION_EditReceiveProduct @"KNOTIFICATION_EditReceiveProduct" #define KNOTIFICATION_EditReceiveProduct @"KNOTIFICATION_EditReceiveProduct"
#define KNOTIFICATION_GetNextDetailData @"KNOTIFICATION_GetNextDetailData" #define KNOTIFICATION_GetNextDetailData @"KNOTIFICATION_GetNextDetailData"
#define KNOTIFICATION_GoReportDetail @"KNOTIFICATION_GoReportDetail"
#define KNOTIFICATION_AddPurchaseProduct @"KNOTIFICATION_AddPurchaseProduct" #define KNOTIFICATION_AddPurchaseProduct @"KNOTIFICATION_AddPurchaseProduct"
#define KNOTIFICATION_AddTransportCost @"KNOTIFICATION_AddTransportCost" #define KNOTIFICATION_AddTransportCost @"KNOTIFICATION_AddTransportCost"
......
...@@ -234,10 +234,10 @@ ...@@ -234,10 +234,10 @@
//报表统一颜色 //报表统一颜色
#define ReportColor RGBA(42, 135, 193, 1) #define ReportColor GXF_NAVIGAYION_COLOR
#define ReportContentColor RGBA(192, 0, 13, 1) #define ReportContentColor HexColor(@"f4422e")
#define ReportTableHeaderColor RGBA(207, 207, 207, 1) #define ReportTitleColor GXF_PLACEHOLDER_COLOR
#define ReportTitleColor RGBA(52, 141, 194, 1) #define ReportBgColor RGBA(219,219,219,1)
#define ReportChainSignPlus @"plus" #define ReportChainSignPlus @"plus"
#define ReportChainSignMinus @"minus" #define ReportChainSignMinus @"minus"
......
...@@ -38,6 +38,13 @@ ...@@ -38,6 +38,13 @@
//avatar add //avatar add
@property (assign, nonatomic) BOOL isLogout; @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; //
+ (instancetype)sharedInstance; + (instancetype)sharedInstance;
......
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController"; static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController";
@interface GrossRateViewController ()<CustomSegViewDelegate,UITableViewDataSource,UITableViewDelegate> @interface GrossRateViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)SMPageControl *pageControl; @property (nonatomic,strong)SMPageControl *pageControl;
@property (nonatomic,strong)UIView *bgView; @property (nonatomic,strong)UIView *bgView;
...@@ -50,8 +50,10 @@ static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController ...@@ -50,8 +50,10 @@ static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController
self.pageControl.numberOfPages = 4; self.pageControl.numberOfPages = 4;
self.pageControl.currentPage = 3; self.pageControl.currentPage = 3;
self.pageControl.pageIndicatorTintColor = XXFBgColor; self.pageControl.pageIndicatorImage = [UIImage imageNamed:@"white_point"];
self.pageControl.currentPageIndicatorTintColor = ReportColor; self.pageControl.currentPageIndicatorImage = [UIImage imageNamed:@"yellow_point"];
// self.pageControl.pageIndicatorTintColor = XXFBgColor;
// self.pageControl.currentPageIndicatorTintColor = GXF_COMMIT_COLOR;
self.pageControl.indicatorMargin = 15.0f; self.pageControl.indicatorMargin = 15.0f;
self.pageControl.indicatorDiameter = 10.0f; self.pageControl.indicatorDiameter = 10.0f;
...@@ -91,22 +93,8 @@ static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController ...@@ -91,22 +93,8 @@ static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController
//取消分割线 //取消分割线
tableView.separatorStyle = UITableViewCellSeparatorStyleNone; tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
OrgCompass *test = _dataArr[indexPath.row]; Compass *test = _dataArr[indexPath.row];
if (test.level == 0) { [cell setColorAndFont:test.level];
cell.dqLabel.textColor = ReportTitleColor;
cell.dqLabel.font = GXF_FIFTEENTEN_SIZE;
cell.lineLabel.hidden = NO;
}else if(test.level == 1)
{
cell.dqLabel.textColor = [UIColor blackColor];
cell.dqLabel.font = GXF_FOURTEENTH_SIZE;
cell.lineLabel.hidden = NO;
}else {
cell.lineLabel.hidden = YES;
cell.dqLabel.textColor = [UIColor lightGrayColor];
cell.dqLabel.font = GXF_THREETEENTH_SIZE;
}
if(test != nil) { if(test != nil) {
[cell updateCellWithGross:test index:indexPath]; [cell updateCellWithGross:test index:indexPath];
} }
...@@ -115,9 +103,7 @@ static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController ...@@ -115,9 +103,7 @@ static NSString *grossRateViewHeaderController = @"grossRateViewHeaderController
return cell; return cell;
} }
- (void)detailClick:(UIButton *)btn{ - (void)detailClick:(UIButton *)btn{
ReportDetailViewController *rvc = [ReportDetailViewController new]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_GoReportDetail object:nil];
rvc.title = @"陆金所";
[self PushViewController:rvc animated:YES];
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
......
...@@ -49,8 +49,10 @@ static NSString *passengerHeaderIdentify = @"PassengerHeaderIdentify"; ...@@ -49,8 +49,10 @@ static NSString *passengerHeaderIdentify = @"PassengerHeaderIdentify";
self.pageControl.numberOfPages = 4; self.pageControl.numberOfPages = 4;
self.pageControl.currentPage = 1; self.pageControl.currentPage = 1;
self.pageControl.pageIndicatorTintColor = XXFBgColor; self.pageControl.pageIndicatorImage = [UIImage imageNamed:@"white_point"];
self.pageControl.currentPageIndicatorTintColor = ReportColor; self.pageControl.currentPageIndicatorImage = [UIImage imageNamed:@"yellow_point"];
// self.pageControl.pageIndicatorTintColor = XXFBgColor;
// self.pageControl.currentPageIndicatorTintColor = GXF_COMMIT_COLOR;
self.pageControl.indicatorMargin = 15.0f; self.pageControl.indicatorMargin = 15.0f;
self.pageControl.indicatorDiameter = 10.0f; self.pageControl.indicatorDiameter = 10.0f;
[self.bgView addSubview:self.pageControl]; [self.bgView addSubview:self.pageControl];
...@@ -91,22 +93,7 @@ static NSString *passengerHeaderIdentify = @"PassengerHeaderIdentify"; ...@@ -91,22 +93,7 @@ static NSString *passengerHeaderIdentify = @"PassengerHeaderIdentify";
//取消分割线 //取消分割线
tableView.separatorStyle = UITableViewCellSeparatorStyleNone; tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
OrgCompass *test = _dataArr[indexPath.row]; Compass *test = _dataArr[indexPath.row];
if (test.level == 0) {
cell.dqLabel.textColor = ReportTitleColor;
cell.dqLabel.font = GXF_FIFTEENTEN_SIZE;
cell.lineLabel.hidden = NO;
}else if(test.level == 1)
{
cell.dqLabel.textColor = [UIColor blackColor];
cell.dqLabel.font = GXF_FOURTEENTH_SIZE;
cell.lineLabel.hidden = NO;
}else {
cell.lineLabel.hidden = YES;
cell.dqLabel.textColor = [UIColor lightGrayColor];
cell.dqLabel.font = GXF_THREETEENTH_SIZE;
}
if(test != nil) { if(test != nil) {
[cell updateCellWithFlow:test index:indexPath]; [cell updateCellWithFlow:test index:indexPath];
} }
...@@ -136,12 +123,11 @@ static NSString *passengerHeaderIdentify = @"PassengerHeaderIdentify"; ...@@ -136,12 +123,11 @@ static NSString *passengerHeaderIdentify = @"PassengerHeaderIdentify";
return headerView; return headerView;
} }
- (void)detailClick:(UIButton *)btn{ - (void)detailClick:(UIButton *)btn{
ReportDetailViewController *rvc = [ReportDetailViewController new]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_GoReportDetail object:nil];
rvc.title = @"陆金所";
[self PushViewController:rvc animated:YES];
} }
- (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section - (CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section
{ {
return [PassengerHeaderCell viewHeight]; return [PassengerHeaderCell viewHeight];
......
...@@ -49,8 +49,10 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify"; ...@@ -49,8 +49,10 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify";
self.pageControl.numberOfPages = 4; self.pageControl.numberOfPages = 4;
self.pageControl.currentPage = 2; self.pageControl.currentPage = 2;
self.pageControl.pageIndicatorTintColor = XXFBgColor; self.pageControl.pageIndicatorImage = [UIImage imageNamed:@"white_point"];
self.pageControl.currentPageIndicatorTintColor = ReportColor; self.pageControl.currentPageIndicatorImage = [UIImage imageNamed:@"yellow_point"];
// self.pageControl.pageIndicatorTintColor = XXFBgColor;
// self.pageControl.currentPageIndicatorTintColor = GXF_COMMIT_COLOR;
self.pageControl.indicatorMargin = 15.0f; self.pageControl.indicatorMargin = 15.0f;
self.pageControl.indicatorDiameter = 10.0f; self.pageControl.indicatorDiameter = 10.0f;
...@@ -91,22 +93,8 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify"; ...@@ -91,22 +93,8 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify";
tableView.separatorStyle = UITableViewCellSeparatorStyleNone; tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
OrgCompass *test = _dataArr[indexPath.row]; Compass *test = _dataArr[indexPath.row];
if (test.level == 0) { [cell setColorAndFont:test.level];
cell.dqLabel.textColor = ReportTitleColor;
cell.dqLabel.font = GXF_FIFTEENTEN_SIZE;
cell.lineLabel.hidden = NO;
}else if(test.level == 1)
{
cell.dqLabel.textColor = [UIColor blackColor];
cell.dqLabel.font = GXF_FOURTEENTH_SIZE;
cell.lineLabel.hidden = NO;
}else {
cell.lineLabel.hidden = YES;
cell.dqLabel.textColor = [UIColor lightGrayColor];
cell.dqLabel.font = GXF_THREETEENTH_SIZE;
}
if(test != nil) { if(test != nil) {
[cell updateCellWithPrice:test index:indexPath]; [cell updateCellWithPrice:test index:indexPath];
} }
...@@ -115,9 +103,7 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify"; ...@@ -115,9 +103,7 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify";
return cell; return cell;
} }
- (void)detailClick:(UIButton *)btn{ - (void)detailClick:(UIButton *)btn{
ReportDetailViewController *rvc = [ReportDetailViewController new]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_GoReportDetail object:nil];
rvc.title = @"陆金所";
[self PushViewController:rvc animated:YES];
} }
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
...@@ -147,6 +133,7 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify"; ...@@ -147,6 +133,7 @@ static NSString *passgerPriceHeaderIdentify = @"PassgerPriceHeaderIdentify";
} }
- (void)didReceiveMemoryWarning { - (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning]; [super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated. // Dispose of any resources that can be recreated.
......
...@@ -7,7 +7,8 @@ ...@@ -7,7 +7,8 @@
// //
#import "ICRBaseViewController.h" #import "ICRBaseViewController.h"
#import "Compass.h"
@interface ReportDetailViewController : ICRBaseViewController @interface ReportDetailViewController : ICRBaseViewController
@property (nonatomic,strong)NSString *reportStyle; @property (nonatomic,strong)NSString *reportStyle;
@property (nonatomic,strong)Compass *compass;
@end @end
...@@ -9,18 +9,32 @@ ...@@ -9,18 +9,32 @@
#import "ReportDetailViewController.h" #import "ReportDetailViewController.h"
#import "CustomSegView.h" #import "CustomSegView.h"
#import "RSaleView.h" #import "RSaleView.h"
#import "RPassgerView.h"
#import "FinishTimeView.h" #import "FinishTimeView.h"
@interface ReportDetailViewController ()<CustomSegViewDelegate,FinishTimeViewDelegate> @interface ReportDetailViewController ()<CustomSegViewDelegate,FinishTimeViewDelegate>
@property (nonatomic,strong)CustomSegView *segView; @property (nonatomic,strong)CustomSegView *segView;
@property (nonatomic,strong)RSaleView *rsaleView; @property (nonatomic,strong)RSaleView *rsaleView;
@property (nonatomic,strong)UIWebView *webView; @property (nonatomic,strong)UIWebView *rwebView;
@property (nonatomic,strong)RPassgerView *rpassgerView;
@property (nonatomic,strong)UIWebView *rpassgerWebView;
@property (nonatomic,strong)RPassgerView *rpriceView;
@property (nonatomic,strong)UIWebView *rpriceWebView;
@property (nonatomic,strong)RPassgerView *rgrossView;
@property (nonatomic,strong)UIWebView *rgrossWebView;
@property (nonatomic,strong)FinishTimeView *startTimeView; @property (nonatomic,strong)FinishTimeView *startTimeView;
@property (nonatomic,strong)NSString *scopeType; @property (nonatomic,strong)NSString *scopeType;
@property (nonatomic,strong)NSString *selectDay; @property (nonatomic,strong)NSString *selectDay;
@property (nonatomic,strong)NSString *selectMonth; @property (nonatomic,strong)NSString *selectMonth;
@property (nonatomic,strong)NSString *selectWeek; @property (nonatomic,strong)NSString *selectWeek;
@property (nonatomic,strong)UIScrollView *scrollView;
@end @end
@implementation ReportDetailViewController @implementation ReportDetailViewController
...@@ -39,16 +53,46 @@ ...@@ -39,16 +53,46 @@
self.segView.delegate = self; self.segView.delegate = self;
[self.view addSubview:self.segView]; [self.view addSubview:self.segView];
rect = CGRectMake(0, self.segView.bottom, ScreenSize.width, 130);
self.scrollView = [[UIScrollView alloc]initWithFrame:CGRectMake(0, self.segView.bottom, ScreenSize.width, ScreenSize.height - 64 - self.segView.bottom)];
self.scrollView.showsHorizontalScrollIndicator = NO;
self.scrollView.showsVerticalScrollIndicator = NO;
self.scrollView.pagingEnabled = YES;
[self.view addSubview:self.scrollView];
//销售
rect = CGRectMake(0, 0, ScreenSize.width, 130);
self.rsaleView = [[RSaleView alloc]initWithFrame:rect]; self.rsaleView = [[RSaleView alloc]initWithFrame:rect];
[self.view addSubview:self.rsaleView]; [self.scrollView addSubview:self.rsaleView];
rect = CGRectMake(0, self.rsaleView.bottom, ScreenSize.width, self.scrollView.height - self.rsaleView.bottom - 64);
self.rwebView = [[UIWebView alloc]initWithFrame:rect];
self.rwebView.scrollView.backgroundColor = [UIColor redColor];
[self.scrollView addSubview:self.rwebView];
rect = CGRectMake(0, self.rsaleView.bottom, ScreenSize.width, ScreenSize.height - self.rsaleView.bottom - 64); for (int i = 1; i< 4 ; i++) {
RPassgerView *prassView = [[RPassgerView alloc]initWithFrame:CGRectMake(i*ScreenSize.width, 0, ScreenSize.width, 130)];
self.webView = [[UIWebView alloc]initWithFrame:rect]; UIWebView *web = [[UIWebView alloc]initWithFrame:CGRectMake(i*ScreenSize.width, prassView.bottom, ScreenSize.width, self.scrollView.height - prassView.bottom - 64)];
self.webView.scrollView.backgroundColor = [UIColor redColor]; [self.scrollView addSubview:prassView];
[self.view addSubview:self.webView]; [self.scrollView addSubview:web];
if (i == 1) {
self.rpassgerView = prassView;
self.rpassgerWebView = web;
}else if (i == 2) {
self.rpriceView = prassView;
self.rpriceWebView = web;
}else if (i == 3) {
self.rgrossView = prassView;
self.rgrossWebView = web;
}
}
self.scrollView.contentSize = CGSizeMake(ScreenSize.width*4, ScreenSize.height - 64 - self.segView.bottom);
[self.rsaleView setValueInSaleView:self.compass];
[self.rpassgerView setPassengerWithCompass:self.compass];
[self.rpriceView setPersalesWithCompass:self.compass];
[self.rgrossView setGrossprofitWithCompass:self.compass];
} }
......
...@@ -12,7 +12,7 @@ ...@@ -12,7 +12,7 @@
#import "SaleHeaderView.h" #import "SaleHeaderView.h"
#import "ReportDetailViewController.h" #import "ReportDetailViewController.h"
#import "RSaleView.h" #import "RSaleView.h"
#import "OrgCompass.h" #import "Compass.h"
static NSString *saleCellIdentify = @"saleCellIdentify"; static NSString *saleCellIdentify = @"saleCellIdentify";
static NSString *saleHeaderIdentify = @"saleHeaderIdentify"; static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
...@@ -20,7 +20,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify"; ...@@ -20,7 +20,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
@interface SaleViewController ()<UITableViewDataSource,UITableViewDelegate> @interface SaleViewController ()<UITableViewDataSource,UITableViewDelegate>
@property (nonatomic,strong)SMPageControl *pageControl; @property (nonatomic,strong)SMPageControl *pageControl;
@property (nonatomic,strong)RSaleView *rsaleView; @property (nonatomic,strong)RSaleView *rsaleView;
@property (nonatomic,strong)Compass *compass;
@property (nonatomic,strong)UIView *bgView; @property (nonatomic,strong)UIView *bgView;
...@@ -57,8 +57,11 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify"; ...@@ -57,8 +57,11 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
self.pageControl = [[SMPageControl alloc]initWithFrame:CGRectMake(0, self.rsaleView.bottom, self.view.width, 10)]; self.pageControl = [[SMPageControl alloc]initWithFrame:CGRectMake(0, self.rsaleView.bottom, self.view.width, 10)];
self.pageControl.currentPage = 0; self.pageControl.currentPage = 0;
self.pageControl.pageIndicatorTintColor = XXFBgColor; self.pageControl.pageIndicatorImage = [UIImage imageNamed:@"white_point"];
self.pageControl.currentPageIndicatorTintColor = ReportColor; self.pageControl.currentPageIndicatorImage = [UIImage imageNamed:@"yellow_point"];
//
// self.pageControl.pageIndicatorTintColor = XXFBgColor;
// self.pageControl.currentPageIndicatorTintColor = GXF_COMMIT_COLOR;
self.pageControl.numberOfPages = 4; self.pageControl.numberOfPages = 4;
self.pageControl.indicatorMargin = 15.0f; self.pageControl.indicatorMargin = 15.0f;
...@@ -80,6 +83,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify"; ...@@ -80,6 +83,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
} }
- (void)setValueInSale:(Compass *)compass{ - (void)setValueInSale:(Compass *)compass{
self.compass = compass;
[self.rsaleView setValueInSaleView:compass]; [self.rsaleView setValueInSaleView:compass];
} }
...@@ -101,22 +105,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify"; ...@@ -101,22 +105,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
//取消分割线 //取消分割线
tableView.separatorStyle = UITableViewCellSeparatorStyleNone; tableView.separatorStyle = UITableViewCellSeparatorStyleNone;
OrgCompass *test = _dataArr[indexPath.row]; Compass *test = _dataArr[indexPath.row];
if (test.level == 0) {
cell.dqLabel.textColor = ReportTitleColor;
cell.dqLabel.font = GXF_FOURTEENTH_SIZE;
cell.lineLabel.hidden = NO;
}else if(test.level == 1)
{
cell.dqLabel.textColor = [UIColor blackColor];
cell.dqLabel.font = GXF_THREETEENTH_SIZE;
cell.lineLabel.hidden = NO;
}else {
cell.lineLabel.hidden = YES;
cell.dqLabel.textColor = [UIColor lightGrayColor];
cell.dqLabel.font = GXF_TWELVETEEN_SIZE;
}
if(test != nil) { if(test != nil) {
[cell updateCellWith:test index:indexPath]; [cell updateCellWith:test index:indexPath];
} }
...@@ -155,9 +144,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify"; ...@@ -155,9 +144,7 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
} }
- (void)detailClick:(UIButton *)btn{ - (void)detailClick:(UIButton *)btn{
ReportDetailViewController *rvc = [ReportDetailViewController new]; [[NSNotificationCenter defaultCenter] postNotificationName:KNOTIFICATION_GoReportDetail object:nil];
rvc.title = @"陆金所";
[self PushViewController:rvc animated:YES];
} }
......
...@@ -13,6 +13,16 @@ ...@@ -13,6 +13,16 @@
// 统计时间类型 否 String 100 day(日),week(周),month(月) // 统计时间类型 否 String 100 day(日),week(周),month(月)
@property (nonatomic,strong)NSString *dateScope; @property (nonatomic,strong)NSString *dateScope;
// 统计时间 否 String 100 日:2015-10-10周:37,表示今年第几周月:2015-10 // 统计时间 否 String 100 日:2015-10-10周:37,表示今年第几周月:2015-10
@property (nonatomic,strong)NSString *orgUuid;
//组织标识 否 String
@property (nonatomic,strong)NSString *orgCode;
//组织代码 否 String
@property (nonatomic,strong)NSString *orgName;
//组织名称 否 Integer
@property (nonatomic,assign)NSInteger level;
//等级 否 String
@property (nonatomic,strong)NSString *upperuuid;
//上级组织uuid 否 String
@property (nonatomic,strong)NSString *sales; @property (nonatomic,strong)NSString *sales;
// 销售额 是 String 100 // 销售额 是 String 100
@property (nonatomic,strong)NSString *salesChainSign; @property (nonatomic,strong)NSString *salesChainSign;
...@@ -63,4 +73,6 @@ ...@@ -63,4 +73,6 @@
//毛利率同比增减标志 是 String 30 枚举值为:plus(增),minus(减) //毛利率同比增减标志 是 String 30 枚举值为:plus(增),minus(减)
@property (nonatomic,strong)NSNumber *grossprofitYoYRate; @property (nonatomic,strong)NSNumber *grossprofitYoYRate;
//毛利率同比增减率 是 Double //毛利率同比增减率 是 Double
@property (nonatomic , assign) BOOL expand;//该节点是否处于展开状态
@property (nonatomic , assign) BOOL isleaf;
@end @end
//
// OrgCompass.h
// XFFruit
//
// Created by 陈俊俊 on 15/11/18.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface OrgCompass : IBTModel
@property (nonatomic,strong)NSString *orguuid;
//组织uuid 否 String 38
@property (nonatomic,strong)NSString *orgcode;
//组织code 否 String 100
@property (nonatomic,strong)NSString *orgname;
//组织name 否 String 100
@property (nonatomic,assign)BOOL isleaf;
//是否叶子节点 否 Boolean 是否是最底层组织,即门店
@property (nonatomic,strong)NSString *sales;
//销售额 是 String 100
@property (nonatomic,strong)NSString *salesChainSign;
//销售环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
@property (nonatomic,strong)NSNumber *salesChainRate;
//销售环比变化率 是 Double  30,表示30%
@property (nonatomic,strong)NSNumber *salesTargetRate;
//销售目标达成率 是 Double
@property (nonatomic,strong)NSString *passenger;
//客流数 是 String 100
@property (nonatomic,strong)NSString *passengerChainSign;
//客流数环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
@property (nonatomic,strong)NSNumber *passengerChainRate;
//客流数环比变化率 是 Double
@property (nonatomic,strong)NSString *persales;
//客单价 是 String 100
@property (nonatomic,strong)NSString *persalesChainSign;
//客单价环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
@property (nonatomic,strong)NSNumber *persalesChainRate;
//客单价环比增减率 是 Double
@property (nonatomic,strong)NSString *grossprofit;
//毛利率 是 String 100
@property (nonatomic,strong)NSString *grossprofitChainSign;
//毛利率环比增减标志 是 String 30 枚举值为:plus(增),minus(减)
@property (nonatomic,strong)NSNumber *grossprofitChainRate;
//毛利率环比增减率 是 Double
@property (nonatomic,assign)NSInteger level;
//新增等级
@property (nonatomic,strong)NSString *parentuuid;
@property (nonatomic , assign) BOOL expand;//该节点是否处于展开状态
@end
//
// OrgCompass.m
// XFFruit
//
// Created by 陈俊俊 on 15/11/18.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "OrgCompass.h"
@implementation OrgCompass
@end
//
// SaleTest.h
// XFFruit
//
// Created by 陈俊俊 on 15/11/14.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "IBTModel.h"
@interface SaleTest : IBTModel
@property (nonatomic,strong)NSString *name;
@property (nonatomic,strong)NSString *xseStr;
@property (nonatomic,strong)NSString *bszStr;
@property (nonatomic,strong)NSString *dclStr;
@property (nonatomic , assign) int parentId;//父节点的id,如果为-1表示该节点为根节点
@property (nonatomic , assign) int nodeId;//本节点的id
@property (nonatomic , assign) int depth;//该节点的深度
@property (nonatomic , assign) BOOL expand;//该节点是否处于展开状态
@end
//
// SaleTest.m
// XFFruit
//
// Created by 陈俊俊 on 15/11/14.
// Copyright © 2015年 Xummer. All rights reserved.
//
#import "SaleTest.h"
@implementation SaleTest
@end
...@@ -7,20 +7,23 @@ ...@@ -7,20 +7,23 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "OrgCompass.h" #import "Compass.h"
@interface PasengerCell : UITableViewCell @interface PasengerCell : UITableViewCell
@property (nonatomic, strong) UILabel *dqLabel; @property (nonatomic, strong) UILabel *dqLabel;
@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *saleLabel; @property (nonatomic, strong) UILabel *saleLabel;
@property (nonatomic, strong) UILabel *lastWeekLabel; @property (nonatomic, strong) UIButton *lastWeekLabel;
@property (nonatomic, strong) UILabel *lineLabel; @property (nonatomic, strong) UILabel *lineLabel;
@property (nonatomic,strong)UIButton *detailBtn; @property (nonatomic,strong)UIButton *detailBtn;
+ (CGFloat)cellHeight; + (CGFloat)cellHeight;
- (void)updateCellWithPrice:(OrgCompass *)obj index:(NSIndexPath *)indexPath; - (void)setColorAndFont:(NSInteger)level;
- (void)updateCellWithFlow:(OrgCompass *)obj index:(NSIndexPath *)indexPath; - (void)updateCellWithPrice:(Compass *)obj index:(NSIndexPath *)indexPath;
- (void)updateCellWithGross:(OrgCompass *)obj index:(NSIndexPath *)indexPath; - (void)updateCellWithFlow:(Compass *)obj index:(NSIndexPath *)indexPath;
- (void)updateCellWithGross:(Compass *)obj index:(NSIndexPath *)indexPath;
@end @end
...@@ -8,8 +8,8 @@ ...@@ -8,8 +8,8 @@
#import "PasengerCell.h" #import "PasengerCell.h"
#define Sale_Cell_Height 50 #define Sale_Cell_Height 50
#define Left_Width 160 #define Left_Width 155
#define Left_margin 0 #define Left_margin 5
@interface PasengerCell () @interface PasengerCell ()
...@@ -57,11 +57,15 @@ ...@@ -57,11 +57,15 @@
- (void)createView - (void)createView
{ {
CGRect rect = CGRectMake(Left_margin,0, Left_Width, Sale_Cell_Height); CGRect rect = CGRectMake(Left_margin,5, Left_Width, Sale_Cell_Height/2);
self.dqLabel = [IBTCommon labelWithTitle:@"0101第一片区" frame:rect textFont:self.textFont]; self.nameLabel = [IBTCommon labelWithTitle:@"第一片区" frame:rect textFont:self.textFont];
self.dqLabel.textColor = ReportTitleColor; [self.contentView addSubview:self.nameLabel];
[self.contentView addSubview:self.dqLabel];
rect = CGRectMake(Left_margin,self.nameLabel.bottom, Left_Width, Sale_Cell_Height/2-10);
self.dqLabel = [IBTCommon labelWithTitle:@"0101" frame:rect textFont:self.textFont];
[self.contentView addSubview:self.dqLabel];
CGFloat width = (ScreenSize.width - self.dqLabel.right - 35)/2; CGFloat width = (ScreenSize.width - self.dqLabel.right - 35)/2;
rect = CGRectMake(self.dqLabel.right , 0, width, Sale_Cell_Height); rect = CGRectMake(self.dqLabel.right , 0, width, Sale_Cell_Height);
...@@ -70,18 +74,17 @@ ...@@ -70,18 +74,17 @@
[self.contentView addSubview:self.saleLabel]; [self.contentView addSubview:self.saleLabel];
rect = CGRectMake(self.saleLabel.right, 0, width, Sale_Cell_Height); rect = CGRectMake(self.saleLabel.right, 0, width, Sale_Cell_Height);
self.lastWeekLabel = [IBTCommon labelWithTitle:@"14.20%" frame:rect textFont:self.textFont]; self.lastWeekLabel = [IBTCommon buttonWithTitle:@"" Image:nil frame:rect fontSize:15 fontColor:ReportContentColor];
self.lastWeekLabel.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:self.lastWeekLabel]; [self.contentView addSubview:self.lastWeekLabel];
rect = CGRectMake(self.lastWeekLabel.right, 0, 35, Sale_Cell_Height); rect = CGRectMake(self.lastWeekLabel.right, 0, 35, Sale_Cell_Height);
self.detailBtn = [IBTCommon buttonWithTitle:@"详" Image:nil frame:rect fontSize:20 fontColor:ReportColor]; self.detailBtn = [IBTCommon buttonWithTitle:@"详" Image:nil frame:rect fontSize:20 fontColor:ReportBgColor];
self.detailBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15]; self.detailBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15];
[self.contentView addSubview:self.detailBtn]; [self.contentView addSubview:self.detailBtn];
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, Sale_Cell_Height - 1, ScreenSize.width, 1))]; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, Sale_Cell_Height - 1, ScreenSize.width, 1))];
self.lineLabel.backgroundColor = [UIColor lightGrayColor]; self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.lineLabel]; [self.contentView addSubview:self.lineLabel];
} }
...@@ -89,55 +92,106 @@ ...@@ -89,55 +92,106 @@
#pragma mark - update view #pragma mark - update view
//客单价 //客单价
- (void)updateCellWithPrice:(OrgCompass *)sale index:(NSIndexPath *)indexPath - (void)updateCellWithPrice:(Compass *)sale index:(NSIndexPath *)indexPath
{ {
self.indexPath = indexPath; self.indexPath = indexPath;
//组织name //组织name
self.dqLabel.text = sale.orgname; self.dqLabel.text = sale.orgCode;
self.nameLabel.text = sale.orgName;
//客单价 //客单价
self.saleLabel.text = sale.persales; self.saleLabel.text = sale.persales;
//客单价比变化率 //客单价比变化率
if ([sale.persalesChainSign isEqualToString:ReportChainSignPlus]) { if ([sale.persalesChainSign isEqualToString:ReportChainSignPlus]) {
self.lastWeekLabel.textColor = ReportContentColor; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateNormal];
}else{ }else{
self.lastWeekLabel.textColor = GXF_NAVIGAYION_COLOR; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:GXF_NAVIGAYION_COLOR forState:UIControlStateNormal];
} }
NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.persalesChainRate]; NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.persalesChainRate];
self.lastWeekLabel.text = salesYoStr; [self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal];
[self setColorAndFont:sale.level];
} }
//客流量 //客流量
- (void)updateCellWithFlow:(OrgCompass *)sale index:(NSIndexPath *)indexPath - (void)updateCellWithFlow:(Compass *)sale index:(NSIndexPath *)indexPath
{ {
self.indexPath = indexPath; self.indexPath = indexPath;
//组织name //组织name
self.dqLabel.text = sale.orgname; self.dqLabel.text = sale.orgCode;
self.nameLabel.text = sale.orgName;
//客流量 //客流量
self.saleLabel.text = sale.passenger; self.saleLabel.text = sale.passenger;
//客流量比变化率 //客流量比变化率
if ([sale.passengerChainSign isEqualToString:ReportChainSignPlus]) { if ([sale.passengerChainSign isEqualToString:ReportChainSignPlus]) {
self.lastWeekLabel.textColor = ReportContentColor; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateNormal];
}else{ }else{
self.lastWeekLabel.textColor = GXF_NAVIGAYION_COLOR; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:GXF_NAVIGAYION_COLOR forState:UIControlStateNormal];
} }
NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.passengerChainRate]; NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.passengerChainRate];
self.lastWeekLabel.text = salesYoStr; [self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal];
[self setColorAndFont:sale.level];
} }
//毛利率 //毛利率
- (void)updateCellWithGross:(OrgCompass *)sale index:(NSIndexPath *)indexPath{ - (void)updateCellWithGross:(Compass *)sale index:(NSIndexPath *)indexPath{
self.indexPath = indexPath; self.indexPath = indexPath;
//组织name //组织name
self.dqLabel.text = sale.orgname; self.dqLabel.text = sale.orgCode;
self.nameLabel.text = sale.orgName;
//毛利率 //毛利率
self.saleLabel.text = sale.grossprofit; self.saleLabel.text = sale.grossprofit;
//毛利率比变化率 //毛利率比变化率
if ([sale.grossprofitChainSign isEqualToString:ReportChainSignPlus]) { if ([sale.grossprofitChainSign isEqualToString:ReportChainSignPlus]) {
self.lastWeekLabel.textColor = ReportContentColor; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateNormal];
}else{ }else{
self.lastWeekLabel.textColor = GXF_NAVIGAYION_COLOR; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:GXF_NAVIGAYION_COLOR forState:UIControlStateNormal];
} }
NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.grossprofitChainRate]; NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.grossprofitChainRate];
self.lastWeekLabel.text = salesYoStr; [self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal];
[self setColorAndFont:sale.level];
}
- (void)setColorAndFont:(NSInteger)level{
if (level == 0) {
self.dqLabel.textColor = GXF_CONTENT_COLOR;
self.nameLabel.textColor = GXF_CONTENT_COLOR;
self.lineLabel.hidden = NO;
[self setFontLabel:15];
[self setWidthDQ:0];
self.contentView.backgroundColor = [UIColor whiteColor];
}else if(level == 1){
self.lineLabel.hidden = NO;
self.dqLabel.textColor = GXF_LEFTSIX_COLOR;
self.nameLabel.textColor = GXF_LEFTSIX_COLOR;
[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 setFontLabel:12];
[self setWidthDQ:0];
self.contentView.backgroundColor = XXFBgColor;
}
}
- (void)setFontLabel:(NSInteger)fontSize{
self.dqLabel.font = FontSize(fontSize-1);
self.nameLabel.font = FontSize(fontSize);
self.saleLabel.font = FontSize(fontSize);
self.lastWeekLabel.font = FontSize(fontSize);
}
- (void)setWidthDQ:(NSInteger)width{
self.lineLabel.left = width;
self.lineLabel.width = ScreenSize.width - width;
} }
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
[super setSelected:selected animated:animated]; [super setSelected:selected animated:animated];
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
#import "PassengerHeaderCell.h" #import "PassengerHeaderCell.h"
#define Sale_Header_Height 30 #define Sale_Header_Height 35
@interface PassengerHeaderCell () @interface PassengerHeaderCell ()
{ {
...@@ -44,9 +44,14 @@ ...@@ -44,9 +44,14 @@
} }
hasBuildLayout = YES; hasBuildLayout = YES;
self.contentView.backgroundColor = ReportTableHeaderColor; self.contentView.backgroundColor = XXFBgColor;
CGRect rect = CGRectMake(10, 0, 150, Sale_Header_Height); CGRect rect = CGRectMake(0, 0, ScreenSize.width, 1);
UILabel *lineLabel = [[UILabel alloc]initWithFrame:rect];
lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:lineLabel];
rect = CGRectMake(10, 0, 150, Sale_Header_Height);
UILabel *searLabel = [IBTCommon labelWithTitle:@"" frame:rect textFont:self.textFont]; UILabel *searLabel = [IBTCommon labelWithTitle:@"" frame:rect textFont:self.textFont];
searLabel.textColor = ReportTitleColor; searLabel.textColor = ReportTitleColor;
[self.contentView addSubview:searLabel]; [self.contentView addSubview:searLabel];
...@@ -68,6 +73,11 @@ ...@@ -68,6 +73,11 @@
bszLabel.textColor = ReportTitleColor; bszLabel.textColor = ReportTitleColor;
bszLabel.textAlignment = NSTextAlignmentCenter; bszLabel.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:bszLabel]; [self.contentView addSubview:bszLabel];
rect = CGRectMake(0, Sale_Header_Height-1, ScreenSize.width, 1);
UILabel *lineTLabel = [[UILabel alloc]initWithFrame:rect];
lineTLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:lineTLabel];
} }
- (void)setTotalValue:(NSString *)totalValue{ - (void)setTotalValue:(NSString *)totalValue{
......
...@@ -77,6 +77,9 @@ ...@@ -77,6 +77,9 @@
//客流 //客流
- (void)setPassengerWithCompass:(Compass *)compass{ - (void)setPassengerWithCompass:(Compass *)compass{
if (!compass) {
return;
}
//客流数 //客流数
[self.centerLabel setImage:[UIImage imageNamed:@"goSale"] forState:UIControlStateDisabled]; [self.centerLabel setImage:[UIImage imageNamed:@"goSale"] forState:UIControlStateDisabled];
[self.centerLabel setTitle:compass.passenger forState:UIControlStateNormal]; [self.centerLabel setTitle:compass.passenger forState:UIControlStateNormal];
...@@ -85,23 +88,30 @@ ...@@ -85,23 +88,30 @@
//客流数环比变化率 //客流数环比变化率
if ([compass.passengerChainSign isEqualToString:ReportChainSignPlus]) { if ([compass.passengerChainSign isEqualToString:ReportChainSignPlus]) {
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled]; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateDisabled];
}else{ }else{
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateDisabled]; [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];
[self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal]; [self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal];
//客流数同比变化率 //客流数同比变化率
if ([compass.passengerYoYSign isEqualToString:ReportChainSignPlus]) { if ([compass.passengerYoYSign isEqualToString:ReportChainSignPlus]) {
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal]; [self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled];
[self.lastYearLabel setTitleColor:ReportContentColor forState:UIControlStateDisabled];
}else{ }else{
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal]; [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];
[self.lastYearLabel setTitle:passengerYoYRateStr forState:UIControlStateNormal]; [self.lastYearLabel setTitle:passengerYoYRateStr forState:UIControlStateNormal];
} }
//客单价 //客单价
- (void)setPersalesWithCompass:(Compass *)compass{ - (void)setPersalesWithCompass:(Compass *)compass{
if (!compass) {
return;
}
//客单价 //客单价
[self.centerLabel setImage:[UIImage imageNamed:@"goSale"] forState:UIControlStateDisabled]; [self.centerLabel setImage:[UIImage imageNamed:@"goSale"] forState:UIControlStateDisabled];
[self.centerLabel setTitle:compass.persales forState:UIControlStateNormal]; [self.centerLabel setTitle:compass.persales forState:UIControlStateNormal];
...@@ -110,8 +120,10 @@ ...@@ -110,8 +120,10 @@
//客单价环比变化率 //客单价环比变化率
if ([compass.persalesChainSign isEqualToString:ReportChainSignPlus]) { if ([compass.persalesChainSign isEqualToString:ReportChainSignPlus]) {
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled]; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateDisabled];
}else{ }else{
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateDisabled]; [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];
[self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal]; [self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal];
...@@ -119,14 +131,19 @@ ...@@ -119,14 +131,19 @@
//客单价同比变化率 //客单价同比变化率
if ([compass.persalesYoYSign isEqualToString:ReportChainSignPlus]) { if ([compass.persalesYoYSign isEqualToString:ReportChainSignPlus]) {
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled]; [self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled];
[self.lastYearLabel setTitleColor:ReportContentColor forState:UIControlStateDisabled];
}else{ }else{
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateDisabled]; [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];
[self.lastYearLabel setTitle:passengerYoYRateStr forState:UIControlStateNormal]; [self.lastYearLabel setTitle:passengerYoYRateStr forState:UIControlStateNormal];
} }
//毛利率 //毛利率
- (void)setGrossprofitWithCompass:(Compass *)compass{ - (void)setGrossprofitWithCompass:(Compass *)compass{
if (!compass) {
return;
}
//毛利率 //毛利率
[self.centerLabel setImage:[UIImage imageNamed:@"goSale"] forState:UIControlStateDisabled]; [self.centerLabel setImage:[UIImage imageNamed:@"goSale"] forState:UIControlStateDisabled];
[self.centerLabel setTitle:compass.persales forState:UIControlStateNormal]; [self.centerLabel setTitle:compass.persales forState:UIControlStateNormal];
...@@ -135,8 +152,10 @@ ...@@ -135,8 +152,10 @@
//毛利率环比变化率 //毛利率环比变化率
if ([compass.grossprofitChainSign isEqualToString:ReportChainSignPlus]) { if ([compass.grossprofitChainSign isEqualToString:ReportChainSignPlus]) {
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled]; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateDisabled];
}else{ }else{
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateDisabled]; [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];
[self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal]; [self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal];
...@@ -144,8 +163,10 @@ ...@@ -144,8 +163,10 @@
//毛利率同比变化率 //毛利率同比变化率
if ([compass.grossprofitYoYSign isEqualToString:ReportChainSignPlus]) { if ([compass.grossprofitYoYSign isEqualToString:ReportChainSignPlus]) {
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled]; [self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateDisabled];
[self.lastYearLabel setTitleColor:ReportContentColor forState:UIControlStateDisabled];
}else{ }else{
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateDisabled]; [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];
[self.lastYearLabel setTitle:passengerYoYRateStr forState:UIControlStateNormal]; [self.lastYearLabel setTitle:passengerYoYRateStr forState:UIControlStateNormal];
......
...@@ -82,7 +82,7 @@ ...@@ -82,7 +82,7 @@
rect = CGRectMake(self.lastYearLabel.right,self.lastWeekLabel.top,bottomWidth, ContentHeight); rect = CGRectMake(self.lastYearLabel.right,self.lastWeekLabel.top,bottomWidth, ContentHeight);
self.rateLabel = [[UILabel alloc]initWithFrame:rect]; self.rateLabel = [[UILabel alloc]initWithFrame:rect];
self.rateLabel.textColor = ReportColor; self.rateLabel.textColor = GXF_COMMIT_COLOR;
self.rateLabel.font = GXF_FIFTEENTEN_SIZE; self.rateLabel.font = GXF_FIFTEENTEN_SIZE;
self.rateLabel.textAlignment = NSTextAlignmentCenter; self.rateLabel.textAlignment = NSTextAlignmentCenter;
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
rect = CGRectMake(self.rateLabel.right, self.lastWeekLabel.top,bottomWidth, ContentHeight); rect = CGRectMake(self.rateLabel.right, self.lastWeekLabel.top,bottomWidth, ContentHeight);
self.averageLabel = [[UILabel alloc]initWithFrame:rect]; self.averageLabel = [[UILabel alloc]initWithFrame:rect];
self.averageLabel.textColor = ReportColor; self.averageLabel.textColor = GXF_COMMIT_COLOR;
self.averageLabel.font = GXF_FIFTEENTEN_SIZE; self.averageLabel.font = GXF_FIFTEENTEN_SIZE;
self.averageLabel.textAlignment = NSTextAlignmentCenter; self.averageLabel.textAlignment = NSTextAlignmentCenter;
...@@ -116,24 +116,34 @@ ...@@ -116,24 +116,34 @@
- (void)setValueInSaleView:(Compass *)compass{ - (void)setValueInSaleView:(Compass *)compass{
//统计时间 //统计时间
if (!compass) {
return;
}
self.dateLabel.text = [NSString stringWithFormat:@"%@累计销售额",compass.dateScope]; self.dateLabel.text = [NSString stringWithFormat:@"%@累计销售额",compass.dateScope];
//销售额 //销售额
NSMutableAttributedString *attributeStr1 = [IBTCommon setTextViewBoldFontOfString:@"$ " paragraphStyle:8 fontSize:20 color:ReportColor]; NSMutableAttributedString *attributeStr1 = [IBTCommon setTextViewBoldFontOfString:@"$ " paragraphStyle:8 fontSize:20 color:ReportColor];
[attributeStr1 appendAttributedString:[IBTCommon setTextViewBoldFontOfString:compass.sales paragraphStyle:8 fontSize:30 color:ReportContentColor]]; if (compass.sales.length > 0 && compass.sales) {
[attributeStr1 appendAttributedString:[IBTCommon setTextViewBoldFontOfString:compass.sales paragraphStyle:8 fontSize:30 color:ReportContentColor]];
}
self.centerLabel.attributedText = attributeStr1; self.centerLabel.attributedText = attributeStr1;
self.centerLabel.textAlignment = NSTextAlignmentCenter;
//销售环比变化率 //销售环比变化率
if ([compass.salesChainSign isEqualToString:ReportChainSignPlus]) { if ([compass.salesChainSign isEqualToString:ReportChainSignPlus]) {
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal]; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateNormal];
}else{ }else{
[self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal]; [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];
[self.lastWeekLabel setTitle:salesChainRateStr forState:UIControlStateNormal]; [self.lastWeekLabel setTitle:salesChainRateStr forState:UIControlStateNormal];
//销售同比变化率 //销售同比变化率
if ([compass.salesYoYSign isEqualToString:ReportChainSignPlus]) { if ([compass.salesYoYSign isEqualToString:ReportChainSignPlus]) {
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal]; [self.lastYearLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal];
[self.lastYearLabel setTitleColor:ReportContentColor forState:UIControlStateNormal];
}else{ }else{
[self.lastYearLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal]; [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];
[self.lastYearLabel setTitle:salesYoStr forState:UIControlStateNormal]; [self.lastYearLabel setTitle:salesYoStr forState:UIControlStateNormal];
......
...@@ -32,8 +32,7 @@ ...@@ -32,8 +32,7 @@
self.titleLabel.font = GXF_FIFTEENTEN_SIZE; self.titleLabel.font = GXF_FIFTEENTEN_SIZE;
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 44-1, ScreenSize.width - LeftMargin * 2, 1))]; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(LeftMargin, 44-1, ScreenSize.width - LeftMargin * 2, 1))];
self.lineLabel.backgroundColor = [UIColor blackColor]; self.lineLabel.backgroundColor = GXF_LINE_COLOR;
self.lineLabel.font = GXF_FIFTEENTEN_SIZE;
[self.contentView addSubview:self.titleLabel]; [self.contentView addSubview:self.titleLabel];
[self.contentView addSubview:self.lineLabel]; [self.contentView addSubview:self.lineLabel];
} }
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
#import "SaleHeaderView.h" #import "SaleHeaderView.h"
#define Sale_Header_Height 30 #define Sale_Header_Height 35
@interface SaleHeaderView () @interface SaleHeaderView ()
{ {
...@@ -40,9 +40,14 @@ ...@@ -40,9 +40,14 @@
} }
hasBuildLayout = YES; hasBuildLayout = YES;
self.contentView.backgroundColor = ReportTableHeaderColor; self.contentView.backgroundColor = XXFBgColor;
CGRect rect = CGRectMake(0, 0, ScreenSize.width, 1);
UILabel *lineLabel = [[UILabel alloc]initWithFrame:rect];
lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:lineLabel];
CGRect rect = CGRectMake(10, 0, 105, Sale_Header_Height);
rect = CGRectMake(10, 0, 105, Sale_Header_Height);
UILabel *searLabel = [IBTCommon labelWithTitle:@"共280家" frame:rect textFont:self.textFont]; UILabel *searLabel = [IBTCommon labelWithTitle:@"共280家" frame:rect textFont:self.textFont];
searLabel.textColor = ReportTitleColor; searLabel.textColor = ReportTitleColor;
[self.contentView addSubview:searLabel]; [self.contentView addSubview:searLabel];
...@@ -67,6 +72,11 @@ ...@@ -67,6 +72,11 @@
sclLabel.textColor = ReportTitleColor; sclLabel.textColor = ReportTitleColor;
sclLabel.textAlignment = NSTextAlignmentCenter; sclLabel.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:sclLabel]; [self.contentView addSubview:sclLabel];
rect = CGRectMake(0, Sale_Header_Height-1, ScreenSize.width, 1);
UILabel *lineTLabel = [[UILabel alloc]initWithFrame:rect];
lineTLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:lineTLabel];
} }
......
...@@ -7,20 +7,22 @@ ...@@ -7,20 +7,22 @@
// //
#import <UIKit/UIKit.h> #import <UIKit/UIKit.h>
#import "OrgCompass.h" #import "Compass.h"
@interface SaleViewCell : UITableViewCell @interface SaleViewCell : UITableViewCell
@property (nonatomic,strong)UIButton *detailBtn; @property (nonatomic,strong)UIButton *detailBtn;
@property (nonatomic, strong) UILabel *dqLabel; @property (nonatomic, strong) UILabel *dqLabel;
@property (nonatomic, strong) UILabel *nameLabel;
@property (nonatomic, strong) UILabel *saleLabel; @property (nonatomic, strong) UILabel *saleLabel;
@property (nonatomic, strong) UILabel *lastWeekLabel; @property (nonatomic, strong) UIButton *lastWeekLabel;
@property (nonatomic, strong) UILabel *rateLabel; @property (nonatomic, strong) UILabel *rateLabel;
@property (nonatomic, strong) UILabel *lineLabel; @property (nonatomic, strong) UILabel *lineLabel;
+ (CGFloat)cellHeight; + (CGFloat)cellHeight;
- (void)updateCellWith:(OrgCompass *)obj index:(NSIndexPath *)indexPath; - (void)updateCellWith:(Compass *)obj index:(NSIndexPath *)indexPath;
- (void)setColorAndFont:(NSInteger)level;
@end @end
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
#import "SaleViewCell.h" #import "SaleViewCell.h"
#define Sale_Cell_Height 50 #define Sale_Cell_Height 50
#define Left_Width 115 #define Left_Width 110
#define Left_margin 0 #define Left_margin 5
@interface SaleViewCell () @interface SaleViewCell ()
{ {
BOOL hasBuildLayout; // default, NO; BOOL hasBuildLayout; // default, NO;
...@@ -59,9 +59,13 @@ ...@@ -59,9 +59,13 @@
- (void)createView - (void)createView
{ {
CGRect rect = CGRectMake(Left_margin,0, Left_Width, Sale_Cell_Height); CGRect rect = CGRectMake(Left_margin,5, Left_Width, Sale_Cell_Height/2);
self.dqLabel = [IBTCommon labelWithTitle:@"0101第一片区" frame:rect textFont:self.textFont]; self.nameLabel = [IBTCommon labelWithTitle:@"第一片区" frame:rect textFont:self.textFont];
self.dqLabel.textColor = ReportTitleColor; [self.contentView addSubview:self.nameLabel];
rect = CGRectMake(Left_margin,self.nameLabel.bottom, Left_Width, Sale_Cell_Height/2-10);
self.dqLabel = [IBTCommon labelWithTitle:@"0101" frame:rect textFont:self.textFont];
[self.contentView addSubview:self.dqLabel]; [self.contentView addSubview:self.dqLabel];
CGFloat width = (ScreenSize.width - self.dqLabel.right - 35)/3; CGFloat width = (ScreenSize.width - self.dqLabel.right - 35)/3;
...@@ -72,24 +76,23 @@ ...@@ -72,24 +76,23 @@
[self.contentView addSubview:self.saleLabel]; [self.contentView addSubview:self.saleLabel];
rect = CGRectMake(self.saleLabel.right, 0, width, Sale_Cell_Height); rect = CGRectMake(self.saleLabel.right, 0, width, Sale_Cell_Height);
self.lastWeekLabel = [IBTCommon labelWithTitle:@"14.20%" frame:rect textFont:self.textFont]; self.lastWeekLabel = [IBTCommon buttonWithTitle:@"" Image:nil frame:rect fontSize:15 fontColor:ReportContentColor];
self.lastWeekLabel.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:self.lastWeekLabel]; [self.contentView addSubview:self.lastWeekLabel];
rect = CGRectMake(self.lastWeekLabel.right, 0, width-10, Sale_Cell_Height); rect = CGRectMake(self.lastWeekLabel.right, 0, width-10, Sale_Cell_Height);
self.rateLabel = [IBTCommon labelWithTitle:@"60%" frame:rect textFont:self.textFont]; self.rateLabel = [IBTCommon labelWithTitle:@"60%" frame:rect textFont:self.textFont];
self.rateLabel.textColor = ReportTitleColor; self.rateLabel.textColor = GXF_COMMIT_COLOR;
self.rateLabel.textAlignment = NSTextAlignmentCenter; self.rateLabel.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:self.rateLabel]; [self.contentView addSubview:self.rateLabel];
rect = CGRectMake(self.rateLabel.right, 0, 35, Sale_Cell_Height); rect = CGRectMake(self.rateLabel.right, 0, 35, Sale_Cell_Height);
self.detailBtn = [IBTCommon buttonWithTitle:@"详" Image:nil frame:rect fontSize:20 fontColor:ReportColor]; self.detailBtn = [IBTCommon buttonWithTitle:@"详" Image:nil frame:rect fontSize:20 fontColor:ReportBgColor];
self.detailBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15]; self.detailBtn.titleLabel.font = [UIFont boldSystemFontOfSize:15];
[self.contentView addSubview:self.detailBtn]; [self.contentView addSubview:self.detailBtn];
self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, Sale_Cell_Height - 1, ScreenSize.width, 1))]; self.lineLabel = [[UILabel alloc]initWithFrame:(CGRectMake(0, Sale_Cell_Height - 1, ScreenSize.width, 1))];
self.lineLabel.backgroundColor = [UIColor lightGrayColor]; self.lineLabel.backgroundColor = GXF_LINE_COLOR;
[self.contentView addSubview:self.lineLabel]; [self.contentView addSubview:self.lineLabel];
} }
...@@ -97,26 +100,68 @@ ...@@ -97,26 +100,68 @@
#pragma mark - update view #pragma mark - update view
- (void)updateCellWith:(OrgCompass *)sale index:(NSIndexPath *)indexPath - (void)updateCellWith:(Compass *)sale index:(NSIndexPath *)indexPath
{ {
self.indexPath = indexPath; self.indexPath = indexPath;
[self buildLayout]; [self buildLayout];
//组织name //组织name
self.dqLabel.text = sale.orgname; self.dqLabel.text = sale.orgCode;
self.nameLabel.text = sale.orgName;
//销售额 //销售额
self.saleLabel.text = sale.sales; self.saleLabel.text = sale.sales;
//销售环比变化率 //销售环比变化率
if ([sale.salesChainSign isEqualToString:ReportChainSignPlus]) { if ([sale.salesChainSign isEqualToString:ReportChainSignPlus]) {
self.lastWeekLabel.textColor = ReportContentColor; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainPlusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:ReportContentColor forState:UIControlStateNormal];
}else{ }else{
self.lastWeekLabel.textColor = GXF_NAVIGAYION_COLOR; [self.lastWeekLabel setImage:[UIImage imageNamed:ReportChainMinusImage] forState:UIControlStateNormal];
[self.lastWeekLabel setTitleColor:GXF_NAVIGAYION_COLOR forState:UIControlStateNormal];
} }
NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.salesChainRate]; NSString *salesYoStr = [NSString stringWithFormat:@"%@%%",sale.salesChainRate];
self.lastWeekLabel.text = salesYoStr; [self.lastWeekLabel setTitle:salesYoStr forState:UIControlStateNormal];
//销售目标达成率 //销售目标达成率
NSString *salesTargetRateStr = [NSString stringWithFormat:@"%@%%",sale.salesTargetRate]; NSString *salesTargetRateStr = [NSString stringWithFormat:@"%@%%",sale.salesTargetRate];
self.rateLabel.text = salesTargetRateStr; self.rateLabel.text = salesTargetRateStr;
[self setColorAndFont:sale.level];
}
- (void)setColorAndFont:(NSInteger)level{
if (level == 0) {
self.dqLabel.textColor = GXF_CONTENT_COLOR;
self.nameLabel.textColor = GXF_CONTENT_COLOR;
self.lineLabel.hidden = NO;
[self setFontLabel:15];
[self setWidthDQ:0];
self.contentView.backgroundColor = [UIColor whiteColor];
}else if(level == 1){
self.lineLabel.hidden = NO;
self.dqLabel.textColor = GXF_LEFTSIX_COLOR;
self.nameLabel.textColor = GXF_LEFTSIX_COLOR;
[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 setFontLabel:12];
[self setWidthDQ:0];
self.contentView.backgroundColor = XXFBgColor;
}
}
- (void)setFontLabel:(NSInteger)fontSize{
self.dqLabel.font = FontSize(fontSize-1);
self.nameLabel.font = FontSize(fontSize);
self.saleLabel.font = FontSize(fontSize);
self.lastWeekLabel.font = FontSize(fontSize);
self.rateLabel.font = FontSize(fontSize);
}
- (void)setWidthDQ:(NSInteger)width{
self.lineLabel.left = width;
self.lineLabel.width = ScreenSize.width - width;
} }
- (void)setSelected:(BOOL)selected animated:(BOOL)animated { - (void)setSelected:(BOOL)selected animated:(BOOL)animated {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment