diff --git a/zhiche--delivery.xcodeproj/project.pbxproj b/zhiche--delivery.xcodeproj/project.pbxproj index 0ddf1baec764f4faa5915fc6665bf73e51ce4c63..79c402f0597c5b30fd3a46c81f9ce11587fd9fb4 100644 --- a/zhiche--delivery.xcodeproj/project.pbxproj +++ b/zhiche--delivery.xcodeproj/project.pbxproj @@ -110,6 +110,8 @@ 82CFFAC11CF43FEE00581A33 /* InvoiceCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 82CFFAC01CF43FEE00581A33 /* InvoiceCell.m */; }; 82EE2B2E1CED57E5008D4F81 /* DepartModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 82EE2B2D1CED57E5008D4F81 /* DepartModel.m */; }; 82EE2B311CED9EA0008D4F81 /* MineOrderModel.m in Sources */ = {isa = PBXBuildFile; fileRef = 82EE2B301CED9EA0008D4F81 /* MineOrderModel.m */; }; + C20E3E721CF6F7D3008B0DBC /* BillVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C20E3E711CF6F7D2008B0DBC /* BillVC.m */; }; + C20E3E751CF6FAC1008B0DBC /* BillCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C20E3E741CF6FAC1008B0DBC /* BillCell.m */; }; 82F972DC1CF7E2C60082F93E /* OrderRootCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F972DB1CF7E2C60082F93E /* OrderRootCell.m */; }; 82F972DF1CF7E7FA0082F93E /* TESTViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F972DE1CF7E7FA0082F93E /* TESTViewController.m */; }; 82F9732B1CF822490082F93E /* FinishOrderCell.m in Sources */ = {isa = PBXBuildFile; fileRef = 82F9732A1CF822490082F93E /* FinishOrderCell.m */; }; @@ -127,6 +129,8 @@ C22F65541CE1789300639B6F /* ChooseAddressVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C22F65531CE1789300639B6F /* ChooseAddressVC.m */; }; C22F655A1CE1AE8D00639B6F /* AddressVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C22F65591CE1AE8D00639B6F /* AddressVC.m */; }; C25AABC01CEAA9A2000DA48F /* PlaceOrderModel.m in Sources */ = {isa = PBXBuildFile; fileRef = C25AABBF1CEAA9A2000DA48F /* PlaceOrderModel.m */; }; + C25DF9A91CF94216001D939B /* QuoteCell.m in Sources */ = {isa = PBXBuildFile; fileRef = C25DF9A81CF94216001D939B /* QuoteCell.m */; }; + C25DF9AC1CF96669001D939B /* FindQuoteVC.m in Sources */ = {isa = PBXBuildFile; fileRef = C25DF9AB1CF96669001D939B /* FindQuoteVC.m */; }; C2AF260E1CDD99D100745A6B /* NavViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = C2AF260D1CDD99D100745A6B /* NavViewController.m */; }; C2AF26781CDDD36700745A6B /* common_arrows1_unpress@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = C2AF26721CDDD36700745A6B /* common_arrows1_unpress@2x.png */; }; C2AF26791CDDD36700745A6B /* common_arrows1_unpress@3x.png in Resources */ = {isa = PBXBuildFile; fileRef = C2AF26731CDDD36700745A6B /* common_arrows1_unpress@3x.png */; }; @@ -375,6 +379,10 @@ 82F973401CF8361A0082F93E /* ExecuteViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ExecuteViewController.h; sourceTree = ""; }; 82F973411CF8361A0082F93E /* ExecuteViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ExecuteViewController.m; sourceTree = ""; }; A84284A9F034919672A898C9 /* Pods.release.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = Pods.release.xcconfig; path = "Pods/Target Support Files/Pods/Pods.release.xcconfig"; sourceTree = ""; }; + C20E3E701CF6F7D2008B0DBC /* BillVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BillVC.h; sourceTree = ""; }; + C20E3E711CF6F7D2008B0DBC /* BillVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BillVC.m; sourceTree = ""; }; + C20E3E731CF6FAC1008B0DBC /* BillCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BillCell.h; sourceTree = ""; }; + C20E3E741CF6FAC1008B0DBC /* BillCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = BillCell.m; sourceTree = ""; }; C213D9211CDDDF85004942FF /* PlaceOrderVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PlaceOrderVC.h; sourceTree = ""; }; C213D9221CDDDF85004942FF /* PlaceOrderVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = PlaceOrderVC.m; sourceTree = ""; }; C213D9241CDDE08E004942FF /* common_btn_top_back@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "common_btn_top_back@2x.png"; sourceTree = ""; }; @@ -387,6 +395,10 @@ C22F65591CE1AE8D00639B6F /* AddressVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = AddressVC.m; sourceTree = ""; }; C25AABBE1CEAA9A2000DA48F /* PlaceOrderModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlaceOrderModel.h; path = "zhiche--delivery/Delivery/Main/1/Cell/PlaceOrderModel.h"; sourceTree = SOURCE_ROOT; }; C25AABBF1CEAA9A2000DA48F /* PlaceOrderModel.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = PlaceOrderModel.m; path = "zhiche--delivery/Delivery/Main/1/Cell/PlaceOrderModel.m"; sourceTree = SOURCE_ROOT; }; + C25DF9A71CF94216001D939B /* QuoteCell.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = QuoteCell.h; sourceTree = ""; }; + C25DF9A81CF94216001D939B /* QuoteCell.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = QuoteCell.m; sourceTree = ""; }; + C25DF9AA1CF96669001D939B /* FindQuoteVC.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = FindQuoteVC.h; path = ActionSheet/FindQuoteVC.h; sourceTree = ""; }; + C25DF9AB1CF96669001D939B /* FindQuoteVC.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = FindQuoteVC.m; path = ActionSheet/FindQuoteVC.m; sourceTree = ""; }; C2AF260C1CDD99D100745A6B /* NavViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = NavViewController.h; sourceTree = ""; }; C2AF260D1CDD99D100745A6B /* NavViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = NavViewController.m; sourceTree = ""; }; C2AF26721CDDD36700745A6B /* common_arrows1_unpress@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "common_arrows1_unpress@2x.png"; sourceTree = ""; }; @@ -582,6 +594,8 @@ C2E96FA71CE30B0700DB0E51 /* ActionSheet */, 8255E01B1CDC650A00D8981B /* HomeViewController.h */, 8255E01C1CDC650A00D8981B /* HomeViewController.m */, + C25DF9AA1CF96669001D939B /* FindQuoteVC.h */, + C25DF9AB1CF96669001D939B /* FindQuoteVC.m */, C213D9211CDDDF85004942FF /* PlaceOrderVC.h */, C213D9221CDDDF85004942FF /* PlaceOrderVC.m */, C22F65521CE1789300639B6F /* ChooseAddressVC.h */, @@ -592,6 +606,8 @@ C2E96FB41CE3358000DB0E51 /* CarModelVC.m */, C2E20CEF1CE410DC00EA5913 /* CarShipVC.h */, C2E20CF01CE410DC00EA5913 /* CarShipVC.m */, + C20E3E701CF6F7D2008B0DBC /* BillVC.h */, + C20E3E711CF6F7D2008B0DBC /* BillVC.m */, C2E96FA41CE2DB7C00DB0E51 /* NewBtn.h */, C2E96FA51CE2DB7C00DB0E51 /* NewBtn.m */, ); @@ -1055,6 +1071,10 @@ C2E20CF31CE4281300EA5913 /* CarShipCell.m */, C2E20CF51CE472CE00EA5913 /* SmallCarTableCell.h */, C2E20CF61CE472CE00EA5913 /* SmallCarTableCell.m */, + C20E3E731CF6FAC1008B0DBC /* BillCell.h */, + C20E3E741CF6FAC1008B0DBC /* BillCell.m */, + C25DF9A71CF94216001D939B /* QuoteCell.h */, + C25DF9A81CF94216001D939B /* QuoteCell.m */, ); path = Cell; sourceTree = ""; @@ -1412,6 +1432,7 @@ C22F655A1CE1AE8D00639B6F /* AddressVC.m in Sources */, 827531441CEAA59100976B85 /* QNHijackingDetectWrapper.m in Sources */, C2E96FAC1CE30B0700DB0E51 /* ActionSheetPicker.m in Sources */, + C25DF9A91CF94216001D939B /* QuoteCell.m in Sources */, C2E20CF71CE472CE00EA5913 /* SmallCarTableCell.m in Sources */, 827531521CEAA59100976B85 /* QNPHAssetResource.m in Sources */, 82CE2DE71CF97351000D0749 /* CollectionViewCell.m in Sources */, @@ -1453,6 +1474,7 @@ 827531611CEAA59100976B85 /* QNUploadOption.m in Sources */, 8277E4561CE5AB900010A1F1 /* LoginViewController.m in Sources */, 8249863C1CF47350002A568A /* InvoiceDetailViewController.m in Sources */, + C20E3E751CF6FAC1008B0DBC /* BillCell.m in Sources */, 82C9DB6E1CE06DC000A0B8C8 /* MineCell.m in Sources */, 821F43131CE6F75A00DB58BF /* ScrollViewController.m in Sources */, 8255E0111CDC647200D8981B /* WelcomeViewController.m in Sources */, @@ -1467,6 +1489,7 @@ C25AABC01CEAA9A2000DA48F /* PlaceOrderModel.m in Sources */, 8249864A1CF57070002A568A /* CallCenterViewController.m in Sources */, C2E96F9B1CE2D20700DB0E51 /* AddressCell.m in Sources */, + C20E3E721CF6F7D3008B0DBC /* BillVC.m in Sources */, 8275315B1CEAA59100976B85 /* QNReachability.m in Sources */, 827531591CEAA59100976B85 /* QNStats.m in Sources */, 82C9DB651CE0390D00A0B8C8 /* ManagerCell.m in Sources */, @@ -1490,6 +1513,7 @@ C2E96FAD1CE30B0700DB0E51 /* SWActionSheet.m in Sources */, 8275314F1CEAA59100976B85 /* QNEtag.m in Sources */, 82B365931CDDF670009302BA /* Common.m in Sources */, + C25DF9AC1CF96669001D939B /* FindQuoteVC.m in Sources */, 825CF88F1CE4124B00B386CD /* CarTypeViewController.m in Sources */, 8275314E1CEAA59100976B85 /* QNCrc32.m in Sources */, 827531561CEAA59100976B85 /* QNHttpManager.m in Sources */, diff --git a/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/UserInterfaceState.xcuserstate b/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/UserInterfaceState.xcuserstate index c2ac881e13245337f3bee5da560ca6eed26fd8a8..b6aef1881cc73c340c2ee808c4d2edbbe2913b9c 100644 Binary files a/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/UserInterfaceState.xcuserstate and b/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist b/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist index fa3b0d0d085a4dcbbdd7e54bc089e549fab740e2..dd42de76f76e6f0f09de5563c01323d7039ef4df 100644 --- a/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist +++ b/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist @@ -13,22 +13,6 @@ stopOnStyle = "0"> - - - - @@ -51,13 +35,13 @@ shouldBeEnabled = "Yes" ignoreCount = "0" continueAfterRunningActions = "No" - filePath = "zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.m" - timestampString = "485869288.745954" + filePath = "zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.m" + timestampString = "485941408.974119" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "630" - endingLineNumber = "630" - landmarkName = "-pressCellAddBtn:" + startingLineNumber = "321" + endingLineNumber = "321" + landmarkName = "-createUI:" landmarkType = "5"> @@ -67,13 +51,13 @@ shouldBeEnabled = "Yes" ignoreCount = "0" continueAfterRunningActions = "No" - filePath = "zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.m" - timestampString = "485869288.745954" + filePath = "zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.m" + timestampString = "485943569.710583" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "593" - endingLineNumber = "593" - landmarkName = "-pressCellReduceBtn:" + startingLineNumber = "810" + endingLineNumber = "810" + landmarkName = "-createTableView" landmarkType = "5"> @@ -83,13 +67,13 @@ shouldBeEnabled = "Yes" ignoreCount = "0" continueAfterRunningActions = "No" - filePath = "zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.m" - timestampString = "485869288.745954" + filePath = "zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.m" + timestampString = "485943576.006448" startingColumnNumber = "9223372036854775807" endingColumnNumber = "9223372036854775807" - startingLineNumber = "604" - endingLineNumber = "604" - landmarkName = "-pressCellReduceBtn:" + startingLineNumber = "839" + endingLineNumber = "839" + landmarkName = "-createTableView" landmarkType = "5"> diff --git a/zhiche--delivery/Delivery/Login/LoginViewController.m b/zhiche--delivery/Delivery/Login/LoginViewController.m index a6cab3885779416a75efd6243e9e32884e9e7ebd..8a64dbb125855fe51d406969c1f24a111ec9e151 100644 --- a/zhiche--delivery/Delivery/Login/LoginViewController.m +++ b/zhiche--delivery/Delivery/Login/LoginViewController.m @@ -231,13 +231,13 @@ if ([[dictonary objectForKey:@"success"] boolValue]) { - + NSUserDefaults *userDefaults = [NSUserDefaults standardUserDefaults]; [userDefaults setObject:@"login" forKey:@"login"]; [userDefaults setObject:dictonary[@"data"][@"Authorization"] forKey:login_token]; - + //延迟执行 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ diff --git a/zhiche--delivery/Delivery/Main/1/.DS_Store b/zhiche--delivery/Delivery/Main/1/.DS_Store index 73c52b0d606665fb763e48d1d5c0bb570525dad2..e13733b3c0bde975f27d11419fe82cf172ad4fc8 100644 Binary files a/zhiche--delivery/Delivery/Main/1/.DS_Store and b/zhiche--delivery/Delivery/Main/1/.DS_Store differ diff --git a/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.h b/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.h index 1fbc2f993af85a1c153cca8e1376c736a71266c5..b6d0edf896130582b294f800b03951c4ad9ab7f0 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.h +++ b/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.h @@ -7,7 +7,7 @@ // #import - +#import "NewBtn.h" @interface AddressCell : UITableViewCell @property (nonatomic,strong) UILabel * CityName; @@ -17,4 +17,8 @@ @property (nonatomic,strong) UILabel * ChooseText; @property (nonatomic,strong) UIImageView * SmallImage; @property (nonatomic,strong) UIImageView * RightImage; +@property (nonatomic,strong) NewBtn * MRbtn; +@property (nonatomic,strong) NewBtn * BJbtn; +@property (nonatomic,strong) NewBtn * SCbtn; + @end diff --git a/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m b/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m index e4678d07037e2af2f9a9451d92b6164c8a140f2f..9fb0f31a7d5cb4fb9e3e83bb625d1cd4b23b0c35 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m +++ b/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m @@ -24,20 +24,23 @@ _AddressName = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; _PeopleName = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; _SmallImage = [[UIImageView alloc]init]; - _ChooseText = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; +// _ChooseText = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; + _MRbtn = [self createBtn:@"默认"]; + _BJbtn = [self createBtn:@"编辑"]; + _SCbtn = [self createBtn:@"删除"]; + + [self.contentView addSubview:_CityName]; [self.contentView addSubview:_StoreName]; [self.contentView addSubview:_AddressName]; [self.contentView addSubview:_PeopleName]; [self.contentView addSubview:_SmallImage]; - [self.contentView addSubview:_ChooseText]; - _SmallImage.backgroundColor = [UIColor cyanColor]; - [_SmallImage mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.equalTo(self.contentView.mas_left).with.offset(14*kWidth); - make.centerY.mas_equalTo(self.contentView.mas_centerY); - make.size.mas_equalTo(CGSizeMake(15*kWidth, 15*kHeight)); - }]; +// [self.contentView addSubview:_ChooseText]; + [self.contentView addSubview:_MRbtn]; + [self.contentView addSubview:_BJbtn]; + [self.contentView addSubview:_SCbtn]; + [_CityName mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(_SmallImage.mas_right).with.offset(25*kWidth); make.top.mas_equalTo(self.contentView.mas_top).with.offset(10*kHeight); @@ -45,21 +48,53 @@ [_StoreName mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(_CityName.mas_right).with.offset(20*kWidth); - make.centerY.mas_equalTo(_SmallImage.mas_centerY); - }]; - [_ChooseText mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.equalTo(_StoreName.mas_right).with.offset(40*kWidth); - make.centerY.mas_equalTo(_SmallImage.mas_centerY); + make.centerY.mas_equalTo(_CityName.mas_centerY); }]; + + + _SmallImage.backgroundColor = [UIColor cyanColor]; + [_SmallImage mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.contentView.mas_left).with.offset(14*kWidth); + make.top.mas_equalTo(_CityName.mas_bottom).with.offset(10*kHeight); + make.size.mas_equalTo(CGSizeMake(15*kWidth, 15*kHeight)); + }]; +// _ChooseText.backgroundColor = [UIColor cyanColor]; +// [_ChooseText mas_makeConstraints:^(MASConstraintMaker *make) { +// make.left.equalTo(_CityName.mas_left).with.offset(0); +// make.centerY.mas_equalTo(_SmallImage.mas_centerY); +// }]; + [_AddressName mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(_CityName.mas_left).with.offset(0); - make.centerY.mas_equalTo(self.contentView.mas_centerY); + make.centerY.mas_equalTo(_SmallImage.mas_centerY); }]; [_PeopleName mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(_CityName.mas_left).with.offset(0); - make.top.mas_equalTo(_AddressName.mas_bottom).with.offset(15*kHeight); + make.top.mas_equalTo(_SmallImage.mas_bottom).with.offset(10*kHeight); + }]; + + + [_MRbtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.contentView.mas_left).with.offset(14*kWidth); + make.top.mas_equalTo(_PeopleName.mas_bottom).with.offset(10*kHeight); + make.size.mas_equalTo(CGSizeMake(50*kWidth, 30*kHeight)); + }]; + + [_BJbtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.equalTo(self.contentView.mas_centerX); + make.top.mas_equalTo(_PeopleName.mas_bottom).with.offset(10*kHeight); + make.size.mas_equalTo(CGSizeMake(50*kWidth, 30*kHeight)); + }]; + [_SCbtn mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.equalTo(self.contentView.mas_right).with.offset(-14*kWidth); + make.top.mas_equalTo(_PeopleName.mas_bottom).with.offset(10*kHeight); + make.size.mas_equalTo(CGSizeMake(50*kWidth, 30*kHeight)); }]; + + + + _RightImage= [[UIImageView alloc]init]; _RightImage.image = [UIImage imageNamed:@"common_list_arrows_more"]; @@ -90,6 +125,17 @@ return label; } +-(NewBtn*)createBtn:(NSString*)title { + + NewBtn * btn = [NewBtn buttonWithType:UIButtonTypeCustom]; + btn.layer.borderWidth = 1; + btn.layer.borderColor = RGBACOLOR(149, 149, 149, 1).CGColor; + [btn setTitle:title forState:UIControlStateNormal]; + btn.titleLabel.font = Font(FontOfSize14); + [btn setTitleColor:BlackColor forState:UIControlStateNormal]; + return btn; +} + - (void)setSelected:(BOOL)selected animated:(BOOL)animated { [super setSelected:selected animated:animated]; diff --git a/zhiche--delivery/Delivery/Main/1/Cell/BillCell.h b/zhiche--delivery/Delivery/Main/1/Cell/BillCell.h new file mode 100644 index 0000000000000000000000000000000000000000..90d14ecef75fa9c4af6fab021db890858d69fabf --- /dev/null +++ b/zhiche--delivery/Delivery/Main/1/Cell/BillCell.h @@ -0,0 +1,19 @@ +// +// BillCell.h +// zhiche--delivery +// +// Created by 王亚陆 on 16/5/26. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import + +@interface BillCell : UITableViewCell + +@property (nonatomic,strong) UILabel * timeTitle; +@property (nonatomic,strong) UILabel * timeLabel; +@property (nonatomic,strong) UILabel * moneyTitle; +@property (nonatomic,strong) UILabel * moneyLabel; + + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Cell/BillCell.m b/zhiche--delivery/Delivery/Main/1/Cell/BillCell.m new file mode 100644 index 0000000000000000000000000000000000000000..cf71c0842c8554be809ea953ec6cb1d820a4cf25 --- /dev/null +++ b/zhiche--delivery/Delivery/Main/1/Cell/BillCell.m @@ -0,0 +1,85 @@ +// +// BillCell.m +// zhiche--delivery +// +// Created by 王亚陆 on 16/5/26. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "BillCell.h" +#import +@implementation BillCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ +// @property (nonatomic,strong) UILabel * timeTitle; +// @property (nonatomic,strong) UILabel * timeLabel; +// @property (nonatomic,strong) UILabel * moneyTitle; +// @property (nonatomic,strong) UILabel * moneyLabel; + + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if (self){ + + self.timeTitle = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; + self.timeLabel = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; + self.moneyTitle = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; + self.moneyLabel = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; + + [self.contentView addSubview:self.timeTitle]; + [self.contentView addSubview:self.timeLabel]; + [self.contentView addSubview:self.moneyTitle]; + [self.contentView addSubview:self.moneyLabel]; + + [self.timeTitle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.contentView.mas_left).with.offset(14*kWidth); + make.top.mas_equalTo(self.contentView.mas_top).with.offset(10*kHeight); + }]; + [self.timeLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(self.timeTitle.mas_bottom).with.offset(10*kWidth); + make.centerX.mas_equalTo(self.timeTitle.mas_centerX); + }]; +// cell.timeTitle.text = @"今天"; +// cell.timeLabel.text = @"13:12"; +// cell.moneyTitle.text = @"-2732.00"; +// cell.moneyLabel.text = @"支付定金"; + + [self.moneyTitle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(self.timeTitle.mas_right).with.offset(40*kWidth); + make.centerY.mas_equalTo(self.timeTitle.mas_centerY); + }]; + [self.moneyLabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.timeTitle.mas_right).with.offset(40*kWidth); + make.centerY.mas_equalTo(self.timeLabel.mas_centerY); + }]; + + + + } + return self; +} + +-(UILabel*)createUIlabel:(NSString *)title andFont:(CGFloat)font andColor:(UIColor*)color { + UILabel * label =[[UILabel alloc]init]; + label.text = title; + label.textColor = color; + UIFont *fnt = [UIFont fontWithName:@"HelveticaNeue" size:font];CGSize size = [label.text sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:fnt,NSFontAttributeName, nil]]; + // 名字的H + CGFloat nameH = size.height; + // 名字的W + CGFloat nameW = size.width; + label.textAlignment = NSTextAlignmentRight; + label.frame =CGRectMake(0, 0, nameW, nameH); + label.font = Font(font); + return label; +} + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Cell/PlaceOrderModel.h b/zhiche--delivery/Delivery/Main/1/Cell/PlaceOrderModel.h index b77639caab72a8f4af964b8708ab27fc36e448ea..32a174c123ebe864e641c8b1d9c747ed40efdf5a 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/PlaceOrderModel.h +++ b/zhiche--delivery/Delivery/Main/1/Cell/PlaceOrderModel.h @@ -32,6 +32,7 @@ @property (nonatomic,strong) NSString * cityName; @property (nonatomic,strong) NSString * countyName; @property (nonatomic,strong) NSString * unitName; + @property (nonatomic,strong) NSString * address; @property (nonatomic,strong) NSString * contact; @property (nonatomic,strong) NSString * phone; diff --git a/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.h b/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.h new file mode 100644 index 0000000000000000000000000000000000000000..e6015aa6e52a6644161c7ccbe9f6ab525e9f6cbd --- /dev/null +++ b/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.h @@ -0,0 +1,35 @@ +// +// QuoteCell.h +// zhiche--delivery +// +// Created by 王亚陆 on 16/5/28. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import +#import "NewBtn.h" +@interface QuoteCell : UITableViewCell + +@property (nonatomic,strong) UIView * view; +@property (nonatomic,strong) UILabel * number; +@property (nonatomic,strong) UILabel * orderNumber; +@property (nonatomic,strong) UILabel * time; + +@property (nonatomic,strong) UILabel *startAddress; +@property (nonatomic,strong) UILabel *startDetailAddress; +@property (nonatomic,strong) UILabel *startTimeL; +@property (nonatomic,strong) UILabel *endAddress; +@property (nonatomic,strong) UILabel *endDetailAddress; +@property (nonatomic,strong) UILabel *endTimeL; +@property (nonatomic,strong) UILabel *carStyle; +@property (nonatomic,strong) NewBtn *Btn1; +@property (nonatomic,strong) NewBtn *Btn2; +@property (nonatomic,strong) NewBtn *Btn3; + + + +-(void)showInfo:(NSDictionary *)dic_info ; + + + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.m b/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.m new file mode 100644 index 0000000000000000000000000000000000000000..bc2ab12510cfc963ef5025c3a604e4c16ef31c00 --- /dev/null +++ b/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.m @@ -0,0 +1,238 @@ +// +// QuoteCell.m +// zhiche--delivery +// +// Created by 王亚陆 on 16/5/28. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "QuoteCell.h" +#import +@implementation QuoteCell + +- (void)awakeFromNib { + [super awakeFromNib]; + // Initialization code +} + +- (id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{ + + self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; + if (self){ + + self.view = [[UIView alloc]initWithFrame:CGRectMake(0, 0, screenWidth, 30*kHeight)]; + self.view.backgroundColor = RGBACOLOR(149, 149, 149, 0.5); + self.number = [self createUIlabel:@"运单号:" andFont:FontOfSize14 andColor:BlackColor]; + self.orderNumber = [self createUIlabel:@"zc2713474894834747" andFont:FontOfSize14 andColor:BlackColor]; + self.time = [self createUIlabel:@"剩余时间:20分钟" andFont:FontOfSize14 andColor:BlackColor]; + [self.view addSubview:self.number]; + [self.view addSubview:self.orderNumber]; + [self.view addSubview:self.time]; + [self.contentView addSubview:self.view]; + + [self.number mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.view.mas_left).with.offset(14*kWidth); + make.centerY.mas_equalTo(self.view.mas_centerY); + }]; + [self.orderNumber mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.number.mas_right).with.offset(10*kWidth); + make.centerY.mas_equalTo(self.view.mas_centerY); + }]; + [self.time mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.view.mas_right).with.offset(-14*kWidth); + make.centerY.mas_equalTo(self.view.mas_centerY); + }]; + + self.startAddress = [self createUIlabel:@"长沙" andFont:FontOfSize14 andColor:BlackColor]; + self.startDetailAddress = [self createUIlabel:@"长沙芒果库" andFont:FontOfSize14 andColor:BlackColor]; + self.startTimeL = [self createUIlabel:@"2016-01-09" andFont:FontOfSize14 andColor:BlackColor]; + self.endAddress = [self createUIlabel:@"湖南" andFont:FontOfSize14 andColor:BlackColor]; + self.endDetailAddress = [self createUIlabel:@"湖南益阳宝马4S店" andFont:FontOfSize14 andColor:BlackColor]; + self.endTimeL = [self createUIlabel:@"2016-01-20" andFont:FontOfSize14 andColor:BlackColor]; + [self.contentView addSubview:self.startAddress]; + [self.contentView addSubview:self.startDetailAddress]; + [self.contentView addSubview:self.startTimeL]; + [self.contentView addSubview:self.endAddress]; + [self.contentView addSubview:self.endDetailAddress]; + [self.contentView addSubview:self.endTimeL]; + + [self.startAddress mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.contentView.mas_left).with.offset(Main_Width/4*kHeight); + make.top.mas_equalTo(self.view.mas_bottom).with.offset(10*kHeight); + }]; + + [self.startDetailAddress mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.startAddress.mas_centerX); + make.top.mas_equalTo(self.startAddress.mas_bottom).with.offset(10*kHeight); + }]; + + [self.startTimeL mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.startAddress.mas_centerX); + make.top.mas_equalTo(self.startDetailAddress.mas_bottom).with.offset(10*kHeight); + }]; + + [self.endAddress mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.contentView.mas_right).with.offset(-Main_Width/4*kHeight); + make.top.mas_equalTo(self.view.mas_bottom).with.offset(10*kHeight); + }]; + + [self.endDetailAddress mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.endAddress.mas_centerX); + make.top.mas_equalTo(self.endAddress.mas_bottom).with.offset(10*kHeight); + }]; + + [self.endTimeL mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.endDetailAddress.mas_centerX); + make.top.mas_equalTo(self.endDetailAddress.mas_bottom).with.offset(10*kHeight); + }]; + _Btn1 = [self createBtn:@"删除"]; + _Btn2 = [self createBtn:@"重新发布"]; + _Btn3 = [self createBtn:@"查看报价"]; + + + + + +// UIScrollView *scrollView = [[UIScrollView alloc]init]; +// [self.contentView addSubview:scrollView]; +// [scrollView mas_makeConstraints:^(MASConstraintMaker *make) { +// +// make.top.mas_equalTo(lineL2.mas_bottom).offset(3); +// make.left.mas_equalTo(20); +// make.size.mas_equalTo(CGSizeMake(screenWidth - 40, 20)); +// +// }]; +// scrollView.backgroundColor = [UIColor cyanColor]; +// scrollView.contentSize = CGSizeMake(screenWidth + 100, 20); +// scrollView.alwaysBounceHorizontal = YES; +// scrollView.showsHorizontalScrollIndicator = NO; +// +// +// //车型 +// self.carStyleL = [[UILabel alloc]init]; +// [scrollView addSubview:self.carStyleL]; +// [self.carStyleL mas_makeConstraints:^(MASConstraintMaker *make) { +// +// make.top.mas_equalTo(0); +// make.left.mas_equalTo(0); +// make.size.mas_equalTo(CGSizeMake(screenWidth + 140, 20)); +// +// }]; +// +// self.carStyleL.font = Font(14); +// self.carStyleL.text = @"沃尔沃XC90,沃尔沃V60,沃尔沃XCV40,沃尔沃S60,沃尔沃XC90(混合)"; +// + } + return self; +} + +-(void)showInfo:(NSDictionary *)dic_info{ + + + UIImageView * imageline =[[UIImageView alloc]init]; + imageline.image = [UIImage imageNamed:@"common_list_line1"]; + [self.contentView addSubview:imageline]; + [imageline mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contentView.mas_left).with.offset(0); + make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); + make.top.mas_equalTo(self.endTimeL.mas_bottom).with.offset(5*kHeight); + }]; + + + + UIScrollView *scrollView = [[UIScrollView alloc]init]; + [self.contentView addSubview:scrollView]; + [scrollView mas_makeConstraints:^(MASConstraintMaker *make) { + make.top.mas_equalTo(imageline.mas_bottom).offset(5*kHeight); + make.left.mas_equalTo(self.contentView.mas_left).with.offset(0); + make.size.mas_equalTo(CGSizeMake(screenWidth, 20*kHeight)); + }]; + scrollView.contentSize = CGSizeMake(screenWidth + 150*2*kWidth, 20*kHeight); + scrollView.alwaysBounceHorizontal = YES; + scrollView.showsHorizontalScrollIndicator = NO; + self.carStyle = [self createUIlabel:@"沃尔沃XC90,沃尔沃V60,沃尔沃XCV40,沃尔沃XC90,沃尔沃V60,沃尔沃XCV40,沃尔沃S60,沃尔沃XC90(混合)" andFont:FontOfSize14 andColor:BlackColor]; + [scrollView addSubview:self.carStyle]; + [self.carStyle mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(scrollView.mas_left).with.offset(0); + make.centerY.mas_equalTo(scrollView.mas_centerY); + }]; + [self.contentView addSubview:_Btn1]; + [self.contentView addSubview:_Btn2]; + [self.contentView addSubview:_Btn3]; + [_Btn1 mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(self.contentView.mas_left).with.offset(0); + make.size.mas_equalTo(CGSizeMake(Main_Width/3, 35*kHeight)); + make.top.mas_equalTo(scrollView.mas_bottom).with.offset(10*kHeight); + }]; + [_Btn2 mas_makeConstraints:^(MASConstraintMaker *make) { + make.centerX.mas_equalTo(self.contentView.mas_centerX); + make.size.mas_equalTo(CGSizeMake(Main_Width/3, 35*kHeight)); + make.top.mas_equalTo(scrollView.mas_bottom).with.offset(10*kHeight); + }]; + [_Btn3 mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.contentView.mas_right).with.offset(0); + make.size.mas_equalTo(CGSizeMake(Main_Width/3, 35*kHeight)); + make.top.mas_equalTo(scrollView.mas_bottom).with.offset(10*kHeight); + }]; + + UILabel * price = [self createUIlabel:@"(12)" andFont:FontOfSize14 andColor:[UIColor redColor]]; + [self.contentView addSubview:price]; + [price mas_makeConstraints:^(MASConstraintMaker *make) { + make.right.mas_equalTo(self.contentView.mas_right).with.offset(-10*kWidth); + make.centerY.mas_equalTo(_Btn3.mas_centerY); + }]; + + + NSString * string = dic_info[@"string"]; + if ([string isEqualToString:@"3"]) { + + + }else{ + _Btn1.hidden = YES; + [_Btn2 setTitle:@"取消订单" forState:UIControlStateNormal]; + [_Btn3 setTitle:@"查看报价" forState:UIControlStateNormal]; + + } + +} + + +-(NewBtn*)createBtn:(NSString*)title { + + NewBtn * btn = [NewBtn buttonWithType:UIButtonTypeCustom]; + btn.layer.borderWidth = 1; + btn.layer.borderColor = RGBACOLOR(149, 149, 149, 1).CGColor; + [btn setTitle:title forState:UIControlStateNormal]; + [btn setTitleColor:BlackColor forState:UIControlStateNormal]; + btn.titleLabel.font = Font(FontOfSize14); + + return btn; +} + + +-(UILabel*)createUIlabel:(NSString *)title andFont:(CGFloat)font andColor:(UIColor*)color { + UILabel * label =[[UILabel alloc]init]; + label.text = title; + label.textColor = color; + UIFont *fnt = [UIFont fontWithName:@"HelveticaNeue" size:font];CGSize size = [label.text sizeWithAttributes:[NSDictionary dictionaryWithObjectsAndKeys:fnt,NSFontAttributeName, nil]]; + // 名字的H + CGFloat nameH = size.height; + // 名字的W + CGFloat nameW = size.width; + label.textAlignment = NSTextAlignmentRight; + label.frame =CGRectMake(0, 0, nameW, nameH); + label.font = Font(font); + return label; +} + + + + + +- (void)setSelected:(BOOL)selected animated:(BOOL)animated { + [super setSelected:selected animated:animated]; + + // Configure the view for the selected state +} + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/ActionSheet/FindQuoteVC.h b/zhiche--delivery/Delivery/Main/1/Controller/ActionSheet/FindQuoteVC.h new file mode 100644 index 0000000000000000000000000000000000000000..199e5c9a0905bfbff37bef560aa8250ac83f1ad4 --- /dev/null +++ b/zhiche--delivery/Delivery/Main/1/Controller/ActionSheet/FindQuoteVC.h @@ -0,0 +1,13 @@ +// +// FindQuoteVC.h +// zhiche--delivery +// +// Created by 王亚陆 on 16/5/28. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import +#import "NavViewController.h" +@interface FindQuoteVC : NavViewController + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/ActionSheet/FindQuoteVC.m b/zhiche--delivery/Delivery/Main/1/Controller/ActionSheet/FindQuoteVC.m new file mode 100644 index 0000000000000000000000000000000000000000..100999ad6eb606ab4d4a260eb65e44b82c562ad6 --- /dev/null +++ b/zhiche--delivery/Delivery/Main/1/Controller/ActionSheet/FindQuoteVC.m @@ -0,0 +1,107 @@ +// +// FindQuoteVC.m +// zhiche--delivery +// +// Created by 王亚陆 on 16/5/28. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "FindQuoteVC.h" +#import "QuoteCell.h" +#import "NewBtn.h" +@interface FindQuoteVC () +{ + UIView * nav; + UITableView * table; +} +@end + +@implementation FindQuoteVC + +- (void)viewDidLoad { + [super viewDidLoad]; + nav = [self createNav:@"查看报价"]; + [self.view addSubview:nav]; + + table = [[UITableView alloc]initWithFrame:CGRectMake(0, 65*kHeight, Main_Width,Main_height-65*kHeight) style:UITableViewStylePlain]; + [table setSeparatorStyle:UITableViewCellSeparatorStyleNone]; + table.delegate = self; + table.dataSource = self; + [table reloadData]; + + [self.view addSubview:table]; + +} +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + + static NSString *str=@"str"; + + QuoteCell * cell = [tableView dequeueReusableCellWithIdentifier:str]; + if (cell ==nil) { + cell = [[QuoteCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:str]; + } + cell.selectionStyle = UITableViewCellSelectionStyleNone; + + NSMutableArray * arr = @[@"2",@"3",@"3",@"2",@"2",@"2"].mutableCopy; + + NSMutableDictionary * dic = [[NSMutableDictionary alloc]init]; + [dic setObject:arr[indexPath.row] forKey:@"string"]; + [cell showInfo:dic]; + cell.Btn1.indexpath = indexPath; + cell.Btn2.indexpath = indexPath; + cell.Btn3.indexpath = indexPath; + + [cell.Btn1 addTarget:self action:@selector(pressBtn1:) forControlEvents:UIControlEventTouchUpInside]; + [cell.Btn2 addTarget:self action:@selector(pressBtn2:) forControlEvents:UIControlEventTouchUpInside]; + [cell.Btn3 addTarget:self action:@selector(pressBtn3:) forControlEvents:UIControlEventTouchUpInside]; + + + return cell; +} +-(void)pressBtn1:(NewBtn*)sender{ + + + NSLog(@"Btn1:%ld",(long)sender.indexpath.row); + +} +-(void)pressBtn2:(NewBtn*)sender{ + + NSLog(@"Btn2:%ld",(long)sender.indexpath.row); + +} +-(void)pressBtn3:(NewBtn*)sender{ + + NSLog(@"Btn3:%ld",(long)sender.indexpath.row); + +} + + +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 190*kHeight; + +} +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + + return 6; +} + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.h b/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.h index 520971a1ac4641fd895a9a53b1e346e122399c18..ccfeb94d0bf932587f69a3305cef80853ed5b706 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.h +++ b/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.h @@ -12,7 +12,7 @@ @interface AddressVC : NavViewController @property (nonatomic,strong) NSString * addresstype; //0:发货地址,1:收货地址 - +@property (nonatomic,strong) NSMutableDictionary * dataSouce; @property (nonatomic,copy) void (^callBackAreaId)(NSString *str1,NSString *str2,NSString *str3,NSString *str4,NSString *str5,NSString *str6); @end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.m b/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.m index 4da35d8b5a9c3457564e3c15029cef495871171c..9252bec6084a865058a6046ee595edb4e211a758 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.m +++ b/zhiche--delivery/Delivery/Main/1/Controller/AddressVC.m @@ -37,6 +37,17 @@ @implementation AddressVC +- (instancetype)init + +{ + self = [super init]; + if (self) { + self.dataSouce = [[NSMutableDictionary alloc]init]; + } + return self; + +} + - (void)viewDidLoad { [super viewDidLoad]; @@ -48,14 +59,12 @@ nav = [self createNav:@"收车地址编辑"]; [dic setObject:@"1" forKey:@"addresstype"]; //地址类型(0:发车地址,1:送达地址) - }else{ nav = [self createNav:@"发车地址编辑"]; [dic setObject:@"0" forKey:@"addresstype"]; //地址类型(0:发车地址,1:送达地址) } [self.view addSubview:nav]; - [self createUI]; [dic setObject:@"" forKey:@"provincecode"];//省编码 [dic setObject:@"" forKey:@"provincename"]; //省名称 @@ -63,7 +72,6 @@ [dic setObject:@"" forKey:@"cityname"]; //市名称 [dic setObject:@"" forKey:@"countycode"];//县编码 [dic setObject:@"" forKey:@"countyname"]; //县名称 - [dic setObject:@"" forKey:@"contact"];//联系人 [dic setObject:@"" forKey:@"phone"]; //联系电话 @@ -71,7 +79,7 @@ [dic setObject:@"" forKey:@"address"];//详细地址 [dic setObject:@"F" forKey:@"isdefault"];//是否默认(F:否,T:是) [dic setObject:@"" forKey:@"comment"];//备注 - + [self createUI]; } -(void)viewWillAppear:(BOOL)animated{ @@ -97,14 +105,68 @@ -(void)createUI{ NSArray * arrName = nil; NSArray * FieldName =nil; +// [dic setObject:@"" forKey:@"provincecode"];//省编码 +// [dic setObject:@"" forKey:@"provincename"]; //省名称 +// [dic setObject:@"" forKey:@"citycode"];//市编码 +// [dic setObject:@"" forKey:@"cityname"]; //市名称 +// [dic setObject:@"" forKey:@"countycode"];//县编码 +// [dic setObject:@"" forKey:@"countyname"]; //县名称 +// +// [dic setObject:@"" forKey:@"contact"];//联系人 +// [dic setObject:@"" forKey:@"phone"]; //联系电话 +// [dic setObject:@"" forKey:@"unitname"];//单位名称 +// [dic setObject:@"" forKey:@"address"];//详细地址 +// [dic setObject:@"F" forKey:@"isdefault"];//是否默认(F:否,T:是) +// [dic setObject:@"" forKey:@"comment"];//备注 + + + // address = Xiangxidizhi; + // addressType = 0; + // cityCode = 120100; + // cityName = "\U5e02\U8f96\U533a"; + // comment = ""; + // contact = Wangyalu; + // countyCode = 120101; + // countyName = "\U548c\U5e73\U533a"; + // createTime = 1464319546000; + // id = 58; + // isDefault = F; + // phone = 15011578178; + // provinceCode = 120000; + // provinceName = "\U5929\U6d25\U5e02"; + // unitName = Fachedanwei; + // updateTime = 1464319546000; + // userId = 1; + + if ([_addresstype isEqualToString:@"0"]) { arrName = @[@"区域:",@"发车单位:",@"详细地址:",@"联系人:",@"联系电话:"]; - FieldName = @[@"请输入发车单位",@"请输入详细地址",@"请输入联系人",@"请输入联系电话"]; - }else{ + FieldName = @[@"请输入发车单位",@"请输入详细地址",@"请输入联系人",@"请输入联系电话"]; + } + else{ arrName = @[@"区域:",@"收车单位:",@"详细地址:",@"联系人:",@"联系电话:"]; FieldName = @[@"请输入收车单位",@"请输入详细地址",@"请输入联系人",@"请输入联系电话"]; } +if (self.dataSouce[@"id"]) { + + FieldName = @[self.dataSouce[@"unitName"],self.dataSouce[@"address"],self.dataSouce[@"contact"],self.dataSouce[@"phone"]]; + [dic setObject:self.dataSouce[@"addressType"] forKey:@"addresstype"]; //地址类型(0:发车地址,1:送达地址) +// [dic setObject:self.dataSouce[@"provinceCode"] forKey:@"provincecode"];//省编码 +// [dic setObject:self.dataSouce[@"provinceName"] forKey:@"provincename"]; //省名称 +// [dic setObject:self.dataSouce[@"cityCode"] forKey:@"citycode"];//市编码 +// [dic setObject:self.dataSouce[@"cityName"] forKey:@"cityname"]; //市名称 +// [dic setObject:self.dataSouce[@"countyCode"] forKey:@"countycode"];//县编码 +// [dic setObject:self.dataSouce[@"countyName"] forKey:@"countyname"]; //县名称 + [dic setObject:self.dataSouce[@"contact"] forKey:@"contact"];//联系人 + [dic setObject:self.dataSouce[@"phone"] forKey:@"phone"]; //联系电话 + [dic setObject:self.dataSouce[@"unitName"] forKey:@"unitname"];//单位名称 + [dic setObject:self.dataSouce[@"address"] forKey:@"address"];//详细地址 + [dic setObject:@"F" forKey:@"isdefault"];//是否默认(F:否,T:是) + [dic setObject:self.dataSouce[@"comment"] forKey:@"comment"];//备注 + +} + for (int i=0; i +#import "NavViewController.h" + +@interface BillVC : NavViewController + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/BillVC.m b/zhiche--delivery/Delivery/Main/1/Controller/BillVC.m new file mode 100644 index 0000000000000000000000000000000000000000..aa83dcf3cf38ff8dd6dfa1de884f55e12c863211 --- /dev/null +++ b/zhiche--delivery/Delivery/Main/1/Controller/BillVC.m @@ -0,0 +1,95 @@ +// +// BillVC.m +// zhiche--delivery +// +// Created by 王亚陆 on 16/5/26. +// Copyright © 2016年 LeeBruce. All rights reserved. +// + +#import "BillVC.h" +#import "BillCell.h" +@interface BillVC () +{ + UIImageView * nav; + UITableView * table; +} +@end + +@implementation BillVC + +- (void)viewDidLoad { + [super viewDidLoad]; + nav = [self createNav:@"我的账单"]; + table = [[UITableView alloc]initWithFrame:CGRectMake(0, 64, Main_Width, Main_height-64) style:UITableViewStylePlain]; + + [table setSeparatorStyle:UITableViewCellSeparatorStyleNone]; + table.delegate = self; + table.dataSource = self; + [self.view addSubview:table]; + [self.view addSubview:nav]; +} + + +-(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ + + + static NSString *str=@"str"; + BillCell * cell = [tableView dequeueReusableCellWithIdentifier:str]; + if (cell ==nil) { + cell = [[BillCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:str]; + } + cell.timeTitle.text = @"今天"; + cell.timeLabel.text = @"13:12"; + cell.moneyTitle.text = @"-2732.00"; + cell.moneyLabel.text = @"支付定金"; + return cell; +} + +-(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ + + return 60*kHeight; + +} +-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ + + return 3; +} +//设置分区个数 +-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView +{ + return 2; +} + +//-(UIView*)tableView:(UITableView *)tableView viewForHeaderInSection:(NSInteger)section{ +// +// return _headerViewArr[section]; +//} +-(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ + + return 43*kHeight; +} + +-(NSString*)tableView:(UITableView *)tableView titleForHeaderInSection:(NSInteger)section{ + + return (section==0)?@"5月":@"4月"; +} + + + + +- (void)didReceiveMemoryWarning { + [super didReceiveMemoryWarning]; + // Dispose of any resources that can be recreated. +} + +/* +#pragma mark - Navigation + +// In a storyboard-based application, you will often want to do a little preparation before navigation +- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender { + // Get the new view controller using [segue destinationViewController]. + // Pass the selected object to the new view controller. +} +*/ + +@end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.h b/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.h index b78f5a3ba6dffbb68d9e024328fe209616fa72a5..84bff3abc5d6a617a30686ec3654eea3ab0e44fd 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.h +++ b/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.h @@ -15,4 +15,5 @@ @property (nonatomic,strong) NSMutableArray * AddressArr; @property (nonatomic,strong) NSMutableArray * CarArr; @property (nonatomic,strong) NSMutableArray * CarAddress; +@property (nonatomic,strong) NSString * OrderCode; @end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.m b/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.m index 29ce2f1997623c83dcd688d0cce168a194da8e11..4765e6effc6f61ef63d38303bc614d5e5187233f 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.m +++ b/zhiche--delivery/Delivery/Main/1/Controller/CarShipVC.m @@ -12,6 +12,7 @@ #import "SmallCarTableCell.h" #import "ActionSheetPicker.h" #import "Common.h" +#import "CarCell.h" #import #define TimeTag 100 #define TableTag 200 @@ -22,12 +23,14 @@ UIImageView * nav; UIScrollView * scroll; UITableView * table; - UITableView * smallTabel; + UITableView * CarTabel; NSMutableDictionary * dicUrl; Common * Com; } @property (nonatomic,strong) UIView * BackView; +@property (nonatomic,strong) NSMutableArray * headerViewArr; +@property (nonatomic,strong) NSMutableArray *CarName; @end @@ -40,6 +43,7 @@ self.AddressArr = [[NSMutableArray alloc]init]; self.CarArr = [[NSMutableArray alloc]init]; self.CarAddress = [[NSMutableArray alloc]init]; + self.OrderCode = [[NSString alloc]init]; } return self; @@ -52,89 +56,9 @@ nav = [self createNav:@"下单发运"]; -// { -// address = Soho11; -// addressType = 0; -// cityCode = 130100; -// cityName = "\U77f3\U5bb6\U5e84\U5e02"; -// comment = ""; -// contact = Wangyalu; -// countyCode = 130101; -// countyName = "\U5e02\U8f96\U533a"; -// createTime = 1463727652000; -// id = 32; -// isDefault = T; -// phone = 15011578178; -// provinceCode = 130000; -// provinceName = "\U6cb3\U5317\U7701"; -// unitName = Fache; -// updateTime = 1463727652000; -// userId = 4; -// } - -// address = Soho11; -// addressType = 0; -// cityCode = 130100; -// cityName = "\U77f3\U5bb6\U5e84\U5e02"; -// comment = ""; -// contact = Wangyalu; -// countyCode = 130101; -// countyName = "\U5e02\U8f96\U533a"; -// createTime = 1463727652000; -// id = 32; -// isDefault = T; -// phone = 15011578178; -// provinceCode = 130000; -// provinceName = "\U6cb3\U5317\U7701"; -// unitName = Fache; -// updateTime = 1463727652000; -// userId = 4; - - - dicUrl = [[NSMutableDictionary alloc]init]; - [dicUrl setObject:@"2" forKey:@"departaddrid"];//发运地址id 2-5 - [dicUrl setObject:@"8" forKey:@"receiptaddrid"];//目的地地址id 8-9 - // [dicUrl setObject:a forKey:@"effectivetime"];//有效时间 - [dicUrl setObject:@"2016-5-19" forKey:@"deliverydate"];//提车日期 - [dicUrl setObject:@"06:10-10:10" forKey:@"deliverytime"];//提车时间 - [dicUrl setObject:@"2016-5-20" forKey:@"arrivedate"];//到达日期 - [dicUrl setObject:@"22:10-16:10" forKey:@"arrivetime"];//到达时间 - [dicUrl setObject:@"2" forKey:@"amount"];//车辆总数 - [dicUrl setObject:@"200" forKey:@"distance"];//运距 - [dicUrl setObject:@"T" forKey:@"isurgent"];//是否加急 - [dicUrl setObject:@"1000" forKey:@"advicecost"];//建议价格 - [dicUrl setObject:@"1000" forKey:@"customcost"];//自定义价格 - [dicUrl setObject:@"备注" forKey:@"comment"];//备注 - [dicUrl setObject:@"1" forKey:@"vehiclescount"];//车型数量 - - - NSMutableArray * arr = [[NSMutableArray alloc]init]; - NSMutableDictionary * dic = [[NSMutableDictionary alloc]init]; - [dic setObject:@"3" forKey:@"brandid"];//品牌ids - [dic setObject:@"品牌names" forKey:@"brandname"];//品牌names - [dic setObject:@"2054" forKey:@"vehicleid"];//车型ids - [dic setObject:@"车型names" forKey:@"vehiclename"];//车型names - [dic setObject:@"1" forKey:@"vehiclecount"];//车型数量 - [arr addObject:dic]; - - NSMutableDictionary * dic1 = [[NSMutableDictionary alloc]init]; - [dic1 setObject:@"3" forKey:@"brandid"];//品牌ids - [dic1 setObject:@"品牌123" forKey:@"brandname"];//品牌names - [dic1 setObject:@"2054" forKey:@"vehicleid"];//车型ids - [dic1 setObject:@"车型123" forKey:@"vehiclename"];//车型names - [dic1 setObject:@"10" forKey:@"vehiclecount"];//车型数量 - - [arr addObject:dic1]; - - - - NSData * jsonData = [NSJSONSerialization dataWithJSONObject:arr options:NSJSONWritingPrettyPrinted error:nil]; - NSString * jsonString = [[NSString alloc]initWithData:jsonData encoding:NSUTF8StringEncoding]; - NSLog(@"jsonString===%@",jsonString); - - [dicUrl setObject:jsonString forKey:@"vehiclesbrands"]; - - + self.CarName = [[NSMutableArray alloc]init]; + self.headerViewArr = [[NSMutableArray alloc]init]; + [self.view addSubview:nav]; [self createScroll]; @@ -143,46 +67,8 @@ } -(void)createUI:(NSMutableArray *)AddressArr{ -// { -// address = Wangyalu; -// addressType = 1; -// cityCode = 130100; -// cityName = "\U77f3\U5bb6\U5e84\U5e02"; -// comment = ""; -// contact = Wangyalu; -// countyCode = 130101; -// countyName = "\U5e02\U8f96\U533a"; -// createTime = 1463624084000; -// id = 2; -// isDefault = T; -// phone = 11111111111; -// provinceCode = 130000; -// provinceName = "\U6cb3\U5317\U7701"; -// unitName = Wangyalu; -// updateTime = 1463624084000; -// userId = 4; -// }, -// { -// address = Fachedanwei; -// addressType = 0; -// cityCode = 150900; -// cityName = "\U4e4c\U5170\U5bdf\U5e03\U5e02"; -// comment = ""; -// contact = Wangyalu; -// countyCode = 150902; -// countyName = "\U96c6\U5b81\U533a"; -// createTime = 1463624076000; -// id = 8; -// isDefault = T; -// phone = 15011578178; -// provinceCode = 150000; -// provinceName = "\U5185\U8499\U53e4\U81ea\U6cbb\U533a"; -// unitName = FacheDANWEI; -// updateTime = 1463624076000; -// userId = 4; -// } -// ) - + + UIImageView * imageLogo = [[UIImageView alloc]init]; imageLogo.backgroundColor = [UIColor cyanColor]; [_BackView addSubview:imageLogo]; @@ -192,12 +78,20 @@ make.size.mas_equalTo(CGSizeMake(15*kWidth, 15*kHeight)); }]; - UILabel * label = [self createUIlabel:@"SO201604190009" andFont:FontOfSize14 andColor:BlackColor]; + UILabel * label = [self createUIlabel:self.OrderCode andFont:FontOfSize14 andColor:BlackColor]; [_BackView addSubview:label]; [label mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(imageLogo.mas_right).with.offset(25*kWidth); make.top.mas_equalTo(_BackView.mas_top).with.offset(10*kHeight); }]; + + UILabel * CarModel = [self createUIlabel:@"地址" andFont:14.0 andColor:RGBACOLOR(149, 149, 149, 1)]; + [_BackView addSubview:CarModel]; + [CarModel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(_BackView.mas_left).with.offset(14*kWidth); + make.top.mas_equalTo(label.mas_bottom).with.offset(10*kHeight); + }]; + //第一条横线 UIView * Sline1 =[[UIView alloc]init]; @@ -205,7 +99,7 @@ [_BackView addSubview:Sline1]; [Sline1 mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(_BackView.mas_left).with.offset(0); - make.top.equalTo(label.mas_bottom).with.offset(10*kHeight); + make.top.equalTo(CarModel.mas_bottom).with.offset(10*kHeight); make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); }]; @@ -289,6 +183,13 @@ make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); }]; + UILabel * timelabel = [self createUIlabel:@"时间" andFont:14.0 andColor:RGBACOLOR(149, 149, 149, 1)]; + [_BackView addSubview:timelabel]; + [timelabel mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.equalTo(_BackView.mas_left).with.offset(14*kWidth); + make.top.mas_equalTo(Sline3.mas_bottom).with.offset(10*kHeight); + }]; + NSArray * arrTime = @[@"提车时间:",@"送达时间:"]; for (int i=0; i #import "PlaceOrderModel.h" @interface ChooseAddressVC () @@ -173,23 +174,91 @@ NSString * people = [NSString stringWithFormat:@"%@ %@",placeModel.contact,placeModel.phone]; cell.PeopleName.text = people; cell.RightImage.hidden = YES; + cell.MRbtn.indexpath = indexPath; + cell.BJbtn.indexpath = indexPath; + cell.SCbtn.indexpath = indexPath; + + [cell.MRbtn addTarget:self action:@selector(pressMrBtn:) forControlEvents:UIControlEventTouchUpInside]; + [cell.BJbtn addTarget:self action:@selector(pressBjBtn:) forControlEvents:UIControlEventTouchUpInside]; + [cell.SCbtn addTarget:self action:@selector(pressScBtn:) forControlEvents:UIControlEventTouchUpInside]; + + // if (indexPath.row==0) { // cell.ChooseText.text = @"默认"; // } - UIImageView * imageline =[[UIImageView alloc]init]; - imageline.image = [UIImage imageNamed:@"common_list_line1"]; - [cell.contentView addSubview:imageline]; - [imageline mas_makeConstraints:^(MASConstraintMaker *make) { - make.left.mas_equalTo(cell.contentView).with.offset(0); - make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); - make.bottom.mas_equalTo(cell.contentView.mas_bottom); - }]; + UIImageView * imageline =[[UIImageView alloc]init]; + imageline.image = [UIImage imageNamed:@"common_list_line1"]; + [cell.contentView addSubview:imageline]; + [imageline mas_makeConstraints:^(MASConstraintMaker *make) { + make.left.mas_equalTo(cell.contentView).with.offset(0); + make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); + make.bottom.mas_equalTo(cell.contentView.mas_bottom); + }]; return cell; } + +-(void)pressScBtn:(NewBtn*)sender{ + + + NSInteger index = sender.indexpath.row; + NSString * string = [NSString stringWithFormat:@"%@%@",addressDelete_Url,dataSouce[index][@"id"]]; +// addressDelete_Url + NSLog(@"%@",dataSouce[index][@"id"]); + [Com afPostRequestWithUrlString:string parms:nil finishedBlock:^(id responseObj) { + + NSMutableDictionary * dicObj =[NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; + NSLog(@"%@",dicObj); + + } failedBlock:^(NSString *errorMsg) { + NSLog(@"%@",errorMsg); + }]; + + +} + +-(void)pressBjBtn:(NewBtn*)sender{ + NSLog(@"pressBjBtn:%ld",(long)sender.indexpath.row); + AddressVC * address = [[AddressVC alloc]init]; + + NSLog(@"%@",dataSouce[sender.indexpath.row]); + + address.addresstype = dataSouce[sender.indexpath.row][@"addressType"]; + address.dataSouce = dataSouce[sender.indexpath.row]; + [self.navigationController pushViewController:address animated:YES]; + +} + + + +-(void)pressMrBtn:(NewBtn*)sender{ + NSLog(@"pressMrBtn:%ld",(long)sender.indexpath.row); + NSInteger index = sender.indexpath.row; + NSString * string = dataSouce[index][@"id"]; + + NSMutableDictionary * dic = [[NSMutableDictionary alloc]init]; + [dic setObject:string forKey:@"id"]; + [dic setObject:@"T" forKey:@"isdefault"]; + + [Com afPostRequestWithUrlString:address_Yes_Fault_Url parms:dic finishedBlock:^(id responseObj) { + + NSMutableDictionary * dicObj =[NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; + NSLog(@"%@",dicObj); + + } failedBlock:^(NSString *errorMsg) { + NSLog(@"%@",errorMsg); + }]; + +} + + + + + + -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - return 100*kHeight; + return 130*kHeight; } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ diff --git a/zhiche--delivery/Delivery/Main/1/Controller/HomeViewController.m b/zhiche--delivery/Delivery/Main/1/Controller/HomeViewController.m index eb1e16104ec481e8702c5d69e60b5b4cee334691..fd1295449f88cb32be39836dea4bb1c68b1b03fc 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/HomeViewController.m +++ b/zhiche--delivery/Delivery/Main/1/Controller/HomeViewController.m @@ -13,6 +13,8 @@ #import "PlaceOrderVC.h" #import "MineOrderVC.h" #import "RootViewController.h" +#import "BillVC.h" +#import "FindQuoteVC.h" #import "TESTViewController.h" @@ -167,7 +169,40 @@ -(void)pressBtn:(UIButton*)sender{ -// + switch (sender.tag) { + case 0:{ + PlaceOrderVC * placeOrder = [[PlaceOrderVC alloc]init]; + [self.navigationController pushViewController:placeOrder animated:YES]; + +// WLOrderController * orderVC = [[WLOrderController alloc]init]; +// [self.navigationController pushViewController:orderVC animated:YES]; + } + break; + + case 1:{ +// +// MineOrderVC *mineVC = [[MineOrderVC alloc]init]; +// [self.navigationController pushViewController:mineVC animated:YES]; + + FindQuoteVC * quote = [[FindQuoteVC alloc]init]; + [self.navigationController pushViewController:quote animated:YES]; + + } + break; + + case 5:{ + + BillVC * bill = [[BillVC alloc]init]; + [self.navigationController pushViewController:bill animated:YES]; + + } + break; + + + default: + break; + } +// // switch (sender.tag) { // case 0:{ // PlaceOrderVC * placeOrder = [[PlaceOrderVC alloc]init]; diff --git a/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.h b/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.h index e0beccadbe05489c780b4b2bab0bbd4665a103ff..220bab43a467a9afe13b3def63e47bb8400f023b 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.h +++ b/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.h @@ -9,6 +9,6 @@ #import #import "NavViewController.h" -@interface PlaceOrderVC : NavViewController +@interface PlaceOrderVC : NavViewController @end diff --git a/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.m b/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.m index 89d1b1cf8c4cce601947feadecaa63b525363876..5e4e561221c1a132c2b858132155cf77b0b46e2f 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.m +++ b/zhiche--delivery/Delivery/Main/1/Controller/PlaceOrderVC.m @@ -32,6 +32,7 @@ PlaceOrderModel * PlaceModel; UIView * backview ; UIScrollView * scroll; + NSMutableDictionary * dicUrl; // UIView * SectionView; } @@ -66,7 +67,6 @@ self.view.backgroundColor = WhiteColor; nav = [self createNav:@"下单发运"]; [self.view addSubview:nav]; - [self createUI]; [self createData]; @@ -75,6 +75,49 @@ _CarName = [[NSMutableArray alloc]init]; _RemoveArr = [[NSMutableArray alloc]init]; _timeChoose = @[@"00点:08点",@"08点:16点",@"16点:24点"]; + + + dicUrl = [[NSMutableDictionary alloc]init]; + [dicUrl setObject:@"2" forKey:@"departaddrid"];//发运地址id 2-5 + [dicUrl setObject:@"8" forKey:@"receiptaddrid"];//目的地地址id 8-9 + // [dicUrl setObject:a forKey:@"effectivetime"];//有效时间 + [dicUrl setObject:@"2016-5-19" forKey:@"deliverydate"];//提车日期 + [dicUrl setObject:@"06:10-10:10" forKey:@"deliverytime"];//提车时间 + [dicUrl setObject:@"2016-5-20" forKey:@"arrivedate"];//到达日期 + [dicUrl setObject:@"22:10-16:10" forKey:@"arrivetime"];//到达时间 + [dicUrl setObject:@"200" forKey:@"distance"];//运距 +// [dicUrl setObject:@"2" forKey:@"amount"];//车辆总数 + [dicUrl setObject:@"T" forKey:@"isurgent"];//是否加急 + [dicUrl setObject:@"1000" forKey:@"advicecost"];//建议价格 + [dicUrl setObject:@"1000" forKey:@"customcost"];//自定义价格 + [dicUrl setObject:@"备注" forKey:@"comment"];//备注 +// [dicUrl setObject:@"1" forKey:@"vehiclescount"];//车型数量 + + NSMutableArray * arr = [[NSMutableArray alloc]init]; + NSMutableDictionary * dic = [[NSMutableDictionary alloc]init]; + [dic setObject:@"3" forKey:@"brandid"];//品牌ids + [dic setObject:@"品牌names" forKey:@"brandname"];//品牌names + [dic setObject:@"2054" forKey:@"vehicleid"];//车型ids + [dic setObject:@"车型names" forKey:@"vehiclename"];//车型names + [dic setObject:@"1" forKey:@"vehiclecount"];//车型数量 + [arr addObject:dic]; + + NSMutableDictionary * dic1 = [[NSMutableDictionary alloc]init]; + [dic1 setObject:@"3" forKey:@"brandid"];//品牌ids + [dic1 setObject:@"品牌123" forKey:@"brandname"];//品牌names + [dic1 setObject:@"2054" forKey:@"vehicleid"];//车型ids + [dic1 setObject:@"车型123" forKey:@"vehiclename"];//车型names + [dic1 setObject:@"10" forKey:@"vehiclecount"];//车型数量 + + [arr addObject:dic1]; + + + + NSData * jsonData = [NSJSONSerialization dataWithJSONObject:arr options:NSJSONWritingPrettyPrinted error:nil]; + NSString * jsonString = [[NSString alloc]initWithData:jsonData encoding:NSUTF8StringEncoding]; + NSLog(@"jsonString===%@",jsonString); + [dicUrl setObject:jsonString forKey:@"vehiclesbrands"]; + } -(void)createTableView{ @@ -179,18 +222,7 @@ NSMutableArray * arr =[[NSMutableArray alloc]init]; arr = [NSMutableArray arrayWithArray:dic[@"data"]]; NSLog(@"%@",arr); - - _dataSouce = dic[@"data"]; //1 0 - for (int i =0; i0) { + cell.MRbtn.hidden = YES; + cell.BJbtn.hidden = YES; + cell.SCbtn.hidden = YES; + + if (indexPath.row==0) { - PlaceModel = [PlaceOrderModel ModelWithDic:_dataSouce[0]]; - NSString * cityName = [NSString stringWithFormat:@"%@%@%@",PlaceModel.provinceName,PlaceModel.cityName,PlaceModel.countyName]; - cell.CityName.text = cityName; - cell.StoreName.text = PlaceModel.unitName; - cell.AddressName.text = PlaceModel.address; - NSString * people = [NSString stringWithFormat:@"%@ %@",PlaceModel.contact,PlaceModel.phone]; - cell.PeopleName.text = people; + for (int i =0; i<_dataSouce.count; i++) { + if ([_dataSouce[i][@"addressType"] isEqualToString:@"0"]) { + PlaceModel = [PlaceOrderModel ModelWithDic:_dataSouce[i]]; + NSString * cityName = [NSString stringWithFormat:@"%@%@%@",PlaceModel.provinceName,PlaceModel.cityName,PlaceModel.countyName]; + cell.CityName.text = cityName; + cell.StoreName.text = PlaceModel.unitName; + cell.AddressName.text = PlaceModel.address; + NSString * people = [NSString stringWithFormat:@"%@ %@",PlaceModel.contact,PlaceModel.phone]; + cell.PeopleName.text = people; + } + } // cell.RightImage.hidden = YES; // else{ // cell.textLabel.text = @"点击设置发货地址"; @@ -521,13 +642,18 @@ // } } else{ - PlaceModel = [PlaceOrderModel ModelWithDic:_dataSouce[1]]; - NSString * cityName = [NSString stringWithFormat:@"%@%@%@",PlaceModel.provinceName,PlaceModel.cityName,PlaceModel.countyName]; - cell.CityName.text = cityName; - cell.StoreName.text = PlaceModel.unitName; - cell.AddressName.text = PlaceModel.address; - NSString * people = [NSString stringWithFormat:@"%@ %@",PlaceModel.contact,PlaceModel.phone]; - cell.PeopleName.text = people; + for (int i =0; i<_dataSouce.count; i++) { + if ([_dataSouce[i][@"addressType"] isEqualToString:@"1"]) { + PlaceModel = [PlaceOrderModel ModelWithDic:_dataSouce[i]]; + NSString * cityName = [NSString stringWithFormat:@"%@%@%@",PlaceModel.provinceName,PlaceModel.cityName,PlaceModel.countyName]; + cell.CityName.text = cityName; + cell.StoreName.text = PlaceModel.unitName; + cell.AddressName.text = PlaceModel.address; + NSString * people = [NSString stringWithFormat:@"%@ %@",PlaceModel.contact,PlaceModel.phone]; + cell.PeopleName.text = people; + } + } + // cell.RightImage.hidden = YES; // else{ // cell.textLabel.text = @"点击设置收货地址"; @@ -535,7 +661,6 @@ // cell.textLabel.font = Font(12); // cell.SmallImage.hidden = YES; // } - } } cell.selectionStyle = UITableViewCellSelectionStyleNone; if (indexPath.row ==0) { @@ -645,7 +770,6 @@ [_CarTable mas_updateConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(45*(_CarName.count+[_CarName[Btntag-1200][@"vinArr"] count]-1)*kHeight+45*kHeight); }]; - } } } @@ -667,7 +791,7 @@ [_headerViewArr removeObjectAtIndex:deleteTag]; } [_CarTable reloadData]; - + } @@ -717,10 +841,6 @@ -(void)pressHeaderBtn{ NSLog(@"okok"); } --(CGFloat)tableView:(UITableView *)tableView heightForHeaderInSection:(NSInteger)section{ - - return (tableView.tag == AddressTag)?0:43; -} @@ -742,10 +862,20 @@ address.callBack=^(NSMutableDictionary * dicBlock,NSString * addresstype){ if ([addresstype isEqualToString:@"1"]) { - [weekSelf.dataSouce replaceObjectAtIndex:1 withObject:dicBlock] ; + + for (int i = 0; i