Commit b7583950 authored by Sandy's avatar Sandy

销售录入审批权限控制

parent 450e7059
......@@ -13,7 +13,7 @@
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.5.1</string>
<key>CFBundleVersion</key>
<string>0</string>
</dict>
......
......@@ -106,7 +106,7 @@
</data>
<key>Info.plist</key>
<data>
bvKji1hK8e2+lBMGLBvRKaTldjw=
eu83K03nOGtejgXjrDWGcfp2khY=
</data>
<key>MJRefresh.bundle/arrow@2x.png</key>
<data>
......
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.5.0</string>
<string>1.5.1</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -165,7 +165,7 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) {
}
CGFloat yOffset = (self.view.bounds.size.height - yHeight)/2.0f;
UIPopoverListView *poplistview = [[UIPopoverListView alloc] initWithFrame:CGRectMake(10, yOffset, xWidth, yHeight)];
poplistview.tag = 10001;
poplistview.tag = 10003;
poplistview.delegate = self;
poplistview.datasource = self;
poplistview.listView.scrollEnabled = YES;
......@@ -181,10 +181,40 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnServiceApply, signal) {
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBillAudit, signal) {
[[VankeAppBoard_iPhone sharedInstance] hideMenu];
VankeCommonModel *userModel = [VankeCommonModel sharedInstance];
authorizedOrgs = [userModel getAuthOrgs];
if (authorizedOrgs.count == 0) {
return;
}
else if (authorizedOrgs.count == 1) {
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:0];
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"SalesInPut" bundle:nil];
SaleInputAuditViewController *auditVC = [storyBoard instantiateViewControllerWithIdentifier:@"SaleInputAuditViewController"];
auditVC.org = org;
[self.navigationController pushViewController:auditVC animated:YES];
}
else {
CGFloat xWidth = self.view.bounds.size.width - 20.0f;
CGFloat yHeight = authorizedOrgs.count * 60 + 50;
if (yHeight > 400) {
yHeight = 400.0f;
}
CGFloat yOffset = (self.view.bounds.size.height - yHeight)/2.0f;
UIPopoverListView *poplistview = [[UIPopoverListView alloc] initWithFrame:CGRectMake(10, yOffset, xWidth, yHeight)];
poplistview.tag = 10001;
poplistview.delegate = self;
poplistview.datasource = self;
poplistview.listView.scrollEnabled = YES;
[poplistview setTitle:@"请选择查看项目"];
[poplistview show];
}
CLog(@"销售录入审核");
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"SalesInPut" bundle:nil];
SaleInputAuditViewController *auditVC = [storyBoard instantiateViewControllerWithIdentifier:@"SaleInputAuditViewController"];
[self.navigationController pushViewController:auditVC animated:YES];
}
......@@ -221,6 +251,15 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBillAudit, signal) {
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:indexPath.row];
statementVC.org = org;
[self.navigationController pushViewController:statementVC animated:YES];
}else if (popoverListView.tag == 10001) {
//跳转录入审批
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:indexPath.row];
UIStoryboard *storyBoard = [UIStoryboard storyboardWithName:@"SalesInPut" bundle:nil];
SaleInputAuditViewController *auditVC = [storyBoard instantiateViewControllerWithIdentifier:@"SaleInputAuditViewController"];
auditVC.org = org;
[self.navigationController pushViewController:auditVC animated:YES];
}else{
SalesInputViewController *salesVC = [[SalesInputViewController alloc] init];
salesVC.authorizedOrg = [authorizedOrgs objectAtIndex:indexPath.row];
......
......@@ -9,5 +9,6 @@
#import <UIKit/UIKit.h>
@interface SaleInputAuditViewController : UIViewController
/** 项目 */
@property (nonatomic, strong) AuthorizedOrg *org;
@end
......@@ -52,10 +52,10 @@
- (void)httpRequest{
NSDictionary *dic = @{@"beginDateEquals":@"2016-07-10",
NSDictionary *dic = @{@"beginDateEquals":@"2015-01-01",
@"endDateEquals":[[NSDate date] yearMonthDayString],
@"pageNumber":@(self.page),
@"pageSize":@20};
@"pageSize":@50};
WS(weakSelf);
......@@ -64,7 +64,9 @@
CLog(@"%@",strData);
for (NSDictionary *dic in data[@"data"][@"records"]) {
SalesInputAuditListModel *model = [SalesInputAuditListModel modelObjectWithDictionary:dic];
[weakSelf.arrData addObject:model];
if ([model.projectId isEqualToString:weakSelf.org.code]) {
[weakSelf.arrData addObject:model];
}
}
[self.hud hide:YES];
[weakSelf.tableView.mj_header endRefreshing];
......
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