StockingDetailViewController.m 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493
  1. //
  2. // StockingDetailViewController.m
  3. // IBOSSmini
  4. //
  5. // Created by apple on 2017/5/17.
  6. // Copyright © 2017年 elongtian. All rights reserved.
  7. //
  8. #import "StockingDetailViewController.h"
  9. @interface StockingDetailViewController (){
  10. UILabel *noValue ;
  11. UILabel *onlyCode;
  12. UILabel *gradeName ;
  13. UILabel *specification ;
  14. UILabel *colorNumber;
  15. UILabel *wareHouseName;
  16. UILabel *positionNumber ;
  17. UILabel *goodKindName;
  18. UILabel *brandName;
  19. UILabel *serialName;
  20. UILabel *varietyName;
  21. UILabel *quantity ;
  22. UILabel *stockingQuantity;
  23. UILabel *personName;
  24. UILabel *reason ;
  25. UILabel *usertime;
  26. UILabel *username;
  27. UIScrollView *_scrollView;
  28. }
  29. /**
  30. ASIDownManager
  31. */
  32. @property (nonatomic,strong) ASIDownManager *downManager;
  33. @end
  34. @implementation StockingDetailViewController
  35. #pragma mark - 公共函数
  36. /**
  37. viewDidLoad
  38. */
  39. - (void)viewDidLoad {
  40. [super viewDidLoad];
  41. [self showTitle:@"库存盘点明细"];
  42. [self loadNavStyle];
  43. [self initUI];
  44. [self reloadData];
  45. }
  46. /**
  47. 安全区视图发生变化
  48. */
  49. -(void)viewSafeAreaInsetsDidChange{
  50. _scrollView.frame = self.view.safeAreaLayoutGuide.layoutFrame;
  51. [super viewSafeAreaInsetsDidChange];
  52. }
  53. /**
  54. didReceiveMemoryWarning
  55. */
  56. - (void)didReceiveMemoryWarning {
  57. [super didReceiveMemoryWarning];
  58. }
  59. #pragma mark - 回调函数
  60. /**
  61. * 查询正常数据
  62. *
  63. * @param sender <#sender description#>
  64. */
  65. - (void)onLoadFinish:(ASIDownManager *)sender
  66. {
  67. NSDictionary *dic =[[NSDictionary alloc] init];
  68. dic = [sender.mWebStr JSONValue];
  69. [self Cancel];
  70. // 服务器返回数据是否正确
  71. if (dic && [dic isKindOfClass:[NSDictionary class]])
  72. {
  73. // 服务器返回数据状态值
  74. int iStatus = [[dic objectForKey:@"Status"] intValue];
  75. // 服务器返回数据消息
  76. NSString *message=[dic objectForKey:@"Message"];
  77. // 服务器返回数据状态值正确
  78. if (iStatus == 0) {
  79. NSArray * approvArr=[dic objectForKey:@"Result"];
  80. if(approvArr!=nil)
  81. {
  82. if(approvArr ==nil || approvArr.count==0)
  83. {
  84. [self showAlertViewText:@"未找到匹配结果"];
  85. }
  86. else
  87. {
  88. for (int i = 0; i < approvArr.count; i++)
  89. {
  90. NSDictionary *dicValue = approvArr[i];
  91. noValue.text = [dicValue objectForKey:@"CheckNo"];
  92. onlyCode.text = [dicValue objectForKey:@"OnlyCode"];
  93. gradeName.text = [dicValue objectForKey:@"GradeName"];
  94. specification.text = [dicValue objectForKey:@"Specification"];
  95. colorNumber.text = [dicValue objectForKey:@"ColorNumber"];
  96. wareHouseName.text = [dicValue objectForKey:@"WarehouseName"];
  97. positionNumber.text = [dicValue objectForKey:@"PositionNumber"];
  98. goodKindName.text = [dicValue objectForKey:@"KindName"];
  99. brandName.text = [dicValue objectForKey:@"BrandName"];
  100. serialName.text = [dicValue objectForKey:@"SeriesName"];
  101. varietyName.text = [dicValue objectForKey:@"VarietyName"];
  102. quantity.text = [[dicValue objectForKey:@"InventoryQuantity"]stringValue] ;
  103. stockingQuantity.text = [[dicValue objectForKey:@"CheckQuantity"]stringValue];
  104. personName.text = [dicValue objectForKey:@"StaffName"];
  105. reason.text = [dicValue objectForKey:@"ShortageReasonName"];
  106. usertime.text = [dicValue objectForKey:@"CreateTime"];
  107. username.text = [dicValue objectForKey:@"UserName"];
  108. }
  109. }
  110. }
  111. }
  112. // 服务器返回数据状态值异常
  113. else if(iStatus==ActionResultStatusAuthError
  114. ||iStatus==ActionResultStatusNoLogin
  115. ||iStatus==ActionResultStatusLogined ||iStatus == ActionResultStatusLoginedInvalid){
  116. [self showReLoginDialog:message];
  117. }
  118. else {
  119. [self showAlertViewText:message];
  120. }
  121. }
  122. }
  123. /**
  124. * 异常数据
  125. *
  126. * @param sender sender description
  127. */
  128. - (void)onLoadFail:(ASIDownManager *)sender {
  129. [self Cancel];
  130. [self showAlertViewText:@"加载失败"];
  131. }
  132. #pragma mark - 私有函数
  133. /**
  134. 初始化ui
  135. */
  136. - (void)initUI {
  137. self.view.backgroundColor = LineBackgroundColor;
  138. CGFloat heightRow = 30;
  139. CGFloat lblx = 10;
  140. CGFloat lbly = 3;
  141. CGFloat lblwidth = 70;
  142. CGFloat lblheight = 25;
  143. CGFloat valuex = 80;
  144. CGFloat valuey = 3;
  145. CGFloat valueheight = 25;
  146. _scrollView=[UIScrollView new];
  147. _scrollView.frame=self.view.bounds;
  148. [self.view addSubview:_scrollView];
  149. UIView *vTitle = [UIView new];
  150. [_scrollView addSubview:vTitle];
  151. vTitle.backgroundColor = [UIColor whiteColor];
  152. //盘点单号==================
  153. UIView *vno = [UIView new];
  154. vno.frame=CGRectMake(0, CGRectGetMaxY(vTitle.frame), Screen_Width, heightRow);
  155. [vTitle addSubview:vno];
  156. UILabel *lblno=[UILabel new];
  157. lblno.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  158. lblno.text=@"盘点单号:";
  159. lblno.textColor = [UIColor blackColor];
  160. lblno.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  161. [vno addSubview:lblno];
  162. noValue = [UILabel new];
  163. noValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  164. noValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  165. [vno addSubview:noValue];
  166. //唯一编码==================
  167. UIView *vonlyCode = [UIView new];
  168. vonlyCode.frame=CGRectMake(0, CGRectGetMaxY(vno.frame), Screen_Width, heightRow);
  169. [vTitle addSubview:vonlyCode];
  170. UILabel *lblonlyCode=[UILabel new];
  171. lblonlyCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  172. lblonlyCode.text=@"唯一编码:";
  173. lblonlyCode.textColor = [UIColor blackColor];
  174. lblonlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  175. [vonlyCode addSubview:lblonlyCode];
  176. onlyCode = [UILabel new];
  177. onlyCode.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  178. onlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  179. [vonlyCode addSubview:onlyCode];
  180. //==================
  181. UIView *vgradeName = [UIView new];
  182. vgradeName.frame=CGRectMake(0, CGRectGetMaxY(vonlyCode.frame), Screen_Width, heightRow);
  183. [vTitle addSubview:vgradeName];
  184. UILabel *lblgradeName=[UILabel new];
  185. lblgradeName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  186. lblgradeName.text=@"商品等级:";
  187. lblgradeName.textColor = [UIColor blackColor];
  188. lblgradeName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  189. [vgradeName addSubview:lblgradeName];
  190. gradeName = [UILabel new];
  191. gradeName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  192. gradeName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  193. [vgradeName addSubview:gradeName];
  194. //规格==================
  195. UIView *vspecification = [UIView new];
  196. vspecification.frame=CGRectMake(0, CGRectGetMaxY(vgradeName.frame), Screen_Width, heightRow);
  197. [vTitle addSubview:vspecification];
  198. UILabel *lblspecification=[UILabel new];
  199. lblspecification.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  200. lblspecification.text=@"规 格:";
  201. lblspecification.textColor = [UIColor blackColor];
  202. lblspecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  203. [vspecification addSubview:lblspecification];
  204. specification = [UILabel new];
  205. specification.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  206. specification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  207. [vspecification addSubview:specification];
  208. //色号==================
  209. UIView *vcolorNumber = [UIView new];
  210. vcolorNumber.frame=CGRectMake(0, CGRectGetMaxY(vspecification.frame), Screen_Width, heightRow);
  211. [vTitle addSubview:vcolorNumber];
  212. UILabel *lblcolorNumber=[UILabel new];
  213. lblcolorNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  214. lblcolorNumber.text=@"色 号:";
  215. lblcolorNumber.textColor = [UIColor blackColor];
  216. lblcolorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  217. [vcolorNumber addSubview:lblcolorNumber];
  218. colorNumber = [UILabel new];
  219. colorNumber.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  220. colorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  221. [vcolorNumber addSubview:colorNumber];
  222. //==================
  223. UIView *vwareHouseName = [UIView new];
  224. vwareHouseName.frame=CGRectMake(0, CGRectGetMaxY(vcolorNumber.frame), Screen_Width, heightRow);
  225. [vTitle addSubview:vwareHouseName];
  226. UILabel *lblwareHouseName=[UILabel new];
  227. lblwareHouseName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  228. lblwareHouseName.text=@"库 区:";
  229. lblwareHouseName.textColor = [UIColor blackColor];
  230. lblwareHouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  231. [vwareHouseName addSubview:lblwareHouseName];
  232. wareHouseName = [UILabel new];
  233. wareHouseName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  234. wareHouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  235. [vwareHouseName addSubview:wareHouseName];
  236. //==================
  237. UIView *vpositionNumber = [UIView new];
  238. vpositionNumber.frame=CGRectMake(0, CGRectGetMaxY(vwareHouseName.frame), Screen_Width, heightRow);
  239. [vTitle addSubview:vpositionNumber];
  240. UILabel *lblpositionNumber=[UILabel new];
  241. lblpositionNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  242. lblpositionNumber.text=@"仓 位 号:";
  243. lblpositionNumber.textColor = [UIColor blackColor];
  244. lblpositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  245. [vpositionNumber addSubview:lblpositionNumber];
  246. positionNumber = [UILabel new];
  247. positionNumber.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  248. positionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  249. [vpositionNumber addSubview:positionNumber];
  250. //==================
  251. UIView *vgoodKindName = [UIView new];
  252. vgoodKindName.frame=CGRectMake(0, CGRectGetMaxY(vpositionNumber.frame), Screen_Width, heightRow);
  253. [vTitle addSubview:vgoodKindName];
  254. UILabel *lblgoodKindName=[UILabel new];
  255. lblgoodKindName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  256. lblgoodKindName.text=@"商品种类:";
  257. lblgoodKindName.textColor = [UIColor blackColor];
  258. lblgoodKindName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  259. [vgoodKindName addSubview:lblgoodKindName];
  260. goodKindName = [UILabel new];
  261. goodKindName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  262. goodKindName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  263. [vgoodKindName addSubview:goodKindName];
  264. // 品牌==================
  265. UIView *vbrandName = [UIView new];
  266. vbrandName.frame=CGRectMake(0, CGRectGetMaxY(vgoodKindName.frame), Screen_Width, heightRow);
  267. [vTitle addSubview:vbrandName];
  268. UILabel *lblbrandName=[UILabel new];
  269. lblbrandName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  270. lblbrandName.text=@"商品品牌:";
  271. lblbrandName.textColor = [UIColor blackColor];
  272. lblbrandName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  273. [vbrandName addSubview:lblbrandName];
  274. brandName = [UILabel new];
  275. brandName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  276. brandName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  277. [vbrandName addSubview:brandName];
  278. // 系列==================
  279. UIView *vserialName = [UIView new];
  280. vserialName.frame=CGRectMake(0, CGRectGetMaxY(vbrandName.frame), Screen_Width, heightRow);
  281. [vTitle addSubview:vserialName];
  282. UILabel *lblserialName=[UILabel new];
  283. lblserialName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  284. lblserialName.text=@"商品系列:";
  285. lblserialName.textColor = [UIColor blackColor];
  286. lblserialName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  287. [vserialName addSubview:lblserialName];
  288. serialName = [UILabel new];
  289. serialName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  290. serialName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  291. [vserialName addSubview:serialName];
  292. // ==================
  293. UIView *vvarietyName = [UIView new];
  294. vvarietyName.frame=CGRectMake(0, CGRectGetMaxY(vserialName.frame), Screen_Width, heightRow);
  295. [vTitle addSubview:vvarietyName];
  296. UILabel *lblvarietyName=[UILabel new];
  297. lblvarietyName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  298. lblvarietyName.text=@"商品品类:";
  299. lblvarietyName.textColor = [UIColor blackColor];
  300. lblvarietyName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  301. [vvarietyName addSubview:lblvarietyName];
  302. varietyName = [UILabel new];
  303. varietyName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  304. varietyName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  305. [vvarietyName addSubview:varietyName];
  306. //==================
  307. UIView *vQuantity = [UIView new];
  308. vQuantity.frame=CGRectMake(0, CGRectGetMaxY(vvarietyName.frame), Screen_Width, heightRow);
  309. [vTitle addSubview:vQuantity];
  310. UILabel *lblQuantity=[UILabel new];
  311. lblQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  312. lblQuantity.text=@"库存数量:";
  313. lblQuantity.textColor = [UIColor blackColor];
  314. lblQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  315. [vQuantity addSubview:lblQuantity];
  316. quantity = [UILabel new];
  317. quantity.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  318. quantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  319. [vQuantity addSubview:quantity];
  320. //==================
  321. UIView *vstockingQuantity = [UIView new];
  322. vstockingQuantity.frame=CGRectMake(0, CGRectGetMaxY(vQuantity.frame), Screen_Width, heightRow);
  323. [vTitle addSubview:vstockingQuantity];
  324. UILabel *lblstockingQuantity=[UILabel new];
  325. lblstockingQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  326. lblstockingQuantity.text=@"盘点数量:";
  327. lblstockingQuantity.textColor = [UIColor blackColor];
  328. lblstockingQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  329. [vstockingQuantity addSubview:lblstockingQuantity];
  330. stockingQuantity = [UILabel new];
  331. stockingQuantity.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  332. stockingQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  333. [vstockingQuantity addSubview:stockingQuantity];
  334. //==================
  335. UIView *vpersonName = [UIView new];
  336. vpersonName.frame=CGRectMake(0, CGRectGetMaxY(vstockingQuantity.frame), Screen_Width, heightRow);
  337. [vTitle addSubview:vpersonName];
  338. UILabel *lblpersonName=[UILabel new];
  339. lblpersonName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  340. lblpersonName.text=@"责 任 人:";
  341. lblpersonName.textColor = [UIColor blackColor];
  342. lblpersonName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  343. [vpersonName addSubview:lblpersonName];
  344. personName = [UILabel new];
  345. personName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  346. personName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  347. [vpersonName addSubview:personName];
  348. //==================
  349. UIView *vreason = [UIView new];
  350. vreason.frame=CGRectMake(0, CGRectGetMaxY(vpersonName.frame), Screen_Width, heightRow);
  351. [vTitle addSubview:vreason];
  352. UILabel *lblreason=[UILabel new];
  353. lblreason.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  354. lblreason.text=@"盘亏原因:";
  355. lblreason.textColor = [UIColor blackColor];
  356. lblreason.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  357. [vreason addSubview:lblreason];
  358. reason = [UILabel new];
  359. reason.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  360. reason.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  361. [vreason addSubview:reason];
  362. //==================
  363. UIView *vusertime = [UIView new];
  364. vusertime.frame=CGRectMake(0, CGRectGetMaxY(vreason.frame), Screen_Width, heightRow);
  365. [vTitle addSubview:vusertime];
  366. UILabel *lblusertime=[UILabel new];
  367. lblusertime.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  368. lblusertime.text=@"盘点时间:";
  369. lblusertime.textColor = [UIColor blackColor];
  370. lblusertime.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  371. [vusertime addSubview:lblusertime];
  372. usertime = [UILabel new];
  373. usertime.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  374. usertime.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  375. [vusertime addSubview:usertime];
  376. //==================
  377. UIView *vusername = [UIView new];
  378. vusername.frame=CGRectMake(0, CGRectGetMaxY(vusertime.frame), Screen_Width, heightRow);
  379. [vTitle addSubview:vusername];
  380. UILabel *lblusername=[UILabel new];
  381. lblusername.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  382. lblusername.text=@"盘 点 人:";
  383. lblusername.textColor = [UIColor blackColor];
  384. lblusername.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  385. [vusername addSubview:lblusername];
  386. username = [UILabel new];
  387. username.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  388. username.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  389. [vusername addSubview:username];
  390. vTitle.frame=CGRectMake(10, 10, Screen_Width-20, CGRectGetMaxY(vusername.frame) );
  391. vTitle.layer.cornerRadius = CornerRadius;
  392. _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vTitle.frame)+rectStatusHeight+rectNavHeight);
  393. }
  394. /**
  395. 加载数据
  396. */
  397. -(void)reloadData
  398. {
  399. [self startLoading];
  400. NSString *urlStr = ServerURL;
  401. NSMutableDictionary *dict = [NSMutableDictionary dictionary];
  402. [dict setObject:@"GetInventoryCheckDataIphone" forKey:@"Action"];
  403. [dict setObject:[NSString stringWithFormat:@"%@",kkAccountCode]forKey:@"AccountCode"];
  404. [dict setObject:kkUserCode forKey:@"UserCode"];
  405. [dict setObject:kkUserPwd forKey:@"UserPassword"];
  406. [dict setObject:kkSessionKey forKey:@"SessionKey"];
  407. [dict setObject:_stockingID forKey:@"DetailID"];
  408. _downManager = [[ASIDownManager alloc] init];
  409. _downManager.delegate = self;
  410. _downManager.OnImageDown = @selector(onLoadFinish:);
  411. _downManager.OnImageFail = @selector(onLoadFail:);
  412. [_downManager postHttpRequest:urlStr dic:dict path:nil fileName:nil];
  413. }
  414. /**
  415. * 隐藏进度条
  416. */
  417. - (void)Cancel {
  418. [self stopLoading];
  419. }
  420. /**
  421. 导航栏
  422. */
  423. - (void)loadNavStyle
  424. {
  425. //返回
  426. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  427. [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
  428. forState:UIControlStateNormal];
  429. [button addTarget:self action:@selector(GoBack)
  430. forControlEvents:UIControlEventTouchUpInside];
  431. button.frame = CGRectMake(0, 0, 15, 18);
  432. UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
  433. self.navigationItem.leftBarButtonItem = menuButton;
  434. }
  435. /**
  436. 返回
  437. */
  438. - (void)GoBack
  439. {
  440. [self.navigationController popViewControllerAnimated:YES];
  441. }
  442. @end