| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362 |
- //
- // OtherInStorageDetailVC.m
- // IBOSSmini
- //
- // Created by guan hong hou on 2018/4/24.
- // Copyright © 2018年 elongtian. All rights reserved.
- //
- #import "OtherInStorageDetailVC.h"
- @interface OtherInStorageDetailVC (){
- UIScrollView *_scrollView;
- }
- @end
- @implementation OtherInStorageDetailVC
- #pragma mark 公共函数
- /**
- 视图加载完成函数
- */
- - (void)viewDidLoad {
- [super viewDidLoad];
- [self loadNavStyle];
- [self initUI];
- }
- /**
- 修改:2017-9-25
- 适配机型
- 安全区视图发生变化
- */
- -(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 heightLine = 1;
- 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 *vInStorageNo = [UIView new];
- vInStorageNo.frame=CGRectMake(0,CGRectGetMaxY(topSeparatorView.frame), Screen_Width, heightRow);
- [vBody addSubview:vInStorageNo];
- NSDictionary *inStorageDict = @{NSFontAttributeName: [UIFont systemFontOfSize: LabelAndTextFontOfSize]};
-
- NSString *inStorageNoTitle=@"入库单号:";
- CGRect inStorageNoTitleFrame = [inStorageNoTitle textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes:inStorageDict];
- inStorageNoTitleFrame.origin.x =lblx;
- inStorageNoTitleFrame.origin.y = 12;
- UILabel *lblTitleInStorageNo=[UILabel new];
- lblTitleInStorageNo.frame=inStorageNoTitleFrame;
- lblTitleInStorageNo.textColor = [UIColor redColor];
- lblTitleInStorageNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vInStorageNo addSubview:lblTitleInStorageNo];
- lblTitleInStorageNo.text=inStorageNoTitle;
-
- NSString *inStorageNo= _otherInStorageListModel.enterNo;
- CGRect inStorageNoFrame = [inStorageNo textRectWithSize:CGSizeMake(MAXFLOAT, MAXFLOAT) attributes:inStorageDict];
-
- inStorageNoFrame.origin.x =Screen_Width-inStorageNoFrame.size.width-10;
- inStorageNoFrame.origin.y = 12;
- UILabel *lblInStorageNo = [UILabel new];
- lblInStorageNo.frame=inStorageNoFrame;
- lblInStorageNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblInStorageNo.text = inStorageNo;
- [vInStorageNo addSubview:lblInStorageNo];
-
- UIView *topSeparatorView1= [UIView new];
- topSeparatorView1.frame = CGRectMake(0, CGRectGetMaxY(vInStorageNo.frame), Screen_Width, heightLine);
- topSeparatorView1.backgroundColor=LineBackgroundColor;
- [vBody addSubview:topSeparatorView1];
-
- UIView *vInStorageType = [UIView new];
- vInStorageType.frame=CGRectMake(0,CGRectGetMaxY(topSeparatorView1.frame), Screen_Width, heightRow);
- [vBody addSubview:vInStorageType];
-
- UILabel *lblTitleInStorageType=[UILabel new];
- lblTitleInStorageType.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleInStorageType.text=@"入库类型:";
- lblTitleInStorageType.textColor = [UIColor blackColor];
- lblTitleInStorageType.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vInStorageType addSubview:lblTitleInStorageType];
-
- UILabel *lblInStorageType = [UILabel new];
- lblInStorageType.frame=CGRectMake(CGRectGetMaxX(lblTitleInStorageType.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleInStorageType.frame)-10, valueheight);
- lblInStorageType.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblInStorageType.text = _otherInStorageListModel.inventoryEnterTypeName;
- [vInStorageType addSubview:lblInStorageType];
- [vBody addSubview:vInStorageType];
-
- UIView *vInvoiceStatus = [UIView new];
- vInvoiceStatus.frame=CGRectMake(0,CGRectGetMaxY(vInStorageType.frame), Screen_Width, heightRow);
- [vBody addSubview:vInvoiceStatus];
-
- UILabel *lblTitleInvoiceStatus=[UILabel new];
- lblTitleInvoiceStatus.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleInvoiceStatus.text=@"单据状态:";
- lblTitleInvoiceStatus.textColor = [UIColor blackColor];
- lblTitleInvoiceStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vInvoiceStatus addSubview:lblTitleInvoiceStatus];
-
- UILabel *lblInvoiceStatus = [UILabel new];
- lblInvoiceStatus.frame=CGRectMake(CGRectGetMaxX(lblTitleInvoiceStatus.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleInvoiceStatus.frame)-10, valueheight);
- lblInvoiceStatus.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblInvoiceStatus.text = _otherInStorageListModel.invoiceStatusName;
- [vInvoiceStatus addSubview:lblInvoiceStatus];
- [vBody addSubview:vInvoiceStatus];
-
- UIView *vAccountDate = [UIView new];
- vAccountDate.frame=CGRectMake(0,CGRectGetMaxY(vInvoiceStatus.frame), Screen_Width, heightRow);
- [vBody addSubview:vAccountDate];
- UILabel *lblTitleAccountDate=[UILabel new];
- lblTitleAccountDate.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleAccountDate.text=@"账务日期:";
- lblTitleAccountDate.textColor = [UIColor blackColor];
- lblTitleAccountDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vAccountDate addSubview:lblTitleAccountDate];
-
- UILabel *lblAccountDate = [UILabel new];
- lblAccountDate.frame=CGRectMake(CGRectGetMaxX(lblTitleAccountDate.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleAccountDate.frame)-10, valueheight);
- lblAccountDate.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblAccountDate.text = _otherInStorageListModel.accountDate;
- [vAccountDate addSubview:lblAccountDate];
-
- [vBody addSubview:vAccountDate];
-
- UIView *vBusinessDepartment = [UIView new];
- vBusinessDepartment.frame=CGRectMake(0,CGRectGetMaxY(vAccountDate.frame), Screen_Width, heightRow);
- [vBody addSubview:vBusinessDepartment];
- UILabel *lblTitleBusinessDepartment=[UILabel new];
- lblTitleBusinessDepartment.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleBusinessDepartment.text=@"业务部门:";
- lblTitleBusinessDepartment.textColor = [UIColor blackColor];
- lblTitleBusinessDepartment.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vBusinessDepartment addSubview:lblTitleBusinessDepartment];
-
- UILabel *lblBusinessDepartment = [UILabel new];
- lblBusinessDepartment.frame=CGRectMake(CGRectGetMaxX(lblTitleBusinessDepartment.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleBusinessDepartment.frame)-10, valueheight);
- lblBusinessDepartment.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblBusinessDepartment.text = _otherInStorageListModel.organizationName;
- [vBusinessDepartment addSubview:lblBusinessDepartment];
-
- UIView *vStaff = [UIView new];
- vStaff.frame=CGRectMake(0,CGRectGetMaxY(vBusinessDepartment.frame), Screen_Width, heightRow);
- [vBody addSubview:vStaff];
- UILabel *lblTitleStaff=[UILabel new];
- lblTitleStaff.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleStaff.text=@"业 务 员:";
- lblTitleStaff.textColor = [UIColor blackColor];
- lblTitleStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vStaff addSubview:lblTitleStaff];
- UILabel *lblStaff = [UILabel new];
- lblStaff.frame=CGRectMake(CGRectGetMaxX(lblTitleStaff.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleStaff.frame)-10, valueheight);
- lblStaff.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblStaff.text = _otherInStorageListModel.staffName;
- [vStaff addSubview:lblStaff];
-
- UIView *vCustomerCode= [UIView new];
- vCustomerCode.frame=CGRectMake(0,CGRectGetMaxY(vStaff.frame), Screen_Width, heightRow);
- [vBody addSubview:vCustomerCode];
-
- UILabel *lblTitleCustomerCode=[UILabel new];
- lblTitleCustomerCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleCustomerCode.text=@"客户编码:";
- lblTitleCustomerCode.textColor = [UIColor blackColor];
- lblTitleCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerCode addSubview:lblTitleCustomerCode];
-
- UILabel *lblCustomerCode = [UILabel new];
- lblCustomerCode.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerCode.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleCustomerCode.frame)-10, valueheight);
- lblCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblCustomerCode.text = _otherInStorageListModel.customerCode;
- [vCustomerCode addSubview:lblCustomerCode];
-
- UIView *vCustomerName= [UIView new];
- vCustomerName.frame=CGRectMake(0,CGRectGetMaxY(vCustomerCode.frame), Screen_Width, heightRow);
- [vBody addSubview:vCustomerName];
-
- UILabel *lblTitleCustomerName=[UILabel new];
- lblTitleCustomerName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleCustomerName.text=@"客户名称:";
- lblTitleCustomerName.textColor = [UIColor blackColor];
- lblTitleCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCustomerName addSubview:lblTitleCustomerName];
-
- UILabel *lblCustomerName = [UILabel new];
- lblCustomerName.frame=CGRectMake(CGRectGetMaxX(lblTitleCustomerName.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleCustomerName.frame)-10, valueheight);
- lblCustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblCustomerName.text = _otherInStorageListModel.customerName;
- [vCustomerName addSubview:lblCustomerName];
-
- UIView *vDriver= [UIView new];
- vDriver.frame=CGRectMake(0,CGRectGetMaxY(vCustomerName.frame), Screen_Width, heightRow);
- [vBody addSubview:vDriver];
-
- UILabel *lblTitleDriver=[UILabel new];
- lblTitleDriver.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleDriver.text=@"运输司机:";
- lblTitleDriver.textColor = [UIColor blackColor];
- lblTitleDriver.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vDriver addSubview:lblTitleDriver];
-
- UILabel *lblDriver = [UILabel new];
- lblDriver.frame=CGRectMake(CGRectGetMaxX(lblTitleDriver.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleDriver.frame)-10, valueheight);
- lblDriver.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblDriver.text = _otherInStorageListModel.driverName;
- [vDriver addSubview:lblDriver];
-
- UIView *vDockerName= [UIView new];
- vDockerName.frame=CGRectMake(0,CGRectGetMaxY(vDriver.frame), Screen_Width, heightRow);
- [vBody addSubview:vDockerName];
-
- UILabel *lblTitleDockerName=[UILabel new];
- lblTitleDockerName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleDockerName.text=@"装卸工人:";
- lblTitleDockerName.textColor = [UIColor blackColor];
- lblTitleDockerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vDockerName addSubview:lblTitleDockerName];
-
- UILabel *lblDockerName = [UILabel new];
- lblDockerName.frame=CGRectMake(CGRectGetMaxX(lblTitleDockerName.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleDockerName.frame)-10, valueheight);
- lblDockerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblDockerName.text = _otherInStorageListModel.dockerName;
- [vDockerName addSubview:lblDockerName];
-
- UIView *vSupplier= [UIView new];
- vSupplier.frame=CGRectMake(0,CGRectGetMaxY(vDockerName.frame), Screen_Width, heightRow);
- [vBody addSubview:vSupplier];
-
- UILabel *lblTitleSupplier=[UILabel new];
- lblTitleSupplier.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleSupplier.text=@"供应商:";
- lblTitleSupplier.textColor = [UIColor blackColor];
- lblTitleSupplier.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vSupplier addSubview:lblTitleSupplier];
-
- UILabel *lblSupplier = [UILabel new];
- lblSupplier.frame=CGRectMake(CGRectGetMaxX(lblTitleSupplier.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleSupplier.frame)-10, valueheight);
- lblSupplier.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblSupplier.text = _otherInStorageListModel.supplierName;
- [vSupplier addSubview:lblSupplier];
-
- UIView *vCorrectNo= [UIView new];
- vCorrectNo.frame=CGRectMake(0,CGRectGetMaxY(vSupplier.frame), Screen_Width, heightRow);
- [vBody addSubview:vCorrectNo];
-
- UILabel *lblTitleCorrectNo=[UILabel new];
- lblTitleCorrectNo.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleCorrectNo.text=@"冲正单号:";
- lblTitleCorrectNo.textColor = [UIColor blackColor];
- lblTitleCorrectNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCorrectNo addSubview:lblTitleCorrectNo];
-
- UILabel *lblCorrectNo = [UILabel new];
- lblCorrectNo.frame=CGRectMake(CGRectGetMaxX(lblTitleCorrectNo.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleCorrectNo.frame)-10, valueheight);
- lblCorrectNo.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblCorrectNo.text = _otherInStorageListModel.reversedEnterNo;
- [vCorrectNo addSubview:lblCorrectNo];
-
- UIView *vCreater= [UIView new];
- vCreater.frame=CGRectMake(0,CGRectGetMaxY(vCorrectNo.frame), Screen_Width, heightRow);
- [vBody addSubview:vCreater];
-
- UILabel *lblTitleCreater=[UILabel new];
- lblTitleCreater.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleCreater.text=@"创建者:";
- lblTitleCreater.textColor = [UIColor blackColor];
- lblTitleCreater.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vCreater addSubview:lblTitleCreater];
-
- UILabel *lblCreater = [UILabel new];
- lblCreater.frame=CGRectMake(CGRectGetMaxX(lblTitleCreater.frame), valuey, Screen_Width-CGRectGetMaxX(lblTitleCreater.frame)-10, valueheight);
- lblCreater.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- lblCreater.text = _otherInStorageListModel.createUserName;
- [vCreater addSubview:lblCreater];
-
- UIView *vRemarks= [UIView new];
- vRemarks.frame=CGRectMake(0,CGRectGetMaxY(vCreater.frame), Screen_Width, heightRow);
- [vBody addSubview:vRemarks];
-
- UILabel *lblTitleRemarks=[UILabel new];
- lblTitleRemarks.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
- lblTitleRemarks.text=@"备注:";
- lblTitleRemarks.textColor = [UIColor blackColor];
- lblTitleRemarks.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
- [vRemarks addSubview:lblTitleRemarks];
-
- 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 = _otherInStorageListModel.remarks;
- [vRemarks addSubview:lblRemarks];
- vBody.frame=CGRectMake(0,0, Screen_Width,CGRectGetMaxY(vRemarks.frame));
- _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vBody.frame)+rectStatusHeight+rectNavHeight);
-
-
- }
- @end
|