Commit 4d3b1e20 authored by Achilles's avatar Achilles

statement

parent e9ea825f
// //
// ______ ______ ______ // ______ ______ ______
// /\ __ \ /\ ___\ /\ ___\ // /\ __ \ /\ ___\ /\ ___\
// \ \ __< \ \ __\_ \ \ __\_ // // \ \ __< \ \ __\_ \ \ __\_
// \ \_____\ \ \_____\ \ \_____\ // \ \_____\ \ \_____\ \ \_____\
// \/_____/ \/_____/ \/_____/ // // \/_____/ \/_____/ \/_____/
// //
// Powered by BeeFramework // Powered by BeeFramework
// //
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#pragma mark - #pragma mark -
@interface VankeStatementDetailListBoard_iPhone() @interface VankeStatementDetailListBoard_iPhone ()
{ {
//<#@private var#> //<#@private var#>
} }
...@@ -63,6 +63,7 @@ ON_CREATE_VIEWS( signal ) ...@@ -63,6 +63,7 @@ ON_CREATE_VIEWS( signal )
self.navigationBarShown = YES; self.navigationBarShown = YES;
self.allowedSwipeToBack = YES; self.allowedSwipeToBack = YES;
self.title = [_data codeName]; self.title = [_data codeName];
[self showOperButtons: [_data unconfirmed]];
self.list.headerClass = [PullLoader class]; self.list.headerClass = [PullLoader class];
self.list.headerShown = YES; self.list.headerShown = YES;
...@@ -124,12 +125,14 @@ ON_CREATE_VIEWS( signal ) ...@@ -124,12 +125,14 @@ ON_CREATE_VIEWS( signal )
}; };
// TODO // TODO
// self.model.classificationEquals = _projectCategory; // self.model.classificationEquals = _projectCategory;
// self.model.nameLike = _projectNameLike; // self.model.nameLike = _projectNameLike;
// self.model.salesDateEquals = _salesDate; // self.model.salesDateEquals = _salesDate;
// _searchBar.text = _projectNameLike; // _searchBar.text = _projectNameLike;
//TODO 这里要求重新查询明细 //TODO 这里要求重新查询明细
_model.settleEquals = [NSDate date]; _model.settleEquals = [NSDate date];
} }
ON_DELETE_VIEWS( signal ) ON_DELETE_VIEWS( signal )
...@@ -138,6 +141,7 @@ ON_DELETE_VIEWS( signal ) ...@@ -138,6 +141,7 @@ ON_DELETE_VIEWS( signal )
ON_LAYOUT_VIEWS( signal ) ON_LAYOUT_VIEWS( signal )
{ {
} }
ON_WILL_APPEAR( signal ) ON_WILL_APPEAR( signal )
...@@ -191,13 +195,14 @@ ON_SIGNAL3( VankeStatementListModel, RELOADED, signal ) ...@@ -191,13 +195,14 @@ ON_SIGNAL3( VankeStatementListModel, RELOADED, signal )
[self.list reloadData]; [self.list reloadData];
$(self.settlementBar).DATA(_data); $(self.settlementBar).DATA(_data);
$(self.imgState).DATA([NSString stringWithFormat:@"%@_big.png", _data.state]); $(self.imgState).DATA([NSString stringWithFormat:@"%@_big.png", _data.state]);
[self showOperButtons: [_data unconfirmed]];
} }
#pragma UISearchBarDelegate #pragma UISearchBarDelegate
-(void) searchBarSearchButtonClicked:(UISearchBar *)searchBar { -(void) searchBarSearchButtonClicked:(UISearchBar *)searchBar {
// NSString *nameLike = [VankeUtil trim:_searchBar.text]; // NSString *nameLike = [VankeUtil trim:_searchBar.text];
// self.model.nameLike = nameLike; // self.model.nameLike = nameLike;
[self.model firstPage]; [self.model firstPage];
} }
...@@ -228,4 +233,50 @@ ON_SIGNAL3(VankeStatementDetailMonthCell_iPhone, pickerMask, signal) { ...@@ -228,4 +233,50 @@ ON_SIGNAL3(VankeStatementDetailMonthCell_iPhone, pickerMask, signal) {
[self presentViewController:alertController animated:YES completion:nil]; [self presentViewController:alertController animated:YES completion:nil];
} }
#pragma VankeStatementDetailListBoard_iPhone
#define ALERT_REJECT_TAG 100
ON_SIGNAL3(VankeStatementDetailListBoard_iPhone, btnReject, signal) {
UIAlertView *alert = [[UIAlertView alloc] initWithTitle:@"拒绝原因" message:nil delegate:self cancelButtonTitle:@"取消" otherButtonTitles:@"确定", nil];
alert.alertViewStyle = UIAlertViewStylePlainTextInput;
alert.tag = ALERT_REJECT_TAG;
[alert show];
}
ON_SIGNAL3(VankeStatementDetailListBoard_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) {
INFO(@"正在确认账单。。。");
}];
[alertController addAction:cancelAction];
[alertController addAction:archiveAction];
[self presentViewController:alertController animated:YES completion:nil];
}
-(void)alertView:(UIAlertView *)alertView clickedButtonAtIndex:(NSInteger)buttonIndex {
if (alertView.tag == ALERT_REJECT_TAG) {
if (buttonIndex == 0) {
INFO(@"取消拒绝");
} else if (buttonIndex == 1) {
INFO(@"准备拒绝单据");
}
}
}
#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();
}
}
}
@end @end
<?xml version="1.0" encoding="UTF-8"?> <?xml version="1.0" encoding="UTF-8"?>
<ui namespace="VankeStatementDetailListBoard_iPhone"> <ui namespace="VankeStatementDetailListBoard_iPhone">
<linear class="wrapper"> <linear orientation="v" class="wrapper">
<image class="bg" /> <image class="bg" />
<list id="list" /> <list id="list" />
<VankeStatementDetailMonthCell_iPhone id="settlementBar" /> <VankeStatementDetailMonthCell_iPhone id="settlementBar" />
<image id="imgState" class="image-state" /> <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>
</linear> </linear>
<style type="text/css"> <style type="text/css">
...@@ -46,8 +55,51 @@ ...@@ -46,8 +55,51 @@
.image-state { .image-state {
position: absolute; position: absolute;
left: 0px; left: 0px;
top: 64px; top: 40px;
image-src: url(unconfirmed_big.png); image-src: url(unconfirmed_big.png);
} }
.oper-wrapper {
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> </style>
</ui> </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