| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549 |
- //
- // OtherInStorageGoodsDetailVC.m
- // IBOSSmini
- //
- // Created by guan hong hou on 2018/4/26.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "OtherInStorageGoodsDetailVC.h"
- @interface OtherInStorageGoodsDetailVC (){
- UIScrollView *_scrollView;
- }
- @end
- @implementation OtherInStorageGoodsDetailVC
- #pragma mark 公共函数
- /**
- 视图加载完成函数
- */
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self loadNavStyle];
- [self initUI];
- }
- /**
- 适配机型
- 安全区视图发生变化
- */
- -(void)viewSafeAreaInsetsDidChange{
- _scrollView.frame = CGRectMake(0, 0,Screen_Width, self.view.safeAreaLayoutGuide.layoutFrame.size.height);
- [super viewSafeAreaInsetsDidChange];
- }
- - (void)didReceiveMemoryWarning {
- [super didReceiveMemoryWarning];
-
- }
- #pragma mark 私有函数
- /**
- 导航按钮样式
- */
- -(void)loadNavStyle
- {
- self.navigationItem.title=@"商品明细信息";
- //返回
- UIButton *button = [UIButton buttonWithType:UIButtonTypeCustom];
- [button setBackgroundImage:[UIImage imageNamed:@"icon_back"]
- forState:UIControlStateNormal];
- [button addTarget:self action:@selector(goBack)
- forControlEvents:UIControlEventTouchUpInside];
- button.frame = CGRectMake(0, 0, 15, 18);
- UIBarButtonItem *menuButton = [[UIBarButtonItem alloc] initWithCustomView:button];
- self.navigationItem.leftBarButtonItem = menuButton;
- }
- /**
- 返回函数
- */
- - (void)goBack
- {
- [self.navigationController popViewControllerAnimated:YES];
- }
- /**
- 初始化UI
- */
- -(void)initUI{
- [self.view setBackgroundColor:[UIColor whiteColor]];
- CGFloat heightRow = 40;
- CGFloat lblx = 10;
- CGFloat lbly = 8;
- CGFloat lblwidth = 80;
- CGFloat lblheight = 25;
- CGFloat valuey = 8;
- CGFloat valueheight = 25;
-
- _scrollView=[UIScrollView new];
- _scrollView.frame=self.view.bounds;
- [self.view addSubview:_scrollView];
- UIView *vBody = [UIView new];
- [_scrollView addSubview:vBody];
- UIView *topSeparatorView= [UIView new];
- topSeparatorView.frame = CGRectMake(0, 0, Screen_Width, 10);
- topSeparatorView.backgroundColor=LineBackgroundColor;
- [vBody addSubview:topSeparatorView];
-
- //唯一编码
- UIView *vOnlyCode = [UIView new];
- vOnlyCode.frame=CGRectMake(0,CGRectGetMaxY(topSeparatorView.frame), Screen_Width, heightRow);
- [vBody addSubview:vOnlyCode];
- NSString *onlyCodeTitle=@"唯一编码:";
- UILabel *lblTitleOnlyCode=[UILabel new];
- lblTitleOnlyCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleOnlyCode.textColor = [UIColor blackColor];
- lblTitleOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vOnlyCode addSubview:lblTitleOnlyCode];
- lblTitleOnlyCode.text=onlyCodeTitle;
-
- NSString *onlyCode= _goodsDetailModel.onlyCode;
- UILabel *lblOnlyCode = [UILabel new];
- lblOnlyCode.frame=CGRectMake(CGRectGetMaxX(lblTitleOnlyCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleOnlyCode.frame)-10, valueheight);
- lblOnlyCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblOnlyCode.text =onlyCode;
- [vOnlyCode addSubview:lblOnlyCode];
-
- //商品编码
- UIView *vGoodsCode = [UIView new];
- vGoodsCode.frame=CGRectMake(0,CGRectGetMaxY(vOnlyCode.frame), Screen_Width, heightRow);
- [vBody addSubview:vGoodsCode];
- NSString *goodsCodeTitle=@"商品编码:";
- UILabel *lblTitleGoodsCode=[UILabel new];
- lblTitleGoodsCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleGoodsCode.textColor = [UIColor blackColor];
- lblTitleGoodsCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vGoodsCode addSubview:lblTitleGoodsCode];
- lblTitleGoodsCode.text=goodsCodeTitle;
- NSString *goodsCode= _goodsDetailModel.code;
- UILabel *lblGoodsCode = [UILabel new];
- lblGoodsCode.frame=CGRectMake(CGRectGetMaxX(lblTitleGoodsCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGoodsCode.frame)-10, valueheight);
- lblGoodsCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblGoodsCode.text =goodsCode;
- [vGoodsCode addSubview:lblGoodsCode];
-
- //商品品牌
- UIView *vBrand = [UIView new];
- vBrand.frame=CGRectMake(0,CGRectGetMaxY(vGoodsCode.frame), Screen_Width, heightRow);
- [vBody addSubview:vBrand];
- NSString *brandNameTitle=@"商品品牌:";
- UILabel *lblTitleBrand=[UILabel new];
- lblTitleBrand.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleBrand.textColor = [UIColor blackColor];
- lblTitleBrand.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vBrand addSubview:lblTitleBrand];
- lblTitleBrand.text=brandNameTitle;
-
- NSString *brandName= _goodsDetailModel.brandName;
- UILabel *lblBrand = [UILabel new];
- lblBrand.frame=CGRectMake(CGRectGetMaxX(lblTitleBrand.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleBrand.frame)-10, valueheight);
- lblBrand.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblBrand.text =brandName;
- [vBrand addSubview:lblBrand];
-
- //商品种类
- UIView *vKind = [UIView new];
- vKind.frame=CGRectMake(0,CGRectGetMaxY(vBrand.frame), Screen_Width, heightRow);
- [vBody addSubview:vKind];
- NSString *kindNameTitle=@"商品种类:";
- UILabel *lblTitleKind=[UILabel new];
- lblTitleKind.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleKind.textColor = [UIColor blackColor];
- lblTitleKind.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vKind addSubview:lblTitleKind];
- lblTitleKind.text=kindNameTitle;
-
- NSString *kindName= _goodsDetailModel.kindName;
- UILabel *lblKind = [UILabel new];
- lblKind.frame=CGRectMake(CGRectGetMaxX(lblTitleKind.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleKind.frame)-10, valueheight);
- lblKind.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblKind.text =kindName;
- [vKind addSubview:lblKind];
-
- //商品品种
- UIView *vVariety = [UIView new];
- vVariety.frame=CGRectMake(0,CGRectGetMaxY(vKind.frame), Screen_Width, heightRow);
- [vBody addSubview:vVariety];
- NSString *varietyNameTitle=@"商品品种:";
- UILabel *lblTitleVariety=[UILabel new];
- lblTitleVariety.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleVariety.textColor = [UIColor blackColor];
- lblTitleVariety.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vVariety addSubview:lblTitleVariety];
- lblTitleVariety.text=varietyNameTitle;
-
- NSString *varietyName= _goodsDetailModel.varietyName;
- UILabel *lblVariety = [UILabel new];
- lblVariety.frame=CGRectMake(CGRectGetMaxX(lblTitleVariety.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleVariety.frame)-10, valueheight);
- lblVariety.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblVariety.text =varietyName;
- [vVariety addSubview:lblVariety];
-
- //商品系列
- UIView *vSeries = [UIView new];
- vSeries.frame=CGRectMake(0,CGRectGetMaxY(vVariety.frame), Screen_Width, heightRow);
- [vBody addSubview:vSeries];
- NSString *seriesNameTitle=@"商品系列:";
- UILabel *lblTitleSeries=[UILabel new];
- lblTitleSeries.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleSeries.textColor = [UIColor blackColor];
- lblTitleSeries.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vSeries addSubview:lblTitleSeries];
- lblTitleSeries.text=seriesNameTitle;
-
- NSString *seriesName= _goodsDetailModel.seriesName;
- UILabel *lblSeries = [UILabel new];
- lblSeries.frame=CGRectMake(CGRectGetMaxX(lblTitleSeries.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSeries.frame)-10, valueheight);
- lblSeries.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblSeries.text =seriesName;
- [vSeries addSubview:lblSeries];
-
- //计量单位
- UIView *vUnit = [UIView new];
- vUnit.frame=CGRectMake(0,CGRectGetMaxY(vSeries.frame), Screen_Width, heightRow);
- [vBody addSubview:vUnit];
- NSString *unitTitle=@"计量单位:";
- UILabel *lblTitleUnit=[UILabel new];
- lblTitleUnit.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleUnit.textColor = [UIColor blackColor];
- lblTitleUnit.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vUnit addSubview:lblTitleUnit];
- lblTitleUnit.text=unitTitle;
-
- NSString *unitName= _goodsDetailModel.unitName;
- UILabel *lblUnit = [UILabel new];
- lblUnit.frame=CGRectMake(CGRectGetMaxX(lblTitleUnit.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleUnit.frame)-10, valueheight);
- lblUnit.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblUnit.text =unitName;
- [vUnit addSubview:lblUnit];
-
- //商品规格
- UIView *vSpecification = [UIView new];
- vSpecification.frame=CGRectMake(0,CGRectGetMaxY(vUnit.frame), Screen_Width, heightRow);
- [vBody addSubview:vSpecification];
- NSString *specificationTitle=@"商品规格:";
- UILabel *lblTitleSpecification=[UILabel new];
- lblTitleSpecification.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleSpecification.textColor = [UIColor blackColor];
- lblTitleSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vSpecification addSubview:lblTitleSpecification];
- lblTitleSpecification.text=specificationTitle;
-
- NSString *specification= _goodsDetailModel.specification;
- UILabel *lblSpecification = [UILabel new];
- lblSpecification.frame=CGRectMake(CGRectGetMaxX(lblTitleSpecification.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleSpecification.frame)-10, valueheight);
- lblSpecification.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblSpecification.text =specification;
- [vSpecification addSubview:lblSpecification];
-
- //商品等级
- UIView *vGrade = [UIView new];
- vGrade.frame=CGRectMake(0,CGRectGetMaxY(vSpecification.frame), Screen_Width, heightRow);
- [vBody addSubview:vGrade];
- NSString *gradeTitle=@"商品等级:";
- UILabel *lblTitleGrade=[UILabel new];
- lblTitleGrade.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleGrade.textColor = [UIColor blackColor];
- lblTitleGrade.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vGrade addSubview:lblTitleGrade];
- lblTitleGrade.text=gradeTitle;
-
- NSString *gradeName= _goodsDetailModel.gradeName;
- UILabel *lblGrade = [UILabel new];
-
- lblGrade.frame=CGRectMake(CGRectGetMaxX(lblTitleGrade.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGrade.frame)-10, valueheight);
- lblGrade.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblGrade.text =gradeName;
- [vGrade addSubview:lblGrade];
-
- //色号
- UIView *vColorNumber = [UIView new];
- vColorNumber.frame=CGRectMake(0,CGRectGetMaxY(vGrade.frame), Screen_Width, heightRow);
- [vBody addSubview:vColorNumber];
- NSString *colorNumberTitle=@"色 号:";
- UILabel *lblTitleColorNumber=[UILabel new];
- lblTitleColorNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleColorNumber.textColor = [UIColor blackColor];
- lblTitleColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vColorNumber addSubview:lblTitleColorNumber];
- lblTitleColorNumber.text=colorNumberTitle;
-
- NSString *colorNumber= _goodsDetailModel.colorNumber;
- UILabel *lblColorNumber = [UILabel new];
-
- lblColorNumber.frame=CGRectMake(CGRectGetMaxX(lblTitleColorNumber.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleColorNumber.frame)-10, valueheight);
- lblColorNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblColorNumber.text =colorNumber;
- [vColorNumber addSubview:lblColorNumber];
-
- //单位重量
- UIView *vWeight = [UIView new];
- vWeight.frame=CGRectMake(0,CGRectGetMaxY(vColorNumber.frame), Screen_Width, heightRow);
- [vBody addSubview:vWeight];
- NSString *weightTitle=@"单位重量:";
- UILabel *lblTitleWeight=[UILabel new];
- lblTitleWeight.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleWeight.textColor = [UIColor blackColor];
- lblTitleWeight.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vWeight addSubview:lblTitleWeight];
- lblTitleWeight.text=weightTitle;
- NSString *weight= _goodsDetailModel.weight;
- UILabel *lblWeight = [UILabel new];
- lblWeight.frame=CGRectMake(CGRectGetMaxX(lblTitleWeight.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWeight.frame)-10, valueheight);
- lblWeight.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblWeight.text =weight;
- [vWeight addSubview:lblWeight];
-
- //库区编码
- UIView *vWarehouseCode = [UIView new];
- vWarehouseCode.frame=CGRectMake(0,CGRectGetMaxY(vWeight.frame), Screen_Width, heightRow);
- [vBody addSubview:vWarehouseCode];
- NSString *warehouseCodeTitle=@"库区编码:";
- UILabel *lblTitleWarehouseCode=[UILabel new];
- lblTitleWarehouseCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleWarehouseCode.textColor = [UIColor blackColor];
- lblTitleWarehouseCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vWarehouseCode addSubview:lblTitleWarehouseCode];
- lblTitleWarehouseCode.text=warehouseCodeTitle;
- NSString *warehouseCode= _goodsDetailModel.warehouseCode;
- UILabel *lblWarehouseCode = [UILabel new];
- lblWarehouseCode.frame=CGRectMake(CGRectGetMaxX(lblTitleWarehouseCode.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWarehouseCode.frame)-10, valueheight);
- lblWarehouseCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblWarehouseCode.text =warehouseCode;
- [vWarehouseCode addSubview:lblWarehouseCode];
-
- //库区名称
- UIView *vWarehouseName = [UIView new];
- vWarehouseName.frame=CGRectMake(0,CGRectGetMaxY(vWarehouseCode.frame), Screen_Width, heightRow);
- [vBody addSubview:vWarehouseName];
- NSString *warehouseNameTitle=@"库区名称:";
- UILabel *lblTitleWarehouseName=[UILabel new];
- lblTitleWarehouseName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleWarehouseName.textColor = [UIColor blackColor];
- lblTitleWarehouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vWarehouseName addSubview:lblTitleWarehouseName];
- lblTitleWarehouseName.text=warehouseNameTitle;
- NSString *warehouseName= _goodsDetailModel.warehouseName;
- UILabel *lblWarehouseName = [UILabel new];
- lblWarehouseName.frame=CGRectMake(CGRectGetMaxX(lblTitleWarehouseName.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleWarehouseName.frame)-10, valueheight);
- lblWarehouseName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblWarehouseName.text =warehouseName;
- [vWarehouseName addSubview:lblWarehouseName];
-
- //仓位号
- UIView *vPositionNumber = [UIView new];
- vPositionNumber.frame=CGRectMake(0,CGRectGetMaxY(vWarehouseName.frame), Screen_Width, heightRow);
- [vBody addSubview:vPositionNumber];
- NSString *positionNumberTitle=@"仓 位 号:";
- UILabel *lblTitlePositionNumber=[UILabel new];
- lblTitlePositionNumber.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitlePositionNumber.textColor = [UIColor blackColor];
- lblTitlePositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vPositionNumber addSubview:lblTitlePositionNumber];
- lblTitlePositionNumber.text=positionNumberTitle;
- NSString *positionNumber= _goodsDetailModel.positionNumberName;
- UILabel *lblPositionNumber = [UILabel new];
- lblPositionNumber.frame=CGRectMake(CGRectGetMaxX(lblTitlePositionNumber.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePositionNumber.frame)-10, valueheight);
- lblPositionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblPositionNumber.text =positionNumber;
- [vPositionNumber addSubview:lblPositionNumber];
-
- //销售数量
- UIView *vEnterQuantity= [UIView new];
- vEnterQuantity.frame=CGRectMake(0,CGRectGetMaxY(vPositionNumber.frame), Screen_Width, heightRow);
- [vBody addSubview:vEnterQuantity];
- NSString *enterQuantityTitle=@"入库数量:";
- UILabel *lblTitleEnterQuantity=[UILabel new];
- lblTitleEnterQuantity.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleEnterQuantity.textColor = [UIColor blackColor];
- lblTitleEnterQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vEnterQuantity addSubview:lblTitleEnterQuantity];
- lblTitleEnterQuantity.text=enterQuantityTitle;
- NSString *enterQuantity= _goodsDetailModel.enterQuantity;
- UILabel *lblEnterQuantity = [UILabel new];
- lblEnterQuantity.frame=CGRectMake(CGRectGetMaxX(lblTitleEnterQuantity.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleEnterQuantity.frame)-10, valueheight);
- lblEnterQuantity.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblEnterQuantity.text =enterQuantity;
- [vEnterQuantity addSubview:lblEnterQuantity];
-
- //销售价格
- UIView *vEnterPrice= [UIView new];
- vEnterPrice.frame=CGRectMake(0,CGRectGetMaxY(vEnterQuantity.frame), Screen_Width, heightRow);
- [vBody addSubview:vEnterPrice];
- NSString *enterPriceTitle=@"入库单价:";
- UILabel *lblTitleEnterPrice=[UILabel new];
- lblTitleEnterPrice.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleEnterPrice.textColor = [UIColor blackColor];
- lblTitleEnterPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vEnterPrice addSubview:lblTitleEnterPrice];
- lblTitleEnterPrice.text=enterPriceTitle;
-
- NSString *enterPrice= _goodsDetailModel.enterPrice;
- UILabel *lblEnterPrice= [UILabel new];
- lblEnterPrice.frame=CGRectMake(CGRectGetMaxX(lblTitleEnterPrice.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleEnterPrice.frame)-10, valueheight);
- lblEnterPrice.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblEnterPrice.text =enterPrice;
- [vEnterPrice addSubview:lblEnterPrice];
-
- //片
- UIView *vPiece= [UIView new];
- vPiece.frame=CGRectMake(0,CGRectGetMaxY(vEnterPrice.frame), Screen_Width, heightRow);
- [vBody addSubview:vPiece];
- NSString *pieceTitle=@"片/个:";
- UILabel *lblTitlePiece=[UILabel new];
- lblTitlePiece.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitlePiece.textColor = [UIColor blackColor];
- lblTitlePiece.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vPiece addSubview:lblTitlePiece];
- lblTitlePiece.text=pieceTitle;
- NSString *piece=_goodsDetailModel.piece;
- UILabel *lblPiece= [UILabel new];
- lblPiece.frame=CGRectMake(CGRectGetMaxX(lblTitlePiece.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePiece.frame)-10, valueheight);
- lblPiece.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblPiece.text =piece;
- [vPiece addSubview:lblPiece];
-
- //包装
- UIView *vPackage= [UIView new];
- vPackage.frame=CGRectMake(0,CGRectGetMaxY(vPiece.frame), Screen_Width, heightRow);
- [vBody addSubview:vPackage];
- NSString *packageTitle=@"包 装:";
- UILabel *lblTitlePackage=[UILabel new];
- lblTitlePackage.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitlePackage.textColor = [UIColor blackColor];
- lblTitlePackage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vPackage addSubview:lblTitlePackage];
- lblTitlePackage.text=packageTitle;
- NSString *package=_goodsDetailModel.package;
- UILabel *lblPackage= [UILabel new];
- lblPackage.frame=CGRectMake(CGRectGetMaxX(lblTitlePackage.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitlePackage.frame)-10, valueheight);
- lblPackage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblPackage.text =package;
- [vPackage addSubview:lblPackage];
-
- //单位面积
- UIView *vAcreage= [UIView new];
- vAcreage.frame=CGRectMake(0,CGRectGetMaxY(vPackage.frame), Screen_Width, heightRow);
- [vBody addSubview:vAcreage];
- NSString *acreageTitle=@"单位面积:";
- UILabel *lblTitleAcreage=[UILabel new];
- lblTitleAcreage.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleAcreage.textColor = [UIColor blackColor];
- lblTitleAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAcreage addSubview:lblTitleAcreage];
- lblTitleAcreage.text=acreageTitle;
- NSString *acreage= _goodsDetailModel.acreage;
-
- UILabel *lblAcreage= [UILabel new];
- lblAcreage.frame=CGRectMake(CGRectGetMaxX(lblTitleAcreage.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleAcreage.frame)-10, valueheight);
- lblAcreage.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblAcreage.text =acreage;
- [vAcreage addSubview:lblAcreage];
- //商品名称
- UIView *vGoodsName= [UIView new];
- vGoodsName.frame=CGRectMake(0,CGRectGetMaxY(vAcreage.frame), Screen_Width, heightRow);
- [vBody addSubview:vGoodsName];
- NSString *goodsNameTitle=@"商品名称:";
- UILabel *lblTitleGoodsName=[UILabel new];
- lblTitleGoodsName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleGoodsName.textColor = [UIColor blackColor];
- lblTitleGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vGoodsName addSubview:lblTitleGoodsName];
-
- lblTitleGoodsName.text=goodsNameTitle;
- NSString *goodsName= _goodsDetailModel.goodsName;
- UILabel *lblGoodsName= [UILabel new];
- lblGoodsName.frame=CGRectMake(CGRectGetMaxX(lblTitleGoodsName.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleGoodsName.frame)-10, valueheight);
- lblGoodsName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblGoodsName.text =goodsName;
- [vGoodsName addSubview:lblGoodsName];
-
- //扩展属性
- UIView *vExpandAtrribute= [UIView new];
- vExpandAtrribute.frame=CGRectMake(0,CGRectGetMaxY(vGoodsName.frame), Screen_Width, heightRow);
- [vBody addSubview:vExpandAtrribute];
- NSString *expandAtrributeTitle=@"扩展属性:";
- UILabel *lblTitleExpandAttribute=[UILabel new];
- lblTitleExpandAttribute.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleExpandAttribute.textColor = [UIColor blackColor];
- lblTitleExpandAttribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vExpandAtrribute addSubview:lblTitleExpandAttribute];
-
- lblTitleExpandAttribute.text=expandAtrributeTitle;
- NSString *expandAtrribute=_goodsDetailModel.expandAtrribute;
- UILabel *lblExpandAtrribute= [UILabel new];
- lblExpandAtrribute.frame=CGRectMake(CGRectGetMaxX(lblTitleExpandAttribute.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleExpandAttribute.frame)-10, valueheight);
- lblExpandAtrribute.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblExpandAtrribute.text =expandAtrribute;
- [vExpandAtrribute addSubview:lblExpandAtrribute];
-
- //扩展属性2
- UIView *vExpandAtrribute2= [UIView new];
- vExpandAtrribute2.frame=CGRectMake(0,CGRectGetMaxY(vExpandAtrribute.frame), Screen_Width, heightRow);
- [vBody addSubview:vExpandAtrribute2];
- NSString *expandAtrributeTitle2=@"扩展属性二:";
- UILabel *lblTitleExpandAttribute2=[UILabel new];
- lblTitleExpandAttribute2.frame=CGRectMake(lblx, lbly, lblwidth+10, lblheight);
- lblTitleExpandAttribute2.textColor = [UIColor blackColor];
- lblTitleExpandAttribute2.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vExpandAtrribute2 addSubview:lblTitleExpandAttribute2];
-
- lblTitleExpandAttribute2.text=expandAtrributeTitle2;
- NSString *expandAtrribute2=_goodsDetailModel.expandAtrribute2;
- UILabel *lblExpandAtrribute2= [UILabel new];
- lblExpandAtrribute2.frame=CGRectMake(CGRectGetMaxX(lblTitleExpandAttribute2.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleExpandAttribute2.frame)-10, valueheight);
- lblExpandAtrribute2.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblExpandAtrribute2.text =expandAtrribute2;
- [vExpandAtrribute2 addSubview:lblExpandAtrribute2];
-
- //商品备注
- UIView *vCodeRemarks= [UIView new];
- vCodeRemarks.frame=CGRectMake(0,CGRectGetMaxY(vExpandAtrribute2.frame), Screen_Width, heightRow);
- [vBody addSubview:vCodeRemarks];
- NSString *codeRemarksTitle=@"商品备注:";
- UILabel *lblTitleCodeRemarks=[UILabel new];
- lblTitleCodeRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleCodeRemarks.textColor = [UIColor blackColor];
- lblTitleCodeRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCodeRemarks addSubview:lblTitleCodeRemarks];
-
- lblTitleCodeRemarks.text=codeRemarksTitle;
- NSString *codeRemarks=_goodsDetailModel.goodsRemarks;
- UILabel *lblCodeRemarks= [UILabel new];
- lblCodeRemarks.frame=CGRectMake(CGRectGetMaxX(lblTitleCodeRemarks.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleCodeRemarks.frame)-10, valueheight);
- lblCodeRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblCodeRemarks.text =codeRemarks;
- [vCodeRemarks addSubview:lblCodeRemarks];
-
- //备注
- UIView *vRemark= [UIView new];
- vRemark.frame=CGRectMake(0,CGRectGetMaxY(vCodeRemarks.frame), Screen_Width, heightRow);
- [vBody addSubview:vRemark];
- NSString *remarksTitle=@"备 注:";
- UILabel *lblTitleRemarks=[UILabel new];
- lblTitleRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleRemarks.text=remarksTitle;
- lblTitleRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vRemark addSubview:lblTitleRemarks];
- NSString *remarks=_goodsDetailModel.remarks;
- UILabel *lblRemarks= [UILabel new];
- lblRemarks.frame=CGRectMake(CGRectGetMaxX(lblTitleRemarks.frame),valuey,Screen_Width-CGRectGetMaxX(lblTitleRemarks.frame)-10, valueheight);
- lblRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblRemarks.text =remarks;
- [vRemark addSubview:lblRemarks];
-
- vBody.frame=CGRectMake(0,0, Screen_Width,CGRectGetMaxY(vRemark.frame));
- _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vBody.frame)+rectStatusHeight+rectNavHeight);
- }
- @end
|