Commit 1e27b6a7 authored by Sandy's avatar Sandy

万科bug fix

parent f1ff0e9a
......@@ -362,7 +362,7 @@
,(long)dateComponents.weekOfYear];
}else{
yearWeek = [NSString stringWithFormat:@"%ld-%ld", (long)[year integerValue]
,(long)dateComponents.weekOfYear];
,(long)dateComponents.weekOfYear - 1];
}
return yearWeek;
......
......@@ -17,11 +17,11 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.8</string>
<string>1.5.10</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.5.8</string>
<string>1.5.10</string>
<key>LSRequiresIPhoneOS</key>
<true/>
<key>NSAppTransportSecurity</key>
......
......@@ -13,7 +13,7 @@
-(void) route:(BeeMessage *)msg {
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)
{
......
#import "VankeMainBoard_iPhone.h"
#import "VankeFloorListBoard_iPhone.h"
#import "GEToast.h"
#import "VankeAppBoard_iPhone.h"
#import "VankeFloorListBoardCell_iPhone.h"
#import "VankeFloorListBoard_iPhone.h"
#import "VankeMainBoard_iPhone.h"
#import "VankeServiceDashBoard_iPhone.h"
#import "VankeAppBoard_iPhone.h"
#import "VankeUtil.h"
#import "GEToast.h"
@interface VankeMainBoard_iPhone ()
@property (strong, nonatomic) VankeServiceDashBoard_iPhone *currDashBoard;
......@@ -14,8 +14,7 @@
#pragma mark -
@interface VankeMainBoard_iPhone ()
{
@interface VankeMainBoard_iPhone () {
NSInteger _curTopMenuIndex;
NSMutableDictionary *tabCache;
}
......@@ -23,15 +22,15 @@
@implementation VankeMainBoard_iPhone
SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )
SUPPORT_AUTOMATIC_LAYOUT(YES)
SUPPORT_RESOURCE_LOADING(YES)
DEF_OUTLET( VankeWeatherCell_iPhone, weatherBoard );
DEF_OUTLET( VankeTopMenuBoardCell_iPhone, topMenu );
DEF_OUTLET( BeeUIView, serviceDashBoardView );
DEF_OUTLET( BeeUISearchBar, searchBar);
DEF_OUTLET(VankeWeatherCell_iPhone, weatherBoard);
DEF_OUTLET(VankeTopMenuBoardCell_iPhone, topMenu);
DEF_OUTLET(BeeUIView, serviceDashBoardView);
DEF_OUTLET(BeeUISearchBar, searchBar);
DEF_MODEL( VankeProjectSummaryModel, summaryModel );
DEF_MODEL(VankeProjectSummaryModel, summaryModel);
- (void)load
{
......@@ -48,43 +47,43 @@ DEF_MODEL( VankeProjectSummaryModel, summaryModel );
#pragma mark - Signal
ON_CREATE_VIEWS( signal )
ON_CREATE_VIEWS(signal)
{
self.view.backgroundColor = [UIColor whiteColor];
// [self addLeftIconToTextField:_txtQuery icon:@"search"];
// [self addLeftIconToTextField:_txtQuery icon:@"search"];
[_weatherBoard reloadLocationAndWeather];
self.view.swipeble = YES;
self.view.swipeDirection = UISwipeGestureRecognizerDirectionLeft;
//去掉搜索框背景
float version = [[[ UIDevice currentDevice ] systemVersion ] floatValue ];
if ([ _searchBar respondsToSelector : @selector (barTintColor)]) {
float iosversion7_1 = 7.1 ;
float version = [[[UIDevice currentDevice] systemVersion] floatValue];
if ([_searchBar respondsToSelector:@selector(barTintColor)]) {
float iosversion7_1 = 7.1;
if (version >= iosversion7_1) {
//iOS7.1
[[[[ _searchBar.subviews objectAtIndex : 0 ] subviews] objectAtIndex : 0 ] removeFromSuperview ];
[ _searchBar setBackgroundColor :[ UIColor clearColor ]];
// iOS7.1
[[[[_searchBar.subviews objectAtIndex:0] subviews] objectAtIndex:0] removeFromSuperview];
[_searchBar setBackgroundColor:[UIColor clearColor]];
} else {
//iOS7.0
[ _searchBar setBarTintColor :[ UIColor clearColor ]];
[ _searchBar setBackgroundColor :[ UIColor clearColor ]];
// iOS7.0
[_searchBar setBarTintColor:[UIColor clearColor]];
[_searchBar setBackgroundColor:[UIColor clearColor]];
}
} else {
//iOS7.0 以下
[[ _searchBar . subviews objectAtIndex : 0 ] removeFromSuperview ];
[ _searchBar setBackgroundColor :[ UIColor clearColor ]];
// iOS7.0 以下
[[_searchBar.subviews objectAtIndex:0] removeFromSuperview];
[_searchBar setBackgroundColor:[UIColor clearColor]];
}
}
ON_DELETE_VIEWS( signal )
ON_DELETE_VIEWS(signal)
{
}
ON_LAYOUT_VIEWS( signal )
ON_LAYOUT_VIEWS(signal)
{
}
ON_WILL_APPEAR( signal )
ON_WILL_APPEAR(signal)
{
[BeeUIRouter sharedInstance].view.pannable = NO;
self.navigationBarShown = NO;
......@@ -93,144 +92,155 @@ ON_WILL_APPEAR( signal )
[_summaryModel reload];
}
ON_DID_APPEAR( signal )
ON_DID_APPEAR(signal)
{
// 如果没有设置当前tab,则默认为第一页
// if (nil == _currDashBoard) {
// [self showTab: 0];
// }
// if (nil == _currDashBoard) {
// [self showTab: 0];
// }
}
ON_WILL_DISAPPEAR( signal )
ON_WILL_DISAPPEAR(signal)
{
[BeeUIRouter sharedInstance].view.pannable = NO;
}
ON_DID_DISAPPEAR( signal )
ON_DID_DISAPPEAR(signal)
{
}
ON_SIGNAL3( VankeMainBoard_iPhone, searchBar, signal )
ON_SIGNAL3(VankeMainBoard_iPhone, searchBar, signal)
{
if ([signal is:BeeUISearchBar.SEARCH]) {
[self showListView: CELL_TYPE_FLOOR];
[self showListView:CELL_TYPE_FLOOR];
}
}
#pragma VankeWeatherCell_iPhone
ON_SIGNAL3( VankeWeatherCell_iPhone, btnMask, signal )
ON_SIGNAL3(VankeWeatherCell_iPhone, btnMask, signal)
{
[_weatherBoard reloadLocationAndWeather: YES];
[_weatherBoard reloadLocationAndWeather:YES];
}
#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];
}
#pragma mark - VankeServiceSaleCell_iPhone
ON_SIGNAL3( VankeServiceSaleCell_iPhone, mask, signal ) {
ON_SIGNAL3(VankeServiceSaleCell_iPhone, mask, signal)
{
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
[self showListView: CELL_TYPE_FLOOR];
[self showListView:CELL_TYPE_FLOOR];
}
ON_SIGNAL3( VankeServiceSaleCell_iPhone, btnHistoryMask, signal ) {
ON_SIGNAL3(VankeServiceSaleCell_iPhone, btnHistoryMask, signal)
{
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"\n\n\n\n\n\n\n\n\n\n\n" message:nil preferredStyle:UIAlertControllerStyleActionSheet];
UIDatePicker *picker = [[UIDatePicker alloc] init];
picker.datePickerMode = UIDatePickerModeDate;
NSDate *yesterday = [[NSDate alloc]initWithTimeIntervalSinceNow:-24*60*60];
NSDate *yesterday = [[NSDate alloc] initWithTimeIntervalSinceNow:-24 * 60 * 60];
picker.maximumDate = yesterday;
picker.locale = [NSLocale localeWithLocaleIdentifier:@"zh-Hans"];
[picker setDatePickerMode:UIDatePickerModeDate];
[alertController.view addSubview:picker];
[alertController addAction:({
UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
if (nil != _currDashBoard) {
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd"];
NSString *dateStr = [df stringFromDate:picker.date];
_currDashBoard.salesInfo.lblDate.text = dateStr;
_summaryModel.salesDate = dateStr;
_summaryModel.passengerDate = dateStr;
_summaryModel.trafficDate = dateStr;
_summaryModel.rentalDateEquals = dateStr;
_summaryModel.projectIdsIn = [[VankeCommonModel sharedInstance] getAuthOrgCodesWithComma];
[df setDateFormat:@"yyyyMM"];
NSString *date = [df stringFromDate:picker.date];
_summaryModel.collectFeeRateDate = date;
[_summaryModel reload];
}
}];
action;
})];
UIAlertAction *action = [UIAlertAction actionWithTitle:@"确定"
style:UIAlertActionStyleDefault
handler:^(UIAlertAction *action) {
if (nil != _currDashBoard) {
NSDateFormatter *df = [[NSDateFormatter alloc] init];
[df setDateFormat:@"yyyy-MM-dd"];
NSString *dateStr = [df stringFromDate:picker.date];
_currDashBoard.salesInfo.lblDate.text = dateStr;
_currDashBoard.salesInfo.lblTitle.text = [NSString stringWithFormat:@"%@ 销售",dateStr];
_summaryModel.salesDate = dateStr;
_summaryModel.passengerDate = dateStr;
_summaryModel.trafficDate = dateStr;
_summaryModel.rentalDateEquals = dateStr;
_summaryModel.projectIdsIn = [[VankeCommonModel sharedInstance] getAuthOrgCodesWithComma];
[df setDateFormat:@"yyyyMM"];
NSString *date = [df stringFromDate:picker.date];
_summaryModel.collectFeeRateDate = date;
[_summaryModel reload];
}
}];
action;
})];
[alertController addAction:({
UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
action1;
})];
UIAlertAction *action1 = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
action1;
})];
UIPopoverPresentationController *popoverController = alertController.popoverPresentationController;
popoverController.sourceView = self.view;
popoverController.sourceRect = [self.view bounds];
[self presentViewController:alertController animated:YES completion:nil];
[self presentViewController:alertController animated:YES completion:nil];
}
ON_SIGNAL3(VankeServiceBoardCell_iPhone, mask, signal) {
// [[VankeAppBoard_iPhone sharedInstance] hideMenu];
// [self showListView: CELL_TYPE_FLOOR];
// VankeServiceBoardCell_iPhone *cell = (VankeServiceBoardCell_iPhone *)signal.sourceCell;
// if ([@"昨日客流" eq:[cell name]]) {
// [[VankeAppBoard_iPhone sharedInstance] hideMenu];
// [self showListView: CELL_TYPE_PASSENGER];
// } else {
// [GEToast showWithText:@"正在研发中..." bottomOffset:50.0f duration:1.0f];
// }
ON_SIGNAL3(VankeServiceBoardCell_iPhone, mask, signal)
{
// [[VankeAppBoard_iPhone sharedInstance] hideMenu];
// [self showListView: CELL_TYPE_FLOOR];
// VankeServiceBoardCell_iPhone *cell = (VankeServiceBoardCell_iPhone *)signal.sourceCell;
// if ([@"昨日客流" eq:[cell name]]) {
// [[VankeAppBoard_iPhone sharedInstance] hideMenu];
// [self showListView: CELL_TYPE_PASSENGER];
// } else {
// [GEToast showWithText:@"正在研发中..." bottomOffset:50.0f duration:1.0f];
// }
}
#pragma mark - VankeProjectSummaryModel
ON_SIGNAL3(VankeProjectSummaryModel, RELOADING, signal) {
ON_SIGNAL3(VankeProjectSummaryModel, RELOADING, signal)
{
[GEToast showProgress:self.serviceDashBoardView];
}
ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal)
{
[GEToast hideProgress];
if (![_summaryModel isOk]) {
[GEToast showWithText:[_summaryModel getMessage] bottomOffset:20 duration:1.0f];
return;
}
if (nil == _currDashBoard) {
ProjectSummaryResponse *resp = [_summaryModel getServerResp];
if ([resp hasClassification:@"社区2049"]) {
......@@ -241,7 +251,7 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
[self showTab:2];
}
}
if (nil != _currDashBoard) {
ProjectSummary *data = [[_summaryModel getServerResp] getSummary:_currDashBoard.name];
if (nil != data) {
......@@ -250,7 +260,8 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
}
}
-(void) addLeftIconToTextField: (BeeUITextField*) textField icon: (NSString*) icon {
- (void)addLeftIconToTextField:(BeeUITextField *)textField icon:(NSString *)icon
{
UIImageView *img = [[UIImageView alloc] initWithImage:[UIImage imageNamed:icon]];
img.frame = CGRectMake(0, 0, 30, 25);
img.contentMode = UIViewContentModeCenter;
......@@ -258,73 +269,75 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
textField.leftViewMode = UITextFieldViewModeAlways;
}
-(void) showTab: (int) tabIndex {
- (void)showTab:(int)tabIndex
{
if (tabIndex == _curTopMenuIndex) {
return;
}
CGRect frame = self.serviceDashBoardView.frame;
if (frame.size.width <= 0) {
return;
}
// 修改标签
[self.topMenu selectTabByIndex:tabIndex];
// 查找或创建新的tab页
NSString *key = [NSString stringWithFormat:@"%d", tabIndex];
VankeServiceDashBoard_iPhone *targetTab = (VankeServiceDashBoard_iPhone*) [tabCache objectForKey:key];
VankeServiceDashBoard_iPhone *targetTab = (VankeServiceDashBoard_iPhone *)[tabCache objectForKey:key];
if (nil == targetTab) {
targetTab = [VankeServiceDashBoard_iPhone dashBoardByIndex:tabIndex];
[tabCache setObject:targetTab forKey:key];
}
// 隐藏当前页
if (self.currDashBoard != nil) {
[self.currDashBoard removeFromSuperview];
self.currDashBoard.hidden = YES;
}
// 显示目标页
targetTab.frame = CGRectMake(0, 0, frame.size.width, frame.size.height);
targetTab.right = 0.0f;
// if (tabIndex > _curTopMenuIndex) {
// targetTab.right = 0.0f;
// } else {
// targetTab.left = frame.size.width;
// }
[UIView animateWithDuration:0.3f // 动画时长
delay:0.0 // 动画延迟
options:UIViewAnimationOptionCurveLinear // 动画过渡效果
animations:^{
targetTab.right += frame.size.width;
// if (tabIndex > _curTopMenuIndex) {
// targetTab.right += frame.size.width;
// } else {
// targetTab.left -= frame.size.width;
// }
targetTab.hidden = NO;
[self.serviceDashBoardView addSubview:targetTab];
}
completion:^(BOOL finished) {
self.currDashBoard = targetTab;
_curTopMenuIndex = tabIndex;
// 刷新数据
[_summaryModel reload];
}];
// if (tabIndex > _curTopMenuIndex) {
// targetTab.right = 0.0f;
// } else {
// targetTab.left = frame.size.width;
// }
[UIView animateWithDuration:0.3f // 动画时长
delay:0.0 // 动画延迟
options:UIViewAnimationOptionCurveLinear// 动画过渡效果
animations:^{
targetTab.right += frame.size.width;
// if (tabIndex > _curTopMenuIndex) {
// targetTab.right += frame.size.width;
// } else {
// targetTab.left -= frame.size.width;
// }
targetTab.hidden = NO;
[self.serviceDashBoardView addSubview:targetTab];
}
completion:^(BOOL finished) {
self.currDashBoard = targetTab;
_curTopMenuIndex = tabIndex;
// 刷新数据
[_summaryModel reload];
}];
}
-(void) showListView: (CellType) type {
VankeFloorListBoard_iPhone * board = [VankeFloorListBoard_iPhone boardWithType:type];
- (void)showListView:(CellType)type
{
VankeFloorListBoard_iPhone *board = [VankeFloorListBoard_iPhone boardWithType:type];
if (nil != _currDashBoard) {
board.projectCategory = _currDashBoard.name;
board.theme = _currDashBoard.theme;
NSString *nameLike = [VankeUtil trim:self.searchBar.text];
board.projectNameLike = nameLike;
}
board.salesDate = _summaryModel.salesDate;
board.passengerDate = _summaryModel.passengerDate;
[self.stack pushBoard:board animated:YES];
......@@ -332,13 +345,14 @@ ON_SIGNAL3(VankeProjectSummaryModel, RELOADED, signal) {
#pragma VankeMainBoard_iPhone
ON_SWIPE_LEFT( signal ) {
// if (_curTopMenuIndex < 2) {
// [self showTab:_curTopMenuIndex + 1];
// } else {
// _curTopMenuIndex = -1;
// [self showTab:_curTopMenuIndex + 1];
// }
ON_SWIPE_LEFT(signal)
{
// if (_curTopMenuIndex < 2) {
// [self showTab:_curTopMenuIndex + 1];
// } else {
// _curTopMenuIndex = -1;
// [self showTab:_curTopMenuIndex + 1];
// }
}
@end
......@@ -59,7 +59,7 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
- (void)load
{
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.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]];
......
......@@ -16,5 +16,5 @@ AS_OUTLET( BeeUILabel, lblAmount );
AS_OUTLET( BeeUILabel, lblAmountUnit );
AS_OUTLET( BeeUIButton, btnHistoryMask );
AS_OUTLET( BeeUILabel, lblDate );
AS_OUTLET( BeeUILabel, lblTitle );
@end
......@@ -19,7 +19,7 @@ DEF_OUTLET( BeeUILabel, lblAmount );
DEF_OUTLET( BeeUILabel, lblAmountUnit );
DEF_OUTLET( BeeUIButton, btnHistoryMask );
DEF_OUTLET( BeeUILabel, lblDate );
DEF_OUTLET( BeeUILabel, lblTitle );
- (void)load
{
......
......@@ -19,7 +19,7 @@
<image class="indictor" />
<linear orientation="v" class="label">
<label class="title">昨日销售</label>
<label id="lblTitle" class="title">昨日销售</label>
</linear>
<linear orientation="h" class="detl">
......
......@@ -137,7 +137,7 @@ ON_CREATE_VIEWS( signal )
NSInteger week = [date getWeekOfYear];
NSString *year = [date yearString];
self.scopeType = [NSString stringWithFormat:@"%@-%ld",year, (long)week];
self.scopeType = [NSString stringWithFormat:@"%@-%ld",year, (long)week - 1];
[self getDataFromServer];
}
......@@ -239,6 +239,7 @@ ON_CREATE_VIEWS( signal )
}
self.compass = com;
self.compass.dateScopeType = self.dayType;
[self setValueInScrollView];
}else{
[IBTLoadingView showTips:message];
......
......@@ -117,11 +117,17 @@ static NSString *saleHeaderIdentify = @"saleHeaderIdentify";
return animation;
}
- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
return 50;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath
{
return [SaleViewCell cellHeight];
}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{
[[NSNotificationCenter defaultCenter]postNotificationName:KNOTIFICATION_GetNextDetailData object:nil userInfo:@{@"indexPath":indexPath}];
}
......
......@@ -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.font = GXF_THREETEENTH_SIZE;
self.dateLabel.textAlignment = NSTextAlignmentLeft;
self.dateLabel.numberOfLines = 3;
[self addSubview:self.dateLabel];
CGFloat bottomWidth = (SCREEN_WIDTH - 20)/3;
......@@ -164,8 +165,33 @@
if ([IBTCommon convertToDateFrom:compass.dataScope]) {
weekday = [IBTCommon weekdayStringFromDate:[IBTCommon convertToDateFrom:compass.dataScope]];
}
self.dateLabel.text = [NSString stringWithFormat:@"%@累计销售额",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];
//销售额
NSString *strSales = [CalculateHelper getMoneyStringFrom:compass.sales Lenth:0 isSeparate:YES];
......
......@@ -458,7 +458,7 @@ ON_WILL_APPEAR( signal )
case SalesInputViewControllerTypeInput: {
//利用字典key的唯一性,保存每个cell上的数据
if (![self.cellDataDic objectForKey:indextPath]) {
[self.cellDataDic setObject:@[@""] forKey:indextPath];
[self.cellDataDic setObject:@[@"0"] forKey:indextPath];
}
break;
......
......@@ -24,7 +24,7 @@
- (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];
}
......
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