OtherInStorageGoodsDetailVC.m 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549
  1. //
  2. // OtherInStorageGoodsDetailVC.m
  3. // IBOSSmini
  4. //
  5. // Created by guan hong hou on 2018/4/26.
  6. // Copyright © 2018年 elongtian. All rights reserved.
  7. //
  8. #import "OtherInStorageGoodsDetailVC.h"
  9. @interface OtherInStorageGoodsDetailVC (){
  10. UIScrollView *_scrollView;
  11. }
  12. @end
  13. @implementation OtherInStorageGoodsDetailVC
  14. #pragma mark 公共函数
  15. /**
  16. 视图加载完成函数
  17. */
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. [self loadNavStyle];
  21. [self initUI];
  22. }
  23. /**
  24. 适配机型
  25. 安全区视图发生变化
  26. */
  27. -(void)viewSafeAreaInsetsDidChange{
  28. _scrollView.frame = CGRectMake(0, 0,Screen_Width, self.view.safeAreaLayoutGuide.layoutFrame.size.height);
  29. [super viewSafeAreaInsetsDidChange];
  30. }
  31. - (void)didReceiveMemoryWarning {
  32. [super didReceiveMemoryWarning];
  33. }
  34. #pragma mark 私有函数
  35. /**
  36. 导航按钮样式
  37. */
  38. -(void)loadNavStyle
  39. {
  40. self.navigationItem.title=@"商品明细信息";
  41. //返回
  42. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  43. [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
  44. forState:UIControlStateNormal];
  45. [button addTarget:self action:@selector(goBack)
  46. forControlEvents:UIControlEventTouchUpInside];
  47. button.frame = CGRectMake(0, 0, 15, 18);
  48. UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
  49. self.navigationItem.leftBarButtonItem = menuButton;
  50. }
  51. /**
  52. 返回函数
  53. */
  54. - (void)goBack
  55. {
  56. [self.navigationController popViewControllerAnimated:YES];
  57. }
  58. /**
  59. 初始化UI
  60. */
  61. -(void)initUI{
  62. [self.view setBackgroundColor:[UIColor whiteColor]];
  63. CGFloat heightRow = 40;
  64. CGFloat lblx = 10;
  65. CGFloat lbly = 8;
  66. CGFloat lblwidth = 80;
  67. CGFloat lblheight = 25;
  68. CGFloat valuey = 8;
  69. CGFloat valueheight = 25;
  70. _scrollView=[UIScrollView new];
  71. _scrollView.frame=self.view.bounds;
  72. [self.view addSubview:_scrollView];
  73. UIView *vBody = [UIView new];
  74. [_scrollView addSubview:vBody];
  75. UIView *topSeparatorView= [UIView new];
  76. topSeparatorView.frame = CGRectMake(0, 0, Screen_Width, 10);
  77. topSeparatorView.backgroundColor=LineBackgroundColor;
  78. [vBody addSubview:topSeparatorView];
  79. //唯一编码
  80. UIView *vOnlyCode = [UIView new];
  81. vOnlyCode.frame=CGRectMake(0,CGRectGetMaxY(topSeparatorView.frame), Screen_Width, heightRow);
  82. [vBody addSubview:vOnlyCode];
  83. NSString *onlyCodeTitle=@"唯一编码:";
  84. UILabel *lblTitleOnlyCode=[UILabel new];
  85. lblTitleOnlyCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  86. lblTitleOnlyCode.textColor = [UIColor blackColor];
  87. lblTitleOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  88. [vOnlyCode addSubview:lblTitleOnlyCode];
  89. lblTitleOnlyCode.text=onlyCodeTitle;
  90. NSString *onlyCode= _goodsDetailModel.onlyCode;
  91. UILabel *lblOnlyCode = [UILabel new];
  92. lblOnlyCode.frame=CGRectMake(CGRectGetMaxX(lblTitleOnlyCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleOnlyCode.frame)-10, valueheight);
  93. lblOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  94. lblOnlyCode.text =onlyCode;
  95. [vOnlyCode addSubview:lblOnlyCode];
  96. //商品编码
  97. UIView *vGoodsCode = [UIView new];
  98. vGoodsCode.frame=CGRectMake(0,CGRectGetMaxY(vOnlyCode.frame), Screen_Width, heightRow);
  99. [vBody addSubview:vGoodsCode];
  100. NSString *goodsCodeTitle=@"商品编码:";
  101. UILabel *lblTitleGoodsCode=[UILabel new];
  102. lblTitleGoodsCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  103. lblTitleGoodsCode.textColor = [UIColor blackColor];
  104. lblTitleGoodsCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  105. [vGoodsCode addSubview:lblTitleGoodsCode];
  106. lblTitleGoodsCode.text=goodsCodeTitle;
  107. NSString *goodsCode= _goodsDetailModel.code;
  108. UILabel *lblGoodsCode = [UILabel new];
  109. lblGoodsCode.frame=CGRectMake(CGRectGetMaxX(lblTitleGoodsCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGoodsCode.frame)-10, valueheight);
  110. lblGoodsCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  111. lblGoodsCode.text =goodsCode;
  112. [vGoodsCode addSubview:lblGoodsCode];
  113. //商品品牌
  114. UIView *vBrand = [UIView new];
  115. vBrand.frame=CGRectMake(0,CGRectGetMaxY(vGoodsCode.frame), Screen_Width, heightRow);
  116. [vBody addSubview:vBrand];
  117. NSString *brandNameTitle=@"商品品牌:";
  118. UILabel *lblTitleBrand=[UILabel new];
  119. lblTitleBrand.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  120. lblTitleBrand.textColor = [UIColor blackColor];
  121. lblTitleBrand.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  122. [vBrand addSubview:lblTitleBrand];
  123. lblTitleBrand.text=brandNameTitle;
  124. NSString *brandName= _goodsDetailModel.brandName;
  125. UILabel *lblBrand = [UILabel new];
  126. lblBrand.frame=CGRectMake(CGRectGetMaxX(lblTitleBrand.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleBrand.frame)-10, valueheight);
  127. lblBrand.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  128. lblBrand.text =brandName;
  129. [vBrand addSubview:lblBrand];
  130. //商品种类
  131. UIView *vKind = [UIView new];
  132. vKind.frame=CGRectMake(0,CGRectGetMaxY(vBrand.frame), Screen_Width, heightRow);
  133. [vBody addSubview:vKind];
  134. NSString *kindNameTitle=@"商品种类:";
  135. UILabel *lblTitleKind=[UILabel new];
  136. lblTitleKind.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  137. lblTitleKind.textColor = [UIColor blackColor];
  138. lblTitleKind.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  139. [vKind addSubview:lblTitleKind];
  140. lblTitleKind.text=kindNameTitle;
  141. NSString *kindName= _goodsDetailModel.kindName;
  142. UILabel *lblKind = [UILabel new];
  143. lblKind.frame=CGRectMake(CGRectGetMaxX(lblTitleKind.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleKind.frame)-10, valueheight);
  144. lblKind.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  145. lblKind.text =kindName;
  146. [vKind addSubview:lblKind];
  147. //商品品种
  148. UIView *vVariety = [UIView new];
  149. vVariety.frame=CGRectMake(0,CGRectGetMaxY(vKind.frame), Screen_Width, heightRow);
  150. [vBody addSubview:vVariety];
  151. NSString *varietyNameTitle=@"商品品种:";
  152. UILabel *lblTitleVariety=[UILabel new];
  153. lblTitleVariety.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  154. lblTitleVariety.textColor = [UIColor blackColor];
  155. lblTitleVariety.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  156. [vVariety addSubview:lblTitleVariety];
  157. lblTitleVariety.text=varietyNameTitle;
  158. NSString *varietyName= _goodsDetailModel.varietyName;
  159. UILabel *lblVariety = [UILabel new];
  160. lblVariety.frame=CGRectMake(CGRectGetMaxX(lblTitleVariety.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleVariety.frame)-10, valueheight);
  161. lblVariety.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  162. lblVariety.text =varietyName;
  163. [vVariety addSubview:lblVariety];
  164. //商品系列
  165. UIView *vSeries = [UIView new];
  166. vSeries.frame=CGRectMake(0,CGRectGetMaxY(vVariety.frame), Screen_Width, heightRow);
  167. [vBody addSubview:vSeries];
  168. NSString *seriesNameTitle=@"商品系列:";
  169. UILabel *lblTitleSeries=[UILabel new];
  170. lblTitleSeries.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  171. lblTitleSeries.textColor = [UIColor blackColor];
  172. lblTitleSeries.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  173. [vSeries addSubview:lblTitleSeries];
  174. lblTitleSeries.text=seriesNameTitle;
  175. NSString *seriesName= _goodsDetailModel.seriesName;
  176. UILabel *lblSeries = [UILabel new];
  177. lblSeries.frame=CGRectMake(CGRectGetMaxX(lblTitleSeries.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSeries.frame)-10, valueheight);
  178. lblSeries.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  179. lblSeries.text =seriesName;
  180. [vSeries addSubview:lblSeries];
  181. //计量单位
  182. UIView *vUnit = [UIView new];
  183. vUnit.frame=CGRectMake(0,CGRectGetMaxY(vSeries.frame), Screen_Width, heightRow);
  184. [vBody addSubview:vUnit];
  185. NSString *unitTitle=@"计量单位:";
  186. UILabel *lblTitleUnit=[UILabel new];
  187. lblTitleUnit.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  188. lblTitleUnit.textColor = [UIColor blackColor];
  189. lblTitleUnit.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  190. [vUnit addSubview:lblTitleUnit];
  191. lblTitleUnit.text=unitTitle;
  192. NSString *unitName= _goodsDetailModel.unitName;
  193. UILabel *lblUnit = [UILabel new];
  194. lblUnit.frame=CGRectMake(CGRectGetMaxX(lblTitleUnit.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleUnit.frame)-10, valueheight);
  195. lblUnit.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  196. lblUnit.text =unitName;
  197. [vUnit addSubview:lblUnit];
  198. //商品规格
  199. UIView *vSpecification = [UIView new];
  200. vSpecification.frame=CGRectMake(0,CGRectGetMaxY(vUnit.frame), Screen_Width, heightRow);
  201. [vBody addSubview:vSpecification];
  202. NSString *specificationTitle=@"商品规格:";
  203. UILabel *lblTitleSpecification=[UILabel new];
  204. lblTitleSpecification.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  205. lblTitleSpecification.textColor = [UIColor blackColor];
  206. lblTitleSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  207. [vSpecification addSubview:lblTitleSpecification];
  208. lblTitleSpecification.text=specificationTitle;
  209. NSString *specification= _goodsDetailModel.specification;
  210. UILabel *lblSpecification = [UILabel new];
  211. lblSpecification.frame=CGRectMake(CGRectGetMaxX(lblTitleSpecification.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSpecification.frame)-10, valueheight);
  212. lblSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  213. lblSpecification.text =specification;
  214. [vSpecification addSubview:lblSpecification];
  215. //商品等级
  216. UIView *vGrade = [UIView new];
  217. vGrade.frame=CGRectMake(0,CGRectGetMaxY(vSpecification.frame), Screen_Width, heightRow);
  218. [vBody addSubview:vGrade];
  219. NSString *gradeTitle=@"商品等级:";
  220. UILabel *lblTitleGrade=[UILabel new];
  221. lblTitleGrade.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  222. lblTitleGrade.textColor = [UIColor blackColor];
  223. lblTitleGrade.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  224. [vGrade addSubview:lblTitleGrade];
  225. lblTitleGrade.text=gradeTitle;
  226. NSString *gradeName= _goodsDetailModel.gradeName;
  227. UILabel *lblGrade = [UILabel new];
  228. lblGrade.frame=CGRectMake(CGRectGetMaxX(lblTitleGrade.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGrade.frame)-10, valueheight);
  229. lblGrade.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  230. lblGrade.text =gradeName;
  231. [vGrade addSubview:lblGrade];
  232. //色号
  233. UIView *vColorNumber = [UIView new];
  234. vColorNumber.frame=CGRectMake(0,CGRectGetMaxY(vGrade.frame), Screen_Width, heightRow);
  235. [vBody addSubview:vColorNumber];
  236. NSString *colorNumberTitle=@"色 号:";
  237. UILabel *lblTitleColorNumber=[UILabel new];
  238. lblTitleColorNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  239. lblTitleColorNumber.textColor = [UIColor blackColor];
  240. lblTitleColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  241. [vColorNumber addSubview:lblTitleColorNumber];
  242. lblTitleColorNumber.text=colorNumberTitle;
  243. NSString *colorNumber= _goodsDetailModel.colorNumber;
  244. UILabel *lblColorNumber = [UILabel new];
  245. lblColorNumber.frame=CGRectMake(CGRectGetMaxX(lblTitleColorNumber.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleColorNumber.frame)-10, valueheight);
  246. lblColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  247. lblColorNumber.text =colorNumber;
  248. [vColorNumber addSubview:lblColorNumber];
  249. //单位重量
  250. UIView *vWeight = [UIView new];
  251. vWeight.frame=CGRectMake(0,CGRectGetMaxY(vColorNumber.frame), Screen_Width, heightRow);
  252. [vBody addSubview:vWeight];
  253. NSString *weightTitle=@"单位重量:";
  254. UILabel *lblTitleWeight=[UILabel new];
  255. lblTitleWeight.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  256. lblTitleWeight.textColor = [UIColor blackColor];
  257. lblTitleWeight.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  258. [vWeight addSubview:lblTitleWeight];
  259. lblTitleWeight.text=weightTitle;
  260. NSString *weight= _goodsDetailModel.weight;
  261. UILabel *lblWeight = [UILabel new];
  262. lblWeight.frame=CGRectMake(CGRectGetMaxX(lblTitleWeight.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWeight.frame)-10, valueheight);
  263. lblWeight.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  264. lblWeight.text =weight;
  265. [vWeight addSubview:lblWeight];
  266. //库区编码
  267. UIView *vWarehouseCode = [UIView new];
  268. vWarehouseCode.frame=CGRectMake(0,CGRectGetMaxY(vWeight.frame), Screen_Width, heightRow);
  269. [vBody addSubview:vWarehouseCode];
  270. NSString *warehouseCodeTitle=@"库区编码:";
  271. UILabel *lblTitleWarehouseCode=[UILabel new];
  272. lblTitleWarehouseCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  273. lblTitleWarehouseCode.textColor = [UIColor blackColor];
  274. lblTitleWarehouseCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  275. [vWarehouseCode addSubview:lblTitleWarehouseCode];
  276. lblTitleWarehouseCode.text=warehouseCodeTitle;
  277. NSString *warehouseCode= _goodsDetailModel.warehouseCode;
  278. UILabel *lblWarehouseCode = [UILabel new];
  279. lblWarehouseCode.frame=CGRectMake(CGRectGetMaxX(lblTitleWarehouseCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWarehouseCode.frame)-10, valueheight);
  280. lblWarehouseCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  281. lblWarehouseCode.text =warehouseCode;
  282. [vWarehouseCode addSubview:lblWarehouseCode];
  283. //库区名称
  284. UIView *vWarehouseName = [UIView new];
  285. vWarehouseName.frame=CGRectMake(0,CGRectGetMaxY(vWarehouseCode.frame), Screen_Width, heightRow);
  286. [vBody addSubview:vWarehouseName];
  287. NSString *warehouseNameTitle=@"库区名称:";
  288. UILabel *lblTitleWarehouseName=[UILabel new];
  289. lblTitleWarehouseName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  290. lblTitleWarehouseName.textColor = [UIColor blackColor];
  291. lblTitleWarehouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  292. [vWarehouseName addSubview:lblTitleWarehouseName];
  293. lblTitleWarehouseName.text=warehouseNameTitle;
  294. NSString *warehouseName= _goodsDetailModel.warehouseName;
  295. UILabel *lblWarehouseName = [UILabel new];
  296. lblWarehouseName.frame=CGRectMake(CGRectGetMaxX(lblTitleWarehouseName.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWarehouseName.frame)-10, valueheight);
  297. lblWarehouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  298. lblWarehouseName.text =warehouseName;
  299. [vWarehouseName addSubview:lblWarehouseName];
  300. //仓位号
  301. UIView *vPositionNumber = [UIView new];
  302. vPositionNumber.frame=CGRectMake(0,CGRectGetMaxY(vWarehouseName.frame), Screen_Width, heightRow);
  303. [vBody addSubview:vPositionNumber];
  304. NSString *positionNumberTitle=@"仓 位 号:";
  305. UILabel *lblTitlePositionNumber=[UILabel new];
  306. lblTitlePositionNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  307. lblTitlePositionNumber.textColor = [UIColor blackColor];
  308. lblTitlePositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  309. [vPositionNumber addSubview:lblTitlePositionNumber];
  310. lblTitlePositionNumber.text=positionNumberTitle;
  311. NSString *positionNumber= _goodsDetailModel.positionNumberName;
  312. UILabel *lblPositionNumber = [UILabel new];
  313. lblPositionNumber.frame=CGRectMake(CGRectGetMaxX(lblTitlePositionNumber.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePositionNumber.frame)-10, valueheight);
  314. lblPositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  315. lblPositionNumber.text =positionNumber;
  316. [vPositionNumber addSubview:lblPositionNumber];
  317. //销售数量
  318. UIView *vEnterQuantity= [UIView new];
  319. vEnterQuantity.frame=CGRectMake(0,CGRectGetMaxY(vPositionNumber.frame), Screen_Width, heightRow);
  320. [vBody addSubview:vEnterQuantity];
  321. NSString *enterQuantityTitle=@"入库数量:";
  322. UILabel *lblTitleEnterQuantity=[UILabel new];
  323. lblTitleEnterQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  324. lblTitleEnterQuantity.textColor = [UIColor blackColor];
  325. lblTitleEnterQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  326. [vEnterQuantity addSubview:lblTitleEnterQuantity];
  327. lblTitleEnterQuantity.text=enterQuantityTitle;
  328. NSString *enterQuantity= _goodsDetailModel.enterQuantity;
  329. UILabel *lblEnterQuantity = [UILabel new];
  330. lblEnterQuantity.frame=CGRectMake(CGRectGetMaxX(lblTitleEnterQuantity.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleEnterQuantity.frame)-10, valueheight);
  331. lblEnterQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  332. lblEnterQuantity.text =enterQuantity;
  333. [vEnterQuantity addSubview:lblEnterQuantity];
  334. //销售价格
  335. UIView *vEnterPrice= [UIView new];
  336. vEnterPrice.frame=CGRectMake(0,CGRectGetMaxY(vEnterQuantity.frame), Screen_Width, heightRow);
  337. [vBody addSubview:vEnterPrice];
  338. NSString *enterPriceTitle=@"入库单价:";
  339. UILabel *lblTitleEnterPrice=[UILabel new];
  340. lblTitleEnterPrice.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  341. lblTitleEnterPrice.textColor = [UIColor blackColor];
  342. lblTitleEnterPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  343. [vEnterPrice addSubview:lblTitleEnterPrice];
  344. lblTitleEnterPrice.text=enterPriceTitle;
  345. NSString *enterPrice= _goodsDetailModel.enterPrice;
  346. UILabel *lblEnterPrice= [UILabel new];
  347. lblEnterPrice.frame=CGRectMake(CGRectGetMaxX(lblTitleEnterPrice.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleEnterPrice.frame)-10, valueheight);
  348. lblEnterPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  349. lblEnterPrice.text =enterPrice;
  350. [vEnterPrice addSubview:lblEnterPrice];
  351. //片
  352. UIView *vPiece= [UIView new];
  353. vPiece.frame=CGRectMake(0,CGRectGetMaxY(vEnterPrice.frame), Screen_Width, heightRow);
  354. [vBody addSubview:vPiece];
  355. NSString *pieceTitle=@"片/个:";
  356. UILabel *lblTitlePiece=[UILabel new];
  357. lblTitlePiece.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  358. lblTitlePiece.textColor = [UIColor blackColor];
  359. lblTitlePiece.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  360. [vPiece addSubview:lblTitlePiece];
  361. lblTitlePiece.text=pieceTitle;
  362. NSString *piece=_goodsDetailModel.piece;
  363. UILabel *lblPiece= [UILabel new];
  364. lblPiece.frame=CGRectMake(CGRectGetMaxX(lblTitlePiece.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePiece.frame)-10, valueheight);
  365. lblPiece.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  366. lblPiece.text =piece;
  367. [vPiece addSubview:lblPiece];
  368. //包装
  369. UIView *vPackage= [UIView new];
  370. vPackage.frame=CGRectMake(0,CGRectGetMaxY(vPiece.frame), Screen_Width, heightRow);
  371. [vBody addSubview:vPackage];
  372. NSString *packageTitle=@"包 装:";
  373. UILabel *lblTitlePackage=[UILabel new];
  374. lblTitlePackage.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  375. lblTitlePackage.textColor = [UIColor blackColor];
  376. lblTitlePackage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  377. [vPackage addSubview:lblTitlePackage];
  378. lblTitlePackage.text=packageTitle;
  379. NSString *package=_goodsDetailModel.package;
  380. UILabel *lblPackage= [UILabel new];
  381. lblPackage.frame=CGRectMake(CGRectGetMaxX(lblTitlePackage.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePackage.frame)-10, valueheight);
  382. lblPackage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  383. lblPackage.text =package;
  384. [vPackage addSubview:lblPackage];
  385. //单位面积
  386. UIView *vAcreage= [UIView new];
  387. vAcreage.frame=CGRectMake(0,CGRectGetMaxY(vPackage.frame), Screen_Width, heightRow);
  388. [vBody addSubview:vAcreage];
  389. NSString *acreageTitle=@"单位面积:";
  390. UILabel *lblTitleAcreage=[UILabel new];
  391. lblTitleAcreage.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  392. lblTitleAcreage.textColor = [UIColor blackColor];
  393. lblTitleAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  394. [vAcreage addSubview:lblTitleAcreage];
  395. lblTitleAcreage.text=acreageTitle;
  396. NSString *acreage= _goodsDetailModel.acreage;
  397. UILabel *lblAcreage= [UILabel new];
  398. lblAcreage.frame=CGRectMake(CGRectGetMaxX(lblTitleAcreage.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleAcreage.frame)-10, valueheight);
  399. lblAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  400. lblAcreage.text =acreage;
  401. [vAcreage addSubview:lblAcreage];
  402. //商品名称
  403. UIView *vGoodsName= [UIView new];
  404. vGoodsName.frame=CGRectMake(0,CGRectGetMaxY(vAcreage.frame), Screen_Width, heightRow);
  405. [vBody addSubview:vGoodsName];
  406. NSString *goodsNameTitle=@"商品名称:";
  407. UILabel *lblTitleGoodsName=[UILabel new];
  408. lblTitleGoodsName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  409. lblTitleGoodsName.textColor = [UIColor blackColor];
  410. lblTitleGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  411. [vGoodsName addSubview:lblTitleGoodsName];
  412. lblTitleGoodsName.text=goodsNameTitle;
  413. NSString *goodsName= _goodsDetailModel.goodsName;
  414. UILabel *lblGoodsName= [UILabel new];
  415. lblGoodsName.frame=CGRectMake(CGRectGetMaxX(lblTitleGoodsName.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGoodsName.frame)-10, valueheight);
  416. lblGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  417. lblGoodsName.text =goodsName;
  418. [vGoodsName addSubview:lblGoodsName];
  419. //扩展属性
  420. UIView *vExpandAtrribute= [UIView new];
  421. vExpandAtrribute.frame=CGRectMake(0,CGRectGetMaxY(vGoodsName.frame), Screen_Width, heightRow);
  422. [vBody addSubview:vExpandAtrribute];
  423. NSString *expandAtrributeTitle=@"扩展属性:";
  424. UILabel *lblTitleExpandAttribute=[UILabel new];
  425. lblTitleExpandAttribute.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  426. lblTitleExpandAttribute.textColor = [UIColor blackColor];
  427. lblTitleExpandAttribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  428. [vExpandAtrribute addSubview:lblTitleExpandAttribute];
  429. lblTitleExpandAttribute.text=expandAtrributeTitle;
  430. NSString *expandAtrribute=_goodsDetailModel.expandAtrribute;
  431. UILabel *lblExpandAtrribute= [UILabel new];
  432. lblExpandAtrribute.frame=CGRectMake(CGRectGetMaxX(lblTitleExpandAttribute.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleExpandAttribute.frame)-10, valueheight);
  433. lblExpandAtrribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  434. lblExpandAtrribute.text =expandAtrribute;
  435. [vExpandAtrribute addSubview:lblExpandAtrribute];
  436. //扩展属性2
  437. UIView *vExpandAtrribute2= [UIView new];
  438. vExpandAtrribute2.frame=CGRectMake(0,CGRectGetMaxY(vExpandAtrribute.frame), Screen_Width, heightRow);
  439. [vBody addSubview:vExpandAtrribute2];
  440. NSString *expandAtrributeTitle2=@"扩展属性二:";
  441. UILabel *lblTitleExpandAttribute2=[UILabel new];
  442. lblTitleExpandAttribute2.frame=CGRectMake(lblx, lbly, lblwidth+10, lblheight);
  443. lblTitleExpandAttribute2.textColor = [UIColor blackColor];
  444. lblTitleExpandAttribute2.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  445. [vExpandAtrribute2 addSubview:lblTitleExpandAttribute2];
  446. lblTitleExpandAttribute2.text=expandAtrributeTitle2;
  447. NSString *expandAtrribute2=_goodsDetailModel.expandAtrribute2;
  448. UILabel *lblExpandAtrribute2= [UILabel new];
  449. lblExpandAtrribute2.frame=CGRectMake(CGRectGetMaxX(lblTitleExpandAttribute2.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleExpandAttribute2.frame)-10, valueheight);
  450. lblExpandAtrribute2.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  451. lblExpandAtrribute2.text =expandAtrribute2;
  452. [vExpandAtrribute2 addSubview:lblExpandAtrribute2];
  453. //商品备注
  454. UIView *vCodeRemarks= [UIView new];
  455. vCodeRemarks.frame=CGRectMake(0,CGRectGetMaxY(vExpandAtrribute2.frame), Screen_Width, heightRow);
  456. [vBody addSubview:vCodeRemarks];
  457. NSString *codeRemarksTitle=@"商品备注:";
  458. UILabel *lblTitleCodeRemarks=[UILabel new];
  459. lblTitleCodeRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  460. lblTitleCodeRemarks.textColor = [UIColor blackColor];
  461. lblTitleCodeRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  462. [vCodeRemarks addSubview:lblTitleCodeRemarks];
  463. lblTitleCodeRemarks.text=codeRemarksTitle;
  464. NSString *codeRemarks=_goodsDetailModel.goodsRemarks;
  465. UILabel *lblCodeRemarks= [UILabel new];
  466. lblCodeRemarks.frame=CGRectMake(CGRectGetMaxX(lblTitleCodeRemarks.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleCodeRemarks.frame)-10, valueheight);
  467. lblCodeRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  468. lblCodeRemarks.text =codeRemarks;
  469. [vCodeRemarks addSubview:lblCodeRemarks];
  470. //备注
  471. UIView *vRemark= [UIView new];
  472. vRemark.frame=CGRectMake(0,CGRectGetMaxY(vCodeRemarks.frame), Screen_Width, heightRow);
  473. [vBody addSubview:vRemark];
  474. NSString *remarksTitle=@"备 注:";
  475. UILabel *lblTitleRemarks=[UILabel new];
  476. lblTitleRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  477. lblTitleRemarks.text=remarksTitle;
  478. lblTitleRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  479. [vRemark addSubview:lblTitleRemarks];
  480. NSString *remarks=_goodsDetailModel.remarks;
  481. UILabel *lblRemarks= [UILabel new];
  482. lblRemarks.frame=CGRectMake(CGRectGetMaxX(lblTitleRemarks.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleRemarks.frame)-10, valueheight);
  483. lblRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  484. lblRemarks.text =remarks;
  485. [vRemark addSubview:lblRemarks];
  486. vBody.frame=CGRectMake(0,0, Screen_Width,CGRectGetMaxY(vRemark.frame));
  487. _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vBody.frame)+rectStatusHeight+rectNavHeight);
  488. }
  489. @end