OtherInStorageListVC.m 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585
  1. //
  2. // OtherInStorageListVC.m
  3. // IBOSSmini
  4. //
  5. // Created by guan hong hou on 2018/4/20.
  6. // Copyright © 2018年 elongtian. All rights reserved.
  7. //
  8. #import "OtherInStorageListVC.h"
  9. @interface OtherInStorageListVC (){
  10. int pageNumber;
  11. }
  12. @end
  13. @implementation OtherInStorageListVC
  14. #pragma mark - 公共函数
  15. /**
  16. 视图加载完成
  17. */
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. [self loadNavStyle];
  21. [self initUI];
  22. [self initSlideSlip];
  23. }
  24. /**
  25. 修改:2017-9-25
  26. 适配机型
  27. 安全区视图发生变化
  28. */
  29. -(void)viewSafeAreaInsetsDidChange{
  30. self.view.backgroundColor = [UIColor whiteColor];
  31. _vCustomTableView.frame = CGRectMake(0,CGRectGetMaxY(_topSeparatorView.frame),Screen_Width, self.view.safeAreaLayoutGuide.layoutFrame.size.height-CGRectGetMaxY(_topSeparatorView.frame) );
  32. [super viewSafeAreaInsetsDidChange];
  33. }
  34. - (void)didReceiveMemoryWarning {
  35. [super didReceiveMemoryWarning];
  36. }
  37. #pragma mark - 委托函数
  38. #pragma mark - 刷新回调
  39. /**
  40. 取消刷新
  41. @param sender sender description
  42. @return return value description
  43. */
  44. - (BOOL)CanRefreshTableView:(RefreshTableView *)sender {
  45. return YES;
  46. }
  47. /**
  48. 加载更多
  49. @param sender sender description
  50. */
  51. - (void)LoadMoreList:(RefreshTableView *)sender {
  52. pageNumber++;
  53. [self startLoading];
  54. [self loadData];
  55. }
  56. /**
  57. 下拉刷新
  58. @param sender <#sender description#>
  59. */
  60. - (void)ReloadList:(RefreshTableView *)sender{
  61. pageNumber = 1;
  62. [_dataList removeAllObjects];
  63. [_vCustomTableView reloadData];
  64. _vCustomTableView.mbMoreHidden=YES;
  65. [self startLoading];
  66. [self loadData];
  67. }
  68. /**
  69. 到入库列表明细
  70. @param index <#index description#>
  71. */
  72. -(void) goInStorageDetail:(NSInteger)index{
  73. self.hidesBottomBarWhenPushed = YES;
  74. _otherInStorageListModel=[_dataList objectAtIndex:index];
  75. OtherInStorageGoodsDetailListVC *goodsDetailVc=[[OtherInStorageGoodsDetailListVC alloc]init];
  76. goodsDetailVc.enterId=_otherInStorageListModel.enterId;
  77. goodsDetailVc.enterNo=_otherInStorageListModel.enterNo;
  78. [self.navigationController pushViewController:goodsDetailVc animated:YES];
  79. }
  80. /**
  81. 冲正
  82. @param index <#index description#>
  83. */
  84. -(void) goCorrect:(NSInteger)index{
  85. _otherInStorageListModel=[_dataList objectAtIndex:index];
  86. UIAlertController *alert = [UIAlertController alertControllerWithTitle:@""
  87. message:@"确定要冲正吗?" preferredStyle:UIAlertControllerStyleAlert];
  88. UIAlertAction *okAction = [UIAlertAction actionWithTitle:@"确定"
  89. style:UIAlertActionStyleDefault
  90. handler:^(UIAlertAction *action){
  91. [self correctData:_otherInStorageListModel];
  92. }];
  93. UIAlertAction *cancelAction = [UIAlertAction actionWithTitle:@"取消"
  94. style:UIAlertActionStyleDefault
  95. handler:^(UIAlertAction *action){
  96. }];
  97. UIColor *cancelColor=[UIColor blackColor];
  98. UIColor *sureColor=[UIColor redColor];
  99. [cancelAction setValue:cancelColor forKey:@"titleTextColor"];
  100. [okAction setValue:sureColor forKey:@"titleTextColor"];
  101. [alert addAction:okAction];
  102. [alert addAction:cancelAction];
  103. [self presentViewController:alert animated:YES completion:nil];
  104. }
  105. /**
  106. 隐藏键盘
  107. @param scrollView <#scrollView description#>
  108. */
  109. -(void)scrollViewWillBeginDragging:(UIScrollView *)scrollView
  110. {
  111. [self.view endEditing:YES];
  112. }
  113. /**
  114. 冲正成功数据源回调
  115. @param sender <#sender description#>
  116. */
  117. - (void)onCorrectFinish:(ASIDownManager *)sender {
  118. NSDictionary *dic = [sender.mWebStr JSONValue];
  119. _vCustomTableView.mTableView.backgroundView = nil;
  120. [self stopLoading];
  121. // 服务器返回数据是否正确
  122. if (dic && [dic isKindOfClass:[NSDictionary class]]) {
  123. // 服务器返回数据状态值
  124. int iStatus = [[dic objectForKey:@"Status"] intValue];
  125. // 服务器返回数据消息
  126. NSString *message=[dic objectForKey:@"Message"];
  127. // 服务器返回数据状态值正确
  128. if (iStatus == 0) {
  129. pageNumber = 1;
  130. [_dataList removeAllObjects];
  131. [_vCustomTableView reloadData];
  132. _vCustomTableView.mbMoreHidden=YES;
  133. [self startLoading];
  134. [self loadData];
  135. [self showAlertViewText:@"冲正成功"];
  136. }
  137. // 服务器返回数据状态值异常
  138. else if(iStatus==ActionResultStatusAuthError
  139. ||iStatus==ActionResultStatusNoLogin
  140. ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
  141. [self showReLoginDialog:message];
  142. }
  143. else{
  144. [_vCustomTableView FinishLoading];
  145. [self showAlertViewText:message];
  146. }
  147. }
  148. }
  149. /**
  150. 冲正失败数据源回调
  151. @param sender <#sender description#>
  152. */
  153. - (void)onCorrectFail:(ASIDownManager *)sender {
  154. [self stopLoading];
  155. [self showAlertViewText:@"加载失败"];
  156. }
  157. /**
  158. 单元格cell个数
  159. @param tableView <#tableView description#>
  160. @param section <#section description#>
  161. @return <#return value description#>
  162. */
  163. -(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
  164. {
  165. return [_dataList count];
  166. }
  167. /**
  168. tableview的分区数
  169. @param tableView <#tableView description#>
  170. @return <#return value description#>
  171. */
  172. -(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
  173. return 1;
  174. }
  175. /**
  176. 高度
  177. @param tableView <#tableView description#>
  178. @param indexPath <#indexPath description#>
  179. @return <#return value description#>
  180. */
  181. - (CGFloat)tableView:(UITableView *)tableView heightForRowAtIndexPath:(NSIndexPath *)indexPath{
  182. return 275;
  183. }
  184. /**
  185. 每个单元格cell
  186. @param tableView <#tableView description#>
  187. @param indexPath <#indexPath description#>
  188. @return <#return value description#>
  189. */
  190. -(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath
  191. {
  192. static NSString *CellIdentifier = @"SalesInStorageListCell";
  193. SalesInStorageListCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier ];
  194. if (!cell) {
  195. cell=[[SalesInStorageListCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier];
  196. cell.selectionStyle=UITableViewCellSelectionStyleNone;
  197. }
  198. else
  199. //当页面拉动的时候 当cell存在并且最后一个存在 把它进行删除就出来一个独特的cell我们在进行数据配置即可避免
  200. {
  201. while ([cell.contentView.subviews lastObject] != nil) {
  202. [(UIView *)[cell.contentView.subviews lastObject] removeFromSuperview];
  203. }
  204. }
  205. _otherInStorageListModel= [_dataList objectAtIndex:indexPath.row];
  206. cell.inStorageDelegate = self;
  207. cell.index=indexPath.row;
  208. [cell setSalesInStorageListModel:_otherInStorageListModel];
  209. return cell;
  210. }
  211. /**
  212. 点击单元格事件
  213. @param tableView tableView description
  214. @param indexPath indexPath description
  215. */
  216. - (void)tableView:(UITableView *)tableView didSelectRowAtIndexPath:(NSIndexPath *)indexPath
  217. {
  218. self.hidesBottomBarWhenPushed=YES;
  219. OtherInStorageDetailVC *detailVc=[[OtherInStorageDetailVC alloc] init];
  220. OtherInStorageListModel *otherInStorageDetailModel= [_dataList objectAtIndex:indexPath.row];
  221. detailVc.otherInStorageListModel= otherInStorageDetailModel;
  222. [self.navigationController pushViewController:detailVc animated:YES];
  223. }
  224. /**
  225. 显示下拉更新
  226. @param scrollView <#scrollView description#>
  227. */
  228. - (void)scrollViewDidScroll:(UIScrollView *)scrollView{
  229. if (scrollView.isDragging) {//显示下拉更新
  230. if (_vCustomTableView.mRefreshHeader.state == PullRefreshPulling && scrollView.contentOffset.y > -65.0f && scrollView.contentOffset.y < 0.0f && [_vCustomTableView CanRefresh]) {
  231. [_vCustomTableView.mRefreshHeader setState:PullRefreshNormal];
  232. }
  233. else if (_vCustomTableView.mRefreshHeader.state == PullRefreshNormal && scrollView.contentOffset.y < -65.0f && [_vCustomTableView CanRefresh]) {//显示松开更新
  234. [_vCustomTableView.mRefreshHeader setState:PullRefreshPulling];
  235. }
  236. }
  237. }
  238. -(void)refreshData{
  239. pageNumber = 1;
  240. [_dataList removeAllObjects];
  241. [_vCustomTableView reloadData];
  242. _vCustomTableView.mbMoreHidden=YES;
  243. [self startLoading];
  244. [self loadData];
  245. }
  246. #pragma mark - 私有函数
  247. /**
  248. 导航按钮样式
  249. */
  250. -(void)loadNavStyle
  251. {
  252. //右边
  253. UIButton *btnAdd = [UIButton buttonWithType:UIButtonTypeCustom];
  254. [btnAdd addTarget:self action:@selector(add)
  255. forControlEvents:UIControlEventTouchUpInside];
  256. UIImage *pic =[UIImage imageNamed:@"title_add"];
  257. btnAdd.frame = CGRectMake(0, 0, 18, 18);
  258. [btnAdd setTitleColor:NavBarItemColor forState:UIControlStateNormal];
  259. [btnAdd setBackgroundImage:pic
  260. forState:UIControlStateNormal];
  261. UIBarButtonItem *menubtnAdd = [[UIBarButtonItem alloc] initWithCustomView:btnAdd];
  262. self.navigationItem.title=@"其他入库列表";
  263. self.navigationItem.rightBarButtonItem = menubtnAdd;
  264. //返回
  265. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  266. [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
  267. forState:UIControlStateNormal];
  268. [button addTarget:self action:@selector(goBack)
  269. forControlEvents:UIControlEventTouchUpInside];
  270. button.frame = CGRectMake(0, 0, 15, 18);
  271. UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
  272. self.navigationItem.leftBarButtonItem = menuButton;
  273. }
  274. /**
  275. 跳转到新增其它入库
  276. */
  277. -(void)add{
  278. self.hidesBottomBarWhenPushed=YES;
  279. NewOtherInStorageHomeVC *homeVc=[[NewOtherInStorageHomeVC alloc] init];
  280. homeVc.refreshDelegate=self;
  281. [self.navigationController pushViewController:homeVc animated:YES];
  282. }
  283. /**
  284. 初始化UI
  285. */
  286. -(void)initUI{
  287. CGFloat height = 40;
  288. _searchView = [[UIView alloc]initWithFrame:CGRectMake(0, 0, Screen_Width, 60)];
  289. _searchView.backgroundColor = [UIColor whiteColor];
  290. UIButton *btnSearch = [UIButton buttonWithType:UIButtonTypeCustom];
  291. btnSearch.frame = CGRectMake(20,10, Screen_Width-height, height);
  292. btnSearch.layer.cornerRadius = 6.0f;
  293. [btnSearch setTitle:@"搜索" forState:UIControlStateNormal];
  294. [btnSearch setTitleColor:NavBarUnEnbleItemColor forState:UIControlStateNormal];
  295. btnSearch.titleLabel.textAlignment = NSTextAlignmentCenter;
  296. btnSearch.titleLabel.font = [UIFont systemFontOfSize:LabelAndTextFontOfSize];
  297. btnSearch.backgroundColor = LineBackgroundColor;
  298. [btnSearch addTarget:self action:@selector(dataSearch) forControlEvents:UIControlEventTouchUpInside];
  299. [_searchView addSubview:btnSearch];
  300. [self.view addSubview:_searchView];
  301. _topSeparatorView = [UIView new];
  302. _topSeparatorView.frame=CGRectMake(0, CGRectGetMaxY(_searchView.frame), Screen_Width, 10);
  303. _topSeparatorView.backgroundColor = LineBackgroundColor;
  304. [self.view addSubview:_topSeparatorView];
  305. _dataList=[[NSMutableArray alloc]init];
  306. _vCustomTableView = [[RefreshTableView alloc]
  307. initWithFrame:CGRectMake(0,
  308. CGRectGetMaxY(_topSeparatorView.frame),
  309. self.view.frame.size.width,
  310. Screen_Height - CGRectGetMaxY(_topSeparatorView.frame))];
  311. _vCustomTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  312. _vCustomTableView.autoresizingMask = UIViewAutoresizingFlexibleHeight;
  313. _vCustomTableView.backgroundColor = [UIColor whiteColor];
  314. _vCustomTableView.delegate = self;
  315. [self.view addSubview:_vCustomTableView];
  316. pageNumber = 1;
  317. _enterType=@"1";
  318. [self loadData];
  319. }
  320. /**
  321. 返回函数
  322. */
  323. - (void)goBack
  324. {
  325. [self.navigationController popViewControllerAnimated:YES];
  326. }
  327. /**
  328. 加载数据源
  329. */
  330. -(void)loadData{
  331. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  332. [dict setObject:@"GetEnterDataListIphone" forKey:@"Action"];
  333. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  334. [dict setObject:kkUserCode forKey:@"UserCode"];
  335. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  336. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  337. [dict setObject:_enterNo== nil? @"" : _enterNo forKey:@"EnterNo"];
  338. [dict setObject:_supplierId== nil? @"" : _supplierId forKey:@"SupplierID"];
  339. [dict setObject:_organizationCode== nil? @"" : _organizationCode forKey:@"OrganizationCode"];
  340. [dict setObject:_staffId== nil? @"" : _staffId forKey:@"StaffID"];
  341. [dict setObject:_enterType== nil? @"" : _enterType forKey:@"EnterType"];
  342. [dict setObject:_customerCode == nil? @"" : _customerCode forKey:@"CustomerCode"];
  343. [dict setObject:_startDate == nil? @"" : _startDate forKey:@"AccountDateFrom"];
  344. [dict setObject:_endDate == nil? @"" : _endDate forKey:@"AccountDateTo"];
  345. [dict setObject:_invoiceStatus == nil? @"" : _invoiceStatus forKey:@"InvoiceStatus"];
  346. [dict setObject:@"20" forKey:@"PageSize"];
  347. [dict setObject:[NSString stringWithFormat:@"%d",pageNumber] forKey:@"PageNum"];
  348. _downManager = [[ASIDownManager alloc] init];
  349. [self startLoading];
  350. _downManager.delegate = self;
  351. _downManager.OnImageDown = @selector(onEnterStorageListFinish:);
  352. _downManager.OnImageFail = @selector(onEnterStorageListFail:);
  353. [_downManager postHttpRequest:ServerURL dic:dict path:nil fileName:nil];
  354. }
  355. /**
  356. 加载数据成功回调
  357. @param sender sender description
  358. */
  359. - (void)onEnterStorageListFinish:(ASIDownManager *)sender {
  360. NSDictionary *dic = [sender.mWebStr JSONValue];
  361. [self stopLoading];
  362. _vCustomTableView.mTableView.backgroundView = nil;
  363. // 服务器返回数据是否正确
  364. if (dic && [dic isKindOfClass:[NSDictionary class]]) {
  365. // 服务器返回数据状态值
  366. int iStatus = [[dic objectForKey:@"Status"] intValue];
  367. int iNewCount = 0;
  368. // 服务器返回数据消息
  369. NSString *message=[dic objectForKey:@"Message"];
  370. // 服务器返回数据状态值正确
  371. if (iStatus == 0) {
  372. NSArray * infoArr=[dic objectForKey:@"Result"];
  373. // 返回结果
  374. if(infoArr!=nil&& infoArr.count>0)
  375. {
  376. for (int i = 0; i < infoArr.count; i++) {
  377. NSDictionary * dic=infoArr[i];
  378. OtherInStorageListModel *otherInStorageListModel=[OtherInStorageListModel new];
  379. [otherInStorageListModel parseDic:dic];
  380. [_dataList addObject:otherInStorageListModel];
  381. }
  382. iNewCount =(int)infoArr.count;
  383. _vCustomTableView.mbMoreHidden = (iNewCount == 0);
  384. [_vCustomTableView FinishLoading];
  385. [_vCustomTableView reloadData];
  386. }
  387. else{
  388. if(pageNumber==1){
  389. [_vCustomTableView FinishLoading];
  390. _vCustomTableView.separatorStyle = UITableViewCellSeparatorStyleNone;
  391. [self showAlertViewText:@"未找到匹配结果"];
  392. UIView *noDataView=[[UIView alloc]init];
  393. noDataView.frame=_vCustomTableView.bounds;
  394. UIImageView *nodataImgView=[[UIImageView alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16,noDataView.frame.size.height/2-16,32,32)];
  395. [nodataImgView setImage:[UIImage imageNamed:@"icon_no_data"]];
  396. [noDataView addSubview:nodataImgView];
  397. UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(noDataView.frame.size.width/2-16-12,CGRectGetMaxY(nodataImgView.frame)+3,70, 25)];
  398. label.font=[UIFont systemFontOfSize:NoDataFontOfSize];
  399. label.text = @"无数据";
  400. label.numberOfLines = 2;
  401. label.textColor = [UIColor lightGrayColor];
  402. [noDataView addSubview:label];
  403. _vCustomTableView.mTableView.backgroundView =noDataView;
  404. }
  405. }
  406. }
  407. else if(iStatus==ActionResultStatusAuthError
  408. ||iStatus==ActionResultStatusNoLogin
  409. ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
  410. [self showReLoginDialog:message];
  411. }
  412. else{
  413. [self showAlertViewText:message];
  414. }
  415. }
  416. }
  417. /**
  418. 加载数据失败回调
  419. @param sender <#sender description#>
  420. */
  421. - (void)onEnterStorageListFail:(ASIDownManager *)sender {
  422. [self stopLoading];
  423. [self showAlertViewText:@"加载失败"];
  424. }
  425. /**
  426. 打开查询抽屉
  427. */
  428. -(void)dataSearch{
  429. [_filterController show];
  430. }
  431. /**
  432. 抽屉初始化
  433. */
  434. - (void)initSlideSlip{
  435. // 抽屉对象
  436. __weak typeof(self) weakself=self;
  437. self.filterController = [[SideSlipFilterController alloc]
  438. initWithSponsor:self
  439. resetBlock:^(NSArray *dataList) {
  440. for (SideSlipModel *model in dataList) {
  441. model.selectedItemList = nil;
  442. model.customDict = nil;
  443. }
  444. } commitBlock:^(NSArray *dataList) {
  445. // 查询条件
  446. SideSlipModel *serviceRegionModel = dataList[0];
  447. OtherInStorageSearchModel *m = [serviceRegionModel.customDict objectForKey:SALES_IN_STORAGE_SEARCH_RANGE_MODEL];
  448. _enterNo =m.inStorageNo;
  449. _supplierId=m.supplierId;
  450. _customerCode=m.customerCode;
  451. _startDate=m.startDate;
  452. _endDate=m.endDate;
  453. _organizationCode=m.organizationCode;
  454. _staffId=m.staffId;
  455. _invoiceStatus=m.invoiceStatus;
  456. _enterType=@"1";
  457. [weakself.filterController dismiss];
  458. pageNumber = 1;
  459. [_dataList removeAllObjects];
  460. [_vCustomTableView reloadData];
  461. _vCustomTableView.mbMoreHidden=YES;
  462. [self startLoading];
  463. [self loadData];
  464. }];
  465. _filterController.animationDuration = AnimationDuration;
  466. _filterController.hasHeadView = YES;
  467. _filterController.sideSlipLeading = UIScreenSideSlipLeading*[UIScreen mainScreen].bounds.size.width;
  468. _filterController.dataList = [self packageDataList];
  469. }
  470. /**
  471. 抽屉数据源
  472. @return <#return value description#>
  473. */
  474. - (NSArray *)packageDataList {
  475. NSMutableArray *dataArray = [NSMutableArray array];
  476. SideSlipModel *model = [[SideSlipModel alloc] init];
  477. model.containerCellClass = @"SalesInStorageSearchCell";
  478. model.regionTitle = @"查询条件";
  479. [dataArray addObject:model];
  480. return [dataArray mutableCopy];
  481. }
  482. /**
  483. 冲正数据源
  484. @param model <#model description#>
  485. */
  486. -(void)correctData:(OtherInStorageListModel *)model{
  487. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  488. [dict setObject:@"SaveEnterReversedIphone" forKey:@"Action"];
  489. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  490. [dict setObject:kkUserCode forKey:@"UserCode"];
  491. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  492. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  493. [dict setObject:@"1" forKey:@"IDevicesType"];
  494. [dict setObject:model.enterId == nil?@"":model.enterId forKey:@"EnterID"];
  495. NSString *statusStr = [NSString stringWithFormat:@"%ld",(long)model.invoiceStatusId];
  496. [dict setObject:statusStr == nil?@"":statusStr forKey:@"Status"];
  497. [dict setObject:model.enterType forKey:@"EnterType"];
  498. [self startLoading];
  499. _downManager = [[ASIDownManager alloc] init];
  500. _downManager.delegate = self;
  501. _downManager.OnImageDown = @selector(onCorrectFinish:);
  502. _downManager.OnImageFail = @selector(onCorrectFail:);
  503. [_downManager postHttpRequest:ServerURL dic:dict path:nil fileName:nil];
  504. }
  505. @end