StockingDetailViewController.m 20 KB

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