Commit a08281d4 authored by Achilles's avatar Achilles

提交 1.首页查询增加projectIdsIn参数; 2.根据首页查询的返回结果控制首页三个tab页是否可以点击。 3. 临时去掉左右滑动效果。

parent e323992e
...@@ -3093,10 +3093,10 @@ ...@@ -3093,10 +3093,10 @@
C1CF9F3B1BEF30850033C35E /* VankeNoticeListAPI.m */, C1CF9F3B1BEF30850033C35E /* VankeNoticeListAPI.m */,
C16BA6281BD3952E001ACB26 /* VankePassengerFlowAPI.h */, C16BA6281BD3952E001ACB26 /* VankePassengerFlowAPI.h */,
C16BA6291BD3952E001ACB26 /* VankePassengerFlowAPI.m */, C16BA6291BD3952E001ACB26 /* VankePassengerFlowAPI.m */,
C128050A1BC5920F001ECBAA /* VankeProjectListAPI.h */,
C128050B1BC5920F001ECBAA /* VankeProjectListAPI.m */, C128050B1BC5920F001ECBAA /* VankeProjectListAPI.m */,
C12804FE1BC4195F001ECBAA /* VankeProjectSummaryAPI.h */, C12804FE1BC4195F001ECBAA /* VankeProjectSummaryAPI.h */,
C12804FF1BC4195F001ECBAA /* VankeProjectSummaryAPI.m */, C12804FF1BC4195F001ECBAA /* VankeProjectSummaryAPI.m */,
C128050A1BC5920F001ECBAA /* VankeProjectListAPI.h */,
C12804E71BC2E2F4001ECBAA /* VankeResponse.h */, C12804E71BC2E2F4001ECBAA /* VankeResponse.h */,
C12804E81BC2E2F4001ECBAA /* VankeResponse.m */, C12804E81BC2E2F4001ECBAA /* VankeResponse.m */,
C19ADE361BC80DD400206213 /* VankeSaleVolumeAPI.h */, C19ADE361BC80DD400206213 /* VankeSaleVolumeAPI.h */,
......
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9532" systemVersion="15D21" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES"> <document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="10117" systemVersion="15E65" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" launchScreen="YES" useTraitCollections="YES">
<dependencies> <dependencies>
<deployment identifier="iOS"/> <deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9530"/> <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="10085"/>
<capability name="Constraints to layout margins" minToolsVersion="6.0"/> <capability name="Constraints to layout margins" minToolsVersion="6.0"/>
</dependencies> </dependencies>
<objects> <objects>
......
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
// 车流量日期,黑夜为今天 // 车流量日期,黑夜为今天
@property (nonatomic, strong) NSString *rentalDateEquals; @property (nonatomic, strong) NSString *rentalDateEquals;
// 项目列表,多个值以“,“分隔
@property (nonatomic, strong) NSString *projectIdsIn;
@end @end
// 项目汇总信息 // 项目汇总信息
...@@ -63,5 +66,7 @@ ...@@ -63,5 +66,7 @@
-(ProjectSummary*) getSummary: (NSString*) classificationName; -(ProjectSummary*) getSummary: (NSString*) classificationName;
-(BOOL) hasClassification: (NSString*) classificationName;
@end @end
...@@ -19,6 +19,7 @@ ...@@ -19,6 +19,7 @@
@synthesize passengerDate; @synthesize passengerDate;
@synthesize trafficDate; @synthesize trafficDate;
@synthesize rentalDateEquals; @synthesize rentalDateEquals;
@synthesize projectIdsIn;
-(void) route:(BeeMessage *)msg { -(void) route:(BeeMessage *)msg {
if (self.sending) if (self.sending)
...@@ -27,7 +28,7 @@ ...@@ -27,7 +28,7 @@
return; return;
} }
[self http_get:@"project/queryclassificationby"].PARAM(@"salesDateEquals", self.salesDate).PARAM(@"passengerDateEquals", self.passengerDate).PARAM(@"trafficDateEquals", self.trafficDate).PARAM(@"rentalDateEquals", self.rentalDateEquals).TIMEOUT(10); [self http_get:@"project/queryclassificationby"].PARAM(@"salesDateEquals", self.salesDate).PARAM(@"passengerDateEquals", self.passengerDate).PARAM(@"trafficDateEquals", self.trafficDate).PARAM(@"rentalDateEquals", self.rentalDateEquals).PARAM(@"projectIdsIn", self.projectIdsIn) .TIMEOUT(10);
} }
else if (self.succeed) else if (self.succeed)
{ {
...@@ -90,6 +91,11 @@ ...@@ -90,6 +91,11 @@
CONVERT_PROPERTY_CLASS(data, ProjectSummary) CONVERT_PROPERTY_CLASS(data, ProjectSummary)
-(BOOL) hasClassification: (NSString*) classificationName {
ProjectSummary *summary = [self getSummary:classificationName];
return nil != summary;
}
-(ProjectSummary*) getSummary: (NSString*) classificationName { -(ProjectSummary*) getSummary: (NSString*) classificationName {
if (nil == self.data) { if (nil == self.data) {
return nil; return nil;
......
...@@ -57,6 +57,11 @@ AS_SINGLETON(VankeCommonModel) ...@@ -57,6 +57,11 @@ AS_SINGLETON(VankeCommonModel)
*/ */
-(NSArray*) getAuthOrgs; -(NSArray*) getAuthOrgs;
/**
* 取得授权组织代码列表,多个值以","分隔
*/
-(NSString*) getAuthOrgCodesWithComma;
/** /**
* 当前登录人员的登录密码 * 当前登录人员的登录密码
* *
......
...@@ -72,6 +72,17 @@ DEF_SINGLETON(VankeCommonModel) ...@@ -72,6 +72,17 @@ DEF_SINGLETON(VankeCommonModel)
} }
} }
-(NSString*) getAuthOrgCodesWithComma {
NSArray *data = [self getAuthOrgs];
NSMutableArray *arr = [NSMutableArray array];
for (AuthorizedOrg *org in data) {
[arr addObject:org.code];
}
NSString *str = [arr componentsJoinedByString:@","];
return str;
}
- (NSString*) currentUserPwd { - (NSString*) currentUserPwd {
return [self keychainRead:KEY_CURRENT_USER_PWD]; return [self keychainRead:KEY_CURRENT_USER_PWD];
} }
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
// 租赁日期,黑夜为今天 // 租赁日期,黑夜为今天
@property (nonatomic, strong) NSString *rentalDateEquals; @property (nonatomic, strong) NSString *rentalDateEquals;
// 项目列表,多个值以“,"分隔
@property (nonatomic, strong) NSString *projectIdsIn;
-(ProjectSummaryResponse*) getServerResp; -(ProjectSummaryResponse*) getServerResp;
@end @end
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
@synthesize passengerDate = _passengerDate; @synthesize passengerDate = _passengerDate;
@synthesize trafficDate = _trafficDate; @synthesize trafficDate = _trafficDate;
@synthesize rentalDateEquals = _rentalDateEquals; @synthesize rentalDateEquals = _rentalDateEquals;
@synthesize projectIdsIn = _projectIdsIn;
-(ProjectSummaryResponse*) getServerResp { -(ProjectSummaryResponse*) getServerResp {
return (ProjectSummaryResponse*) self.serverResp; return (ProjectSummaryResponse*) self.serverResp;
...@@ -51,6 +52,7 @@ ...@@ -51,6 +52,7 @@
api.passengerDate = _passengerDate; api.passengerDate = _passengerDate;
api.trafficDate = _trafficDate; api.trafficDate = _trafficDate;
api.rentalDateEquals = _rentalDateEquals; api.rentalDateEquals = _rentalDateEquals;
api.projectIdsIn = _projectIdsIn;
// 清空结果 // 清空结果
self.serverResp = nil; self.serverResp = nil;
......
...@@ -89,6 +89,7 @@ ON_WILL_APPEAR( signal ) ...@@ -89,6 +89,7 @@ ON_WILL_APPEAR( signal )
[BeeUIRouter sharedInstance].view.pannable = NO; [BeeUIRouter sharedInstance].view.pannable = NO;
self.navigationBarShown = NO; self.navigationBarShown = NO;
[[VankeAppBoard_iPhone sharedInstance] showMenu]; [[VankeAppBoard_iPhone sharedInstance] showMenu];
_summaryModel.projectIdsIn = [[VankeCommonModel sharedInstance] getAuthOrgCodesWithComma];
[_summaryModel reload]; [_summaryModel reload];
} }
...@@ -126,14 +127,32 @@ ON_SIGNAL3( VankeWeatherCell_iPhone, btnMask, signal ) ...@@ -126,14 +127,32 @@ ON_SIGNAL3( VankeWeatherCell_iPhone, btnMask, signal )
#pragma VankeTopMenuBoardCell_iPhone #pragma VankeTopMenuBoardCell_iPhone
ON_SIGNAL3( VankeTopMenuBoardCell_iPhone, menuCommunity, signal ) { ON_SIGNAL3( VankeTopMenuBoardCell_iPhone, menuCommunity, signal ) {
ProjectSummaryResponse *resp = [_summaryModel getServerResp];
if (![resp hasClassification:@"社区2049"]) {
[GEToast showWithText:@"缺少权限,请联系管理员" bottomOffset:50.0f duration:1.0f];
return;
}
[self showTab: 0]; [self showTab: 0];
} }
ON_SIGNAL3( VankeTopMenuBoardCell_iPhone, menuCenter, signal ) { ON_SIGNAL3( VankeTopMenuBoardCell_iPhone, menuCenter, signal ) {
ProjectSummaryResponse *resp = [_summaryModel getServerResp];
if (![resp hasClassification:@"万科中心"]) {
[GEToast showWithText:@"缺少权限,请联系管理员" bottomOffset:50.0f duration:1.0f];
return;
}
[self showTab: 1]; [self showTab: 1];
} }
ON_SIGNAL3( VankeTopMenuBoardCell_iPhone, menuSqure, signal ) { ON_SIGNAL3( VankeTopMenuBoardCell_iPhone, menuSqure, signal ) {
ProjectSummaryResponse *resp = [_summaryModel getServerResp];
if (![resp hasClassification:@"万科广场"]) {
[GEToast showWithText:@"缺少权限,请联系管理员" bottomOffset:50.0f duration:1.0f];
return;
}
[self showTab: 2]; [self showTab: 2];
} }
...@@ -165,6 +184,7 @@ ON_SIGNAL3( VankeServiceSaleCell_iPhone, btnHistoryMask, signal ) { ...@@ -165,6 +184,7 @@ ON_SIGNAL3( VankeServiceSaleCell_iPhone, btnHistoryMask, signal ) {
_summaryModel.passengerDate = dateStr; _summaryModel.passengerDate = dateStr;
_summaryModel.trafficDate = dateStr; _summaryModel.trafficDate = dateStr;
_summaryModel.rentalDateEquals = dateStr; _summaryModel.rentalDateEquals = dateStr;
_summaryModel.projectIdsIn = [[VankeCommonModel sharedInstance] getAuthOrgCodesWithComma];
[_summaryModel reload]; [_summaryModel reload];
} }
}]; }];
...@@ -214,6 +234,15 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) { ...@@ -214,6 +234,15 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
[_currDashBoard setData:data]; [_currDashBoard setData:data];
} }
} }
ProjectSummaryResponse *resp = [_summaryModel getServerResp];
if ([resp hasClassification:@"社区2049"]) {
[self showTab: 0];
} else if ([resp hasClassification:@"万科中心"]) {
[self showTab:1];
} else if ([resp hasClassification:@"万科广场"]) {
[self showTab:2];
}
} }
-(void) addLeftIconToTextField: (BeeUITextField*) textField icon: (NSString*) icon { -(void) addLeftIconToTextField: (BeeUITextField*) textField icon: (NSString*) icon {
...@@ -299,12 +328,12 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) { ...@@ -299,12 +328,12 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
#pragma VankeMainBoard_iPhone #pragma VankeMainBoard_iPhone
ON_SWIPE_LEFT( signal ) { ON_SWIPE_LEFT( signal ) {
if (_curTopMenuIndex < 2) { // if (_curTopMenuIndex < 2) {
[self showTab:_curTopMenuIndex + 1]; // [self showTab:_curTopMenuIndex + 1];
} else { // } else {
_curTopMenuIndex = -1; // _curTopMenuIndex = -1;
[self showTab:_curTopMenuIndex + 1]; // [self showTab:_curTopMenuIndex + 1];
} // }
} }
@end @end
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