Commit c4916672 authored by Achilles's avatar Achilles

账单明细界面 操作

parent 05bb91f2
......@@ -139,6 +139,8 @@
C128050C1BC5920F001ECBAA /* VankeProjectListAPI.m in Sources */ = {isa = PBXBuildFile; fileRef = C128050B1BC5920F001ECBAA /* VankeProjectListAPI.m */; };
C128050F1BC6AA8B001ECBAA /* VankeProjectListModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C128050E1BC6AA8B001ECBAA /* VankeProjectListModel.m */; };
C12805121BC6AEB5001ECBAA /* VankeServerModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C12805111BC6AEB5001ECBAA /* VankeServerModel.m */; };
C135BF681C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.m in Sources */ = {isa = PBXBuildFile; fileRef = C135BF661C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.m */; };
C135BF691C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.xml in Resources */ = {isa = PBXBuildFile; fileRef = C135BF671C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.xml */; };
C14D6F571BB8041B00210172 /* homepage_logo.png in Resources */ = {isa = PBXBuildFile; fileRef = C14D6F551BB8041B00210172 /* homepage_logo.png */; };
C14D6F581BB8041B00210172 /* homepage_logo@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C14D6F561BB8041B00210172 /* homepage_logo@2x.png */; };
C14D6F631BB8071700210172 /* aboutme_unchecked.png in Resources */ = {isa = PBXBuildFile; fileRef = C14D6F591BB8071700210172 /* aboutme_unchecked.png */; };
......@@ -932,6 +934,9 @@
C128050E1BC6AA8B001ECBAA /* VankeProjectListModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VankeProjectListModel.m; sourceTree = "<group>"; };
C12805101BC6AEB4001ECBAA /* VankeServerModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = VankeServerModel.h; sourceTree = "<group>"; };
C12805111BC6AEB5001ECBAA /* VankeServerModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = VankeServerModel.m; sourceTree = "<group>"; };
C135BF651C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = VankeStateDetailOperCell_iPhone.h; path = statement/VankeStateDetailOperCell_iPhone.h; sourceTree = "<group>"; };
C135BF661C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = VankeStateDetailOperCell_iPhone.m; path = statement/VankeStateDetailOperCell_iPhone.m; sourceTree = "<group>"; };
C135BF671C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.xml */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.xml; name = VankeStateDetailOperCell_iPhone.xml; path = statement/VankeStateDetailOperCell_iPhone.xml; sourceTree = "<group>"; };
C14D6F551BB8041B00210172 /* homepage_logo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = homepage_logo.png; path = img/homepage_logo.png; sourceTree = "<group>"; };
C14D6F561BB8041B00210172 /* homepage_logo@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "homepage_logo@2x.png"; path = "img/homepage_logo@2x.png"; sourceTree = "<group>"; };
C14D6F591BB8071700210172 /* aboutme_unchecked.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = aboutme_unchecked.png; path = img/aboutme_unchecked.png; sourceTree = "<group>"; };
......@@ -2210,6 +2215,9 @@
C10F185C1BF8EC470065F18C /* statement */ = {
isa = PBXGroup;
children = (
C135BF651C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.h */,
C135BF661C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.m */,
C135BF671C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.xml */,
C17ABD4A1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.h */,
C17ABD4B1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.m */,
C17ABD4C1BFCD48A00908573 /* VankeStatementDetailListBoard_iPhone.xml */,
......@@ -4285,6 +4293,7 @@
C19AC88C1C1735E600DE260E /* confirmed@2x.png in Resources */,
C19AC8A01C1735E600DE260E /* salel_input_icon@2x.png in Resources */,
C1A06A0D1BE10B080082006F /* sale_input.png in Resources */,
C135BF691C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.xml in Resources */,
C14D6F6B1BB8071700210172 /* sales_red.png in Resources */,
C1D5948B1BB2E5DD00D297FE /* arrow-down@2x.png in Resources */,
C19AC8851C1735E600DE260E /* no_data@3x.png in Resources */,
......@@ -4851,6 +4860,7 @@
C1D599491BB44B2100D297FE /* NSObject+BeeTicker.mm in Sources */,
C1D598541BB44B2000D297FE /* Bee_UICollection.m in Sources */,
C1D5994F1BB44B2100D297FE /* NSTimer+BeeExtension.mm in Sources */,
C135BF681C2EBF7B00BFED6C /* VankeStateDetailOperCell_iPhone.m in Sources */,
C1D598C41BB44B2000D297FE /* UIView+Traversing.m in Sources */,
C10F18411BF7ACA80065F18C /* IBTTableView.m in Sources */,
C1D598FC1BB44B2000D297FE /* Bee_UITransition.m in Sources */,
......
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStateDetailOperCell_iPhone.h
// vanke
//
// Created by xiaomi on 15/12/26.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "Bee.h"
#pragma mark -
@interface VankeStateDetailOperCell_iPhone : BeeUICell
@end
//
// ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/
//
// Powered by BeeFramework
//
//
// VankeStateDetailOperCell_iPhone.m
// vanke
//
// Created by xiaomi on 15/12/26.
// Copyright © 2015年 gomore. All rights reserved.
//
#import "VankeStateDetailOperCell_iPhone.h"
#pragma mark -
@implementation VankeStateDetailOperCell_iPhone
SUPPORT_AUTOMATIC_LAYOUT( YES )
SUPPORT_RESOURCE_LOADING( YES )
- (void)load
{
}
- (void)unload
{
}
- (void)dataDidChanged
{
// TODO: fill data
}
- (void)layoutDidFinish
{
// TODO: custom layout here
}
@end
<?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeStateDetailOperCell_iPhone">
<linear orientation="h" class="wrapper">
<image class="bg" />
<button id="btnReject" class="btn reject">拒绝</button>
<button id="btnConfirm" class="btn confirm">确认</button>
</linear>
<style type="text/css">
.wrapper {
width: 100%;
height: 60px;
}
.bg {
position: absolute;
left: 0px;
top: 0px;
width: 100%;
height: 100%;
background-color: #f6f6f6;
}
.wrapper .btn {
width: 50%;
height: 60px;
border-radius: 8px;
border-width: 1px;
font-size: 15px;
font-weight: bold;
padding: 10px;
}
.reject {
color: rgb(144,76,245);
border-color: rgb(144,76,245);
background-color: white;
}
.confirm {
color: white;
background-color: rgb(144,76,245);
}
</style>
</ui>
\ No newline at end of file
......@@ -19,6 +19,7 @@
#import "VankeBaseBoard.h"
#import "VankeSettlementListAPI.h"
#import "VankeStatementSubjectListModel.h"
#import "VankeStateDetailOperCell_iPhone.h"
#import "VankeStatementDetailMonthCell_iPhone.h"
#pragma mark -
......@@ -31,6 +32,7 @@ AS_NOTIFICATION( STATE_CHANGED )
AS_MODEL( VankeStatementSubjectListModel, model )
AS_OUTLET( BeeUIScrollView, list )
AS_OUTLET( VankeStatementDetailMonthCell_iPhone, settlementBar)
AS_OUTLET( VankeStateDetailOperCell_iPhone, operBar )
AS_OUTLET( BeeUIImageView, imgState)
@property (nonatomic, strong) NSDate *settleEquals;
......
......@@ -51,6 +51,7 @@ DEF_NOTIFICATION( STATE_CHANGED )
DEF_MODEL( VankeStatementListModel, model )
DEF_OUTLET( BeeUIScrollView, list )
DEF_OUTLET( VankeStateDetailOperCell_iPhone, operBar )
DEF_OUTLET( VankeStatementDetailMonthCell_iPhone, settlementBar)
DEF_OUTLET( BeeUIImageView, imgState)
......@@ -77,7 +78,7 @@ ON_CREATE_VIEWS( signal )
self.navigationBarShown = YES;
self.allowedSwipeToBack = YES;
self.title = _data.shopName;
[self showOperButtons: [_data unconfirmed]];
self.operBar.hidden = ![_data unconfirmed];
[self initListAndModel];
}
......@@ -87,6 +88,10 @@ ON_DELETE_VIEWS( signal )
ON_LAYOUT_VIEWS( signal )
{
CGRect statusFrame = [[UIApplication sharedApplication] statusBarFrame];
if (statusFrame.size.height == 40.0f) {
self.operBar.top -= 20.0f;
}
}
ON_WILL_APPEAR( signal )
......@@ -142,7 +147,7 @@ ON_SIGNAL3( VankeStatementSubjectListModel, RELOADED, signal )
self.title = respData.shopName;
$(self.settlementBar).DATA(respData);
$(self.imgState).DATA([NSString stringWithFormat:@"%@_big.png", respData.state]);
[self showOperButtons: [respData unconfirmed]];
self.operBar.hidden = ![respData unconfirmed];
} else {
if (nil == respData) {
respData = [[StatementSubjectListResponseData alloc] init];
......@@ -153,7 +158,7 @@ ON_SIGNAL3( VankeStatementSubjectListModel, RELOADED, signal )
respData.amount = [NSNumber numberWithDouble:.0f];
$(self.settlementBar).DATA(respData);
$(self.imgState).DATA(nil);
[self showOperButtons: NO];
self.operBar.hidden = YES;
}
}
......@@ -231,7 +236,7 @@ ON_SIGNAL3(VankeStatementDetailMonthCell_iPhone, pickerMask, signal) {
#define ALERT_REJECT_TAG 100
ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnReject, signal) {
ON_SIGNAL3(VankeStateDetailOperCell_iPhone, btnReject, signal) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"拒绝原因" message:nil delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
UITextField *textField = [alert textFieldAtIndex:0];
......@@ -241,7 +246,7 @@ ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnReject, signal) {
[alert show];
}
ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnConfirm, signal) {
ON_SIGNAL3(VankeStateDetailOperCell_iPhone, btnConfirm, signal) {
UIAlertController *alertController = [UIAlertController alertControllerWithTitle:@"是否确认账单?" message:nil preferredStyle: UIAlertControllerStyleActionSheet];
UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消" style:UIAlertActionStyleCancel handler:nil];
UIAlertAction *archiveAction = [UIAlertAction actionWithTitle:@"确认" style:UIAlertActionStyleDefault handler:^(UIAlertAction *action) {
......@@ -275,17 +280,6 @@ ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnConfirm, signal) {
#pragma private methods
-(void) showOperButtons: (BOOL) show {
NSArray *items = [[NSArray alloc] initWithObjects: $(@"bg1"),$(@"bg2"),$(@"btnReject"),$(@"btnConfirm"), nil];
for (BeeUIQuery *qry in items) {
if (show) {
qry.SHOW();
} else {
qry.HIDE();
}
}
}
-(void) initListAndModel {
self.list.headerClass = [PullLoader class];
self.list.headerShown = YES;
......
......@@ -6,15 +6,7 @@
<list id="list" />
<VankeStatementDetailMonthCell_iPhone id="settlementBar" />
<image id="imgState" class="image-state" />
<linear orientation="h" class="oper-wrapper">
<image id="bg1" class="bg" />
<linear orientation="h" class="inner-wrapper">
<image id="bg2" class="bg" />
<button id="btnReject" class="btn reject">拒绝</button>
<button id="btnConfirm" class="btn confirm">确认</button>
</linear>
</linear>
<VankeStateDetailOperCell_iPhone id="operBar" />
</linear>
<style type="text/css">
......@@ -59,47 +51,12 @@
image-src: url(unconfirmed_big.png);
}
.oper-wrapper {
#operBar {
position: absolute;
bottom: 0px;
left: 0px;
height: 60px;
width: 100%;
}
.oper-wrapper > .bg {
background-color: #aaaaaa;
}
.oper-wrapper .inner-wrapper {
width: 100%;
height: 100%;
padding-top: 1px;
}
.inner-wrapper > .bg {
background-color: #f6f6f6;
}
.oper-wrapper .btn {
width: 50%;
height: 100%;
border-radius: 8px;
border-width: 1px;
font-size: 15px;
font-weight: bold;
padding: 10px;
}
.reject {
color: rgb(144,76,245);
border-color: rgb(144,76,245);
background-color: white;
}
.confirm {
color: white;
background-color: rgb(144,76,245);
}
</style>
</ui>
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