SalesOutStorageSalesSlipGoodsDetailVC.m 40 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824
  1. //
  2. // SalesOutStorageSalesSlipGoodsDetailVCViewController.m
  3. // IBOSSmini
  4. //
  5. // Created by guan hong hou on 2018/4/19.
  6. // Copyright © 2018年 elongtian. All rights reserved.
  7. //
  8. #import "SalesOutStorageSalesSlipGoodsDetailVC.h"
  9. @interface SalesOutStorageSalesSlipGoodsDetailVC (){
  10. UIScrollView *_scrollView;
  11. }
  12. @end
  13. @implementation SalesOutStorageSalesSlipGoodsDetailVC
  14. #pragma mark 公共函数
  15. /**
  16. 视图加载完成函数
  17. */
  18. - (void)viewDidLoad {
  19. [super viewDidLoad];
  20. [self loadNavStyle];
  21. [self initUI];
  22. }
  23. /**
  24. 修改:2017-9-25
  25. 适配机型
  26. 安全区视图发生变化
  27. */
  28. -(void)viewSafeAreaInsetsDidChange{
  29. _scrollView.frame = CGRectMake(0, 0,Screen_Width, self.view.safeAreaLayoutGuide.layoutFrame.size.height);
  30. [super viewSafeAreaInsetsDidChange];
  31. }
  32. - (void)didReceiveMemoryWarning {
  33. [super didReceiveMemoryWarning];
  34. }
  35. #pragma mark 私有函数
  36. /**
  37. 导航按钮样式
  38. */
  39. -(void)loadNavStyle
  40. {
  41. self.navigationItem.title=@"销售单商品明细信息";
  42. //返回
  43. UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
  44. [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
  45. forState:UIControlStateNormal];
  46. [button addTarget:self action:@selector(goBack)
  47. forControlEvents:UIControlEventTouchUpInside];
  48. button.frame = CGRectMake(0, 0, 15, 18);
  49. UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
  50. self.navigationItem.leftBarButtonItem = menuButton;
  51. }
  52. /**
  53. 初始化UI
  54. */
  55. -(void)initUI{
  56. [self.view setBackgroundColor:[UIColor whiteColor]];
  57. CGFloat heightRow = 40;
  58. CGFloat lblx = 10;
  59. CGFloat lbly = 8;
  60. CGFloat lblwidth = 80;
  61. CGFloat lblheight = 25;
  62. CGFloat heightLine = 1;
  63. CGFloat valuey = 8;
  64. CGFloat valueheight = 25;
  65. _scrollView=[UIScrollView new];
  66. _scrollView.frame=self.view.bounds;
  67. [self.view addSubview:_scrollView];
  68. UIView *vBody = [UIView new];
  69. [_scrollView addSubview:vBody];
  70. UIView *topSeparatorView= [UIView new];
  71. topSeparatorView.frame = CGRectMake(0, 0, Screen_Width, 10);
  72. topSeparatorView.backgroundColor=LineBackgroundColor;
  73. [vBody addSubview:topSeparatorView];
  74. UIView *vSalesNo = [UIView new];
  75. vSalesNo.frame=CGRectMake(0,CGRectGetMaxY(topSeparatorView.frame), Screen_Width, heightRow);
  76. [vBody addSubview:vSalesNo];
  77. NSString *salesNoTitle=@"销售单号:";
  78. UILabel *lblTitleSalesNo=[UILabel new];
  79. lblTitleSalesNo.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  80. lblTitleSalesNo.textColor = [UIColor blackColor];
  81. lblTitleSalesNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  82. [vSalesNo addSubview:lblTitleSalesNo];
  83. lblTitleSalesNo.text=salesNoTitle;
  84. NSString *salesNo= _goodsModel.salesNo;
  85. UILabel *lblSalesNo = [UILabel new];
  86. lblSalesNo.frame=CGRectMake(CGRectGetMaxX(lblTitleSalesNo.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSalesNo.frame)-10, valueheight);
  87. lblSalesNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  88. lblSalesNo.text =salesNo;
  89. [vSalesNo addSubview:lblSalesNo];
  90. //分割线
  91. UIView *topSeparator= [UIView new];
  92. topSeparator.frame = CGRectMake(0, CGRectGetMaxY(vSalesNo.frame), Screen_Width, heightLine);
  93. [vBody addSubview:topSeparator];
  94. UIButton *btnLine = [UIButton buttonWithType:UIButtonTypeCustom];
  95. [btnLine setBackgroundImage:[UIImage imageNamed:@"dash"] forState:UIControlStateNormal];
  96. btnLine.frame = CGRectMake(0 ,0 , Screen_Width, heightLine);
  97. [topSeparator addSubview:btnLine];
  98. [vBody addSubview:topSeparator];
  99. //唯一编码
  100. UIView *vOnlyCode = [UIView new];
  101. vOnlyCode.frame=CGRectMake(0,CGRectGetMaxY(topSeparator.frame), Screen_Width, heightRow);
  102. [vBody addSubview:vOnlyCode];
  103. NSString *onlyCodeTitle=@"唯一编码:";
  104. UILabel *lblTitleOnlyCode=[UILabel new];
  105. lblTitleOnlyCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  106. lblTitleOnlyCode.textColor = [UIColor blackColor];
  107. lblTitleOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  108. [vOnlyCode addSubview:lblTitleOnlyCode];
  109. lblTitleOnlyCode.text=onlyCodeTitle;
  110. NSString *onlyCode= _goodsModel.onlyCode;
  111. UILabel *lblOnlyCode = [UILabel new];
  112. lblOnlyCode.frame=CGRectMake(CGRectGetMaxX(lblTitleOnlyCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleOnlyCode.frame)-10, valueheight);
  113. lblOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  114. lblOnlyCode.text =onlyCode;
  115. [vOnlyCode addSubview:lblOnlyCode];
  116. UIView *topSeparator1= [UIView new];
  117. topSeparator1.frame = CGRectMake(0, CGRectGetMaxY(vOnlyCode.frame), Screen_Width, heightLine);
  118. topSeparator1.backgroundColor=LineBackgroundColor;
  119. [vBody addSubview:topSeparator1];
  120. //明细类型
  121. UIView *vDetailType = [UIView new];
  122. vDetailType.frame=CGRectMake(0,CGRectGetMaxY(topSeparator1.frame), Screen_Width, heightRow);
  123. [vBody addSubview:vDetailType];
  124. NSString *detailTypeTitle=@"明细类型:";
  125. UILabel *lblTitleDetailType=[UILabel new];
  126. lblTitleDetailType.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  127. lblTitleDetailType.textColor = [UIColor blackColor];
  128. lblTitleDetailType.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  129. [vDetailType addSubview:lblTitleDetailType];
  130. lblTitleDetailType.text=detailTypeTitle;
  131. NSString *detailType= _goodsModel.salesDetailTypeName;
  132. UILabel *lblDetailType = [UILabel new];
  133. lblDetailType.frame=CGRectMake(CGRectGetMaxX(lblTitleDetailType.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleDetailType.frame)-10, valueheight);
  134. lblDetailType.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  135. lblDetailType.text =detailType;
  136. [vDetailType addSubview:lblDetailType];
  137. //商品编码
  138. UIView *vGoodsCode = [UIView new];
  139. vGoodsCode.frame=CGRectMake(0,CGRectGetMaxY(vDetailType.frame), Screen_Width, heightRow);
  140. [vBody addSubview:vGoodsCode];
  141. NSString *goodsCodeTitle=@"商品编码:";
  142. UILabel *lblTitleGoodsCode=[UILabel new];
  143. lblTitleGoodsCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  144. lblTitleGoodsCode.textColor = [UIColor blackColor];
  145. lblTitleGoodsCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  146. [vGoodsCode addSubview:lblTitleGoodsCode];
  147. lblTitleGoodsCode.text=goodsCodeTitle;
  148. NSString *goodsCode= _goodsModel.goodsCode;
  149. UILabel *lblGoodsCode = [UILabel new];
  150. lblGoodsCode.frame=CGRectMake(CGRectGetMaxX(lblTitleGoodsCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGoodsCode.frame)-10, valueheight);
  151. lblGoodsCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  152. lblGoodsCode.text =goodsCode;
  153. [vGoodsCode addSubview:lblGoodsCode];
  154. //商品品牌
  155. UIView *vBrand = [UIView new];
  156. vBrand.frame=CGRectMake(0,CGRectGetMaxY(vGoodsCode.frame), Screen_Width, heightRow);
  157. [vBody addSubview:vBrand];
  158. NSString *brandNameTitle=@"商品品牌:";
  159. UILabel *lblTitleBrand=[UILabel new];
  160. lblTitleBrand.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  161. lblTitleBrand.textColor = [UIColor blackColor];
  162. lblTitleBrand.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  163. [vBrand addSubview:lblTitleBrand];
  164. lblTitleBrand.text=brandNameTitle;
  165. NSString *brandName= _goodsModel.brandName;
  166. UILabel *lblBrand = [UILabel new];
  167. lblBrand.frame=CGRectMake(CGRectGetMaxX(lblTitleBrand.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleBrand.frame)-10, valueheight);
  168. lblBrand.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  169. lblBrand.text =brandName;
  170. [vBrand addSubview:lblBrand];
  171. //商品种类
  172. UIView *vKind = [UIView new];
  173. vKind.frame=CGRectMake(0,CGRectGetMaxY(vBrand.frame), Screen_Width, heightRow);
  174. [vBody addSubview:vKind];
  175. NSString *kindNameTitle=@"商品种类:";
  176. UILabel *lblTitleKind=[UILabel new];
  177. lblTitleKind.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  178. lblTitleKind.textColor = [UIColor blackColor];
  179. lblTitleKind.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  180. [vKind addSubview:lblTitleKind];
  181. lblTitleKind.text=kindNameTitle;
  182. NSString *kindName= _goodsModel.kindName;
  183. UILabel *lblKind = [UILabel new];
  184. lblKind.frame=CGRectMake(CGRectGetMaxX(lblTitleKind.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleKind.frame)-10, valueheight);
  185. lblKind.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  186. lblKind.text =kindName;
  187. [vKind addSubview:lblKind];
  188. //商品品种
  189. UIView *vVariety = [UIView new];
  190. vVariety.frame=CGRectMake(0,CGRectGetMaxY(vKind.frame), Screen_Width, heightRow);
  191. [vBody addSubview:vVariety];
  192. NSString *varietyNameTitle=@"商品品种:";
  193. UILabel *lblTitleVariety=[UILabel new];
  194. lblTitleVariety.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  195. lblTitleVariety.textColor = [UIColor blackColor];
  196. lblTitleVariety.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  197. [vVariety addSubview:lblTitleVariety];
  198. lblTitleVariety.text=varietyNameTitle;
  199. NSString *varietyName= _goodsModel.varietyName;
  200. UILabel *lblVariety = [UILabel new];
  201. lblVariety.frame=CGRectMake(CGRectGetMaxX(lblTitleVariety.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleVariety.frame)-10, valueheight);
  202. lblVariety.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  203. lblVariety.text =varietyName;
  204. [vVariety addSubview:lblVariety];
  205. //商品系列
  206. UIView *vSeries = [UIView new];
  207. vSeries.frame=CGRectMake(0,CGRectGetMaxY(vVariety.frame), Screen_Width, heightRow);
  208. [vBody addSubview:vSeries];
  209. NSString *seriesNameTitle=@"商品系列:";
  210. UILabel *lblTitleSeries=[UILabel new];
  211. lblTitleSeries.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  212. lblTitleSeries.textColor = [UIColor blackColor];
  213. lblTitleSeries.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  214. [vSeries addSubview:lblTitleSeries];
  215. lblTitleSeries.text=seriesNameTitle;
  216. NSString *seriesName= _goodsModel.seriesName;
  217. UILabel *lblSeries = [UILabel new];
  218. lblSeries.frame=CGRectMake(CGRectGetMaxX(lblTitleSeries.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSeries.frame)-10, valueheight);
  219. lblSeries.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  220. lblSeries.text =seriesName;
  221. [vSeries addSubview:lblSeries];
  222. //计量单位
  223. UIView *vUnit = [UIView new];
  224. vUnit.frame=CGRectMake(0,CGRectGetMaxY(vSeries.frame), Screen_Width, heightRow);
  225. [vBody addSubview:vUnit];
  226. NSString *unitTitle=@"计量单位:";
  227. UILabel *lblTitleUnit=[UILabel new];
  228. lblTitleUnit.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  229. lblTitleUnit.textColor = [UIColor blackColor];
  230. lblTitleUnit.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  231. [vUnit addSubview:lblTitleUnit];
  232. lblTitleUnit.text=unitTitle;
  233. NSString *unitName= _goodsModel.unitName;
  234. UILabel *lblUnit = [UILabel new];
  235. lblUnit.frame=CGRectMake(CGRectGetMaxX(lblTitleUnit.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleUnit.frame)-10, valueheight);
  236. lblUnit.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  237. lblUnit.text =unitName;
  238. [vUnit addSubview:lblUnit];
  239. //商品规格
  240. UIView *vSpecification = [UIView new];
  241. vSpecification.frame=CGRectMake(0,CGRectGetMaxY(vUnit.frame), Screen_Width, heightRow);
  242. [vBody addSubview:vSpecification];
  243. NSString *specificationTitle=@"商品规格:";
  244. UILabel *lblTitleSpecification=[UILabel new];
  245. lblTitleSpecification.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  246. lblTitleSpecification.textColor = [UIColor blackColor];
  247. lblTitleSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  248. [vSpecification addSubview:lblTitleSpecification];
  249. lblTitleSpecification.text=specificationTitle;
  250. NSString *specification= _goodsModel.goodsSpecification;
  251. UILabel *lblSpecification = [UILabel new];
  252. lblSpecification.frame=CGRectMake(CGRectGetMaxX(lblTitleSpecification.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSpecification.frame)-10, valueheight);
  253. lblSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  254. lblSpecification.text =specification;
  255. [vSpecification addSubview:lblSpecification];
  256. //商品等级
  257. UIView *vGrade = [UIView new];
  258. vGrade.frame=CGRectMake(0,CGRectGetMaxY(vSpecification.frame), Screen_Width, heightRow);
  259. [vBody addSubview:vGrade];
  260. NSString *gradeTitle=@"商品等级:";
  261. UILabel *lblTitleGrade=[UILabel new];
  262. lblTitleGrade.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  263. lblTitleGrade.textColor = [UIColor blackColor];
  264. lblTitleGrade.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  265. [vGrade addSubview:lblTitleGrade];
  266. lblTitleGrade.text=gradeTitle;
  267. NSString *gradeName= _goodsModel.gradeName;
  268. UILabel *lblGrade = [UILabel new];
  269. lblGrade.frame=CGRectMake(CGRectGetMaxX(lblTitleGrade.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGrade.frame)-10, valueheight);
  270. lblGrade.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  271. lblGrade.text =gradeName;
  272. [vGrade addSubview:lblGrade];
  273. //色号
  274. UIView *vColorNumber = [UIView new];
  275. vColorNumber.frame=CGRectMake(0,CGRectGetMaxY(vGrade.frame), Screen_Width, heightRow);
  276. [vBody addSubview:vColorNumber];
  277. NSString *colorNumberTitle=@"色 号:";
  278. UILabel *lblTitleColorNumber=[UILabel new];
  279. lblTitleColorNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  280. lblTitleColorNumber.textColor = [UIColor blackColor];
  281. lblTitleColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  282. [vColorNumber addSubview:lblTitleColorNumber];
  283. lblTitleColorNumber.text=colorNumberTitle;
  284. NSString *colorNumber= _goodsModel.colorNumber;
  285. UILabel *lblColorNumber = [UILabel new];
  286. lblColorNumber.frame=CGRectMake(CGRectGetMaxX(lblTitleColorNumber.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleColorNumber.frame)-10, valueheight);
  287. lblColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  288. lblColorNumber.text =colorNumber;
  289. [vColorNumber addSubview:lblColorNumber];
  290. //单位重量
  291. UIView *vWeight = [UIView new];
  292. vWeight.frame=CGRectMake(0,CGRectGetMaxY(vColorNumber.frame), Screen_Width, heightRow);
  293. [vBody addSubview:vWeight];
  294. NSString *weightTitle=@"单位重量:";
  295. UILabel *lblTitleWeight=[UILabel new];
  296. lblTitleWeight.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  297. lblTitleWeight.textColor = [UIColor blackColor];
  298. lblTitleWeight.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  299. [vWeight addSubview:lblTitleWeight];
  300. lblTitleWeight.text=weightTitle;
  301. NSString *weight= _goodsModel.weight;
  302. UILabel *lblWeight = [UILabel new];
  303. lblWeight.frame=CGRectMake(CGRectGetMaxX(lblTitleWeight.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWeight.frame)-10, valueheight);
  304. lblWeight.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  305. lblWeight.text =weight;
  306. [vWeight addSubview:lblWeight];
  307. //库区编码
  308. UIView *vWarehouseCode = [UIView new];
  309. vWarehouseCode.frame=CGRectMake(0,CGRectGetMaxY(vWeight.frame), Screen_Width, heightRow);
  310. [vBody addSubview:vWarehouseCode];
  311. NSString *warehouseCodeTitle=@"库区编码:";
  312. UILabel *lblTitleWarehouseCode=[UILabel new];
  313. lblTitleWarehouseCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  314. lblTitleWarehouseCode.textColor = [UIColor blackColor];
  315. lblTitleWarehouseCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  316. [vWarehouseCode addSubview:lblTitleWarehouseCode];
  317. lblTitleWarehouseCode.text=warehouseCodeTitle;
  318. NSString *warehouseCode= _goodsModel.warehouseCode;
  319. UILabel *lblWarehouseCode = [UILabel new];
  320. lblWarehouseCode.frame=CGRectMake(CGRectGetMaxX(lblTitleWarehouseCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWarehouseCode.frame)-10, valueheight);
  321. lblWarehouseCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  322. lblWarehouseCode.text =warehouseCode;
  323. [vWarehouseCode addSubview:lblWarehouseCode];
  324. //库区名称
  325. UIView *vWarehouseName = [UIView new];
  326. vWarehouseName.frame=CGRectMake(0,CGRectGetMaxY(vWarehouseCode.frame), Screen_Width, heightRow);
  327. [vBody addSubview:vWarehouseName];
  328. NSString *warehouseNameTitle=@"库区名称:";
  329. UILabel *lblTitleWarehouseName=[UILabel new];
  330. lblTitleWarehouseName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  331. lblTitleWarehouseName.textColor = [UIColor blackColor];
  332. lblTitleWarehouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  333. [vWarehouseName addSubview:lblTitleWarehouseName];
  334. lblTitleWarehouseName.text=warehouseNameTitle;
  335. NSString *warehouseName= _goodsModel.warehouseName;
  336. UILabel *lblWarehouseName = [UILabel new];
  337. lblWarehouseName.frame=CGRectMake(CGRectGetMaxX(lblTitleWarehouseName.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWarehouseName.frame)-10, valueheight);
  338. lblWarehouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  339. lblWarehouseName.text =warehouseName;
  340. [vWarehouseName addSubview:lblWarehouseName];
  341. //仓位号
  342. UIView *vPositionNumber = [UIView new];
  343. vPositionNumber.frame=CGRectMake(0,CGRectGetMaxY(vWarehouseName.frame), Screen_Width, heightRow);
  344. [vBody addSubview:vPositionNumber];
  345. NSString *positionNumberTitle=@"仓 位 号:";
  346. UILabel *lblTitlePositionNumber=[UILabel new];
  347. lblTitlePositionNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  348. lblTitlePositionNumber.textColor = [UIColor blackColor];
  349. lblTitlePositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  350. [vPositionNumber addSubview:lblTitlePositionNumber];
  351. lblTitlePositionNumber.text=positionNumberTitle;
  352. NSString *positionNumber= _goodsModel.positionNumber;
  353. UILabel *lblPositionNumber = [UILabel new];
  354. lblPositionNumber.frame=CGRectMake(CGRectGetMaxX(lblTitlePositionNumber.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePositionNumber.frame)-10, valueheight);
  355. lblPositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  356. lblPositionNumber.text =positionNumber;
  357. [vPositionNumber addSubview:lblPositionNumber];
  358. //销售数量
  359. UIView *vSalesQuantity= [UIView new];
  360. vSalesQuantity.frame=CGRectMake(0,CGRectGetMaxY(vPositionNumber.frame), Screen_Width, heightRow);
  361. [vBody addSubview:vSalesQuantity];
  362. NSString *salesQuantityTitle=@"销售数量:";
  363. UILabel *lblTitleSalesQuantity=[UILabel new];
  364. lblTitleSalesQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  365. lblTitleSalesQuantity.textColor = [UIColor blackColor];
  366. lblTitleSalesQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  367. [vSalesQuantity addSubview:lblTitleSalesQuantity];
  368. lblTitleSalesQuantity.text=salesQuantityTitle;
  369. NSString *salesQuantity= _goodsModel.salesQuantity;
  370. UILabel *lblSalesQuantity = [UILabel new];
  371. lblSalesQuantity.frame=CGRectMake(CGRectGetMaxX(lblTitleSalesQuantity.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSalesQuantity.frame)-10, valueheight);
  372. lblSalesQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  373. lblSalesQuantity.text =salesQuantity;
  374. [vSalesQuantity addSubview:lblSalesQuantity];
  375. // //销售箱
  376. // UIView *vBox= [UIView new];
  377. // vBox.frame=CGRectMake(0,CGRectGetMaxY(vSalesQuantity.frame), Screen_Width, heightRow);
  378. // [vBody addSubview:vBox];
  379. // NSString *boxTitle=@"销 售 箱:";
  380. // UILabel *lblTitleBox=[UILabel new];
  381. // lblTitleBox.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  382. // lblTitleBox.textColor = [UIColor blackColor];
  383. // lblTitleBox.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  384. // [vBox addSubview:lblTitleBox];
  385. // lblTitleBox.text=boxTitle;
  386. // NSString *box= _goodsModel.box;
  387. // UILabel *lblBox= [UILabel new];
  388. // lblBox.frame=CGRectMake(CGRectGetMaxX(lblTitleBox.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleBox.frame)-10, valueheight);
  389. // lblBox.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  390. // lblBox.text =box;
  391. // [vBox addSubview:lblBox];
  392. //
  393. // //片
  394. // UIView *vPiece= [UIView new];
  395. // vPiece.frame=CGRectMake(0,CGRectGetMaxY(vBox.frame), Screen_Width, heightRow);
  396. // [vBody addSubview:vPiece];
  397. // NSString *pieceTitle=@"片/个:";
  398. // UILabel *lblTitlePiece=[UILabel new];
  399. // lblTitlePiece.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  400. // lblTitlePiece.textColor = [UIColor blackColor];
  401. // lblTitlePiece.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  402. // [vPiece addSubview:lblTitlePiece];
  403. // lblTitlePiece.text=pieceTitle;
  404. // NSString *piece= _goodsModel.piece;
  405. // UILabel *lblPiece= [UILabel new];
  406. // lblPiece.frame=CGRectMake(CGRectGetMaxX(lblTitlePiece.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePiece.frame)-10, valueheight);
  407. // lblPiece.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  408. // lblPiece.text =piece;
  409. // [vPiece addSubview:lblPiece];
  410. //包装
  411. UIView *vPackage= [UIView new];
  412. vPackage.frame=CGRectMake(0,CGRectGetMaxY(vSalesQuantity.frame), Screen_Width, heightRow);
  413. [vBody addSubview:vPackage];
  414. NSString *packageTitle=@"包 装:";
  415. UILabel *lblTitlePackage=[UILabel new];
  416. lblTitlePackage.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  417. lblTitlePackage.textColor = [UIColor blackColor];
  418. lblTitlePackage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  419. [vPackage addSubview:lblTitlePackage];
  420. lblTitlePackage.text=packageTitle;
  421. NSString *package= _goodsModel.package;
  422. UILabel *lblPackage= [UILabel new];
  423. lblPackage.frame=CGRectMake(CGRectGetMaxX(lblTitlePackage.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePackage.frame)-10, valueheight);
  424. lblPackage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  425. lblPackage.text =package;
  426. [vPackage addSubview:lblPackage];
  427. //单位面积
  428. UIView *vAcreage= [UIView new];
  429. vAcreage.frame=CGRectMake(0,CGRectGetMaxY(vPackage.frame), Screen_Width, heightRow);
  430. [vBody addSubview:vAcreage];
  431. NSString *acreageTitle=@"单位面积:";
  432. UILabel *lblTitleAcreage=[UILabel new];
  433. lblTitleAcreage.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  434. lblTitleAcreage.textColor = [UIColor blackColor];
  435. lblTitleAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  436. [vAcreage addSubview:lblTitleAcreage];
  437. lblTitleAcreage.text=acreageTitle;
  438. NSString *acreage= _goodsModel.acreage;
  439. UILabel *lblAcreage= [UILabel new];
  440. lblAcreage.frame=CGRectMake(CGRectGetMaxX(lblTitleAcreage.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleAcreage.frame)-10, valueheight);
  441. lblAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  442. lblAcreage.text =acreage;
  443. [vAcreage addSubview:lblAcreage];
  444. //销售面积
  445. UIView *vSalesAcreage= [UIView new];
  446. vSalesAcreage.frame=CGRectMake(0,CGRectGetMaxY(vAcreage.frame), Screen_Width, heightRow);
  447. [vBody addSubview:vSalesAcreage];
  448. NSString *salesAcreageTitle=@"销售面积:";
  449. UILabel *lblTitleSalesAcreage=[UILabel new];
  450. lblTitleSalesAcreage.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  451. lblTitleSalesAcreage.textColor = [UIColor blackColor];
  452. lblTitleSalesAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  453. [vSalesAcreage addSubview:lblTitleSalesAcreage];
  454. lblTitleSalesAcreage.text=salesAcreageTitle;
  455. NSString *salesAcreage= _goodsModel.M2;
  456. UILabel *lblSalesAcreage= [UILabel new];
  457. lblSalesAcreage.frame=CGRectMake(CGRectGetMaxX(lblTitleSalesAcreage.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSalesAcreage.frame)-10, valueheight);
  458. lblSalesAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  459. lblSalesAcreage.text =salesAcreage;
  460. [vSalesAcreage addSubview:lblSalesAcreage];
  461. //出库数量
  462. UIView *vOutQuantity= [UIView new];
  463. vOutQuantity.frame=CGRectMake(0,CGRectGetMaxY(vSalesAcreage.frame), Screen_Width, heightRow);
  464. [vBody addSubview:vOutQuantity];
  465. NSString *outQuantityTitle=@"出库数量:";
  466. UILabel *lblTitleOutQuantity=[UILabel new];
  467. lblTitleOutQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  468. lblTitleOutQuantity.textColor = [UIColor blackColor];
  469. lblTitleOutQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  470. [vOutQuantity addSubview:lblTitleOutQuantity];
  471. lblTitleOutQuantity.text=outQuantityTitle;
  472. NSString *outQuantity= _goodsModel.outQuantity;
  473. UILabel *lblOutQuantity= [UILabel new];
  474. lblOutQuantity.frame=CGRectMake(CGRectGetMaxX(lblTitleOutQuantity.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleOutQuantity.frame)-10, valueheight);
  475. lblOutQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  476. lblOutQuantity.text =outQuantity;
  477. [vOutQuantity addSubview:lblOutQuantity];
  478. //送货数量
  479. UIView *vDeliveryQuantity= [UIView new];
  480. vDeliveryQuantity.frame=CGRectMake(0,CGRectGetMaxY(vOutQuantity.frame), Screen_Width, heightRow);
  481. [vBody addSubview:vDeliveryQuantity];
  482. NSString *deliveryQuantityTitle=@"送货数量:";
  483. UILabel *lblTitleDeliveryQuantity=[UILabel new];
  484. lblTitleDeliveryQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  485. lblTitleDeliveryQuantity.textColor = [UIColor blackColor];
  486. lblTitleDeliveryQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  487. [vDeliveryQuantity addSubview:lblTitleDeliveryQuantity];
  488. lblTitleDeliveryQuantity.text=deliveryQuantityTitle;
  489. NSString *deliveryQuantity= _goodsModel.deliveryQuantity;
  490. UILabel *lblDeliveryQuantity= [UILabel new];
  491. lblDeliveryQuantity.frame=CGRectMake(CGRectGetMaxX(lblTitleDeliveryQuantity.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleDeliveryQuantity.frame)-10, valueheight);
  492. lblDeliveryQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  493. lblDeliveryQuantity.text =deliveryQuantity;
  494. [vDeliveryQuantity addSubview:lblDeliveryQuantity];
  495. //退货数量
  496. UIView *vReturnQuantity= [UIView new];
  497. vReturnQuantity.frame=CGRectMake(0,CGRectGetMaxY(vDeliveryQuantity.frame), Screen_Width, heightRow);
  498. [vBody addSubview:vReturnQuantity];
  499. NSString *returnQuantityTitle=@"退货数量:";
  500. UILabel *lblTitleReturnQuantity=[UILabel new];
  501. lblTitleReturnQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  502. lblTitleReturnQuantity.textColor = [UIColor blackColor];
  503. lblTitleReturnQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  504. [vReturnQuantity addSubview:lblTitleReturnQuantity];
  505. lblTitleReturnQuantity.text=returnQuantityTitle;
  506. NSString *returnQuantity= _goodsModel.returnQuantity;
  507. UILabel *lblReturnQuantity= [UILabel new];
  508. lblReturnQuantity.frame=CGRectMake(CGRectGetMaxX(lblTitleReturnQuantity.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleReturnQuantity.frame)-10, valueheight);
  509. lblReturnQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  510. lblReturnQuantity.text =returnQuantity;
  511. [vReturnQuantity addSubview:lblReturnQuantity];
  512. //销售价格
  513. UIView *vSalesPrice= [UIView new];
  514. vSalesPrice.frame=CGRectMake(0,CGRectGetMaxY(vReturnQuantity.frame), Screen_Width, heightRow);
  515. [vBody addSubview:vSalesPrice];
  516. NSString *salesPriceTitle=@"销售价格:";
  517. UILabel *lblTitleSalesPrice=[UILabel new];
  518. lblTitleSalesPrice.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  519. lblTitleSalesPrice.textColor = [UIColor blackColor];
  520. lblTitleSalesPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  521. [vSalesPrice addSubview:lblTitleSalesPrice];
  522. lblTitleSalesPrice.text=salesPriceTitle;
  523. NSString *salesPrice= _goodsModel.salesPrice;
  524. UILabel *lblSalesPrice= [UILabel new];
  525. lblSalesPrice.frame=CGRectMake(CGRectGetMaxX(lblTitleSalesPrice.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSalesPrice.frame)-10, valueheight);
  526. lblSalesPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  527. lblSalesPrice.text =salesPrice;
  528. [vSalesPrice addSubview:lblSalesPrice];
  529. //销售金额
  530. UIView *vSalesAmount= [UIView new];
  531. vSalesAmount.frame=CGRectMake(0,CGRectGetMaxY(vSalesPrice.frame), Screen_Width, heightRow);
  532. [vBody addSubview:vSalesAmount];
  533. NSString *salesAmountTitle=@"销售金额:";
  534. UILabel *lblTitleSalesAmount=[UILabel new];
  535. lblTitleSalesAmount.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  536. lblTitleSalesAmount.textColor = [UIColor blackColor];
  537. lblTitleSalesAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  538. [vSalesAmount addSubview:lblTitleSalesAmount];
  539. lblTitleSalesAmount.text=salesAmountTitle;
  540. NSString *salesAmount= _goodsModel.salesAmount;
  541. UILabel *lblSalesAmount= [UILabel new];
  542. lblSalesAmount.frame=CGRectMake(CGRectGetMaxX(lblTitleSalesAmount.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSalesAmount.frame)-10, valueheight);
  543. lblSalesAmount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  544. lblSalesAmount.text =salesAmount;
  545. [vSalesAmount addSubview:lblSalesAmount];
  546. //标价
  547. UIView *vMarkedPrice= [UIView new];
  548. vMarkedPrice.frame=CGRectMake(0,CGRectGetMaxY(vSalesAmount.frame), Screen_Width, heightRow);
  549. [vBody addSubview:vMarkedPrice];
  550. NSString *markedPriceTitle=@"标 价:";
  551. UILabel *lblTitleMarkedPrice=[UILabel new];
  552. lblTitleMarkedPrice.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  553. lblTitleMarkedPrice.textColor = [UIColor blackColor];
  554. lblTitleMarkedPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  555. [vMarkedPrice addSubview:lblTitleMarkedPrice];
  556. lblTitleMarkedPrice.text=markedPriceTitle;
  557. NSString *markedPrice= _goodsModel.markedPrice;
  558. UILabel *lblMarkedPrice= [UILabel new];
  559. lblMarkedPrice.frame=CGRectMake(CGRectGetMaxX(lblTitleMarkedPrice.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleMarkedPrice.frame)-10, valueheight);
  560. lblMarkedPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  561. lblMarkedPrice.text =markedPrice;
  562. [vMarkedPrice addSubview:lblMarkedPrice];
  563. //折扣
  564. UIView *vDiscount= [UIView new];
  565. vDiscount.frame=CGRectMake(0,CGRectGetMaxY(vMarkedPrice.frame), Screen_Width, heightRow);
  566. [vBody addSubview:vDiscount];
  567. NSString *discountTitle=@"折 扣:";
  568. UILabel *lblTitleDiscount=[UILabel new];
  569. lblTitleDiscount.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  570. lblTitleDiscount.textColor = [UIColor blackColor];
  571. lblTitleDiscount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  572. [vDiscount addSubview:lblTitleDiscount];
  573. lblTitleDiscount.text=discountTitle;
  574. NSString *discount= _goodsModel.discount;
  575. UILabel *lblDiscount= [UILabel new];
  576. lblDiscount.frame=CGRectMake(CGRectGetMaxX(lblTitleDiscount.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleDiscount.frame)-10, valueheight);
  577. lblDiscount.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  578. lblDiscount.text =discount;
  579. [vDiscount addSubview:lblDiscount];
  580. //使用位置
  581. UIView *vUsePosition= [UIView new];
  582. vUsePosition.frame=CGRectMake(0,CGRectGetMaxY(vDiscount.frame), Screen_Width, heightRow);
  583. [vBody addSubview:vUsePosition];
  584. NSString *usePositionTitle=@"使用位置:";
  585. UILabel *lblTitleUsePosition=[UILabel new];
  586. lblTitleUsePosition.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  587. lblTitleUsePosition.textColor = [UIColor blackColor];
  588. lblTitleUsePosition.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  589. [vUsePosition addSubview:lblTitleUsePosition];
  590. lblTitleUsePosition.text=usePositionTitle;
  591. NSString *usePosition= _goodsModel.usePositionName;
  592. UILabel *lblUsePosition= [UILabel new];
  593. lblUsePosition.frame=CGRectMake(CGRectGetMaxX(lblTitleUsePosition.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleUsePosition.frame)-10, valueheight);
  594. lblUsePosition.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  595. lblUsePosition.text =usePosition;
  596. [vUsePosition addSubview:lblUsePosition];
  597. //送货标识
  598. UIView *vDeliveryFlag= [UIView new];
  599. vDeliveryFlag.frame=CGRectMake(0,CGRectGetMaxY(vUsePosition.frame), Screen_Width, heightRow);
  600. [vBody addSubview:vDeliveryFlag];
  601. NSString *deliveryFlagTitle=@"送货标识:";
  602. UILabel *lblTitleDeliveryFlag=[UILabel new];
  603. lblTitleDeliveryFlag.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  604. lblTitleDeliveryFlag.textColor = [UIColor blackColor];
  605. lblTitleDeliveryFlag.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  606. [vDeliveryFlag addSubview:lblTitleDeliveryFlag];
  607. lblTitleDeliveryFlag.text=deliveryFlagTitle;
  608. NSInteger deliveryFlag= _goodsModel.deliveryFlag;
  609. NSString *deliveryFlagStr;
  610. if(deliveryFlag==1){
  611. deliveryFlagStr=@"是";
  612. }
  613. else{
  614. deliveryFlagStr=@"否";
  615. }
  616. UILabel *lblDeliveryFlag= [UILabel new];
  617. lblDeliveryFlag.frame=CGRectMake(CGRectGetMaxX(lblTitleDeliveryFlag.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleDeliveryFlag.frame)-10, valueheight);
  618. lblDeliveryFlag.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  619. lblDeliveryFlag.text =deliveryFlagStr;
  620. [vDeliveryFlag addSubview:lblDeliveryFlag];
  621. //安装标识
  622. UIView *vInstallFlag= [UIView new];
  623. vInstallFlag.frame=CGRectMake(0,CGRectGetMaxY(vDeliveryFlag.frame), Screen_Width, heightRow);
  624. [vBody addSubview:vInstallFlag];
  625. NSString *installFlagTitle=@"安装标识:";
  626. UILabel *lblTitleInstallFlag=[UILabel new];
  627. lblTitleInstallFlag.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  628. lblTitleInstallFlag.textColor = [UIColor blackColor];
  629. lblTitleInstallFlag.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  630. [vInstallFlag addSubview:lblTitleInstallFlag];
  631. lblTitleInstallFlag.text=installFlagTitle;
  632. NSInteger installFlag= _goodsModel.installFlag;
  633. NSString *installFlagStr;
  634. if(installFlag==1){
  635. installFlagStr=@"是";
  636. }
  637. else{
  638. installFlagStr=@"否";
  639. }
  640. UILabel *lblInstallFlag= [UILabel new];
  641. lblInstallFlag.frame=CGRectMake(CGRectGetMaxX(lblTitleInstallFlag.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleInstallFlag.frame)-10, valueheight);
  642. lblInstallFlag.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  643. lblInstallFlag.text =installFlagStr;
  644. [vInstallFlag addSubview:lblInstallFlag];
  645. //商品名称
  646. UIView *vGoodsName= [UIView new];
  647. vGoodsName.frame=CGRectMake(0,CGRectGetMaxY(vInstallFlag.frame), Screen_Width, heightRow);
  648. [vBody addSubview:vGoodsName];
  649. NSString *goodsNameTitle=@"商品名称:";
  650. UILabel *lblTitleGoodsName=[UILabel new];
  651. lblTitleGoodsName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  652. lblTitleGoodsName.textColor = [UIColor blackColor];
  653. lblTitleGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  654. [vGoodsName addSubview:lblTitleGoodsName];
  655. lblTitleGoodsName.text=goodsNameTitle;
  656. NSString *goodsName= _goodsModel.goodsName;
  657. UILabel *lblGoodsName= [UILabel new];
  658. lblGoodsName.frame=CGRectMake(CGRectGetMaxX(lblTitleGoodsName.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGoodsName.frame)-10, valueheight);
  659. lblGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  660. lblGoodsName.text =goodsName;
  661. [vGoodsName addSubview:lblGoodsName];
  662. //扩展属性
  663. UIView *vExpandAtrribute= [UIView new];
  664. vExpandAtrribute.frame=CGRectMake(0,CGRectGetMaxY(vGoodsName.frame), Screen_Width, heightRow);
  665. [vBody addSubview:vExpandAtrribute];
  666. NSString *expandAtrributeTitle=@"扩展属性:";
  667. UILabel *lblTitleExpandAttribute=[UILabel new];
  668. lblTitleExpandAttribute.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  669. lblTitleExpandAttribute.textColor = [UIColor blackColor];
  670. lblTitleExpandAttribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  671. [vExpandAtrribute addSubview:lblTitleExpandAttribute];
  672. lblTitleExpandAttribute.text=expandAtrributeTitle;
  673. NSString *expandAtrribute= _goodsModel.expandAtrribute;
  674. UILabel *lblExpandAtrribute= [UILabel new];
  675. lblExpandAtrribute.frame=CGRectMake(CGRectGetMaxX(lblTitleExpandAttribute.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleExpandAttribute.frame)-10, valueheight);
  676. lblExpandAtrribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  677. lblExpandAtrribute.text =expandAtrribute;
  678. [vExpandAtrribute addSubview:lblExpandAtrribute];
  679. //扩展属性2
  680. UIView *vExpandAtrributeTwo= [UIView new];
  681. vExpandAtrributeTwo.frame=CGRectMake(0,CGRectGetMaxY(vExpandAtrribute.frame), Screen_Width, heightRow);
  682. [vBody addSubview:vExpandAtrributeTwo];
  683. NSString *expandAtrributeTitleTwo=@"扩展属性二:";
  684. UILabel *lblTitleExpandAttributeTwo=[UILabel new];
  685. lblTitleExpandAttributeTwo.frame=CGRectMake(lblx, lbly,lblwidth+10, lblheight);
  686. lblTitleExpandAttributeTwo.textColor = [UIColor blackColor];
  687. lblTitleExpandAttributeTwo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  688. [vExpandAtrributeTwo addSubview:lblTitleExpandAttributeTwo];
  689. lblTitleExpandAttributeTwo.text=expandAtrributeTitleTwo;
  690. NSString *expandAtrributeTwo= _goodsModel.expandAtrribute2;
  691. UILabel *lblExpandAtrributeTwo= [UILabel new];
  692. lblExpandAtrributeTwo.frame=CGRectMake(CGRectGetMaxX(lblTitleExpandAttributeTwo.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleExpandAttributeTwo.frame)-10, valueheight);
  693. lblExpandAtrributeTwo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  694. lblExpandAtrributeTwo.text =expandAtrributeTwo;
  695. [vExpandAtrributeTwo addSubview:lblExpandAtrributeTwo];
  696. //商品备注
  697. UIView *vCodeRemarks= [UIView new];
  698. vCodeRemarks.frame=CGRectMake(0,CGRectGetMaxY(vExpandAtrributeTwo.frame), Screen_Width, heightRow);
  699. [vBody addSubview:vCodeRemarks];
  700. NSString *codeRemarksTitle=@"商品备注:";
  701. UILabel *lblTitleCodeRemarks=[UILabel new];
  702. lblTitleCodeRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  703. lblTitleCodeRemarks.textColor = [UIColor blackColor];
  704. lblTitleCodeRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  705. [vCodeRemarks addSubview:lblTitleCodeRemarks];
  706. lblTitleCodeRemarks.text=codeRemarksTitle;
  707. NSString *codeRemarks= _goodsModel.codeRemarks;
  708. UILabel *lblCodeRemarks= [UILabel new];
  709. lblCodeRemarks.frame=CGRectMake(CGRectGetMaxX(lblTitleCodeRemarks.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleCodeRemarks.frame)-10, valueheight);
  710. lblCodeRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  711. lblCodeRemarks.text =codeRemarks;
  712. [vCodeRemarks addSubview:lblCodeRemarks];
  713. //备注
  714. UIView *vRemark= [UIView new];
  715. vRemark.frame=CGRectMake(0,CGRectGetMaxY(vCodeRemarks.frame), Screen_Width, heightRow);
  716. [vBody addSubview:vRemark];
  717. NSString *remarksTitle=@"备 注:";
  718. UILabel *lblTitleRemarks=[UILabel new];
  719. lblTitleRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  720. lblTitleRemarks.text=remarksTitle;
  721. lblTitleRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  722. [vRemark addSubview:lblTitleRemarks];
  723. NSString *remarks= _goodsModel.remark;
  724. UILabel *lblRemarks= [UILabel new];
  725. lblRemarks.frame=CGRectMake(CGRectGetMaxX(lblTitleRemarks.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleRemarks.frame)-10, valueheight);
  726. lblRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  727. lblRemarks.text =remarks;
  728. [vRemark addSubview:lblRemarks];
  729. vBody.frame=CGRectMake(0,0, Screen_Width,CGRectGetMaxY(vRemark.frame));
  730. _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vBody.frame)+rectStatusHeight+rectNavHeight);
  731. }
  732. /**
  733. 返回函数
  734. */
  735. - (void)goBack
  736. {
  737. [self.navigationController popViewControllerAnimated:YES];
  738. }
  739. @end