diff --git a/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/UserInterfaceState.xcuserstate b/zhiche--delivery.xcworkspace/xcuserdata/wangyalu.xcuserdatad/UserInterfaceState.xcuserstate index ccc79b826729ebbcc9cc9da95c9b454b9ec4a6ac..d6e1d0c8ea3d32e05b1c3a4c86948ef635df22f3 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/Delivery/Main/1/Cell/AcceptCarCell.m b/zhiche--delivery/Delivery/Main/1/Cell/AcceptCarCell.m index 5662928ae0cd448aa9aa3c01c612ea86a2144dd8..c2ebe94aa7541b138987fca790eacf222555c40f 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/AcceptCarCell.m +++ b/zhiche--delivery/Delivery/Main/1/Cell/AcceptCarCell.m @@ -33,6 +33,7 @@ self.imageBtn.layer.masksToBounds=YES; UIView * Hline1 =[[UIView alloc]init]; Hline1.backgroundColor = RGBACOLOR(149, 149, 149, 1); + [self.view addSubview:Hline1]; [self.view addSubview:self.imageBtn]; [self.view addSubview:self.number]; @@ -43,8 +44,6 @@ make.top.equalTo(self.view.mas_top); make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); }]; - - [self.imageBtn mas_makeConstraints:^(MASConstraintMaker *make) { make.left.mas_equalTo(self.view.mas_left).with.offset(14*kWidth); make.centerY.mas_equalTo(self.view.mas_centerY); @@ -77,22 +76,18 @@ 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); @@ -133,9 +128,7 @@ 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); diff --git a/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m b/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m index 9fb0f31a7d5cb4fb9e3e83bb625d1cd4b23b0c35..8caf33e91697678b0123d63fda9bfd6b097e057a 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m +++ b/zhiche--delivery/Delivery/Main/1/Cell/AddressCell.m @@ -24,19 +24,15 @@ _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]; _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]; [self.contentView addSubview:_MRbtn]; [self.contentView addSubview:_BJbtn]; [self.contentView addSubview:_SCbtn]; @@ -45,26 +41,17 @@ make.left.equalTo(_SmallImage.mas_right).with.offset(25*kWidth); make.top.mas_equalTo(self.contentView.mas_top).with.offset(10*kHeight); }]; - [_StoreName mas_makeConstraints:^(MASConstraintMaker *make) { make.left.equalTo(_CityName.mas_right).with.offset(20*kWidth); 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(_SmallImage.mas_centerY); @@ -73,14 +60,11 @@ make.left.equalTo(_CityName.mas_left).with.offset(0); 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); @@ -91,11 +75,6 @@ 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"]; [self.contentView addSubview:_RightImage]; @@ -104,20 +83,16 @@ make.centerY.mas_equalTo(self.contentView.mas_centerY); make.size.mas_equalTo(CGSizeMake(6*kWidth, 11*kHeight)); }]; - } 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 = NSTextAlignmentLeft; label.frame =CGRectMake(0, 0, nameW, nameH); diff --git a/zhiche--delivery/Delivery/Main/1/Cell/BillCell.m b/zhiche--delivery/Delivery/Main/1/Cell/BillCell.m index cf71c0842c8554be809ea953ec6cb1d820a4cf25..a31846e3ac9ea675e95bde13b3adf17bf6dde9e2 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/BillCell.m +++ b/zhiche--delivery/Delivery/Main/1/Cell/BillCell.m @@ -15,11 +15,6 @@ // 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){ @@ -41,11 +36,6 @@ 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); @@ -54,9 +44,6 @@ make.left.mas_equalTo(self.timeTitle.mas_right).with.offset(40*kWidth); make.centerY.mas_equalTo(self.timeLabel.mas_centerY); }]; - - - } return self; } @@ -66,9 +53,7 @@ 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); diff --git a/zhiche--delivery/Delivery/Main/1/Cell/CarShipCell.m b/zhiche--delivery/Delivery/Main/1/Cell/CarShipCell.m index 834993ec0072d32f61069bfba996a78bbfc8af6f..27a1a7bf5400559c1b490783a1e039e6932ed2db 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/CarShipCell.m +++ b/zhiche--delivery/Delivery/Main/1/Cell/CarShipCell.m @@ -45,7 +45,6 @@ make.right.equalTo(self.contentView.mas_right).with.offset(-20*kWidth); make.centerY.mas_equalTo(self.contentView.mas_centerY); }]; - } return self; } @@ -54,16 +53,13 @@ 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 = NSTextAlignmentCenter; label.frame =CGRectMake(0, 0, nameW, nameH); label.font = Font(font); return label; } - @end diff --git a/zhiche--delivery/Delivery/Main/1/Cell/ChooseAddressCell.m b/zhiche--delivery/Delivery/Main/1/Cell/ChooseAddressCell.m index fb62e4ad88433acef7313d2f800c5e5e09fb5c9c..628e284b3cf15a85214e38f26fa1d15bc3d52152 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/ChooseAddressCell.m +++ b/zhiche--delivery/Delivery/Main/1/Cell/ChooseAddressCell.m @@ -19,70 +19,7 @@ self = [super initWithStyle:style reuseIdentifier:reuseIdentifier]; if (self){ -// -// _SmallImage = [[UIImageView alloc]init]; -// _SmallImage.backgroundColor = [UIColor cyanColor]; -// _CarName = [self createUIlabel:@"" andFont:FontOfSize12 andColor:BlackColor]; -// _ReduceBtn = [self createBtn:@"-"]; -// _AddBtn = [self createBtn:@"+"]; -// _Number = [self createUIlabel:@"1" andFont:FontOfSize12 andColor:BlackColor]; -// -// [self.contentView addSubview:_SmallImage]; -// [self.contentView addSubview:_CarName]; -// [self.contentView addSubview:_ReduceBtn]; -// [self.contentView addSubview:_AddBtn]; -// [self.contentView addSubview:_Number]; -// -// [_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)); -// }]; -// [_CarName mas_makeConstraints:^(MASConstraintMaker *make) { -// make.left.equalTo(_SmallImage.mas_right).with.offset(25*kWidth); -// make.centerY.mas_equalTo(_SmallImage.mas_centerY); -// }]; -// [_AddBtn mas_makeConstraints:^(MASConstraintMaker *make) { -// make.right.equalTo(self.contentView.mas_right).with.offset(-20*kWidth); -// make.centerY.mas_equalTo(_SmallImage.mas_centerY); -// make.size.mas_equalTo(CGSizeMake(30*kWidth, 30*kHeight)); -// }]; -// [_Number mas_makeConstraints:^(MASConstraintMaker *make) { -// make.right.equalTo(_AddBtn.mas_left).with.offset(0); -// make.centerY.mas_equalTo(_SmallImage.mas_centerY); -// make.size.mas_equalTo(CGSizeMake(30*kWidth, 30*kHeight)); -// }]; -// [_ReduceBtn mas_makeConstraints:^(MASConstraintMaker *make) { -// make.right.equalTo(_Number.mas_left).with.offset(0); -// make.centerY.mas_equalTo(_SmallImage.mas_centerY); -// make.size.mas_equalTo(CGSizeMake(30*kWidth, 30*kHeight)); -// }]; -// UIView * Hline =[[UIView alloc]init]; -// Hline.backgroundColor = RGBACOLOR(149, 149, 149, 1); -// [self.contentView addSubview:Hline]; -// [Hline mas_makeConstraints:^(MASConstraintMaker *make) { -// make.left.equalTo(_ReduceBtn.mas_right); -// make.top.equalTo(_ReduceBtn.mas_top); -// make.size.mas_equalTo(CGSizeMake(30*kWidth, 1)); -// }]; -// UIView * Hline1 =[[UIView alloc]init]; -// Hline1.backgroundColor = RGBACOLOR(149, 149, 149, 1); -// [self.contentView addSubview:Hline1]; -// [Hline1 mas_makeConstraints:^(MASConstraintMaker *make) { -// make.left.equalTo(_ReduceBtn.mas_right); -// make.bottom.equalTo(_ReduceBtn.mas_bottom); -// make.size.mas_equalTo(CGSizeMake(30*kWidth, 1)); -// }]; -// 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).with.offset(0); -// make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); -// make.bottom.mas_equalTo(self.contentView.mas_bottom); -// }]; -// -// + } return self; diff --git a/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.m b/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.m index a403f35a32278c38d9275a962de9a9363cb96235..5d65ddaafc28855cb6a8fc605ac449d3fa9d62b0 100644 --- a/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.m +++ b/zhiche--delivery/Delivery/Main/1/Cell/QuoteCell.m @@ -43,16 +43,14 @@ make.centerY.mas_equalTo(self.view.mas_centerY); }]; - self.scrollView = [[UIScrollView alloc]init]; self.scrollView.contentSize = CGSizeMake(screenWidth + 150*2*kWidth, 20*kHeight); self.scrollView.alwaysBounceHorizontal = YES; self.scrollView.showsHorizontalScrollIndicator = NO; [self.contentView addSubview:self.scrollView]; - + self.carStyle = [self createUIlabel:@"" andFont:FontOfSize14 andColor:BlackColor]; [self.scrollView addSubview:self.carStyle]; - //省市县 self.startAddress = [self createUIlabel:@"长沙" andFont:FontOfSize14 andColor:BlackColor]; //发车单位 收车单位 @@ -77,74 +75,29 @@ 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); }]; _Btn2 = [self createBtn:@"重新发布"]; _Btn3 = [self createBtn:@"查看报价"]; - } return self; } -(void)showInfo:(NSDictionary *)dic_info{ - NSLog(@"dic_info===%@",dic_info); - -// dic_info==={ -// actualCost = ""; -// arriveDate = "2016-06-04"; -// deliveryDate = "2016-06-04"; -// departCityName = "\U4e4c\U5170\U5bdf\U5e03\U5e02"; -// departUnit = FacheDANWEI; -// id = 314; -// orderCode = CO20160641540114476; -// payStatus = 10; -// payStatusText = "\U672a\U4ed8\U6b3e"; -// postTimeRemaining = 0; -// quoteCounts = 0; -// quotes = ( -// ); -// receiptCityName = "\U77f3\U5bb6\U5e84\U5e02"; -// receiptUnit = Wangyalu; -// status = 20; -// statusText = "\U5df2\U53d1\U5e03"; -// vehicles = ( -// { -// amount = 1; -// brandName = "\U54c1\U724cnames"; -// id = 453; -// vehicleName = "\U8f66\U578bnames"; -// vinList = ( -// ); -// vins = "[\"vin 123456789\",\"vin cs987654321\"]"; -// }, -// { -// amount = 10; -// brandName = "\U54c1\U724c123"; -// id = 454; -// vehicleName = "\U8f66\U578b123"; -// vinList = ( -// ); -// vins = "[\"vin 123456789\",\"vin cs987654321\"]"; -// } -// ); self.orderNumber.text = [NSString stringWithFormat:@"%@", dic_info[@"orderCode"]]; self.time.text =[NSString stringWithFormat:@"剩余时间:%@分钟",dic_info[@"postTimeRemaining"]]; @@ -170,13 +123,11 @@ make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); make.top.mas_equalTo(self.endTimeL.mas_bottom).with.offset(5*kHeight); }]; - [self.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)); }]; - NSMutableArray * carstyle = dic_info[@"vehicles"]; NSString * carName = [[NSString alloc]init]; for (int i=0; i>>>>>> 17a7f50c7e3c7b01b1132dda0f2c73048e584daa make.centerX.equalTo(_BackView.mas_centerX); make.centerY.equalTo(time.mas_centerY); }]; @@ -239,12 +223,9 @@ -(void)pressShipBtn{ dicUrl = [NSMutableDictionary dictionaryWithObjectsAndKeys:self.OrderCodeDic,@"id", nil]; - - [Com afPostRequestWithUrlString:Order_Publish_Url parms:dicUrl finishedBlock:^(id responseObj) { NSMutableDictionary * dicObj =[NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; - NSLog(@"%@",dicObj); FindQuoteVC * quote = [[FindQuoteVC alloc]init]; [self.navigationController pushViewController:quote animated:YES]; @@ -272,7 +253,6 @@ make.top.equalTo(nav.mas_bottom).with.offset(0*kHeight); make.size.mas_equalTo(CGSizeMake(Main_Width, Main_height-64*kHeight)); }]; - //设置scrollView的内容视图 _BackView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, Main_Width, Main_height*kHeight*1.5)]; _BackView.backgroundColor = [UIColor whiteColor]; @@ -314,7 +294,6 @@ cell.BJbtn.hidden = YES; cell.SCbtn.hidden = YES; cell.RightImage.hidden = YES; - NSLog(@"%@",self.AddressArr); PlaceModel = [PlaceOrderModel ModelWithDic:self.AddressArr[indexPath.row]]; NSString * cityName = [NSString stringWithFormat:@"%@%@%@",PlaceModel.provinceName,PlaceModel.cityName,PlaceModel.countyName]; @@ -351,7 +330,6 @@ if (cell ==nil) { cell = [[CarCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:str]; } - NSLog(@"%ld",(long)indexPath.row); NSMutableArray * vin = _CarArr[indexPath.section][@"vinArr"]; cell.textLabel.text = vin[indexPath.row]; return cell; @@ -448,21 +426,17 @@ make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); make.bottom.mas_equalTo(SectionView.mas_bottom); }]; - [_headerViewArr addObject:SectionView]; } } - -(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 = NSTextAlignmentLeft; label.frame =CGRectMake(0, 0, nameW, nameH); @@ -471,7 +445,6 @@ } - - (void)didReceiveMemoryWarning { [super didReceiveMemoryWarning]; // Dispose of any resources that can be recreated. diff --git a/zhiche--delivery/Delivery/Main/1/Controller/ChooseAddressVC.m b/zhiche--delivery/Delivery/Main/1/Controller/ChooseAddressVC.m index d5a1593b7a2a6385a76530ddc306b03feb1c8b3e..33a088f1a05ffc8cbd19cdcf9fde8d5640ba650c 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/ChooseAddressVC.m +++ b/zhiche--delivery/Delivery/Main/1/Controller/ChooseAddressVC.m @@ -29,10 +29,8 @@ [super viewDidLoad]; self.view.backgroundColor = WhiteColor; dataSouce = [[NSMutableArray alloc]init]; - placeModel = [[PlaceOrderModel alloc]init]; - + placeModel = [[PlaceOrderModel alloc]init]; Com = [[Common alloc]init]; - if ([_addresstype isEqualToString:@"0"]) { nav = [self createNav:@"发车地址选择"]; }else{ @@ -67,8 +65,6 @@ }]; } - - -(void)longPressToDo:(UILongPressGestureRecognizer *)gestureRecognizer { @@ -142,9 +138,7 @@ -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ - static NSString *str=@"str"; - AddressCell * cell = [tableView dequeueReusableCellWithIdentifier:str]; if (cell ==nil) { cell = [[AddressCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:str]; @@ -190,21 +184,16 @@ [Com afPostRequestWithUrlString:addressDelete_Url parms:dic 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]; @@ -223,7 +212,6 @@ [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); @@ -239,12 +227,9 @@ return dataSouce.count; } - - - (BOOL)tableView:(UITableView *)tableView canEditRowAtIndexPath:(NSIndexPath *)indexPath { return YES; - } //定义编辑样式 @@ -257,16 +242,13 @@ } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - //延迟执行 dispatch_after(dispatch_time(DISPATCH_TIME_NOW, (int64_t)(0.5 * NSEC_PER_SEC)), dispatch_get_main_queue(), ^{ if (self.callBack) { self.callBack(dataSouce[indexPath.row],_addresstype); } - [self.navigationController popViewControllerAnimated:YES]; - }); } diff --git a/zhiche--delivery/Delivery/Main/1/Controller/ConfirmOrder.m b/zhiche--delivery/Delivery/Main/1/Controller/ConfirmOrder.m index d2a2ed7f3ca75edcdc70c234a918232f57a563df..04dabf2eb93cd5bd7041444e208721105c1b7cdd 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/ConfirmOrder.m +++ b/zhiche--delivery/Delivery/Main/1/Controller/ConfirmOrder.m @@ -98,12 +98,10 @@ make.size.mas_equalTo(CGSizeMake(20*kWidth, 20*kHeight)); }]; - UILabel *label = [[UILabel alloc]init]; label.text = @"已阅读 《运输说明》 《退款规则《 服务协议》"; [label sizeToFit]; CGFloat length = label.frame.size.width; - UIButton * btnLabel = [UIButton buttonWithType:UIButtonTypeCustom]; [btnLabel setTitle:@"已阅读 《运输说明》 《退款规则《 服务协议》" forState:UIControlStateNormal]; [btnLabel setTitleColor:[UIColor blackColor] forState:UIControlStateNormal]; @@ -125,7 +123,6 @@ make.top.equalTo(btnLabel.mas_bottom).with.offset(10*kHeight); make.size.mas_equalTo(CGSizeMake(Main_Width, 0.5)); }]; - UIButton * ConfirmBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [ConfirmBtn addTarget:self action:@selector(pressConfirm) forControlEvents:UIControlEventTouchUpInside]; @@ -140,34 +137,25 @@ make.top.equalTo(Hline1.mas_bottom).with.offset(10*kHeight); make.size.mas_equalTo(CGSizeMake(Main_Width*0.75, 33*kHeight)); }]; - } -(void)pressConfirm{ // Order_Quote_Reserve_Url orderid quoteid - - Common * com = [[Common alloc]init]; long order = [self.dataSouceArr[0][@"id"] longValue]; NSNumber *orderid =[[NSNumber alloc]initWithLong:order]; - long quote = [self.dataSouceArr[1][@"id"] longValue]; NSNumber *quoteid = [[NSNumber alloc]initWithLong:quote]; - [dataSouce setObject:orderid forKey:@"orderid"]; [dataSouce setObject:quoteid forKey:@"quoteid"]; [com afPostRequestWithUrlString:Order_Quote_Reserve_Url parms:dataSouce finishedBlock:^(id responseObj) { NSMutableDictionary * dicObj =[NSJSONSerialization JSONObjectWithData:responseObj options:NSJSONReadingMutableContainers error:nil]; - NSLog(@"%@",dicObj); - } failedBlock:^(NSString *errorMsg) { }]; - - } -(void)pressBtnLabel{ NSLog(@"已阅读 《运输说明》 《退款规则《 服务协议》"); @@ -175,7 +163,6 @@ -(void)pressClickBtn:(UIButton*)sender{ - UIButton * btn = (UIButton*)sender; if (btn.selected) { btn.backgroundColor = [UIColor cyanColor]; @@ -184,15 +171,12 @@ btn.backgroundColor = [UIColor clearColor]; btn.selected = YES; } - - } -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ - static NSString *str=@"str"; if (indexPath.row == 0 ) { //运单cell @@ -220,8 +204,6 @@ } } - - -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return (indexPath.row == 0)?150*kHeight:210*kHeight; @@ -244,9 +226,7 @@ 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); @@ -254,14 +234,4 @@ return label; } -/* -#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/PayMoneyVC.m b/zhiche--delivery/Delivery/Main/1/Controller/PayMoneyVC.m index f8186e4be7bbae06b883fec1a42a2f2ae095a139..a5a7488d8ed07d7eddd823ec0617a2aac5403d5f 100644 --- a/zhiche--delivery/Delivery/Main/1/Controller/PayMoneyVC.m +++ b/zhiche--delivery/Delivery/Main/1/Controller/PayMoneyVC.m @@ -33,15 +33,12 @@ [super viewDidLoad]; TabBar = [RootViewController defaultsTabBar]; nav = [self createNav:@"我要接车"]; - [self.view addSubview:nav]; - - [self createUI]; - dataSouceArr = [[NSMutableArray alloc]init]; DataSouceDic = [[NSMutableDictionary alloc]init]; imageBtnArr = [[NSMutableArray alloc]init]; - + [self.view addSubview:nav]; + [self createUI]; } #pragma mark 初始化扫描 @@ -72,7 +69,6 @@ make.size.mas_equalTo(CGSizeMake(6*kWidth, 11*kHeight)); }]; - table = [[UITableView alloc]initWithFrame:CGRectMake(0, 65*kHeight, Main_Width,Main_height-65*kHeight) style:UITableViewStylePlain]; [table setSeparatorStyle:UITableViewCellSeparatorStyleNone]; table.delegate = self; @@ -85,7 +81,6 @@ make.size.mas_equalTo(CGSizeMake(Main_Width, 130*3*kHeight)); }]; - UIButton * ConfirmBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [ConfirmBtn addTarget:self action:@selector(pressConfirm) forControlEvents:UIControlEventTouchUpInside]; [ConfirmBtn setTitle:@"确认接车" forState:UIControlStateNormal]; @@ -99,7 +94,6 @@ make.top.equalTo(table.mas_bottom).with.offset(10*kHeight); make.size.mas_equalTo(CGSizeMake(Main_Width*0.75, 33*kHeight)); }]; - UIButton * ConcelBtn = [UIButton buttonWithType:UIButtonTypeCustom]; [ConcelBtn addTarget:self action:@selector(pressConcel) forControlEvents:UIControlEventTouchUpInside]; [ConcelBtn setTitle:@"拒绝接车" forState:UIControlStateNormal]; @@ -113,15 +107,12 @@ make.top.equalTo(ConfirmBtn.mas_bottom).with.offset(10*kHeight); make.size.mas_equalTo(CGSizeMake(Main_Width*0.75, 33*kHeight)); }]; - - } #pragma mark 初始化扫描 -(void)pressBtnLabel{ [self scanBtnAction]; - } -(void)scanBtnAction { @@ -143,7 +134,6 @@ view.backgroundColor = [UIColor clearColor]; reader.cameraOverlayView = view; - UILabel * label = [[UILabel alloc] initWithFrame:CGRectMake(20, 20, 280, 40)]; label.text = @"请将扫描的二维码至于下面的框内\n谢谢!"; label.textColor = [UIColor whiteColor]; @@ -157,7 +147,6 @@ image.frame = CGRectMake(20, 80, 280, 280); [view addSubview:image]; - _line = [[UIImageView alloc] initWithFrame:CGRectMake(30, 10, 220, 2)]; _line.image = [UIImage imageNamed:@"line.png"]; [image addSubview:_line]; @@ -184,8 +173,6 @@ upOrdown = NO; } } - - } -(void)imagePickerControllerDidCancel:(UIImagePickerController *)picker { @@ -236,7 +223,6 @@ }]; } - -(void)pressConcel{ @@ -245,60 +231,44 @@ -(void)pressConfirm{ [Common requestWithUrlString:Order_receipt contentType:@"application/json" finished:^(id responseObj){ - + DataSouceDic = responseObj[@"data"]; dataSouceArr = DataSouceDic[@"orders"]; - - for (int i=0; i0) { CarShipVC * shipvc = [[CarShipVC alloc]init]; shipvc.AddressArr = _dataSouce; @@ -607,9 +557,7 @@ -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ - static NSString *str=@"str"; - if (tableView.tag== AddressTag) { AddressCell * cell = [tableView dequeueReusableCellWithIdentifier:str]; if (cell ==nil) { @@ -618,9 +566,7 @@ cell.MRbtn.hidden = YES; cell.BJbtn.hidden = YES; cell.SCbtn.hidden = YES; - if (indexPath.row==0) { - for (int i =0; i<_dataSouce.count; i++) { if ([_dataSouce[i][@"addressType"] isEqualToString:@"0"]) { PlaceModel = [PlaceOrderModel ModelWithDic:_dataSouce[i]]; @@ -676,34 +622,26 @@ } NSMutableArray * vin = _CarName[indexPath.section][@"vinArr"]; -// NSString *string = vin[indexPath.row]; -// NSInteger tag = indexPath.section*200+indexPath.row*10; cell.field.text = vin[indexPath.row]; [cell.field addTarget:self action:@selector(textFieldWithText:) forControlEvents:UIControlEventEditingChanged]; return cell; } } - - -(void)pressCellReduceBtn:(NewBtn*)btn{ - // NSInteger tag = btn.tag; // AddBtn.tag = 1200+i; // ReduceBtn.tag =1100+i ; // SectionView.tag = 900+i; // Number.tag = 1000+i; - NSInteger Btntag = btn.tag; NSString * string = _CarName[Btntag-1100][@"number"]; int number = [string intValue]-1; for (int i = 0; i<_CarName.count; i++) { - UIView * view = _headerViewArr[i]; if (view.tag == btn.tag-200) { - if (number>0) { UILabel * label = (UILabel*)[view viewWithTag:btn.tag-100]; NSString * str = [NSString stringWithFormat:@"%d",number]; @@ -711,7 +649,6 @@ [_CarName[Btntag - 1100] setObject:str forKey:@"number"]; [_CarName[Btntag-1100][@"vinArr"] removeLastObject]; - NSInteger number = 0; for (int i =0; i<_CarName.count; i++) { number = number+[_CarName[i][@"vinArr"] count]; @@ -722,36 +659,25 @@ } } } - NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:Btntag-1100]; [_CarTable reloadSections:indexSet withRowAnimation:UITableViewRowAnimationAutomatic]; } -(void)pressCellAddBtn:(NewBtn*)btn{ - //0 10 20 - //1 11 21 -// NSInteger tag = btn.tag; -// AddBtn.tag = 1200+i; -// ReduceBtn.tag =1100+i ; -// SectionView.tag = 900+i; -// DeleteBtn.tag = 1300+i; NSInteger Btntag = btn.tag; NSString * string = _CarName[Btntag-1200][@"number"]; int number = [string intValue]+1; for (int i = 0; i<_CarName.count; i++) { - UIView * view = _headerViewArr[i]; if (view.tag == btn.tag-300) { - if (number<10) { UILabel * label = (UILabel*)[view viewWithTag:btn.tag-200]; NSString * str =[NSString stringWithFormat:@"%d",number]; label.text =str ; [_CarName[Btntag-1200] setObject:str forKey:@"number"]; [_CarName[Btntag-1200][@"vinArr"] addObject:@""]; - NSInteger number = 0; for (int i =0; i<_CarName.count; i++) { number = number+[_CarName[i][@"vinArr"] count]; @@ -759,9 +685,7 @@ [_CarTable mas_updateConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(45*(number+_CarName.count)*kHeight); }]; - } - } } NSIndexSet *indexSet=[[NSIndexSet alloc]initWithIndex:Btntag-1200]; @@ -788,13 +712,11 @@ make.height.mas_equalTo(45*(number+_CarName.count)*kHeight); }]; [_CarTable reloadData]; - } -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ return (tableView.tag == AddressTag?100*kHeight:45*kHeight); - } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ @@ -835,8 +757,6 @@ } -(void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath{ - - if (tableView.tag == AddressTag) { ChooseAddressVC * address = [[ChooseAddressVC alloc]init]; if (indexPath.row==1) { @@ -844,16 +764,10 @@ }else{ address.addresstype = @"0"; //发货 } - - __weak PlaceOrderVC * weekSelf = self; - address.callBack=^(NSMutableDictionary * dicBlock,NSString * addresstype){ - if ([addresstype isEqualToString:@"1"]) { - for (int i = 0; i0) { - [quoteTable mas_updateConstraints:^(MASConstraintMaker *make) { make.height.mas_equalTo(140*dataSouceArr.count*kHeight); }]; [quoteTable reloadData]; } - - - + } failed:^(NSString *errorMsg) { NSLog(@"%@",errorMsg); }]; - - } - -(UITableViewCell*)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{ - static NSString *str=@"str"; if (tableView.tag == tableTag) { //运单cell @@ -147,17 +136,13 @@ -(void)pressQutoteBtn:(NewBtn*)sender{ ConfirmOrder * confirm = [[ConfirmOrder alloc]init]; - [confirm.dataSouceArr addObject:dataSouceDic[@"order"]]; [confirm.dataSouceArr addObject:dataSouceArr[sender.indexpath.row]]; [self.navigationController pushViewController:confirm animated:YES]; } - -(CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{ - return (tableView.tag == tableTag)?150*kHeight:210*kHeight; - } -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{ @@ -165,20 +150,9 @@ return (tableView.tag == tableTag)?1:dataSouceArr.count; } - - (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/Singleton/Header.h b/zhiche--delivery/Delivery/Singleton/Header.h index 7439b09b56a9b861af2891138b4f5e64b162aa48..0c543d5f987dbdaba0fdea70ce81721d297910f0 100644 --- a/zhiche--delivery/Delivery/Singleton/Header.h +++ b/zhiche--delivery/Delivery/Singleton/Header.h @@ -55,9 +55,6 @@ //#define Main_interface @"http://192.168.61.119:8080/" -//#define Main_interface @"http://wechatapp.ittun.com/" - - #define application_json @"application/json"