InventoryCostDetailVC.m 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. //
  2. // InventoryCostDetailVC.m
  3. // IBOSS
  4. //
  5. // Created by 关宏厚 on 2020/11/17.
  6. // Copyright © 2020 elongtian. All rights reserved.
  7. //aa
  8. #import "InventoryCostDetailVC.h"
  9. @interface InventoryCostDetailVC ()
  10. @end
  11. @implementation InventoryCostDetailVC
  12. - (void)viewDidLoad {
  13. [super viewDidLoad];
  14. [self loadNavStyle];
  15. [self initUI];
  16. }
  17. /**
  18. 导航按钮样式
  19. */
  20. - (void)loadNavStyle
  21. {
  22. //返回
  23. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  24. [button setImage:[UIImage imageNamed:@"icon_back"] forState:UIControlStateNormal];
  25. [button addTarget:self action:@selector(goBack)
  26. forControlEvents:UIControlEventTouchUpInside];
  27. button.frame = CGRectMake(0, 0, 15, 18);
  28. UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
  29. self.navigationItem.leftBarButtonItem = menuButton;
  30. }
  31. /**
  32. 安全区视图发生变化
  33. */
  34. -(void)viewSafeAreaInsetsDidChange{
  35. _scroll.frame = self.view.safeAreaLayoutGuide.layoutFrame;
  36. [super viewSafeAreaInsetsDidChange];
  37. }
  38. -(void)goBack
  39. {
  40. [self.navigationController popViewControllerAnimated:YES];
  41. }
  42. -(void)initUI
  43. {
  44. self.navigationItem.title = @"库存成本详细";
  45. self.view.backgroundColor = LineBackgroundColor;
  46. CGFloat heightRow = 30;
  47. CGFloat lblx = 10;
  48. CGFloat lbly = 3;
  49. CGFloat lblwidth = 70;
  50. CGFloat lblheight = 25;
  51. CGFloat valuex = 80;
  52. CGFloat valuey = 3;
  53. CGFloat valueheight = 25;
  54. _scroll = [UIScrollView new];
  55. _scroll.frame=self.view.bounds;
  56. [self.view addSubview:_scroll];
  57. UIView *vTitle = [UIView new];
  58. [_scroll addSubview:vTitle];
  59. vTitle.backgroundColor = [UIColor whiteColor];
  60. //商品编码 —————————
  61. UIView *vcode = [UIView new];
  62. vcode.frame=CGRectMake(0, CGRectGetMaxY(vTitle.frame), Screen_Width, heightRow);
  63. [vTitle addSubview:vcode];
  64. UILabel *lblTitleCode = [UILabel new];
  65. lblTitleCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  66. lblTitleCode.text = @"商品编码:";
  67. lblTitleCode.textColor = [UIColor blackColor];
  68. lblTitleCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  69. [vcode addSubview:lblTitleCode];
  70. _lblCode = [UILabel new];
  71. _lblCode.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  72. _lblCode.text=_costModel.code;
  73. _lblCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  74. [vcode addSubview:_lblCode];
  75. //唯一编码 —————————
  76. UIView *vonlyCode = [UIView new];
  77. vonlyCode.frame=CGRectMake(0, CGRectGetMaxY(vcode.frame), Screen_Width, heightRow);
  78. [vTitle addSubview:vonlyCode];
  79. UILabel *lblTitleOnlyCode = [UILabel new];
  80. lblTitleOnlyCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  81. lblTitleOnlyCode.text = @"唯一编码:";
  82. lblTitleOnlyCode.textColor = [UIColor blackColor];
  83. lblTitleOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  84. [vonlyCode addSubview:lblTitleOnlyCode];
  85. _lblOnlyCode = [UILabel new];
  86. _lblOnlyCode.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  87. _lblOnlyCode.text=_costModel.onlyCode;
  88. _lblOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  89. [vonlyCode addSubview:_lblOnlyCode];
  90. UIView *vgoodName = [UIView new];
  91. vgoodName.frame=CGRectMake(0, CGRectGetMaxY(vonlyCode.frame), Screen_Width, heightRow);
  92. [vTitle addSubview:vgoodName];
  93. UILabel *lblTitleGoodsName = [UILabel new];
  94. lblTitleGoodsName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  95. lblTitleGoodsName.text = @"商品名称:";
  96. lblTitleGoodsName.textColor = [UIColor blackColor];
  97. lblTitleGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  98. [vgoodName addSubview:lblTitleGoodsName];
  99. _lblGoodsName= [UILabel new];
  100. _lblGoodsName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  101. _lblGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  102. _lblGoodsName.text = _costModel.goodName;
  103. [vgoodName addSubview:_lblGoodsName];
  104. // 品牌 —————————
  105. UIView *vbrandName = [UIView new];
  106. vbrandName.frame=CGRectMake(0, CGRectGetMaxY(vgoodName.frame), Screen_Width, heightRow);
  107. [vTitle addSubview:vbrandName];
  108. UILabel *lblTitleBrandName = [UILabel new];
  109. lblTitleBrandName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  110. lblTitleBrandName.text = @"品 牌:";
  111. lblTitleBrandName.textColor = [UIColor blackColor];
  112. lblTitleBrandName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  113. [vbrandName addSubview:lblTitleBrandName];
  114. _lblBrandName= [UILabel new];
  115. _lblBrandName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  116. _lblBrandName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  117. _lblBrandName.text = _costModel.brandName;
  118. [vbrandName addSubview:_lblBrandName];
  119. //色号 —————————
  120. UIView *vcolorNumber = [UIView new];
  121. vcolorNumber.frame=CGRectMake(0, CGRectGetMaxY(vbrandName.frame), Screen_Width, heightRow);
  122. [vTitle addSubview:vcolorNumber];
  123. UILabel *lblTitleColorNumber = [UILabel new];
  124. lblTitleColorNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  125. lblTitleColorNumber.text = @"色 号:";
  126. lblTitleColorNumber.textColor = [UIColor blackColor];
  127. lblTitleColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  128. [vcolorNumber addSubview:lblTitleColorNumber];
  129. _lblColorNumber = [UILabel new];
  130. _lblColorNumber.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  131. _lblColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  132. _lblColorNumber.text = _costModel.colorNumber;
  133. [vcolorNumber addSubview:_lblColorNumber];
  134. //规格 —————————
  135. UIView *vspecification = [UIView new];
  136. vspecification.frame=CGRectMake(0, CGRectGetMaxY(vcolorNumber.frame), Screen_Width, heightRow);
  137. [vTitle addSubview:vspecification];
  138. UILabel *lblTitleSpecification = [UILabel new];
  139. lblTitleSpecification.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  140. lblTitleSpecification.text = @"规 格:";
  141. lblTitleSpecification.textColor = [UIColor blackColor];
  142. lblTitleSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  143. [vspecification addSubview:lblTitleSpecification];
  144. _lblSpecification = [UILabel new];
  145. _lblSpecification.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  146. _lblSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  147. _lblSpecification.text = _costModel.specification;
  148. [vspecification addSubview:_lblSpecification];
  149. // —————————
  150. UIView *vgradeName = [UIView new];
  151. vgradeName.frame=CGRectMake(0, CGRectGetMaxY(vspecification.frame), Screen_Width, heightRow);
  152. [vTitle addSubview:vgradeName];
  153. UILabel *lblTitleGradeName = [UILabel new];
  154. lblTitleGradeName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  155. lblTitleGradeName.text = @"等 级:";
  156. lblTitleGradeName.textColor = [UIColor blackColor];
  157. lblTitleGradeName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  158. [vgradeName addSubview:lblTitleGradeName];
  159. _lblGrade = [UILabel new];
  160. _lblGrade.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  161. _lblGrade.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  162. _lblGrade.text = _costModel.gradeName;
  163. [vgradeName addSubview:_lblGrade];
  164. UIView *vKindName = [UIView new];
  165. vKindName.frame=CGRectMake(0,CGRectGetMaxY(vgradeName.frame), Screen_Width, heightRow);
  166. [vTitle addSubview:vKindName];
  167. UILabel *lblTitleKindName = [UILabel new];
  168. lblTitleKindName.frame=CGRectMake(lblx, lbly, 90, lblheight);
  169. lblTitleKindName.text = @"种 类:";
  170. lblTitleKindName.textColor = [UIColor blackColor];
  171. lblTitleKindName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  172. [vKindName addSubview:lblTitleKindName];
  173. _lblKindName = [UILabel new];
  174. _lblKindName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx-20, valueheight);
  175. _lblKindName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  176. _lblKindName.text =_costModel.kindName;
  177. [vKindName addSubview:_lblKindName];
  178. UIView *vVarietyName = [UIView new];
  179. vVarietyName.frame=CGRectMake(0,CGRectGetMaxY(vKindName.frame), Screen_Width, heightRow);
  180. [vTitle addSubview:vVarietyName];
  181. UILabel *lblTitleVarietyName = [UILabel new];
  182. lblTitleVarietyName.frame=CGRectMake(lblx, lbly, 90, lblheight);
  183. lblTitleVarietyName.text = @"品 种:";
  184. lblTitleVarietyName.textColor = [UIColor blackColor];
  185. lblTitleVarietyName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  186. [vVarietyName addSubview:lblTitleVarietyName];
  187. _lblVarietyName = [UILabel new];
  188. _lblVarietyName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx-20, valueheight);
  189. _lblVarietyName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  190. _lblVarietyName.text =_costModel.varietyName;
  191. [vVarietyName addSubview:_lblVarietyName];
  192. UIView *vSeriesName = [UIView new];
  193. vSeriesName.frame=CGRectMake(0,CGRectGetMaxY(vVarietyName.frame), Screen_Width, heightRow);
  194. [vTitle addSubview:vSeriesName];
  195. UILabel *lblTitleSeriesName = [UILabel new];
  196. lblTitleSeriesName.frame=CGRectMake(lblx, lbly, 90, lblheight);
  197. lblTitleSeriesName.text = @"系 列:";
  198. lblTitleSeriesName.textColor = [UIColor blackColor];
  199. lblTitleSeriesName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  200. [vSeriesName addSubview:lblTitleSeriesName];
  201. _lblSeriesName = [UILabel new];
  202. _lblSeriesName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx-20, valueheight);
  203. _lblSeriesName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  204. _lblSeriesName.text =_costModel.seriesName;
  205. [vSeriesName addSubview:_lblSeriesName];
  206. UIView *vwareHouseName = [UIView new];
  207. vwareHouseName.frame=CGRectMake(0, CGRectGetMaxY(vSeriesName.frame), Screen_Width, heightRow);
  208. [vTitle addSubview:vwareHouseName];
  209. UILabel *lblTitlewareHouseName = [UILabel new];
  210. lblTitlewareHouseName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  211. lblTitlewareHouseName.text = @"库 区:";
  212. lblTitlewareHouseName.textColor = [UIColor blackColor];
  213. lblTitlewareHouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  214. [vwareHouseName addSubview:lblTitlewareHouseName];
  215. _lblWarehouseName = [UILabel new];
  216. _lblWarehouseName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  217. _lblWarehouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  218. _lblWarehouseName.text = _costModel.wareHouseName;
  219. [vwareHouseName addSubview:_lblWarehouseName];
  220. UIView *vpositionNumber = [UIView new];
  221. vpositionNumber.frame=CGRectMake(0, CGRectGetMaxY(vwareHouseName.frame), Screen_Width, heightRow);
  222. [vTitle addSubview:vpositionNumber];
  223. UILabel *lblTitlePositionNumber = [UILabel new];
  224. lblTitlePositionNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  225. lblTitlePositionNumber.text = @"仓 位:";
  226. lblTitlePositionNumber.textColor = [UIColor blackColor];
  227. lblTitlePositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  228. [vpositionNumber addSubview:lblTitlePositionNumber];
  229. _lblPositionNumber= [UILabel new];
  230. _lblPositionNumber.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  231. _lblPositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  232. _lblPositionNumber.text = _costModel.positionNumber;
  233. [vpositionNumber addSubview:_lblPositionNumber];
  234. UIView *vLastInventoryQuantity = [UIView new];
  235. vLastInventoryQuantity.frame=CGRectMake(0,CGRectGetMaxY(vpositionNumber.frame), Screen_Width, heightRow);
  236. [vTitle addSubview:vLastInventoryQuantity];
  237. UILabel *lblTitleLastInventoryQuantity = [UILabel new];
  238. lblTitleLastInventoryQuantity.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  239. lblTitleLastInventoryQuantity.text = @"上期结转数量:";
  240. lblTitleLastInventoryQuantity.textColor = [UIColor blackColor];
  241. lblTitleLastInventoryQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  242. [vLastInventoryQuantity addSubview:lblTitleLastInventoryQuantity];
  243. _lblLastInventoryQuantity = [UILabel new];
  244. _lblLastInventoryQuantity.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  245. _lblLastInventoryQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  246. _lblLastInventoryQuantity.text =_costModel.lastInventoryQuantity;
  247. [vLastInventoryQuantity addSubview:_lblLastInventoryQuantity];
  248. UIView *vLastInventoryAmount = [UIView new];
  249. vLastInventoryAmount.frame=CGRectMake(0,CGRectGetMaxY(vLastInventoryQuantity.frame), Screen_Width, heightRow);
  250. [vTitle addSubview:vLastInventoryAmount];
  251. UILabel *lblTitleLastInventoryAmount = [UILabel new];
  252. lblTitleLastInventoryAmount.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  253. lblTitleLastInventoryAmount.text = @"上期结转金额:";
  254. lblTitleLastInventoryAmount.textColor = [UIColor blackColor];
  255. lblTitleLastInventoryAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  256. [vLastInventoryAmount addSubview:lblTitleLastInventoryAmount];
  257. _lblLastInventoryAmount = [UILabel new];
  258. _lblLastInventoryAmount.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  259. _lblLastInventoryAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  260. _lblLastInventoryAmount.text =_costModel.lastInventoryAmount;
  261. [vLastInventoryAmount addSubview:_lblLastInventoryAmount];
  262. UIView *vThisInventoryQuantity = [UIView new];
  263. vThisInventoryQuantity.frame=CGRectMake(0,CGRectGetMaxY(vLastInventoryAmount.frame), Screen_Width, heightRow);
  264. [vTitle addSubview:vThisInventoryQuantity];
  265. UILabel *lblTitleThisInventoryQuantity = [UILabel new];
  266. lblTitleThisInventoryQuantity.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  267. lblTitleThisInventoryQuantity.text = @"本期入库数量:";
  268. lblTitleThisInventoryQuantity.textColor = [UIColor blackColor];
  269. lblTitleThisInventoryQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  270. [vThisInventoryQuantity addSubview:lblTitleThisInventoryQuantity];
  271. _lblThisInventoryQuantity = [UILabel new];
  272. _lblThisInventoryQuantity.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  273. _lblThisInventoryQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  274. _lblThisInventoryQuantity.text =_costModel.thisInventoryQuantity;
  275. [vThisInventoryQuantity addSubview:_lblThisInventoryQuantity];
  276. UIView *vThisInventoryAmount = [UIView new];
  277. vThisInventoryAmount.frame=CGRectMake(0,CGRectGetMaxY(vThisInventoryQuantity.frame), Screen_Width, heightRow);
  278. [vTitle addSubview:vThisInventoryAmount];
  279. UILabel *lblTitleThisInventoryAmount = [UILabel new];
  280. lblTitleThisInventoryAmount.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  281. lblTitleThisInventoryAmount.text = @"本期入库金额:";
  282. lblTitleThisInventoryAmount.textColor = [UIColor blackColor];
  283. lblTitleThisInventoryAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  284. [vThisInventoryAmount addSubview:lblTitleThisInventoryAmount];
  285. _lblThisInventoryAmount = [UILabel new];
  286. _lblThisInventoryAmount.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  287. _lblThisInventoryAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  288. _lblThisInventoryAmount.text =_costModel.thisInventoryAmount;
  289. [vThisInventoryAmount addSubview:_lblThisInventoryAmount];
  290. UIView *vcanSaleQuantity = [UIView new];
  291. vcanSaleQuantity.frame=CGRectMake(0,CGRectGetMaxY(vThisInventoryAmount.frame), Screen_Width, heightRow);
  292. [vTitle addSubview:vcanSaleQuantity];
  293. UILabel *lblTitleCanSaleQuantity = [UILabel new];
  294. lblTitleCanSaleQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  295. lblTitleCanSaleQuantity.text = @"可 售 量:";
  296. lblTitleCanSaleQuantity.textColor = [UIColor blackColor];
  297. lblTitleCanSaleQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  298. [vcanSaleQuantity addSubview:lblTitleCanSaleQuantity];
  299. _lblCanSaleQuantity = [UILabel new];
  300. _lblCanSaleQuantity.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  301. _lblCanSaleQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  302. _lblCanSaleQuantity.text =_costModel.balanceQuantity;
  303. [vcanSaleQuantity addSubview:_lblCanSaleQuantity];
  304. UIView *vStockQuantity = [UIView new];
  305. vStockQuantity.frame=CGRectMake(0,CGRectGetMaxY(vcanSaleQuantity.frame), Screen_Width, heightRow);
  306. [vTitle addSubview:vStockQuantity];
  307. UILabel *lblTitleStockQuantity = [UILabel new];
  308. lblTitleStockQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  309. lblTitleStockQuantity.text = @"库 存 量:";
  310. lblTitleStockQuantity.textColor = [UIColor blackColor];
  311. lblTitleStockQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  312. [vStockQuantity addSubview:lblTitleStockQuantity];
  313. _lblStockQuantity = [UILabel new];
  314. _lblStockQuantity.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  315. _lblStockQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  316. _lblStockQuantity.text = _costModel.inventoryQuantity;
  317. [vStockQuantity addSubview:_lblStockQuantity];
  318. UIView *vTimelyCost = [UIView new];
  319. vTimelyCost.frame=CGRectMake(0,CGRectGetMaxY(vStockQuantity.frame), Screen_Width, heightRow);
  320. [vTitle addSubview:vTimelyCost];
  321. UILabel *lblTitleTimelyCost = [UILabel new];
  322. lblTitleTimelyCost.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  323. lblTitleTimelyCost.text = @"库存即时成本:";
  324. lblTitleTimelyCost.textColor = [UIColor blackColor];
  325. lblTitleTimelyCost.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  326. [vTimelyCost addSubview:lblTitleTimelyCost];
  327. _lblTimelyCost = [UILabel new];
  328. _lblTimelyCost.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  329. _lblTimelyCost.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  330. _lblTimelyCost.text = _costModel.timelyCost;
  331. [vTimelyCost addSubview:_lblTimelyCost];
  332. UIView *vInventoryTimelyAmount = [UIView new];
  333. vInventoryTimelyAmount.frame=CGRectMake(0,CGRectGetMaxY(vTimelyCost.frame), Screen_Width, heightRow);
  334. [vTitle addSubview:vInventoryTimelyAmount];
  335. UILabel *lblTitleInventoryTimelyAmount = [UILabel new];
  336. lblTitleInventoryTimelyAmount.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  337. lblTitleInventoryTimelyAmount.text = @"库存即时金额:";
  338. lblTitleInventoryTimelyAmount.textColor = [UIColor blackColor];
  339. lblTitleInventoryTimelyAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  340. [vInventoryTimelyAmount addSubview:lblTitleInventoryTimelyAmount];
  341. _lblInventoryTimelyAmount = [UILabel new];
  342. _lblInventoryTimelyAmount.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  343. _lblInventoryTimelyAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  344. _lblInventoryTimelyAmount.text = _costModel.inventoryTimelyAmount;
  345. [vInventoryTimelyAmount addSubview:_lblInventoryTimelyAmount];
  346. UIView *vCanSalesAmount = [UIView new];
  347. vCanSalesAmount.frame=CGRectMake(0,CGRectGetMaxY(vInventoryTimelyAmount.frame), Screen_Width, heightRow);
  348. [vTitle addSubview:vCanSalesAmount];
  349. UILabel *lblTitleCanSalesAmount = [UILabel new];
  350. lblTitleCanSalesAmount.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  351. lblTitleCanSalesAmount.text = @"可售金额:";
  352. lblTitleCanSalesAmount.textColor = [UIColor blackColor];
  353. lblTitleCanSalesAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  354. [vCanSalesAmount addSubview:lblTitleCanSalesAmount];
  355. _lblCanSalesAmount = [UILabel new];
  356. _lblCanSalesAmount.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  357. _lblCanSalesAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  358. _lblCanSalesAmount.text = _costModel.balanceAmount;
  359. [vCanSalesAmount addSubview:_lblCanSalesAmount];
  360. UIView *vStandardPrice = [UIView new];
  361. vStandardPrice.frame=CGRectMake(0,CGRectGetMaxY(vCanSalesAmount.frame), Screen_Width, heightRow);
  362. [vTitle addSubview:vStandardPrice];
  363. UILabel *lblTitleStandardPrice = [UILabel new];
  364. lblTitleStandardPrice.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  365. lblTitleStandardPrice.text = @"采购基准价:";
  366. lblTitleStandardPrice.textColor = [UIColor blackColor];
  367. lblTitleStandardPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  368. [vStandardPrice addSubview:lblTitleStandardPrice];
  369. _lblStandardPrice = [UILabel new];
  370. _lblStandardPrice.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  371. _lblStandardPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  372. _lblStandardPrice.text = _costModel.standardProcurementPrice;
  373. [vStandardPrice addSubview:_lblStandardPrice];
  374. UIView *vExpandAttribute = [UIView new];
  375. vExpandAttribute.frame=CGRectMake(0,CGRectGetMaxY(vStandardPrice.frame), Screen_Width, heightRow);
  376. [vTitle addSubview:vExpandAttribute];
  377. UILabel *lblTitleExpandAttribute = [UILabel new];
  378. lblTitleExpandAttribute.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  379. lblTitleExpandAttribute.text = @"扩展属性:";
  380. lblTitleExpandAttribute.textColor = [UIColor blackColor];
  381. lblTitleExpandAttribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  382. [vExpandAttribute addSubview:lblTitleExpandAttribute];
  383. _lblExpandAttribute = [UILabel new];
  384. _lblExpandAttribute.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  385. _lblExpandAttribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  386. _lblExpandAttribute.text = _costModel.expandAttribute;
  387. [vExpandAttribute addSubview:_lblExpandAttribute];
  388. UIView *vExpandAttribute2 = [UIView new];
  389. vExpandAttribute2.frame=CGRectMake(0,CGRectGetMaxY(vExpandAttribute.frame), Screen_Width, heightRow);
  390. [vTitle addSubview:vExpandAttribute2];
  391. UILabel *lblTitleExpandAttribute2 = [UILabel new];
  392. lblTitleExpandAttribute2.frame=CGRectMake(lblx, lbly, lblwidth+30, lblheight);
  393. lblTitleExpandAttribute2.text = @"扩展属性二:";
  394. lblTitleExpandAttribute2.textColor = [UIColor blackColor];
  395. lblTitleExpandAttribute2.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  396. [vExpandAttribute2 addSubview:lblTitleExpandAttribute2];
  397. _lblExpandAttribute2 = [UILabel new];
  398. _lblExpandAttribute2.frame=CGRectMake(valuex+30, valuey, Screen_Width - valuex - lblx-30, valueheight);
  399. _lblExpandAttribute2.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  400. _lblExpandAttribute2.text = _costModel.expandAttribute2;
  401. [vExpandAttribute2 addSubview:_lblExpandAttribute2];
  402. UIView *vRemarks = [UIView new];
  403. vRemarks.frame=CGRectMake(0,CGRectGetMaxY(vExpandAttribute2.frame), Screen_Width, heightRow);
  404. [vTitle addSubview:vRemarks];
  405. UILabel *lblTitleRemarks = [UILabel new];
  406. lblTitleRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  407. lblTitleRemarks.text = @"商品备注:";
  408. lblTitleRemarks.textColor = [UIColor blackColor];
  409. lblTitleRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  410. [vRemarks addSubview:lblTitleRemarks];
  411. _lblRemarks = [UILabel new];
  412. _lblRemarks.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  413. _lblRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  414. _lblRemarks.text = _costModel.goodsRemarks;
  415. [vRemarks addSubview:_lblRemarks];
  416. vTitle.frame=CGRectMake(10, 10, Screen_Width-20, CGRectGetMaxY(vRemarks.frame));
  417. vTitle.layer.cornerRadius = CornerRadius;
  418. _scroll.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vTitle.frame)+rectStatusHeight+rectNavHeight);
  419. }
  420. @end