Commit 69fb55dc authored by Sandy's avatar Sandy

进入对账单等界面先选择组织

parent 990cc969
......@@ -90,7 +90,8 @@
[self addSubview:bg];
self.m_companyIcon = [[UIImageView alloc] init];
_m_companyIcon.layer.cornerRadius = 4.0f;
_m_companyIcon.layer.masksToBounds = YES;
_m_companyIcon.layer.cornerRadius = 8.0f;
_m_companyIcon.layer.borderWidth = 2.0f;
_m_companyIcon.layer.borderColor = [UIColor colorWithW:205 a:1].CGColor;
_m_companyIcon.contentMode = UIViewContentModeScaleAspectFill;
......
......@@ -17,7 +17,7 @@
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleShortVersionString</key>
<string>1.4.0</string>
<string>1.4.2</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
......
......@@ -22,14 +22,14 @@
#define VANKE_BAIDU_WEATHER_SERVER_URL @"http://api.map.baidu.com/telematics/v3/weather"
//正式环境
#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest" //正式
//后台多媒体文件基准地址
#define VANKE_SERVER_MEDIA_BASE_URL @"http://140.206.62.178:8080" //正式
//#define VANKE_SERVER_BASE_URL @"http://140.206.62.178:8080/wanke-server/rest" //正式
// //后台多媒体文件基准地址
//#define VANKE_SERVER_MEDIA_BASE_URL @"http://140.206.62.178:8080" //正式
// 测试环境
//#define VANKE_SERVER_BASE_URL @"http://139.196.39.77:8080/wanke-server/rest"
//#define VANKE_SERVER_MEDIA_BASE_URL @"http://139.196.39.77:8080"
#define VANKE_SERVER_BASE_URL @"http://139.196.39.77:8080/wanke-server/rest"
#define VANKE_SERVER_MEDIA_BASE_URL @"http://139.196.39.77:8080"
// 后台服务企业认证码
......
......@@ -107,14 +107,16 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
if (authorizedOrgs.count == 0) {
return;
} else if (authorizedOrgs.count == 1) {
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:0];
//跳转对账单
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Statement" bundle:nil];
StatementViewController *statementVC = [storyboard instantiateViewControllerWithIdentifier:@"StatementViewController"];
statementVC.org = org;
[self.navigationController pushViewController:statementVC animated:YES];
} else {
}
// else if (authorizedOrgs.count == 1) {
// AuthorizedOrg *org = [authorizedOrgs objectAtIndex:0];
// //跳转对账单
// UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Statement" bundle:nil];
// StatementViewController *statementVC = [storyboard instantiateViewControllerWithIdentifier:@"StatementViewController"];
// statementVC.org = org;
// [self.navigationController pushViewController:statementVC animated:YES];
// }
else {
CGFloat xWidth = self.view.bounds.size.width - 20.0f;
CGFloat yHeight = authorizedOrgs.count * 60 + 50;
if (yHeight > 400) {
......@@ -122,6 +124,7 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
}
CGFloat yOffset = (self.view.bounds.size.height - yHeight)/2.0f;
UIPopoverListView *poplistview = [[UIPopoverListView alloc] initWithFrame:CGRectMake(10, yOffset, xWidth, yHeight)];
poplistview.tag = 10000;
poplistview.delegate = self;
poplistview.datasource = self;
poplistview.listView.scrollEnabled = YES;
......@@ -132,23 +135,34 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnBill, signal) {
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnSaleInput, signal) {
// [GEToast showWithText:@"销售录入正在开发中..." bottomOffset:60.0f duration:1.0f];
VankeCommonModel *model = [VankeCommonModel sharedInstance];
SalesInputViewController *salesVC = [[SalesInputViewController alloc] init];
WS(weakSelf)
if ([[model getAuthOrgs] count] > 1) {
ChooseProjectTableViewController *chooseVC = [[ChooseProjectTableViewController alloc] init];
chooseVC.arrAuthorized = [model getAuthOrgs];
chooseVC.chooseAuthorized = ^(AuthorizedOrg *author){
salesVC.authorizedOrg = author;
[weakSelf.navigationController pushViewController:salesVC animated:YES];
};
UINavigationController *navc = [[UINavigationController alloc] initWithRootViewController:chooseVC];
[self.navigationController presentViewController:navc animated:YES completion:nil];
}else{
salesVC.authorizedOrg = [model getAuthOrgs][0];
[self.navigationController pushViewController:salesVC animated:YES];
// if ([[model getAuthOrgs] count] > 1) {
// ChooseProjectTableViewController *chooseVC = [[ChooseProjectTableViewController alloc] init];
// chooseVC.arrAuthorized = [model getAuthOrgs];
// chooseVC.chooseAuthorized = ^(AuthorizedOrg *author){
// salesVC.authorizedOrg = author;
// [weakSelf.navigationController pushViewController:salesVC animated:YES];
// };
// UINavigationController *navc = [[UINavigationController alloc] initWithRootViewController:chooseVC];
// [self.navigationController presentViewController:navc animated:YES completion:nil];
// }else{
// salesVC.authorizedOrg = [model getAuthOrgs][0];
// [self.navigationController pushViewController:salesVC animated:YES];
// }
VankeCommonModel *userModel = [VankeCommonModel sharedInstance];
authorizedOrgs = [userModel getAuthOrgs];
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];
}
ON_SIGNAL3(VankeAffairsBoard_iPhone, btnServiceApply, signal) {
......@@ -166,7 +180,7 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnServiceApply, signal) {
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:indexPath.row];
cell.textLabel.text = org.name;
cell.imageView.image = [UIImage imageNamed:org.picture];
[cell.imageView sd_setImageWithURL:[NSURL URLWithString:org.picture] placeholderImage:[UIImage imageNamed:@"bill_no_image_default"]];
return cell;
}
......@@ -180,12 +194,20 @@ ON_SIGNAL3(VankeAffairsBoard_iPhone, btnServiceApply, signal) {
- (void)popoverListView:(UIPopoverListView *)popoverListView
didSelectIndexPath:(NSIndexPath *)indexPath
{
//跳转对账单
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Statement" bundle:nil];
StatementViewController *statementVC = [storyboard instantiateViewControllerWithIdentifier:@"StatementViewController"];
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:indexPath.row];
statementVC.org = org;
[self.navigationController pushViewController:statementVC animated:YES];
if (popoverListView.tag == 10000) {
//跳转对账单
UIStoryboard *storyboard = [UIStoryboard storyboardWithName:@"Statement" bundle:nil];
StatementViewController *statementVC = [storyboard instantiateViewControllerWithIdentifier:@"StatementViewController"];
AuthorizedOrg *org = [authorizedOrgs objectAtIndex:indexPath.row];
statementVC.org = org;
[self.navigationController pushViewController:statementVC animated:YES];
}else{
SalesInputViewController *salesVC = [[SalesInputViewController alloc] init];
salesVC.authorizedOrg = [authorizedOrgs objectAtIndex:indexPath.row];
[self.navigationController pushViewController:salesVC animated:YES];
}
}
- (CGFloat)popoverListView:(UIPopoverListView *)popoverListView
......
......@@ -153,6 +153,7 @@ ON_CREATE_VIEWS( signal )
for (AuthorizedOrg *org in arr) {
[arrAuthordCode addObject:org.code];
}
NSString *authorCodes = [arrAuthordCode componentsJoinedByString:@","];
NSDictionary *testParams = @{@"dataType" : self.reportType,
@"dataScopeType" : self.dayType,
......@@ -163,6 +164,7 @@ ON_CREATE_VIEWS( signal )
@"direction" : @"asc"}],
@"pageNumber" : @0,
@"pageSize" : @100};
NSString *sss = testParams.JSONString;
[[ICRHTTPController sharedController] postUrl:@"salesdata/query" params:testParams success:^(id data) {
CLog(@"%@", data);
__strong __typeof(weakSelf)strongSelf = weakSelf;
......
......@@ -114,7 +114,10 @@ ON_LAYOUT_VIEWS( signal )
#pragma mark - Actions
- (void)onSubmit:(__unused id)sender {
dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.6 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{
[IBTLoadingView showTips:@"反馈成功!"];
[self.navigationController popViewControllerAnimated:YES];
});
}
@end
......@@ -259,8 +259,8 @@
<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" verticalHuggingPriority="251" text="0.00%" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7wc-Tg-iC6">
<rect key="frame" x="70" y="6" width="117" height="21"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" verticalHuggingPriority="251" text="0.00%" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7wc-Tg-iC6">
<rect key="frame" x="70" y="6" width="109" height="21"/>
<constraints>
<constraint firstAttribute="height" constant="21" id="yJE-JC-DRq"/>
</constraints>
......@@ -334,7 +334,7 @@
<constraint firstItem="cmV-Nl-JTX" firstAttribute="centerY" secondItem="xYD-uh-jS6" secondAttribute="centerY" id="W2v-nY-YID"/>
<constraint firstItem="af3-nd-7ld" firstAttribute="centerY" secondItem="1bf-tO-CaQ" secondAttribute="centerY" id="X2s-ez-gS0"/>
<constraint firstItem="OLq-gm-qMR" firstAttribute="centerY" secondItem="1bf-tO-CaQ" secondAttribute="centerY" id="Y0A-4e-22c"/>
<constraint firstAttribute="trailing" secondItem="7wc-Tg-iC6" secondAttribute="trailing" id="YRV-NE-L8T"/>
<constraint firstAttribute="trailing" secondItem="7wc-Tg-iC6" secondAttribute="trailing" constant="8" id="YRV-NE-L8T"/>
<constraint firstItem="1bf-tO-CaQ" firstAttribute="height" secondItem="iAE-TG-QRU" secondAttribute="height" constant="1" id="YpG-xA-2Jv"/>
<constraint firstAttribute="bottom" secondItem="xYD-uh-jS6" secondAttribute="bottom" id="ZBs-mr-2Rv"/>
<constraint firstItem="xYD-uh-jS6" firstAttribute="leading" secondItem="1bf-tO-CaQ" secondAttribute="leading" id="axv-MT-miv"/>
......@@ -755,8 +755,8 @@
</mask>
</variation>
</label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="252" verticalHuggingPriority="251" text="0.00%" textAlignment="natural" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BWq-Ig-eYR">
<rect key="frame" x="61" y="0.0" width="48" height="34"/>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="0.00%" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="2" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="BWq-Ig-eYR">
<rect key="frame" x="61" y="0.0" width="118" height="34"/>
<constraints>
<constraint firstAttribute="height" constant="41" id="NhJ-JI-C1E"/>
</constraints>
......@@ -834,6 +834,7 @@
<constraint firstItem="eJv-sv-XDs" firstAttribute="top" secondItem="jZY-CC-1TB" secondAttribute="top" constant="30" id="it3-ds-Dx4"/>
<constraint firstItem="Xwx-ii-Mth" firstAttribute="centerY" secondItem="QgT-zZ-E08" secondAttribute="centerY" id="lqQ-nP-o9t"/>
<constraint firstItem="eJv-sv-XDs" firstAttribute="leading" secondItem="jZY-CC-1TB" secondAttribute="leading" constant="42" id="mPx-L9-FYr"/>
<constraint firstAttribute="trailing" secondItem="BWq-Ig-eYR" secondAttribute="trailing" constant="8" id="nNR-sj-pdO"/>
<constraint firstItem="jyd-PI-c1m" firstAttribute="leading" secondItem="eJv-sv-XDs" secondAttribute="trailing" constant="1" id="oNt-fe-HiL"/>
<constraint firstItem="QgT-zZ-E08" firstAttribute="top" secondItem="7SS-iX-tyV" secondAttribute="bottom" id="pjl-bP-ivR"/>
<constraint firstItem="7SS-iX-tyV" firstAttribute="height" secondItem="eJv-sv-XDs" secondAttribute="height" constant="-1" id="s6A-Jy-qof"/>
......
......@@ -197,19 +197,23 @@
WS(weakSelf);
[[ICRHTTPController sharedController] getUrl:url params:nil success:^(id data) {
NSDictionary *dict = data;
CLog(@"%@", dict.JSONString);
[IBTLoadingView showTips:data[@"message"]];
weakSelf.statementModel = [StatementModel modelObjectWithDictionary:dict[@"data"]];
// weakSelf.labelTotalShop.text = [NSString stringWithFormat:@"共%@家",[NSNumber numberWithDouble:weakSelf.statementModel.paging.recordCount]];
[weakSelf calculateTop];
[weakSelf.tableView reloadData];
[weakSelf.arrUnClear removeAllObjects];
for (StatementRecords *records in weakSelf.statementModel.records) {
if (records.unpaid != 0) {
[weakSelf.arrUnClear addObject:records];
if ([data[@"message"] isEqualToString:@"ok"]) {
weakSelf.statementModel = [StatementModel modelObjectWithDictionary:dict[@"data"]];
// weakSelf.labelTotalShop.text = [NSString stringWithFormat:@"共%@家",[NSNumber numberWithDouble:weakSelf.statementModel.paging.recordCount]];
[weakSelf calculateTop];
[weakSelf.tableView reloadData];
[weakSelf.arrUnClear removeAllObjects];
for (StatementRecords *records in weakSelf.statementModel.records) {
if (records.unpaid != 0) {
[weakSelf.arrUnClear addObject:records];
}
}
}else{
[IBTLoadingView showTips:data[@"message"]];
}
[hud hide:YES];
......
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