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>
......
......@@ -21,15 +21,15 @@
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="8bJ-rv-ZUZ" userLabel="顶部">
<rect key="frame" x="0.0" y="20" width="375" height="135"/>
<subviews>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="ql4-b1-gim">
<rect key="frame" x="188" y="0.0" width="1" height="135"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ql4-b1-gim">
<rect key="frame" x="187" y="0.0" width="1" height="135"/>
<color key="backgroundColor" white="0.66666666669999997" alpha="0.47067307689999999" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="width" constant="1" id="Rjf-MX-TGa"/>
</constraints>
</view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Xeh-VE-GvH">
<rect key="frame" x="0.0" y="0.0" width="188" height="135"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Xeh-VE-GvH">
<rect key="frame" x="0.0" y="0.0" width="187" height="135"/>
<subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2016" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="v9Q-me-Myt">
<rect key="frame" x="36" y="33" width="50" height="27"/>
......@@ -62,8 +62,8 @@
<constraint firstAttribute="height" constant="16" id="Tv2-mN-fGt"/>
</constraints>
</imageView>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="zvp-Uj-Jhu">
<rect key="frame" x="9" y="9" width="170" height="52"/>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="zvp-Uj-Jhu">
<rect key="frame" x="9" y="9" width="169" height="52"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<color key="textColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
<fontDescription key="fontDescription" type="system" pointSize="1"/>
......@@ -109,8 +109,8 @@
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" misplaced="YES" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wJ9-Lt-hSf">
<rect key="frame" x="9" y="67" width="170" height="32"/>
<textField opaque="NO" clipsSubviews="YES" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="wJ9-Lt-hSf">
<rect key="frame" x="9" y="67" width="169" height="32"/>
<color key="tintColor" white="0.0" alpha="0.0" colorSpace="calibratedWhite"/>
<constraints>
<constraint firstAttribute="height" constant="32" id="eYL-d0-Lg3"/>
......@@ -122,12 +122,6 @@
<outlet property="delegate" destination="8Fg-8B-jG3" id="5y6-JT-Zva"/>
</connections>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="从" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yt5-RT-vjB">
<rect key="frame" x="15" y="39" width="17" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" 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="Z3W-Lo-d6V">
<rect key="frame" x="15" y="75" width="17" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
......@@ -146,6 +140,12 @@
<action selector="showSettleShop:" destination="8Fg-8B-jG3" eventType="touchUpInside" id="6wT-nm-YaG"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="从" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Yt5-RT-vjB">
<rect key="frame" x="15" y="39" width="17" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="JTN-Sg-b09" firstAttribute="top" secondItem="sds-5G-EeT" secondAttribute="top" id="0Z3-jq-Eic"/>
......@@ -201,8 +201,8 @@
</mask>
</variation>
</view>
<view contentMode="scaleToFill" misplaced="YES" translatesAutoresizingMaskIntoConstraints="NO" id="Zqy-Jj-Iug">
<rect key="frame" x="189" y="0.0" width="186" height="135"/>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zqy-Jj-Iug">
<rect key="frame" x="188" y="0.0" width="187" height="135"/>
<subviews>
<label hidden="YES" opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="lKf-LH-THs">
<rect key="frame" x="4" y="4" width="2" height="25"/>
......@@ -443,8 +443,8 @@
<color key="textColor" red="0.92941176469999998" green="0.1058823529" blue="0.13725490200000001" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="2322.00" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="om4-cp-cn3">
<rect key="frame" x="78" y="69" width="101" height="20"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="2322.00333333333、" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="om4-cp-cn3">
<rect key="frame" x="78" y="69" width="101" height="39"/>
<fontDescription key="fontDescription" type="system" pointSize="16"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
......@@ -651,11 +651,42 @@
<fontDescription key="fontDescription" type="system" pointSize="1"/>
<textInputTraits key="textInputTraits"/>
</textField>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="显示结清账户" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="090-Kp-lkc">
<rect key="frame" x="36" y="108" width="102" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
<button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="LhB-c5-dxP">
<rect key="frame" x="10" y="110" width="18" height="18"/>
<constraints>
<constraint firstAttribute="width" constant="18" id="6lo-yQ-K8d"/>
<constraint firstAttribute="height" constant="18" id="8HN-Fp-Be6"/>
</constraints>
<state key="normal" image="unchecked_checkbox"/>
<state key="selected" image="checked_checkbox"/>
<connections>
<action selector="actionClear:" destination="isS-9P-6cm" eventType="touchUpInside" id="W24-7b-eRj"/>
</connections>
</button>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="到" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4ff-uR-eya">
<rect key="frame" x="10" y="72" width="17" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" 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="TdR-tY-x9U">
<rect key="frame" x="10" y="27" width="17" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="17"/>
<color key="textColor" red="0.0" green="0.0" blue="0.0" alpha="1" colorSpace="calibratedRGB"/>
<nil key="highlightedColor"/>
</label>
</subviews>
<constraints>
<constraint firstItem="5jO-f7-jHx" firstAttribute="width" secondItem="yqi-ff-dhn" secondAttribute="width" id="5bF-hK-jcB"/>
<constraint firstAttribute="trailing" secondItem="yqi-ff-dhn" secondAttribute="trailing" constant="8" id="8jH-U9-lcm"/>
<constraint firstItem="5jO-f7-jHx" firstAttribute="leading" secondItem="yqi-ff-dhn" secondAttribute="leading" id="99o-em-qtQ"/>
<constraint firstItem="4ff-uR-eya" firstAttribute="leading" secondItem="LhB-c5-dxP" secondAttribute="leading" id="AwN-RX-Evm"/>
<constraint firstItem="eA0-Tq-Ptt" firstAttribute="centerX" secondItem="bl1-LK-uoR" secondAttribute="centerX" id="De3-pA-fk5"/>
<constraint firstItem="T9i-DX-sok" firstAttribute="leading" secondItem="zhK-cM-4OX" secondAttribute="trailing" id="EuG-RJ-aJS"/>
<constraint firstItem="zhK-cM-4OX" firstAttribute="leading" secondItem="eA0-Tq-Ptt" secondAttribute="trailing" id="Jht-bF-zPK"/>
......@@ -663,6 +694,7 @@
<constraint firstItem="8bN-ET-Vi0" firstAttribute="top" secondItem="ocY-mb-v9V" secondAttribute="top" id="MWd-rk-HxC"/>
<constraint firstItem="4Fu-fM-WA5" firstAttribute="centerY" secondItem="bl1-LK-uoR" secondAttribute="centerY" constant="15" id="Mwu-jT-1OG"/>
<constraint firstItem="yqi-ff-dhn" firstAttribute="top" secondItem="bl1-LK-uoR" secondAttribute="top" constant="9" id="OVp-M7-zH8"/>
<constraint firstItem="TdR-tY-x9U" firstAttribute="leading" secondItem="4ff-uR-eya" secondAttribute="leading" id="Oof-WQ-eQ7"/>
<constraint firstItem="eA0-Tq-Ptt" firstAttribute="bottom" secondItem="vIJ-wd-iLE" secondAttribute="bottom" id="RF5-fr-BJH"/>
<constraint firstAttribute="bottom" secondItem="yqi-ff-dhn" secondAttribute="bottom" constant="84" id="SLU-SI-0Jk"/>
<constraint firstItem="ocY-mb-v9V" firstAttribute="bottom" secondItem="jm6-Kw-h6M" secondAttribute="bottom" id="SPh-W9-ZLz"/>
......@@ -671,11 +703,16 @@
<constraint firstItem="691-sk-b04" firstAttribute="centerY" secondItem="4Fu-fM-WA5" secondAttribute="centerY" id="VGS-fD-C1P"/>
<constraint firstItem="ocY-mb-v9V" firstAttribute="leading" secondItem="691-sk-b04" secondAttribute="trailing" id="XE5-cD-Xyq"/>
<constraint firstItem="gB1-Me-OSZ" firstAttribute="top" secondItem="T9i-DX-sok" secondAttribute="top" id="XOt-RS-IeF"/>
<constraint firstItem="4ff-uR-eya" firstAttribute="centerY" secondItem="4Fu-fM-WA5" secondAttribute="centerY" id="Xzk-hy-K38"/>
<constraint firstItem="gB1-Me-OSZ" firstAttribute="leading" secondItem="T9i-DX-sok" secondAttribute="trailing" constant="2" id="Zig-6j-fbc"/>
<constraint firstItem="8bN-ET-Vi0" firstAttribute="leading" secondItem="ocY-mb-v9V" secondAttribute="trailing" constant="2" id="Zvr-bd-4BH"/>
<constraint firstItem="090-Kp-lkc" firstAttribute="centerY" secondItem="LhB-c5-dxP" secondAttribute="centerY" id="gbl-bC-K1a"/>
<constraint firstItem="090-Kp-lkc" firstAttribute="leading" secondItem="LhB-c5-dxP" secondAttribute="trailing" constant="8" id="iVn-D5-kWT"/>
<constraint firstItem="691-sk-b04" firstAttribute="leading" secondItem="jm6-Kw-h6M" secondAttribute="trailing" id="n8t-zZ-Ybw"/>
<constraint firstItem="LhB-c5-dxP" firstAttribute="leading" secondItem="5jO-f7-jHx" secondAttribute="leading" id="oTn-tI-rSq"/>
<constraint firstItem="vIJ-wd-iLE" firstAttribute="centerY" secondItem="bl1-LK-uoR" secondAttribute="centerY" constant="-30" id="rk3-HJ-X4h"/>
<constraint firstItem="jm6-Kw-h6M" firstAttribute="bottom" secondItem="4Fu-fM-WA5" secondAttribute="bottom" id="t6h-Wj-tNX"/>
<constraint firstItem="TdR-tY-x9U" firstAttribute="centerY" secondItem="vIJ-wd-iLE" secondAttribute="centerY" id="tm4-Jb-Fdd"/>
<constraint firstItem="T9i-DX-sok" firstAttribute="bottom" secondItem="eA0-Tq-Ptt" secondAttribute="bottom" id="uIJ-Uh-ao7"/>
<constraint firstItem="5jO-f7-jHx" firstAttribute="top" secondItem="yqi-ff-dhn" secondAttribute="bottom" constant="4" id="vCi-RG-3tr"/>
<constraint firstItem="5jO-f7-jHx" firstAttribute="height" secondItem="yqi-ff-dhn" secondAttribute="height" id="vW1-VO-Y4g"/>
......@@ -858,6 +895,7 @@
</subviews>
<color key="backgroundColor" red="0.3294117647" green="0.20784313730000001" blue="0.67843137249999996" alpha="0.089206730770000006" colorSpace="calibratedRGB"/>
<constraints>
<constraint firstItem="090-Kp-lkc" firstAttribute="centerY" secondItem="Xwx-ii-Mth" secondAttribute="centerY" id="5Nc-yt-iar"/>
<constraint firstItem="UMD-co-QD1" firstAttribute="top" secondItem="udb-to-MGv" secondAttribute="top" id="CLg-KY-jHq"/>
<constraint firstAttribute="bottom" secondItem="jZY-CC-1TB" secondAttribute="bottom" id="CiJ-gX-BOE"/>
<constraint firstItem="UMD-co-QD1" firstAttribute="centerX" secondItem="udb-to-MGv" secondAttribute="centerX" id="EFu-AS-FY3"/>
......@@ -1024,6 +1062,7 @@
</view>
<simulatedScreenMetrics key="simulatedDestinationMetrics" type="retina47"/>
<connections>
<outlet property="btnIsShowClear" destination="LhB-c5-dxP" id="OqW-JM-aSw"/>
<outlet property="labelMontEnd" destination="691-sk-b04" id="jwl-Mf-czp"/>
<outlet property="labelMonthStart" destination="zhK-cM-4OX" id="mrP-tP-Tgy"/>
<outlet property="labelPaid" destination="7SS-iX-tyV" id="KR4-9o-E7X"/>
......
......@@ -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 {
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];
......
......@@ -68,6 +68,7 @@
[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