InventoryGoodsSearchListVC.m 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556
  1. //
  2. // InventoryGoodsSearchListVC.m
  3. // IBOSSmini
  4. //
  5. // Created by guan hong hou on 2018/2/2.
  6. // Copyright © 2018年 elongtian. All rights reserved.
  7. //
  8. #import "InventoryGoodsSearchListVC.h"
  9. @interface InventoryGoodsSearchListVC (){
  10. BOOL isCheckAll;
  11. }
  12. @property(nonatomic,assign) int pageNumber;
  13. @end
  14. @implementation InventoryGoodsSearchListVC
  15. - (void)viewDidLoad {
  16. [super viewDidLoad];
  17. _inventoryGoodsList=[[NSMutableArray alloc]init];
  18. _inventoryGoodsResultList=[[NSMutableArray alloc]init];
  19. _inventorySubmitList=[[NSMutableArray alloc]init];
  20. [self loadNavStyle];
  21. [self initUI];
  22. }
  23. -(void)viewSafeAreaInsetsDidChange{
  24. _vCustomTableView.frame = CGRectMake(0, 0, SCREENWIDTH, CGRectGetHeight(self.view.safeAreaLayoutGuide.layoutFrame)-40);
  25. _bottomView.frame = CGRectMake(0, CGRectGetMaxY(_vCustomTableView.frame), SCREENWIDTH, 40);
  26. [super viewSafeAreaInsetsDidChange];
  27. }
  28. -(void)loadNavStyle
  29. {
  30. self.navigationItem.title=@"库存商品";
  31. //返回
  32. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  33. [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
  34. forState:UIControlStateNormal];
  35. [button addTarget:self action:@selector(goBack)
  36. forControlEvents:UIControlEventTouchUpInside];
  37. button.frame = CGRectMake(0, 0, 15, 18);
  38. UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
  39. self.navigationItem.leftBarButtonItem = menuButton;
  40. }
  41. -(void)initUI{
  42. [self.view setBackgroundColor:[UIColor whiteColor]];
  43. _vCustomTableView = [[RefreshTableView alloc]
  44. initWithFrame:CGRectMake(0,0,self.view.frame.size.width,Screen_Height-40)];
  45. _vCustomTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  46. _vCustomTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
  47. _vCustomTableView.backgroundColor = [UIColor whiteColor];
  48. _vCustomTableView.delegate = self;
  49. [_vCustomTableView.mRefreshHeader removeFromSuperview];
  50. [self.view addSubview:_vCustomTableView];
  51. //保存
  52. _bottomView=[UIView new];
  53. _bottomView.frame=CGRectMake(0, Screen_Height-110, self.view.frame.size.width, 50);
  54. [self.view addSubview:_bottomView];
  55. _btnCheckAll=[UIButton buttonWithType:UIButtonTypeCustom];
  56. _btnCheckAll.frame=CGRectMake(15,15, 25, 25);
  57. [_btnCheckAll setImage:[UIImage imageNamed:@"order_unchecked"] forState:UIControlStateNormal];
  58. [_btnCheckAll addTarget:self action:@selector(btnCheckall)
  59. forControlEvents:UIControlEventTouchUpInside];
  60. [_bottomView addSubview:_btnCheckAll];
  61. UILabel *lblall=[UILabel new];
  62. lblall.frame=CGRectMake(CGRectGetMaxX(_btnCheckAll.frame)+3,15, 60, 25);
  63. lblall.text=@"全选";
  64. [_bottomView addSubview:lblall];
  65. //提交结算
  66. _sureBtn=[UIButton buttonWithType:UIButtonTypeCustom];
  67. [_sureBtn setTitle:@"确定" forState:UIControlStateNormal];
  68. [_sureBtn setTitleColor:[UIColor whiteColor] forState:UIControlStateNormal];
  69. _sureBtn.frame=CGRectMake(Screen_Width-114,0, 114,50);
  70. [_sureBtn setBackgroundColor:[UIColor colorWithRed:189.0/255.0 green:0 blue:7.0/255.0 alpha:1]];
  71. [_sureBtn addTarget:self action:@selector(submitData) forControlEvents:UIControlEventTouchUpInside];
  72. [_bottomView addSubview:_sureBtn];
  73. _pageNumber=1;
  74. if([_loadFlag isEqualToString:@"scan"]){
  75. [self scanData];
  76. }
  77. else{
  78. [self loadData];
  79. }
  80. }
  81. -(void)btnCheckall{
  82. [self updateAllCellCheck];
  83. NSInteger num= [self getCheckedInventoryCount:_inventoryGoodsResultList];
  84. NSString *sureCount=[NSString stringWithFormat:@"%@%d%@",@"确定(",num,@")"];
  85. [_sureBtn setTitle:sureCount forState:UIControlStateNormal];
  86. [_vCustomTableView reloadData];
  87. }
  88. -(NSInteger) getCheckedInventoryCount:(NSMutableArray*)inventoryList{
  89. int num=0;
  90. NSMutableArray *inventorySubmitList=[[NSMutableArray alloc]init];
  91. NSInteger count=inventoryList.count;
  92. for(int i=0;i<count;i++){
  93. InventoryListModel *model= inventoryList[i];
  94. if(model.isCheckedStatus){
  95. num++;
  96. [inventorySubmitList addObject:model];
  97. }
  98. }
  99. NSInteger checkedCount=inventorySubmitList.count;
  100. return checkedCount;
  101. }
  102. -(void)submitData{
  103. if(_inventoryGoodsResultList==nil||_inventoryGoodsResultList.count==0){
  104. [self showAlertViewText:@"没有选择商品!"];
  105. return;
  106. }
  107. int num=0;
  108. NSInteger count=_inventoryGoodsResultList.count;
  109. for(int i=0;i<count;i++){
  110. InventoryListModel *model= _inventoryGoodsResultList[i];
  111. if(model.isCheckedStatus){
  112. num++;
  113. [_inventorySubmitList addObject:model];
  114. }
  115. }
  116. if(num==0){
  117. [self showAlertViewText:@"至少选择一种商品"];
  118. return;
  119. }
  120. __weak typeof(self) weakself=self;
  121. if ([weakself.orderListDelegate respondsToSelector:@selector(showCheckedInventoryList:)]){
  122. [weakself.orderListDelegate performSelector:@selector(showCheckedInventoryList:) withObject:_inventorySubmitList];
  123. }
  124. [self.navigationController popViewControllerAnimated:YES];
  125. }
  126. //全选或者全不选
  127. -(BOOL)updateAllCellCheck
  128. {
  129. if(!isCheckAll){
  130. isCheckAll=YES;
  131. [_btnCheckAll setImage:[UIImage imageNamed:@"order_checked"] forState:UIControlStateNormal];
  132. for(InventoryListModel *inventoryModel in _inventoryGoodsResultList) {
  133. inventoryModel.isCheckedStatus=YES;
  134. }
  135. }
  136. else
  137. {
  138. [_btnCheckAll setImage:[UIImage imageNamed:@"order_unchecked"] forState:UIControlStateNormal];
  139. isCheckAll=NO;
  140. for(InventoryListModel *inventoryModel in _inventoryGoodsResultList) {
  141. inventoryModel.isCheckedStatus=NO;
  142. }
  143. }
  144. return NO;
  145. }
  146. //看是否全选
  147. -(BOOL)isCheckedAll
  148. {
  149. BOOL ischecked=YES;
  150. for(InventoryListModel *model in _inventoryGoodsResultList) {
  151. if( !model.isCheckedStatus)
  152. {
  153. ischecked=NO;
  154. break;
  155. }
  156. }
  157. return ischecked;
  158. }
  159. -(void)scanData{
  160. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  161. [dict setObject:@"GettOrderSalesInventoryGoodsByScan" forKey:@"Action"];
  162. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  163. [dict setObject:kkUserCode forKey:@"UserCode"];
  164. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  165. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  166. [dict setObject:_barCode forKeyedSubscript:@"Barcode"];
  167. if(_isFilterQuantityEqZero){
  168. [dict setObject:@"true" forKey:@"isfilterQuantityEqZero"];
  169. }else{
  170. [dict setObject:@"false" forKey:@"isfilterQuantityEqZero"];
  171. }
  172. _downManager = [[ASIDownManager alloc] init];
  173. _downManager.delegate = self;
  174. _downManager.onRequestSuccess = @selector(onLoadScanFinish:);
  175. _downManager.onRequestFail = @selector(onLoadScanFail:);
  176. [_downManager postHttpRequest:ServerURL dic:dict path:nil fileName:nil];
  177. }
  178. -(void)loadData{
  179. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  180. [dict setObject:@"GetNewInventoryList" forKey:@"Action"];
  181. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  182. [dict setObject:kkUserCode forKey:@"UserCode"];
  183. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  184. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  185. [dict setObject:[NSString stringWithFormat:@"%d",_pageNumber] forKey:@"PageNum"];
  186. [dict setObject:[NSString stringWithFormat:@"%d",pageSize] forKey:@"PageSize"];
  187. [dict setObject:_goodsName forKeyedSubscript:@"GoodsName"];
  188. [dict setObject:_goodsCode forKeyedSubscript:@"GoodsCode"];
  189. [dict setObject:_onlyCode forKeyedSubscript:@"OnlyCode"];
  190. [dict setObject:_warehouseAreaId forKeyedSubscript:@"WarehouseCode"];
  191. [dict setObject:_brandId forKeyedSubscript:@"BrandID"];
  192. if(_isFilterQuantityEqZero){
  193. [dict setObject:@"true" forKey:@"isfilterQuantityEqZero"];
  194. }else{
  195. [dict setObject:@"false" forKey:@"isfilterQuantityEqZero"];
  196. }
  197. _downManager = [[ASIDownManager alloc] init];
  198. _downManager.delegate = self;
  199. _downManager.onRequestSuccess = @selector(onLoadFinish:);
  200. _downManager.onRequestFail = @selector(onLoadFail:);
  201. [_downManager postHttpRequest:ServerURL dic:dict path:nil fileName:nil];
  202. }
  203. - (void)goBack
  204. {
  205. [self.navigationController popViewControllerAnimated:YES];
  206. }
  207. /**
  208. 隐藏进度条
  209. */
  210. - (void)cancel {
  211. [self stopLoading];
  212. }
  213. /**
  214. 加载列表数据成功回调
  215. @param sender <#sender description#>
  216. */
  217. - (void)onLoadFinish:(ASIDownManager *)sender {
  218. [self cancel];
  219. NSDictionary *dic = [sender.mWebStr JSONValue];
  220. int iNewCount = 0;
  221. _vCustomTableView.mTableView.backgroundView = nil;
  222. // 服务器返回数据是否正确
  223. if (dic && [dic isKindOfClass:[NSDictionary class]])
  224. {
  225. // 服务器返回数据状态值
  226. int iStatus = [[dic objectForKey:@"Status"] intValue];
  227. // 服务器返回数据消息
  228. NSString *message=[dic objectForKey:@"Message"];
  229. // 服务器返回数据状态值正确
  230. if (iStatus == 0) {
  231. NSArray * infoArr=[dic objectForKey:@"Result"];
  232. if(infoArr!=nil&& infoArr.count>0)
  233. {
  234. [self.inventoryGoodsList addObjectsFromArray:infoArr];
  235. if(self.inventoryGoodsList.count > 0 ){
  236. for (int i = 0; i < self.inventoryGoodsList.count; i++) {
  237. NSDictionary *dic=self.inventoryGoodsList[i];
  238. InventoryListModel *model = [InventoryListModel new];
  239. model.code=[dic objectForKey:@"Code"];
  240. model.codeId=[[dic objectForKey:@"CodeID"]integerValue];
  241. model.onlyCode=[dic objectForKey:@"OnlyCode"];
  242. model.inventoryId=[NSString stringWithFormat:@"%ld",[[dic objectForKey:@"InventoryID"]integerValue]];
  243. model.isContractPrice=NO;
  244. // model.costPrice=[NSString stringWithFormat:@"%lf",[[dic objectForKey:@"CostPrice"]doubleValue]];
  245. model.goodsName=[dic objectForKey:@"GoodsName"];
  246. model.detailId=@"";
  247. model.orderId=@"";
  248. model.specification=[dic objectForKey:@"Specification"];
  249. model.acreageFlag=[[dic objectForKey:@"AcreageFlag"]boolValue];
  250. model.originalOrderQuantity=@"0";
  251. model.package=[NSString stringWithFormat:@"%ld",[[dic objectForKey:@"Package"]integerValue]];
  252. model.acreage=[[dic objectForKey:@"Acreage"]doubleValue];
  253. model.usePositionId=@"0";
  254. model.usePositionName=@"";
  255. model.salesQuantity=@"1";
  256. model.circulateType=[[dic objectForKey:@"CirculateType"]integerValue];
  257. NSInteger unitIdValue= [[dic objectForKey:@"UnitID"]integerValue];
  258. model.unitId=[NSString stringWithFormat:@"%ld",unitIdValue];
  259. model.unitName=[dic objectForKey:@"UnitName"];
  260. model.remarks=@"";
  261. NSInteger varietyIdValue=[[dic objectForKey:@"VarietyID"]integerValue];
  262. model.varietyId=[NSString stringWithFormat:@"%ld",varietyIdValue];
  263. model.varietyName=[dic objectForKey:@"VarietyName"];
  264. model.isCheckedStatus=NO;
  265. model.positionNumber=[dic objectForKey:@"PositionNumber"];
  266. model.factOccupyQuantity=@"0";
  267. NSInteger seriesIdValue=[[dic objectForKey:@"SeriesID"]integerValue];
  268. model.seriesId=[NSString stringWithFormat:@"%ld",seriesIdValue ];
  269. model.seriesName=[dic objectForKey:@"SeriesName"];
  270. model.decimalPlaces=[NSString stringWithFormat:@"%@",[dic objectForKey:@"DecimalPlaces"]];
  271. // model.usePositionName=@"请选择使用位置";
  272. model.colorNumber=[dic objectForKey:@"ColorNumber"];
  273. NSInteger brandIdValue= [[dic objectForKey:@"BrandID"]integerValue];
  274. model.brandId=[NSString stringWithFormat:@"%ld",brandIdValue];
  275. model.brandName=[dic objectForKey:@"BrandName"];
  276. model.gradeId=[[dic objectForKey:@"GradeID"]integerValue];
  277. model.gradeName=[dic objectForKey:@"GradeName"];
  278. model.warehouseId=[NSString stringWithFormat:@"%ld",[[dic objectForKey:@"WarehouseID"]integerValue]];
  279. model.warehouseCode=[dic objectForKey:@"WarehouseCode"];
  280. model.wareHouseName=[dic objectForKey:@"WarehouseName"];
  281. double weightValue= [[dic objectForKey:@"Weight"]doubleValue];
  282. double volumeValue=[[dic objectForKey:@"Volume"]doubleValue];
  283. model.weight=[NSString stringWithFormat:@"%.6f",weightValue];
  284. model.volume=[NSString stringWithFormat:@"%.6f",volumeValue];
  285. model.discount=[NSString stringWithFormat:@"%d",100];
  286. NSString *InventoryQuantity = [[dic objectForKey:@"InventoryQuantity"]stringValue];
  287. model.inventoryQuantity=InventoryQuantity == nil?@"0":InventoryQuantity;
  288. NSString *CanSaleQuantity = [[dic objectForKey:@"CanSaleQuantity"]stringValue];
  289. model.canSaleQuantity=CanSaleQuantity==nil?@"0":CanSaleQuantity;
  290. NSInteger kindId=[[dic objectForKey:@"KindID"]integerValue];
  291. model.kindId=[NSString stringWithFormat:@"%ld",kindId];
  292. model.kindName=[dic objectForKey:@"KindName"];
  293. NSString *jzj = [[dic objectForKey:@"jzj"]stringValue];
  294. model.markedPrice=jzj==nil?@"0":jzj;
  295. model.salesPrice=jzj==nil?@"0":jzj;
  296. [self.inventoryGoodsResultList addObject:model];
  297. }
  298. }
  299. iNewCount =(int)infoArr.count;
  300. _vCustomTableView.mbMoreHidden = (iNewCount == 0);
  301. [ _vCustomTableView FinishLoading];
  302. [ _vCustomTableView reloadData];
  303. }
  304. else{
  305. [ _vCustomTableView FinishLoading];
  306. _vCustomTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  307. if(self.inventoryGoodsList.count==0){
  308. UIView *noDataView=[[UIView alloc]init];
  309. noDataView.frame= _vCustomTableView.mTableView.bounds;
  310. UIImageView *nodataImgView=[[UIImageView alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16,noDataView.frame.size.height/2-16,32,32)];
  311. [nodataImgView setImage:[UIImage imageNamed:@"icon_no_data"]];
  312. [noDataView addSubview:nodataImgView];
  313. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16-12,CGRectGetMaxY(nodataImgView.frame)+3,70, 25)];
  314. label.font=[UIFont systemFontOfSize:NoDataFontOfSize];
  315. label.text = @"无数据";
  316. label.numberOfLines = 2;
  317. label.textColor = [UIColor lightGrayColor];
  318. [noDataView addSubview:label];
  319. _vCustomTableView.mTableView.backgroundView =noDataView;
  320. [self showAlertViewBackText:@"未找到匹配结果"];
  321. }
  322. }
  323. }
  324. // 服务器返回数据状态值异常
  325. else if(iStatus == ActionResultStatusAuthError
  326. ||iStatus == ActionResultStatusNoLogin
  327. ||iStatus == ActionResultStatusLogined||iStatus==ActionResultSessionOverdue){
  328. [self showReLoginDialog:message];
  329. }
  330. else{
  331. [_vCustomTableView FinishLoading];
  332. [self showAlertViewText:message];
  333. }
  334. }
  335. }
  336. /**
  337. 加载列表数据失败回调
  338. @param sender <#sender description#>
  339. */
  340. - (void)onLoadFail:(ASIDownManager *)sender {
  341. [self cancel];
  342. [self showAlertViewText:@"加载失败"];
  343. }
  344. /**
  345. 加载列表数据成功回调
  346. @param sender <#sender description#>
  347. */
  348. - (void)onLoadScanFinish:(ASIDownManager *)sender {
  349. NSDictionary *dic = [sender.mWebStr JSONValue];
  350. if (dic && [dic isKindOfClass:[NSDictionary class]])
  351. {
  352. // 服务器返回数据状态值
  353. int iStatus = [[dic objectForKey:@"Status"] intValue];
  354. // 服务器返回数据消息
  355. NSString *message=[dic objectForKey:@"Message"];
  356. // 服务器返回数据状态值正确
  357. if (iStatus == 0) {
  358. _onlyCode=[dic objectForKey:@"Result"];
  359. [self loadData];
  360. }
  361. else if(iStatus == ActionResultStatusAuthError
  362. ||iStatus == ActionResultStatusNoLogin
  363. ||iStatus == ActionResultStatusLogined||iStatus==ActionResultSessionOverdue){
  364. [self showReLoginDialog:message];
  365. }
  366. else{
  367. [self showAlertViewText:message];
  368. }
  369. }
  370. }
  371. /**
  372. 加载列表数据失败回调
  373. @param sender <#sender description#>
  374. */
  375. - (void)onLoadScanFail:(ASIDownManager *)sender {
  376. [self cancel];
  377. [self showAlertViewText:@"加载失败"];
  378. }
  379. #pragma mark - 刷新回调
  380. /**
  381. 取消刷新
  382. @param sender sender description
  383. @return return value description
  384. */
  385. - (BOOL)CanRefreshTableView:(RefreshTableView *)sender {
  386. return YES;
  387. }
  388. #pragma mark - 委托回调函数
  389. #pragma mark - tableView回调
  390. /**
  391. 单元格cell个数
  392. @param tableView <#tableView description#>
  393. @param section <#section description#>
  394. @return <#return value description#>
  395. */
  396. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  397. {
  398. return [_inventoryGoodsResultList count];
  399. }
  400. /**
  401. <#Description#>
  402. @param tableView <#tableView description#>
  403. @return <#return value description#>
  404. */
  405. -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
  406. return 1;
  407. }
  408. /**
  409. 高度
  410. @param tableView <#tableView description#>
  411. @param indexPath <#indexPath description#>
  412. @return <#return value description#>
  413. */
  414. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  415. return 208.7;
  416. }
  417. /**
  418. 每个单元格cell
  419. @param tableView <#tableView description#>
  420. @param indexPath <#indexPath description#>
  421. @return <#return value description#>
  422. */
  423. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  424. {
  425. static NSString *cellIdentifier = @"InventoryCell";
  426. InventoryGoodsSearchCell *cell = [tableView dequeueReusableCellWithIdentifier:cellIdentifier];
  427. cell=[[InventoryGoodsSearchCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:cellIdentifier];
  428. cell.selectionStyle=UITableViewCellSelectionStyleNone;
  429. InventoryListModel *inventoryModel= [_inventoryGoodsResultList objectAtIndex:indexPath.row];
  430. cell.delegate = self;
  431. cell.position=indexPath.row;
  432. [cell setInventoryGoods:inventoryModel];
  433. BOOL checked = inventoryModel.isCheckedStatus;
  434. [cell setCheckBackground:checked];
  435. return cell;
  436. }
  437. -(void)btnInventoryListCheckPressed:(InventoryGoodsSearchCell*)cell{
  438. InventoryListModel *inventoryModel= _inventoryGoodsResultList[cell.position];
  439. inventoryModel.isCheckedStatus=!inventoryModel.isCheckedStatus;
  440. [_vCustomTableView reloadData];
  441. if([self isCheckedAll]){
  442. [_btnCheckAll setImage:[UIImage imageNamed:@"order_checked"] forState:UIControlStateNormal];
  443. }
  444. else{
  445. [_btnCheckAll setImage:[UIImage imageNamed:@"order_unchecked"] forState:UIControlStateNormal];
  446. }
  447. NSInteger num=[self getCheckedInventoryCount:_inventoryGoodsResultList];
  448. NSString *sureCount=[NSString stringWithFormat:@"%@%d%@",@"确定(",num,@")"];
  449. [_sureBtn setTitle:sureCount forState:UIControlStateNormal];
  450. }
  451. /**
  452. 加载更多
  453. @param sender <#sender description#>
  454. */
  455. - (void)LoadMoreList:(RefreshTableView *)sender {
  456. _pageNumber++;
  457. [self startLoading];
  458. [self loadData];
  459. }
  460. /**
  461. 隐藏进度条
  462. */
  463. - (void)Cancel {
  464. [self stopLoading];
  465. }
  466. /**
  467. 隐藏键盘
  468. @param scrollView <#scrollView description#>
  469. */
  470. -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
  471. {
  472. [self.view endEditing:YES];
  473. }
  474. - (void)didReceiveMemoryWarning {
  475. [super didReceiveMemoryWarning];
  476. }
  477. @end