// // AchievementsReleaseViewController.m // jitao // // Created by 罗云飞 on 2018/1/18. // Copyright © 2018年 罗云飞. All rights reserved. // #import "AchievementsReleaseViewController.h" #import "ReleaseresultsCell.h" #import "ResultsdescriptionCell.h"// #import "ResultsTitleCell.h" #import "TechnicaltypeCell.h" #import "BiaoqianCell.h" #import "ChengshuduCell.h" #import "HangYeCell.h" #import "PickerChoiceView.h" #import "NewPickerChoiceView.h" #import "Hangyemodel.h" #import "JYFSCell.h" #import "CGPTCell.h" #import "NewChoiceFileController.h" #import "JiageCell.h" #define Start_X 60 // 第一个按钮的X坐标 #define Start_Y 10.0f // 第一个按钮的Y坐标 #define Width_Space 30.0f // 2个按钮之间的横间距 #define Height_Space 10.0f // 竖间距 #define Button_Height 30.0f // 高 //#define Button_Width (SCREEN_WIDTH-60)/4 // 宽 #define Button_Width 60 // 宽 @interface AchievementsReleaseViewController (){ UITableView *newtableView; NSMutableArray *dataArray; NSMutableArray *titledataArray;//标题数组 NSMutableArray *updateArr; NSString *descriptionStr;//成果描述 接收字符串 NSString *resultsTitleStr;//成果标题 接收字符 UIButton *updatefrequencybtn;//更新频率 BOOL isseemore;//查看更多 NSString *technicaltypeStr; NSString *technicaltypeTag; NSMutableArray *arr; NSMutableArray *CsdArray;//成熟度数组 NSString *industryStr;//行业类型1 NSString *industryStr1;//行业类型2 NSString *industryStr3;//行业类型1 UI展示 NSString *industryStr4;//行业类型1 UI展示 NSString *ID; NSString *str111; NSMutableArray *JyfsArray;//交易方式数组 NSString *JyfsStr;//交易方式数组 NewChoiceFileController *cont; NSMutableArray *CGPTdataArray; NSString *TechnicaltypeStr111;//技术类型接受字段 NSString *LocationStr;//所在地接受字段 NSString *titleStr1;//标签接受字段1 NSString *titleStr2;//标签接受字段2 NSString *titleStr3;//标签接受字段3 NSString *Price;//价格接受字段 NSString *technicalPictureUrl;//图片拼接 NSString *bargainingMode; } @property (strong, nonatomic)NSMutableArray * middataArry; @property (strong, nonatomic)NSMutableArray * midArry; @property (strong, nonatomic)NSMutableArray * midArry2; @property (strong, nonatomic)NSMutableArray * middataArry2; @end @implementation AchievementsReleaseViewController - (void)viewDidLoad { [super viewDidLoad]; [self setNavTitle:@"发布成果"]; [self dataInitialization]; [self loadsView]; // Do any additional setup after loading the view. } - (NSMutableArray *)midArry2{ if (!_midArry2) { _midArry2 = [NSMutableArray arrayWithCapacity:0]; } return _midArry2; } - (NSMutableArray *)midArry{ if (!_midArry) { _midArry = [NSMutableArray arrayWithCapacity:0]; } return _midArry; } - (NSMutableArray *)middataArry{ if (!_middataArry) { _middataArry = NewMutableArrayInit; } return _middataArry; } - (NSMutableArray *)middataArry2{ if (!_middataArry2) { _middataArry2 = NewMutableArrayInit; } return _middataArry2; } - (void)dataInitialization { isseemore = YES; dataArray = NewMutableArrayInit; titledataArray = [NSMutableArray arrayWithObjects:@"成果描述",@"成果标题",@"技术类型",@"其他",@"成果配图", nil]; arr = NewMutableArrayInit; CsdArray = NewMutableArrayInit; JyfsArray = NewMutableArrayInit; CGPTdataArray = NewMutableArrayInit; bargainingMode = @"1"; for (int i = 0; i<7; i++) { NSMutableDictionary *dic = [NSMutableDictionary new]; switch (i) { case 0: [dic setObject:@"专利" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"0" forKey:@"number"]; [arr addObject:dic]; break; case 1: [dic setObject:@"软著" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"1" forKey:@"number"]; [arr addObject:dic]; break; case 2: [dic setObject:@"项目" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"2" forKey:@"number"]; [arr addObject:dic]; break; case 3: [dic setObject:@"版权" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"3" forKey:@"number"]; [arr addObject:dic]; break; case 4: [dic setObject:@"工业设计" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"4" forKey:@"number"]; [arr addObject:dic]; break; case 5: [dic setObject:@"配方" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"5" forKey:@"number"]; [arr addObject:dic]; break; case 6: [dic setObject:@"非标" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"6" forKey:@"number"]; [arr addObject:dic]; break; default: break; } } for (int i = 0; i<5; i++) { NSMutableDictionary *dic = [NSMutableDictionary new]; switch (i) { case 0: [dic setObject:@"正在研发" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"0" forKey:@"number"]; [CsdArray addObject:dic]; break; case 1: [dic setObject:@"已有样品" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"1" forKey:@"number"]; [CsdArray addObject:dic]; break; case 2: [dic setObject:@"通过小试" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"2" forKey:@"number"]; [CsdArray addObject:dic]; break; case 3: [dic setObject:@"通过中试" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"3" forKey:@"number"]; [CsdArray addObject:dic]; break; case 4: [dic setObject:@"可以量产" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [dic setObject:@"4" forKey:@"number"]; [CsdArray addObject:dic]; break; default: break; } } for (int i = 0; i<3; i++) { NSMutableDictionary *dic = [NSMutableDictionary new]; switch (i) { case 0: [dic setObject:@"技术转让" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [JyfsArray addObject:dic]; break; case 1: [dic setObject:@"授权生产" forKey:@"name"]; [dic setObject:@"0" forKey:@"state"]; [JyfsArray addObject:dic]; break; default: break; } } } - (void)Networkrequest:(NSString *)level pid:(NSString*)pid { NSMutableDictionary *dic = [NSMutableDictionary new]; [dic safeSetObject:level forKey:@"level"]; [dic safeSetObject:pid forKey:@"pid"]; [NetworkRequestManager requestGetWithInterfacePrefix:JT_getField parameters:dic onSuccess:^(id requestData) { NSLog(@"服务器返回数据 :%@",requestData); if ([requestData[@"error"] count] !=0) { for (NSDictionary *dic in requestData[@"error"]) { [MBProgressHUD showError:dic[@"message"] toView:self.view]; } }else{ [self.midArry removeAllObjects]; [self.middataArry removeAllObjects]; for (NSDictionary *dic in requestData[@"data"]) { Hangyemodel *model = [[Hangyemodel alloc] initWithDictionary:dic error:nil]; [self.middataArry addObject:model]; [self.midArry addObject:model.name]; } } } onFailure:^{ }]; } - (void)Networkrequestlevel:(NSString *)level pid:(NSString*)pid { NSMutableDictionary *dic = [NSMutableDictionary new]; [dic safeSetObject:level forKey:@"level"]; [dic safeSetObject:pid forKey:@"pid"]; [NetworkRequestManager requestGetWithInterfacePrefix:JT_getField parameters:dic onSuccess:^(id requestData) { NSLog(@"服务器返回数据 :%@",requestData); if ([requestData[@"error"] count] !=0) { for (NSDictionary *dic in requestData[@"error"]) { [MBProgressHUD showError:dic[@"message"] toView:self.view]; } }else{ [self.midArry2 removeAllObjects]; [self.middataArry2 removeAllObjects]; for (NSDictionary *dic in requestData[@"data"]) { Hangyemodel *model = [[Hangyemodel alloc] initWithDictionary:dic error:nil]; [self.middataArry2 addObject:model]; [self.midArry2 addObject:model.name]; } } } onFailure:^{ }]; } #pragma mark ----加载界面 - (void)loadsView{ cont = [[NewChoiceFileController alloc]init]; cont.view.backgroundColor = NewClearColor; [self.view addSubview:cont.view]; [self.view sendSubviewToBack:cont.view]; [self.view addSubview:newtableView = [NewControlPackage tableViewInitWithFrame:CGRectMake(0, NavHeader, SCREEN_WIDTH, SCREEN_HEIGHT-NavHeader-44) backgroundColor:NewLineGrayColor style:UITableViewStyleGrouped delegate:self dataSource:self showsHorizontalScrollIndicator:NO showsVerticalScrollIndicator:NO hidden:NO tag:100 userInteractionEnabled:YES]]; newtableView.separatorStyle = NO; newtableView.estimatedRowHeight = 0; newtableView.estimatedSectionFooterHeight = 0; newtableView.estimatedSectionHeaderHeight = 0; UIView *view = [UIView new]; view.backgroundColor = NewWhiteColor; [self.view addSubview:view]; view.sd_layout .bottomEqualToView(self.view) .heightIs(44) .widthIs(SCREEN_WIDTH); UIButton *submissionpurchase = [UIButton new]; [submissionpurchase setTitle:@"现在发布" forState:UIControlStateNormal]; [submissionpurchase setTitleColor:NewWhiteColor forState:UIControlStateNormal]; submissionpurchase.titleLabel.font = NewFont(15); submissionpurchase.titleLabel.textAlignment = NSTextAlignmentCenter; submissionpurchase.backgroundColor = NewRGBColor(252, 133, 52, 1); NewTouchUpInside(submissionpurchase, submissionpurchaseclick:); [view addSubview:submissionpurchase]; submissionpurchase.sd_layout .rightEqualToView(view) .heightIs(44) .widthIs(fitScreenWidth(121)); UIButton *negotiate = [UIButton new]; [negotiate setTitle:@"取消" forState:UIControlStateNormal]; [negotiate setTitleColor:NewWhiteColor forState:UIControlStateNormal]; negotiate.titleLabel.font = NewFont(15); negotiate.titleLabel.textAlignment = NSTextAlignmentCenter; negotiate.backgroundColor = NewButtonColor; NewTouchUpInside(negotiate, negotiateclick:); [view addSubview:negotiate]; negotiate.sd_layout .rightSpaceToView(submissionpurchase, 1) .heightIs(44) .widthIs(fitScreenWidth(121)); } #pragma mark-------------------------UITableView------------------------------------ -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView { return 5; } //返回每段行数 -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section { if (section == 0||section == 1||section == 2) { return 1; }else if (section == 3){ return 6; }else if (section == 4){ return 1; } return 0; } -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath { static NSString *Cell = @"Cell"; static NSString *Cell1 = @"Cell1"; static NSString *Cell2 = @"Cell2"; static NSString *Cell3 = @"Cell3"; static NSString *Cell4 = @"Cell4"; static NSString *Cell5 = @"Cell5"; static NSString *Cell6 = @"Cell6"; static NSString *Cell7 = @"Cell7"; static NSString *Cell8 = @"Cell8"; static NSString *Cell9 = @"Cell9"; if (indexPath.section == 0) { ResultsdescriptionCell * cell = [tableView dequeueReusableCellWithIdentifier:Cell]; if (cell == nil) { cell = [[ResultsdescriptionCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Cell]; } [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//(这种是没有点击后的阴影效果) cell.accessoryType = UITableViewCellAccessoryNone; // [cell assignment:dataArray[indexPath.row]]; cell.backgroundColor = NewLineGrayColor; cell.textview.delegate = self; return cell; }else if (indexPath.section == 1){ ResultsTitleCell * cell = [tableView dequeueReusableCellWithIdentifier:Cell1]; if (cell == nil) { cell = [[ResultsTitleCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Cell1]; } [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//(这种是没有点击后的阴影效果) cell.accessoryType = UITableViewCellAccessoryNone; cell.backgroundColor = NewLineGrayColor; [cell.textfield addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged]; cell.textfield.tag = 100; return cell; }else if (indexPath.section == 2){ TechnicaltypeCell* cell = [tableView dequeueReusableCellWithIdentifier:Cell3]; if (cell == nil) { cell = [[TechnicaltypeCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Cell3]; } [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//(这种是没有点击后的阴影效果) cell.accessoryType = UITableViewCellAccessoryNone; cell.backgroundColor = NewLineGrayColor; //防止出现collerview滚动 [cell.CollView reloadData]; //获取到数据后刷新 cell.CollView.scrollEnabled = NO; if (isseemore) { cell.CollView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 60); }else{ cell.CollView.frame = CGRectMake(0, 0, SCREEN_WIDTH, 150); } cell.delegateColl = self; [cell reloadDatas:arr]; return cell; }else if (indexPath.section == 3){ if (indexPath.row == 0) { ReleaseresultsCell * cell = [tableView dequeueReusableCellWithIdentifier:Cell2]; if (cell == nil) { cell = [[ReleaseresultsCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Cell2]; } [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//(这种是没有点击后的阴影效果) cell.accessoryType = UITableViewCellAccessoryNone; cell.backgroundColor = NewWhiteColor; cell.title.text = @"所在地"; cell.view.frame = CGRectMake(60, 10, SCREEN_WIDTH-60-15, fitScreenWidth(44)); [cell.textfield addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged]; cell.textfield.tag = 101; return cell; }else if (indexPath.row == 1){ BiaoqianCell* cell = [tableView dequeueReusableCellWithIdentifier:Cell4]; if (cell == nil) { cell = [[BiaoqianCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Cell4]; } [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//(这种是没有点击后的阴影效果) cell.accessoryType = UITableViewCellAccessoryNone; cell.backgroundColor = NewWhiteColor; [cell.textfield1 addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged]; [cell.textfield2 addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged]; [cell.textfield3 addTarget:self action:@selector(textFieldEditingChanged:) forControlEvents:UIControlEventEditingChanged]; cell.textfield1.tag = 102; cell.textfield2.tag = 103; cell.textfield3.tag = 104; return cell; }else if (indexPath.row == 2){ ChengshuduCell* cell = [tableView dequeueReusableCellWithIdentifier:Cell5]; if (cell == nil) { cell = [[ChengshuduCell alloc]initWithStyle:UITableViewCellStyleDefault reuseIdentifier:Cell5]; } [cell setSelectionStyle:UITableViewCellSelectionStyleNone];//(这种是没有点击后的阴影效果) cell.accessoryType = UITableViewCellAccessoryNone; cell.backgroundColor = NewWhiteColor; for (int i = 0; i 500){ textView.text = [textView.text substringWithRange:NSMakeRange(0,500)]; } if (textView.text.length > 0) { NSLog(@"textView.text:%@",textView.text); if ([textView.text isEqualToString:@"请描述您的技术成果~"]) { descriptionStr = @""; }else{ descriptionStr = nil; descriptionStr = textView.text; } } } #pragma mark - TextField作字符输入限制 - (void)textFieldEditingChanged:(UITextField *)textField { if (textField.tag == 100) { if ([textField.text length]>50) { UITextRange *markedRange = [textField markedTextRange]; if (markedRange) { return; } NSRange range = [textField.text rangeOfComposedCharacterSequenceAtIndex:50]; textField.text = [textField.text substringToIndex:range.location]; [self.view makeToast:@"标题最多输入50个字哦~" duration:1.5 position:CSToastPositionCenter]; } resultsTitleStr = textField.text; NSLog(@"%@",resultsTitleStr); }else if (textField.tag == 101){ if ([textField.text length]>30) { UITextRange *markedRange = [textField markedTextRange]; if (markedRange) { return; } NSRange range = [textField.text rangeOfComposedCharacterSequenceAtIndex:30]; textField.text = [textField.text substringToIndex:range.location]; [self.view makeToast:@"所在地最多输入30个字哦~" duration:1.5 position:CSToastPositionCenter]; } LocationStr = textField.text; NSLog(@"%@",LocationStr); }else if (textField.tag == 102){ if ([textField.text length]>10) { UITextRange *markedRange = [textField markedTextRange]; if (markedRange) { return; } NSRange range = [textField.text rangeOfComposedCharacterSequenceAtIndex:10]; textField.text = [textField.text substringToIndex:range.location]; [self.view makeToast:@"标签最多输入30个字哦~" duration:1.5 position:CSToastPositionCenter]; } titleStr1 = textField.text; NSLog(@"标签1%@",titleStr1); }else if (textField.tag == 103){ if ([textField.text length]>10) { UITextRange *markedRange = [textField markedTextRange]; if (markedRange) { return; } NSRange range = [textField.text rangeOfComposedCharacterSequenceAtIndex:10]; textField.text = [textField.text substringToIndex:range.location]; [self.view makeToast:@"标签最多输入10个字哦~" duration:1.5 position:CSToastPositionCenter]; } titleStr2 = textField.text; NSLog(@"标签2%@",titleStr2); }else if (textField.tag == 104){ if ([textField.text length]>10) { UITextRange *markedRange = [textField markedTextRange]; if (markedRange) { return; } NSRange range = [textField.text rangeOfComposedCharacterSequenceAtIndex:10]; textField.text = [textField.text substringToIndex:range.location]; [self.view makeToast:@"标签最多输入10个字哦~" duration:1.5 position:CSToastPositionCenter]; } titleStr3 = textField.text; NSLog(@"标签3%@",titleStr3); }else if (textField.tag == 105){ Price = textField.text; NSLog(@"价格%@",Price); } } - (void)seemoreclick:(UIButton *)sender { NSLog(@"点击查看更多"); sender.selected = !sender.selected; if (!sender.selected) { isseemore = YES; }else{ isseemore = NO; } NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:2]; [newtableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone]; // updatefrequencybtn = nil; } #pragma mark - 代理用来接收点击的是第几个 -(void)ClickCooRow :(NSInteger)CellRow; { printf("\n点击的是==========%ld\n",CellRow); for (int i = 0; i0) { PickerChoiceView *picker = [[PickerChoiceView alloc]initWithFrame:self.view.bounds]; picker.delegate = self; picker.selectLb.text = @"行业"; picker.customArr = _midArry; [self.view addSubview:picker]; } sender.userInteractionEnabled = YES; }else{ if (ID) { sender.userInteractionEnabled = NO; if (_midArry2.count>0) { NewPickerChoiceView *picker = [[NewPickerChoiceView alloc]initWithFrame:self.view.bounds]; picker.delegate = self; picker.selectLb.text = @"行业"; picker.customArr = _midArry2; [self.view addSubview:picker]; } sender.userInteractionEnabled = YES; }else{ [MBProgressHUD showSuccess:@"请先选择行业~" toView:self.view]; } } } #pragma mark -------- 行业类型 ---------- - (void)PickerSelectorIndixString:(NSString *)str{ NSLog(@"%@",str); // industryStr = str; for (int i = 0; i0) { // [wself avatarImageReplacement:imagePath]; [CGPTdataArray addObject:imagePath]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:4]; [newtableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone]; } }]; } - (void)hahahaha:(NSInteger)tag{ [CGPTdataArray removeObjectAtIndex:tag]; NSIndexPath *indexPath = [NSIndexPath indexPathForRow:0 inSection:4]; [newtableView reloadRowsAtIndexPaths:[NSArray arrayWithObjects:indexPath,nil] withRowAnimation:UITableViewRowAnimationNone]; } - (void)avatarImageReplacement:(NSString *)imagePath { } - (void)negotiateclick:(UIButton *)sender { NewPopViewController; } - (void)negotiableBTclick:(UIButton *)sender { NSIndexPath *indexPath = [NSIndexPath indexPathForRow:4 inSection:3]; JiageCell *cell = [newtableView cellForRowAtIndexPath:indexPath]; sender.selected = !sender.selected; if (sender.selected) { //改变颜色 [sender setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal]; [sender setBackgroundColor:NewButtonColor]; ViewBorderRadius(sender, 10, 0.6, NewButtonColor); cell.textfield.userInteractionEnabled = NO; bargainingMode = @"0";//面议 } else { //变成原来的颜色 [sender setTitleColor:NewButtonColor forState:UIControlStateNormal]; [sender setBackgroundColor:NewWhiteColor]; ViewBorderRadius(sender, 10, 0.6, NewButtonColor); cell.textfield.userInteractionEnabled = YES; bargainingMode = @"1";//定价 } } #pragma mark -----发布成果网络请求-------- - (void)submissionpurchaseclick:(UIButton *)sender { //descriptionStr 成果描述 //resultsTitleStr 成果标题 //TechnicaltypeStr111 技术类型 //LocationStr 所在地 // titleStr1标签 titleStr2标签 titleStr3标签 //technicaltypeStr 成熟度 //industryStr 行业 //industryStr1 行业类型 //Price 价格 //JyfsStr 交易方式 NSLog(@"成果描述:%@",descriptionStr); NSLog(@"成果标题:%@",resultsTitleStr); NSLog(@"技术类型:%@",TechnicaltypeStr111); NSLog(@"所在地:%@",LocationStr); NSMutableArray *titlearr = NewMutableArrayInit; if (titleStr1!= nil) { [titlearr addObject:titleStr1]; } if (titleStr2!= nil) { [titlearr addObject:titleStr2]; } if (titleStr3!= nil) { [titlearr addObject:titleStr3]; } if (titlearr.count == 1) { titleStr1 = titlearr[0]; titleStr2 = nil; titleStr3 = nil; }else if (titlearr.count == 2){ titleStr1 = titlearr[0]; titleStr2 = titlearr[1]; titleStr3 = nil; }else if (titlearr.count == 3){ titleStr1 = titlearr[0]; titleStr2 = titlearr[1]; titleStr3 = titlearr[2]; } NSLog(@"标签:%@ 标签:%@ 标签:%@",titleStr1,titleStr2,titleStr3); NSLog(@"成熟度:%@",technicaltypeStr); NSLog(@"行业:%@",industryStr); NSLog(@"行业类型:%@",industryStr1); NSLog(@"价格:%@",Price); NSLog(@"交易方式:%@",JyfsStr); if (!descriptionStr) { [MBProgressHUD showError:@"请输入成果描述" toView:self.view]; return; } if (!resultsTitleStr) { [MBProgressHUD showError:@"请输入成果标题" toView:self.view]; return; } if (!TechnicaltypeStr111) { [MBProgressHUD showError:@"请选择技术类型" toView:self.view]; return; } if (!LocationStr) { [MBProgressHUD showError:@"请输入所在地" toView:self.view]; return; } if (titlearr.count<1) { [MBProgressHUD showError:@"请至少输入一个标签" toView:self.view]; return; } if (!technicaltypeStr) { [MBProgressHUD showError:@"请选择成熟度" toView:self.view]; return; } if (!industryStr) { [MBProgressHUD showError:@"请选择行业" toView:self.view]; return; } if (!industryStr1) { [MBProgressHUD showError:@"请选择行业类型" toView:self.view]; return; } if (!JyfsStr) { [MBProgressHUD showError:@"请选择交易方式" toView:self.view]; return; } if (CGPTdataArray.count<0) { [MBProgressHUD showError:@"请选择成果配图" toView:self.view]; return; } NSMutableDictionary *parameters = NewMutableDictionaryInit; [parameters safeSetObject:descriptionStr forKey:@"introduction"];//成果简介 [parameters safeSetObject:resultsTitleStr forKey:@"name"];//成果名称 [parameters safeSetObject:TechnicaltypeStr111 forKey:@"category"];//技术类型 [parameters safeSetObject:@"0" forKey:@"dataCategory"];//数据类别 [parameters safeSetObject:LocationStr forKey:@"ownerPostalAddress"];//所在地 [parameters safeSetObject:titleStr1 forKey:@"keyword1"];//标签1 [parameters safeSetObject:titleStr2 forKey:@"keyword2"];//标签2 [parameters safeSetObject:titleStr3 forKey:@"keyword3"];//标签3 [parameters safeSetObject:technicaltypeStr forKey:@"maturity"];//成熟度 [parameters safeSetObject:industryStr forKey:@"fieldA"];//行业 [parameters safeSetObject:industryStr1 forKey:@"fieldB"];//行业类型 [parameters safeSetObject:bargainingMode forKey:@"bargainingMode"];//面议 if ([bargainingMode isEqualToString:@"0"]) { }else{ if (!Price) { [MBProgressHUD showError:@"请输入价格" toView:self.view]; return; } [parameters safeSetObject:Price forKey:@"transferPrice"];//价格 } if ([JyfsStr isEqualToString:@"技术转让"]) { [parameters safeSetObject:@"0" forKey:@"cooperationMode"];//交易方式 }else{ [parameters safeSetObject:@"1" forKey:@"cooperationMode"];//交易方式 } NSString *url1; NSString *url2; NSString *url3; for (int i = 0; i