Commit 1e27b6a7 authored by Sandy's avatar Sandy

万科bug fix

parent f1ff0e9a
...@@ -362,7 +362,7 @@ ...@@ -362,7 +362,7 @@
,(long)dateComponents.weekOfYear]; ,(long)dateComponents.weekOfYear];
}else{ }else{
yearWeek = [NSString stringWithFormat:@"%ld-%ld", (long)[year integerValue] yearWeek = [NSString stringWithFormat:@"%ld-%ld", (long)[year integerValue]
,(long)dateComponents.weekOfYear]; ,(long)dateComponents.weekOfYear - 1];
} }
return yearWeek; return yearWeek;
......
...@@ -17,11 +17,11 @@ ...@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key> <key>CFBundlePackageType</key>
<string>APPL</string> <string>APPL</string>
<key>CFBundleShortVersionString</key> <key>CFBundleShortVersionString</key>
<string>1.5.8</string> <string>1.5.10</string>
<key>CFBundleSignature</key> <key>CFBundleSignature</key>
<string>????</string> <string>????</string>
<key>CFBundleVersion</key> <key>CFBundleVersion</key>
<string>1.5.8</string> <string>1.5.10</string>
<key>LSRequiresIPhoneOS</key> <key>LSRequiresIPhoneOS</key>
<true/> <true/>
<key>NSAppTransportSecurity</key> <key>NSAppTransportSecurity</key>
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
-(void) route:(BeeMessage *)msg { -(void) route:(BeeMessage *)msg {
if (self.sending) if (self.sending)
{ {
[self http_get:@"/ipapk"].PARAM(@"type", @"ipa").TIMEOUT(10); [self http_get:@"ipapk"].PARAM(@"type", @"ipa").TIMEOUT(10);
} }
else if (self.succeed) else if (self.succeed)
{ {
......
...@@ -59,7 +59,7 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint ); ...@@ -59,7 +59,7 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
- (void)load - (void)load
{ {
self.salesInfo.imgRightBg.backgroundColor = [UIColor colorWithRed:237/255.0 green:27/255.0 blue:35/255.0 alpha:1]; self.salesInfo.imgRightBg.backgroundColor = [UIColor colorWithRed:237/255.0 green:27/255.0 blue:35/255.0 alpha:1];
[self.passenger loadDefaults:@"people.png" title:@"昨日客流" bgColor:[UIColor colorWithRed:0 green:195/255.0 blue:230/255.0 alpha:1] unit:@"人" defValue:[NSNumber numberWithInt:0]]; [self.passenger loadDefaults:@"people.png" title:@"客流" bgColor:[UIColor colorWithRed:0 green:195/255.0 blue:230/255.0 alpha:1] unit:@"人" defValue:[NSNumber numberWithInt:0]];
[self.traffic loadDefaults:@"car.png" title:@"车流" bgColor:[UIColor colorWithRed:79/255.0 green:143/255.0 blue:248/255.0 alpha:1] unit:@"次" defValue:[NSNumber numberWithInt:0]]; [self.traffic loadDefaults:@"car.png" title:@"车流" bgColor:[UIColor colorWithRed:79/255.0 green:143/255.0 blue:248/255.0 alpha:1] unit:@"次" defValue:[NSNumber numberWithInt:0]];
[self.energy loadDefaults:@"energy.png" title:@"日坪效" bgColor:[UIColor colorWithRed:149/255.0 green:200/255.0 blue:8/255.0 alpha:1] unit:@"元" [self.energy loadDefaults:@"energy.png" title:@"日坪效" bgColor:[UIColor colorWithRed:149/255.0 green:200/255.0 blue:8/255.0 alpha:1] unit:@"元"
defValue:[NSNumber numberWithFloat:0.00]]; defValue:[NSNumber numberWithFloat:0.00]];
......
...@@ -16,5 +16,5 @@ AS_OUTLET( BeeUILabel, lblAmount ); ...@@ -16,5 +16,5 @@ AS_OUTLET( BeeUILabel, lblAmount );
AS_OUTLET( BeeUILabel, lblAmountUnit ); AS_OUTLET( BeeUILabel, lblAmountUnit );
AS_OUTLET( BeeUIButton, btnHistoryMask ); AS_OUTLET( BeeUIButton, btnHistoryMask );
AS_OUTLET( BeeUILabel, lblDate ); AS_OUTLET( BeeUILabel, lblDate );
AS_OUTLET( BeeUILabel, lblTitle );
@end @end
...@@ -19,7 +19,7 @@ DEF_OUTLET( BeeUILabel, lblAmount ); ...@@ -19,7 +19,7 @@ DEF_OUTLET( BeeUILabel, lblAmount );
DEF_OUTLET( BeeUILabel, lblAmountUnit ); DEF_OUTLET( BeeUILabel, lblAmountUnit );
DEF_OUTLET( BeeUIButton, btnHistoryMask ); DEF_OUTLET( BeeUIButton, btnHistoryMask );
DEF_OUTLET( BeeUILabel, lblDate ); DEF_OUTLET( BeeUILabel, lblDate );
DEF_OUTLET( BeeUILabel, lblTitle );
- (void)load - (void)load
{ {
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<image class="indictor" /> <image class="indictor" />
<linear orientation="v" class="label"> <linear orientation="v" class="label">
<label class="title">昨日销售</label> <label id="lblTitle" class="title">昨日销售</label>
</linear> </linear>
<linear orientation="h" class="detl"> <linear orientation="h" class="detl">
......
...@@ -137,7 +137,7 @@ ON_CREATE_VIEWS( signal ) ...@@ -137,7 +137,7 @@ ON_CREATE_VIEWS( signal )
NSInteger week = [date getWeekOfYear]; NSInteger week = [date getWeekOfYear];
NSString *year = [date yearString]; NSString *year = [date yearString];
self.scopeType = [NSString stringWithFormat:@"%@-%ld",year, (long)week]; self.scopeType = [NSString stringWithFormat:@"%@-%ld",year, (long)week - 1];
[self getDataFromServer]; [self getDataFromServer];
} }
...@@ -239,6 +239,7 @@ ON_CREATE_VIEWS( signal ) ...@@ -239,6 +239,7 @@ ON_CREATE_VIEWS( signal )
} }
self.compass = com; self.compass = com;
self.compass.dateScopeType = self.dayType;
[self setValueInScrollView]; [self setValueInScrollView];
}else{ }else{
[IBTLoadingView showTips:message]; [IBTLoadingView showTips:message];
......
...@@ -117,11 +117,17 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify"; ...@@ -117,11 +117,17 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
return animation; return animation;
} }
- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
return 50;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{ {
return [SaleViewCell cellHeight]; return [SaleViewCell cellHeight];
} }
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[[NSNotificationCenter defaultCenter]postNotificationName:KNOTIFICATION_GetNextDetailData object:nil userInfo:@{@"indexPath":indexPath}]; [[NSNotificationCenter defaultCenter]postNotificationName:KNOTIFICATION_GetNextDetailData object:nil userInfo:@{@"indexPath":indexPath}];
} }
......
...@@ -67,10 +67,11 @@ ...@@ -67,10 +67,11 @@
self.dateLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.centerLabel.left, self.centerLabel.bottom,self.width-self.centerLabel.left, ContentHeight)]; self.dateLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.centerLabel.left, self.centerLabel.bottom,self.width-self.centerLabel.left, ContentHeight * 2.1)];
self.dateLabel.textColor = [UIColor lightGrayColor]; self.dateLabel.textColor = [UIColor lightGrayColor];
self.dateLabel.font = GXF_THREETEENTH_SIZE; self.dateLabel.font = GXF_THREETEENTH_SIZE;
self.dateLabel.textAlignment = NSTextAlignmentLeft; self.dateLabel.textAlignment = NSTextAlignmentLeft;
self.dateLabel.numberOfLines = 3;
[self addSubview:self.dateLabel]; [self addSubview:self.dateLabel];
CGFloat bottomWidth = (SCREEN_WIDTH - 20)/3; CGFloat bottomWidth = (SCREEN_WIDTH - 20)/3;
...@@ -164,8 +165,33 @@ ...@@ -164,8 +165,33 @@
if ([IBTCommon convertToDateFrom:compass.dataScope]) { if ([IBTCommon convertToDateFrom:compass.dataScope]) {
weekday = [IBTCommon weekdayStringFromDate:[IBTCommon convertToDateFrom:compass.dataScope]]; weekday = [IBTCommon weekdayStringFromDate:[IBTCommon convertToDateFrom:compass.dataScope]];
} }
NSString *title;
NSString *year = [compass.dataScope substringWithRange:NSMakeRange(0, 4)];
NSString *requestUrl;
if ([compass.dateScopeType isEqualToString:@"week"]) {
NSString *week = [compass.dataScope substringFromIndex:5];
requestUrl = [NSString stringWithFormat:@"salesdata/getWeekStartAndEndDate/%@/%@",year,week];
WS(weakSelf);
[[ICRHTTPController sharedController] getUrl:requestUrl params:nil success:^(id data) {
NSString *start = data[@"data"][@"startDate"];
NSString *end = data[@"data"][@"endDate"];
NSString *title = [NSString stringWithFormat:@"第%@周 累计销售额\n%@~%@", week,start, end];
weakSelf.dateLabel.text = [NSString stringWithFormat:@"%@\n",title];
} failure:^(id data) {
}];
}else if ([compass.dateScopeType isEqualToString:@"day"]){
NSString *month = [compass.dataScope substringWithRange:NSMakeRange(5, 2)];
NSString *day = [compass.dataScope substringFromIndex:8];
// title = [NSString stringWithFormat:@"%@年 %@月 %@日", year, month, day];
title = compass.dataScope;
}else if ([compass.dateScopeType isEqualToString:@"month"]){
NSString *month = [compass.dataScope substringFromIndex:5];
title = [NSString stringWithFormat:@"%@年 %@月",year, month];
}
self.dateLabel.text = [NSString stringWithFormat:@"%@累计销售额",title];
self.dateLabel.text = [NSString stringWithFormat:@"%@累计销售额",compass.dataScope];
//销售额 //销售额
NSString *strSales = [CalculateHelper getMoneyStringFrom:compass.sales Lenth:0 isSeparate:YES]; NSString *strSales = [CalculateHelper getMoneyStringFrom:compass.sales Lenth:0 isSeparate:YES];
......
...@@ -458,7 +458,7 @@ ON_WILL_APPEAR( signal ) ...@@ -458,7 +458,7 @@ ON_WILL_APPEAR( signal )
case SalesInputViewControllerTypeInput: { case SalesInputViewControllerTypeInput: {
//利用字典key的唯一性,保存每个cell上的数据 //利用字典key的唯一性,保存每个cell上的数据
if (![self.cellDataDic objectForKey:indextPath]) { if (![self.cellDataDic objectForKey:indextPath]) {
[self.cellDataDic setObject:@[@""] forKey:indextPath]; [self.cellDataDic setObject:@[@"0"] forKey:indextPath];
} }
break; break;
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
- (void)cellWithArray:(NSArray *)array { - (void)cellWithArray:(NSArray *)array {
self.textFieldAmount.text = array[0]; self.textFieldAmount.text = array[0] ? array[0] : @"0";
// self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0]; // self.txtfieldSum.text = [array[1] isEqualToString:@"0"] ? @"" : array[0];
} }
......
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