Commit 86a6de5c authored by AvatarC's avatar AvatarC

报表:周

parent 7a6398a3
......@@ -64,4 +64,4 @@ SPEC CHECKSUMS:
SDWebImage: 1d2b1a1efda1ade1b00b6f8498865f8ddedc8a84
SSKeychain: 3f42991739c6c60a9cf1bbd4dff6c0d3694bcf3d
COCOAPODS: 0.38.2
COCOAPODS: 0.39.0
......@@ -159,8 +159,8 @@
728899EB1BEF4233003CC41E /* PassgerPriceViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899EA1BEF4233003CC41E /* PassgerPriceViewController.m */; };
728899EE1BEF4A75003CC41E /* PasengerCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899ED1BEF4A75003CC41E /* PasengerCell.m */; };
728899F11BEF4A8A003CC41E /* PassengerHeaderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 728899F01BEF4A8A003CC41E /* PassengerHeaderCell.m */; };
728F84AC1C194A05009E4A3D /* UserWarehouse.m in Sources */ = {isa = PBXBuildFile; fileRef = 728F84AB1C194A05009E4A3D /* UserWarehouse.m */; settings = {ASSET_TAGS = (); }; };
729735C11BFC9B5800F83CEA /* Compass.m in Sources */ = {isa = PBXBuildFile; fileRef = 729735C01BFC9B5800F83CEA /* Compass.m */; settings = {ASSET_TAGS = (); }; };
728F84AC1C194A05009E4A3D /* UserWarehouse.m in Sources */ = {isa = PBXBuildFile; fileRef = 728F84AB1C194A05009E4A3D /* UserWarehouse.m */; };
729735C11BFC9B5800F83CEA /* Compass.m in Sources */ = {isa = PBXBuildFile; fileRef = 729735C01BFC9B5800F83CEA /* Compass.m */; };
729A2E931BE60C0200493603 /* GeometryView.m in Sources */ = {isa = PBXBuildFile; fileRef = 729A2E921BE60C0200493603 /* GeometryView.m */; };
72A8132D1BCA8BBA003631F3 /* ChooseTransportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A8132C1BCA8BBA003631F3 /* ChooseTransportViewController.m */; };
72A813FA1BCD3205003631F3 /* ReceiveViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 72A813F71BCD3205003631F3 /* ReceiveViewController.m */; };
......@@ -2705,6 +2705,7 @@
C1F696001AB870B400F9F5DD /* Frameworks */,
C1F696011AB870B400F9F5DD /* Resources */,
1454647E6246AB3D8AAE6FF2 /* Copy Pods Resources */,
E53A987E3122130E5840E20A /* Embed Pods Frameworks */,
);
buildRules = (
);
......@@ -2744,7 +2745,7 @@
TargetAttributes = {
C1F696021AB870B400F9F5DD = {
CreatedOnToolsVersion = 6.2;
DevelopmentTeam = 756SDJ9L3G;
DevelopmentTeam = W54V2VB863;
SystemCapabilities = {
com.apple.BackgroundModes = {
enabled = 1;
......@@ -2844,6 +2845,21 @@
shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [[ $? != 0 ]] ; then\n cat << EOM\nerror: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\nEOM\n exit 1\nfi\n";
showEnvVarsInLog = 0;
};
E53A987E3122130E5840E20A /* Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputPaths = (
);
name = "Embed Pods Frameworks";
outputPaths = (
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods/Pods-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
......@@ -3422,8 +3438,8 @@
baseConfigurationReference = 1B0B22845F5CD40B5CF655F2 /* Pods.debug.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
CODE_SIGN_IDENTITY = "iPhone Developer";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "";
COPYING_PRESERVES_HFS_DATA = NO;
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
......@@ -3437,7 +3453,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.xffruit;
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
PROVISIONING_PROFILE = "5747a061-d994-4f1f-8eac-4b028fb34d89";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Debug;
......@@ -3447,8 +3463,8 @@
baseConfigurationReference = 7DDFB1D460448C3B45118195 /* Pods.release.xcconfig */;
buildSettings = {
ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
CODE_SIGN_IDENTITY = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer: Minglong Hu (TR9LJDJBFT)";
CODE_SIGN_IDENTITY = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Distribution: Shanghai Gomore Information Technology Co.,Ltd";
COPYING_PRESERVES_HFS_DATA = NO;
ENABLE_BITCODE = NO;
GCC_PREFIX_HEADER = "XFFruit/XFFruit-Prefix.pch";
......@@ -3462,7 +3478,7 @@
);
PRODUCT_BUNDLE_IDENTIFIER = com.gomore.xffruit;
PRODUCT_NAME = XFFruit;
PROVISIONING_PROFILE = "a12432a9-50b3-4cef-bae7-dcb35f965ce4";
PROVISIONING_PROFILE = "5747a061-d994-4f1f-8eac-4b028fb34d89";
USER_HEADER_SEARCH_PATHS = "${SRCROOT}/**";
};
name = Release;
......
......@@ -424,7 +424,13 @@ typedef NS_ENUM(NSUInteger, ICRAttachmentType) {
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//8.2 根据日期获取周
- (void)getWeekbydayWithStringDate: (NSString *)strDate
success:(void (^)(id))succ
failure:(void (^)(id))fail;
//1.报表首页,数据罗盘
- (void)queryHomepageWith:(id)data
success:(void (^)(id))succ
failure:(void (^)(id))fail;
......
......@@ -134,6 +134,7 @@ typedef NS_ENUM(NSUInteger, ICRHTTPAction) {
//版本更新
XFFHttp_getVersionId,
//报表首页,数据罗盘
XFFHttp_Getweekbyday,
XFFHttp_QueryHomepage,
XFFHttp_QueryLowerOrgs,
......@@ -251,6 +252,7 @@ static NSString * const ICRHTTPInterface[] = {
//版本升级
[XFFHttp_getVersionId] = @"ipapk",
//报表
[XFFHttp_Getweekbyday] = @"salesdata/getweekbyday",
[XFFHttp_QueryHomepage] = @"salesdata/query",
[XFFHttp_QueryLowerOrgs] = @"organization/queryLowerOrgs",
......@@ -3117,6 +3119,38 @@ acceptTypeJson:YES
failure:failure];
}
//根据日期获取周
- (void)getWeekbydayWithStringDate: (NSString *)strDate
success:(void (^)(id))succ
failure:(void (^)(id))fail{
if (!strDate) {
if (fail) {
fail( [[self class] ErrorWithMsg:ERROR_PARAMETER code:0] );
}
return;
}
void (^success)(AFHTTPRequestOperation *operation, id responseObject) = ^(AFHTTPRequestOperation *operation, id responseObject) {
CLog(@"%@", responseObject);
if (succ) {
succ( responseObject );
}
};
void (^failure)(AFHTTPRequestOperation *operation, NSError *error) = ^(AFHTTPRequestOperation *operation, NSError *error) {
CLog(@"%@", error);
if (fail) {
fail( error );
}
};
NSString *urlStr = [NSString stringWithFormat:@"%@/%@",[[self class] UrlForPluginHTTPAction:XFFHttp_Getweekbyday],strDate];
[self GET:urlStr
parameters:nil
needToken:NO
acceptTypeJson:YES
success:success
failure:failure];
}
#pragma mark - 报表首页,数据罗盘
- (void)queryHomepageWith:(id)data
......
......@@ -100,6 +100,11 @@
"idiom" : "ipad",
"size" : "76x76",
"scale" : "2x"
},
{
"idiom" : "ipad",
"size" : "83.5x83.5",
"scale" : "2x"
}
],
"info" : {
......
......@@ -2,13 +2,13 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "month_plan.png"
"filename" : "month_plan.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "month_plan@2x.png"
"filename" : "month_plan@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
......
......@@ -2,13 +2,13 @@
"images" : [
{
"idiom" : "universal",
"scale" : "1x",
"filename" : "notice.png"
"filename" : "notice.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"scale" : "2x",
"filename" : "notice@2x.png"
"filename" : "notice@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
......
......@@ -44,6 +44,7 @@
@property (nonatomic,assign)NSInteger storeCount;
@property (nonatomic,strong)NSIndexPath *currentIndex;
@property (nonatomic,strong)NSMutableArray *selectArr;
@property (nonatomic, assign) BOOL isSegOne;
@end
......@@ -66,6 +67,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.isSegOne = NO;
//布局
#if 1
self.dataArr = [NSMutableArray array];
......@@ -97,6 +99,38 @@
[self PushViewController:srvc animated:YES];
}
- (void)getWeekbydayFromServer {
__weak typeof(self)weakSelf = self;
void(^succ)(id) = ^(id data) {
__strong __typeof(weakSelf)strongSelf = weakSelf;
//赋值
NSInteger success = [data[@"success"] integerValue];
NSString *message = data[@"message"] ;
if (success == 1) {
[IBTLoadingView hideHUDWithText:nil];
self.scopeType = data[@"data"];
[self getDataFromServer];
}else{
[IBTLoadingView hideHUDWithText:message];
[IBTLoadingView showTips:data];
}
};
void(^fail)(id) = ^(id data) {
[IBTLoadingView hideHUDWithText:nil];
[IBTLoadingView showTips:data];
};
[IBTLoadingView showProgressLabel:@"正在加载..."];
NSString *strDate;
if (self.scopeType) {
strDate = _scopeType;
} else {
strDate = [[NSDate date] localYMDString];
}
[[ICRHTTPController sharedController] getWeekbydayWithStringDate:strDate success:succ failure:fail];
}
#pragma mark - 获取上部数据
- (void)getDataFromServer{
......@@ -316,21 +350,33 @@
- (void)customSegOneClick:(NSString *)title{
//日周年切换
NSString *dayType = @"";
if ([title isEqualToString:SaleWeek]) {
dayType = @"week";
[self getWeekbydayFromServer];
// self.scopeType = [IBTCommon getWeekFromDate];
}
if ([title isEqualToString:SaleDay]) {
dayType = @"day";
self.scopeType = [IBTCommon stringFromDateWithFormat:[NSDate date] format:@"yyyy-MM-dd"];
}else if ([title isEqualToString:SaleWeek]) {
dayType = @"week";
self.scopeType = [IBTCommon getWeekFromDate];
// }else if ([title isEqualToString:SaleWeek]) {
// dayType = @"week";
// self.scopeType = [IBTCommon getWeekFromDate];
}else if ([title isEqualToString:SaleMonth]) {
dayType = @"month";
self.scopeType = [IBTCommon stringFromDateWithFormat:[NSDate date] format:@"yyyy-MM"];
} else {
return;
}
CLog(@"-------%@",self.scopeType);
self.dayType = dayType;
self.orgScope = nil;
self.isSegOne = YES;
[self getDataFromServer];
}
- (void)customSegTwoClick:(NSString *)title{
//选择历史查看
if ([title isEqualToString:SaleDay]) {
......
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