Commit 40d85842 authored by Sandy's avatar Sandy

tabbar增加报表

parent 3d042ba4
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
1912FCE51CCDF1F6004CF976 /* SalesInputCommitView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1912FCE41CCDF1F6004CF976 /* SalesInputCommitView.xib */; }; 1912FCE51CCDF1F6004CF976 /* SalesInputCommitView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1912FCE41CCDF1F6004CF976 /* SalesInputCommitView.xib */; };
1912FCE81CCDF20F004CF976 /* SalesInputCommitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCE71CCDF20F004CF976 /* SalesInputCommitView.m */; }; 1912FCE81CCDF20F004CF976 /* SalesInputCommitView.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCE71CCDF20F004CF976 /* SalesInputCommitView.m */; };
1912FCF41CCF1493004CF976 /* ChooseProjectTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCF31CCF1493004CF976 /* ChooseProjectTableViewController.m */; }; 1912FCF41CCF1493004CF976 /* ChooseProjectTableViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 1912FCF31CCF1493004CF976 /* ChooseProjectTableViewController.m */; };
196F0F3D1D339D8C0047300A /* ReportViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 196F0F3B1D339D8C0047300A /* ReportViewController.m */; };
196F0F3E1D339D8C0047300A /* ReportViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 196F0F3C1D339D8C0047300A /* ReportViewController.xib */; };
19D76A881D265A1B006245D6 /* TZAssetCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D76A761D265A1B006245D6 /* TZAssetCell.m */; }; 19D76A881D265A1B006245D6 /* TZAssetCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D76A761D265A1B006245D6 /* TZAssetCell.m */; };
19D76A891D265A1B006245D6 /* TZAssetModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D76A781D265A1B006245D6 /* TZAssetModel.m */; }; 19D76A891D265A1B006245D6 /* TZAssetModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D76A781D265A1B006245D6 /* TZAssetModel.m */; };
19D76A8A1D265A1B006245D6 /* TZImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D76A7A1D265A1B006245D6 /* TZImageManager.m */; }; 19D76A8A1D265A1B006245D6 /* TZImageManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 19D76A7A1D265A1B006245D6 /* TZImageManager.m */; };
...@@ -779,6 +781,9 @@ ...@@ -779,6 +781,9 @@
1912FCE71CCDF20F004CF976 /* SalesInputCommitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SalesInputCommitView.m; sourceTree = "<group>"; }; 1912FCE71CCDF20F004CF976 /* SalesInputCommitView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SalesInputCommitView.m; sourceTree = "<group>"; };
1912FCF21CCF1493004CF976 /* ChooseProjectTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseProjectTableViewController.h; sourceTree = "<group>"; }; 1912FCF21CCF1493004CF976 /* ChooseProjectTableViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ChooseProjectTableViewController.h; sourceTree = "<group>"; };
1912FCF31CCF1493004CF976 /* ChooseProjectTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseProjectTableViewController.m; sourceTree = "<group>"; }; 1912FCF31CCF1493004CF976 /* ChooseProjectTableViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ChooseProjectTableViewController.m; sourceTree = "<group>"; };
196F0F3A1D339D8C0047300A /* ReportViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ReportViewController.h; sourceTree = "<group>"; };
196F0F3B1D339D8C0047300A /* ReportViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ReportViewController.m; sourceTree = "<group>"; };
196F0F3C1D339D8C0047300A /* ReportViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = ReportViewController.xib; sourceTree = "<group>"; };
19D76A751D265A1B006245D6 /* TZAssetCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZAssetCell.h; sourceTree = "<group>"; }; 19D76A751D265A1B006245D6 /* TZAssetCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZAssetCell.h; sourceTree = "<group>"; };
19D76A761D265A1B006245D6 /* TZAssetCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZAssetCell.m; sourceTree = "<group>"; }; 19D76A761D265A1B006245D6 /* TZAssetCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TZAssetCell.m; sourceTree = "<group>"; };
19D76A771D265A1B006245D6 /* TZAssetModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZAssetModel.h; sourceTree = "<group>"; }; 19D76A771D265A1B006245D6 /* TZAssetModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TZAssetModel.h; sourceTree = "<group>"; };
...@@ -2103,6 +2108,33 @@ ...@@ -2103,6 +2108,33 @@
path = View; path = View;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
196F0F391D339D140047300A /* report(报表) */ = {
isa = PBXGroup;
children = (
196F0F3A1D339D8C0047300A /* ReportViewController.h */,
196F0F3B1D339D8C0047300A /* ReportViewController.m */,
196F0F3C1D339D8C0047300A /* ReportViewController.xib */,
196F0F3F1D339DB60047300A /* Model */,
196F0F401D339DB60047300A /* Views */,
);
name = "report(报表)";
path = report;
sourceTree = "<group>";
};
196F0F3F1D339DB60047300A /* Model */ = {
isa = PBXGroup;
children = (
);
path = Model;
sourceTree = "<group>";
};
196F0F401D339DB60047300A /* Views */ = {
isa = PBXGroup;
children = (
);
path = Views;
sourceTree = "<group>";
};
19D76A741D265A1B006245D6 /* TZImagePickerController */ = { 19D76A741D265A1B006245D6 /* TZImagePickerController */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -2924,6 +2956,7 @@ ...@@ -2924,6 +2956,7 @@
C1D58B3D1BB1BC9200D297FE /* templates */ = { C1D58B3D1BB1BC9200D297FE /* templates */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
196F0F391D339D140047300A /* report(报表) */,
19000E731CC6215000DF8D71 /* salesInput(销售录入) */, 19000E731CC6215000DF8D71 /* salesInput(销售录入) */,
C1A069FB1BE1046B0082006F /* affairs */, C1A069FB1BE1046B0082006F /* affairs */,
C18A95231C01E7B100429BF7 /* announcement */, C18A95231C01E7B100429BF7 /* announcement */,
...@@ -4503,6 +4536,7 @@ ...@@ -4503,6 +4536,7 @@
C11786421C0B3A5900DB7E4B /* confirmed@2x.png in Resources */, C11786421C0B3A5900DB7E4B /* confirmed@2x.png in Resources */,
C1CF9F521BEFB1530033C35E /* PriorityTagGrey.png in Resources */, C1CF9F521BEFB1530033C35E /* PriorityTagGrey.png in Resources */,
C10F18571BF8AAC90065F18C /* Localizable.strings in Resources */, C10F18571BF8AAC90065F18C /* Localizable.strings in Resources */,
196F0F3E1D339D8C0047300A /* ReportViewController.xib in Resources */,
C165078C1BB96C2800CB2FC1 /* pwd_icon.png in Resources */, C165078C1BB96C2800CB2FC1 /* pwd_icon.png in Resources */,
C1DED3381BCEC4B40049BB2D /* user_checked@2x.png in Resources */, C1DED3381BCEC4B40049BB2D /* user_checked@2x.png in Resources */,
C19AC88C1C1735E600DE260E /* confirmed@2x.png in Resources */, C19AC88C1C1735E600DE260E /* confirmed@2x.png in Resources */,
...@@ -4806,6 +4840,7 @@ ...@@ -4806,6 +4840,7 @@
C1D598901BB44B2000D297FE /* UILabel+UIDataBinding.m in Sources */, C1D598901BB44B2000D297FE /* UILabel+UIDataBinding.m in Sources */,
C1D598761BB44B2000D297FE /* UICheck+BeeUIStyle.m in Sources */, C1D598761BB44B2000D297FE /* UICheck+BeeUIStyle.m in Sources */,
C1D5994A1BB44B2100D297FE /* NSObject+BeeTimer.mm in Sources */, C1D5994A1BB44B2100D297FE /* NSObject+BeeTimer.mm in Sources */,
196F0F3D1D339D8C0047300A /* ReportViewController.m in Sources */,
C10F18361BF7ACA80065F18C /* IBTTableViewInfo.m in Sources */, C10F18361BF7ACA80065F18C /* IBTTableViewInfo.m in Sources */,
C1D599051BB44B2000D297FE /* BeeViewModel+BeeUISignal.m in Sources */, C1D599051BB44B2000D297FE /* BeeViewModel+BeeUISignal.m in Sources */,
C1D598861BB44B2000D297FE /* Bee_UIAnimation.m in Sources */, C1D598861BB44B2000D297FE /* Bee_UIAnimation.m in Sources */,
......
{
"images" : [
{
"idiom" : "universal",
"filename" : "tabbar_report_checked_red.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "tabbar_report_checked_red@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
{
"images" : [
{
"idiom" : "universal",
"filename" : "tabbar_report_uncheck.png",
"scale" : "1x"
},
{
"idiom" : "universal",
"filename" : "tabbar_report_uncheck@2x.png",
"scale" : "2x"
},
{
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"version" : 1,
"author" : "xcode"
}
}
\ No newline at end of file
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
#import "ICRSystemViewController.h" #import "ICRSystemViewController.h"
#import "VankeTenantTabBoard_iPhone.h" #import "VankeTenantTabBoard_iPhone.h"
#import "ICRModifyPwdViewController.h" #import "ICRModifyPwdViewController.h"
#import "ReportViewController.h"
#pragma mark - #pragma mark -
@interface VankeAppBoard_iPhone () @interface VankeAppBoard_iPhone ()
...@@ -56,6 +56,7 @@ ON_CREATE_VIEWS( signal ) ...@@ -56,6 +56,7 @@ ON_CREATE_VIEWS( signal )
[_router map:@"home" toClass:[VankeMainBoard_iPhone class]]; [_router map:@"home" toClass:[VankeMainBoard_iPhone class]];
[_router map:@"affairs" toClass:[VankeAffairsBoard_iPhone class]]; [_router map:@"affairs" toClass:[VankeAffairsBoard_iPhone class]];
[_router map:@"me" toClass:[ICRSystemViewController class]]; [_router map:@"me" toClass:[ICRSystemViewController class]];
[_router map:@"report" toClass:[ReportViewController class]];
[self.view addSubview:_router.view]; [self.view addSubview:_router.view];
[self createAndShowLoginWindow]; [self createAndShowLoginWindow];
...@@ -175,12 +176,20 @@ ON_SIGNAL3( VankeMainTabBoard_iPhone, affairs, signal ) ...@@ -175,12 +176,20 @@ ON_SIGNAL3( VankeMainTabBoard_iPhone, affairs, signal )
[_mainTabbar selectAffairs]; [_mainTabbar selectAffairs];
} }
ON_SIGNAL3( VankeMainTabBoard_iPhone, report, signal )
{
[_router open:@"report" animated:YES];
[_mainTabbar selectReport];
}
ON_SIGNAL3( VankeMainTabBoard_iPhone, me, signal ) ON_SIGNAL3( VankeMainTabBoard_iPhone, me, signal )
{ {
[_router open:@"me" animated:YES]; [_router open:@"me" animated:YES];
[_mainTabbar selectMe]; [_mainTabbar selectMe];
} }
//商户用户
ON_SIGNAL3( VankeTenantTabBoard_iPhone, affairs, signal ) ON_SIGNAL3( VankeTenantTabBoard_iPhone, affairs, signal )
{ {
[_router open:@"affairs" animated:YES]; [_router open:@"affairs" animated:YES];
......
...@@ -6,17 +6,20 @@ ...@@ -6,17 +6,20 @@
extern NSString *const MAIN_TAB_NAME_HOME; // home extern NSString *const MAIN_TAB_NAME_HOME; // home
extern NSString *const MAIN_TAB_NAME_AFFAIRS; // affairs extern NSString *const MAIN_TAB_NAME_AFFAIRS; // affairs
extern NSString *const MAIN_TAB_NAME_REPORT; // report
extern NSString *const MAIN_TAB_NAME_ME; // me extern NSString *const MAIN_TAB_NAME_ME; // me
@interface VankeMainTabBoard_iPhone : BeeUICell @interface VankeMainTabBoard_iPhone : BeeUICell
AS_OUTLET( BeeUIButton, home ); AS_OUTLET( BeeUIButton, home );
AS_OUTLET( BeeUIButton, affairs ); AS_OUTLET( BeeUIButton, affairs );
AS_OUTLET( BeeUIButton, report );
AS_OUTLET( BeeUIButton, me ); AS_OUTLET( BeeUIButton, me );
- (void)selectHome; - (void)selectHome;
- (void)selectAffairs; - (void)selectAffairs;
- (void)selectMe; - (void)selectMe;
- (void)selectReport;
-(NSString*) showAndSelectFirst; -(NSString*) showAndSelectFirst;
-(void) hideTab: (NSString*) tabName visible: (BOOL) visible; -(void) hideTab: (NSString*) tabName visible: (BOOL) visible;
......
...@@ -5,8 +5,10 @@ ...@@ -5,8 +5,10 @@
NSString *const MAIN_TAB_NAME_HOME = @"home"; // home NSString *const MAIN_TAB_NAME_HOME = @"home"; // home
NSString *const MAIN_TAB_NAME_AFFAIRS = @"affairs"; // affairs NSString *const MAIN_TAB_NAME_AFFAIRS = @"affairs"; // affairs
NSString *const MAIN_TAB_NAME_REPORT = @"report"; // me
NSString *const MAIN_TAB_NAME_ME = @"me"; // me NSString *const MAIN_TAB_NAME_ME = @"me"; // me
#pragma mark - #pragma mark -
@interface VankeMainTabBoard_iPhone() @interface VankeMainTabBoard_iPhone()
...@@ -23,6 +25,7 @@ SUPPORT_AUTOMATIC_LAYOUT(YES) ...@@ -23,6 +25,7 @@ SUPPORT_AUTOMATIC_LAYOUT(YES)
DEF_OUTLET( BeeUIButton, home ); DEF_OUTLET( BeeUIButton, home );
DEF_OUTLET( BeeUIButton, affairs ); DEF_OUTLET( BeeUIButton, affairs );
DEF_OUTLET( BeeUIButton, me ); DEF_OUTLET( BeeUIButton, me );
DEF_OUTLET( BeeUIButton, report );
- (void)load - (void)load
{ {
...@@ -47,6 +50,11 @@ DEF_OUTLET( BeeUIButton, me ); ...@@ -47,6 +50,11 @@ DEF_OUTLET( BeeUIButton, me );
[self addActiveClass:$(self.affairs) relayout:YES]; [self addActiveClass:$(self.affairs) relayout:YES];
} }
- (void)selectReport {
[self removeActiveClass];
[self addActiveClass:$(self.report) relayout:YES];
}
- (void)selectMe - (void)selectMe
{ {
[self removeActiveClass]; [self removeActiveClass];
...@@ -57,8 +65,10 @@ DEF_OUTLET( BeeUIButton, me ); ...@@ -57,8 +65,10 @@ DEF_OUTLET( BeeUIButton, me );
$(self.home).REMOVE_CLASS( @"active" ); $(self.home).REMOVE_CLASS( @"active" );
$(self.affairs).REMOVE_CLASS( @"active" ); $(self.affairs).REMOVE_CLASS( @"active" );
$(self.me).REMOVE_CLASS( @"active" ); $(self.me).REMOVE_CLASS( @"active" );
$(self.report).REMOVE_CLASS( @"active" );
} }
- (void) addActiveClass: (BeeUIQuery*) activeItem relayout: (BOOL) relayout { - (void) addActiveClass: (BeeUIQuery*) activeItem relayout: (BOOL) relayout {
activeItem.ADD_CLASS( @"active" ); activeItem.ADD_CLASS( @"active" );
if (relayout) { if (relayout) {
...@@ -66,13 +76,16 @@ DEF_OUTLET( BeeUIButton, me ); ...@@ -66,13 +76,16 @@ DEF_OUTLET( BeeUIButton, me );
} }
} }
-(NSString*) showAndSelectFirst { - (NSString *) showAndSelectFirst {
if ([self.home visible]) { if ([self.home visible]) {
[self selectHome]; [self selectHome];
return MAIN_TAB_NAME_HOME; return MAIN_TAB_NAME_HOME;
} else if ([self.affairs visible]) { } else if ([self.affairs visible]) {
[self selectAffairs]; [self selectAffairs];
return MAIN_TAB_NAME_AFFAIRS; return MAIN_TAB_NAME_AFFAIRS;
} else if ([self.report visible]) {
[self selectMe];
return MAIN_TAB_NAME_REPORT;
} else { } else {
[self selectMe]; [self selectMe];
return MAIN_TAB_NAME_ME; return MAIN_TAB_NAME_ME;
...@@ -102,4 +115,9 @@ ON_SIGNAL3( VankeMainTabBoard_iPhone, me, signal ) ...@@ -102,4 +115,9 @@ ON_SIGNAL3( VankeMainTabBoard_iPhone, me, signal )
[self selectMe]; [self selectMe];
} }
ON_SIGNAL3( VankeMainTabBoard_iPhone, report, signal )
{
[self selectReport];
}
@end @end
...@@ -13,6 +13,10 @@ ...@@ -13,6 +13,10 @@
<button id="affairs" class="icon" /> <button id="affairs" class="icon" />
</linear> </linear>
<linear orientation="v" class="item">
<button id="report" class="icon" />
</linear>
<linear orientation="v" class="item"> <linear orientation="v" class="item">
<button id="me" class="icon" /> <button id="me" class="icon" />
</linear> </linear>
...@@ -34,7 +38,7 @@ ...@@ -34,7 +38,7 @@
} }
.item { .item {
width: 33.3%; width: 25%;
height: 100%; height: 100%;
color: gray; color: gray;
font-size: 13px; font-size: 13px;
...@@ -63,6 +67,14 @@ ...@@ -63,6 +67,14 @@
image-src: url(business_checked.png); image-src: url(business_checked.png);
} }
#report {
image-src: url(tabbar_report_uncheck.png);
}
#report.active {
image-src: url(tabbar_report_checked_red.png);
}
#me { #me {
image-src: url(user.png); image-src: url(user.png);
} }
......
//
// ReportViewController.h
// vanke
//
// Created by Z on 16/7/11.
// Copyright © 2016年 gomore. All rights reserved.
//
#import <UIKit/UIKit.h>
#import "ICRBaseViewController.h"
@interface ReportViewController : ICRBaseViewController
@end
//
// ReportViewController.m
// vanke
//
// Created by Z on 16/7/11.
// Copyright © 2016年 gomore. All rights reserved.
//
#import "ReportViewController.h"
#import "UIColor+Helper.h"
@interface ReportViewController ()
@end
@implementation ReportViewController
ON_CREATE_VIEWS( signal )
{
self.navigationBarShown = YES;
self.navigationBarTitle = @"报表";
self.navigationBarLeft = nil;
UIColor *color = [UIColor colorWithR:63 g:134 b:244 a:1];
if ( IOS7_OR_LATER ) {
self.navigationController.navigationBar.barTintColor = color;
} else {
self.navigationController.navigationBar.tintColor = color;
}
}
- (void)viewDidLoad {
[super viewDidLoad];
// Do any additional setup after loading the view from its nib.
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
}
/*
#pragma mark - Navigation
// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
// Get the new view controller using [segue destinationViewController].
// Pass the selected object to the new view controller.
}
*/
@end
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="6211" systemVersion="14A298i" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="6204"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="ReportViewController">
<connections>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections>
</placeholder>
<placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
<view clearsContextBeforeDrawing="NO" contentMode="scaleToFill" id="i5M-Pr-FkT">
<rect key="frame" x="0.0" y="0.0" width="600" height="600"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
</view>
</objects>
</document>
...@@ -10,5 +10,5 @@ ...@@ -10,5 +10,5 @@
#import "VankeShopModel.h" #import "VankeShopModel.h"
@interface HistoryViewController : UIViewController @interface HistoryViewController : UIViewController
@property (nonatomic, strong) VankeShopModel *shop; @property (nonatomic, strong) VankeShopModel *shop;
@property (nonatomic, copy) void (^historyBlock)(void);
@end @end
...@@ -34,23 +34,14 @@ ...@@ -34,23 +34,14 @@
self.title = @"历史"; self.title = @"历史";
self.titles = @[@"日期",@"金额(元)",@"现金",@"刷卡",@"优惠券"]; self.titles = @[@"日期",@"金额(元)",@"现金",@"刷卡",@"优惠券"];
self.bottomTitles = @[@"总计",@"18800",@"1880",@"998",@"300"]; self.bottomTitles = @[@"总计",@"18800",@"1880",@"998",@"300"];
self.view.backgroundColor = [UIColor whiteColor]; self.view.backgroundColor = [UIColor whiteColor];
[self setUpTopView]; [self setUpTopView];
[self setUPScrollView]; [self setUPScrollView];
[self setUpData]; [self setUpData];
// Do any additional setup after loading the view. // Do any additional setup after loading the view.
} }
- (void)chooseShopAction {
ChooseShopViewController *chooseVC = [[ChooseShopViewController alloc] init];
chooseVC.chooseBlock = ^(VankeShopModel *shop){
self.shop = shop;
[self setUpData];
};
[self.navigationController pushViewController:chooseVC animated:YES];
}
- (void)viewWillAppear:(BOOL)animated { - (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated]; [super viewWillAppear:animated];
...@@ -63,6 +54,21 @@ ...@@ -63,6 +54,21 @@
} }
} }
- (void)dealloc {
}
- (void)chooseShopAction {
ChooseShopViewController *chooseVC = [[ChooseShopViewController alloc] init];
WS(weakSelf);
chooseVC.chooseBlock = ^(VankeShopModel *shop){
weakSelf.shop = shop;
[weakSelf setUpData];
};
[self.navigationController pushViewController:chooseVC animated:YES];
}
- (void)setUPScrollView { - (void)setUPScrollView {
self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 150, SCREEN_WIDTH, SCREEN_HEIGHT - 150 - 64)]; self.scrollView = [[UIScrollView alloc] initWithFrame:CGRectMake(0, 150, SCREEN_WIDTH, SCREEN_HEIGHT - 150 - 64)];
self.scrollView.bounces = NO; self.scrollView.bounces = NO;
...@@ -162,9 +168,7 @@ ...@@ -162,9 +168,7 @@
[topView.buttonEndDate addTarget:self action:@selector(endDateAction) forControlEvents:UIControlEventTouchUpInside]; [topView.buttonEndDate addTarget:self action:@selector(endDateAction) forControlEvents:UIControlEventTouchUpInside];
[self.topView.buttonQuery addTarget:self action:@selector(queryAction) forControlEvents:UIControlEventTouchUpInside]; [self.topView.buttonQuery addTarget:self action:@selector(queryAction) forControlEvents:UIControlEventTouchUpInside];
[self setUpDatePicker]; [self setUpDatePicker];
[self.view addSubview:topView]; [self.view addSubview:topView];
} }
...@@ -211,8 +215,6 @@ ...@@ -211,8 +215,6 @@
} }
} }
- (void)startDateAction { - (void)startDateAction {
NSLog(@"start"); NSLog(@"start");
[self.topView startDateBecomeFistRespond]; [self.topView startDateBecomeFistRespond];
...@@ -238,7 +240,6 @@ ...@@ -238,7 +240,6 @@
}else{ }else{
WS(weakSelf) WS(weakSelf)
NSDateFormatter *f = [[NSDateFormatter alloc] init]; NSDateFormatter *f = [[NSDateFormatter alloc] init];
[f setDateFormat:@"yyyy-MM-dd"]; [f setDateFormat:@"yyyy-MM-dd"];
......
...@@ -273,6 +273,9 @@ ON_WILL_APPEAR( signal ) ...@@ -273,6 +273,9 @@ ON_WILL_APPEAR( signal )
self.shop = shop; self.shop = shop;
[self.topView setShopName:shop.name]; [self.topView setShopName:shop.name];
[self setUpData]; [self setUpData];
[self.cellDataDic removeAllObjects];
self.arrPics = nil;
[self.selectedAssets removeAllObjects];
[self getTodayTotalAmount]; [self getTodayTotalAmount];
}; };
...@@ -298,7 +301,7 @@ ON_WILL_APPEAR( signal ) ...@@ -298,7 +301,7 @@ ON_WILL_APPEAR( signal )
}else{ }else{
[self.cellDataDic removeAllObjects];
[self.tableView reloadData]; [self.tableView reloadData];
WS(weakSelf) WS(weakSelf)
...@@ -375,7 +378,13 @@ ON_WILL_APPEAR( signal ) ...@@ -375,7 +378,13 @@ ON_WILL_APPEAR( signal )
- (void)goToHistory { - (void)goToHistory {
HistoryViewController *history = [[HistoryViewController alloc] init]; HistoryViewController *history = [[HistoryViewController alloc] init];
history.shop = self.shop; history.shop = self.shop;
history.historyBlock = ^(){
[self.arrPics removeAllObjects];
[self.selectedAssets removeAllObjects];
[self.cellDataDic removeAllObjects];
[self.tableView reloadData];
};
[self.navigationController pushViewController:history animated:YES]; [self.navigationController pushViewController:history animated:YES];
} }
......
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