刘千军 vor 10 Monaten
Ursprung
Commit
746516f213
61 geänderte Dateien mit 4801 neuen und 732 gelöschten Zeilen
  1. 68 8
      Koala/Koala.xcodeproj/project.pbxproj
  2. 1 0
      Koala/Koala/FX/Classification/UIView+CategoryClass.swift
  3. 19 0
      Koala/Koala/FX/OpretationalDataClass/OperationalUserInfoData.swift
  4. 2 0
      Koala/Koala/Modular/Deal/M/DealModel.swift
  5. 260 0
      Koala/Koala/Modular/Deal/V/Deal/AccountSelectPopView.swift
  6. 64 0
      Koala/Koala/Modular/Deal/V/Deal/AccountSelectPopView.xib
  7. 0 101
      Koala/Koala/Modular/Deal/V/Deal/DealHeaderView.xib
  8. 146 49
      Koala/Koala/Modular/Deal/V/Deal/DealListCell.swift
  9. 124 40
      Koala/Koala/Modular/Deal/V/Deal/DealListCell.xib
  10. 19 43
      Koala/Koala/Modular/Deal/V/Deal/DealNavView.swift
  11. 18 36
      Koala/Koala/Modular/Deal/V/Deal/DealNavView.xib
  12. 529 0
      Koala/Koala/Modular/Deal/V/Deal/DealProCell.swift
  13. 474 0
      Koala/Koala/Modular/Deal/V/Deal/DealProCell.xib
  14. 234 0
      Koala/Koala/Modular/Deal/V/Deal/DealProDataCell.swift
  15. 167 0
      Koala/Koala/Modular/Deal/V/Deal/DealProDataCell.xib
  16. 10 48
      Koala/Koala/Modular/Deal/V/Deal/DealSectionView.swift
  17. 47 0
      Koala/Koala/Modular/Deal/V/Deal/DealSectionView.xib
  18. 44 0
      Koala/Koala/Modular/Deal/V/Deal/DealSelectSymbolCell.swift
  19. 85 0
      Koala/Koala/Modular/Deal/V/Deal/DealSelectSymbolCell.xib
  20. 462 0
      Koala/Koala/Modular/Deal/V/Deal/DealSimCell.swift
  21. 421 0
      Koala/Koala/Modular/Deal/V/Deal/DealSimCell.xib
  22. 316 0
      Koala/Koala/Modular/Deal/V/Deal/DealSimDataCell.swift
  23. 213 0
      Koala/Koala/Modular/Deal/V/Deal/DealSimDataCell.xib
  24. 83 0
      Koala/Koala/Modular/Deal/V/Deal/DealTopView.swift
  25. 121 0
      Koala/Koala/Modular/Deal/V/Deal/DealTopView.xib
  26. 258 150
      Koala/Koala/Modular/Deal/V/Deal/DealView.swift
  27. 255 0
      Koala/Koala/Modular/Deal/VC/DealSelectSymbolViewController.swift
  28. 16 16
      Koala/Koala/Modular/Deal/VC/DealViewController.swift
  29. 223 199
      Koala/Koala/Modular/Deal/VM/DealViewModel.swift
  30. 45 0
      Koala/Koala/Modular/Home/V/JDChartLineView.swift
  31. 5 1
      Koala/Koala/Modular/JDTrade/VC/JDTradeAccountHoldViewController.swift
  32. 21 0
      Koala/Koala/Modular/Market/V/MarketSearch/MSearchListCell.swift
  33. 6 4
      Koala/Koala/Modular/Mine/V/Mine/LanguageSelectPopView.swift
  34. 29 20
      Koala/Koala/Modular/Public/V/Popup/KSelectBottonPopView.swift
  35. 6 5
      Koala/Koala/Modular/Public/V/Popup/KSelectBottonPopView.xib
  36. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/0O7aiwPtmH.png
  37. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/4dMSmqyL30.png
  38. 3 3
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Contents.json
  39. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Frame 3002.png
  40. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Frame 3002@2x.png
  41. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Frame 3002@3x.png
  42. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/J0uhHKokCm.png
  43. 3 3
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/Contents.json
  44. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/D9h4LEQkWi.png
  45. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/aSAPVhwytq.png
  46. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/lUORSsWknP.png
  47. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/形状结合.png
  48. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/形状结合@2x.png
  49. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/形状结合@3x.png
  50. 1 3
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/Contents.json
  51. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/DXmS14MOT2.png
  52. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/PYElS3zONd.png
  53. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/more.png
  54. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/yqUGFar3jd.png
  55. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/3ttob8QT2d.png
  56. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/5YnuMDBILG.png
  57. 3 3
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/Contents.json
  58. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/hu6IIeELTW.png
  59. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/形状结合备份.png
  60. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/形状结合备份@2x.png
  61. BIN
      Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/形状结合备份@3x.png

+ 68 - 8
Koala/Koala.xcodeproj/project.pbxproj

@@ -718,8 +718,8 @@
 		6CBDCBCE297C32EB003E068F /* Charts.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 6CBDCBC9297C2E09003E068F /* Charts.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
 		6CC37FA729877ECD0079FA5C /* DealInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC37FA629877ECD0079FA5C /* DealInputView.swift */; };
 		6CC37FAB29877F320079FA5C /* DealInputView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CC37FAA29877F320079FA5C /* DealInputView.xib */; };
-		6CC37FAD2988EEA70079FA5C /* DealHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC37FAC2988EEA70079FA5C /* DealHeaderView.swift */; };
-		6CC37FAF2988EEB10079FA5C /* DealHeaderView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CC37FAE2988EEB10079FA5C /* DealHeaderView.xib */; };
+		6CC37FAD2988EEA70079FA5C /* DealSectionView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC37FAC2988EEA70079FA5C /* DealSectionView.swift */; };
+		6CC37FAF2988EEB10079FA5C /* DealSectionView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CC37FAE2988EEB10079FA5C /* DealSectionView.xib */; };
 		6CC37FB9298957350079FA5C /* DealHintViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC37FB7298957350079FA5C /* DealHintViewController.swift */; };
 		6CC37FBA298957350079FA5C /* DealHintViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CC37FB8298957350079FA5C /* DealHintViewController.xib */; };
 		6CC37FBE298962B40079FA5C /* DealHintCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CC37FBC298962B40079FA5C /* DealHintCell.swift */; };
@@ -773,6 +773,21 @@
 		6CC8024429968A2300C36373 /* AWithdrawalsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CC8024229968A2300C36373 /* AWithdrawalsViewController.xib */; };
 		6CCAA17D2AE6C5CD000510FB /* MarkertIndexCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA17B2AE6C5CD000510FB /* MarkertIndexCell.swift */; };
 		6CCAA17E2AE6C5CD000510FB /* MarkertIndexCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA17C2AE6C5CD000510FB /* MarkertIndexCell.xib */; };
+		6CCAA1862AE95488000510FB /* DealTopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA1852AE95488000510FB /* DealTopView.swift */; };
+		6CCAA1882AE95499000510FB /* DealTopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA1872AE95499000510FB /* DealTopView.xib */; };
+		6CCAA18B2AEA5573000510FB /* DealSimDataCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA1892AEA5573000510FB /* DealSimDataCell.swift */; };
+		6CCAA18C2AEA5573000510FB /* DealSimDataCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA18A2AEA5573000510FB /* DealSimDataCell.xib */; };
+		6CCAA18F2AEBE5A1000510FB /* DealSimCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA18D2AEBE5A1000510FB /* DealSimCell.swift */; };
+		6CCAA1902AEBE5A1000510FB /* DealSimCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA18E2AEBE5A1000510FB /* DealSimCell.xib */; };
+		6CCAA1972AED50C5000510FB /* DealProDataCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA1952AED50C5000510FB /* DealProDataCell.swift */; };
+		6CCAA1982AED50C5000510FB /* DealProDataCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA1962AED50C5000510FB /* DealProDataCell.xib */; };
+		6CCAA19C2AED5C46000510FB /* DealProCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA19A2AED5C46000510FB /* DealProCell.swift */; };
+		6CCAA19D2AED5C46000510FB /* DealProCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA19B2AED5C46000510FB /* DealProCell.xib */; };
+		6CCAA19F2AEE1B3D000510FB /* AccountSelectPopView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA19E2AEE1B3D000510FB /* AccountSelectPopView.swift */; };
+		6CCAA1A12AEE1B49000510FB /* AccountSelectPopView.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA1A02AEE1B49000510FB /* AccountSelectPopView.xib */; };
+		6CCAA1A42AEE5614000510FB /* DealSelectSymbolViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA1A22AEE5614000510FB /* DealSelectSymbolViewController.swift */; };
+		6CCAA1A82AEE918C000510FB /* DealSelectSymbolCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CCAA1A62AEE918C000510FB /* DealSelectSymbolCell.swift */; };
+		6CCAA1A92AEE918C000510FB /* DealSelectSymbolCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CCAA1A72AEE918C000510FB /* DealSelectSymbolCell.xib */; };
 		6CD200AA29E6E4B500F0966D /* ASavingsDetailsViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CD200A829E6E4B500F0966D /* ASavingsDetailsViewController.swift */; };
 		6CD200AB29E6E4B500F0966D /* ASavingsDetailsViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 6CD200A929E6E4B500F0966D /* ASavingsDetailsViewController.xib */; };
 		6CD200AE29E6E70400F0966D /* ASavingsDetailsHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 6CD200AD29E6E70400F0966D /* ASavingsDetailsHeaderView.swift */; };
@@ -1585,8 +1600,8 @@
 		6CBDCBC3297C2E08003E068F /* Charts.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Charts.xcodeproj; path = "Charts-master/Charts.xcodeproj"; sourceTree = "<group>"; };
 		6CC37FA629877ECD0079FA5C /* DealInputView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealInputView.swift; sourceTree = "<group>"; };
 		6CC37FAA29877F320079FA5C /* DealInputView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealInputView.xib; sourceTree = "<group>"; };
-		6CC37FAC2988EEA70079FA5C /* DealHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealHeaderView.swift; sourceTree = "<group>"; };
-		6CC37FAE2988EEB10079FA5C /* DealHeaderView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealHeaderView.xib; sourceTree = "<group>"; };
+		6CC37FAC2988EEA70079FA5C /* DealSectionView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealSectionView.swift; sourceTree = "<group>"; };
+		6CC37FAE2988EEB10079FA5C /* DealSectionView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealSectionView.xib; sourceTree = "<group>"; };
 		6CC37FB7298957350079FA5C /* DealHintViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealHintViewController.swift; sourceTree = "<group>"; };
 		6CC37FB8298957350079FA5C /* DealHintViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealHintViewController.xib; sourceTree = "<group>"; };
 		6CC37FBC298962B40079FA5C /* DealHintCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealHintCell.swift; sourceTree = "<group>"; };
@@ -1640,6 +1655,21 @@
 		6CC8024229968A2300C36373 /* AWithdrawalsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AWithdrawalsViewController.xib; sourceTree = "<group>"; };
 		6CCAA17B2AE6C5CD000510FB /* MarkertIndexCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MarkertIndexCell.swift; sourceTree = "<group>"; };
 		6CCAA17C2AE6C5CD000510FB /* MarkertIndexCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = MarkertIndexCell.xib; sourceTree = "<group>"; };
+		6CCAA1852AE95488000510FB /* DealTopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealTopView.swift; sourceTree = "<group>"; };
+		6CCAA1872AE95499000510FB /* DealTopView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealTopView.xib; sourceTree = "<group>"; };
+		6CCAA1892AEA5573000510FB /* DealSimDataCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealSimDataCell.swift; sourceTree = "<group>"; };
+		6CCAA18A2AEA5573000510FB /* DealSimDataCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealSimDataCell.xib; sourceTree = "<group>"; };
+		6CCAA18D2AEBE5A1000510FB /* DealSimCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealSimCell.swift; sourceTree = "<group>"; };
+		6CCAA18E2AEBE5A1000510FB /* DealSimCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealSimCell.xib; sourceTree = "<group>"; };
+		6CCAA1952AED50C5000510FB /* DealProDataCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealProDataCell.swift; sourceTree = "<group>"; };
+		6CCAA1962AED50C5000510FB /* DealProDataCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealProDataCell.xib; sourceTree = "<group>"; };
+		6CCAA19A2AED5C46000510FB /* DealProCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealProCell.swift; sourceTree = "<group>"; };
+		6CCAA19B2AED5C46000510FB /* DealProCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealProCell.xib; sourceTree = "<group>"; };
+		6CCAA19E2AEE1B3D000510FB /* AccountSelectPopView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AccountSelectPopView.swift; sourceTree = "<group>"; };
+		6CCAA1A02AEE1B49000510FB /* AccountSelectPopView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = AccountSelectPopView.xib; sourceTree = "<group>"; };
+		6CCAA1A22AEE5614000510FB /* DealSelectSymbolViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealSelectSymbolViewController.swift; sourceTree = "<group>"; };
+		6CCAA1A62AEE918C000510FB /* DealSelectSymbolCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = DealSelectSymbolCell.swift; sourceTree = "<group>"; };
+		6CCAA1A72AEE918C000510FB /* DealSelectSymbolCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = DealSelectSymbolCell.xib; sourceTree = "<group>"; };
 		6CD200A829E6E4B500F0966D /* ASavingsDetailsViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASavingsDetailsViewController.swift; sourceTree = "<group>"; };
 		6CD200A929E6E4B500F0966D /* ASavingsDetailsViewController.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = ASavingsDetailsViewController.xib; sourceTree = "<group>"; };
 		6CD200AD29E6E70400F0966D /* ASavingsDetailsHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ASavingsDetailsHeaderView.swift; sourceTree = "<group>"; };
@@ -2858,16 +2888,30 @@
 				6C35368E29815FB7003BB632 /* DealView.swift */,
 				6C35369229816129003BB632 /* DealNavView.swift */,
 				6C35369429816138003BB632 /* DealNavView.xib */,
+				6CCAA1852AE95488000510FB /* DealTopView.swift */,
+				6CCAA1872AE95499000510FB /* DealTopView.xib */,
+				6CCAA1892AEA5573000510FB /* DealSimDataCell.swift */,
+				6CCAA18A2AEA5573000510FB /* DealSimDataCell.xib */,
+				6CCAA18D2AEBE5A1000510FB /* DealSimCell.swift */,
+				6CCAA18E2AEBE5A1000510FB /* DealSimCell.xib */,
+				6CCAA1952AED50C5000510FB /* DealProDataCell.swift */,
+				6CCAA1962AED50C5000510FB /* DealProDataCell.xib */,
+				6CCAA19A2AED5C46000510FB /* DealProCell.swift */,
+				6CCAA19B2AED5C46000510FB /* DealProCell.xib */,
+				6CCAA1A62AEE918C000510FB /* DealSelectSymbolCell.swift */,
+				6CCAA1A72AEE918C000510FB /* DealSelectSymbolCell.xib */,
 				6C3536982982C8BE003BB632 /* DealTopCell.swift */,
 				6C3536992982C8BE003BB632 /* DealTopCell.xib */,
 				6C50AB572A03E4FA00699557 /* DealSimplenessCell.swift */,
 				6C50AB582A03E4FA00699557 /* DealSimplenessCell.xib */,
 				6CC37FA629877ECD0079FA5C /* DealInputView.swift */,
 				6CC37FAA29877F320079FA5C /* DealInputView.xib */,
-				6CC37FAC2988EEA70079FA5C /* DealHeaderView.swift */,
-				6CC37FAE2988EEB10079FA5C /* DealHeaderView.xib */,
+				6CC37FAC2988EEA70079FA5C /* DealSectionView.swift */,
+				6CC37FAE2988EEB10079FA5C /* DealSectionView.xib */,
 				6CC37FC4298EB2640079FA5C /* DealListCell.swift */,
 				6CC37FC5298EB2640079FA5C /* DealListCell.xib */,
+				6CCAA19E2AEE1B3D000510FB /* AccountSelectPopView.swift */,
+				6CCAA1A02AEE1B49000510FB /* AccountSelectPopView.xib */,
 				6CC37FC8298EC19C0079FA5C /* DealClosedPopView.swift */,
 				6CC37FCA298EC1AD0079FA5C /* DealClosedPopView.xib */,
 				6CC37FCC298F79CF0079FA5C /* DealChangeOrderPopView.swift */,
@@ -3166,6 +3210,7 @@
 			isa = PBXGroup;
 			children = (
 				6C584E2D295C611500CE1D2C /* DealViewController.swift */,
+				6CCAA1A22AEE5614000510FB /* DealSelectSymbolViewController.swift */,
 				6CBDC900297AD5F7003E068F /* CTKLineViewController.swift */,
 				6CC37FB7298957350079FA5C /* DealHintViewController.swift */,
 				6CC37FB8298957350079FA5C /* DealHintViewController.xib */,
@@ -3984,7 +4029,7 @@
 				6CBB634F2ADEDDEC0045A4C9 /* MDPMajorListCell.xib in Resources */,
 				6CC37FFF299294D50079FA5C /* AssetsSavingsListCell.xib in Resources */,
 				6CC37FC7298EB2650079FA5C /* DealListCell.xib in Resources */,
-				6CC37FAF2988EEB10079FA5C /* DealHeaderView.xib in Resources */,
+				6CC37FAF2988EEB10079FA5C /* DealSectionView.xib in Resources */,
 				6C10F0F929DB08D900B79491 /* updateAPP066.png in Resources */,
 				6CD5EB7429D864240053325F /* GuideViewCell.xib in Resources */,
 				6C4AFACC299AA17D00508EA7 /* WithdrawalsRemarkPopView.xib in Resources */,
@@ -4024,6 +4069,7 @@
 				6C4AFAC8299A7A3500508EA7 /* AddAddressViewController.xib in Resources */,
 				6C10F0F229DB08D900B79491 /* updateAPP100.png in Resources */,
 				6C6B7DA3296AF77500067FA3 /* HomeHeaderView.xib in Resources */,
+				6CCAA1982AED50C5000510FB /* DealProDataCell.xib in Resources */,
 				6C4AFAC42998E92400508EA7 /* WithdrawalsAddressPopView.xib in Resources */,
 				6C10F08E29DB087700B79491 /* UpdateView.xib in Resources */,
 				6C86531629B492DA00A2E7FB /* TDUserListCell.xib in Resources */,
@@ -4031,6 +4077,7 @@
 				6C4AFAE1299E693B00508EA7 /* AFiatWithdrawalsViewController.xib in Resources */,
 				6C00A883242D8FEB00CE9ADB /* LaunchScreen.storyboard in Resources */,
 				6C2FFCD42961C423005B8180 /* RealNameCell.xib in Resources */,
+				6CCAA1882AE95499000510FB /* DealTopView.xib in Resources */,
 				6C10F10529DB08D900B79491 /* updateAPP038.png in Resources */,
 				6CBB62C02AD445320045A4C9 /* MarketRecommendView.xib in Resources */,
 				6C10F0EA29DB08D900B79491 /* updateAPP088.png in Resources */,
@@ -4039,8 +4086,10 @@
 				6C2EAD8929E4503500E03AF8 /* ApplySucceedViewController.xib in Resources */,
 				6CD200C029E8506D00F0966D /* CommissionRecordListCell.xib in Resources */,
 				6CBDC90D297AE04C003E068F /* CTKLineUpsDownsCell.xib in Resources */,
+				6CCAA1A12AEE1B49000510FB /* AccountSelectPopView.xib in Resources */,
 				6C10F0DB29DB08D900B79491 /* updateAPP082.png in Resources */,
 				6CBDC90A297AD8DF003E068F /* CTKLineFooterView.xib in Resources */,
+				6CCAA1902AEBE5A1000510FB /* DealSimCell.xib in Resources */,
 				6CD5EB6529D5C6A40053325F /* FundsRecordCell.xib in Resources */,
 				6CBB634B2ADEC5AB0045A4C9 /* MDPMajorCell.xib in Resources */,
 				6CA7133A2958781C0047F450 /* CountryCode.json in Resources */,
@@ -4076,6 +4125,7 @@
 				6C10F0F529DB08D900B79491 /* updateAPP104.png in Resources */,
 				6C00A926242D923A00CE9ADB /* Language.plist in Resources */,
 				6C4AFAEA299E870400508EA7 /* AFiatWithdrawalsListCell.xib in Resources */,
+				6CCAA19D2AED5C46000510FB /* DealProCell.xib in Resources */,
 				6CC37FC3298971030079FA5C /* DealHintListCell.xib in Resources */,
 				6C031B202962C4DA0043BECF /* RealNameFileCell.xib in Resources */,
 				6CBB62BC2AD427F00045A4C9 /* MarketListCell.xib in Resources */,
@@ -4185,6 +4235,7 @@
 				6CBDC922297AE4BE003E068F /* CTKLineChartsCell.xib in Resources */,
 				6C6B7DAC296B19D400067FA3 /* BaseListCurrencyHeaderView.xib in Resources */,
 				6CC37FBA298957350079FA5C /* DealHintViewController.xib in Resources */,
+				6CCAA1A92AEE918C000510FB /* DealSelectSymbolCell.xib in Resources */,
 				6C00A87E242D8FEA00CE9ADB /* Main.storyboard in Resources */,
 				6C10F0CE29DB08D900B79491 /* updateAPP008.png in Resources */,
 				6C10F0DE29DB08D900B79491 /* updateAPP054.png in Resources */,
@@ -4201,6 +4252,7 @@
 				6C86530429ACF3E400A2E7FB /* TDStatisticsRecordListCell.xib in Resources */,
 				6C66AB922AE54DDB005C471D /* HomeIndexCell.xib in Resources */,
 				6C10F0F629DB08D900B79491 /* updateAPP058.png in Resources */,
+				6CCAA18C2AEA5573000510FB /* DealSimDataCell.xib in Resources */,
 				6CA71324295807B10047F450 /* BaseInputView.xib in Resources */,
 				6C10F0FB29DB08D900B79491 /* updateAPP112.png in Resources */,
 				6C10F0CD29DB08D900B79491 /* updateAPP020.png in Resources */,
@@ -4357,7 +4409,7 @@
 				6C86531929B4E0E500A2E7FB /* TalentReportViewController.swift in Sources */,
 				6CD200BB29E8447C00F0966D /* AWalletRecordListCell.swift in Sources */,
 				04282A3E2ADD067400CB4260 /* JDRegisterCell.swift in Sources */,
-				6CC37FAD2988EEA70079FA5C /* DealHeaderView.swift in Sources */,
+				6CC37FAD2988EEA70079FA5C /* DealSectionView.swift in Sources */,
 				6CC37FB9298957350079FA5C /* DealHintViewController.swift in Sources */,
 				04CEE2752AB5786100FAA760 /* MarketNoticeModel.swift in Sources */,
 				6CC37FE6298FB0670079FA5C /* AssetsProxyViewModel.swift in Sources */,
@@ -4381,6 +4433,7 @@
 				6C4AFB0029A0FF9B00508EA7 /* HoldView.swift in Sources */,
 				6C2FFCBA29618239005B8180 /* FreezeAccountViewController.swift in Sources */,
 				6CBB62D92AD828440045A4C9 /* MDProfileView.swift in Sources */,
+				6CCAA1862AE95488000510FB /* DealTopView.swift in Sources */,
 				6CBB633A2ADD7BD70045A4C9 /* MSHListCell.swift in Sources */,
 				6C00A9A324346C4600CE9ADB /* KWebsocket.swift in Sources */,
 				6C10F11A29E1C02700B79491 /* AFinanceRedemptionViewController.swift in Sources */,
@@ -4441,6 +4494,7 @@
 				6C4AFB5029AA1F1100508EA7 /* MyCopyingViewController.swift in Sources */,
 				6C4AFB0629A0FFE900508EA7 /* PositionHistoryView.swift in Sources */,
 				6C7F44682955680600DC6771 /* HomeView.swift in Sources */,
+				6CCAA1A42AEE5614000510FB /* DealSelectSymbolViewController.swift in Sources */,
 				6C4AFB2729A2722300508EA7 /* AssetsHistoryView.swift in Sources */,
 				6C00A90D242D918D00CE9ADB /* ColorOrImage.swift in Sources */,
 				6CBDC919297AE49A003E068F /* KLineInfoView.swift in Sources */,
@@ -4466,6 +4520,7 @@
 				6C35369129815FD7003BB632 /* DealViewModel.swift in Sources */,
 				6CBB63462ADEC1D40045A4C9 /* MDPIndustryCell.swift in Sources */,
 				6CDC5B0B29CFE63E00E60730 /* FiatDepositsRecordCell.swift in Sources */,
+				6CCAA19C2AED5C46000510FB /* DealProCell.swift in Sources */,
 				6C66AB832AE3F15F005C471D /* MDOptionsOrderCell.swift in Sources */,
 				6CC37FF6299210870079FA5C /* AssetsSavingsCell.swift in Sources */,
 				6C86530A29B4767000A2E7FB /* TDOrderHeaderView.swift in Sources */,
@@ -4689,6 +4744,7 @@
 				04D38E632A9EE8A10047EF9C /* JXSegmentedIndicatorDotLineView.swift in Sources */,
 				04282A3A2ADCE7A000CB4260 /* JDPasswordInputView.swift in Sources */,
 				6CC37FC6298EB2650079FA5C /* DealListCell.swift in Sources */,
+				6CCAA18B2AEA5573000510FB /* DealSimDataCell.swift in Sources */,
 				6C00A9572432F43600CE9ADB /* LBXScanLineAnimation.swift in Sources */,
 				6CA7131529572CBC0047F450 /* LoginViewController.swift in Sources */,
 				6C00A915242D918D00CE9ADB /* PublicMethod.swift in Sources */,
@@ -4794,6 +4850,7 @@
 				04D38E5E2A9EE8A10047EF9C /* JXSegmentedBaseDataSource.swift in Sources */,
 				6C66AB7F2AE3ED85005C471D /* MDOptionsTimerCell.swift in Sources */,
 				6C031B1F2962C4DA0043BECF /* RealNameFileCell.swift in Sources */,
+				6CCAA19F2AEE1B3D000510FB /* AccountSelectPopView.swift in Sources */,
 				04282A3C2ADD049700CB4260 /* JDRegisterView.swift in Sources */,
 				6CD200B629E7099800F0966D /* ASavingsDetailsScreenPopView.swift in Sources */,
 				6C2FFC9C296079E6005B8180 /* TradingPasswordsViewController.swift in Sources */,
@@ -4871,8 +4928,11 @@
 				6CBB62B82AD2F6540045A4C9 /* JDChartLineView.swift in Sources */,
 				6C00A8F6242D918D00CE9ADB /* ESTabBarItemContentView.swift in Sources */,
 				6C86531D29BB706900A2E7FB /* AssetsFinanceListCell.swift in Sources */,
+				6CCAA1A82AEE918C000510FB /* DealSelectSymbolCell.swift in Sources */,
 				6C4AFB4D29A9253E00508EA7 /* DealTalentCell.swift in Sources */,
 				6C0C49A3295F2860000BFEEB /* BindAccountView.swift in Sources */,
+				6CCAA18F2AEBE5A1000510FB /* DealSimCell.swift in Sources */,
+				6CCAA1972AED50C5000510FB /* DealProDataCell.swift in Sources */,
 				6C00A98C2433313300CE9ADB /* HXImagePreviewViewController.swift in Sources */,
 				04D38E732A9EE8A10047EF9C /* JXSegmentedTitleImageCell.swift in Sources */,
 				6CD5EB6F29D863580053325F /* GuideViewController.swift in Sources */,

+ 1 - 0
Koala/Koala/FX/Classification/UIView+CategoryClass.swift

@@ -7,6 +7,7 @@
 //
 
 import UIKit
+var completeBlock: (()->())?
 extension UIView {
     func setRoundCorners(corners:UIRectCorner, with radii:CGFloat) {
         let bezierpath:UIBezierPath = UIBezierPath.init(roundedRect: (self.bounds), byRoundingCorners: corners, cornerRadii: CGSize(width: radii, height: radii))

+ 19 - 0
Koala/Koala/FX/OpretationalDataClass/OperationalUserInfoData.swift

@@ -108,6 +108,25 @@ public class OperationalUserInfoData
         return AccountInfoModel()
     }
     
+    class func getAccountName(model:AccountInfoModel)-> (String,UIImage,String){
+        if model.server == "HK"{
+            return (switchLanguage("港股通"),_image("account_HK&account_HK"),"HKD")
+        }
+        else if model.server == "US"{
+            return (switchLanguage("美股通"),_image("account_US&account_US"),"USD")
+        }
+        else if model.server == "SH"{
+            return (switchLanguage("A股通沪市"),_image("account_CN&account_CN"),"CNY")
+        }
+        else if model.server == "SZ"{
+            return (switchLanguage("A股通深市"),_image("account_CN&account_CN"),"CNY")
+        }
+        else if model.server == "CFD"{
+            return (switchLanguage("综合账户"),_image("account_CFD&account_CFD"),"USD")
+        }
+        return ("",UIImage(),"")
+    }
+    
     
     class func getAccountList()-> [AccountInfoModel]{
         guard self.getLogin() else {

+ 2 - 0
Koala/Koala/Modular/Deal/M/DealModel.swift

@@ -100,6 +100,8 @@ class AccountInfoModel:BaseModel{
     public var enable_change_pass: String! = ""
     public var regdate: String! = ""
     public var credit: String! = ""
+    public var server: String! = ""
+    
 }
 
 class CloseOrderListModel:BaseModel{

+ 260 - 0
Koala/Koala/Modular/Deal/V/Deal/AccountSelectPopView.swift

@@ -0,0 +1,260 @@
+//
+//  AccountSelectPopView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/29.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class AccountSelectPopView: BaseAlertView {
+    @IBOutlet weak var bgView: UIView!
+    @IBOutlet weak var tableView: UITableView!
+    @IBOutlet weak var tableViewHeightConstraint: NSLayoutConstraint!
+  
+    var popupView: UIView!
+    var completeBlock: ((_ index:NSInteger)->())?
+    
+    var select:Int = -1
+    var sourceArray:[AccountInfoModel] = [AccountInfoModel]()
+    
+    func loadFromNib() -> UIView {
+        return Bundle.main.loadNibNamed("AccountSelectPopView", owner: self, options: nil)?.first as! UIView
+    }
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        popupView = loadFromNib()
+        addSubview(popupView)
+        popupView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+        
+       
+        let tapGes = UITapGestureRecognizer.init(target: self, action: #selector(actionForTapGes))
+        tapGes.delegate = self
+        self.addGestureRecognizer(tapGes)
+       
+        self.tableView.delegate = self
+        self.tableView.dataSource = self
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = .clear
+        tableView.tableFooterView = UIView()
+        tableView.tableHeaderView = UIView()
+        tableView.showsVerticalScrollIndicator = false
+        tableView.showsVerticalScrollIndicator = false
+        tableView.base_registerCell(cellClass: AccountPopCell.self)
+     
+        
+        mySwitchSkin()
+        mySwitchLanguage()
+    }
+    
+    
+    required init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+    }
+    
+    override func mySwitchLanguage() {
+        
+    }
+    
+    override func mySwitchSkin() {
+        
+        bgView.backgroundColor = Popup_Back_Color
+       
+    }
+    
+    override func dismissAlert() -> Void {
+        super.dismissAlert()
+        UIView.animate(withDuration: 0.3, animations: {
+            self.frame = CGRect(x: 0, y: SCREEN_HEIGHT, width: SCREEN_WIDTH, height: SCREEN_HEIGHT)
+        }) { (complete) in
+            self.bgView.removeFromSuperview()
+            if self.superview != nil {
+                self.removeFromSuperview()
+            }
+        }
+        
+    }
+   
+
+}
+extension AccountSelectPopView {
+    func showPopupView(source:[AccountInfoModel], complete:@escaping (_ index: NSInteger)->()) -> Void {
+     
+        completeBlock = complete
+        self.sourceArray = source
+     
+        if CGFloat(source.count * 70) > SCREEN_HEIGHT - TabBarHeight{
+            self.tableViewHeightConstraint.constant = SCREEN_HEIGHT - TabBarHeight
+        }else{
+            self.tableViewHeightConstraint.constant = CGFloat(source.count * 70)
+        }
+      
+        
+        self.backgroundColor = Popup_Bg_Back_Color
+        
+        let app = UIApplication.shared.delegate as? AppDelegate
+        let window = app?.window
+        window?.addSubview(self)
+        
+        self.frame = CGRect(x: 0, y: SCREEN_HEIGHT, width: SCREEN_WIDTH, height: SCREEN_HEIGHT)
+       
+        UIView.animate(withDuration: 0.3) {
+            self.frame = CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: SCREEN_HEIGHT)
+        }
+    }
+    
+}
+
+extension AccountSelectPopView: UIGestureRecognizerDelegate {
+    func gestureRecognizer(_ gestureRecognizer: UIGestureRecognizer, shouldReceive touch: UITouch) -> Bool {
+        if touch.view?.superview != self{
+            return false
+        }else{
+            return true
+        }
+    }
+    
+    @objc func actionForTapGes() {
+        self.dismissAlert()
+        completeBlock?(-1)
+    }
+    
+}
+
+
+extension AccountSelectPopView:UITableViewDelegate,UITableViewDataSource{
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return self.sourceArray.count
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        
+        let cell:AccountPopCell = tableView.base_dequeueReusableCell(indexPath: indexPath) as AccountPopCell
+        let model = sourceArray[indexPath.row]
+        cell.updateCellWith(model: model)
+        if self.select == indexPath.row {
+            cell.bgView.backgroundColor = ViewBorderColor
+        }else{
+            cell.bgView.backgroundColor = ALLBackGroundColor
+        }
+        
+       return cell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return 70
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        completeBlock?(indexPath.row)
+        dismissAlert()
+    }
+
+}
+
+class AccountPopCell: BaseTableViewCell {
+
+    lazy var imgView:UIImageView = {
+        let view:UIImageView = UIImageView()
+        view.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 10)
+        return view
+    }()
+    
+    lazy var titleLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSM, 14)
+        lab.textColor = TitleTextColor
+        lab.numberOfLines = 0
+        return lab
+    }()
+    
+    lazy var valueLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSM, 12)
+        lab.textColor = TitleTextColor
+        lab.numberOfLines = 0
+        return lab
+    }()
+    
+    
+  
+    
+    lazy var bgView:UIView = {
+        let view:UIView = UIView()
+        view.backgroundColor = ALLBackGroundColor
+        view.addSubview(imgView)
+        view.addSubview(titleLab)
+        view.addSubview(valueLab)
+        view.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        
+        imgView.snp.makeConstraints { (make) in
+            make.left.equalTo(10)
+            make.centerY.equalToSuperview().dividedBy(1.30)
+        }
+        
+        titleLab.snp.makeConstraints { (make) in
+            make.top.equalToSuperview()
+            make.left.equalTo(imgView.snp.right).offset(5)
+            make.centerY.equalTo(imgView)
+        }
+        valueLab.snp.makeConstraints { make in
+            make.left.equalTo(10)
+            make.centerY.equalToSuperview().dividedBy(0.70)
+        }
+        
+        return view
+    }()
+
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        self.backgroundColor = .clear
+        self.contentView.backgroundColor = .clear
+        self.contentView.addSubview(bgView)
+       
+    }
+  
+    override func layoutSubviews() {
+        super.layoutSubviews()
+       
+        bgView.snp.makeConstraints { (make) in
+            make.top.bottom.equalToSuperview()
+            make.right.equalTo(-20)
+            make.left.equalTo(20)
+        }
+   
+    }
+    
+    required convenience init(coder: NSCoder? = nil, style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        fatalError("init(coder:style:reuseIdentifier:) has not been implemented")
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    func updateCellWith(model:AccountInfoModel) -> Void {
+        
+        self.imgView.image = OperationalUserInfoData.getAccountName(model: model).1
+        self.titleLab.text = OperationalUserInfoData.getAccountName(model: model).0
+        
+        self.valueLab.text = String(format: "%@: %@",switchLanguage("现金"),model.margin_free)
+    }
+    
+}
+
+

+ 64 - 0
Koala/Koala/Modular/Deal/V/Deal/AccountSelectPopView.xib

@@ -0,0 +1,64 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="AccountSelectPopView" customModule="Koala" customModuleProvider="target">
+            <connections>
+                <outlet property="bgView" destination="t0X-Ky-Zjx" id="qn4-Oa-0LP"/>
+                <outlet property="tableView" destination="x68-kG-8mB" id="eEe-e4-5Va"/>
+                <outlet property="tableViewHeightConstraint" destination="bsf-Kg-4vu" id="YXa-AS-OCX"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="393" height="852"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="t0X-Ky-Zjx">
+                    <rect key="frame" x="0.0" y="698" width="393" height="154"/>
+                    <subviews>
+                        <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="fwe-EY-H08">
+                            <rect key="frame" x="0.0" y="20" width="393" height="100"/>
+                            <subviews>
+                                <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="x68-kG-8mB">
+                                    <rect key="frame" x="0.0" y="0.0" width="393" height="100"/>
+                                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="100" id="bsf-Kg-4vu"/>
+                                    </constraints>
+                                </tableView>
+                            </subviews>
+                        </stackView>
+                    </subviews>
+                    <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                    <constraints>
+                        <constraint firstItem="fwe-EY-H08" firstAttribute="top" secondItem="t0X-Ky-Zjx" secondAttribute="top" constant="20" id="KKi-ej-p1S"/>
+                        <constraint firstItem="fwe-EY-H08" firstAttribute="leading" secondItem="t0X-Ky-Zjx" secondAttribute="leading" id="YET-cv-jLo"/>
+                        <constraint firstAttribute="trailing" secondItem="fwe-EY-H08" secondAttribute="trailing" id="luk-Df-b0t"/>
+                    </constraints>
+                </view>
+            </subviews>
+            <viewLayoutGuide key="safeArea" id="cmu-zZ-z3S"/>
+            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+            <constraints>
+                <constraint firstItem="fwe-EY-H08" firstAttribute="bottom" secondItem="cmu-zZ-z3S" secondAttribute="bottom" id="BrC-Cl-Mqa"/>
+                <constraint firstAttribute="bottom" secondItem="t0X-Ky-Zjx" secondAttribute="bottom" id="C7m-9x-WFy"/>
+                <constraint firstItem="t0X-Ky-Zjx" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="LKq-13-5iU"/>
+                <constraint firstAttribute="trailing" secondItem="t0X-Ky-Zjx" secondAttribute="trailing" id="iNj-Sb-Ptx"/>
+            </constraints>
+            <point key="canvasLocation" x="-28.244274809160306" y="19.718309859154932"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 0 - 101
Koala/Koala/Modular/Deal/V/Deal/DealHeaderView.xib

@@ -1,101 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
-    <device id="retina6_0" orientation="portrait" appearance="light"/>
-    <dependencies>
-        <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
-        <capability name="System colors in document resources" minToolsVersion="11.0"/>
-        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
-    </dependencies>
-    <objects>
-        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DealHeaderView" customModule="Koala" customModuleProvider="target">
-            <connections>
-                <outlet property="bottomBgView" destination="hTL-AC-h2q" id="tBh-3X-uNo"/>
-                <outlet property="center1Lab" destination="8kN-H1-4gR" id="dM0-mW-EcV"/>
-                <outlet property="center2Lab" destination="hra-Af-KB4" id="5Es-qg-6AX"/>
-                <outlet property="leftLab" destination="Ibg-MH-0n2" id="ZFM-OM-lcg"/>
-                <outlet property="rightLab" destination="AWZ-nl-cjm" id="NNn-Mg-Uj8"/>
-                <outlet property="topBgView" destination="UxZ-QY-EJg" id="kOY-mY-Gor"/>
-            </connections>
-        </placeholder>
-        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <view contentMode="scaleToFill" id="iN0-l3-epB">
-            <rect key="frame" x="0.0" y="0.0" width="390" height="213"/>
-            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
-            <subviews>
-                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Mhq-bD-p01">
-                    <rect key="frame" x="0.0" y="0.0" width="390" height="213"/>
-                    <subviews>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UxZ-QY-EJg">
-                            <rect key="frame" x="0.0" y="0.0" width="390" height="106.66666666666667"/>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                        </view>
-                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hTL-AC-h2q">
-                            <rect key="frame" x="0.0" y="106.66666666666669" width="390" height="106.33333333333331"/>
-                            <subviews>
-                                <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tJe-wa-QcJ">
-                                    <rect key="frame" x="10" y="0.0" width="370" height="106.33333333333333"/>
-                                    <subviews>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Ibg-MH-0n2">
-                                            <rect key="frame" x="0.0" y="0.0" width="92.666666666666671" height="106.33333333333333"/>
-                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                            <nil key="textColor"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8kN-H1-4gR">
-                                            <rect key="frame" x="92.666666666666686" y="0.0" width="92.333333333333314" height="106.33333333333333"/>
-                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                            <nil key="textColor"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="hra-Af-KB4">
-                                            <rect key="frame" x="185" y="0.0" width="92.666666666666686" height="106.33333333333333"/>
-                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                            <nil key="textColor"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                        <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AWZ-nl-cjm">
-                                            <rect key="frame" x="277.66666666666669" y="0.0" width="92.333333333333314" height="106.33333333333333"/>
-                                            <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                            <nil key="textColor"/>
-                                            <nil key="highlightedColor"/>
-                                        </label>
-                                    </subviews>
-                                    <constraints>
-                                        <constraint firstItem="hra-Af-KB4" firstAttribute="width" secondItem="Ibg-MH-0n2" secondAttribute="width" id="Mjx-IO-cSc"/>
-                                        <constraint firstItem="8kN-H1-4gR" firstAttribute="width" secondItem="Ibg-MH-0n2" secondAttribute="width" id="Nwi-Zu-6Ml"/>
-                                        <constraint firstItem="AWZ-nl-cjm" firstAttribute="width" secondItem="Ibg-MH-0n2" secondAttribute="width" id="pwP-Te-DQx"/>
-                                    </constraints>
-                                </stackView>
-                            </subviews>
-                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-                            <constraints>
-                                <constraint firstAttribute="trailing" secondItem="tJe-wa-QcJ" secondAttribute="trailing" constant="10" id="1P8-AQ-4xB"/>
-                                <constraint firstItem="tJe-wa-QcJ" firstAttribute="leading" secondItem="hTL-AC-h2q" secondAttribute="leading" constant="10" id="68n-n8-bm2"/>
-                                <constraint firstAttribute="bottom" secondItem="tJe-wa-QcJ" secondAttribute="bottom" id="ROM-2R-zae"/>
-                                <constraint firstItem="tJe-wa-QcJ" firstAttribute="top" secondItem="hTL-AC-h2q" secondAttribute="top" id="Y73-D1-zqe"/>
-                            </constraints>
-                        </view>
-                    </subviews>
-                    <constraints>
-                        <constraint firstItem="hTL-AC-h2q" firstAttribute="height" secondItem="UxZ-QY-EJg" secondAttribute="height" id="mQz-iw-S5m"/>
-                    </constraints>
-                </stackView>
-            </subviews>
-            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
-            <constraints>
-                <constraint firstAttribute="bottom" secondItem="Mhq-bD-p01" secondAttribute="bottom" id="C6N-pc-ref"/>
-                <constraint firstAttribute="trailing" secondItem="Mhq-bD-p01" secondAttribute="trailing" id="QSw-sB-8Ce"/>
-                <constraint firstItem="Mhq-bD-p01" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="QqJ-K8-wP1"/>
-                <constraint firstItem="Mhq-bD-p01" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="u5b-nM-v4a"/>
-            </constraints>
-            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="-66" y="179"/>
-        </view>
-    </objects>
-    <resources>
-        <systemColor name="systemBackgroundColor">
-            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
-        </systemColor>
-    </resources>
-</document>

+ 146 - 49
Koala/Koala/Modular/Deal/V/Deal/DealListCell.swift

@@ -9,13 +9,20 @@
 import UIKit
 
 class DealListCell: BaseTableViewCell {
-    @IBOutlet weak var leftLab: UILabel!
+  
+    @IBOutlet weak var bgView: UIView!
+    @IBOutlet weak var typeLab: UILabel!
     
-    @IBOutlet weak var center1Lab: UILabel!
+    @IBOutlet weak var left1Lab: UILabel!
+    @IBOutlet weak var left2Lab: UILabel!
     
+    @IBOutlet weak var center1Lab: UILabel!
     @IBOutlet weak var center2Lab: UILabel!
     
-    @IBOutlet weak var rightLab: UILabel!
+    @IBOutlet weak var right1Lab: UILabel!
+    @IBOutlet weak var right2Lab: UILabel!
+    
+    @IBOutlet weak var bottomLab: UILabel!
     
     override func awakeFromNib() {
         super.awakeFromNib()
@@ -23,10 +30,20 @@ class DealListCell: BaseTableViewCell {
         
         mySwitchSkin()
         mySwitchLanguage()
-        self.leftLab.setTextFont(.PFSR, 12)
+        
+        
+        self.typeLab.setTextFont(.PFSR, 12)
+        
+        self.left1Lab.setTextFont(.PFSM, 14)
+        self.left2Lab.setTextFont(.PFSR, 14)
+        
         self.center1Lab.setTextFont(.PFSR, 12)
         self.center2Lab.setTextFont(.PFSR, 12)
-        self.rightLab.setTextFont(.PFSR, 12)
+        
+        self.right1Lab.setTextFont(.PFSR, 12)
+        self.right2Lab.setTextFont(.PFSR, 12)
+        
+        self.bottomLab.setTextFont(.PFSR, 12)
         // Initialization code
     }
 
@@ -43,92 +60,167 @@ class DealListCell: BaseTableViewCell {
     func mySwitchSkin() {
        
         self.backgroundColor = ALLBackGroundColor
-       
-        self.leftLab.textColor = TitleTextColor
-        self.center1Lab.textColor = TitleTextColor
-        self.center2Lab.textColor = TitleTextColor
-        self.rightLab.textColor = TitleTextColor
+        self.bgView.backgroundColor = ALLBackGroundColor
+        self.bgView.setViewLayerBorderColor(myColor: ViewBorderColor, borderWidth: 1, maskBounds: 8)
+        
+        self.typeLab.textColor = WhiteTextColor
         
+        self.left1Lab.textColor = TitleTextColor
+        self.left2Lab.textColor = GrayTextColor
+        
+        self.center1Lab.textColor = LightTextColor
+        self.center2Lab.textColor = LightTextColor
+        
+        self.right1Lab.textColor = LightTextColor
+        self.right2Lab.textColor = LightTextColor
+        
+        self.bottomLab.textColor = LightTextColor
+        
+    }
+    
+    func setAttributes(title:String,text:String) -> NSAttributedString {
+        let str = String(format: "%@:  %@", title,text)
+        let att = NSMutableAttributedString.init(string: str,attributes: [NSAttributedString.Key.foregroundColor: LightTextColor,NSAttributedString.Key.font:_PFSR(12)])
+        let range = (str as NSString).range(of:text)
+        att.addAttributes([NSAttributedString.Key.foregroundColor:TitleTextColor ,NSAttributedString.Key.font:_PFSR(12)], range: range)
+        
+        return att
     }
     
+    
     func updatePositionCellWith(model:PositionListModel) -> Void {
         self.mySwitchSkin()
-        self.leftLab.text = model.symbol
+        
         if model.cmd == 0 {
-            self.center1Lab.text = switchLanguage("buy")
-            self.center1Lab.textColor = AllGreenColor
+            self.typeLab.text = switchLanguage("买\n多")
+            self.typeLab.backgroundColor = exchangeColorAndImage(increase: 1).0
+    
         }else{
-            self.center1Lab.text = switchLanguage("sell")
-            self.center1Lab.textColor = AllRedColor
+            self.typeLab.text = switchLanguage("卖\n空")
+            self.typeLab.backgroundColor = exchangeColorAndImage(increase: -1).0
         }
-        self.center2Lab.text = precisionString(with:model.volume, precision: "2")
+    
+        self.left1Lab.text = model.SymbolModel.title
+        self.left2Lab.text = model.symbol
+        
+        self.center1Lab.attributedText = self.setAttributes(title: switchLanguage("单位"), text: "1.00")
+        
+        self.center2Lab.attributedText = self.setAttributes(title: switchLanguage("现价"), text: precisionString(with: model.close_price, precision: "3"))
+        
+        self.right1Lab.attributedText = self.setAttributes(title: switchLanguage("数量"), text: precisionString(with: model.volume, precision: "2"))
+        
+        self.right2Lab.attributedText = self.setAttributes(title: switchLanguage("成本"), text: precisionString(with: model.open_price, precision: "2"))
+        
+       
         
         self.updatePositionProfit(model: model)
         
     }
     
+    
 
     
     func updateEntrustCellWith(model:EntrustListModel) -> Void {
         self.mySwitchSkin()
-        self.leftLab.text = model.symbol
+        var color = exchangeColorAndImage(increase: -1).0
+        if model.cmd == 2 || model.cmd == 4{
+            color = exchangeColorAndImage(increase: 1).0
+        }
         if  model.cmd == 2{
-            self.center1Lab.text = "buy limit"
-            self.center1Lab.textColor = AllGreenColor
+            self.typeLab.text = switchLanguage("买\n多\n委\n托")
+            self.typeLab.backgroundColor = color
+            self.right2Lab.attributedText = self.setAttributes(title: switchLanguage("方向"), text:switchLanguage("低价买入"))
         }
         else if  model.cmd == 3{
-            self.center1Lab.text = "sell limit"
-            self.center1Lab.textColor = AllRedColor
+            self.typeLab.text = switchLanguage("卖\n空\n委\n托")
+            self.typeLab.backgroundColor = color
+            self.right2Lab.attributedText = self.setAttributes(title: switchLanguage("方向"), text:switchLanguage("低价卖出"))
         }
         else if  model.cmd == 4{
-            self.center1Lab.text = "buy stop"
-            self.center1Lab.textColor = AllGreenColor
+            self.typeLab.text = switchLanguage("买\n多\n委\n托")
+            self.typeLab.backgroundColor = color
+            self.right2Lab.attributedText = self.setAttributes(title: switchLanguage("方向"), text:switchLanguage("高价买入"))
         }
         else if  model.cmd == 5{
-            self.center1Lab.text = "sell stop"
-            self.center1Lab.textColor = AllRedColor
+            self.typeLab.text = switchLanguage("卖\n空\n委\n托")
+            self.typeLab.backgroundColor = color
+            self.right2Lab.attributedText = self.setAttributes(title: switchLanguage("方向"), text:switchLanguage("高价卖出"))
         }
+
+        self.left1Lab.text = model.SymbolModel.title
+        self.left2Lab.text = model.symbol
+        
+        self.center1Lab.attributedText = self.setAttributes(title: switchLanguage("单位"), text: "1.00")
+        
+        self.center2Lab.attributedText = self.setAttributes(title:"", text: "")
+        
+        self.right1Lab.attributedText = self.setAttributes(title: switchLanguage("数量"), text: precisionString(with: model.volume, precision: "2"))
+        
+       
+       let price = precisionString(with: model.open_price, precision: "3")
+        let str = String(format: "%@:  %@",switchLanguage("价格"),price)
+        let att = NSMutableAttributedString.init(string: str,attributes: [NSAttributedString.Key.foregroundColor: LightTextColor,NSAttributedString.Key.font:_PFSR(12)])
+        let range = (str as NSString).range(of:price)
+        att.addAttributes([NSAttributedString.Key.foregroundColor:color ,NSAttributedString.Key.font:_PFSR(14)], range: range)
         
-        self.center2Lab.text = precisionString(with:decimalNumber(A: model.volume, B: model.SymbolModel.lot_min, type: .Multiply), precision: "2")
+        self.bottomLab.attributedText = att
+       
         
-        self.rightLab.text = model.open_price
     }
     
     func updateCloseOrderCellWith(model:CloseOrderListModel) -> Void {
         self.mySwitchSkin()
-        self.leftLab.text = model.symbol
+        var color = exchangeColorAndImage(increase: -1).0
+        if model.cmd == 0 || model.cmd == 2 || model.cmd == 4{
+            color = exchangeColorAndImage(increase: 1).0
+        }
         if model.cmd == 0 {
-            self.center1Lab.text = switchLanguage("buy")
-            self.center1Lab.textColor = AllGreenColor
+            self.typeLab.text = switchLanguage("买\n多")
+            self.typeLab.backgroundColor = color
         }else if model.cmd == 1{
-            self.center1Lab.text = switchLanguage("sell")
-            self.center1Lab.textColor = AllRedColor
+            self.typeLab.text = switchLanguage("买\n空")
+            self.typeLab.backgroundColor = color
         }
         else if  model.cmd == 2{
-            self.center1Lab.text = "buy limit"
-            self.center1Lab.textColor = AllGreenColor
+            self.typeLab.text = switchLanguage("买\n多\n委\n托")
+            self.typeLab.backgroundColor = color
         }
         else if  model.cmd == 3{
-            self.center1Lab.text = "sell limit"
-            self.center1Lab.textColor = AllRedColor
+            self.typeLab.text = switchLanguage("卖\n空\n委\n托")
+            self.typeLab.backgroundColor = color
         }
         else if  model.cmd == 4{
-            self.center1Lab.text = "buy stop"
-            self.center1Lab.textColor = AllGreenColor
+            self.typeLab.text = switchLanguage("买\n多\n委\n托")
+            self.typeLab.backgroundColor = color
+            
         }
         else if  model.cmd == 5{
-            self.center1Lab.text = "sell stop"
-            self.center1Lab.textColor = AllRedColor
+            self.typeLab.text = switchLanguage("卖\n空\n委\n托")
+            self.typeLab.backgroundColor = color
+
         }
+
+        self.left1Lab.text = model.SymbolModel.title
+        self.left2Lab.text = model.symbol
         
-        self.center2Lab.text = precisionString(with:model.volume, precision:"2")
+        self.center1Lab.attributedText = self.setAttributes(title: switchLanguage("单位"), text: "1.00")
         
+        self.center2Lab.attributedText = self.setAttributes(title:"", text: "")
+        
+        self.right1Lab.attributedText = self.setAttributes(title: switchLanguage("开仓"), text: precisionString(with: model.open_price, precision: "2"))
+        
+        self.right2Lab.attributedText = self.setAttributes(title: switchLanguage("平仓"), text: precisionString(with: model.close_price, precision: "2"))
         
-        self.rightLab.text = precisionString(with: model.profit, precision: "2")
-    
-        self.rightLab.textColor = exchangeColorAndImage(increase:Float(model.profit) ?? 0 ).0
-       // self.updateCloseOrderProfit(model: model)
         
+        let profit = precisionString(with: model.profit, precision: "2")
+        let color1 = exchangeColorAndImage(increase: conerData(profit, .MyFloat).1!).0
+         let str = String(format: "%@:  %@",switchLanguage("盈亏"),profit)
+         let att = NSMutableAttributedString.init(string: str,attributes: [NSAttributedString.Key.foregroundColor: LightTextColor,NSAttributedString.Key.font:_PFSR(12)])
+         let range = (str as NSString).range(of:profit)
+         att.addAttributes([NSAttributedString.Key.foregroundColor:color1 ,NSAttributedString.Key.font:_PFSR(14)], range: range)
+         
+         self.bottomLab.attributedText = att
+
     }
     
     
@@ -140,7 +232,7 @@ class DealListCell: BaseTableViewCell {
         let contract_size = conerData(model.SymbolModel.contract_size, .MyDouble).2!
         let OPEN_PRICE = conerData(model.open_price as Any, .MyDouble).2!
         let VOLUME = conerData(model.volume as Any, .MyDouble).2!
-        let isUSDSu = model.SymbolModel.symbol == model.SymbolModel.currency + "USDm"//以USD结尾
+        let isUSDSu = model.SymbolModel.symbol == model.SymbolModel.currency + "USD"//以USD结尾
         let isUSD = model.SymbolModel.symbol == "USD" + model.SymbolModel.currency //以USD开头
         
         if model.SymbolModel.profit_mode == "1"{
@@ -195,9 +287,14 @@ class DealListCell: BaseTableViewCell {
             }
         }
         
-        self.rightLab.text = precisionString(with: "\(profit)", precision: "2")
-    
-        self.rightLab.textColor = exchangeColorAndImage(increase:Float(profit)).0
+        let value = precisionString(with: "\(profit)", precision: "2")
+        let color = exchangeColorAndImage(increase: conerData(value, .MyFloat).1!).0
+        let str = String(format: "%@:  %@",switchLanguage("持仓盈亏"),value)
+        let att = NSMutableAttributedString.init(string: str,attributes: [NSAttributedString.Key.foregroundColor: LightTextColor,NSAttributedString.Key.font:_PFSR(12)])
+        let range = (str as NSString).range(of:value)
+        att.addAttributes([NSAttributedString.Key.foregroundColor:color ,NSAttributedString.Key.font:_PFSR(14)], range: range)
+        
+        self.bottomLab.attributedText = att
         
         
     }

+ 124 - 40
Koala/Koala/Modular/Deal/V/Deal/DealListCell.xib

@@ -1,70 +1,154 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_0" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
-        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" id="KGk-i7-Jjw" customClass="DealListCell" customModule="Koala" customModuleProvider="target">
-            <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="170" id="KGk-i7-Jjw" customClass="DealListCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="373" height="170"/>
             <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
             <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
-                <rect key="frame" x="0.0" y="0.0" width="320" height="44"/>
+                <rect key="frame" x="0.0" y="0.0" width="373" height="170"/>
                 <autoresizingMask key="autoresizingMask"/>
                 <subviews>
-                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="1L6-sN-pXz">
-                        <rect key="frame" x="10" y="0.0" width="300" height="44"/>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="NmW-EK-Le5">
+                        <rect key="frame" x="20" y="2.6666666666666714" width="333" height="165"/>
                         <subviews>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tBW-c7-Blc">
-                                <rect key="frame" x="0.0" y="0.0" width="75" height="44"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fQm-Bw-KRL">
-                                <rect key="frame" x="75" y="0.0" width="75" height="44"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="RfZ-hC-9bR">
-                                <rect key="frame" x="150" y="0.0" width="75" height="44"/>
-                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                                <nil key="textColor"/>
-                                <nil key="highlightedColor"/>
-                            </label>
-                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="T1e-3m-KfT">
-                                <rect key="frame" x="225" y="0.0" width="75" height="44"/>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="center" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="TT9-bt-RD1">
+                                <rect key="frame" x="0.0" y="0.0" width="20" height="165"/>
+                                <constraints>
+                                    <constraint firstAttribute="width" constant="20" id="AZm-1e-lDT"/>
+                                </constraints>
                                 <fontDescription key="fontDescription" type="system" pointSize="17"/>
                                 <nil key="textColor"/>
                                 <nil key="highlightedColor"/>
                             </label>
+                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="20" translatesAutoresizingMaskIntoConstraints="NO" id="u70-hg-QB9">
+                                <rect key="frame" x="25" y="10" width="298" height="145"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zzc-FN-ZFa">
+                                        <rect key="frame" x="0.0" y="0.0" width="298" height="105"/>
+                                        <subviews>
+                                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="7S4-Gb-4kw">
+                                                <rect key="frame" x="0.0" y="0.0" width="99.333333333333329" height="105"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Zd7-qe-eSD">
+                                                        <rect key="frame" x="0.0" y="0.0" width="99.333333333333329" height="52.333333333333336"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="b10-JF-mQ8">
+                                                        <rect key="frame" x="0.0" y="52.333333333333343" width="99.333333333333329" height="52.666666666666657"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="b10-JF-mQ8" firstAttribute="height" secondItem="Zd7-qe-eSD" secondAttribute="height" id="G9f-Lh-CXZ"/>
+                                                </constraints>
+                                            </stackView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="2YX-Uw-HJ4">
+                                                <rect key="frame" x="99.333333333333343" y="0.0" width="99.333333333333343" height="105"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="4NP-SU-Wx5">
+                                                        <rect key="frame" x="0.0" y="0.0" width="99.333333333333329" height="47.333333333333336"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rua-f0-dh5">
+                                                        <rect key="frame" x="0.0" y="57.333333333333343" width="99.333333333333329" height="47.666666666666657"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="rua-f0-dh5" firstAttribute="height" secondItem="4NP-SU-Wx5" secondAttribute="height" id="bpe-hh-4R4"/>
+                                                </constraints>
+                                            </stackView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="HLO-ha-XfN">
+                                                <rect key="frame" x="198.66666666666666" y="0.0" width="99.333333333333343" height="105"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="vPv-Lt-cSK">
+                                                        <rect key="frame" x="0.0" y="0.0" width="99.333333333333329" height="47.333333333333336"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7L3-cL-vhx">
+                                                        <rect key="frame" x="0.0" y="57.333333333333343" width="99.333333333333329" height="47.666666666666657"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstItem="7L3-cL-vhx" firstAttribute="height" secondItem="vPv-Lt-cSK" secondAttribute="height" id="HwZ-e2-kzB"/>
+                                                </constraints>
+                                            </stackView>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="2YX-Uw-HJ4" firstAttribute="width" secondItem="7S4-Gb-4kw" secondAttribute="width" id="3Dr-sg-qCt"/>
+                                            <constraint firstItem="HLO-ha-XfN" firstAttribute="width" secondItem="7S4-Gb-4kw" secondAttribute="width" id="zaO-TS-ft5"/>
+                                        </constraints>
+                                    </stackView>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="gpv-v2-0GZ">
+                                        <rect key="frame" x="0.0" y="125" width="298" height="20"/>
+                                        <constraints>
+                                            <constraint firstAttribute="height" constant="20" id="Ae1-a2-JD4"/>
+                                        </constraints>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                </subviews>
+                            </stackView>
                         </subviews>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                         <constraints>
-                            <constraint firstItem="RfZ-hC-9bR" firstAttribute="width" secondItem="tBW-c7-Blc" secondAttribute="width" id="Hp8-FW-B48"/>
-                            <constraint firstItem="fQm-Bw-KRL" firstAttribute="width" secondItem="tBW-c7-Blc" secondAttribute="width" id="Kf5-ar-e2z"/>
-                            <constraint firstItem="T1e-3m-KfT" firstAttribute="width" secondItem="tBW-c7-Blc" secondAttribute="width" id="lcZ-jc-qeK"/>
+                            <constraint firstItem="TT9-bt-RD1" firstAttribute="top" secondItem="NmW-EK-Le5" secondAttribute="top" id="17h-Zq-91k"/>
+                            <constraint firstItem="u70-hg-QB9" firstAttribute="leading" secondItem="TT9-bt-RD1" secondAttribute="trailing" constant="5" id="3kp-sD-Z0a"/>
+                            <constraint firstItem="u70-hg-QB9" firstAttribute="top" secondItem="NmW-EK-Le5" secondAttribute="top" constant="10" id="4hy-GB-dgj"/>
+                            <constraint firstAttribute="bottom" secondItem="TT9-bt-RD1" secondAttribute="bottom" id="7RC-D1-nM2"/>
+                            <constraint firstItem="TT9-bt-RD1" firstAttribute="leading" secondItem="NmW-EK-Le5" secondAttribute="leading" id="LCX-tp-273"/>
+                            <constraint firstAttribute="bottom" secondItem="u70-hg-QB9" secondAttribute="bottom" constant="10" id="Xaf-gc-FFO"/>
+                            <constraint firstAttribute="trailing" secondItem="u70-hg-QB9" secondAttribute="trailing" constant="10" id="lnJ-Z5-eeR"/>
                         </constraints>
-                    </stackView>
+                    </view>
                 </subviews>
                 <constraints>
-                    <constraint firstAttribute="bottom" secondItem="1L6-sN-pXz" secondAttribute="bottom" id="eMA-0o-HLE"/>
-                    <constraint firstItem="1L6-sN-pXz" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="pdI-aq-Ddv"/>
-                    <constraint firstAttribute="trailing" secondItem="1L6-sN-pXz" secondAttribute="trailing" constant="10" id="tOV-OZ-4nK"/>
-                    <constraint firstItem="1L6-sN-pXz" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="10" id="ve7-P1-hmC"/>
+                    <constraint firstItem="NmW-EK-Le5" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="SJV-tf-Pc1"/>
+                    <constraint firstItem="NmW-EK-Le5" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="2.5" id="kCq-yv-XSQ"/>
+                    <constraint firstAttribute="trailing" secondItem="NmW-EK-Le5" secondAttribute="trailing" constant="20" id="kJ8-jN-9Bw"/>
+                    <constraint firstAttribute="bottom" secondItem="NmW-EK-Le5" secondAttribute="bottom" constant="2.5" id="tK0-hs-5Rx"/>
                 </constraints>
             </tableViewCellContentView>
             <connections>
-                <outlet property="center1Lab" destination="fQm-Bw-KRL" id="7lY-ug-Y4e"/>
-                <outlet property="center2Lab" destination="RfZ-hC-9bR" id="ndV-4R-v5M"/>
-                <outlet property="leftLab" destination="tBW-c7-Blc" id="Mqi-7f-DyW"/>
-                <outlet property="rightLab" destination="T1e-3m-KfT" id="gb3-cq-hrx"/>
+                <outlet property="bgView" destination="NmW-EK-Le5" id="Y4t-sa-tea"/>
+                <outlet property="bottomLab" destination="gpv-v2-0GZ" id="46L-UO-Xnw"/>
+                <outlet property="center1Lab" destination="4NP-SU-Wx5" id="eUT-Wy-o91"/>
+                <outlet property="center2Lab" destination="rua-f0-dh5" id="niF-ex-FfB"/>
+                <outlet property="left1Lab" destination="Zd7-qe-eSD" id="dJS-MJ-awE"/>
+                <outlet property="left2Lab" destination="b10-JF-mQ8" id="XOl-iy-WVc"/>
+                <outlet property="right1Lab" destination="vPv-Lt-cSK" id="3Pb-6j-PU1"/>
+                <outlet property="right2Lab" destination="7L3-cL-vhx" id="uE8-6E-8WE"/>
+                <outlet property="typeLab" destination="TT9-bt-RD1" id="QwK-lb-ZC6"/>
             </connections>
-            <point key="canvasLocation" x="97" y="21"/>
+            <point key="canvasLocation" x="137.69230769230768" y="65.402843601895725"/>
         </tableViewCell>
     </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
 </document>

+ 19 - 43
Koala/Koala/Modular/Deal/V/Deal/DealNavView.swift

@@ -10,22 +10,16 @@ import UIKit
 
 class DealNavView: BaseView {
 
-    @IBOutlet weak var symbolBtn: UIButton!
-    
-    @IBOutlet weak var increaseLab: UILabel!
-    
-    @IBOutlet weak var hintBtn: UIButton!
+    @IBOutlet weak var backBtn: UIButton!
     
     @IBOutlet weak var proBtn: UIButton!
     
-    @IBOutlet weak var klineBtn: UIButton!
-    
     @IBOutlet weak var menuBtn: UIButton!
     
+    @IBOutlet weak var titleLab: UILabel!
+    
     var navView: UIView!
-    var clickSymbolBlock: ((_ symbolBtn: UIButton) -> ())?
-    var clickHintBlock: ((_ hintBtn: UIButton) -> ())?
-    var clickKlineBlock: ((_ klineBtn: UIButton) -> ())?
+    var clickBackBlock: ((_ symbolBtn: UIButton) -> ())?
     var clickMenuBlock: ((_ menuBtn: UIButton) -> ())?
     var clickProBlock: ((_ proBtn: UIButton) -> ())?
     
@@ -41,15 +35,11 @@ class DealNavView: BaseView {
             make.edges.equalToSuperview()
         }
         
-        self.symbolBtn.setTextFont(.PFSM, 20)
-        self.increaseLab.setTextFont(.PFSR, 12)
+        self.titleLab.setTextFont(.PFSM, 16)
         
-        self.proBtn.setTextFont(.PFSM, 16)
+        self.proBtn.setTextFont(.PFSR, 12)
        
-       
-        self.symbolBtn.addTarget(self, action: #selector(clickSymbolAction(_:)), for: .touchUpInside)
-        self.hintBtn.addTarget(self, action: #selector(clickHintAction(_:)), for: .touchUpInside)
-        self.klineBtn.addTarget(self, action: #selector(clickKlineAction(_:)), for: .touchUpInside)
+        self.backBtn.addTarget(self, action: #selector(clickBackAction(_:)), for: .touchUpInside)
         self.menuBtn.addTarget(self, action: #selector(clickMenuAction(_:)), for: .touchUpInside)
         
         self.proBtn.addTarget(self, action: #selector(clickProBAction(_:)), for: .touchUpInside)
@@ -62,33 +52,27 @@ class DealNavView: BaseView {
     }
     
     override func mySwitchLanguage() {
-       
+        self.titleLab.text = switchLanguage("交易")
         
     }
     
     override func mySwitchSkin() {
-        navView.backgroundColor = MidBackGroundColor
-        self.symbolBtn.setTitleColor(TitleTextColor, for: .normal)
-        self.symbolBtn.setImage(_image("Deal_W_Symbol&Deal_W_Symbol"), for: .normal)
-        self.klineBtn.setImage(_image("Deal_W_Kline&Deal_W_Kline"), for: .normal)
+        navView.backgroundColor = ALLBackGroundColor
+        self.backBtn.setImage(NavViewBlackImage, for: .normal)
+        
+        self.titleLab.textColor = TitleTextColor
+        
         self.menuBtn.setImage(_image("Deal_W_Menu&Deal_W_Menu"), for: .normal)
-        self.hintBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: TitleTextColor), for: .normal)
-        self.proBtn.setTitleColor(MainBackGroundColor, for: .normal)
-    }
-    
-    func updateDataWith(model:KSymbolModel) -> Void {
-        self.symbolBtn.setTitle(model.symbol, for: .normal)
-        self.increaseLab.text = precisionString(with: model.increase, precision: "2") + "%"
-        self.increaseLab.textColor = exchangeColorAndImage(increase: conerData(model.increase as Any, .MyFloat).1!).0
-        self.symbolBtn.layoutButtonEdgeInsetStyle(type: .left, space: 2)
         
+        self.proBtn.setTitleColor(GrayTextColor, for: .normal)
     }
     
+    
     func updateProBtn(isPro:Bool) -> Void {
         if isPro {
-            self.proBtn.setTitle("Pro", for: .normal)
+            self.proBtn.setTitle(switchLanguage("简单版"), for: .normal)
         }else{
-            self.proBtn.setTitle("Sim", for: .normal)
+            self.proBtn.setTitle(switchLanguage("专业版"), for: .normal)
         }
     }
     
@@ -96,16 +80,8 @@ class DealNavView: BaseView {
 }
 
 extension DealNavView {
-    @objc func clickSymbolAction(_ sender:UIButton){
-        self.clickSymbolBlock?(sender)
-    }
-    
-    @objc func clickHintAction(_ sender:UIButton){
-        self.clickHintBlock?(sender)
-    }
-    
-    @objc func clickKlineAction(_ sender:UIButton){
-        self.clickKlineBlock?(sender)
+    @objc func clickBackAction(_ sender:UIButton){
+        self.clickBackBlock?(sender)
     }
     
     @objc func clickMenuAction(_ sender:UIButton){

+ 18 - 36
Koala/Koala/Modular/Deal/V/Deal/DealNavView.xib

@@ -1,21 +1,19 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21507" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_0" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21505"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
     <objects>
         <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DealNavView" customModule="Koala" customModuleProvider="target">
             <connections>
-                <outlet property="hintBtn" destination="ohD-zz-tAw" id="wN8-8h-SCF"/>
-                <outlet property="increaseLab" destination="qgd-Or-pmj" id="bQY-Ux-4QZ"/>
-                <outlet property="klineBtn" destination="30t-n6-wWT" id="buP-tQ-dfB"/>
+                <outlet property="backBtn" destination="UA7-yi-lhW" id="xfQ-MY-Ck9"/>
                 <outlet property="menuBtn" destination="Afh-Wt-q5G" id="Jhz-Ce-oxh"/>
                 <outlet property="proBtn" destination="bJx-Re-dCE" id="0cm-2m-vss"/>
-                <outlet property="symbolBtn" destination="UA7-yi-lhW" id="zbK-TI-961"/>
+                <outlet property="titleLab" destination="Glq-uZ-c0R" id="Pdv-k1-Mg4"/>
             </connections>
         </placeholder>
         <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
@@ -24,43 +22,23 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="UA7-yi-lhW">
-                    <rect key="frame" x="10" y="67" width="30" height="44"/>
+                    <rect key="frame" x="0.0" y="67" width="44" height="44"/>
                     <constraints>
                         <constraint firstAttribute="height" constant="44" id="P04-XW-Eou"/>
-                    </constraints>
-                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                </button>
-                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qgd-Or-pmj">
-                    <rect key="frame" x="45" y="89" width="0.0" height="0.0"/>
-                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
-                    <nil key="textColor"/>
-                    <nil key="highlightedColor"/>
-                </label>
-                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ohD-zz-tAw">
-                    <rect key="frame" x="45" y="67" width="44" height="44"/>
-                    <constraints>
-                        <constraint firstAttribute="width" secondItem="ohD-zz-tAw" secondAttribute="height" multiplier="1:1" id="CdR-pC-7qP"/>
-                        <constraint firstAttribute="height" constant="44" id="JX1-Ji-l0Z"/>
+                        <constraint firstAttribute="width" constant="44" id="u8M-ko-Hac"/>
                     </constraints>
                     <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                 </button>
                 <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="4ma-06-hZx">
-                    <rect key="frame" x="627" y="67" width="142" height="44"/>
+                    <rect key="frame" x="671" y="67" width="98" height="44"/>
                     <subviews>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="bJx-Re-dCE">
                             <rect key="frame" x="0.0" y="0.0" width="54" height="44"/>
                             <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
                             <state key="normal" title="Button"/>
                         </button>
-                        <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="30t-n6-wWT">
-                            <rect key="frame" x="54" y="0.0" width="44" height="44"/>
-                            <constraints>
-                                <constraint firstAttribute="width" secondItem="30t-n6-wWT" secondAttribute="height" multiplier="1:1" id="V8X-Db-U4p"/>
-                            </constraints>
-                            <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
-                        </button>
                         <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Afh-Wt-q5G">
-                            <rect key="frame" x="98" y="0.0" width="44" height="44"/>
+                            <rect key="frame" x="54" y="0.0" width="44" height="44"/>
                             <constraints>
                                 <constraint firstAttribute="width" secondItem="Afh-Wt-q5G" secondAttribute="height" multiplier="1:1" id="MBb-1X-86K"/>
                             </constraints>
@@ -71,20 +49,24 @@
                         <constraint firstAttribute="height" constant="44" id="Bjg-Eh-LQh"/>
                     </constraints>
                 </stackView>
+                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Glq-uZ-c0R">
+                    <rect key="frame" x="364" y="79" width="41.333333333333314" height="20.333333333333329"/>
+                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                    <nil key="textColor"/>
+                    <nil key="highlightedColor"/>
+                </label>
             </subviews>
             <color key="backgroundColor" systemColor="systemBackgroundColor"/>
             <constraints>
                 <constraint firstAttribute="bottom" secondItem="4ma-06-hZx" secondAttribute="bottom" id="3QV-Eg-Avj"/>
-                <constraint firstItem="qgd-Or-pmj" firstAttribute="centerY" secondItem="UA7-yi-lhW" secondAttribute="centerY" id="84q-vB-R34"/>
-                <constraint firstItem="UA7-yi-lhW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" constant="10" id="Do5-5s-rX8"/>
-                <constraint firstItem="ohD-zz-tAw" firstAttribute="leading" secondItem="qgd-Or-pmj" secondAttribute="trailing" id="Gav-7w-rdp"/>
-                <constraint firstAttribute="bottom" secondItem="ohD-zz-tAw" secondAttribute="bottom" id="cNv-oj-hQI"/>
+                <constraint firstItem="Glq-uZ-c0R" firstAttribute="centerY" secondItem="UA7-yi-lhW" secondAttribute="centerY" id="C4G-48-dWN"/>
+                <constraint firstItem="UA7-yi-lhW" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Do5-5s-rX8"/>
                 <constraint firstAttribute="trailing" secondItem="4ma-06-hZx" secondAttribute="trailing" id="nD3-al-K09"/>
                 <constraint firstAttribute="bottom" secondItem="UA7-yi-lhW" secondAttribute="bottom" id="q2h-Uk-r1C"/>
-                <constraint firstItem="qgd-Or-pmj" firstAttribute="leading" secondItem="UA7-yi-lhW" secondAttribute="trailing" constant="5" id="tgE-rY-ODa"/>
+                <constraint firstItem="Glq-uZ-c0R" firstAttribute="centerX" secondItem="iN0-l3-epB" secondAttribute="centerX" id="qZO-oO-z0w"/>
             </constraints>
             <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
-            <point key="canvasLocation" x="388.46153846153845" y="246.32701421800948"/>
+            <point key="canvasLocation" x="35" y="242"/>
         </view>
     </objects>
     <resources>

+ 529 - 0
Koala/Koala/Modular/Deal/V/Deal/DealProCell.swift

@@ -0,0 +1,529 @@
+//
+//  DealProCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/28.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class DealProCell: BaseTableViewCell {
+
+
+    
+    @IBOutlet weak var bg1View: UIView!
+    @IBOutlet weak var typeTitleBtn: UIButton!
+    @IBOutlet weak var typeSelectView: UIView!
+    @IBOutlet weak var typeLab: UILabel!
+    @IBOutlet weak var typeImgView: UIImageView!
+    
+    @IBOutlet weak var bg2View: UIView!
+    @IBOutlet weak var priceTitleBtn: UIButton!
+    @IBOutlet weak var priceText: UITextField!
+    @IBOutlet weak var priceAddBtn: UIButton!
+    @IBOutlet weak var priceSubBtn: UIButton!
+    
+    @IBOutlet weak var bg3View: UIView!
+    @IBOutlet weak var unitTitleBtn: UIButton!
+    @IBOutlet weak var unitText: UITextField!
+    @IBOutlet weak var unitSubBtn: UIButton!
+    @IBOutlet weak var unitAddBtn: UIButton!
+    
+    @IBOutlet weak var bg4View: UIView!
+    @IBOutlet weak var numTitleLab: UILabel!
+    @IBOutlet weak var multipleTitleLab: UILabel!
+    @IBOutlet weak var numLab: UILabel!
+    @IBOutlet weak var multipleLab: UILabel!
+    @IBOutlet weak var amountTitleLab: UILabel!
+    @IBOutlet weak var buyTitleLab: UILabel!
+    @IBOutlet weak var amountLab: UILabel!
+    @IBOutlet weak var buyLab: UILabel!
+    
+    @IBOutlet weak var bg5View: UIView!
+    @IBOutlet weak var slTitleBtn: UIButton!
+    @IBOutlet weak var slText: UITextField!
+    @IBOutlet weak var slSubBtn: UIButton!
+    @IBOutlet weak var slAddBtn: UIButton!
+    
+    @IBOutlet weak var bg6View: UIView!
+    @IBOutlet weak var tpTitleBtn: UIButton!
+    @IBOutlet weak var tpText: UITextField!
+    @IBOutlet weak var tpSubBtn: UIButton!
+    @IBOutlet weak var tpAddBtn: UIButton!
+    
+    @IBOutlet weak var bg7View: UIView!
+    @IBOutlet weak var limitTitleBtn: UIButton!
+    @IBOutlet weak var limitSelectView: UIView!
+    @IBOutlet weak var limitLab: UILabel!
+    @IBOutlet weak var limitImgView: UIImageView!
+    
+    @IBOutlet weak var bg8View: UIView!
+    @IBOutlet weak var buyBtn: UIButton!
+    @IBOutlet weak var sellBtn: UIButton!
+    
+    var VM:DealViewModel = DealViewModel()
+    
+    var refreshBlock: (() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ViewBorderColor
+        
+        self.bg1View.backgroundColor = ALLBackGroundColor
+        self.bg2View.backgroundColor = ALLBackGroundColor
+        self.bg3View.backgroundColor = ALLBackGroundColor
+        self.bg4View.backgroundColor = ALLBackGroundColor
+        self.bg5View.backgroundColor = ALLBackGroundColor
+        self.bg6View.backgroundColor = ALLBackGroundColor
+        self.bg7View.backgroundColor = ALLBackGroundColor
+        self.bg8View.backgroundColor = ALLBackGroundColor
+        
+        
+        self.typeTitleBtn.setTextFont(.PFSR, 13)
+        self.typeTitleBtn.setTitle(switchLanguage("类型"), for: .normal)
+        self.typeTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.typeTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.typeTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.typeLab.textColor = TitleTextColor
+        self.typeLab.setTextFont(.PFSR, 14)
+        
+        self.typeImgView.image = _image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color: LightTextColor)
+        
+        self.priceTitleBtn.setTextFont(.PFSR, 13)
+        self.priceTitleBtn.setTitle(switchLanguage("价格"), for: .normal)
+        self.priceTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+      
+        self.priceText.textColor = TitleTextColor
+        self.priceText.setTextFont(.PFSR, 14)
+        self.priceText.delegate = self
+        self.priceText.addTarget(self, action:  #selector(inputChange(_:)), for: .editingChanged)
+        
+        self.priceSubBtn.setTitle("-", for: .normal)
+        self.priceSubBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.priceSubBtn.setTextFont(.PFSM, 20)
+        
+        self.priceAddBtn.setTitle("+", for: .normal)
+        self.priceAddBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.priceAddBtn.setTextFont(.PFSM, 20)
+        
+        self.unitTitleBtn.setTextFont(.PFSR, 13)
+        self.unitTitleBtn.setTitle(switchLanguage("单位"), for: .normal)
+        self.unitTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.unitTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.unitTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.unitText.textColor = TitleTextColor
+        self.unitText.setTextFont(.PFSR, 14)
+        self.unitText.delegate = self
+        self.unitText.addTarget(self, action:  #selector(inputChange(_:)), for: .editingChanged)
+        
+        self.unitSubBtn.setTitle("-", for: .normal)
+        self.unitSubBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.unitSubBtn.setTextFont(.PFSM, 20)
+        
+        self.unitAddBtn.setTitle("+", for: .normal)
+        self.unitAddBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.unitAddBtn.setTextFont(.PFSM, 20)
+        
+        self.numTitleLab.text = switchLanguage("数量")
+        self.numTitleLab.setTextFont(.PFSR, 12)
+        self.numTitleLab.textColor = GrayTextColor
+        
+        self.numLab.text  = "0"
+        self.numLab.setTextFont(.PFSR, 12)
+        self.numLab.textColor = TitleTextColor
+        
+        
+        self.amountTitleLab.text = switchLanguage("金额")
+        self.amountTitleLab.setTextFont(.PFSR, 12)
+        self.amountTitleLab.textColor = GrayTextColor
+        
+        self.amountLab.text  = "0"
+        self.amountLab.setTextFont(.PFSR, 12)
+        self.amountLab.textColor = TitleTextColor
+        
+        self.multipleTitleLab.text = switchLanguage("最大倍数")
+        self.multipleTitleLab.setTextFont(.PFSR, 12)
+        self.multipleTitleLab.textColor = GrayTextColor
+        
+        self.multipleLab.text  = "0"
+        self.multipleLab.setTextFont(.PFSR, 12)
+        self.multipleLab.textColor = TitleTextColor
+        
+        self.buyTitleLab.text = switchLanguage("最大可买")
+        self.buyTitleLab.setTextFont(.PFSR, 12)
+        self.buyTitleLab.textColor = GrayTextColor
+        
+        self.buyLab.text  = "0"
+        self.buyLab.setTextFont(.PFSR, 12)
+        self.buyLab.textColor = TitleTextColor
+        
+        self.slTitleBtn.setTextFont(.PFSR, 13)
+        self.slTitleBtn.setTitle(switchLanguage("止损"), for: .normal)
+        self.slTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.slTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.slTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.slText.textColor = TitleTextColor
+        self.slText.setTextFont(.PFSR, 14)
+        self.slText.delegate = self
+        self.slText.addTarget(self, action:  #selector(inputChange(_:)), for: .editingChanged)
+        
+        
+        self.slSubBtn.setTitle("-", for: .normal)
+        self.slSubBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.slSubBtn.setTextFont(.PFSM, 20)
+        
+        self.slAddBtn.setTitle("+", for: .normal)
+        self.slAddBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.slAddBtn.setTextFont(.PFSM, 20)
+        
+        self.tpTitleBtn.setTextFont(.PFSR, 13)
+        self.tpTitleBtn.setTitle(switchLanguage("止盈"), for: .normal)
+        self.tpTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.tpTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.tpTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.tpText.textColor = TitleTextColor
+        self.tpText.setTextFont(.PFSR, 14)
+        self.tpText.delegate = self
+        self.tpText.addTarget(self, action:  #selector(inputChange(_:)), for: .editingChanged)
+        
+        self.tpSubBtn.setTitle("-", for: .normal)
+        self.tpSubBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.tpSubBtn.setTextFont(.PFSM, 20)
+        
+        self.tpAddBtn.setTitle("+", for: .normal)
+        self.tpAddBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.tpAddBtn.setTextFont(.PFSM, 20)
+        
+        
+        
+        self.limitTitleBtn.setTextFont(.PFSR, 13)
+        self.limitTitleBtn.setTitle(switchLanguage("期限"), for: .normal)
+        self.limitTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.limitTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.limitTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.limitLab.textColor = TitleTextColor
+        self.limitLab.setTextFont(.PFSR, 14)
+        
+        self.limitImgView.image = _image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color:LightTextColor)
+        
+        self.buyBtn.setTitle(switchLanguage("买入"), for: .normal)
+        self.buyBtn.setTextFont(.PFSR, 14)
+        self.buyBtn.setTitleColor(WhiteTextColor, for: .normal)
+        self.buyBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 20)
+        self.buyBtn.backgroundColor = exchangeColorAndImage(increase:1).0
+        
+        self.sellBtn.setTitle(switchLanguage("卖出"), for: .normal)
+        self.sellBtn.setTextFont(.PFSR, 14)
+        self.sellBtn.setTitleColor(WhiteTextColor, for: .normal)
+        self.sellBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 20)
+        self.sellBtn.backgroundColor = exchangeColorAndImage(increase:-1).0
+        
+        
+        
+        let tap1 = UITapGestureRecognizer(target: self, action: #selector(clickSelectTypeAction))
+        self.typeSelectView.addGestureRecognizer(tap1)
+
+        self.priceSubBtn.addTarget(self, action: #selector(clickPriceSubBtnAction), for: .touchUpInside)
+        
+        self.priceAddBtn.addTarget(self, action: #selector(clickPriceAddBtnAction), for: .touchUpInside)
+        
+        self.unitSubBtn.addTarget(self, action: #selector(clickUnitSubBtnAction), for: .touchUpInside)
+        
+        self.unitAddBtn.addTarget(self, action: #selector(clickUnitAddBtnAction), for: .touchUpInside)
+      
+        
+        self.slSubBtn.addTarget(self, action: #selector(clickSLSubBtnAction), for: .touchUpInside)
+        
+        self.tpAddBtn.addTarget(self, action: #selector(clickTPAddBtnAction), for: .touchUpInside)
+        
+        self.slSubBtn.addTarget(self, action: #selector(clickSLSubBtnAction), for: .touchUpInside)
+        
+        self.slAddBtn.addTarget(self, action: #selector(clickSLAddBtnAction), for: .touchUpInside)
+        
+        
+        let tap2 = UITapGestureRecognizer(target: self, action: #selector(clickLimitSelectViewAction))
+        self.limitSelectView.addGestureRecognizer(tap2)
+        
+        
+        
+        
+        self.buyBtn.addTarget(self, action: #selector(clickBuyBtnAction), for: .touchUpInside)
+        
+        self.sellBtn.addTarget(self, action: #selector(clickSellBtnAction), for: .touchUpInside)
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(vm:DealViewModel) -> Void {
+        self.VM = vm
+       
+        if vm.isMarket{
+            self.typeLab.text = switchLanguage("市价单")
+            self.bg2View.isHidden = true
+            self.bg7View.isHidden = true
+        }else{
+            self.typeLab.text = switchLanguage("限价单")
+            self.bg2View.isHidden = false
+            self.bg7View.isHidden = false
+        }
+        
+        if vm.isDayLimit{
+            self.limitLab.text = switchLanguage("当日有效")
+        }else{
+            self.limitLab.text = switchLanguage("撤单前有效")
+        }
+        
+        self.priceText.text = vm.price
+        self.unitText.text = vm.num
+        self.slText.text = vm.loss
+        self.tpText.text = vm.profit
+        
+        self.multipleLab.text = vm.selectSymbolModel.contract_size
+        
+        self.updateNum()
+        self.updateAmount()
+        self.updateMax()
+        
+    }
+    
+}
+
+extension DealProCell{
+   
+    
+    @objc func clickSelectTypeAction(){
+        let pop = KSelectBottonPopView()
+        var data = [[String:Any]]()
+        let text1 = String(format: "%@\n%@",switchLanguage("限价单"),switchLanguage("以指定价格买入/卖出"))
+        let att1 = NSMutableAttributedString.init(string: text1,attributes: [NSAttributedString.Key.foregroundColor: TitleTextColor,NSAttributedString.Key.font:_PFSR(14)])
+        let range1 = (text1 as NSString).range(of:switchLanguage("以指定价格买入/卖出"))
+        att1.addAttributes([NSAttributedString.Key.foregroundColor:LightTextColor ,NSAttributedString.Key.font:_PFSR(12)], range: range1)
+        data.append(["attText":att1])
+        
+        let text2 = String(format: "%@\n%@",switchLanguage("市价单"),switchLanguage("以目前市场价格买入/卖出"))
+        let att2 = NSMutableAttributedString.init(string: text2,attributes: [NSAttributedString.Key.foregroundColor: TitleTextColor,NSAttributedString.Key.font:_PFSR(14)])
+        let range2 = (text2 as NSString).range(of:switchLanguage("以目前市场价格买入/卖出"))
+        att2.addAttributes([NSAttributedString.Key.foregroundColor:LightTextColor ,NSAttributedString.Key.font:_PFSR(12)], range: range2)
+        data.append(["attText":att2])
+        
+        if self.VM.isMarket {
+            pop.select = 1
+        }else{
+            pop.select = 0
+        }
+    
+        pop.showPopupView(source: data) { index in
+            if index >= 0 {
+                if index == 0{
+                    self.VM.isMarket = false
+                   
+                }else{
+                    self.VM.isMarket = true
+                }
+                
+                self.refreshBlock?()
+            }
+        }
+    }
+    
+    @objc func clickPriceSubBtnAction(){
+        if conerData(self.VM.price, .MyDouble).2! > 0{
+            self.VM.price = decimalNumber(A: self.VM.price, B: "0.001", type: .Subtract)
+            self.priceText.text = self.VM.price
+            self.updateAmount()
+            self.updateMax()
+        }
+       
+    }
+    
+    @objc func clickPriceAddBtnAction(){
+        self.VM.price = decimalNumber(A: self.VM.price, B: "0.001", type: .Add)
+        self.priceText.text = self.VM.price
+        self.updateAmount()
+        self.updateMax()
+    }
+    
+    @objc func clickUnitSubBtnAction(){
+        if conerData(self.VM.num, .MyDouble).2! > 0{
+            self.VM.num = decimalNumber(A: self.VM.num, B: "0.01", type: .Subtract)
+            self.unitText.text = self.VM.num
+            self.updateNum()
+            self.updateAmount()
+        }
+    }
+    
+    @objc func clickUnitAddBtnAction(){
+        self.VM.num = decimalNumber(A: self.VM.num, B: "0.01", type: .Add)
+        self.unitText.text = self.VM.num
+        self.updateNum()
+        self.updateAmount()
+    }
+    
+    @objc func clickSLSubBtnAction(){
+        if conerData(self.VM.loss, .MyDouble).2! > 0{
+            self.VM.num = decimalNumber(A: self.VM.loss, B: "0.01", type: .Subtract)
+            self.slText.text = self.VM.loss
+        }
+    }
+    
+    @objc func clickSLAddBtnAction(){
+        self.VM.loss = decimalNumber(A: self.VM.loss, B: "0.01", type: .Add)
+        self.slText.text = self.VM.loss
+    }
+    
+    @objc func clickTPSubBtnAction(){
+        if conerData(self.VM.profit, .MyDouble).2! > 0{
+            self.VM.profit = decimalNumber(A: self.VM.profit, B: "0.01", type: .Subtract)
+            self.tpText.text = self.VM.profit
+        }
+    }
+    
+    @objc func clickTPAddBtnAction(){
+        self.VM.profit = decimalNumber(A: self.VM.profit, B: "0.01", type: .Add)
+        self.tpText.text = self.VM.profit
+    }
+    
+    
+    @objc func clickLimitSelectViewAction(){
+        let pop = KSelectBottonPopView()
+        var data = [[String:Any]]()
+        data = [
+            ["text":switchLanguage("当日有效")],
+            ["text":switchLanguage("撤单前有效")],
+        ]
+        if self.VM.isDayLimit {
+            pop.select = 0
+        }else{
+            pop.select = 1
+        }
+        pop.showPopupView(source: data) { index in
+            if index >= 0 {
+                if index == 0{
+                    self.VM.isDayLimit = true
+                }else{
+                    self.VM.isDayLimit = false
+                }
+                
+                self.refreshBlock?()
+            }
+        }
+    }
+    
+    @objc func clickBuyBtnAction(){
+       
+        self.endEditing(true)
+        guard OperationalUserInfoData.getLogin() else {
+            currentVc()!.navigationController?.pushViewController(LoginViewController(), animated: true)
+            return
+        }
+        guard (self.VM.num).length > 0 else {
+            ProgressHUD.showInfo(status: switchLanguage("请输入单位"))
+            return
+        }
+        
+        if self.VM.isMarket {
+            self.VM.selectOrderType = 0
+            self.VM.netOpenPosition()
+        }else{
+            guard (self.VM.price).length > 0 else {
+                ProgressHUD.showInfo(status: switchLanguage("请输入价格"))
+                return
+            }
+            self.VM.selectOrderType = 2
+            self.VM.netOpenEntrustn()
+        }
+    }
+    
+    @objc func clickSellBtnAction(){
+        self.endEditing(true)
+        guard OperationalUserInfoData.getLogin() else {
+            currentVc()!.navigationController?.pushViewController(LoginViewController(), animated: true)
+            return
+        }
+        guard (self.VM.num).length > 0 else {
+            ProgressHUD.showInfo(status: switchLanguage("请输入单位"))
+            return
+        }
+        
+        if self.VM.isMarket {
+            self.VM.selectOrderType = 1
+            self.VM.netOpenPosition()
+        }else{
+            guard (self.VM.price).length > 0 else {
+                ProgressHUD.showInfo(status: switchLanguage("请输入价格"))
+                return
+            }
+           
+            self.VM.selectOrderType = 3
+            self.VM.netOpenEntrustn()
+        }
+       
+    }
+    
+}
+
+extension DealProCell{
+    
+    func updateNum() -> Void {
+        self.numLab.text = decimalNumber(A: self.VM.selectSymbolModel.contract_size, B: self.VM.num, type: .Multiply)
+    }
+    
+    func updateAmount() -> Void {
+        let num = self.numLab.text ?? "0"
+        self.amountLab.text = decimalNumber(A:num, B: self.VM.price, type: .Multiply)
+    }
+    
+    func updateMax() -> Void {
+        self.amountLab.text = decimalNumber(A:self.VM.accountInfoModel.margin_free, B: self.VM.price, type: .Divid)
+    }
+}
+
+
+
+extension DealProCell:UITextFieldDelegate{
+    //限制输入
+    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+        let existingString: NSString = textField.text as NSString? ?? "" as NSString
+        let candidateString =  existingString.replacingCharacters(in: range, with: string)
+        if candidateString.length < existingString.length {
+            return true
+        }
+        if candidateString.length > 0 {
+          
+           let pp = NSString(format: "(([0]|(0[.]\\d{0,%@}))|([1-9]\\d{0,50}(([.]\\d{0,%@})?)))?","50","50")
+            let predicate = NSPredicate.init(format: "SELF MATCHES %@",pp)
+            if !predicate .evaluate(with: candidateString){
+                return false
+            }
+        }
+       
+        return true
+    }
+    
+    //MARK:- 输入框的变化
+    @objc func inputChange(_ textField : UITextField){
+        let text = textField.text ?? ""
+        if textField == self.priceText{
+            self.VM.price = text
+            self.updateAmount()
+            self.updateMax()
+        }else{
+            self.VM.num = text
+            self.updateNum()
+            self.updateAmount()
+        }
+       
+    }
+   
+}
+

+ 474 - 0
Koala/Koala/Modular/Deal/V/Deal/DealProCell.xib

@@ -0,0 +1,474 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="674" id="KGk-i7-Jjw" customClass="DealProCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="497" height="674"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="497" height="674"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="Oa8-cD-Pdp">
+                        <rect key="frame" x="0.0" y="0.0" width="497" height="407"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mRG-Lz-ujp">
+                                <rect key="frame" x="0.0" y="0.0" width="497" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="P4y-Rd-HV3">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Qty-wf-uAD">
+                                        <rect key="frame" x="257" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AWW-Tx-iAc">
+                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="iBk-yU-H0P">
+                                                <rect key="frame" x="200" y="0.0" width="20" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="20" id="LyU-Ha-zXx"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstItem="AWW-Tx-iAc" firstAttribute="top" secondItem="Qty-wf-uAD" secondAttribute="top" id="3T6-4T-3Io"/>
+                                            <constraint firstAttribute="bottom" secondItem="iBk-yU-H0P" secondAttribute="bottom" id="7SN-nT-g5h"/>
+                                            <constraint firstAttribute="bottom" secondItem="AWW-Tx-iAc" secondAttribute="bottom" id="BLV-yY-ETj"/>
+                                            <constraint firstItem="iBk-yU-H0P" firstAttribute="top" secondItem="Qty-wf-uAD" secondAttribute="top" id="QHw-M7-gu7"/>
+                                            <constraint firstItem="AWW-Tx-iAc" firstAttribute="leading" secondItem="Qty-wf-uAD" secondAttribute="leading" id="W52-gh-ZjX"/>
+                                            <constraint firstAttribute="trailing" secondItem="iBk-yU-H0P" secondAttribute="trailing" constant="20" id="Wm4-n0-44g"/>
+                                            <constraint firstAttribute="width" constant="240" id="lbG-vA-fv3"/>
+                                            <constraint firstItem="iBk-yU-H0P" firstAttribute="centerY" secondItem="Qty-wf-uAD" secondAttribute="centerY" id="vgw-dt-SLh"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="P4y-Rd-HV3" secondAttribute="bottom" id="8gO-9d-iez"/>
+                                    <constraint firstAttribute="bottom" secondItem="Qty-wf-uAD" secondAttribute="bottom" id="Eoe-JZ-sao"/>
+                                    <constraint firstItem="Qty-wf-uAD" firstAttribute="top" secondItem="mRG-Lz-ujp" secondAttribute="top" id="Mco-o3-iQr"/>
+                                    <constraint firstItem="P4y-Rd-HV3" firstAttribute="top" secondItem="mRG-Lz-ujp" secondAttribute="top" id="UmG-h3-XZe"/>
+                                    <constraint firstItem="P4y-Rd-HV3" firstAttribute="leading" secondItem="mRG-Lz-ujp" secondAttribute="leading" constant="20" id="blI-f8-fcO"/>
+                                    <constraint firstAttribute="trailing" secondItem="Qty-wf-uAD" secondAttribute="trailing" id="dbz-9j-ddS"/>
+                                    <constraint firstAttribute="height" constant="40" id="xtp-U5-q3P"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="59j-9f-RhF">
+                                <rect key="frame" x="0.0" y="41" width="497" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="DIm-zn-aW4">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ftE-tC-SXq">
+                                        <rect key="frame" x="257" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="fKT-vg-NZf">
+                                                <rect key="frame" x="0.0" y="0.0" width="160" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                <textInputTraits key="textInputTraits"/>
+                                            </textField>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="mAL-1u-qib">
+                                                <rect key="frame" x="160" y="0.0" width="40" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="2Bh-H4-0U4">
+                                                <rect key="frame" x="200" y="0.0" width="40" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" secondItem="2Bh-H4-0U4" secondAttribute="height" multiplier="1:1" id="z0o-ey-qbh"/>
+                                                </constraints>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="2Bh-H4-0U4" firstAttribute="width" secondItem="mAL-1u-qib" secondAttribute="width" id="Eaf-q8-5hP"/>
+                                            <constraint firstAttribute="width" constant="240" id="gDY-KY-FO8"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="DIm-zn-aW4" secondAttribute="bottom" id="AGg-gt-8gu"/>
+                                    <constraint firstAttribute="height" constant="40" id="Cwc-sF-tX4"/>
+                                    <constraint firstItem="DIm-zn-aW4" firstAttribute="leading" secondItem="59j-9f-RhF" secondAttribute="leading" constant="20" id="NQd-Aj-DHg"/>
+                                    <constraint firstAttribute="trailing" secondItem="ftE-tC-SXq" secondAttribute="trailing" id="ZaW-Ko-iiO"/>
+                                    <constraint firstAttribute="bottom" secondItem="ftE-tC-SXq" secondAttribute="bottom" id="mfp-DD-2qu"/>
+                                    <constraint firstItem="DIm-zn-aW4" firstAttribute="top" secondItem="59j-9f-RhF" secondAttribute="top" id="tY2-a1-Rhh"/>
+                                    <constraint firstItem="ftE-tC-SXq" firstAttribute="top" secondItem="59j-9f-RhF" secondAttribute="top" id="vvi-ix-DO4"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="cyg-vK-Piv">
+                                <rect key="frame" x="0.0" y="82" width="497" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="oLO-On-65k">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="A94-6O-Rj0">
+                                        <rect key="frame" x="257" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="C2u-Eh-hvu">
+                                                <rect key="frame" x="0.0" y="0.0" width="160" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                <textInputTraits key="textInputTraits"/>
+                                            </textField>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="RvJ-yH-Ysq">
+                                                <rect key="frame" x="160" y="0.0" width="40" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EtV-Xh-lG6">
+                                                <rect key="frame" x="200" y="0.0" width="40" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" secondItem="EtV-Xh-lG6" secondAttribute="height" multiplier="1:1" id="ATQ-Zo-R0g"/>
+                                                </constraints>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="EtV-Xh-lG6" firstAttribute="width" secondItem="RvJ-yH-Ysq" secondAttribute="width" id="1Vb-5Z-rXF"/>
+                                            <constraint firstAttribute="width" constant="240" id="chK-Gx-0nh"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="oLO-On-65k" secondAttribute="bottom" id="DUp-s4-a1P"/>
+                                    <constraint firstAttribute="height" constant="40" id="YlC-cq-zeT"/>
+                                    <constraint firstItem="A94-6O-Rj0" firstAttribute="top" secondItem="cyg-vK-Piv" secondAttribute="top" id="baW-9q-Jae"/>
+                                    <constraint firstItem="oLO-On-65k" firstAttribute="top" secondItem="cyg-vK-Piv" secondAttribute="top" id="ccf-ZJ-GIb"/>
+                                    <constraint firstAttribute="bottom" secondItem="A94-6O-Rj0" secondAttribute="bottom" id="fBg-6T-76K"/>
+                                    <constraint firstAttribute="trailing" secondItem="A94-6O-Rj0" secondAttribute="trailing" id="l47-4L-juh"/>
+                                    <constraint firstItem="oLO-On-65k" firstAttribute="leading" secondItem="cyg-vK-Piv" secondAttribute="leading" constant="20" id="muR-BB-jUF"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Zry-CA-KMF">
+                                <rect key="frame" x="0.0" y="123" width="497" height="80"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="xFv-D7-390">
+                                        <rect key="frame" x="271.66666666666669" y="14.666666666666654" width="205.33333333333331" height="50.666666666666657"/>
+                                        <subviews>
+                                            <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="8GQ-Uf-abF">
+                                                <rect key="frame" x="0.0" y="0.0" width="87.666666666666671" height="50.666666666666664"/>
+                                                <subviews>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="DpI-17-Naq">
+                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="AVy-oE-67C">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Rhd-s6-Ga5">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="Tvj-gu-3bG">
+                                                        <rect key="frame" x="46.333333333333314" y="0.0" width="41.333333333333343" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Eng-BB-fB8">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5sw-Fx-dx7">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                </subviews>
+                                            </stackView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="Y4L-HX-Iak">
+                                                <rect key="frame" x="117.66666666666663" y="0.0" width="87.666666666666686" height="50.666666666666664"/>
+                                                <subviews>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="cmn-bq-kJi">
+                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Plq-Zw-nvH">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="yNZ-1g-9AM">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="cRo-KJ-tvD">
+                                                        <rect key="frame" x="46.333333333333371" y="0.0" width="41.333333333333343" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="rKf-qF-Yfb">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="ktp-Cj-TEI">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                </subviews>
+                                            </stackView>
+                                        </subviews>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="xFv-D7-390" secondAttribute="trailing" constant="20" id="V9Y-d9-hPb"/>
+                                    <constraint firstAttribute="height" constant="80" id="i8x-Sn-ETt"/>
+                                    <constraint firstItem="xFv-D7-390" firstAttribute="centerY" secondItem="Zry-CA-KMF" secondAttribute="centerY" id="yig-Ba-b2c"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="iyR-9B-aji">
+                                <rect key="frame" x="0.0" y="204" width="497" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="u1e-nb-fNP">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="6cn-Vj-ViN">
+                                        <rect key="frame" x="257" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="7Ko-DM-BbF">
+                                                <rect key="frame" x="0.0" y="0.0" width="160" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                <textInputTraits key="textInputTraits"/>
+                                            </textField>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ABw-wF-g8B">
+                                                <rect key="frame" x="160" y="0.0" width="40" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Ebi-NN-KD4">
+                                                <rect key="frame" x="200" y="0.0" width="40" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" secondItem="Ebi-NN-KD4" secondAttribute="height" multiplier="1:1" id="HV4-36-lwW"/>
+                                                </constraints>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="Ebi-NN-KD4" firstAttribute="width" secondItem="ABw-wF-g8B" secondAttribute="width" id="DPT-BE-t0l"/>
+                                            <constraint firstAttribute="width" constant="240" id="haf-Eq-W7r"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="6cn-Vj-ViN" secondAttribute="bottom" id="QYT-fB-6SD"/>
+                                    <constraint firstAttribute="bottom" secondItem="u1e-nb-fNP" secondAttribute="bottom" id="SXR-k2-B5L"/>
+                                    <constraint firstItem="6cn-Vj-ViN" firstAttribute="top" secondItem="iyR-9B-aji" secondAttribute="top" id="ixt-ab-hC2"/>
+                                    <constraint firstAttribute="height" constant="40" id="pMJ-ra-ViX"/>
+                                    <constraint firstItem="u1e-nb-fNP" firstAttribute="leading" secondItem="iyR-9B-aji" secondAttribute="leading" constant="20" id="v24-bx-kyn"/>
+                                    <constraint firstAttribute="trailing" secondItem="6cn-Vj-ViN" secondAttribute="trailing" id="vbZ-jS-S5g"/>
+                                    <constraint firstItem="u1e-nb-fNP" firstAttribute="top" secondItem="iyR-9B-aji" secondAttribute="top" id="wr2-Eu-9MO"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="WQJ-9d-eXT">
+                                <rect key="frame" x="0.0" y="245" width="497" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="t1e-xh-vyJ">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="AnQ-w0-6id">
+                                        <rect key="frame" x="257" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="3tq-8y-o3q">
+                                                <rect key="frame" x="0.0" y="0.0" width="160" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                <textInputTraits key="textInputTraits"/>
+                                            </textField>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="6ZW-Gg-o15">
+                                                <rect key="frame" x="160" y="0.0" width="40" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="ZD3-fM-IDw">
+                                                <rect key="frame" x="200" y="0.0" width="40" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" secondItem="ZD3-fM-IDw" secondAttribute="height" multiplier="1:1" id="Tpb-JY-jwe"/>
+                                                </constraints>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="240" id="HSb-Xi-UuW"/>
+                                            <constraint firstItem="ZD3-fM-IDw" firstAttribute="width" secondItem="6ZW-Gg-o15" secondAttribute="width" id="SKu-mm-fhH"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="AnQ-w0-6id" secondAttribute="trailing" id="2r9-LD-bgy"/>
+                                    <constraint firstItem="AnQ-w0-6id" firstAttribute="top" secondItem="WQJ-9d-eXT" secondAttribute="top" id="Ebx-Cm-no5"/>
+                                    <constraint firstAttribute="bottom" secondItem="t1e-xh-vyJ" secondAttribute="bottom" id="SYQ-Lu-XkR"/>
+                                    <constraint firstAttribute="bottom" secondItem="AnQ-w0-6id" secondAttribute="bottom" id="Tlv-MA-8YS"/>
+                                    <constraint firstItem="t1e-xh-vyJ" firstAttribute="leading" secondItem="WQJ-9d-eXT" secondAttribute="leading" constant="20" id="n8D-hk-y0p"/>
+                                    <constraint firstAttribute="height" constant="40" id="qnX-sS-wp5"/>
+                                    <constraint firstItem="t1e-xh-vyJ" firstAttribute="top" secondItem="WQJ-9d-eXT" secondAttribute="top" id="vAB-lj-NXY"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="CIK-pj-HD5">
+                                <rect key="frame" x="0.0" y="286" width="497" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="qfP-qq-lAe">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="P0G-Ab-Qav">
+                                        <rect key="frame" x="257" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QbW-OV-Wcz">
+                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="mR0-Ka-HcS">
+                                                <rect key="frame" x="200" y="0.0" width="20" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="20" id="onT-CP-Zvc"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstAttribute="bottom" secondItem="QbW-OV-Wcz" secondAttribute="bottom" id="81U-dV-vB1"/>
+                                            <constraint firstAttribute="trailing" secondItem="mR0-Ka-HcS" secondAttribute="trailing" constant="20" id="8qX-ig-DhO"/>
+                                            <constraint firstAttribute="bottom" secondItem="mR0-Ka-HcS" secondAttribute="bottom" id="FpI-3g-9Qg"/>
+                                            <constraint firstItem="QbW-OV-Wcz" firstAttribute="leading" secondItem="P0G-Ab-Qav" secondAttribute="leading" id="Hqy-34-3Cy"/>
+                                            <constraint firstAttribute="width" constant="240" id="NLv-G8-qZ1"/>
+                                            <constraint firstItem="QbW-OV-Wcz" firstAttribute="top" secondItem="P0G-Ab-Qav" secondAttribute="top" id="P1n-ez-R3T"/>
+                                            <constraint firstItem="mR0-Ka-HcS" firstAttribute="centerY" secondItem="P0G-Ab-Qav" secondAttribute="centerY" id="TQU-vX-d5V"/>
+                                            <constraint firstItem="mR0-Ka-HcS" firstAttribute="top" secondItem="P0G-Ab-Qav" secondAttribute="top" id="spW-h1-XJb"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="P0G-Ab-Qav" secondAttribute="trailing" id="6r7-ia-Hbu"/>
+                                    <constraint firstAttribute="bottom" secondItem="P0G-Ab-Qav" secondAttribute="bottom" id="9kn-sd-Atw"/>
+                                    <constraint firstItem="P0G-Ab-Qav" firstAttribute="top" secondItem="CIK-pj-HD5" secondAttribute="top" id="Cns-TA-cQV"/>
+                                    <constraint firstItem="qfP-qq-lAe" firstAttribute="top" secondItem="CIK-pj-HD5" secondAttribute="top" id="Pjo-4Z-Mps"/>
+                                    <constraint firstAttribute="bottom" secondItem="qfP-qq-lAe" secondAttribute="bottom" id="ZH9-Dw-HmD"/>
+                                    <constraint firstItem="qfP-qq-lAe" firstAttribute="leading" secondItem="CIK-pj-HD5" secondAttribute="leading" constant="20" id="acp-lK-aLM"/>
+                                    <constraint firstAttribute="height" constant="40" id="yO8-1z-QP9"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ean-mN-9V9">
+                                <rect key="frame" x="0.0" y="327" width="497" height="80"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="oce-1c-zYY">
+                                        <rect key="frame" x="20" y="20" width="457" height="40"/>
+                                        <subviews>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="144-qU-I8g">
+                                                <rect key="frame" x="0.0" y="0.0" width="223.66666666666666" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="aOZ-U9-gXS">
+                                                <rect key="frame" x="233.66666666666663" y="0.0" width="223.33333333333337" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="aOZ-U9-gXS" firstAttribute="width" secondItem="144-qU-I8g" secondAttribute="width" id="TgM-tZ-2o2"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="oce-1c-zYY" secondAttribute="bottom" constant="20" id="LUc-05-FE5"/>
+                                    <constraint firstItem="oce-1c-zYY" firstAttribute="top" secondItem="ean-mN-9V9" secondAttribute="top" constant="20" id="RFY-CN-CWr"/>
+                                    <constraint firstItem="oce-1c-zYY" firstAttribute="leading" secondItem="ean-mN-9V9" secondAttribute="leading" constant="20" id="UAC-AT-WsZ"/>
+                                    <constraint firstAttribute="trailing" secondItem="oce-1c-zYY" secondAttribute="trailing" constant="20" id="l6S-h9-hDM"/>
+                                    <constraint firstAttribute="height" constant="80" id="ss9-cR-sXE"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="Oa8-cD-Pdp" secondAttribute="trailing" id="Gxf-tb-A2d"/>
+                    <constraint firstItem="Oa8-cD-Pdp" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="WjS-VG-fGS"/>
+                    <constraint firstItem="Oa8-cD-Pdp" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="gtz-Nc-709"/>
+                    <constraint firstAttribute="bottom" secondItem="Oa8-cD-Pdp" secondAttribute="bottom" id="n9w-9Q-pjy"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="amountLab" destination="rKf-qF-Yfb" id="B68-I8-enb"/>
+                <outlet property="amountTitleLab" destination="Plq-Zw-nvH" id="voN-D1-2fP"/>
+                <outlet property="bg1View" destination="mRG-Lz-ujp" id="3Dt-KK-3xD"/>
+                <outlet property="bg2View" destination="59j-9f-RhF" id="T9c-H4-3g4"/>
+                <outlet property="bg3View" destination="cyg-vK-Piv" id="tCT-v9-euJ"/>
+                <outlet property="bg4View" destination="Zry-CA-KMF" id="Yh6-1N-NSl"/>
+                <outlet property="bg5View" destination="iyR-9B-aji" id="imf-8P-QI6"/>
+                <outlet property="bg6View" destination="WQJ-9d-eXT" id="1Cy-Yy-qaZ"/>
+                <outlet property="bg7View" destination="CIK-pj-HD5" id="OC3-WS-7jF"/>
+                <outlet property="bg8View" destination="ean-mN-9V9" id="7UF-cM-bWW"/>
+                <outlet property="buyBtn" destination="144-qU-I8g" id="0Id-8D-zZT"/>
+                <outlet property="buyLab" destination="ktp-Cj-TEI" id="cH6-J1-e5Y"/>
+                <outlet property="buyTitleLab" destination="yNZ-1g-9AM" id="gir-nz-BVZ"/>
+                <outlet property="limitImgView" destination="mR0-Ka-HcS" id="qbF-9O-0Zu"/>
+                <outlet property="limitLab" destination="QbW-OV-Wcz" id="64G-VF-1ob"/>
+                <outlet property="limitSelectView" destination="P0G-Ab-Qav" id="LDF-Lw-UKp"/>
+                <outlet property="limitTitleBtn" destination="qfP-qq-lAe" id="h9F-Mi-DjA"/>
+                <outlet property="multipleLab" destination="5sw-Fx-dx7" id="8ut-NG-tP6"/>
+                <outlet property="multipleTitleLab" destination="Rhd-s6-Ga5" id="vGs-31-Zkq"/>
+                <outlet property="numLab" destination="Eng-BB-fB8" id="wmh-gd-0v8"/>
+                <outlet property="numTitleLab" destination="AVy-oE-67C" id="K3e-tU-Wvf"/>
+                <outlet property="priceAddBtn" destination="2Bh-H4-0U4" id="IJm-Ma-szJ"/>
+                <outlet property="priceSubBtn" destination="mAL-1u-qib" id="0rk-kN-BRf"/>
+                <outlet property="priceText" destination="fKT-vg-NZf" id="3bz-yv-cYx"/>
+                <outlet property="priceTitleBtn" destination="DIm-zn-aW4" id="nDF-Ik-bNn"/>
+                <outlet property="sellBtn" destination="aOZ-U9-gXS" id="teX-z6-eXe"/>
+                <outlet property="slAddBtn" destination="Ebi-NN-KD4" id="viR-xL-rq4"/>
+                <outlet property="slSubBtn" destination="ABw-wF-g8B" id="xC2-Gb-jVH"/>
+                <outlet property="slText" destination="7Ko-DM-BbF" id="PWj-Am-3d0"/>
+                <outlet property="slTitleBtn" destination="u1e-nb-fNP" id="SPC-3w-mkX"/>
+                <outlet property="tpAddBtn" destination="ZD3-fM-IDw" id="bWV-TU-4sZ"/>
+                <outlet property="tpSubBtn" destination="6ZW-Gg-o15" id="n2M-PU-tVX"/>
+                <outlet property="tpText" destination="3tq-8y-o3q" id="cZ8-dh-sJ8"/>
+                <outlet property="tpTitleBtn" destination="t1e-xh-vyJ" id="phn-SL-8uu"/>
+                <outlet property="typeImgView" destination="iBk-yU-H0P" id="gNP-il-cfv"/>
+                <outlet property="typeLab" destination="AWW-Tx-iAc" id="fBb-IW-Rcf"/>
+                <outlet property="typeSelectView" destination="Qty-wf-uAD" id="e1G-8j-pDx"/>
+                <outlet property="typeTitleBtn" destination="P4y-Rd-HV3" id="iBH-8T-Siy"/>
+                <outlet property="unitAddBtn" destination="EtV-Xh-lG6" id="w7r-8A-GZn"/>
+                <outlet property="unitSubBtn" destination="RvJ-yH-Ysq" id="arU-NK-2oh"/>
+                <outlet property="unitText" destination="C2u-Eh-hvu" id="ghD-Zo-Aba"/>
+                <outlet property="unitTitleBtn" destination="oLO-On-65k" id="qx1-c5-NAX"/>
+            </connections>
+            <point key="canvasLocation" x="106.10687022900763" y="234.50704225352115"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 234 - 0
Koala/Koala/Modular/Deal/V/Deal/DealProDataCell.swift

@@ -0,0 +1,234 @@
+//
+//  DealProDataCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/28.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class DealProDataCell: BaseTableViewCell {
+    @IBOutlet weak var bgView: UIView!
+    @IBOutlet weak var bg1View: UIView!
+    @IBOutlet weak var title1Lab: UILabel!
+    @IBOutlet weak var value1Lab: UILabel!
+    @IBOutlet weak var img1View: UIImageView!
+    
+    @IBOutlet weak var bg2View: UIView!
+    @IBOutlet weak var title2Lab: UILabel!
+    @IBOutlet weak var value2Lab: UILabel!
+    @IBOutlet weak var img2View: UIImageView!
+    
+    @IBOutlet weak var chartsBgView: UIView!
+    
+    //k线图
+    private lazy var kLineView:KLineView = {
+        let kLineView = KLineView()
+        kLineView.delegate = self
+        return kLineView
+    }()
+    
+    // k线数据源
+    private lazy var dataSource:[KLineModel] = {
+        let dataSource = [KLineModel]()
+        return dataSource
+    }()
+    
+    var VM:DealViewModel = DealViewModel()
+    var refreshBlock: (() -> ())?
+    var clickBlock: (() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ViewBorderColor
+        self.bgView.backgroundColor = ViewBorderColor
+        
+        self.bg1View.backgroundColor = ALLBackGroundColor
+        self.bg2View.backgroundColor = ALLBackGroundColor
+        self.chartsBgView.backgroundColor = ALLBackGroundColor
+        
+        self.title1Lab.text = switchLanguage("代码")
+        self.title1Lab.setTextFont(.PFSR, 13)
+        self.title1Lab.textColor = GrayTextColor
+        
+        self.value1Lab.text = ""
+        self.value1Lab.setTextFont(.PFSR, 13)
+        self.value1Lab.textColor = TitleTextColor
+        
+        self.img1View.image = _image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color: LightTextColor)
+        
+        self.title2Lab.text = ""
+        self.title2Lab.setTextFont(.PFSR, 13)
+        self.title2Lab.textColor = GrayTextColor
+        
+        self.value2Lab.text = ""
+        self.value2Lab.setTextFont(.PFSR, 13)
+        self.value2Lab.textColor = TitleTextColor
+        
+        self.img2View.image = _image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color: LightTextColor)
+        
+        self.chartsBgView.addSubview(self.kLineView)
+        self.kLineView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+        }
+        
+        let tap1 = UITapGestureRecognizer(target: self, action: #selector(clickSelectSymbolAction))
+        self.bg1View.addGestureRecognizer(tap1)
+        
+        let tap2 = UITapGestureRecognizer(target: self, action: #selector(clickChartsAction))
+        self.bg2View.addGestureRecognizer(tap2)
+        // Initialization code
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+}
+
+extension DealProDataCell{
+    @objc func clickSelectSymbolAction(){
+        self.clickBlock?()
+    }
+    @objc func clickChartsAction(){
+        if self.VM.isShowKline {
+            self.VM.isShowKline = false
+        }else{
+            self.VM.isShowKline = true
+        }
+        
+        self.refreshBlock?()
+    }
+}
+
+extension DealProDataCell{
+    func updateCellDataWith(vm:DealViewModel) -> Void {
+        self.VM = vm
+        self.mySwitchLanguage()
+        self.value1Lab.text = vm.selectSymbolModel.symbol
+        self.title2Lab.text = vm.selectSymbolModel.title
+        self.updatePrice(vm: vm)
+        self.updateCellKlineWith(vm: vm, isSocket: false)
+        if vm.isShowKline {
+            self.chartsBgView.isHidden = false
+        }else{
+            self.chartsBgView.isHidden = true
+        }
+    }
+    
+    func updatePrice(vm:DealViewModel) -> Void {
+        self.VM = vm
+        let model = vm.selectSymbolModel
+        let color = exchangeColorAndImage(increase: conerData(model.increase, .MyFloat).1!).0
+        
+        let price = precisionString(with: model.newPrice, precision: vm.selectSymbolModel.digits)
+        
+        let difference:Double = conerData(model.newPrice, .MyDouble).2! - conerData(model.open, .MyDouble).2!
+        var differenceStr = "0"
+        if difference > 0 {
+            differenceStr = String(format: "+%.2f", difference)
+        }else{
+            differenceStr = String(format: "%.2f", difference)
+        }
+        
+        let increase = conerData(model.increase as Any, .MyFloat).1!
+        var increaseStr = "0%";
+        if increase > 0 {
+            increaseStr = "+" + precisionString(with: model.increase, precision: "2")  + "%"
+        }else{
+            increaseStr = precisionString(with: model.increase, precision: "2")  + "%"
+        }
+        
+        self.value2Lab.text = String(format: "%@  %@  %@", price,differenceStr,increaseStr)
+        self.value2Lab.textColor = color
+    }
+    
+    func updateCellKlineWith(vm:DealViewModel,isSocket:Bool){
+        self.VM = vm
+        let pModel = SymbolPrecisionModel()
+        pModel.pricePrecision = self.VM.selectSymbolModel.digits
+        pModel.numberPrecision = self.VM.selectSymbolModel.digits
+        kLineView.setSymbolPrecision(model: pModel)
+        if isSocket {
+            let cModel = self.VM.priceList.first!
+            if dataSource.count == 0{
+                dataSource.append(self.kLineModel(cModel: cModel))
+            }else{
+                let kModel:KLineModel = dataSource.last!
+                if kModel.timestamp == cModel.datetime{
+                    dataSource[dataSource.count-1] = self.kLineModel(cModel: cModel)
+                }else{
+                    dataSource.append(self.kLineModel(cModel: cModel))
+                }
+            }
+            UtilAlgorithm.calculationResults(models: dataSource)
+        }else{
+    
+            dataSource = [KLineModel]()
+            for model in self.VM.priceList{
+                guard model.datetime.length >  0 else{
+                    return
+                }
+                dataSource.append(self.kLineModel(cModel:model))
+            }
+
+            UtilAlgorithm.calculationResults(models: dataSource)
+
+            if KLineMainTarget.getDefaultKLineTarget() == KLineMainTarget.targetBOLL {
+                kLineView.setKIndexTop(index: .BOLL)
+            }else if KLineMainTarget.getDefaultKLineTarget() == KLineMainTarget.targetMA {
+                kLineView.setKIndexTop(index: .SMA)
+            }
+
+            kLineView.setKIndexCenter(index: .VOL)
+            let viceArr = KLineViceTarget.getDefaultKLineTarget()
+
+            kLineView.setHighly(topHeight:190, centerHeight: 0, bottomHeight:0)
+
+//            var indexBottoms:[KIndexBottom] = [KIndexBottom]()
+//            for vice in viceArr {
+//                if vice == .targetMACD {
+//                    indexBottoms.append(.MACD)
+//                }else if vice == .targetKDJ {
+//                    indexBottoms.append(.KDJ)
+//                }else if vice == .targetRSI {
+//                    indexBottoms.append(.RSI)
+//                }else if vice == .targetWR {
+//                    indexBottoms.append(.WR)
+//                }
+//            }
+//
+//            kLineView.setKIndexBottom(indexs: indexBottoms)
+
+        }
+
+        self.kLineView.reloadData(isSocket: isSocket)
+    }
+}
+
+extension DealProDataCell : KLineViewDataSource {
+    
+    func kLineModel(cModel:CTMarketChartsModel) -> KLineModel {
+        let time:String = cModel.datetime
+        let open:Double = conerData(cModel.open as Any, .MyDouble).2!
+        let high:Double = conerData(cModel.high as Any, .MyDouble).2!
+        let low:Double = conerData(cModel.low as Any, .MyDouble).2!
+        let close:Double = conerData(cModel.close as Any,.MyDouble).2!
+        let openClose = decimalNumber(A: cModel.close, B: cModel.open, type: .Subtract)
+        let inc = decimalNumber(A: openClose, B: cModel.open, type: .Divid)
+        let increase:String = precisionString(with: decimalNumber(A: inc, B: "100", type: .Multiply), precision: "2") + "%"
+
+        return KLineModel(timestamp:time , open:open , high: high, low: low, close: close, increase:increase)
+    }
+
+    func kLineViewForType(_ kLineView: KLineView) -> KType {
+        return .kLine
+    }
+    func kLineViewForData(_ kLineView: KLineView) -> [KLineModel] {
+        return dataSource
+    }
+}
+

+ 167 - 0
Koala/Koala/Modular/Deal/V/Deal/DealProDataCell.xib

@@ -0,0 +1,167 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="188" id="KGk-i7-Jjw" customClass="DealProDataCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="494" height="188"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="494" height="188"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yaJ-66-Vka">
+                        <rect key="frame" x="0.0" y="0.0" width="494" height="188"/>
+                        <subviews>
+                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="ahb-Gg-Gx8">
+                                <rect key="frame" x="0.0" y="0.0" width="494" height="188"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="x2X-q5-qPo">
+                                        <rect key="frame" x="0.0" y="0.0" width="494" height="40"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7IJ-gB-jNH">
+                                                <rect key="frame" x="20.000000000000004" y="0.0" width="41.333333333333343" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="nDm-7l-rFh">
+                                                <rect key="frame" x="254" y="0.0" width="240" height="40"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="urs-eg-0rZ">
+                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="40"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="b0r-DZ-LBq">
+                                                        <rect key="frame" x="200" y="0.0" width="20" height="40"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="width" constant="20" id="sZz-xY-6zc"/>
+                                                        </constraints>
+                                                    </imageView>
+                                                </subviews>
+                                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                <constraints>
+                                                    <constraint firstItem="urs-eg-0rZ" firstAttribute="leading" secondItem="nDm-7l-rFh" secondAttribute="leading" id="250-tl-9vx"/>
+                                                    <constraint firstAttribute="bottom" secondItem="b0r-DZ-LBq" secondAttribute="bottom" id="56u-u1-4hh"/>
+                                                    <constraint firstItem="b0r-DZ-LBq" firstAttribute="top" secondItem="nDm-7l-rFh" secondAttribute="top" id="NWA-Aa-5n8"/>
+                                                    <constraint firstAttribute="bottom" secondItem="urs-eg-0rZ" secondAttribute="bottom" id="Ux6-x6-mhD"/>
+                                                    <constraint firstAttribute="width" constant="240" id="Yb1-bT-ddc"/>
+                                                    <constraint firstAttribute="trailing" secondItem="b0r-DZ-LBq" secondAttribute="trailing" constant="20" id="lXU-Uh-GN8"/>
+                                                    <constraint firstItem="urs-eg-0rZ" firstAttribute="top" secondItem="nDm-7l-rFh" secondAttribute="top" id="viA-31-lZd"/>
+                                                </constraints>
+                                            </view>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstItem="7IJ-gB-jNH" firstAttribute="top" secondItem="x2X-q5-qPo" secondAttribute="top" id="CRg-tJ-mAy"/>
+                                            <constraint firstAttribute="bottom" secondItem="nDm-7l-rFh" secondAttribute="bottom" id="CxU-F0-hXV"/>
+                                            <constraint firstItem="7IJ-gB-jNH" firstAttribute="leading" secondItem="x2X-q5-qPo" secondAttribute="leading" constant="20" id="aRD-0B-PHs"/>
+                                            <constraint firstItem="nDm-7l-rFh" firstAttribute="top" secondItem="x2X-q5-qPo" secondAttribute="top" id="k4Q-3T-bVZ"/>
+                                            <constraint firstAttribute="trailing" secondItem="nDm-7l-rFh" secondAttribute="trailing" id="o3y-LY-Fmf"/>
+                                            <constraint firstAttribute="bottom" secondItem="7IJ-gB-jNH" secondAttribute="bottom" id="v2o-8M-bH2"/>
+                                            <constraint firstAttribute="height" constant="40" id="ws9-hO-gyn"/>
+                                        </constraints>
+                                    </view>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="mSk-sm-qOy">
+                                        <rect key="frame" x="0.0" y="41" width="494" height="40"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wAO-gm-Ilr">
+                                                <rect key="frame" x="20.000000000000004" y="0.0" width="41.333333333333343" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yvb-7e-SeQ">
+                                                <rect key="frame" x="254" y="0.0" width="240" height="40"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zcj-et-DAD">
+                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="40"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="1rE-F2-geX">
+                                                        <rect key="frame" x="200" y="0.0" width="20" height="40"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="width" constant="20" id="KE6-3a-VRD"/>
+                                                        </constraints>
+                                                    </imageView>
+                                                </subviews>
+                                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="trailing" secondItem="1rE-F2-geX" secondAttribute="trailing" constant="20" id="3vC-Ra-9Kw"/>
+                                                    <constraint firstAttribute="width" constant="240" id="R2f-5a-zQl"/>
+                                                    <constraint firstItem="1rE-F2-geX" firstAttribute="top" secondItem="yvb-7e-SeQ" secondAttribute="top" id="Rmj-W1-IUl"/>
+                                                    <constraint firstItem="zcj-et-DAD" firstAttribute="top" secondItem="yvb-7e-SeQ" secondAttribute="top" id="RoX-7J-Zrl"/>
+                                                    <constraint firstItem="zcj-et-DAD" firstAttribute="leading" secondItem="yvb-7e-SeQ" secondAttribute="leading" id="VDm-tb-PKe"/>
+                                                    <constraint firstAttribute="bottom" secondItem="zcj-et-DAD" secondAttribute="bottom" id="d63-tl-o0B"/>
+                                                    <constraint firstAttribute="bottom" secondItem="1rE-F2-geX" secondAttribute="bottom" id="gmP-t8-WR9"/>
+                                                </constraints>
+                                            </view>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstItem="yvb-7e-SeQ" firstAttribute="top" secondItem="mSk-sm-qOy" secondAttribute="top" id="9X2-jX-2Hd"/>
+                                            <constraint firstItem="wAO-gm-Ilr" firstAttribute="top" secondItem="mSk-sm-qOy" secondAttribute="top" id="AkJ-aX-dvL"/>
+                                            <constraint firstAttribute="trailing" secondItem="yvb-7e-SeQ" secondAttribute="trailing" id="G6k-ft-wxL"/>
+                                            <constraint firstAttribute="bottom" secondItem="yvb-7e-SeQ" secondAttribute="bottom" id="iBh-if-Y06"/>
+                                            <constraint firstAttribute="bottom" secondItem="wAO-gm-Ilr" secondAttribute="bottom" id="kel-og-Sep"/>
+                                            <constraint firstAttribute="height" constant="40" id="vEB-kd-Sv6"/>
+                                            <constraint firstItem="wAO-gm-Ilr" firstAttribute="leading" secondItem="mSk-sm-qOy" secondAttribute="leading" constant="20" id="vI8-2O-OSi"/>
+                                        </constraints>
+                                    </view>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Hud-7g-wac">
+                                        <rect key="frame" x="0.0" y="82" width="494" height="106"/>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                    </view>
+                                </subviews>
+                            </stackView>
+                        </subviews>
+                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                        <constraints>
+                            <constraint firstItem="ahb-Gg-Gx8" firstAttribute="leading" secondItem="yaJ-66-Vka" secondAttribute="leading" id="2lR-Uu-gAZ"/>
+                            <constraint firstAttribute="bottom" secondItem="ahb-Gg-Gx8" secondAttribute="bottom" id="bdv-95-CWf"/>
+                            <constraint firstItem="ahb-Gg-Gx8" firstAttribute="top" secondItem="yaJ-66-Vka" secondAttribute="top" id="sm3-Bz-G22"/>
+                            <constraint firstAttribute="trailing" secondItem="ahb-Gg-Gx8" secondAttribute="trailing" id="vTH-3u-T2J"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="trailing" secondItem="yaJ-66-Vka" secondAttribute="trailing" id="AxB-eO-hQF"/>
+                    <constraint firstItem="yaJ-66-Vka" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="O7K-Bn-Yuo"/>
+                    <constraint firstAttribute="bottom" secondItem="yaJ-66-Vka" secondAttribute="bottom" id="OpS-rQ-GHe"/>
+                    <constraint firstItem="yaJ-66-Vka" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="qWo-Gy-vj6"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="bg1View" destination="x2X-q5-qPo" id="9Id-mf-p3i"/>
+                <outlet property="bg2View" destination="mSk-sm-qOy" id="buP-ZS-BMM"/>
+                <outlet property="bgView" destination="yaJ-66-Vka" id="IHj-At-EAU"/>
+                <outlet property="chartsBgView" destination="Hud-7g-wac" id="XS6-cb-rLc"/>
+                <outlet property="img1View" destination="b0r-DZ-LBq" id="VBD-64-kLo"/>
+                <outlet property="img2View" destination="1rE-F2-geX" id="Onj-Pe-maf"/>
+                <outlet property="title1Lab" destination="7IJ-gB-jNH" id="2gu-Y1-yce"/>
+                <outlet property="title2Lab" destination="wAO-gm-Ilr" id="VlO-fg-oOx"/>
+                <outlet property="value1Lab" destination="urs-eg-0rZ" id="IBD-2e-N45"/>
+                <outlet property="value2Lab" destination="zcj-et-DAD" id="hUs-N6-v8n"/>
+            </connections>
+            <point key="canvasLocation" x="194" y="59"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 10 - 48
Koala/Koala/Modular/Deal/V/Deal/DealHeaderView.swift → Koala/Koala/Modular/Deal/V/Deal/DealSectionView.swift

@@ -1,5 +1,5 @@
 //
-//  DealHeaderView.swift
+//  DealSectionView.swift
 //  Koala
 //
 //  Created by 刘千军 on 2023/1/31.
@@ -8,41 +8,33 @@
 
 import UIKit
 
-class DealHeaderView: BaseView {
+class DealSectionView: BaseView {
 
     @IBOutlet weak var topBgView: UIView!
     
-    @IBOutlet weak var bottomBgView: UIView!
-    
-    @IBOutlet weak var leftLab: UILabel!
-    @IBOutlet weak var center1Lab: UILabel!
-    @IBOutlet weak var center2Lab: UILabel!
-    @IBOutlet weak var rightLab: UILabel!
-    
     var headerView: UIView!
     var clickSelectBlock: ((_ index:Int) -> ())?
     
     lazy var segmentedControl:HMSegmentedControl = {
-        let segmentedControl:HMSegmentedControl = HMSegmentedControl.init(frame: CGRect(x: 0, y: 0, width:SCREEN_WIDTH, height: 50))
+        let segmentedControl:HMSegmentedControl = HMSegmentedControl.init(frame: CGRect(x: 10, y: 0, width:SCREEN_WIDTH-20, height: 40))
         segmentedControl.selectedSegmentIndex = 0
         segmentedControl.backgroundColor = .clear
         segmentedControl.titleTextAttributes = [NSAttributedString.Key.foregroundColor : TitleTextColor,NSAttributedString.Key.font:_PFSR(14)]
         segmentedControl.selectedTitleTextAttributes = [NSAttributedString.Key.foregroundColor : MainBackGroundColor,NSAttributedString.Key.font:_PFSM(14)]
         segmentedControl.selectionIndicatorHeight = 2
         segmentedControl.segmentWidthStyle = .dynamic
-        segmentedControl.selectionStyle = .fullWidthStripe
+        segmentedControl.selectionStyle = .textWidthStripe
         segmentedControl.selectionIndicatorLocation = .down
         segmentedControl.selectionIndicatorColor = MainBackGroundColor
-        segmentedControl.segmentEdgeInset = UIEdgeInsets.init(top: 0, left: 20, bottom: 0, right: 0)
+        segmentedControl.segmentEdgeInset = UIEdgeInsets.init(top: 0, left: 20, bottom: 0, right: 20)
         segmentedControl.indexChangeBlock = {[weak self](index) in
             self?.clickSelectBlock?(Int(index))
-            self?.updateLabText()
         }
         return segmentedControl
     }()
     
     func loadFromNib() -> UIView {
-        return Bundle.main.loadNibNamed("DealHeaderView", owner: self, options: nil)?.first as! UIView
+        return Bundle.main.loadNibNamed("DealSectionView", owner: self, options: nil)?.first as! UIView
     }
     
     override init(frame: CGRect) {
@@ -54,10 +46,6 @@ class DealHeaderView: BaseView {
         }
         mySwitchSkin()
         mySwitchLanguage()
-        self.leftLab.setTextFont(.PFSM, 12)
-        self.center1Lab.setTextFont(.PFSM, 12)
-        self.center2Lab.setTextFont(.PFSM, 12)
-        self.rightLab.setTextFont(.PFSM, 12)
         self.topBgView.addSubview(self.segmentedControl)
         
        
@@ -68,47 +56,21 @@ class DealHeaderView: BaseView {
     }
     
     override func mySwitchLanguage() {
-        self.segmentedControl.sectionTitles = [switchLanguage("持仓"),switchLanguage("挂单列表"),switchLanguage("历史记录")];
-        self.updateLabText()
+        self.segmentedControl.sectionTitles = [switchLanguage("持仓"),switchLanguage("挂单"),switchLanguage("历史订单")];
     }
     
     override func mySwitchSkin() {
        
         self.backgroundColor = .clear
         self.topBgView.backgroundColor = ALLBackGroundColor
-        self.bottomBgView.backgroundColor = InputBackGroundColor
-        
-        self.leftLab.textColor = TitleTextColor
-        self.center1Lab.textColor = TitleTextColor
-        self.center2Lab.textColor = TitleTextColor
-        self.rightLab.textColor = TitleTextColor
+       
         
     }
 
 }
 
-extension DealHeaderView{
-    func updateLabText() -> Void {
-        if self.segmentedControl.selectedSegmentIndex == 0 {
-            self.leftLab.text = switchLanguage("产品")
-            self.center1Lab.text = switchLanguage("方向")
-            self.center2Lab.text = switchLanguage("成交量")
-            self.rightLab.text = switchLanguage("盈亏")
-        }
-        else if self.segmentedControl.selectedSegmentIndex == 1{
-            self.leftLab.text = switchLanguage("产品")
-            self.center1Lab.text = switchLanguage("方向")
-            self.center2Lab.text = switchLanguage("成交量")
-            self.rightLab.text = switchLanguage("开仓价格")
-        }
-        else if self.segmentedControl.selectedSegmentIndex == 2{
-            self.leftLab.text = switchLanguage("产品")
-            self.center1Lab.text = switchLanguage("方向")
-            self.center2Lab.text = switchLanguage("成交量")
-            self.rightLab.text = switchLanguage("盈亏")
-        }
-    }
-    
+extension DealSectionView{
+   
     func updateSectionTitles(position:Int,entrust:Int,closeOrder:Int) -> Void {
         var positionStr = switchLanguage("持仓")
         if position > 0 {

+ 47 - 0
Koala/Koala/Modular/Deal/V/Deal/DealSectionView.xib

@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_0" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DealSectionView" customModule="Koala" customModuleProvider="target">
+            <connections>
+                <outlet property="topBgView" destination="UxZ-QY-EJg" id="kOY-mY-Gor"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="390" height="213"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Mhq-bD-p01">
+                    <rect key="frame" x="0.0" y="0.0" width="390" height="213"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="UxZ-QY-EJg">
+                            <rect key="frame" x="0.0" y="0.0" width="390" height="213"/>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        </view>
+                    </subviews>
+                </stackView>
+            </subviews>
+            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+            <constraints>
+                <constraint firstAttribute="bottom" secondItem="Mhq-bD-p01" secondAttribute="bottom" id="C6N-pc-ref"/>
+                <constraint firstAttribute="trailing" secondItem="Mhq-bD-p01" secondAttribute="trailing" id="QSw-sB-8Ce"/>
+                <constraint firstItem="Mhq-bD-p01" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="QqJ-K8-wP1"/>
+                <constraint firstItem="Mhq-bD-p01" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="u5b-nM-v4a"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="20" y="201"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 44 - 0
Koala/Koala/Modular/Deal/V/Deal/DealSelectSymbolCell.swift

@@ -0,0 +1,44 @@
+//
+//  DealSelectSymbolCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/29.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class DealSelectSymbolCell: BaseTableViewCell {
+    @IBOutlet weak var bg1View: UIView!
+    @IBOutlet weak var title1Lab: UILabel!
+    @IBOutlet weak var value1Lab: UILabel!
+    @IBOutlet weak var img1View: UIImageView!
+    var clickBlock: (() -> ())?
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.bg1View.backgroundColor = ALLBackGroundColor
+      
+        self.title1Lab.text = switchLanguage("代码")
+        self.title1Lab.setTextFont(.PFSR, 13)
+        self.title1Lab.textColor = GrayTextColor
+        
+        self.value1Lab.text = switchLanguage("请输入代码")
+        self.value1Lab.setTextFont(.PFSR, 13)
+        self.value1Lab.textColor = GrayTextColor
+        
+        self.img1View.image = _image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color: LightTextColor)
+        
+        let tap1 = UITapGestureRecognizer(target: self, action: #selector(clickSelectSymbolAction))
+        self.bg1View.addGestureRecognizer(tap1)
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    @objc func clickSelectSymbolAction(){
+        self.clickBlock?()
+    }
+    
+}

+ 85 - 0
Koala/Koala/Modular/Deal/V/Deal/DealSelectSymbolCell.xib

@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="57" id="KGk-i7-Jjw" customClass="DealSelectSymbolCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="327" height="57"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="327" height="57"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bV4-sF-32w">
+                        <rect key="frame" x="0.0" y="0.0" width="327" height="57"/>
+                        <subviews>
+                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="btT-N3-hdv">
+                                <rect key="frame" x="20.000000000000004" y="0.0" width="41.333333333333343" height="57"/>
+                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                <nil key="textColor"/>
+                                <nil key="highlightedColor"/>
+                            </label>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="zbb-K9-Idp">
+                                <rect key="frame" x="87" y="0.0" width="240" height="57"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="sOI-Vj-xHi">
+                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="57"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="OWZ-6c-L3c">
+                                        <rect key="frame" x="200" y="0.0" width="20" height="57"/>
+                                        <constraints>
+                                            <constraint firstAttribute="width" constant="20" id="VfC-cg-Lvb"/>
+                                        </constraints>
+                                    </imageView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="OWZ-6c-L3c" secondAttribute="trailing" constant="20" id="EQf-ld-6kX"/>
+                                    <constraint firstAttribute="width" constant="240" id="O3X-W2-b5j"/>
+                                    <constraint firstAttribute="bottom" secondItem="OWZ-6c-L3c" secondAttribute="bottom" id="U7E-YR-7pF"/>
+                                    <constraint firstItem="sOI-Vj-xHi" firstAttribute="leading" secondItem="zbb-K9-Idp" secondAttribute="leading" id="bLc-DU-s64"/>
+                                    <constraint firstItem="OWZ-6c-L3c" firstAttribute="top" secondItem="zbb-K9-Idp" secondAttribute="top" id="pmw-42-zoX"/>
+                                    <constraint firstAttribute="bottom" secondItem="sOI-Vj-xHi" secondAttribute="bottom" id="u7m-Hd-rrZ"/>
+                                    <constraint firstItem="sOI-Vj-xHi" firstAttribute="top" secondItem="zbb-K9-Idp" secondAttribute="top" id="xuH-eu-dtP"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                        <constraints>
+                            <constraint firstAttribute="trailing" secondItem="zbb-K9-Idp" secondAttribute="trailing" id="NVE-1n-xMS"/>
+                            <constraint firstItem="zbb-K9-Idp" firstAttribute="top" secondItem="bV4-sF-32w" secondAttribute="top" id="OTY-nS-ddf"/>
+                            <constraint firstAttribute="bottom" secondItem="btT-N3-hdv" secondAttribute="bottom" id="TGu-nu-uA7"/>
+                            <constraint firstItem="btT-N3-hdv" firstAttribute="top" secondItem="bV4-sF-32w" secondAttribute="top" id="g7g-AG-sAb"/>
+                            <constraint firstItem="btT-N3-hdv" firstAttribute="leading" secondItem="bV4-sF-32w" secondAttribute="leading" constant="20" id="jg8-0E-fQD"/>
+                            <constraint firstAttribute="bottom" secondItem="zbb-K9-Idp" secondAttribute="bottom" id="sEe-BQ-eCB"/>
+                        </constraints>
+                    </view>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="bV4-sF-32w" secondAttribute="bottom" id="2XR-vU-D7f"/>
+                    <constraint firstItem="bV4-sF-32w" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="9YK-8K-X11"/>
+                    <constraint firstAttribute="trailing" secondItem="bV4-sF-32w" secondAttribute="trailing" id="PCp-83-A13"/>
+                    <constraint firstItem="bV4-sF-32w" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="o9v-1r-lBI"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="bg1View" destination="bV4-sF-32w" id="dKq-54-jrq"/>
+                <outlet property="img1View" destination="OWZ-6c-L3c" id="5J1-As-hyf"/>
+                <outlet property="title1Lab" destination="btT-N3-hdv" id="pEP-jR-Kj0"/>
+                <outlet property="value1Lab" destination="sOI-Vj-xHi" id="poQ-HJ-L19"/>
+            </connections>
+            <point key="canvasLocation" x="-23.664122137404579" y="24.295774647887324"/>
+        </tableViewCell>
+    </objects>
+</document>

+ 462 - 0
Koala/Koala/Modular/Deal/V/Deal/DealSimCell.swift

@@ -0,0 +1,462 @@
+//
+//  DealSimCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/27.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class DealSimCell: BaseTableViewCell {
+    @IBOutlet weak var bg1View: UIView!
+    @IBOutlet weak var directionTitleLab: UILabel!
+    @IBOutlet weak var buyBtn: UIButton!
+    @IBOutlet weak var sellBtn: UIButton!
+    
+    @IBOutlet weak var bg2View: UIView!
+    @IBOutlet weak var typeTitleBtn: UIButton!
+    @IBOutlet weak var typeSelectView: UIView!
+    @IBOutlet weak var typeLab: UILabel!
+    @IBOutlet weak var typeImgView: UIImageView!
+    
+    @IBOutlet weak var bg3View: UIView!
+    @IBOutlet weak var priceTitleBtn: UIButton!
+    @IBOutlet weak var priceText: UITextField!
+    @IBOutlet weak var priceAddBtn: UIButton!
+    @IBOutlet weak var priceSubBtn: UIButton!
+    
+    @IBOutlet weak var bg4View: UIView!
+    @IBOutlet weak var unitTitleBtn: UIButton!
+    @IBOutlet weak var unitText: UITextField!
+    @IBOutlet weak var unitSubBtn: UIButton!
+    @IBOutlet weak var unitAddBtn: UIButton!
+    
+    @IBOutlet weak var bg5View: UIView!
+    @IBOutlet weak var numTitleLab: UILabel!
+    @IBOutlet weak var multipleTitleLab: UILabel!
+    @IBOutlet weak var numLab: UILabel!
+    @IBOutlet weak var multipleLab: UILabel!
+    @IBOutlet weak var amountTitleLab: UILabel!
+    @IBOutlet weak var buyTitleLab: UILabel!
+    @IBOutlet weak var amountLab: UILabel!
+    @IBOutlet weak var buyLab: UILabel!
+    
+    
+    @IBOutlet weak var bg6View: UIView!
+    @IBOutlet weak var limitTitleBtn: UIButton!
+    @IBOutlet weak var limitSelectView: UIView!
+    @IBOutlet weak var limitLab: UILabel!
+    @IBOutlet weak var limitImgView: UIImageView!
+    
+    @IBOutlet weak var bg7View: UIView!
+    @IBOutlet weak var submitBtn: UIButton!
+    
+    
+    var VM:DealViewModel = DealViewModel()
+    
+    var refreshBlock: (() -> ())?
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ViewBorderColor
+        
+        self.bg1View.backgroundColor = ALLBackGroundColor
+        self.bg2View.backgroundColor = ALLBackGroundColor
+        self.bg3View.backgroundColor = ALLBackGroundColor
+        self.bg4View.backgroundColor = ALLBackGroundColor
+        self.bg5View.backgroundColor = ALLBackGroundColor
+        self.bg6View.backgroundColor = ALLBackGroundColor
+        self.bg7View.backgroundColor = ALLBackGroundColor
+        
+        self.directionTitleLab.text = switchLanguage("方向")
+        self.directionTitleLab.setTextFont(.PFSR, 13)
+        self.directionTitleLab.textColor = GrayTextColor
+        
+        self.buyBtn.setTitle(switchLanguage("买入"), for: .normal)
+        self.buyBtn.setTextFont(.PFSR, 16)
+        
+        self.sellBtn.setTitle(switchLanguage("卖出"), for: .normal)
+        self.sellBtn.setTextFont(.PFSR, 16)
+        
+        self.typeTitleBtn.setTextFont(.PFSR, 13)
+        self.typeTitleBtn.setTitle(switchLanguage("类型"), for: .normal)
+        self.typeTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.typeTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.typeTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.typeLab.textColor = TitleTextColor
+        self.typeLab.setTextFont(.PFSR, 14)
+        
+        self.typeImgView.image = _image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color: LightTextColor)
+        
+        self.priceTitleBtn.setTextFont(.PFSR, 13)
+        self.priceTitleBtn.setTitle(switchLanguage("价格"), for: .normal)
+        self.priceTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+      
+        self.priceText.textColor = TitleTextColor
+        self.priceText.setTextFont(.PFSR, 14)
+        self.priceText.delegate = self
+        self.priceText.addTarget(self, action:  #selector(inputChange(_:)), for: .editingChanged)
+        
+        self.priceSubBtn.setTitle("-", for: .normal)
+        self.priceSubBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.priceSubBtn.setTextFont(.PFSM, 20)
+        
+        self.priceAddBtn.setTitle("+", for: .normal)
+        self.priceAddBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.priceAddBtn.setTextFont(.PFSM, 20)
+        
+        self.unitTitleBtn.setTextFont(.PFSR, 13)
+        self.unitTitleBtn.setTitle(switchLanguage("单位"), for: .normal)
+        self.unitTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.unitTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.unitTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.unitText.textColor = TitleTextColor
+        self.unitText.setTextFont(.PFSR, 14)
+        self.unitText.delegate = self
+        self.unitText.addTarget(self, action:  #selector(inputChange(_:)), for: .editingChanged)
+        
+        self.unitSubBtn.setTitle("-", for: .normal)
+        self.unitSubBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.unitSubBtn.setTextFont(.PFSM, 20)
+        
+        self.unitAddBtn.setTitle("+", for: .normal)
+        self.unitAddBtn.setTitleColor(TitleTextColor, for: .normal)
+        self.unitAddBtn.setTextFont(.PFSM, 20)
+        
+        self.numTitleLab.text = switchLanguage("数量")
+        self.numTitleLab.setTextFont(.PFSR, 12)
+        self.numTitleLab.textColor = GrayTextColor
+        
+        self.numLab.text  = "0"
+        self.numLab.setTextFont(.PFSR, 12)
+        self.numLab.textColor = TitleTextColor
+        
+        self.amountTitleLab.text = switchLanguage("金额")
+        self.amountTitleLab.setTextFont(.PFSR, 12)
+        self.amountTitleLab.textColor = GrayTextColor
+        
+        self.amountLab.text  = "0"
+        self.amountLab.setTextFont(.PFSR, 12)
+        self.amountLab.textColor = TitleTextColor
+        
+        self.multipleTitleLab.text = switchLanguage("最大倍数")
+        self.multipleTitleLab.setTextFont(.PFSR, 12)
+        self.multipleTitleLab.textColor = GrayTextColor
+        
+        self.multipleLab.text  = "0"
+        self.multipleLab.setTextFont(.PFSR, 12)
+        self.multipleLab.textColor = TitleTextColor
+        
+        self.buyTitleLab.text = switchLanguage("最大可买")
+        self.buyTitleLab.setTextFont(.PFSR, 12)
+        self.buyTitleLab.textColor = GrayTextColor
+        
+        self.buyLab.text  = "0"
+        self.buyLab.setTextFont(.PFSR, 12)
+        self.buyLab.textColor = TitleTextColor
+        
+        
+        self.limitTitleBtn.setTextFont(.PFSR, 13)
+        self.limitTitleBtn.setTitle(switchLanguage("期限"), for: .normal)
+        self.limitTitleBtn.setTitleColor(GrayTextColor, for: .normal)
+        self.limitTitleBtn.setImage(_image("Deal_W_Hint&Deal_W_Hint").imageWithTintColor(color: LightTextColor), for: .normal)
+        self.limitTitleBtn.layoutButtonEdgeInsetStyle(type: .right, space: 2)
+        
+        self.limitLab.textColor = TitleTextColor
+        self.limitLab.setTextFont(.PFSR, 14)
+        
+        self.limitImgView.image = _image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color:LightTextColor)
+        
+        self.submitBtn.setTextFont(.PFSR, 14)
+        self.submitBtn.setTitleColor(WhiteTextColor, for: .normal)
+        self.submitBtn.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 20)
+        
+        
+        self.buyBtn.addTarget(self, action: #selector(clickBuyBtnAction), for: .touchUpInside)
+        
+        self.sellBtn.addTarget(self, action: #selector(clickSellBtnAction), for: .touchUpInside)
+        
+        let tap1 = UITapGestureRecognizer(target: self, action: #selector(clickSelectTypeAction))
+        self.typeSelectView.addGestureRecognizer(tap1)
+
+        self.priceSubBtn.addTarget(self, action: #selector(clickPriceSubBtnAction), for: .touchUpInside)
+        
+        self.priceAddBtn.addTarget(self, action: #selector(clickPriceAddBtnAction), for: .touchUpInside)
+        
+        self.unitSubBtn.addTarget(self, action: #selector(clickUnitSubBtnAction), for: .touchUpInside)
+        
+        self.unitAddBtn.addTarget(self, action: #selector(clickUnitAddBtnAction), for: .touchUpInside)
+      
+        let tap2 = UITapGestureRecognizer(target: self, action: #selector(clickLimitSelectViewAction))
+        self.limitSelectView.addGestureRecognizer(tap2)
+        
+        self.submitBtn.addTarget(self, action: #selector(clickSubmitBtnAction), for: .touchUpInside)
+      
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    
+    func updateCellWith(vm:DealViewModel) -> Void {
+        self.VM = vm
+        
+        self.updateBuySell(isSell: vm.isSell)
+        
+        if vm.isMarket{
+            self.typeLab.text = switchLanguage("市价单")
+            self.bg3View.isHidden = true
+            self.bg6View.isHidden = true
+        }else{
+            self.typeLab.text = switchLanguage("限价单")
+            self.bg3View.isHidden = false
+            self.bg6View.isHidden = false
+        }
+        
+        if vm.isDayLimit{
+            self.limitLab.text = switchLanguage("当日有效")
+        }else{
+            self.limitLab.text = switchLanguage("撤单前有效")
+        }
+        
+        self.priceText.text = vm.price
+        self.unitText.text = vm.num
+        
+        self.multipleLab.text = vm.selectSymbolModel.contract_size
+        
+        self.updateNum()
+        self.updateAmount()
+        self.updateMax()
+        
+    }
+    
+}
+
+extension DealSimCell{
+    @objc func clickBuyBtnAction(){
+        self.VM.isSell = false
+        self.updateBuySell(isSell: false)
+    }
+    
+    @objc func clickSellBtnAction(){
+        self.VM.isSell = true
+        self.updateBuySell(isSell: true)
+    }
+    
+    @objc func clickSelectTypeAction(){
+        let pop = KSelectBottonPopView()
+        var data = [[String:Any]]()
+        let text1 = String(format: "%@\n%@",switchLanguage("限价单"),switchLanguage("以指定价格买入/卖出"))
+        let att1 = NSMutableAttributedString.init(string: text1,attributes: [NSAttributedString.Key.foregroundColor: TitleTextColor,NSAttributedString.Key.font:_PFSR(14)])
+        let range1 = (text1 as NSString).range(of:switchLanguage("以指定价格买入/卖出"))
+        att1.addAttributes([NSAttributedString.Key.foregroundColor:LightTextColor ,NSAttributedString.Key.font:_PFSR(12)], range: range1)
+        data.append(["attText":att1])
+        
+        let text2 = String(format: "%@\n%@",switchLanguage("市价单"),switchLanguage("以目前市场价格买入/卖出"))
+        let att2 = NSMutableAttributedString.init(string: text2,attributes: [NSAttributedString.Key.foregroundColor: TitleTextColor,NSAttributedString.Key.font:_PFSR(14)])
+        let range2 = (text2 as NSString).range(of:switchLanguage("以目前市场价格买入/卖出"))
+        att2.addAttributes([NSAttributedString.Key.foregroundColor:LightTextColor ,NSAttributedString.Key.font:_PFSR(12)], range: range2)
+        data.append(["attText":att2])
+        
+        if self.VM.isMarket {
+            pop.select = 1
+        }else{
+            pop.select = 0
+        }
+    
+        pop.showPopupView(source: data) { index in
+            if index >= 0 {
+                if index == 0{
+                    self.VM.isMarket = false
+                   
+                }else{
+                    self.VM.isMarket = true
+                }
+                
+                self.refreshBlock?()
+            }
+        }
+    }
+    
+    @objc func clickPriceSubBtnAction(){
+        if conerData(self.VM.price, .MyDouble).2! > 0{
+            self.VM.price = decimalNumber(A: self.VM.price, B: "0.001", type: .Subtract)
+            self.priceText.text = self.VM.price
+            self.updateAmount()
+            self.updateMax()
+        }
+       
+    }
+    
+    @objc func clickPriceAddBtnAction(){
+        self.VM.price = decimalNumber(A: self.VM.price, B: "0.001", type: .Add)
+        self.priceText.text = self.VM.price
+        self.updateAmount()
+        self.updateMax()
+    }
+    
+    @objc func clickUnitSubBtnAction(){
+        if conerData(self.VM.num, .MyDouble).2! > 0{
+            self.VM.num = decimalNumber(A: self.VM.num, B: "0.01", type: .Subtract)
+            self.unitText.text = self.VM.num
+            self.updateNum()
+            self.updateAmount()
+        }
+    }
+    
+    @objc func clickUnitAddBtnAction(){
+        self.VM.num = decimalNumber(A: self.VM.num, B: "0.01", type: .Add)
+        self.unitText.text = self.VM.num
+        self.updateNum()
+        self.updateAmount()
+    }
+    
+    @objc func clickLimitSelectViewAction(){
+        let pop = KSelectBottonPopView()
+        var data = [[String:Any]]()
+        data = [
+            ["text":switchLanguage("当日有效")],
+            ["text":switchLanguage("撤单前有效")],
+        ]
+        if self.VM.isDayLimit {
+            pop.select = 0
+        }else{
+            pop.select = 1
+        }
+        pop.showPopupView(source: data) { index in
+            if index >= 0 {
+                if index == 0{
+                    self.VM.isDayLimit = true
+                }else{
+                    self.VM.isDayLimit = false
+                }
+                
+                self.refreshBlock?()
+            }
+        }
+    }
+    
+    @objc func clickSubmitBtnAction(){
+        self.endEditing(true)
+        guard OperationalUserInfoData.getLogin() else {
+            currentVc()!.navigationController?.pushViewController(LoginViewController(), animated: true)
+            return
+        }
+       
+        guard (self.VM.num).length > 0 else {
+            ProgressHUD.showInfo(status: switchLanguage("请输入单位"))
+            return
+        }
+        
+        if self.VM.isMarket {
+            if self.VM.isSell{
+                self.VM.selectOrderType = 1
+            }else{
+                self.VM.selectOrderType = 0
+            }
+            self.VM.netOpenPosition()
+        }else{
+            
+            guard (self.VM.price).length > 0 else {
+                ProgressHUD.showInfo(status: switchLanguage("请输入价格"))
+                return
+            }
+            
+            if self.VM.isSell{
+                self.VM.selectOrderType = 3
+            }else{
+                self.VM.selectOrderType = 2
+            }
+            
+            self.VM.netOpenEntrustn()
+        }
+        
+       
+    }
+    
+}
+
+extension DealSimCell{
+    func updateBuySell(isSell:Bool) -> Void {
+        if isSell{
+            self.buyBtn.setTitleColor(GrayTextColor, for: .normal)
+            self.sellBtn.setTitleColor(WhiteTextColor, for: .normal)
+            
+            let color = exchangeColorAndImage(increase: -1).0
+            self.buyBtn.setBackgroundImage(_image("Deal_W_Left&Deal_W_Left").imageWithTintColor(color:ViewBorderColor), for: .normal)
+            self.sellBtn.setBackgroundImage(_image("Deal_W_Right&Deal_W_Right").imageWithTintColor(color:color), for: .normal)
+            
+            self.buyTitleLab.text = switchLanguage("最大可买")
+            self.submitBtn.backgroundColor = color
+            self.submitBtn.setTitle(switchLanguage("卖出"), for: .normal)
+            
+        }else{
+            self.sellBtn.setTitleColor(GrayTextColor, for: .normal)
+            self.buyBtn.setTitleColor(WhiteTextColor, for: .normal)
+            
+            let color = exchangeColorAndImage(increase: 1).0
+            self.buyBtn.setBackgroundImage(_image("Deal_W_Left&Deal_W_Left").imageWithTintColor(color:color), for: .normal)
+            self.sellBtn.setBackgroundImage(_image("Deal_W_Right&Deal_W_Right").imageWithTintColor(color:ViewBorderColor), for: .normal)
+            
+            self.buyTitleLab.text = switchLanguage("最大可卖")
+            self.submitBtn.backgroundColor = color
+            self.submitBtn.setTitle(switchLanguage("买入"), for: .normal)
+        }
+    }
+    
+    func updateNum() -> Void {
+        self.numLab.text = decimalNumber(A: self.VM.selectSymbolModel.contract_size, B: self.VM.num, type: .Multiply)
+    }
+    
+    func updateAmount() -> Void {
+        let num = self.numLab.text ?? "0"
+        self.amountLab.text = decimalNumber(A:num, B: self.VM.price, type: .Multiply)
+    }
+    
+    func updateMax() -> Void {
+        self.amountLab.text = decimalNumber(A:self.VM.accountInfoModel.margin_free, B: self.VM.price, type: .Divid)
+    }
+}
+
+extension DealSimCell:UITextFieldDelegate{
+    //限制输入
+    func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
+        let existingString: NSString = textField.text as NSString? ?? "" as NSString
+        let candidateString =  existingString.replacingCharacters(in: range, with: string)
+        if candidateString.length < existingString.length {
+            return true
+        }
+        if candidateString.length > 0 {
+          
+           let pp = NSString(format: "(([0]|(0[.]\\d{0,%@}))|([1-9]\\d{0,50}(([.]\\d{0,%@})?)))?","50","50")
+            let predicate = NSPredicate.init(format: "SELF MATCHES %@",pp)
+            if !predicate .evaluate(with: candidateString){
+                return false
+            }
+        }
+       
+        return true
+    }
+    
+    //MARK:- 输入框的变化
+    @objc func inputChange(_ textField : UITextField){
+        let text = textField.text ?? ""
+        if textField == self.priceText{
+            self.VM.price = text
+            self.updateAmount()
+            self.updateMax()
+        }else{
+            self.VM.num = text
+            self.updateNum()
+            self.updateAmount()
+        }
+       
+    }
+   
+}

+ 421 - 0
Koala/Koala/Modular/Deal/V/Deal/DealSimCell.xib

@@ -0,0 +1,421 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" useSafeAreas="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="Safe area layout guides" minToolsVersion="9.0"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="375" id="KGk-i7-Jjw" customClass="DealSimCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="449" height="375"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="449" height="375"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="1" translatesAutoresizingMaskIntoConstraints="NO" id="ser-BQ-cJ7">
+                        <rect key="frame" x="0.0" y="0.0" width="449" height="366"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Vdm-cE-kZV">
+                                <rect key="frame" x="0.0" y="0.0" width="449" height="40"/>
+                                <subviews>
+                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c6D-JE-IZH">
+                                        <rect key="frame" x="20.000000000000004" y="0.0" width="41.333333333333343" height="40"/>
+                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                        <nil key="textColor"/>
+                                        <nil key="highlightedColor"/>
+                                    </label>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="JwU-zM-x1e">
+                                        <rect key="frame" x="209" y="5" width="220" height="30"/>
+                                        <subviews>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Tqy-C5-19Z">
+                                                <rect key="frame" x="0.0" y="0.0" width="120" height="30"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EE1-45-jhR">
+                                                <rect key="frame" x="100" y="0.0" width="120" height="30"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <constraints>
+                                            <constraint firstItem="Tqy-C5-19Z" firstAttribute="top" secondItem="JwU-zM-x1e" secondAttribute="top" id="3ur-MS-Hdr"/>
+                                            <constraint firstAttribute="bottom" secondItem="EE1-45-jhR" secondAttribute="bottom" id="BCB-K0-XB4"/>
+                                            <constraint firstAttribute="trailing" secondItem="EE1-45-jhR" secondAttribute="trailing" id="CDF-wc-ZPw"/>
+                                            <constraint firstItem="Tqy-C5-19Z" firstAttribute="leading" secondItem="JwU-zM-x1e" secondAttribute="leading" id="NZ1-gR-7Q5"/>
+                                            <constraint firstItem="EE1-45-jhR" firstAttribute="top" secondItem="JwU-zM-x1e" secondAttribute="top" id="Zra-aJ-tJL"/>
+                                            <constraint firstItem="EE1-45-jhR" firstAttribute="leading" secondItem="Tqy-C5-19Z" secondAttribute="trailing" constant="-20" id="g2D-vL-tT0"/>
+                                            <constraint firstAttribute="width" constant="220" id="g8i-Ry-ZFe"/>
+                                            <constraint firstAttribute="bottom" secondItem="Tqy-C5-19Z" secondAttribute="bottom" id="jla-p9-RfS"/>
+                                            <constraint firstAttribute="bottom" secondItem="EE1-45-jhR" secondAttribute="bottom" id="kWA-8R-va0"/>
+                                            <constraint firstItem="EE1-45-jhR" firstAttribute="width" secondItem="Tqy-C5-19Z" secondAttribute="width" id="uVh-U0-aNw"/>
+                                            <constraint firstItem="EE1-45-jhR" firstAttribute="top" secondItem="JwU-zM-x1e" secondAttribute="top" id="zgg-YZ-ON5"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="JwU-zM-x1e" secondAttribute="bottom" constant="5" id="5mh-uN-uTu"/>
+                                    <constraint firstAttribute="height" constant="40" id="LNl-VY-eg3"/>
+                                    <constraint firstItem="JwU-zM-x1e" firstAttribute="top" secondItem="Vdm-cE-kZV" secondAttribute="top" constant="5" id="Upr-8c-TKr"/>
+                                    <constraint firstAttribute="trailing" secondItem="JwU-zM-x1e" secondAttribute="trailing" constant="20" id="XAP-iq-EQx"/>
+                                    <constraint firstItem="c6D-JE-IZH" firstAttribute="leading" secondItem="Vdm-cE-kZV" secondAttribute="leading" constant="20" id="beP-I8-B82"/>
+                                    <constraint firstAttribute="bottom" secondItem="c6D-JE-IZH" secondAttribute="bottom" id="jpT-Rn-gfF"/>
+                                    <constraint firstItem="c6D-JE-IZH" firstAttribute="top" secondItem="Vdm-cE-kZV" secondAttribute="top" id="uO5-0x-Lpf"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gYE-j7-qFo">
+                                <rect key="frame" x="0.0" y="41" width="449" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="acE-f5-Syb">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="j0d-dA-V4b">
+                                        <rect key="frame" x="209" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="9g9-T3-ayv">
+                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="9Vy-2t-YiU">
+                                                <rect key="frame" x="200" y="0.0" width="20" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="20" id="T3f-Ib-pax"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstItem="9g9-T3-ayv" firstAttribute="top" secondItem="j0d-dA-V4b" secondAttribute="top" id="2Hc-Vq-gBF"/>
+                                            <constraint firstItem="9Vy-2t-YiU" firstAttribute="centerY" secondItem="j0d-dA-V4b" secondAttribute="centerY" id="6nq-Z7-58C"/>
+                                            <constraint firstItem="9Vy-2t-YiU" firstAttribute="top" secondItem="j0d-dA-V4b" secondAttribute="top" id="8sI-JD-zEZ"/>
+                                            <constraint firstAttribute="bottom" secondItem="9g9-T3-ayv" secondAttribute="bottom" id="MLZ-Cg-rUK"/>
+                                            <constraint firstAttribute="trailing" secondItem="9Vy-2t-YiU" secondAttribute="trailing" constant="20" id="Swm-LP-ia6"/>
+                                            <constraint firstAttribute="width" constant="240" id="WUV-i7-hK0"/>
+                                            <constraint firstAttribute="bottom" secondItem="9Vy-2t-YiU" secondAttribute="bottom" id="eXK-Zc-3zf"/>
+                                            <constraint firstItem="9g9-T3-ayv" firstAttribute="leading" secondItem="j0d-dA-V4b" secondAttribute="leading" id="sQJ-M8-pXM"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="j0d-dA-V4b" firstAttribute="top" secondItem="gYE-j7-qFo" secondAttribute="top" id="0BA-Df-WbO"/>
+                                    <constraint firstItem="acE-f5-Syb" firstAttribute="leading" secondItem="gYE-j7-qFo" secondAttribute="leading" constant="20" id="2d3-0w-G2L"/>
+                                    <constraint firstAttribute="trailing" secondItem="j0d-dA-V4b" secondAttribute="trailing" id="8NE-3h-iez"/>
+                                    <constraint firstItem="acE-f5-Syb" firstAttribute="top" secondItem="gYE-j7-qFo" secondAttribute="top" id="DYZ-0a-cGV"/>
+                                    <constraint firstAttribute="height" constant="40" id="Fjg-wb-Icc"/>
+                                    <constraint firstAttribute="bottom" secondItem="acE-f5-Syb" secondAttribute="bottom" id="dJV-jv-4Ps"/>
+                                    <constraint firstAttribute="bottom" secondItem="j0d-dA-V4b" secondAttribute="bottom" id="h6a-0S-8mW"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="bSw-5N-OhK">
+                                <rect key="frame" x="0.0" y="82" width="449" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="4Ql-cj-hUm">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="gVo-84-wI0">
+                                        <rect key="frame" x="209" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="glY-GX-woa">
+                                                <rect key="frame" x="0.0" y="0.0" width="160" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                <textInputTraits key="textInputTraits"/>
+                                            </textField>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="EDc-c5-dWb">
+                                                <rect key="frame" x="160" y="0.0" width="40" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="KZq-ZA-eBJ">
+                                                <rect key="frame" x="200" y="0.0" width="40" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" secondItem="KZq-ZA-eBJ" secondAttribute="height" multiplier="1:1" id="fOD-fG-3Y2"/>
+                                                </constraints>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="KZq-ZA-eBJ" firstAttribute="width" secondItem="EDc-c5-dWb" secondAttribute="width" id="gHO-zw-ipe"/>
+                                            <constraint firstAttribute="width" constant="240" id="t44-yD-yfi"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="40" id="2L2-uW-6RY"/>
+                                    <constraint firstAttribute="bottom" secondItem="gVo-84-wI0" secondAttribute="bottom" id="80b-eS-ren"/>
+                                    <constraint firstAttribute="trailing" secondItem="gVo-84-wI0" secondAttribute="trailing" id="DDF-qz-hdo"/>
+                                    <constraint firstItem="4Ql-cj-hUm" firstAttribute="leading" secondItem="bSw-5N-OhK" secondAttribute="leading" constant="20" id="Jba-HT-fAz"/>
+                                    <constraint firstItem="4Ql-cj-hUm" firstAttribute="top" secondItem="bSw-5N-OhK" secondAttribute="top" id="NCm-rH-2CL"/>
+                                    <constraint firstAttribute="bottom" secondItem="4Ql-cj-hUm" secondAttribute="bottom" id="T97-w0-Pkc"/>
+                                    <constraint firstItem="gVo-84-wI0" firstAttribute="top" secondItem="bSw-5N-OhK" secondAttribute="top" id="U4C-Io-yB9"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="9iE-IQ-Tn2">
+                                <rect key="frame" x="0.0" y="123" width="449" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Rgn-0a-rH7">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="wKu-MI-kHz">
+                                        <rect key="frame" x="209" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <textField opaque="NO" contentMode="scaleToFill" horizontalHuggingPriority="248" contentHorizontalAlignment="left" contentVerticalAlignment="center" textAlignment="natural" minimumFontSize="17" translatesAutoresizingMaskIntoConstraints="NO" id="9iZ-G6-zz2">
+                                                <rect key="frame" x="0.0" y="0.0" width="160" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="14"/>
+                                                <textInputTraits key="textInputTraits"/>
+                                            </textField>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="heg-ik-ErS">
+                                                <rect key="frame" x="160" y="0.0" width="40" height="40"/>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                            <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="lIO-ob-VFu">
+                                                <rect key="frame" x="200" y="0.0" width="40" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" secondItem="lIO-ob-VFu" secondAttribute="height" multiplier="1:1" id="yEa-5t-EUQ"/>
+                                                </constraints>
+                                                <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                            </button>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="lIO-ob-VFu" firstAttribute="width" secondItem="heg-ik-ErS" secondAttribute="width" id="fgw-hl-Wae"/>
+                                            <constraint firstAttribute="width" constant="240" id="i3E-S7-iMu"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="trailing" secondItem="wKu-MI-kHz" secondAttribute="trailing" id="Kjj-sv-S5U"/>
+                                    <constraint firstAttribute="bottom" secondItem="Rgn-0a-rH7" secondAttribute="bottom" id="RIL-Sf-vup"/>
+                                    <constraint firstItem="Rgn-0a-rH7" firstAttribute="leading" secondItem="9iE-IQ-Tn2" secondAttribute="leading" constant="20" id="bA0-xF-PPz"/>
+                                    <constraint firstAttribute="bottom" secondItem="wKu-MI-kHz" secondAttribute="bottom" id="bUm-tg-P0a"/>
+                                    <constraint firstItem="Rgn-0a-rH7" firstAttribute="top" secondItem="9iE-IQ-Tn2" secondAttribute="top" id="dVq-ZD-0oT"/>
+                                    <constraint firstItem="wKu-MI-kHz" firstAttribute="top" secondItem="9iE-IQ-Tn2" secondAttribute="top" id="iSn-Aj-hbY"/>
+                                    <constraint firstAttribute="height" constant="40" id="msp-lD-Ctj"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="d6q-pe-1d8">
+                                <rect key="frame" x="0.0" y="164" width="449" height="80"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" spacing="30" translatesAutoresizingMaskIntoConstraints="NO" id="lqa-eo-LFr">
+                                        <rect key="frame" x="223.66666666666663" y="14.666666666666654" width="205.33333333333337" height="50.666666666666657"/>
+                                        <subviews>
+                                            <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="tri-xV-Fry">
+                                                <rect key="frame" x="0.0" y="0.0" width="87.666666666666671" height="50.666666666666664"/>
+                                                <subviews>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="FOM-GA-PBt">
+                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="FIS-cp-M3k">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fi3-af-L3L">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="WnJ-wS-GIL">
+                                                        <rect key="frame" x="46.333333333333343" y="0.0" width="41.333333333333343" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fu4-Ll-IT6">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fdn-7z-azS">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                </subviews>
+                                            </stackView>
+                                            <stackView opaque="NO" contentMode="scaleToFill" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="7ha-x4-NBd">
+                                                <rect key="frame" x="117.66666666666666" y="0.0" width="87.666666666666657" height="50.666666666666664"/>
+                                                <subviews>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="df4-fv-TL3">
+                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="s9q-k0-NeA">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="zQn-Ad-1ot">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="6LJ-l7-Mse">
+                                                        <rect key="frame" x="46.333333333333371" y="0.0" width="41.333333333333343" height="50.666666666666664"/>
+                                                        <subviews>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="wGJ-Wg-Kw7">
+                                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="fut-yr-GC3">
+                                                                <rect key="frame" x="0.0" y="30.333333333333343" width="41.333333333333336" height="20.333333333333329"/>
+                                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                                <nil key="textColor"/>
+                                                                <nil key="highlightedColor"/>
+                                                            </label>
+                                                        </subviews>
+                                                    </stackView>
+                                                </subviews>
+                                            </stackView>
+                                        </subviews>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="height" constant="80" id="KU9-qG-SJG"/>
+                                    <constraint firstAttribute="trailing" secondItem="lqa-eo-LFr" secondAttribute="trailing" constant="20" id="Nwy-Dr-bWB"/>
+                                    <constraint firstItem="lqa-eo-LFr" firstAttribute="centerY" secondItem="d6q-pe-1d8" secondAttribute="centerY" id="xDm-0P-9si"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="m4f-h9-Izb">
+                                <rect key="frame" x="0.0" y="245" width="449" height="40"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="jh1-sh-MpB">
+                                        <rect key="frame" x="20" y="0.0" width="30" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="meC-jx-gSk">
+                                        <rect key="frame" x="209" y="0.0" width="240" height="40"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7rq-CW-m6L">
+                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="40"/>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="center" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="Guq-oI-pg3">
+                                                <rect key="frame" x="200" y="0.0" width="20" height="40"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="20" id="HAn-hQ-RtS"/>
+                                                </constraints>
+                                            </imageView>
+                                        </subviews>
+                                        <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                        <constraints>
+                                            <constraint firstItem="Guq-oI-pg3" firstAttribute="centerY" secondItem="meC-jx-gSk" secondAttribute="centerY" id="547-1l-UQt"/>
+                                            <constraint firstAttribute="trailing" secondItem="Guq-oI-pg3" secondAttribute="trailing" constant="20" id="8QL-az-9eg"/>
+                                            <constraint firstAttribute="width" constant="240" id="G0B-bc-57o"/>
+                                            <constraint firstItem="Guq-oI-pg3" firstAttribute="top" secondItem="meC-jx-gSk" secondAttribute="top" id="Hik-xW-r7F"/>
+                                            <constraint firstItem="7rq-CW-m6L" firstAttribute="top" secondItem="meC-jx-gSk" secondAttribute="top" id="ZrW-j3-B8v"/>
+                                            <constraint firstItem="7rq-CW-m6L" firstAttribute="leading" secondItem="meC-jx-gSk" secondAttribute="leading" id="mxe-ka-gbs"/>
+                                            <constraint firstAttribute="bottom" secondItem="Guq-oI-pg3" secondAttribute="bottom" id="oLM-t8-jIV"/>
+                                            <constraint firstAttribute="bottom" secondItem="7rq-CW-m6L" secondAttribute="bottom" id="tx5-ah-Aih"/>
+                                        </constraints>
+                                    </view>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="jh1-sh-MpB" firstAttribute="leading" secondItem="m4f-h9-Izb" secondAttribute="leading" constant="20" id="3JS-bb-Ng3"/>
+                                    <constraint firstAttribute="height" constant="40" id="6Bk-mq-qiR"/>
+                                    <constraint firstAttribute="bottom" secondItem="meC-jx-gSk" secondAttribute="bottom" id="Fos-rr-NM6"/>
+                                    <constraint firstItem="meC-jx-gSk" firstAttribute="top" secondItem="m4f-h9-Izb" secondAttribute="top" id="OPN-tD-eD6"/>
+                                    <constraint firstAttribute="trailing" secondItem="meC-jx-gSk" secondAttribute="trailing" id="bhv-vY-xnc"/>
+                                    <constraint firstItem="jh1-sh-MpB" firstAttribute="top" secondItem="m4f-h9-Izb" secondAttribute="top" id="qC9-kN-eCi"/>
+                                    <constraint firstAttribute="bottom" secondItem="jh1-sh-MpB" secondAttribute="bottom" id="rjR-mx-W11"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ouv-ku-TY2">
+                                <rect key="frame" x="0.0" y="286" width="449" height="80"/>
+                                <subviews>
+                                    <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Gl7-e7-2qG">
+                                        <rect key="frame" x="20" y="20" width="409" height="40"/>
+                                        <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                                    </button>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="Gl7-e7-2qG" secondAttribute="bottom" constant="20" id="GiL-hf-ZRX"/>
+                                    <constraint firstItem="Gl7-e7-2qG" firstAttribute="top" secondItem="ouv-ku-TY2" secondAttribute="top" constant="20" id="Rat-kl-wzU"/>
+                                    <constraint firstAttribute="trailing" secondItem="Gl7-e7-2qG" secondAttribute="trailing" constant="20" id="Rim-Ts-zxU"/>
+                                    <constraint firstAttribute="height" constant="80" id="WUI-ra-l0P"/>
+                                    <constraint firstItem="Gl7-e7-2qG" firstAttribute="leading" secondItem="ouv-ku-TY2" secondAttribute="leading" constant="20" id="zhE-Y8-nKj"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstAttribute="bottom" secondItem="ser-BQ-cJ7" secondAttribute="bottom" id="CJd-qf-hrL"/>
+                    <constraint firstItem="ser-BQ-cJ7" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="JBo-fB-Vux"/>
+                    <constraint firstAttribute="trailing" secondItem="ser-BQ-cJ7" secondAttribute="trailing" id="OQU-zu-bWt"/>
+                    <constraint firstItem="ser-BQ-cJ7" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="Pe3-YT-fl4"/>
+                </constraints>
+            </tableViewCellContentView>
+            <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
+            <connections>
+                <outlet property="amountLab" destination="wGJ-Wg-Kw7" id="6Wq-Ac-kfU"/>
+                <outlet property="amountTitleLab" destination="s9q-k0-NeA" id="ylx-41-vF2"/>
+                <outlet property="bg1View" destination="Vdm-cE-kZV" id="2WV-Zq-qrw"/>
+                <outlet property="bg2View" destination="gYE-j7-qFo" id="ZkW-At-WMP"/>
+                <outlet property="bg3View" destination="bSw-5N-OhK" id="byY-ce-U4J"/>
+                <outlet property="bg4View" destination="9iE-IQ-Tn2" id="ka4-o5-fyc"/>
+                <outlet property="bg5View" destination="d6q-pe-1d8" id="KLH-0b-oVZ"/>
+                <outlet property="bg6View" destination="m4f-h9-Izb" id="Mwo-j9-uoO"/>
+                <outlet property="bg7View" destination="ouv-ku-TY2" id="6zd-2v-29a"/>
+                <outlet property="buyBtn" destination="Tqy-C5-19Z" id="Fku-5z-ahe"/>
+                <outlet property="buyLab" destination="fut-yr-GC3" id="cwB-1E-hRD"/>
+                <outlet property="buyTitleLab" destination="zQn-Ad-1ot" id="cdp-5b-PDp"/>
+                <outlet property="directionTitleLab" destination="c6D-JE-IZH" id="V9M-fl-MEf"/>
+                <outlet property="limitImgView" destination="Guq-oI-pg3" id="JMr-Zr-t5c"/>
+                <outlet property="limitLab" destination="7rq-CW-m6L" id="rcR-2Y-KEd"/>
+                <outlet property="limitSelectView" destination="meC-jx-gSk" id="IrO-US-5l2"/>
+                <outlet property="limitTitleBtn" destination="jh1-sh-MpB" id="nCL-70-btx"/>
+                <outlet property="multipleLab" destination="fdn-7z-azS" id="2qa-Lt-PMr"/>
+                <outlet property="multipleTitleLab" destination="fi3-af-L3L" id="bXt-ku-khv"/>
+                <outlet property="numLab" destination="fu4-Ll-IT6" id="FfN-DA-WEw"/>
+                <outlet property="numTitleLab" destination="FIS-cp-M3k" id="ZRc-4z-h2B"/>
+                <outlet property="priceAddBtn" destination="KZq-ZA-eBJ" id="ZX4-b3-vAt"/>
+                <outlet property="priceSubBtn" destination="EDc-c5-dWb" id="WOk-hk-7js"/>
+                <outlet property="priceText" destination="glY-GX-woa" id="iZm-yW-p3N"/>
+                <outlet property="priceTitleBtn" destination="4Ql-cj-hUm" id="nas-8W-F5K"/>
+                <outlet property="sellBtn" destination="EE1-45-jhR" id="ma0-xG-VIY"/>
+                <outlet property="submitBtn" destination="Gl7-e7-2qG" id="gvy-mR-S6N"/>
+                <outlet property="typeImgView" destination="9Vy-2t-YiU" id="Trf-Hq-EG1"/>
+                <outlet property="typeLab" destination="9g9-T3-ayv" id="Vcx-Vh-fpJ"/>
+                <outlet property="typeSelectView" destination="j0d-dA-V4b" id="v0d-Ii-Une"/>
+                <outlet property="typeTitleBtn" destination="acE-f5-Syb" id="mxN-qJ-8zO"/>
+                <outlet property="unitAddBtn" destination="lIO-ob-VFu" id="NLR-jq-8s6"/>
+                <outlet property="unitSubBtn" destination="heg-ik-ErS" id="mfe-bA-MLp"/>
+                <outlet property="unitText" destination="9iZ-G6-zz2" id="6AJ-3Q-Tfe"/>
+                <outlet property="unitTitleBtn" destination="Rgn-0a-rH7" id="vwr-PV-JkV"/>
+            </connections>
+            <point key="canvasLocation" x="206.87022900763358" y="177.81690140845072"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 316 - 0
Koala/Koala/Modular/Deal/V/Deal/DealSimDataCell.swift

@@ -0,0 +1,316 @@
+//
+//  DealSimDataCell.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/26.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class DealSimDataCell: BaseTableViewCell {
+    @IBOutlet weak var nameLab: UILabel!
+    @IBOutlet weak var codeLab: UILabel!
+    
+    @IBOutlet weak var chatsBgView: UIView!
+    @IBOutlet weak var priceLab: UILabel!
+    @IBOutlet weak var changeLab: UILabel!
+    
+    @IBOutlet weak var buyRateLab: UILabel!
+    @IBOutlet weak var sellRateLab: UILabel!
+    
+    @IBOutlet weak var stackView: UIStackView!
+    @IBOutlet weak var buyView: UIView!
+    @IBOutlet weak var sellView: UIView!
+    
+    @IBOutlet weak var buyTableView: UITableView!
+    @IBOutlet weak var sellTableView: UITableView!
+    
+    @IBOutlet weak var buyRateWidthConstraint: NSLayoutConstraint!
+    var VM:DealViewModel = DealViewModel()
+    var refreshBlock: (() -> ())?
+    var clickBlock: (() -> ())?
+    
+    lazy var lineView:JDChartLineView = {
+        let view:JDChartLineView = JDChartLineView()
+        view.lineChartView.minOffset = 0
+        view.shadowSize = CGSize(width: 0, height: 3)
+        view.isUserInteractionEnabled = false
+        view.lineChartView.isUserInteractionEnabled = false
+        return view
+    }()
+    
+    override func awakeFromNib() {
+        super.awakeFromNib()
+        self.backgroundColor = ALLBackGroundColor
+        
+        self.nameLab.setTextFont(.PFSM, 15)
+        self.nameLab.textColor = TitleTextColor
+        self.codeLab.setTextFont(.PFSR, 12)
+        self.codeLab.textColor = GrayTextColor
+        
+        self.changeLab.setTextFont(.PFSR, 14)
+        self.priceLab.setTextFont(.PFSR, 14)
+        
+        self.buyRateLab.setTextFont(.PFSR, 12)
+        self.buyRateLab.textColor = exchangeColorAndImage(increase: 1).0
+        self.buyRateLab.text = ""
+        self.sellRateLab.setTextFont(.PFSR, 12)
+        self.sellRateLab.textColor = exchangeColorAndImage(increase: -1).0
+        self.sellRateLab.text = ""
+        
+        self.buyView.backgroundColor = self.buyRateLab.textColor
+        
+        self.buyView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 2)
+        
+        self.sellView.backgroundColor = self.sellRateLab.textColor
+        self.sellView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 2)
+        
+    
+        self.buyTableView.delegate = self
+        self.buyTableView.dataSource = self
+        buyTableView.separatorStyle = .none
+        buyTableView.backgroundColor = .clear
+        buyTableView.tableFooterView = UIView()
+        buyTableView.tableHeaderView = UIView()
+        buyTableView.showsVerticalScrollIndicator = false
+        buyTableView.showsVerticalScrollIndicator = false
+   
+        buyTableView.base_registerCell(cellClass: DealSimDataListCell.self)
+        
+        self.sellTableView.delegate = self
+        self.sellTableView.dataSource = self
+        sellTableView.separatorStyle = .none
+        sellTableView.backgroundColor = .clear
+        sellTableView.tableFooterView = UIView()
+        sellTableView.tableHeaderView = UIView()
+        sellTableView.showsVerticalScrollIndicator = false
+        sellTableView.showsVerticalScrollIndicator = false
+   
+        sellTableView.base_registerCell(cellClass: DealSimDataListCell.self)
+        
+        self.chatsBgView.addSubview(self.lineView)
+        self.lineView.snp.makeConstraints { make in
+            make.edges.equalToSuperview()
+            make.top.equalTo(10)
+            make.bottom.equalTo(-10)
+        }
+        
+        let tap1 = UITapGestureRecognizer(target: self, action: #selector(clickSelectAction))
+        self.addGestureRecognizer(tap1)
+        
+    }
+    
+    @objc func clickSelectAction(){
+        self.clickBlock?()
+    }
+
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+
+        // Configure the view for the selected state
+    }
+    
+    func updateCellWith(vm:DealViewModel) -> Void {
+        self.VM = vm
+        
+        self.nameLab.text = vm.selectSymbolModel.title
+        self.codeLab.text = vm.selectSymbolModel.symbol
+        
+       
+        self.updateCellPrice(vm: vm)
+        self.updateRate(vm: vm)
+    }
+    
+    func updateCellPrice(vm:DealViewModel) -> Void {
+        self.priceLab.text = vm.selectSymbolModel.newPrice
+        self.changeLab.text = vm.selectSymbolModel.increase + "%"
+        
+        let color = exchangeColorAndImage(increase:conerData(vm.selectSymbolModel.increase, .MyFloat).1!).0
+        self.priceLab.textColor = color
+        self.changeLab.textColor = color
+        
+        self.lineView.updateDealSimData(fillColor: color , gradientColor: ALLBackGroundColor , data: vm.priceList)
+    }
+    
+    func updateRate(vm:DealViewModel) -> Void {
+        if vm.depthModel.bids.count == 0{
+            return
+        }
+        var buy:Double = 0
+        for model in vm.depthModel.bids {
+            buy += conerData(model.volume, .MyDouble).2!
+        }
+        var sell:Double = 0
+        for model in vm.depthModel.asks {
+            sell += conerData(model.volume, .MyDouble).2!
+        }
+        
+        let buyRate = buy / (buy+sell)
+        let sellRate = sell / (buy+sell)
+        
+        self.buyRateLab.text = String(format: "%.2f", buyRate*100)
+        self.sellRateLab.text = String(format: "%.2f", sellRate*100)
+        
+        self.updatePlan(rate: buyRate)
+        self.buyTableView.reloadData()
+        self.sellTableView.reloadData()
+        
+    }
+    
+    func updatePlan(rate:Double) -> Void {
+        let width = self.stackView.frame.size.width-2
+        self.buyRateWidthConstraint.constant = width * rate
+        
+    }
+    
+}
+
+extension DealSimDataCell:UITableViewDelegate,UITableViewDataSource{
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 1
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        if buyTableView == tableView{
+            let cell:DealSimDataListCell = tableView.base_dequeueReusableCell(indexPath: indexPath) as DealSimDataListCell
+            guard self.VM.depthModel.bids.count > 0 else{
+                return cell
+            }
+            cell.updateBuyCellWith(model: self.VM.depthModel.bids.first!, index: indexPath.row)
+            return cell
+        }else{
+            let cell:DealSimDataListCell = tableView.base_dequeueReusableCell(indexPath: indexPath) as DealSimDataListCell
+            guard self.VM.depthModel.asks.count > 0 else{
+                return cell
+            }
+            cell.updateSellCellWith(model: self.VM.depthModel.asks.first!, index: indexPath.row)
+            return cell
+        }
+       
+      
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return 20
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return UIView()
+    }
+   
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+        
+    }
+   
+
+}
+
+class DealSimDataListCell: BaseTableViewCell {
+    lazy var numLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSM, 10)
+        lab.textAlignment = .center
+        lab.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 2)
+        return lab
+    }()
+    
+    lazy var priceLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSM, 12)
+        return lab
+    }()
+    
+    lazy var volumeLab:UILabel = {
+        let lab:UILabel = UILabel.init()
+        lab.setTextFont(.PFSM, 12)
+        lab.textColor = TitleTextColor
+        return lab
+    }()
+    
+    lazy var bgView:UIView = {
+        let view:UIView = UIView.init()
+        view.addSubview(numLab)
+        view.addSubview(priceLab)
+        view.addSubview(volumeLab)
+        
+        self.numLab.snp.makeConstraints { make in
+            make.left.equalTo(2)
+            make.centerY.equalToSuperview()
+            make.width.height.equalTo(10);
+        }
+        
+        self.priceLab.snp.makeConstraints { make in
+            make.left.equalTo(self.priceLab.snp.right).offset(2)
+            make.centerY.equalToSuperview()
+        }
+        
+        self.volumeLab.snp.makeConstraints { make in
+            make.right.equalTo(-2)
+            make.centerY.equalToSuperview()
+        }
+        
+        return view
+    }()
+    
+   
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        self.backgroundColor = .clear
+        self.contentView.backgroundColor = .clear
+        self.contentView.addSubview(bgView)
+       
+        self.bgView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+        }
+    }
+  
+    override func layoutSubviews() {
+        super.layoutSubviews()
+       
+    }
+    
+    required convenience init(coder: NSCoder? = nil, style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        fatalError("init(coder:style:reuseIdentifier:) has not been implemented")
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    override func setSelected(_ selected: Bool, animated: Bool) {
+        super.setSelected(selected, animated: animated)
+        self.contentView.backgroundColor = .clear
+        self.backgroundColor = .clear
+        self.selectedBackgroundView?.backgroundColor =  .clear
+    }
+    
+    
+    func updateBuyCellWith(model:AsksOrBidsModel,index:Int) -> Void {
+        self.numLab.text = "\(index+1)"
+        self.priceLab.text = model.price
+        self.volumeLab.text = model.volume
+        self.numLab.textColor = WhiteTextColor
+        self.numLab.backgroundColor = exchangeColorAndImage(increase: 1).0
+        self.bgView.backgroundColor = exchangeColorAndImage(increase: 1).2
+    }
+    
+    func updateSellCellWith(model:AsksOrBidsModel,index:Int) -> Void {
+        self.numLab.text = "\(index+1)"
+        self.priceLab.text = model.price
+        self.volumeLab.text = model.volume
+        self.numLab.textColor = WhiteTextColor
+        self.numLab.backgroundColor = exchangeColorAndImage(increase: -1).0
+        self.bgView.backgroundColor = exchangeColorAndImage(increase: -1).2
+    }
+    
+}
+
+

+ 213 - 0
Koala/Koala/Modular/Deal/V/Deal/DealSimDataCell.xib

@@ -0,0 +1,213 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner"/>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <tableViewCell contentMode="scaleToFill" selectionStyle="none" indentationWidth="10" rowHeight="126" id="KGk-i7-Jjw" customClass="DealSimDataCell" customModule="Koala" customModuleProvider="target">
+            <rect key="frame" x="0.0" y="0.0" width="391" height="126"/>
+            <autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMaxY="YES"/>
+            <tableViewCellContentView key="contentView" opaque="NO" clipsSubviews="YES" multipleTouchEnabled="YES" contentMode="center" tableViewCell="KGk-i7-Jjw" id="H2p-sc-9uM">
+                <rect key="frame" x="0.0" y="0.0" width="391" height="126"/>
+                <autoresizingMask key="autoresizingMask"/>
+                <subviews>
+                    <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="10" translatesAutoresizingMaskIntoConstraints="NO" id="yJY-Hp-Fyk">
+                        <rect key="frame" x="0.0" y="5" width="391" height="116"/>
+                        <subviews>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="QA8-Ws-uUW">
+                                <rect key="frame" x="0.0" y="0.0" width="391" height="40"/>
+                                <subviews>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ePK-XS-m2v">
+                                        <rect key="frame" x="20" y="0.0" width="351" height="40"/>
+                                        <subviews>
+                                            <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="LuM-Dl-FdG">
+                                                <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="40"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="5P8-cu-dhS">
+                                                        <rect key="frame" x="0.0" y="0.0" width="41.333333333333336" height="20.333333333333332"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" ambiguous="YES" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="7Qf-ig-Ldd">
+                                                        <rect key="frame" x="0.0" y="25.333333333333332" width="41.333333333333336" height="14.666666666666668"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                </subviews>
+                                            </stackView>
+                                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="RFj-E9-100">
+                                                <rect key="frame" x="41.333333333333343" y="0.0" width="309.66666666666663" height="40"/>
+                                                <subviews>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="op3-Ox-shn">
+                                                        <rect key="frame" x="268.33333333333337" y="0.0" width="41.333333333333314" height="40"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Bjw-3k-Eel">
+                                                        <rect key="frame" x="206.99999999999997" y="0.0" width="41.333333333333343" height="40"/>
+                                                        <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                        <nil key="textColor"/>
+                                                        <nil key="highlightedColor"/>
+                                                    </label>
+                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="yVi-Kz-od2">
+                                                        <rect key="frame" x="127" y="0.0" width="60" height="40"/>
+                                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="width" constant="60" id="xBG-9V-7Eo"/>
+                                                        </constraints>
+                                                    </view>
+                                                </subviews>
+                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                <constraints>
+                                                    <constraint firstItem="Bjw-3k-Eel" firstAttribute="leading" secondItem="yVi-Kz-od2" secondAttribute="trailing" constant="20" id="E8o-nd-LSO"/>
+                                                    <constraint firstAttribute="trailing" secondItem="op3-Ox-shn" secondAttribute="trailing" id="ES1-BD-Spc"/>
+                                                    <constraint firstAttribute="bottom" secondItem="op3-Ox-shn" secondAttribute="bottom" id="IAi-Yf-ted"/>
+                                                    <constraint firstItem="yVi-Kz-od2" firstAttribute="top" secondItem="RFj-E9-100" secondAttribute="top" id="POa-Fu-RwO"/>
+                                                    <constraint firstItem="op3-Ox-shn" firstAttribute="leading" secondItem="Bjw-3k-Eel" secondAttribute="trailing" constant="20" id="g31-ba-5Sk"/>
+                                                    <constraint firstAttribute="bottom" secondItem="yVi-Kz-od2" secondAttribute="bottom" id="jTw-Jr-G91"/>
+                                                    <constraint firstAttribute="bottom" secondItem="Bjw-3k-Eel" secondAttribute="bottom" id="miE-rB-BKx"/>
+                                                    <constraint firstItem="op3-Ox-shn" firstAttribute="top" secondItem="RFj-E9-100" secondAttribute="top" id="nz6-c2-DzW"/>
+                                                    <constraint firstItem="Bjw-3k-Eel" firstAttribute="top" secondItem="RFj-E9-100" secondAttribute="top" id="rrk-Io-AXV"/>
+                                                </constraints>
+                                            </view>
+                                        </subviews>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstAttribute="bottom" secondItem="ePK-XS-m2v" secondAttribute="bottom" id="Lm5-hj-Sa8"/>
+                                    <constraint firstAttribute="height" constant="40" id="c4a-Pp-xlP"/>
+                                    <constraint firstItem="ePK-XS-m2v" firstAttribute="leading" secondItem="QA8-Ws-uUW" secondAttribute="leading" constant="20" id="dar-s8-pzS"/>
+                                    <constraint firstItem="ePK-XS-m2v" firstAttribute="top" secondItem="QA8-Ws-uUW" secondAttribute="top" id="hKc-aY-A5K"/>
+                                    <constraint firstAttribute="trailing" secondItem="ePK-XS-m2v" secondAttribute="trailing" constant="20" id="jee-1E-WvP"/>
+                                </constraints>
+                            </view>
+                            <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ODx-Bi-S2n">
+                                <rect key="frame" x="0.0" y="50" width="391" height="66"/>
+                                <subviews>
+                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kZS-zi-y1P">
+                                        <rect key="frame" x="20" y="0.0" width="351" height="15"/>
+                                        <subviews>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="44.44%" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="i3v-Q1-aE2">
+                                                <rect key="frame" x="0.0" y="0.0" width="50" height="15"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="50" id="kHw-ip-hce"/>
+                                                </constraints>
+                                                <fontDescription key="fontDescription" type="system" pointSize="12"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="LUK-Se-KIg">
+                                                <rect key="frame" x="301" y="0.0" width="50" height="15"/>
+                                                <constraints>
+                                                    <constraint firstAttribute="width" constant="50" id="faK-e8-KlC"/>
+                                                </constraints>
+                                                <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                                <nil key="textColor"/>
+                                                <nil key="highlightedColor"/>
+                                            </label>
+                                            <stackView opaque="NO" contentMode="scaleToFill" spacing="2" translatesAutoresizingMaskIntoConstraints="NO" id="cHV-63-BhW">
+                                                <rect key="frame" x="52" y="5.6666666666666643" width="247" height="4"/>
+                                                <subviews>
+                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="xm5-lh-7ux">
+                                                        <rect key="frame" x="0.0" y="0.0" width="100" height="4"/>
+                                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                        <constraints>
+                                                            <constraint firstAttribute="width" constant="100" id="DHO-ZP-YG2"/>
+                                                        </constraints>
+                                                    </view>
+                                                    <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Ryi-bl-WY3">
+                                                        <rect key="frame" x="102" y="0.0" width="145" height="4"/>
+                                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                                    </view>
+                                                </subviews>
+                                                <constraints>
+                                                    <constraint firstAttribute="height" constant="4" id="ntd-Re-FV5"/>
+                                                </constraints>
+                                            </stackView>
+                                        </subviews>
+                                        <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                        <constraints>
+                                            <constraint firstItem="i3v-Q1-aE2" firstAttribute="top" secondItem="kZS-zi-y1P" secondAttribute="top" id="Cqb-Sf-sfW"/>
+                                            <constraint firstAttribute="bottom" secondItem="i3v-Q1-aE2" secondAttribute="bottom" id="DUY-rH-yXg"/>
+                                            <constraint firstItem="LUK-Se-KIg" firstAttribute="top" secondItem="kZS-zi-y1P" secondAttribute="top" id="J0C-lV-ya0"/>
+                                            <constraint firstItem="LUK-Se-KIg" firstAttribute="leading" secondItem="cHV-63-BhW" secondAttribute="trailing" constant="2" id="Jrs-R4-Ajh"/>
+                                            <constraint firstAttribute="bottom" secondItem="LUK-Se-KIg" secondAttribute="bottom" id="e4p-Re-AIi"/>
+                                            <constraint firstAttribute="height" constant="15" id="hj2-pe-OSz"/>
+                                            <constraint firstItem="i3v-Q1-aE2" firstAttribute="leading" secondItem="kZS-zi-y1P" secondAttribute="leading" id="iO8-kl-330"/>
+                                            <constraint firstAttribute="trailing" secondItem="LUK-Se-KIg" secondAttribute="trailing" id="nTl-Y1-V9Z"/>
+                                            <constraint firstItem="cHV-63-BhW" firstAttribute="leading" secondItem="i3v-Q1-aE2" secondAttribute="trailing" constant="2" id="sFN-eU-CTi"/>
+                                            <constraint firstItem="cHV-63-BhW" firstAttribute="centerY" secondItem="kZS-zi-y1P" secondAttribute="centerY" id="wWJ-Tn-wsc"/>
+                                        </constraints>
+                                    </view>
+                                    <stackView opaque="NO" contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="Yu7-ED-2rR">
+                                        <rect key="frame" x="0.0" y="15" width="391" height="51"/>
+                                        <subviews>
+                                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="qPb-XJ-cYt">
+                                                <rect key="frame" x="0.0" y="0.0" width="195.66666666666666" height="51"/>
+                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                            </tableView>
+                                            <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="plain" separatorStyle="default" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="1Me-Om-60U">
+                                                <rect key="frame" x="195.66666666666663" y="0.0" width="195.33333333333337" height="51"/>
+                                                <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+                                            </tableView>
+                                        </subviews>
+                                        <constraints>
+                                            <constraint firstItem="1Me-Om-60U" firstAttribute="width" secondItem="qPb-XJ-cYt" secondAttribute="width" id="J4L-tv-gCP"/>
+                                        </constraints>
+                                    </stackView>
+                                </subviews>
+                                <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                                <constraints>
+                                    <constraint firstItem="kZS-zi-y1P" firstAttribute="leading" secondItem="ODx-Bi-S2n" secondAttribute="leading" constant="20" id="0gz-rF-yf5"/>
+                                    <constraint firstItem="Yu7-ED-2rR" firstAttribute="top" secondItem="kZS-zi-y1P" secondAttribute="bottom" id="EGB-fw-VII"/>
+                                    <constraint firstItem="kZS-zi-y1P" firstAttribute="top" secondItem="ODx-Bi-S2n" secondAttribute="top" id="FGe-fm-WXG"/>
+                                    <constraint firstAttribute="bottom" secondItem="Yu7-ED-2rR" secondAttribute="bottom" id="Se8-Fz-Qec"/>
+                                    <constraint firstAttribute="trailing" secondItem="kZS-zi-y1P" secondAttribute="trailing" constant="20" id="VQF-Kx-ucJ"/>
+                                    <constraint firstAttribute="trailing" secondItem="Yu7-ED-2rR" secondAttribute="trailing" id="u9G-Ht-5IH"/>
+                                    <constraint firstItem="Yu7-ED-2rR" firstAttribute="leading" secondItem="ODx-Bi-S2n" secondAttribute="leading" id="x7E-86-U19"/>
+                                </constraints>
+                            </view>
+                        </subviews>
+                    </stackView>
+                </subviews>
+                <constraints>
+                    <constraint firstItem="yJY-Hp-Fyk" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" id="5MD-cS-Vhq"/>
+                    <constraint firstAttribute="bottom" secondItem="yJY-Hp-Fyk" secondAttribute="bottom" constant="5" id="qqd-1l-MHU"/>
+                    <constraint firstItem="yJY-Hp-Fyk" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="ud3-ic-bnr"/>
+                    <constraint firstAttribute="trailing" secondItem="yJY-Hp-Fyk" secondAttribute="trailing" id="zT5-Xu-5rB"/>
+                </constraints>
+            </tableViewCellContentView>
+            <connections>
+                <outlet property="buyRateLab" destination="i3v-Q1-aE2" id="JOa-JY-ymI"/>
+                <outlet property="buyRateWidthConstraint" destination="DHO-ZP-YG2" id="m62-36-YRf"/>
+                <outlet property="buyTableView" destination="qPb-XJ-cYt" id="Wkb-oW-6Rb"/>
+                <outlet property="buyView" destination="xm5-lh-7ux" id="p76-ee-vwn"/>
+                <outlet property="changeLab" destination="op3-Ox-shn" id="WxI-gP-fvo"/>
+                <outlet property="chatsBgView" destination="yVi-Kz-od2" id="vea-n5-WvU"/>
+                <outlet property="codeLab" destination="7Qf-ig-Ldd" id="43O-Qk-q7O"/>
+                <outlet property="nameLab" destination="5P8-cu-dhS" id="GAc-Kk-BLN"/>
+                <outlet property="priceLab" destination="Bjw-3k-Eel" id="noN-Wz-CeU"/>
+                <outlet property="sellRateLab" destination="LUK-Se-KIg" id="WWa-om-nrE"/>
+                <outlet property="sellTableView" destination="1Me-Om-60U" id="Peu-pP-kb5"/>
+                <outlet property="sellView" destination="Ryi-bl-WY3" id="NML-Ta-tVX"/>
+                <outlet property="stackView" destination="cHV-63-BhW" id="U7d-sw-NfQ"/>
+            </connections>
+            <point key="canvasLocation" x="180.91603053435114" y="43.661971830985919"/>
+        </tableViewCell>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 83 - 0
Koala/Koala/Modular/Deal/V/Deal/DealTopView.swift

@@ -0,0 +1,83 @@
+//
+//  DealTopView.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/25.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+
+class DealTopView: BaseView {
+    @IBOutlet weak var imgView: UIImageView!
+    @IBOutlet weak var nameLab: UILabel!
+    @IBOutlet weak var cashLab: UILabel!
+    @IBOutlet weak var buyLab: UILabel!
+    @IBOutlet weak var arrowsBtn: UIButton!
+    
+    var clickBlock: (() -> ())?
+    var topView: UIView!
+   
+    func loadFromNib() -> UIView {
+        return Bundle.main.loadNibNamed("DealTopView", owner: self, options: nil)?.first as! UIView
+    }
+    
+    override init(frame: CGRect) {
+        super.init(frame: frame)
+        topView = loadFromNib()
+        addSubview(topView)
+        topView.snp.makeConstraints { (make) in
+            make.edges.equalToSuperview()
+            make.top.equalTo(5)
+            make.bottom.equalTo(-5)
+        }
+        
+        self.imgView.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 10)
+        self.nameLab.setTextFont(.PFSM, 15)
+        self.cashLab.setTextFont(.PFSR, 12)
+        self.buyLab.setTextFont(.PFSR, 12)
+        
+        let tap = UITapGestureRecognizer(target: self, action: #selector(clickViewAction))
+        self.addGestureRecognizer(tap)
+        
+        mySwitchSkin()
+        mySwitchLanguage()
+       
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        super.init(coder: aDecoder)
+    }
+    
+    override func mySwitchLanguage() {
+      
+    }
+    
+    override func mySwitchSkin() {
+       
+        self.backgroundColor = .clear
+        self.topView.backgroundColor = ALLBackGroundColor
+        self.nameLab.textColor = TitleTextColor
+        self.cashLab.textColor = GrayTextColor
+        self.buyLab.textColor = GrayTextColor
+        
+        self.arrowsBtn.setImage(_image("Base_W_RightArrows&Base_W_RightArrows").imageWithTintColor(color: GrayTextColor), for: .normal)
+        
+    }
+    
+    func updateViewDataWith(model:AccountInfoModel) -> Void {
+        //let model = OperationalUserInfoData.getAccount()
+        
+        self.imgView.image = OperationalUserInfoData.getAccountName(model: model).1
+        self.nameLab.text = String(format: "%@(%@)",OperationalUserInfoData.getAccountName(model: model).0,model.account)
+        
+        self.cashLab.text = String(format: "%@:%@%@",switchLanguage("现金"),precisionString(with: model.margin_free, precision: "2"),OperationalUserInfoData.getAccountName(model: model).2)
+        
+        self.buyLab.text = String(format: "%@:%@%@",switchLanguage("最大购买力"),precisionString(with: model.margin_free, precision: "2"),OperationalUserInfoData.getAccountName(model: model).2)
+    }
+
+    
+    @objc func clickViewAction() -> Void {
+        self.clickBlock?()
+    }
+}

+ 121 - 0
Koala/Koala/Modular/Deal/V/Deal/DealTopView.xib

@@ -0,0 +1,121 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+    <device id="retina6_12" orientation="portrait" appearance="light"/>
+    <dependencies>
+        <deployment identifier="iOS"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
+        <capability name="System colors in document resources" minToolsVersion="11.0"/>
+        <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
+    </dependencies>
+    <objects>
+        <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DealTopView" customModule="Koala" customModuleProvider="target">
+            <connections>
+                <outlet property="arrowsBtn" destination="474-PE-mwM" id="hey-mS-Mxz"/>
+                <outlet property="buyLab" destination="iOR-ZZ-TQr" id="WQV-9l-Id0"/>
+                <outlet property="cashLab" destination="QY2-JU-mBv" id="gJW-qb-Mle"/>
+                <outlet property="imgView" destination="8d4-x4-wOA" id="kfh-Gw-15M"/>
+                <outlet property="nameLab" destination="jSc-8P-FPm" id="Goq-ZX-B2Q"/>
+            </connections>
+        </placeholder>
+        <placeholder placeholderIdentifier="IBFirstResponder" id="-2" customClass="UIResponder"/>
+        <view contentMode="scaleToFill" id="iN0-l3-epB">
+            <rect key="frame" x="0.0" y="0.0" width="482" height="98"/>
+            <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
+            <subviews>
+                <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" spacing="5" translatesAutoresizingMaskIntoConstraints="NO" id="1iv-CE-9mt">
+                    <rect key="frame" x="0.0" y="19" width="422" height="60"/>
+                    <subviews>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="tTR-Cw-4hW">
+                            <rect key="frame" x="0.0" y="0.0" width="422" height="20"/>
+                            <subviews>
+                                <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" translatesAutoresizingMaskIntoConstraints="NO" id="8d4-x4-wOA">
+                                    <rect key="frame" x="20" y="0.0" width="20" height="20"/>
+                                    <constraints>
+                                        <constraint firstAttribute="width" constant="20" id="YyP-ik-Dzm"/>
+                                        <constraint firstAttribute="height" constant="20" id="sOR-YT-kgf"/>
+                                    </constraints>
+                                </imageView>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="jSc-8P-FPm">
+                                    <rect key="frame" x="45" y="0.0" width="41.333333333333343" height="20"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <nil key="textColor"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstItem="jSc-8P-FPm" firstAttribute="leading" secondItem="8d4-x4-wOA" secondAttribute="trailing" constant="5" id="25w-nC-8Dc"/>
+                                <constraint firstItem="jSc-8P-FPm" firstAttribute="top" secondItem="tTR-Cw-4hW" secondAttribute="top" id="9qW-sw-d11"/>
+                                <constraint firstItem="8d4-x4-wOA" firstAttribute="leading" secondItem="tTR-Cw-4hW" secondAttribute="leading" constant="20" id="cuX-D2-VXl"/>
+                                <constraint firstItem="8d4-x4-wOA" firstAttribute="top" secondItem="tTR-Cw-4hW" secondAttribute="top" id="na2-6z-FWZ"/>
+                                <constraint firstAttribute="bottom" secondItem="jSc-8P-FPm" secondAttribute="bottom" id="rCv-P6-qdQ"/>
+                                <constraint firstAttribute="bottom" secondItem="8d4-x4-wOA" secondAttribute="bottom" id="slL-tv-prP"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hN4-Og-MYS">
+                            <rect key="frame" x="0.0" y="25" width="422" height="15"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="QY2-JU-mBv">
+                                    <rect key="frame" x="45" y="0.0" width="41.333333333333343" height="15"/>
+                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <nil key="textColor"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="height" constant="15" id="0Kb-42-k3e"/>
+                                <constraint firstItem="QY2-JU-mBv" firstAttribute="leading" secondItem="hN4-Og-MYS" secondAttribute="leading" constant="45" id="gyB-Sr-Dn9"/>
+                                <constraint firstAttribute="bottom" secondItem="QY2-JU-mBv" secondAttribute="bottom" id="mua-v8-tgx"/>
+                                <constraint firstItem="QY2-JU-mBv" firstAttribute="top" secondItem="hN4-Og-MYS" secondAttribute="top" id="pCe-tz-SDH"/>
+                            </constraints>
+                        </view>
+                        <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="hZa-Bg-IfN">
+                            <rect key="frame" x="0.0" y="45" width="422" height="15"/>
+                            <subviews>
+                                <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="Label" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="iOR-ZZ-TQr">
+                                    <rect key="frame" x="45" y="0.0" width="41.333333333333343" height="15"/>
+                                    <constraints>
+                                        <constraint firstAttribute="height" constant="15" id="uLr-IC-toc"/>
+                                    </constraints>
+                                    <fontDescription key="fontDescription" type="system" pointSize="17"/>
+                                    <nil key="textColor"/>
+                                    <nil key="highlightedColor"/>
+                                </label>
+                            </subviews>
+                            <color key="backgroundColor" white="0.0" alpha="0.0" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+                            <constraints>
+                                <constraint firstAttribute="bottom" secondItem="iOR-ZZ-TQr" secondAttribute="bottom" id="59P-js-ODy"/>
+                                <constraint firstAttribute="height" constant="15" id="AKq-qw-J5Y"/>
+                                <constraint firstItem="iOR-ZZ-TQr" firstAttribute="leading" secondItem="hZa-Bg-IfN" secondAttribute="leading" constant="45" id="PXk-QN-4sD"/>
+                                <constraint firstItem="iOR-ZZ-TQr" firstAttribute="top" secondItem="hZa-Bg-IfN" secondAttribute="top" id="vMU-jQ-zlh"/>
+                            </constraints>
+                        </view>
+                    </subviews>
+                </stackView>
+                <button opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="474-PE-mwM">
+                    <rect key="frame" x="422" y="0.0" width="40" height="98"/>
+                    <inset key="imageEdgeInsets" minX="0.0" minY="0.0" maxX="2.2250738585072014e-308" maxY="0.0"/>
+                </button>
+            </subviews>
+            <color key="backgroundColor" systemColor="systemBackgroundColor"/>
+            <constraints>
+                <constraint firstAttribute="trailing" secondItem="1iv-CE-9mt" secondAttribute="trailing" constant="60" id="3no-OS-fiP"/>
+                <constraint firstAttribute="bottom" secondItem="474-PE-mwM" secondAttribute="bottom" id="B9a-5J-hJM"/>
+                <constraint firstItem="474-PE-mwM" firstAttribute="top" secondItem="iN0-l3-epB" secondAttribute="top" id="E3H-aw-Lex"/>
+                <constraint firstItem="1iv-CE-9mt" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="GXf-cx-eNL"/>
+                <constraint firstItem="1iv-CE-9mt" firstAttribute="leading" secondItem="iN0-l3-epB" secondAttribute="leading" id="Tg0-vd-njv"/>
+                <constraint firstAttribute="trailing" secondItem="474-PE-mwM" secondAttribute="trailing" constant="20" id="VYC-b9-Sz3"/>
+                <constraint firstItem="474-PE-mwM" firstAttribute="centerY" secondItem="iN0-l3-epB" secondAttribute="centerY" id="ZlB-Ci-9wK"/>
+                <constraint firstItem="474-PE-mwM" firstAttribute="leading" secondItem="1iv-CE-9mt" secondAttribute="trailing" id="e2s-Jl-Fr0"/>
+            </constraints>
+            <freeformSimulatedSizeMetrics key="simulatedDestinationMetrics"/>
+            <point key="canvasLocation" x="187.78625954198472" y="249.29577464788733"/>
+        </view>
+    </objects>
+    <resources>
+        <systemColor name="systemBackgroundColor">
+            <color white="1" alpha="1" colorSpace="custom" customColorSpace="genericGamma22GrayColorSpace"/>
+        </systemColor>
+    </resources>
+</document>

+ 258 - 150
Koala/Koala/Modular/Deal/V/Deal/DealView.swift

@@ -15,31 +15,14 @@ class DealView: BaseView {
     lazy var navView:DealNavView = {
         let view = DealNavView()
         view.updateProBtn(isPro: self.VM!.isSimpleness)
-        view.clickSymbolBlock = {[weak self] btn in
-           let pop =  MarketPopView()
-            pop.showRelyPopupView(view: btn,groupList: self!.VM!.productGroupList, list: self!.VM!.symbolList, collectionList: self!.VM!.collectionList) { model in
-                if model.symbol.length > 0 {
-                    view.updateDataWith(model: model)
-                    self?.VM?.selectSymbolModel = model
-                }
-            }
-        }
-        view.clickHintBlock = {[weak self] btn in
-            let vc = DealHintViewController()
-            vc.collectionList = self!.VM!.collectionList
-            vc.symbolList = self!.VM!.symbolList
-            vc.productGroupList = self!.VM!.productGroupList
-            vc.selectSymbolModel = self!.VM!.selectSymbolModel
-            currentVc()?.navigationController?.pushViewController(vc, animated: true)
-        }
-        view.clickKlineBlock = {[weak self] btn in
-            let vc = CTKLineViewController()
-            vc.viewModel.symbolModel = (self?.VM?.selectSymbolModel)!
-            currentVc()?.navigationController?.pushViewController(vc, animated: true)
+        view.clickBackBlock = {[weak self] btn in
+            currentVc()?.navigationController?.popViewController(animated: true)
         }
+      
         view.clickMenuBlock = {[weak self] btn in
             self?.showPopupMenu()
         }
+        
         view.clickProBlock = {[weak self] btn in
             self?.VM?.isSimpleness = !self!.VM!.isSimpleness
             self?.navView.updateProBtn(isPro: self!.VM!.isSimpleness)
@@ -49,30 +32,59 @@ class DealView: BaseView {
         return view
     }()
     
+    lazy var topView:DealTopView = {
+        let view:DealTopView = DealTopView()
+        view.clickBlock = {
+            let pop =  AccountSelectPopView()
+            for (i,model) in self.VM!.accountList.enumerated(){
+                if model.server == self.VM!.accountInfoModel.server{
+                    pop.select = i
+                    break
+                }
+            }
+            
+            pop.showPopupView(source: self.VM!.accountList) {index  in
+                if index > 0{
+                    self.VM!.accountInfoModel = self.VM!.accountList[index]
+                    self.topView.updateViewDataWith(model: self.VM!.accountInfoModel)
+                    self.reloadTable()
+                }
+            }
+        }
+       
+        return view
+    }()
+    
     lazy var emptyView: HDEmptyView = {
         let view = customShowEmptyView(emptyViewY: 520,backgroundColor: .clear)
         return view
     }()
     
     lazy var tableView: BaseTableView = { [weak self] in
-        let tableView = BaseTableView.init(frame: .zero, style: .plain)
-        tableView.separatorStyle = .singleLine
+        let tableView = BaseTableView.init(frame: .zero, style: .grouped)
+        tableView.separatorStyle = .none
         tableView.separatorColor = ViewBorderColor
         tableView.separatorInset = UIEdgeInsets.init(top: 0, left: 0, bottom: 0, right: 0)
         tableView.delegate = self
         tableView.dataSource = self
         tableView.backgroundColor = .clear
-        tableView.tableHeaderView = UIView()
+        let header = UIView.init(frame: CGRect(x: 0, y: 0, width: SCREEN_WIDTH, height: 10))
+        header.backgroundColor = ViewBorderColor
+        tableView.tableHeaderView = header
         tableView.tableFooterView = UIView()
         tableView.showsHorizontalScrollIndicator = false
         tableView.showsVerticalScrollIndicator = false
         
         
-        tableView.register(UINib.init(nibName: "DealTopCell", bundle: nil), forCellReuseIdentifier: "DealTopCell")
+        tableView.register(UINib.init(nibName: "DealSimDataCell", bundle: nil), forCellReuseIdentifier: "DealSimDataCell")
         
-        tableView.register(UINib.init(nibName: "DealSimplenessCell", bundle: nil), forCellReuseIdentifier: "DealSimplenessCell")
+        tableView.register(UINib.init(nibName: "DealSimCell", bundle: nil), forCellReuseIdentifier: "DealSimCell")
         
+        tableView.register(UINib.init(nibName: "DealProDataCell", bundle: nil), forCellReuseIdentifier: "DealProDataCell")
         
+        tableView.register(UINib.init(nibName: "DealProCell", bundle: nil), forCellReuseIdentifier: "DealProCell")
+        
+        tableView.register(UINib.init(nibName: "DealSelectSymbolCell", bundle: nil), forCellReuseIdentifier: "DealSelectSymbolCell")
         
         tableView.register(UINib.init(nibName: "DealListCell", bundle: nil), forCellReuseIdentifier: "DealListCell")
         
@@ -86,8 +98,8 @@ class DealView: BaseView {
         return tableView
         }()
     
-    lazy var headerView:DealHeaderView = {
-        let view = DealHeaderView.init(frame: CGRectMake(0, 0, SCREEN_WIDTH, 100))
+    lazy var sectionView:DealSectionView = {
+        let view = DealSectionView.init(frame: CGRectMake(0, 0, SCREEN_WIDTH, 100))
         view.clickSelectBlock = {[weak self] index in
             guard OperationalUserInfoData.getLogin() else {
                 return
@@ -107,6 +119,7 @@ class DealView: BaseView {
     
     override func subView() {
         self.addSubview(navView)
+        self.addSubview(topView)
         self.addSubview(tableView)
 
         mySwitchLanguage()
@@ -120,9 +133,14 @@ class DealView: BaseView {
             make.left.right.top.equalToSuperview()
             make.height.equalTo(TopHeight)
         }
+        topView.snp.makeConstraints { make in
+            make.top.equalTo(self.navView.snp.bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(80)
+        }
         tableView.snp.makeConstraints { make in
             make.bottom.right.left.equalToSuperview()
-            make.top.equalTo(self.navView.snp.bottom)
+            make.top.equalTo(self.topView.snp.bottom)
         }
         
        
@@ -144,40 +162,60 @@ class DealView: BaseView {
     }
     
     override func mySwitchSkin() {
-        self.tableView.backgroundColor = .clear
+        self.tableView.backgroundColor = ALLBackGroundColor
         self.backgroundColor = ALLBackGroundColor
         //self.footerView.mySwitchSkin()
     }
     
 
     override func blindModel() {
-        VM?.symbolListAction.values.observeValues({[weak self] (success) in
-            guard let self = self else { return }
-            if success {
-                self.navView.updateDataWith(model: self.VM!.selectSymbolModel)
-            }
-        })
         
-        VM?.userListAction.values.observeValues({[weak self] (success) in
+        VM?.getProductListAction.values.observeValues({[weak self] (success) in
             guard let self = self else { return }
             if success {
-                
+                self.reloadTable()
             }
         })
-        
-        VM?.insertProductUserAction.values.observeValues({[weak self] (success) in
+        VM?.getPriceDepthAction.values.observeValues({[weak self] (success) in
             guard let self = self else { return }
             if success {
-                //self.reloadTable()
+                self.reloadTable()
             }
         })
         
-        VM?.deleteProductUserAction.values.observeValues({[weak self] (success) in
+        VM?.getSimPriceListAction.values.observeValues({[weak self] (success) in
             guard let self = self else { return }
             if success {
-                //self.reloadTable()
+                self.reloadTable()
             }
         })
+//        VM?.symbolListAction.values.observeValues({[weak self] (success) in
+//            guard let self = self else { return }
+//            if success {
+//
+//            }
+//        })
+        
+//        VM?.userListAction.values.observeValues({[weak self] (success) in
+//            guard let self = self else { return }
+//            if success {
+//
+//            }
+//        })
+        
+//        VM?.insertProductUserAction.values.observeValues({[weak self] (success) in
+//            guard let self = self else { return }
+//            if success {
+//                //self.reloadTable()
+//            }
+//        })
+//        
+//        VM?.deleteProductUserAction.values.observeValues({[weak self] (success) in
+//            guard let self = self else { return }
+//            if success {
+//                //self.reloadTable()
+//            }
+//        })
         
         VM?.getPriceListAction.values.observeValues({[weak self] (success) in
             guard let self = self else { return }
@@ -197,6 +235,8 @@ class DealView: BaseView {
         VM?.getAccountListAction.values.observeValues({[weak self] (success) in
             guard let self = self else { return }
             if success {
+                self.topView.updateViewDataWith(model: self.VM!.accountInfoModel)
+                
                 if self.VM!.isSimpleness{
                     if let cell:DealSimplenessCell = self.tableView.cellForRow(at: IndexPath.init(row: 0, section: 0)) as? DealSimplenessCell{
                         cell.updateCellBalance(vm: self.VM!)
@@ -291,7 +331,7 @@ class DealView: BaseView {
         VM?.signalSymbol.observeValues({ [weak self] (isSocket) in
             guard let self = self else { return }
             if isSocket {
-                self.navView.updateDataWith(model: self.VM!.selectSymbolModel)
+               
                 if self.VM!.isSimpleness{
                     if let cell:DealSimplenessCell = self.tableView.cellForRow(at: IndexPath.init(row: 0, section: 0)) as? DealSimplenessCell{
                         cell.updateCellSymbol(vm: self.VM!)
@@ -357,10 +397,10 @@ class DealView: BaseView {
     }
     
     func updateSocketPositionCellData() -> Void {
-        if self.headerView.segmentedControl.selectedSegmentIndex == 0 {
+        if self.sectionView.segmentedControl.selectedSegmentIndex == 0 {
             for (i,model) in self.VM!.positionList.enumerated() {
                 if let cell:DealListCell = self.tableView.cellForRow(at: IndexPath(row: i, section: 1)) as? DealListCell{
-                    cell.updatePositionProfit(model: model)
+                    // cell.updatePositionProfit(model: model)
                 }
             }
         }
@@ -376,7 +416,7 @@ class DealView: BaseView {
     }
     
     func updateHeaderSectionTitles() -> Void {
-        self.headerView.updateSectionTitles(position: self.VM?.positionList.count ?? 0, entrust: self.VM?.entrustList.count ?? 0, closeOrder: self.VM?.closeOrderList.count ?? 0)
+        self.sectionView.updateSectionTitles(position: self.VM?.positionList.count ?? 0, entrust: self.VM?.entrustList.count ?? 0, closeOrder: self.VM?.closeOrderList.count ?? 0)
     }
 
 }
@@ -450,11 +490,11 @@ extension DealView {
                  currentVc()?.tabBarController?.selectedIndex = TabbarAssetsIndex
             }
             else if index == 5{
-                if self!.VM!.selectSymbolModel.isCollection {
-                    self?.VM?.netDeleteProductUser(symbol: (self?.VM?.selectSymbolModel.symbol)!)
-                }else{
-                    self?.VM?.netInsertProductUser(symbol: (self?.VM?.selectSymbolModel.symbol)!)
-                }
+//                if self!.VM!.selectSymbolModel.isCollection {
+//                    self?.VM?.netDeleteProductUser(symbol: (self?.VM?.selectSymbolModel.symbol)!)
+//                }else{
+//                    self?.VM?.netInsertProductUser(symbol: (self?.VM?.selectSymbolModel.symbol)!)
+//                }
             }
         }
     }
@@ -463,16 +503,30 @@ extension DealView {
 //代理
 extension DealView:UITableViewDelegate,UITableViewDataSource{
     func numberOfSections(in tableView: UITableView) -> Int {
-        return 2
+        if self.VM!.isChangeServer(){
+            return 2
+        }else{
+            return 3
+        }
     }
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
-        if section == 1{
-            if self.headerView.segmentedControl.selectedSegmentIndex == 0 {
-                return self.VM?.positionList.count ?? 0
+        if self.VM!.isChangeServer(){
+            if section < 1{
+                return 1
             }
-            else if self.headerView.segmentedControl.selectedSegmentIndex == 1{
-                return self.VM?.entrustList.count ?? 0
+        }else{
+            if section < 2{
+                return 1
             }
+        }
+       
+        if self.sectionView.segmentedControl.selectedSegmentIndex == 0 {
+            return self.VM?.positionList.count ?? 0
+        }
+        else if self.sectionView.segmentedControl.selectedSegmentIndex == 1{
+            return self.VM?.entrustList.count ?? 0
+        }
+        else if self.sectionView.segmentedControl.selectedSegmentIndex == 2{
             return self.VM?.closeOrderList.count ?? 0
         }
         return 1
@@ -480,132 +534,186 @@ extension DealView:UITableViewDelegate,UITableViewDataSource{
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         
-        if indexPath.section == 0 {
-            if self.VM!.isSimpleness{
-                let cell:DealSimplenessCell = tableView.dequeueReusableCell(withIdentifier: "DealSimplenessCell") as! DealSimplenessCell
-                cell.updateCellDataWith(vm: self.VM!)
-                cell.clickRefreshBlock = {[weak self] in
-                    self?.reloadTable()
+        if self.VM!.isChangeServer(){
+            if indexPath.section == 0 {
+                let cell:DealSelectSymbolCell = tableView.dequeueReusableCell(withIdentifier: "DealSelectSymbolCell") as! DealSelectSymbolCell
+                cell.clickBlock = {
+                    let vc = DealSelectSymbolViewController()
+                    vc.market = self.VM!.accountInfoModel.server
+                    vc.clickBlock = { model in
+                        self.VM?.server = self.VM!.accountInfoModel.server
+                        self.VM?.selectSymbolModel = model
+                        self.VM?.updateSymbols(symbol: model.symbol)
+                    }
+                    currentVc()?.navigationController?.pushViewController(vc, animated: true)
                 }
                 return cell
-            }else{
-                let cell:DealTopCell = tableView.dequeueReusableCell(withIdentifier: "DealTopCell") as! DealTopCell
-                cell.updateCellDataWith(vm: self.VM!)
-                cell.clickRefreshBlock = {[weak self] in
-                    self?.reloadTable()
-                   
+            }
+        }else{
+            if self.VM!.isSimpleness{
+                if indexPath.section == 0 {
+                    let cell:DealSimDataCell = tableView.dequeueReusableCell(withIdentifier: "DealSimDataCell") as! DealSimDataCell
+                    cell.updateCellWith(vm: self.VM!)
+                    cell.clickBlock = {
+                        let vc = DealSelectSymbolViewController()
+                        vc.market = self.VM!.accountInfoModel.server
+                        vc.clickBlock = { model in
+                            self.VM?.selectSymbolModel = model
+                            self.VM?.updateSymbols(symbol: model.symbol)
+                        }
+                        currentVc()?.navigationController?.pushViewController(vc, animated: true)
+                    }
+                    return cell
+                }
+                else if indexPath.section == 1{
+                    let cell:DealSimCell = tableView.dequeueReusableCell(withIdentifier: "DealSimCell") as! DealSimCell
+                    cell.updateCellWith(vm: self.VM!)
+                    cell.refreshBlock = {
+                        self.reloadTable()
+                    }
+                    return cell
                 }
-                return cell
             }
-           
+            else{
+                if indexPath.section == 0 {
+                    let cell:DealProDataCell = tableView.dequeueReusableCell(withIdentifier: "DealProDataCell") as! DealProDataCell
+                    cell.updateCellDataWith(vm: self.VM!)
+                    cell.refreshBlock = {[weak self] in
+                        self?.reloadTable()
+                       
+                    }
+                    cell.clickBlock = {
+                        let vc = DealSelectSymbolViewController()
+                        vc.market = self.VM!.accountInfoModel.server
+                        vc.clickBlock = { model in
+                            self.VM?.selectSymbolModel = model
+                            self.VM?.updateSymbols(symbol: model.symbol)
+                        }
+                        currentVc()?.navigationController?.pushViewController(vc, animated: true)
+                    }
+                    return cell
+                }
+                else if indexPath.section == 1{
+                    let cell:DealProCell = tableView.dequeueReusableCell(withIdentifier: "DealProCell") as! DealProCell
+                    cell.updateCellWith(vm: self.VM!)
+                    cell.refreshBlock = {[weak self] in
+                        self?.reloadTable()
+                       
+                    }
+                    return cell
+                }
+               
+            }
+            
         }
-        else{
+       
+        
+        if self.sectionView.segmentedControl.selectedSegmentIndex == 0 {
             let cell:DealListCell = tableView.dequeueReusableCell(withIdentifier: "DealListCell") as! DealListCell
-            if self.headerView.segmentedControl.selectedSegmentIndex == 0 {
-                let model = self.VM?.positionList[indexPath.row]
-                cell.updatePositionCellWith(model: model!)
-            }
-            else if self.headerView.segmentedControl.selectedSegmentIndex == 1{
-                let model = self.VM?.entrustList[indexPath.row]
-                cell.updateEntrustCellWith(model: model!)
-            }else{
-                let model = self.VM?.closeOrderList[indexPath.row]
-                cell.updateCloseOrderCellWith(model: model!)
-            }
+            cell.updatePositionCellWith(model: self.VM!.positionList[indexPath.row])
+            return cell
+        }
+        else  if self.sectionView.segmentedControl.selectedSegmentIndex == 1 {
+            let cell:DealListCell = tableView.dequeueReusableCell(withIdentifier: "DealListCell") as! DealListCell
+            cell.updateEntrustCellWith(model: self.VM!.entrustList[indexPath.row])
+            return cell
+        }else{
+            let cell:DealListCell = tableView.dequeueReusableCell(withIdentifier: "DealListCell") as! DealListCell
+            cell.updateCloseOrderCellWith(model: self.VM!.closeOrderList[indexPath.row])
             return cell
         }
-
     }
     
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
-        if indexPath.section == 1{
-            return 50
-        }
-        var height:CGFloat = 40.0
-        if self.VM!.isSimpleness {
-            if self.VM!.isShowKline {
-                height += 200
-            }
-            if OperationalUserInfoData.getLogin(){
-                if self.VM!.isMarket{
-                    height += 237
-                }else{
-                    height += 296
-                }
-            }else{
-                if self.VM!.isMarket{
-                    height += 172
-                }else{
-                    height += 252
-                }
+        if self.VM!.isChangeServer(){
+            if indexPath.section == 0 {
+                return 40
             }
-           
-            height += 60
         }else{
-            if self.VM!.isShowKline {
-                height += 200
-            }
-            if self.VM!.isMarket{
-                height += 410
+            if self.VM!.isSimpleness {
+                if indexPath.section == 0 {
+                    return 100
+                }
+                else if indexPath.section == 1{
+                    if self.VM!.isMarket {
+                        return 40*7 + 1*4
+                    }else{
+                        return 40*9 + 1*6
+                    }
+                }
+               
             }else{
-                height += 471
+                if (indexPath.section == 0){
+                    if self.VM!.isShowKline {
+                        return 200+80+2
+                    }else{
+                        return 80+1
+                    }
+                }
+                else if indexPath.section == 1{
+                    if self.VM!.isMarket {
+                        return 40*8 + 1*5
+                    }else{
+                        return 40*10 + 1*7
+                    }
+                }
             }
+            
         }
-        return height
+       
+        return 100
     }
     
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
-        if section == 1 {
-            return self.headerView
+        if self.VM!.isChangeServer(){
+            if section == 1 {
+                return self.sectionView
+            }
+        }else{
+            if section == 2 {
+                return self.sectionView
+            }
         }
+      
         return UIView()
     }
     
     func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
-        return UIView()
+        let footer:UIView = UIView()
+        footer.backgroundColor = ViewBorderColor
+        return footer
     }
     
     func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        if section == 1 {
-            return 100
+        if self.VM!.isChangeServer(){
+            if section == 1 {
+                return 40
+            }
+        }else{
+            if section == 2 {
+                return 40
+            }
         }
-        return 0
+       
+        return 0.01
     }
     
     func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
-        return 0
-    }
-    
-    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
-        guard indexPath.section == 1 else {
-            return
-        }
-        if self.headerView.segmentedControl.selectedSegmentIndex == 0 {
-            let model = self.VM?.positionList[indexPath.row]
-            let pop = DealChangeOrderPopView()
-            pop.showPopupView(accountModel: self.VM!.accountInfoModel,model: model!) { index in
-                if index == 1 {
-                    self.VM?.positionList.remove(at: indexPath.row)
-                    self.reloadTable()
-                    self.updateHeaderSectionTitles()
-                }else if index == 2007{
-                    self.showClosedPopView()
-                }
+        if self.VM!.isChangeServer(){
+            if section > 0{
+                return 0.01
             }
-        }
-        else if self.headerView.segmentedControl.selectedSegmentIndex == 1 {
-            let model = self.VM?.entrustList[indexPath.row]
-            let pop = DealChangeOrderPopView()
-            pop.showPopupView(accountModel: self.VM!.accountInfoModel,model: model!) { index in
-                if index == 2 {
-                    self.VM?.entrustList.remove(at: indexPath.row)
-                    self.reloadTable()
-                    self.updateHeaderSectionTitles()
-                }else if index == 2007{
-                    self.showClosedPopView()
-                }
+        }else{
+            if section > 1{
+                return 0.01
             }
         }
+        
+        return 10
+    }
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+       
        
     }
     

+ 255 - 0
Koala/Koala/Modular/Deal/VC/DealSelectSymbolViewController.swift

@@ -0,0 +1,255 @@
+//
+//  DealSelectSymbolViewController.swift
+//  Koala
+//
+//  Created by 刘千军 on 2023/10/29.
+//  Copyright © 2023 刘千军. All rights reserved.
+//
+
+import UIKit
+import MJRefresh
+class DealSelectSymbolViewController: BaseViewController {
+    var clickBlock: ((_ symbolModel:KSymbolModel) -> ())?
+    
+    var pageNum:Int = 1
+    var market:String = ""
+    var symbol_title:String = ""{
+        didSet{
+            if symbol_title.length > 0 {
+                self.requestSymbolList(isUp: false)
+            }else{
+                self.symbolList.removeAll()
+                self.tableView.reloadData()
+            }
+        }
+    }
+    
+    lazy var symbolList:[KSymbolModel] = {//交易对
+        let arr:[KSymbolModel] = [KSymbolModel]()
+        return arr
+    }()
+    
+    lazy var searchView:BaseSearchView = {
+        let view:BaseSearchView = BaseSearchView()
+        view.setTextPlaceholder(text: switchLanguage("检索"))
+        view.setCancelText(text: switchLanguage("取消"))
+        view.textField.setTextFont(.PFSM, 16)
+        view.cancelBtn.setTitleColor(TitleTextColor, for: .normal)
+        view.cancelBtn.setTextFont(.PFSM, 18)
+        view.textFieldBlock = {[weak self] text in
+            self?.symbol_title = text
+        }
+        view.cancelBlock = {
+            currentVc()?.navigationController?.popViewController(animated: true)
+        }
+        return view
+    }()
+    
+    lazy var navView:UIView = {
+        let view:UIView = UIView()
+        view.backgroundColor = ALLBackGroundColor
+        view.addSubview(searchView)
+        
+        searchView.snp.makeConstraints { make in
+            make.top.equalTo(StatusBarHeight+5)
+            make.left.equalTo(15)
+            make.right.equalTo(-15)
+            make.height.equalTo(34)
+        }
+        
+        return view
+    }()
+    
+    lazy var tableView: BaseTableView = { [weak self] in
+        let tableView = BaseTableView.init(frame: .zero, style: .plain)
+        tableView.separatorStyle = .singleLine
+        tableView.separatorColor = ViewBorderColor
+        tableView.separatorInset = UIEdgeInsets(top: 0, left: 40, bottom: 0, right: 15)
+        tableView.delegate = self
+        tableView.dataSource = self
+        tableView.backgroundColor = .clear
+        tableView.tableHeaderView = UIView()
+        tableView.tableFooterView = UIView()
+        tableView.showsHorizontalScrollIndicator = false
+        tableView.showsVerticalScrollIndicator = false
+        
+        tableView.register(UINib.init(nibName: "MSearchListCell", bundle: nil), forCellReuseIdentifier: "MSearchListCell")
+        
+        if #available(iOS 11, *){
+            tableView.contentInsetAdjustmentBehavior = .never
+        }
+        
+        //tableView.ly_emptyView = self!.showEmptyView()
+        
+        tableView.mj_header = MJRefreshHeader(refreshingBlock: { [weak self] in
+            self?.requestSymbolList(isUp: false)
+            
+        })
+        tableView.mj_footer = MJRefreshAutoFooter.init(refreshingBlock: { [weak self] in
+            self?.requestSymbolList(isUp: true)
+        })
+        
+        return tableView
+    }()
+    
+    
+    override func viewWillDisappear(_ animated: Bool) {
+        super.viewWillDisappear(animated)
+        self.myNavigationBar.isHidden = true
+       
+    }
+    
+    
+    override func viewWillAppear(_ animated: Bool) {
+        super.viewWillAppear(animated)
+        self.myNavigationBar.isHidden = true
+        
+        
+    }
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        self.view.addSubview(navView)
+        self.view.addSubview(tableView)
+        
+       
+        // Do any additional setup after loading the view.
+    }
+    
+    override func mySwitchLanguage() {
+        //PublicBetaFloatingView.shared.switchLanguage()
+    }
+    
+    override func mySwitchSkin() {
+        self.view.backgroundColor = ALLBackGroundColor
+        
+    }
+    
+    override func subView() {
+       
+    }
+    
+    override func updateViewConstraints() {
+        super.updateViewConstraints()
+        self.navView.snp.makeConstraints { make in
+            make.top.left.right.equalToSuperview()
+            make.height.equalTo(TopHeight)
+        }
+        
+        self.tableView.snp.makeConstraints { make in
+            make.left.right.bottom.equalToSuperview()
+            make.top.equalTo(self.navView.snp.bottom)
+        }
+    }
+    
+    
+    override func blindModel() {
+        
+        
+    }
+
+    func requestSymbolList(isUp:Bool) -> Void {
+        if !isUp{
+            self.pageNum = 1
+        }
+        var param : [String : Any] = [
+            "pageNum" : self.pageNum,
+            "pageSize" : "40",
+            "market" : self.market,
+            "symbol_title":self.symbol_title
+        ]
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList, parameters: param, success: {[weak self](code, result) in
+            self?.tableView.mj_header!.endRefreshing()
+            self?.tableView.mj_footer!.endRefreshing()
+            ProgressHUD.hideHud()
+            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
+                if !isUp {
+                    self?.symbolList.removeAll()
+                }
+                self?.pageNum += 1
+                for dic in list {
+                    let model = KSymbolModel.deserialize(from: dic)!
+                    if model.visible == 1{
+                        var ask = model.ask
+                        if conerData(ask, .MyDouble).2! == 0{
+                            ask = model.open
+                        }
+                        model.newPrice = precisionString(with: ask, precision: model.digits)
+                        let np = decimalNumber(A: model.newPrice, B: model.open, type: .Subtract, scale:model.digits)
+                        let increase = (conerData(np, .MyDouble).2!/conerData(model.open, .MyDouble).2!)*100
+                        model.increase = String(format: "%.2f",increase)
+                        self?.symbolList.append(model)
+                    }
+                }
+            
+                let isNoData:Bool = (list.count < 40) ? true : false
+                self?.tableView.reloadData()
+                if isNoData {
+                    self?.tableView.mj_footer!.endRefreshingWithNoMoreData()
+                }
+                
+            }else{
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
+            }
+           
+        }) { (code, result) in
+            self.tableView.mj_header!.endRefreshing()
+            self.tableView.mj_footer!.endRefreshing()
+            ProgressHUD.showError(status: result as! String)
+        }
+        
+    }
+
+   
+
+}
+
+//代理
+extension DealSelectSymbolViewController:UITableViewDelegate,UITableViewDataSource{
+   
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return self.symbolList.count
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let cell:MSearchListCell = tableView.dequeueReusableCell(withIdentifier: "MSearchListCell") as! MSearchListCell
+        cell.updateDealSelectCellWith(model: self.symbolList[indexPath.row])
+        
+        return cell
+       
+       
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return 60
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return UIView()
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0
+    }
+    
+    
+    
+    func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
+     
+        let model = self.symbolList[indexPath.row];
+        self.clickBlock?(model)
+        self.navigationController?.popViewController(animated: true)
+       
+        
+    }
+    
+}

+ 16 - 16
Koala/Koala/Modular/Deal/VC/DealViewController.swift

@@ -16,6 +16,7 @@ class DealViewController: BaseViewController {
         return view
     }()
     
+   
     
     override func viewWillDisappear(_ animated: Bool) {
         super.viewWillDisappear(animated)
@@ -30,22 +31,21 @@ class DealViewController: BaseViewController {
         OperationalNetworkData.gettExchangeRateComplete { rateModel in
             
         }
-        OperationalUserInfoData.refreshAccountListComplete {
-            
-        }
-        self.viewModel.netUserList()
         
+        
+        
+     
         if OperationalUserInfoData.getLogin() {
-            self.viewModel.netGetAccountList()
-            if self.dealView.headerView.segmentedControl.selectedSegmentIndex == 0 {
-                self.viewModel.netGetPositionList()
-            }
-            else if self.dealView.headerView.segmentedControl.selectedSegmentIndex == 1{
-                self.viewModel.netGetEntrustList()
-            }
-            else if self.dealView.headerView.segmentedControl.selectedSegmentIndex == 2{
-                self.viewModel.netGetCloseOrderList()
-            }
+           
+//            if self.dealView.headerView.segmentedControl.selectedSegmentIndex == 0 {
+//                self.viewModel.netGetPositionList()
+//            }
+//            else if self.dealView.headerView.segmentedControl.selectedSegmentIndex == 1{
+//                self.viewModel.netGetEntrustList()
+//            }
+//            else if self.dealView.headerView.segmentedControl.selectedSegmentIndex == 2{
+//                self.viewModel.netGetCloseOrderList()
+//            }
            
         }else{
             self.viewModel.positionList.removeAll()
@@ -77,8 +77,8 @@ class DealViewController: BaseViewController {
     
     override func viewDidLoad() {
         super.viewDidLoad()
-        self.viewModel.netGroupList()
-        self.viewModel.netSymbolList()
+//        self.viewModel.netGroupList()
+//        self.viewModel.netSymbolList()
        
     
        

+ 223 - 199
Koala/Koala/Modular/Deal/VM/DealViewModel.swift

@@ -10,6 +10,7 @@ import UIKit
 import ReactiveCocoa
 import ReactiveSwift
 
+
 class DealViewModel: BaseViewModel {
     
     
@@ -72,8 +73,13 @@ class DealViewModel: BaseViewModel {
     
     var selectSymbolModel:KSymbolModel = KSymbolModel(){
         didSet{
+            self.netGetPriceDepth()
+            self.netGetSimPriceList()
             self.netGetTradesList()
             self.netGetPriceList()
+            self.updatePositionList()
+            self.updateEntrustList()
+            self.updateCloseOrderList()
         }
     }
 
@@ -86,14 +92,30 @@ class DealViewModel: BaseViewModel {
         }
     }
     
+    var symbols:[String] = []{
+        didSet{
+            netGetProductList()
+            requestUpdateSubscribeAction()
+        }
+    }
+    
+    var server:String = ""{
+        didSet{
+            netGetAccountList()
+        }
+    }
+    
+    var depthModel:MarketDepthModel = MarketDepthModel()
+    
     var isUpdateKline:Bool = true //是否
     var isSimpleness:Bool = true //是否
-    var isSell:Bool = true //是否
+    var isSell:Bool = false //是否
     var isMarket:Bool = true //是否
     var isShowKline:Bool = true //是否
-    var num:String = ""
-    var profit:String = ""
-    var loss:String = ""
+    var isDayLimit:Bool = true //是否
+    var num:String = "1"
+    var profit:String = "0"
+    var loss:String = "0"
     var limitType:String = ""
     var price:String = ""
     var selectOrderType = 0//0,sell,1,buy 2-buyLimit ; 3-sellLimit;4-buyStop;5-sellStop
@@ -104,9 +126,11 @@ class DealViewModel: BaseViewModel {
     let (signalTrade, observeTrade) = Signal<Bool, Never>.pipe()
     let (signalPosition, observePosition) = Signal<Bool, Never>.pipe()
     
-    //getPositionList
-    var groupListAction: Action <(),(Bool),Never>!
-    var userListAction: Action <(),(Bool),Never>!
+    //netForHomeSymbolList
+    var getProductListAction: Action <(),(Bool),Never>!
+    var getPriceDepthAction: Action <(),(Bool),Never>!
+    var getSimPriceListAction: Action <(),(Bool),Never>!
+
     var symbolListAction: Action <(),(Bool),Never>!
     var insertProductUserAction: Action <(String),(Bool),Never>!
     var deleteProductUserAction: Action <(String),(Bool),Never>!
@@ -121,34 +145,35 @@ class DealViewModel: BaseViewModel {
 
     
     override func initialize() {
-        groupListAction = Action<(),(Bool),Never> {[weak self] _ in
+        getProductListAction = Action<(),(Bool),Never> {[weak self] _ in
             return SignalProducer<(Bool),Never>{ observer, _ in
-                self?.requestGroupList(observer: observer)
-            }
-        }
-        userListAction = Action<(),(Bool),Never> {[weak self] _ in
-            return SignalProducer<(Bool),Never>{ observer, _ in
-                self?.requestUserList(observer: observer)
+                self?.requestGetProductList(observer: observer)
             }
         }
         
-        symbolListAction = Action<(),(Bool),Never> {[weak self] _ in
+        getPriceDepthAction = Action<(),(Bool),Never> {[weak self] _ in
             return SignalProducer<(Bool),Never>{ observer, _ in
-                self?.requestSymbolList(observer: observer)
+                self?.requestGetPriceDepth(observer: observer)
             }
         }
         
-        insertProductUserAction = Action<(String),(Bool),Never> {[weak self] symbol in
+        getSimPriceListAction = Action<(),(Bool),Never> {[weak self] _ in
             return SignalProducer<(Bool),Never>{ observer, _ in
-                self?.requestInsertProductUser(observer: observer,symbol:symbol)
+                self?.requestGetSimPriceList(observer: observer)
             }
         }
         
-        deleteProductUserAction = Action<(String),(Bool),Never> {[weak self] symbol in
-            return SignalProducer<(Bool),Never>{ observer, _ in
-                self?.requestDeleteProductUser(observer: observer,symbol:symbol)
-            }
-        }
+//        insertProductUserAction = Action<(String),(Bool),Never> {[weak self] symbol in
+//            return SignalProducer<(Bool),Never>{ observer, _ in
+//                self?.requestInsertProductUser(observer: observer,symbol:symbol)
+//            }
+//        }
+//
+//        deleteProductUserAction = Action<(String),(Bool),Never> {[weak self] symbol in
+//            return SignalProducer<(Bool),Never>{ observer, _ in
+//                self?.requestDeleteProductUser(observer: observer,symbol:symbol)
+//            }
+//        }
         
         getPriceListAction = Action<(),(Bool),Never> {[weak self] _ in
             return SignalProducer<(Bool),Never>{ observer, _ in
@@ -207,59 +232,33 @@ class DealViewModel: BaseViewModel {
 }
 
 extension DealViewModel{
-    //获取产品分组列表
-    func netGroupList() {
-        groupListAction.apply().start()
-    }
-    //获取产品分组列表
-    func requestGroupList(observer: Signal< Bool, Never>.Observer) -> Void {
-        
-        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForProductGroupList, success: { (code, result) in
-            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
-                self.productGroupList.removeAll()
-                for dic in list {
-                    let model = MarketProductGroupModel.deserialize(from: dic)
-                    self.productGroupList.append(model!)
-                }
-                observer.send(value: true)
-            }else{
-                observer.send(value: false)
-                ProgressHUD.showError(status:DataTypeErrorPrompt)
-            }
-            observer.sendCompleted()
-        }) { (code, result) in
-            ProgressHUD.showError(status: result as! String)
-            observer.send(value: false)
-            observer.sendCompleted()
+    //
+    func netGetAccountList() {
+        if (OperationalUserInfoData.getLogin()){
+            getAccountListAction.apply().start()
         }
     }
     
-    //获取自选产品列表
-    func netUserList() {
-        if OperationalUserInfoData.getLogin(){
-            userListAction.apply().start()
-        }else{
-            self.collectionList.removeAll()
-            for model in self.symbolList {
-                model.isCollection = false
-            }
-        }
-    }
-
-    func requestUserList(observer: Signal< Bool, Never>.Observer) -> Void {
-       
-        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForProductUserList, success: { (code, result) in
-            
-            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
-                self.collectionList.removeAll()
-                for dic in list {
-                    self.collectionList.append((dic["symbol"] as? String) ?? "")
+    func requestGetAccountList(observer: Signal< Bool, Never>.Observer) -> Void {
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetAccountList, success: { (code, result) in
+            ProgressHUD.hideHud()
+            if let dict:NSDictionary = result as? NSDictionary {
+                if let list:[NSDictionary] = dict["list"] as? [NSDictionary]{
+                    self.accountList.removeAll()
+                    for dic in list {
+                       let model = AccountInfoModel.deserialize(from: dic)!
+                        model.defaultAccount = conerData(String(format: "%@",dic["default"] as! CVarArg), .MyInt).0!
+                        if model.server == self.server {
+                            self.accountInfoModel = model
+                        }
+                        self.accountList.append(model)
+                    }
+                    observer.send(value: true)
+                }else{
+                    observer.send(value: false)
                 }
-                self.updateSymbolListCollection()
-                observer.send(value: true)
             }else{
                 observer.send(value: false)
-                ProgressHUD.showError(status:DataTypeErrorPrompt)
             }
             observer.sendCompleted()
         }) { (code, result) in
@@ -269,63 +268,52 @@ extension DealViewModel{
         }
     }
     
-    //获取交易对
-    func netSymbolList() {
-        symbolListAction.apply().start()
-    }
-    //
-    func requestSymbolList(observer: Signal< Bool, Never>.Observer) -> Void {
-        if getSymbolList().count > 0 {
-            self.symbolList = getSymbolList()
-            self.updatePositionList()
-            self.updateCloseOrderList()
-            if DealSymbool.length > 0 {
-                for model in self.symbolList{
-                    if model.symbol == DealSymbool{
-                        self.selectSymbolModel = model
-                        DealSymbool = ""
-                        break
-                    }
-                }
-            }else{
-                if let firstModel = self.symbolList.first {
-                    self.selectSymbolModel = firstModel
-                }
-            }
-           
-            self.updateSymbolListCollection()
-            observer.send(value: true)
-            observer.sendCompleted()
-            return
+    func netGetProductList() {
+        if (OperationalUserInfoData.getLogin()){
+            getProductListAction.apply().start()
         }
-        ProgressHUD.showMessage(status:"")
-        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList, success: { (code, result) in
+    }
+    
+    func requestGetProductList(observer: Signal< Bool, Never>.Observer) -> Void {
+        
+        let parame:[String:Any] = [
+            "symbol":getJSONStringFromArray(array: self.symbols as NSArray)
+        ]
+        
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForHomeSymbolList,parameters: parame, success: { (code, result) in
             ProgressHUD.hideHud()
-            if let list:[NSDictionary] = result?["list"] as? [NSDictionary] {
-                self.symbolList.removeAll()
-                SaveData.shared().updateSymbolList(list: list as NSArray)
-                self.symbolList = getSymbolList()
-                self.updatePositionList()
-                self.updateCloseOrderList()
-                if DealSymbool.length > 0 {
-                    for model in self.symbolList{
-                        if model.symbol == DealSymbool{
-                            self.selectSymbolModel = model
-                            DealSymbool = ""
-                            break
+            if let dict:NSDictionary = result as? NSDictionary {
+                if let list:[NSDictionary] = dict["list"] as? [NSDictionary]{
+                    self.symbolList.removeAll()
+                    for dict in list{
+                        let model = KSymbolModel.deserialize(from: dict)
+                        if model!.visible == 1{
+                            var ask = model!.ask
+                            if conerData(ask, .MyDouble).2! == 0{
+                                ask = model!.open
+                            }
+                            model?.newPrice = precisionString(with: ask, precision: model!.digits)
+                            let np = decimalNumber(A: model!.newPrice, B: model!.open, type: .Subtract, scale:model!.digits)
+                            let increase = (conerData(np, .MyDouble).2!/conerData(model!.open, .MyDouble).2!)*100
+                            model?.increase = String(format: "%.2f",increase)
+                            
+                        }
+                        let symbol = self.symbols.last
+                        if model!.symbol == symbol{
+                            self.selectSymbolModel = model!
+                            self.price = model!.newPrice
                         }
+                        self.symbolList.append(model!)
                     }
+                    self.updateEntrustList()
+                    self.updatePositionList()
+                    self.updateCloseOrderList()
+                    observer.send(value: true)
                 }else{
-                    if let firstModel = self.symbolList.first {
-                        self.selectSymbolModel = firstModel
-                    }
+                    observer.send(value: false)
                 }
-               
-                self.updateSymbolListCollection()
-                observer.send(value: true)
             }else{
                 observer.send(value: false)
-                ProgressHUD.showError(status:DataTypeErrorPrompt)
             }
             observer.sendCompleted()
         }) { (code, result) in
@@ -335,27 +323,29 @@ extension DealViewModel{
         }
     }
     
-    //添加收藏
-    func netInsertProductUser(symbol:String) {
-        if OperationalUserInfoData.getLogin(){
-            insertProductUserAction.apply(symbol).start()
-        }else{
-            currentVc()!.navigationController?.pushViewController(LoginViewController(), animated: true)
-        }
+    func netGetPriceDepth() -> Void {
+        getPriceDepthAction.apply().start()
     }
     
-    func requestInsertProductUser(observer: Signal< Bool, Never>.Observer,symbol:String) -> Void {
-       
-        let parame:[String:Any] = ["symbol":symbol]
-        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForInsertProductUser ,parameters: parame, success: { (code, result) in
-            ProgressHUD.showSuccess(status: switchLanguage("收藏成功"))
-            self.collectionList.append(symbol)
-            for model in self.symbolList{
-                if model.symbol == symbol{
-                    model.isCollection = true
-                }
+    func requestGetPriceDepth(observer: Signal< Bool, Never>.Observer) -> Void {
+        
+        let param = [
+            "symbol":self.selectSymbolModel.symbol,
+        ]
+        
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetPriceDepth,parameters:param , success: { (code, result) in
+            
+            ProgressHUD.hideHud()
+            
+            if let dic:NSDictionary = result as? NSDictionary {
+                self.depthModel = MarketDepthModel.deserialize(from: dic)!
+                observer.send(value: true)
+            }else{
+                
+                observer.send(value: false)
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
             }
-            observer.send(value: true)
             observer.sendCompleted()
         }) { (code, result) in
             ProgressHUD.showError(status: result as! String)
@@ -364,27 +354,37 @@ extension DealViewModel{
         }
     }
     
-    //取消收藏
-    func netDeleteProductUser(symbol:String) {
-        if OperationalUserInfoData.getLogin(){
-            deleteProductUserAction.apply(symbol).start()
-        }else{
-            currentVc()!.navigationController?.pushViewController(LoginViewController(), animated: true)
-        }
+    //获取行情数据
+    func netGetSimPriceList() {
+        getSimPriceListAction.apply().start()
     }
-    
-    func requestDeleteProductUser(observer: Signal< Bool, Never>.Observer,symbol:String) -> Void {
-        let parame:[String:Any] = ["symbol":symbol]
-        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForDeleteProductUser,parameters: parame, success: { (code, result) in
-            ProgressHUD.showSuccess(status: switchLanguage("取消成功"))
-            let index = self.collectionList.firstIndex(of: symbol)
-            self.collectionList.remove(at:index!)
-            for model in self.symbolList{
-                if model.symbol == symbol{
-                    model.isCollection = false
+    //获取行情数据
+    func requestGetSimPriceList(observer: Signal< Bool, Never>.Observer) -> Void {
+        
+        let endDate:String = currentTimeStamp()
+  
+        let param = [
+            "symbol":self.selectSymbolModel.symbol,
+            "type":1,
+            "endTime":endDate+"000",
+            "count": 40
+        ] as [String : Any]
+
+        ProgressHUD.showLoading()
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetPriceList,parameters:param , success: { (code, result) in
+            ProgressHUD.hideHud()
+            if let list:[NSDictionary] = result as? [NSDictionary] {
+                self.priceList.removeAll()
+                for dic in list {
+                    let model = CTMarketChartsModel.deserialize(from: dic)!
+                    model.datetime = decimalNumber(A: model.datetime, B: "1000", type: .Divid)
+                    self.priceList.append(model)
                 }
+                observer.send(value: true)
+            }else{
+                observer.send(value: false)
+                ProgressHUD.showError(status:DataTypeErrorPrompt)
             }
-            observer.send(value: true)
             observer.sendCompleted()
         }) { (code, result) in
             ProgressHUD.showError(status: result as! String)
@@ -468,42 +468,7 @@ extension DealViewModel{
         }
     }
     
-    //
-    func netGetAccountList() {
-        if (OperationalUserInfoData.getLogin()){
-            getAccountListAction.apply().start()
-        }
-    }
-    
-    func requestGetAccountList(observer: Signal< Bool, Never>.Observer) -> Void {
-        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetAccountList, success: { (code, result) in
-            ProgressHUD.hideHud()
-            if let dict:NSDictionary = result as? NSDictionary {
-                if let list:[NSDictionary] = dict["list"] as? [NSDictionary]{
-                    self.accountList.removeAll()
-                    for dic in list {
-                       let model = AccountInfoModel.deserialize(from: dic)!
-                        model.defaultAccount = conerData(String(format: "%@",dic["default"] as! CVarArg), .MyInt).0!
-                        if model.defaultAccount == 1 {
-                            self.accountInfoModel = model
-                        }
-                        self.accountList.append(model)
-                    }
-                    observer.send(value: true)
-                }else{
-                    observer.send(value: false)
-                }
-            }else{
-                observer.send(value: false)
-            }
-            observer.sendCompleted()
-        }) { (code, result) in
-            ProgressHUD.showError(status: result as! String)
-            observer.send(value: false)
-            observer.sendCompleted()
-        }
-    }
-    
+  
     func netOpenPosition() {
         if self.accountInfoModel.account.length > 0 {
             openPositionAction.apply().start()
@@ -517,7 +482,8 @@ extension DealViewModel{
             "cmd":self.selectOrderType,
             "volume":self.num,
             "sl":self.loss,
-            "tp":self.profit
+            "tp":self.profit,
+            "server":self.accountInfoModel.server as Any
         ] as [String : Any]
         
         ProgressHUD.showLoading()
@@ -586,19 +552,26 @@ extension DealViewModel{
     func requestGetPositionList(observer: Signal< Bool, Never>.Observer) -> Void {
         ProgressHUD.showLoading()
         let param = [
-            "account": self.accountInfoModel.account as Any
+            "account": self.accountInfoModel.account as Any,
+            "server":self.accountInfoModel.server
         ] as [String : Any]
         NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netForGetPositionList,parameters: param,success: { (code, result) in
             ProgressHUD.hideHud()
             if let dict:NSDictionary = result as? NSDictionary {
                 if let list:[NSDictionary] = dict["list"] as? [NSDictionary]{
+                    var sys:[String] = [String]()
                     self.positionList.removeAll()
                     for dic in list {
                        let model = PositionListModel.deserialize(from: dic)!
                         model.volume = decimalNumber(A: model.volume, B: model.SymbolModel.lot_min, type: .Multiply)
                         self.positionList.append(model)
+                        sys.append(model.symbol)
+                    }
+                    if self.isChangeServer(){
+                        self.symbols = sys
                     }
                     self.updatePositionList()
+                    
                     observer.send(value: true)
                 }else{
                     observer.send(value: false)
@@ -635,6 +608,7 @@ extension DealViewModel{
                        let model = EntrustListModel.deserialize(from: dic)!
                         self.entrustList.append(model)
                     }
+                    self.updateEntrustList()
                     observer.send(value: true)
                 }else{
                     observer.send(value: false)
@@ -687,6 +661,22 @@ extension DealViewModel{
             observer.sendCompleted()
         }
     }
+    
+    func requestUpdateSubscribeAction() -> Void  {
+        let parame:[String:Any] = [
+            "symbols":getJSONStringFromArray(array: self.symbols as NSArray)
+        ]
+        NetWork.NetWorkInstance.requestData(requestType: .Post, URLString: netUpdateSubscribe, parameters: parame) { (code, result) in
+           
+          
+            
+        } failured: {  (code, result) in
+          
+    
+        }
+
+        
+    }
 
 }
 
@@ -707,12 +697,37 @@ extension DealViewModel{
         }
     }
     
+    func updateSymbols(symbol:String) -> Void {
+      
+        for (i,str) in self.symbols.enumerated(){
+            if symbol == str{
+                self.symbols.remove(at: i)
+                break
+            }
+        }
+        self.symbols.append(symbol)
+    }
+    
     func updatePositionList() -> Void {
-        guard self.positionList.count > 0 && self.symbolList.count > 0 else {
+        guard self.positionList.count > 0 && self.symbolList.count > 0    else {
             return
         }
-        for model in self.symbolList {
-            for m in self.positionList {
+        for m in self.positionList {
+            for model in self.symbolList{
+                if m.symbol == model.symbol{
+                    m.SymbolModel = model
+                    continue
+                }
+            }
+        }
+    }
+    
+    func updateEntrustList() -> Void {
+        guard self.entrustList.count > 0 && self.symbolList.count > 0  else {
+            return
+        }
+        for m in self.entrustList {
+            for model in self.symbolList{
                 if m.symbol == model.symbol{
                     m.SymbolModel = model
                     continue
@@ -722,11 +737,11 @@ extension DealViewModel{
     }
     
     func updateCloseOrderList() -> Void {
-        guard self.closeOrderList.count > 0 && self.symbolList.count > 0 else {
+        guard self.closeOrderList.count > 0 && self.symbolList.count > 0  else {
             return
         }
-        for model in self.symbolList {
-            for m in self.closeOrderList {
+        for m in self.closeOrderList {
+            for model in self.symbolList{
                 if m.symbol == model.symbol{
                     m.SymbolModel = model
                     continue
@@ -735,6 +750,15 @@ extension DealViewModel{
         }
     }
     
+    func isChangeServer() -> Bool {
+        if self.server == self.accountInfoModel.server {
+            return false
+        }
+        return true
+    }
+    
+    
+    
 }
 
 extension DealViewModel{

+ 45 - 0
Koala/Koala/Modular/Home/V/JDChartLineView.swift

@@ -109,6 +109,51 @@ extension JDChartLineView {
         lineChartView.data = chartData
     }
     
+    func updateDealSimData(fillColor: UIColor, gradientColor: UIColor, data: [CTMarketChartsModel]) -> Void {
+        var dataEntries = [ChartDataEntry]()
+        var maxEntry:ChartDataEntry = ChartDataEntry.init(x: 0, y: 0)
+        for i in 0..<data.count{
+            let model = data[(data.count-1)-i]
+            let entry = ChartDataEntry.init(x: Double(i), y: Double(model.close)!)
+            dataEntries.append(entry)
+            if maxEntry.y <  Double(model.close)!{
+                maxEntry =  ChartDataEntry.init(x: Double(i), y: Double(model.close)!*1.01)
+                
+            }
+        }
+        
+        //设置折线
+        let chartDataSet = LineChartDataSet(entries: dataEntries, label: "line")
+        chartDataSet.lineWidth = 2 //线条宽度
+        
+        //chartDataSet.calcMinMaxY(entry: maxEntry)
+        //chartDataSet.lineDashLengths = [3,1]
+        chartDataSet.mode = .cubicBezier
+        chartDataSet.setColors(fillColor)
+        //去掉阴影
+        chartDataSet.isShowShadow = false
+//        chartDataSet.shadowColor = modifyColorTransparency(color,alpha: 17)
+
+        chartDataSet.shadowSize = shadowSize
+        chartDataSet.shadowBlur = 10
+        chartDataSet.drawCirclesEnabled = false
+        chartDataSet.drawValuesEnabled = false
+        chartDataSet.drawFilledEnabled = true
+        //渐变颜色数组
+        let gradientColors = [fillColor.cgColor, gradientColor.cgColor] as CFArray
+        //每组颜色所在位置(范围0~1)
+        let colorLocations:[CGFloat] = [1.0, 0.0]
+        //生成渐变色
+        let gradient = CGGradient.init(colorsSpace: CGColorSpaceCreateDeviceRGB(),
+                                       colors: gradientColors, locations: colorLocations)
+        //将渐变色作为填充对象s
+        chartDataSet.fill = Fill.fillWithLinearGradient(gradient!, angle: 90.0)
+        
+        
+        let chartData = LineChartData(dataSets: [chartDataSet])
+        lineChartView.data = chartData
+    }
+    
     
 }
 extension JDChartLineView: ChartViewDelegate {

+ 5 - 1
Koala/Koala/Modular/JDTrade/VC/JDTradeAccountHoldViewController.swift

@@ -312,7 +312,11 @@ extension JDTradeAccountHoldViewController: UITableViewDelegate,UITableViewDataS
                 }
                 
             }else if index == 3 {
-                
+               let vc = DealViewController.init()
+                vc.viewModel.updateSymbols(symbol: model.symbol)
+                vc.viewModel.server = self.accountModel?.server ?? ""
+                currentVc()?.navigationController?.pushViewController( vc, animated: true)
+                pop.dismissAlert()
                 
             }else{
                 let vc = MarketDetailViewController()

+ 21 - 0
Koala/Koala/Modular/Market/V/MarketSearch/MSearchListCell.swift

@@ -45,6 +45,7 @@ class MSearchListCell: BaseTableViewCell {
     }
     
     func updateCellWith(model:KSymbolModel,index:Int) -> Void {
+        self.collectBtn.isHidden = false
         self.collectBtn.tag = 10000+index
         self.nameLab.text = model.title
         self.marketBtn.setTitle(model.market, for: .normal)
@@ -68,4 +69,24 @@ class MSearchListCell: BaseTableViewCell {
         }
     }
     
+    func updateDealSelectCellWith(model:KSymbolModel) -> Void {
+        self.collectBtn.isHidden = true
+        self.nameLab.text = model.title
+        self.marketBtn.setTitle(model.market, for: .normal)
+        self.codeLab.text = model.symbol
+        if model.market == "HK"{
+            self.marketBtn.backgroundColor = _color("#EDF6FF&#EDF6FF")
+            self.marketBtn.setTitleColor(_color("#1989FF&#1989FF"), for: .normal)
+        }
+        else if model.market == "CFD"{
+            self.marketBtn.backgroundColor = _color("#1989FF&#1989FF")
+            self.marketBtn.setTitleColor(WhiteTextColor, for: .normal)
+        }else{
+            self.marketBtn.backgroundColor = _color("#FFF1F1&#FFF1F1")
+            self.marketBtn.setTitleColor(_color("#EA4A45&#EA4A45"), for: .normal)
+        }
+        
+       
+    }
+    
 }

+ 6 - 4
Koala/Koala/Modular/Mine/V/Mine/LanguageSelectPopView.swift

@@ -134,10 +134,12 @@ extension LanguageSelectPopView:UITableViewDelegate,UITableViewDataSource{
         let cell:KSelectBottonPopCell = tableView.base_dequeueReusableCell(indexPath: indexPath) as KSelectBottonPopCell
         let data = sourceArray[indexPath.row]
         cell.titleLab.text = data.0
-        cell.itemBtn.setImage(_image("Base_W_Select&Base_W_Select"), for: .normal)
-        
-        cell.itemBtn.isHidden = !data.1
-        
+        if data.1{
+            cell.bgView.backgroundColor = ViewBorderColor
+        }else{
+            cell.bgView.backgroundColor = ALLBackGroundColor
+        }
+      
        return cell
     
     }

+ 29 - 20
Koala/Koala/Modular/Public/V/Popup/KSelectBottonPopView.swift

@@ -11,6 +11,7 @@ import UIKit
 class KSelectBottonPopView: BaseAlertView {
 
     @IBOutlet weak var bgView: UIView!
+    @IBOutlet weak var titleBgView: UIView!
     @IBOutlet weak var titleLab: UILabel!
     @IBOutlet weak var closeBtn: UIButton!
     @IBOutlet weak var tableView: UITableView!
@@ -112,13 +113,10 @@ extension KSelectBottonPopView:UITableViewDelegate,UITableViewDataSource{
             cell.titleLab.attributedText = data["attText"] as? NSAttributedString
         }
         
-        cell.itemBtn.setImage(_image("Base_W_Select&Base_W_Select"), for: .normal)
-        
-        
         if self.select == indexPath.row {
-            cell.itemBtn.isHidden = false
+            cell.bgView.backgroundColor = ViewBorderColor
         }else{
-            cell.itemBtn.isHidden = true
+            cell.bgView.backgroundColor = ALLBackGroundColor
         }
         
        return cell
@@ -163,6 +161,11 @@ extension KSelectBottonPopView {
         completeBlock = complete
         self.sourceArray = source
         self.titleLab.text = title
+        if title.length == 0{
+            self.titleBgView.isHidden = true
+        }else{
+            self.titleBgView.isHidden = false
+        }
 
         self.tableViewHeightConstraint.constant = CGFloat(source.count * 50)
         
@@ -214,32 +217,38 @@ class KSelectBottonPopCell: BaseTableViewCell {
         lab.numberOfLines = 0
         return lab
     }()
-    lazy var itemBtn:UIButton = {
-        let btn:UIButton = UIButton.init(type: .custom)
-        btn.contentHorizontalAlignment = .right
-        btn.isUserInteractionEnabled = false
-        return btn
+  
+    
+    lazy var bgView:UIView = {
+        let view:UIView = UIView()
+        view.backgroundColor = ALLBackGroundColor
+        view.addSubview(titleLab)
+        view.setViewLayerBorderColor(myColor: .clear, borderWidth: 0, maskBounds: 4)
+        
+        titleLab.snp.makeConstraints { (make) in
+            make.top.bottom.equalToSuperview()
+            make.left.equalTo(10)
+            make.right.equalTo(-10)
+        }
+        
+        return view
     }()
 
     override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
         super.init(style: style, reuseIdentifier: reuseIdentifier)
         self.backgroundColor = .clear
         self.contentView.backgroundColor = .clear
-        self.contentView.addSubview(titleLab)
-        self.contentView.addSubview(itemBtn)
+        self.contentView.addSubview(bgView)
+       
     }
   
     override func layoutSubviews() {
         super.layoutSubviews()
-        titleLab.snp.makeConstraints { (make) in
-            make.top.bottom.equalToSuperview()
-            make.left.equalTo(15)
-        }
-        
-        itemBtn.snp.makeConstraints { (make) in
+       
+        bgView.snp.makeConstraints { (make) in
             make.top.bottom.equalToSuperview()
-            make.right.equalTo(-15)
-            make.left.equalTo(self.titleLab.snp.right)
+            make.right.equalTo(-20)
+            make.left.equalTo(20)
         }
    
     }

+ 6 - 5
Koala/Koala/Modular/Public/V/Popup/KSelectBottonPopView.xib

@@ -1,9 +1,9 @@
 <?xml version="1.0" encoding="UTF-8"?>
-<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21225" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
+<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="21701" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES" colorMatched="YES">
     <device id="retina6_0" orientation="portrait" appearance="light"/>
     <dependencies>
         <deployment identifier="iOS"/>
-        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21207"/>
+        <plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="21679"/>
         <capability name="System colors in document resources" minToolsVersion="11.0"/>
         <capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
     </dependencies>
@@ -17,6 +17,7 @@
                 <outlet property="hintLab" destination="XBa-6V-4Fe" id="0Xt-s4-i6I"/>
                 <outlet property="tableView" destination="HoD-mu-rZS" id="BUl-bP-6lA"/>
                 <outlet property="tableViewHeightConstraint" destination="JfG-JE-fJU" id="88Q-Uy-bZS"/>
+                <outlet property="titleBgView" destination="v3o-MI-cix" id="FlK-QT-r42"/>
                 <outlet property="titleLab" destination="wO6-PF-1ee" id="kDq-m4-pvN"/>
             </connections>
         </placeholder>
@@ -26,10 +27,10 @@
             <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
             <subviews>
                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="kPz-mY-LHi">
-                    <rect key="frame" x="0.0" y="566" width="390" height="278"/>
+                    <rect key="frame" x="0.0" y="546" width="390" height="298"/>
                     <subviews>
                         <stackView opaque="NO" contentMode="scaleToFill" axis="vertical" translatesAutoresizingMaskIntoConstraints="NO" id="Yhq-9e-4di">
-                            <rect key="frame" x="0.0" y="0.0" width="390" height="278"/>
+                            <rect key="frame" x="0.0" y="20" width="390" height="278"/>
                             <subviews>
                                 <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="v3o-MI-cix">
                                     <rect key="frame" x="0.0" y="0.0" width="390" height="50"/>
@@ -90,7 +91,7 @@
                     <color key="backgroundColor" systemColor="systemBackgroundColor"/>
                     <constraints>
                         <constraint firstAttribute="bottom" secondItem="Yhq-9e-4di" secondAttribute="bottom" id="LPe-cj-CLI"/>
-                        <constraint firstItem="Yhq-9e-4di" firstAttribute="top" secondItem="kPz-mY-LHi" secondAttribute="top" id="NT4-eK-bQv"/>
+                        <constraint firstItem="Yhq-9e-4di" firstAttribute="top" secondItem="kPz-mY-LHi" secondAttribute="top" constant="20" id="NT4-eK-bQv"/>
                         <constraint firstItem="Yhq-9e-4di" firstAttribute="leading" secondItem="kPz-mY-LHi" secondAttribute="leading" id="dpe-v7-fJn"/>
                         <constraint firstAttribute="trailing" secondItem="Yhq-9e-4di" secondAttribute="trailing" id="wtQ-xW-Ybg"/>
                     </constraints>

BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/0O7aiwPtmH.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/4dMSmqyL30.png


+ 3 - 3
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Contents.json

@@ -1,17 +1,17 @@
 {
   "images" : [
     {
-      "filename" : "4dMSmqyL30.png",
+      "filename" : "Frame 3002.png",
       "idiom" : "universal",
       "scale" : "1x"
     },
     {
-      "filename" : "0O7aiwPtmH.png",
+      "filename" : "Frame 3002@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "J0uhHKokCm.png",
+      "filename" : "Frame 3002@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Frame 3002.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Frame 3002@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/Frame 3002@3x.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Hint.imageset/J0uhHKokCm.png


+ 3 - 3
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/Contents.json

@@ -1,17 +1,17 @@
 {
   "images" : [
     {
-      "filename" : "D9h4LEQkWi.png",
+      "filename" : "形状结合.png",
       "idiom" : "universal",
       "scale" : "1x"
     },
     {
-      "filename" : "lUORSsWknP.png",
+      "filename" : "形状结合@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "aSAPVhwytq.png",
+      "filename" : "形状结合@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/D9h4LEQkWi.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/aSAPVhwytq.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/lUORSsWknP.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/形状结合.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/形状结合@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Left.imageset/形状结合@3x.png


+ 1 - 3
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/Contents.json

@@ -1,17 +1,15 @@
 {
   "images" : [
     {
-      "filename" : "PYElS3zONd.png",
       "idiom" : "universal",
       "scale" : "1x"
     },
     {
-      "filename" : "DXmS14MOT2.png",
+      "filename" : "more.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "yqUGFar3jd.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/DXmS14MOT2.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/PYElS3zONd.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/more.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Menu.imageset/yqUGFar3jd.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/3ttob8QT2d.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/5YnuMDBILG.png


+ 3 - 3
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/Contents.json

@@ -1,17 +1,17 @@
 {
   "images" : [
     {
-      "filename" : "3ttob8QT2d.png",
+      "filename" : "形状结合备份.png",
       "idiom" : "universal",
       "scale" : "1x"
     },
     {
-      "filename" : "hu6IIeELTW.png",
+      "filename" : "形状结合备份@2x.png",
       "idiom" : "universal",
       "scale" : "2x"
     },
     {
-      "filename" : "5YnuMDBILG.png",
+      "filename" : "形状结合备份@3x.png",
       "idiom" : "universal",
       "scale" : "3x"
     }

BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/hu6IIeELTW.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/形状结合备份.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/形状结合备份@2x.png


BIN
Koala/Koala/Other/Assets.xcassets/Deal/Deal_W_Right.imageset/形状结合备份@3x.png