CustomerBalanceDetailViewController.m 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297
  1. //
  2. // CustomerBalanceDetailViewController.m
  3. // IBOSSmini
  4. //
  5. // Created by apple on 2017/5/24.
  6. // Copyright © 2017年 elongtian. All rights reserved.
  7. //
  8. #import "CustomerBalanceDetailViewController.h"
  9. @interface CustomerBalanceDetailViewController (){
  10. UIScrollView *_scrollView;
  11. }
  12. @end
  13. @implementation CustomerBalanceDetailViewController
  14. /**
  15. viewDidLoad函数
  16. */
  17. - (void)viewDidLoad {
  18. [super viewDidLoad];
  19. [self showTitle:@""];
  20. [self initUI];
  21. }
  22. /**
  23. didReceiveMemoryWarning函数
  24. */
  25. - (void)didReceiveMemoryWarning {
  26. [super didReceiveMemoryWarning];
  27. }
  28. /**
  29. 安全区视图发生变化
  30. */
  31. -(void)viewSafeAreaInsetsDidChange{
  32. _scrollView.frame = self.view.safeAreaLayoutGuide.layoutFrame;
  33. [super viewSafeAreaInsetsDidChange];
  34. }
  35. #pragma mark - 私有函数
  36. /**
  37. 初始化ui
  38. */
  39. - (void)initUI { ;
  40. self.navigationItem.title=@"客户往来余额表详细";
  41. self.view.backgroundColor = LineBackgroundColor;
  42. CGFloat heightRow = 30;
  43. CGFloat lblx = 10;
  44. CGFloat lbly = 3;
  45. CGFloat lblwidth = 70;
  46. CGFloat lblheight = 25;
  47. CGFloat valuex = 80;
  48. CGFloat valuey = 3;
  49. CGFloat valueheight = 25;
  50. _scrollView=[UIScrollView new];
  51. _scrollView.frame=self.view.bounds;
  52. [self.view addSubview:_scrollView];
  53. UIView *vTitle = [UIView new];
  54. [_scrollView addSubview:vTitle];
  55. vTitle.backgroundColor = [UIColor whiteColor];
  56. //==================
  57. UIView *vcustomerName = [UIView new];
  58. vcustomerName.frame=CGRectMake(0, CGRectGetMaxY(vTitle.frame), Screen_Width, heightRow);
  59. [vTitle addSubview:vcustomerName];
  60. UILabel *lblcustomerName=[UILabel new];
  61. lblcustomerName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  62. lblcustomerName.text=@"客户名称:";
  63. lblcustomerName.textColor = [UIColor blackColor];
  64. lblcustomerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  65. [vcustomerName addSubview:lblcustomerName];
  66. UILabel *customerName = [UILabel new];
  67. customerName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  68. customerName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  69. customerName.text = self.sCustomerName;
  70. [vcustomerName addSubview:customerName];
  71. UIView *vCustomerCode = [UIView new];
  72. vCustomerCode.frame=CGRectMake(0, CGRectGetMaxY(vcustomerName.frame), Screen_Width, heightRow);
  73. [vTitle addSubview:vCustomerCode];
  74. UILabel *lblCustomerCode=[UILabel new];
  75. lblCustomerCode.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  76. lblCustomerCode.text=@"客户编码:";
  77. lblCustomerCode.textColor = [UIColor blackColor];
  78. lblCustomerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  79. [vCustomerCode addSubview:lblCustomerCode];
  80. UILabel *customerCode = [UILabel new];
  81. customerCode.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  82. customerCode.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  83. customerCode.text = self.sCustomerCode;
  84. [vCustomerCode addSubview:customerCode];
  85. //==================
  86. UIView *vchannelName = [UIView new];
  87. vchannelName.frame=CGRectMake(0, CGRectGetMaxY(vCustomerCode.frame), Screen_Width, heightRow);
  88. [vTitle addSubview:vchannelName];
  89. UILabel *lblname=[UILabel new];
  90. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  91. lblname.text=@"渠道名称:";
  92. lblname.textColor = [UIColor blackColor];
  93. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  94. [vchannelName addSubview:lblname];
  95. UILabel *lblValue = [UILabel new];
  96. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  97. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  98. lblValue.text = self.sChannelName;
  99. [vchannelName addSubview:lblValue];
  100. //==================
  101. UIView *vdictionaryValue = [UIView new];
  102. vdictionaryValue.frame=CGRectMake(0, CGRectGetMaxY(vchannelName.frame), Screen_Width, heightRow);
  103. [vTitle addSubview:vdictionaryValue];
  104. lblname=[UILabel new];
  105. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  106. lblname.text=@"客户性质:";
  107. lblname.textColor = [UIColor blackColor];
  108. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  109. [vdictionaryValue addSubview:lblname];
  110. lblValue = [UILabel new];
  111. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  112. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  113. lblValue.text = self.sDictionaryValue;
  114. [vdictionaryValue addSubview:lblValue];
  115. //==================
  116. UIView *vaccountOrganizationName = [UIView new];
  117. vaccountOrganizationName.frame=CGRectMake(0, CGRectGetMaxY(vdictionaryValue.frame), Screen_Width, heightRow);
  118. [vTitle addSubview:vaccountOrganizationName];
  119. lblname=[UILabel new];
  120. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  121. lblname.text=@"核算机构:";
  122. lblname.textColor = [UIColor blackColor];
  123. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  124. [vaccountOrganizationName addSubview:lblname];
  125. lblValue = [UILabel new];
  126. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  127. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  128. lblValue.text = self.sAccountOrganizationName;
  129. [vaccountOrganizationName addSubview:lblValue];
  130. // ==================
  131. UIView *vorganizationName = [UIView new];
  132. vorganizationName.frame=CGRectMake(0, CGRectGetMaxY(vaccountOrganizationName.frame), Screen_Width, heightRow);
  133. [vTitle addSubview:vorganizationName];
  134. UILabel *lblorganizationName=[UILabel new];
  135. lblorganizationName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  136. lblorganizationName.text=@"组织机构:";
  137. lblorganizationName.textColor = [UIColor blackColor];
  138. lblorganizationName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  139. [vorganizationName addSubview:lblorganizationName];
  140. UILabel *organizationName = [UILabel new];
  141. organizationName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  142. organizationName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  143. organizationName.text = self.sOrganizationName;
  144. [vorganizationName addSubview:organizationName];
  145. //==================
  146. UIView *vwstaffName = [UIView new];
  147. vwstaffName.frame=CGRectMake(0, CGRectGetMaxY(vorganizationName.frame), Screen_Width, heightRow);
  148. [vTitle addSubview:vwstaffName];
  149. UILabel *lblstaffName=[UILabel new];
  150. lblstaffName.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  151. lblstaffName.text=@"业 务 员:";
  152. lblstaffName.textColor = [UIColor blackColor];
  153. lblstaffName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  154. [vwstaffName addSubview:lblstaffName];
  155. UILabel *staffName = [UILabel new];
  156. staffName.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  157. staffName.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  158. staffName.text = self.sStaffName;
  159. [vwstaffName addSubview:staffName];
  160. //==================
  161. UIView *vdistrictName = [UIView new];
  162. vdistrictName.frame=CGRectMake(0, CGRectGetMaxY(vwstaffName.frame), Screen_Width, heightRow);
  163. [vTitle addSubview:vdistrictName];
  164. lblname=[UILabel new];
  165. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  166. lblname.text=@"客户区域:";
  167. lblname.textColor = [UIColor blackColor];
  168. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  169. [vdistrictName addSubview:lblname];
  170. lblValue = [UILabel new];
  171. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  172. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  173. lblValue.text = self.sDistrictName;
  174. [vdistrictName addSubview:lblValue];
  175. //==================
  176. UIView *vcreditLine = [UIView new];
  177. vcreditLine.frame=CGRectMake(0, CGRectGetMaxY(vdistrictName.frame), Screen_Width, heightRow);
  178. [vTitle addSubview:vcreditLine];
  179. lblname=[UILabel new];
  180. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  181. lblname.text=@"信用额度:";
  182. lblname.textColor = [UIColor blackColor];
  183. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  184. [vcreditLine addSubview:lblname];
  185. lblValue = [UILabel new];
  186. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  187. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  188. lblValue.text = self.sCreditLine;
  189. [vcreditLine addSubview:lblValue];
  190. //==================
  191. UIView *vtelephone = [UIView new];
  192. vtelephone.frame=CGRectMake(0, CGRectGetMaxY(vcreditLine.frame), Screen_Width, heightRow);
  193. [vTitle addSubview:vtelephone];
  194. UILabel *lbltelephone=[UILabel new];
  195. lbltelephone.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  196. lbltelephone.text=@"客户电话:";
  197. lbltelephone.textColor = [UIColor blackColor];
  198. lbltelephone.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  199. [vtelephone addSubview:lbltelephone];
  200. UILabel *positionNumber = [UILabel new];
  201. positionNumber.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  202. positionNumber.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  203. positionNumber.text = self.sTelephone;
  204. [vtelephone addSubview:positionNumber];
  205. //==================
  206. UIView *vcustomerAddress = [UIView new];
  207. vcustomerAddress.frame=CGRectMake(0, CGRectGetMaxY(vtelephone.frame), Screen_Width, heightRow);
  208. [vTitle addSubview:vcustomerAddress];
  209. UILabel *lblcustomerAddress=[UILabel new];
  210. lblcustomerAddress.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  211. lblcustomerAddress.text=@"客户地址:";
  212. lblcustomerAddress.textColor = [UIColor blackColor];
  213. lblcustomerAddress.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  214. [vcustomerAddress addSubview:lblcustomerAddress];
  215. UILabel *customerAddress = [UILabel new];
  216. customerAddress.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  217. customerAddress.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  218. customerAddress.text = self.sAddress;
  219. [vcustomerAddress addSubview:customerAddress];
  220. //==================
  221. UIView *vdepositReceived = [UIView new];
  222. vdepositReceived.frame=CGRectMake(0, CGRectGetMaxY(vcustomerAddress.frame), Screen_Width, heightRow);
  223. [vTitle addSubview:vdepositReceived];
  224. lblname=[UILabel new];
  225. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  226. lblname.text=@"预 收 款:";
  227. lblname.textColor = [UIColor blackColor];
  228. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  229. [vdepositReceived addSubview:lblname];
  230. lblValue = [UILabel new];
  231. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  232. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  233. lblValue.text = self.sDepositReceived;
  234. [vdepositReceived addSubview:lblValue];
  235. UIView *vamountReceivable = [UIView new];
  236. vamountReceivable.frame=CGRectMake(0, CGRectGetMaxY(vdepositReceived.frame), Screen_Width, heightRow);
  237. [vTitle addSubview:vamountReceivable];
  238. lblname=[UILabel new];
  239. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  240. lblname.text=@"应 收 款:";
  241. lblname.textColor = [UIColor blackColor];
  242. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  243. [vamountReceivable addSubview:lblname];
  244. lblValue = [UILabel new];
  245. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  246. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  247. lblValue.text = self.sAmountReceivable;
  248. [vamountReceivable addSubview:lblValue];
  249. UIView *vearnest = [UIView new];
  250. vearnest.frame=CGRectMake(0, CGRectGetMaxY(vamountReceivable.frame), Screen_Width, heightRow);
  251. [vTitle addSubview:vearnest];
  252. lblname=[UILabel new];
  253. lblname.frame=CGRectMake(lblx, lbly, lblwidth, lblheight);
  254. lblname.text=@"定 金:";
  255. lblname.textColor = [UIColor blackColor];
  256. lblname.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  257. [vearnest addSubview:lblname];
  258. lblValue = [UILabel new];
  259. lblValue.frame=CGRectMake(valuex, valuey, Screen_Width - valuex - lblx, valueheight);
  260. lblValue.font = [UIFont systemFontOfSize: LabelAndTextFontOfSize];
  261. lblValue.text = self.sEarnest;
  262. [vearnest addSubview:lblValue];
  263. vTitle.frame=CGRectMake(10, 10, Screen_Width-20, CGRectGetMaxY(vearnest.frame) );
  264. vTitle.layer.cornerRadius = CornerRadius;
  265. _scrollView.contentSize = CGSizeMake(self.view.frame.size.width, CGRectGetMaxY(vTitle.frame)+rectStatusHeight+rectNavHeight);
  266. }
  267. @end