Commit 1d0eefbc authored by Sandy's avatar Sandy

修改相关bug

parent a1d71048
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.3</string>
<string>1.4.6</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
vanke/view_iPhone/resource/img/business.png

1.54 KB | W: | H:

vanke/view_iPhone/resource/img/business.png

2.96 KB | W: | H:

vanke/view_iPhone/resource/img/business.png
vanke/view_iPhone/resource/img/business.png
vanke/view_iPhone/resource/img/business.png
vanke/view_iPhone/resource/img/business.png
  • 2-up
  • Swipe
  • Onion skin
vanke/view_iPhone/resource/img/business@2x.png

1.98 KB | W: | H:

vanke/view_iPhone/resource/img/business@2x.png

5.12 KB | W: | H:

vanke/view_iPhone/resource/img/business@2x.png
vanke/view_iPhone/resource/img/business@2x.png
vanke/view_iPhone/resource/img/business@2x.png
vanke/view_iPhone/resource/img/business@2x.png
  • 2-up
  • Swipe
  • Onion skin
vanke/view_iPhone/resource/img/business_checked.png

1.46 KB | W: | H:

vanke/view_iPhone/resource/img/business_checked.png

2.95 KB | W: | H:

vanke/view_iPhone/resource/img/business_checked.png
vanke/view_iPhone/resource/img/business_checked.png
vanke/view_iPhone/resource/img/business_checked.png
vanke/view_iPhone/resource/img/business_checked.png
  • 2-up
  • Swipe
  • Onion skin
vanke/view_iPhone/resource/img/business_checked@2x.png

1.88 KB | W: | H:

vanke/view_iPhone/resource/img/business_checked@2x.png

4.96 KB | W: | H:

vanke/view_iPhone/resource/img/business_checked@2x.png
vanke/view_iPhone/resource/img/business_checked@2x.png
vanke/view_iPhone/resource/img/business_checked@2x.png
vanke/view_iPhone/resource/img/business_checked@2x.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -59,7 +59,7 @@ DEF_OUTLET( BeeUIButton, btnServiceApply )
ON_CREATE_VIEWS( signal )
{
self.navigationBarShown = YES;
self.navigationBarTitle = @"务";
self.navigationBarTitle = @"务";
}
ON_DELETE_VIEWS( signal )
......@@ -72,7 +72,7 @@ ON_LAYOUT_VIEWS( signal )
ON_WILL_APPEAR( signal )
{
self.navigationController.navigationBar.backgroundImage = [UIImage imageWithColor:[UIColor colorWithRed:0.929 green:0.106 blue:0.137 alpha:1.000]];
self.navigationController.navigationBar.backgroundImage = [UIImage imageWithColor:[UIColor colorWithR:63 g:134 b:244 a:1]];
UIColor *color = [VankeUtil rgbStringToColor: @"237,27,35"];
if ( IOS7_OR_LATER ) {
self.navigationController.navigationBar.barTintColor = color;
......
......@@ -62,7 +62,7 @@ DEF_OUTLET( VankeServiceBoardCell_iPhone, complaint );
[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 numberWithInt:0]];
[self.complaint loadDefaults:@"complaint.png" title:@"WIFI登录数" bgColor:[UIColor colorWithRed:252/255.0 green:67/255.0 blue:62/255.0 alpha:1] unit:@"次" defValue:[NSNumber numberWithInt:0]];
[self.complaint loadDefaults:@"complaint.png" title:@"收缴率" bgColor:[UIColor colorWithRed:252/255.0 green:67/255.0 blue:62/255.0 alpha:1] unit:@"次" defValue:[NSNumber numberWithInt:0]];
}
- (void)unload
......
......@@ -111,7 +111,7 @@
UILabel *raLabel = [[UILabel alloc]initWithFrame:CGRectMake(self.rateLabel.left, self.lastWeekLabel.bottom,bottomWidth,20)];
raLabel.textColor = [UIColor lightGrayColor];
raLabel.text = @"坪效";
raLabel.text = @"日均坪效";
raLabel.font = GXF_THREETEENTH_SIZE;
raLabel.textAlignment = NSTextAlignmentCenter;
[self addSubview:raLabel];
......
......@@ -71,7 +71,7 @@
self.bszLabel = bszLabel;
rect = CGRectMake(bszLabel.right , 0, width, Sale_Header_Height);
UILabel * sclLabel = [IBTCommon labelWithTitle:@"坪效" frame:rect textFont:self.textFont];
UILabel * sclLabel = [IBTCommon labelWithTitle:@"日均坪效" frame:rect textFont:self.textFont];
sclLabel.textColor = ReportTitleColor;
sclLabel.textAlignment = NSTextAlignmentCenter;
[self.contentView addSubview:sclLabel];
......
......@@ -26,6 +26,8 @@
@property (nonatomic, strong) HistoryTopView *topView;
@property (nonatomic, strong) NSArray *arrRecords;
@property (nonatomic, strong) UIImageView *imageNoData;
@end
@implementation HistoryViewController
......@@ -33,7 +35,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.automaticallyAdjustsScrollViewInsets = NO;
self.title = @"历史";
self.title = @"历史查询";
self.titles = @[@"日期",@"金额(元)",@"现金",@"刷卡",@"优惠券"];
self.bottomTitles = @[@"总计",@"18800",@"1880",@"998",@"300"];
......@@ -58,10 +60,12 @@
- (UIImageView *)imageNoData {
if (!_imageNoData) {
_imageNoData = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 300, 300)];
_imageNoData = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, 150, 150)];
_imageNoData.center = self.view.center;
_imageNoData.centerY = self.view.centerY + 10;
_imageNoData.contentMode = UIViewContentModeScaleToFill;
_imageNoData.image = [UIImage imageNamed:@"no_data@3x"];
[self.view addSubview:_imageNoData];
}
return _imageNoData;
}
......@@ -89,6 +93,11 @@
[self.scrollView removeAllSubviews];
self.scrollView.contentOffset = CGPointMake(0, 0);
self.scrollView.contentSize = CGSizeMake(kListWidth * array.count, kListHeight * [array[0] count] + kBottomHeight);
if ([array[0] count] <= 1 ) {
self.imageNoData.hidden = NO;
}else{
self.imageNoData.hidden = YES;
}
//双层for循环,i待代表列数,j代表行数
for (int i = 0; i < array.count; i++) {
for (int j = 1; j < [array[i] count]; j++) {
......@@ -376,6 +385,8 @@
}
- (void)didReceiveMemoryWarning {
[super didReceiveMemoryWarning];
// Dispose of any resources that can be recreated.
......
......@@ -17,9 +17,17 @@
<color key="textColor" red="0.95294117647058818" green="0.4392156862745098" blue="0.062745098039215685" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="(上传当日结账单)" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vpg-la-m3a">
<rect key="frame" x="92" y="25" width="108" height="15"/>
<fontDescription key="fontDescription" type="system" pointSize="12"/>
<color key="textColor" red="0.95294117649999999" green="0.43921568630000002" blue="0.062745098040000002" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<color key="backgroundColor" white="1" alpha="1" colorSpace="custom" customColorSpace="calibratedWhite"/>
<constraints>
<constraint firstItem="vpg-la-m3a" firstAttribute="leading" secondItem="vKU-7C-kxt" secondAttribute="trailing" id="7Jj-2D-F1S"/>
<constraint firstItem="vpg-la-m3a" firstAttribute="bottom" secondItem="vKU-7C-kxt" secondAttribute="bottom" id="DGp-I0-1rs"/>
<constraint firstItem="vKU-7C-kxt" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="YAe-pd-3B6"/>
<constraint firstItem="vKU-7C-kxt" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="16" id="eCl-UR-pSr"/>
</constraints>
......
......@@ -12,6 +12,7 @@
#import "SRMonthPicker.h"
#import "UIScrollView+EmptyDataSet.h"
#import "CalculateHelper.h"
#import "StatementDetailItems.h"
@interface StatementDetailViewController ()<UITableViewDelegate, UITableViewDataSource,SRMonthPickerDelegate, UITextFieldDelegate, DZNEmptyDataSetDelegate, DZNEmptyDataSetSource>
@property (weak, nonatomic) IBOutlet UITableView *tableView;
@property (nonatomic, strong) StatementDetailModel *detailModel;
......@@ -35,6 +36,10 @@
@property (weak, nonatomic) IBOutlet UITextField *textFieldEnd;
/** 缴款率 */
@property (weak, nonatomic) IBOutlet UILabel *labelPaidRate;
@property (weak, nonatomic) IBOutlet UIButton *btnIsShowClear;
@property (nonatomic, strong) NSMutableArray *arrUnClear;
@end
......@@ -43,6 +48,7 @@
- (void)viewDidLoad {
[super viewDidLoad];
self.btnIsShowClear.selected = YES;
self.title = self.record.shopName;
NSDate *selectStart = [self getDateFromString:self.startDate];
NSDate *selectEnd = [self getDateFromString:self.endDate];
......@@ -55,6 +61,12 @@
self.tableView.tableFooterView = [UIView new];
[self setUpDatePicker];
[self setUpData];
for (StatementDetailItems *items in self.detailModel.items) {
if (items.unpaid != 0) {
[self.arrUnClear addObject:items];
}
}
}
......@@ -111,7 +123,16 @@
//缴款率
NSString *paidRate = [CalculateHelper getPercent:[NSNumber numberWithDouble:weakSelf.detailModel.paid] num:[NSNumber numberWithDouble:weakSelf.detailModel.amount]];
weakSelf.labelPaidRate.text = paidRate;
[self.arrUnClear removeAllObjects];
for (StatementDetailItems *items in weakSelf.detailModel.items) {
if (items.unpaid != 0) {
[self.arrUnClear addObject:items];
}
}
[weakSelf.tableView reloadData];
[weakSelf calculateTop];
[hud hide:YES];
CLog(@"%@", dic.JSONString);
} failure:^(id data) {
......@@ -119,6 +140,36 @@
}];
}
/** 计算顶部 */
- (void)calculateTop {
NSDecimalNumber *totalPaid = nil;
NSDecimalNumber *totalUpPaid = nil;
NSDecimalNumber *totalAmount = nil;
if(!self.btnIsShowClear.isSelected){
for (int i = 0; i < self.arrUnClear.count; i++) {
StatementRecords *record = self.arrUnClear[i];
totalPaid = [CalculateHelper calculateNum1:totalPaid num2:[NSNumber numberWithDouble:record.paid] type:CalculateTypeAdd];
totalUpPaid = [CalculateHelper calculateNum1:totalUpPaid num2:[NSNumber numberWithDouble:record.unpaid] type:CalculateTypeAdd];
totalAmount = [CalculateHelper calculateNum1:totalAmount num2:[NSNumber numberWithDouble:record.amount] type:CalculateTypeAdd];
}
}else{
self.labelShoudPay.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.amount]];
self.labelPaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.paid]];
self.labelUnpaid.text = [CalculateHelper getMoneyStringFrom:[NSNumber numberWithDouble:self.detailModel.unpaid]];
self.labelPaidRate.text = [CalculateHelper getPercent:[NSNumber numberWithDouble:self.detailModel.paid] num:[NSNumber numberWithDouble:self.detailModel.amount]];
return;
}
self.labelShoudPay.text = [CalculateHelper getMoneyStringFrom:totalAmount];
self.labelPaid.text = [CalculateHelper getMoneyStringFrom:totalPaid];
self.labelUnpaid.text = [CalculateHelper getMoneyStringFrom:totalUpPaid];
self.labelPaidRate.text = [CalculateHelper getPercent:totalPaid num:totalAmount];
}
#pragma mark - tableView DataSource
- (CGFloat)tableView:(UITableView *)tableView estimatedHeightForRowAtIndexPath:(NSIndexPath *)indexPath {
......@@ -126,12 +177,17 @@
}
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return self.detailModel.items.count;
if (self.btnIsShowClear.isSelected) {
return self.detailModel.items.count;
}else{
return self.arrUnClear.count;
}
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
StatementDetailCell *cell = [tableView dequeueReusableCellWithIdentifier:@"StatementDetailCell" forIndexPath:indexPath];
[cell setUpCellWithModelArray:self.detailModel.items index:indexPath];
[cell setUpCellWithModelArray:self.btnIsShowClear.isSelected ? self.detailModel.items : self.arrUnClear index:indexPath];
return cell;
}
......@@ -141,6 +197,11 @@
return [f dateFromString:string];
}
- (IBAction)actionClear:(UIButton *)sender {
sender.selected = !sender.isSelected;
[self.tableView reloadData];
[self calculateTop];
}
#pragma mark - empty state
- (UIImage *)imageForEmptyDataSet:(UIScrollView *)scrollView {
return [UIImage imageNamed:@"no_data"];
......@@ -162,7 +223,12 @@
- (CGFloat)verticalOffsetForEmptyDataSet:(UIScrollView *)scrollView {
return -100;
}
- (NSMutableArray *)arrUnClear {
if (!_arrUnClear) {
_arrUnClear = [NSMutableArray array];
}
return _arrUnClear;
}
#pragma mark - textfield delegate
- (void)textFieldDidEndEditing:(UITextField *)textField {
[self setUpData];
......
......@@ -62,12 +62,13 @@
- (void)viewDidLoad {
[super viewDidLoad];
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
self.btnIsClear.selected = YES;
[self setDefaults];
[self setUpDatePicker];
self.paramModel = [[StatementListParamModel alloc] init];
self.title = @"商铺对账单";
self.tableView.estimatedRowHeight = 90;
self.tableView.emptyDataSetSource = self;
self.tableView.emptyDataSetDelegate = self;
self.tableView.tableFooterView = [UIView new];
......@@ -254,9 +255,9 @@
return cell;
}
- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
return 90;
}
//- (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath {
// return 90;
//}
- (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath {
StatementDetailViewController *detailVC = [self controllerWithIdentifier:@"StatementDetailViewController"];
......
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