Commit a7b8e5c7 authored by David黄金龙's avatar David黄金龙

Merge branch 'qmas-1130' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS into qmas-1130

* 'qmas-1130' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS: (23 commits)
  //  家庭
  // 方案
  //  方案
  //  方案
  // 我的方案
  // 方案
  收入记录接口调试
  工作经验部分接口调试
  //  方案
  //  方案
  //  方案
  // 阿里云key
  收入记录相关逻辑优化
  //  方案
  工作经验UI
  // 方案
  工作经验首页UI
  优才收入记录UI相关
  职位细节
  工作经验
  ...
parents ac4879e8 c2f3b41a
......@@ -10,6 +10,16 @@
040450CF2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040450CE2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift */; };
0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */; };
0409BEEB2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0409BEEA2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift */; };
040AE9762CE7195600310241 /* YHWorkExperienceListReasonTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9752CE7195600310241 /* YHWorkExperienceListReasonTableViewCell.swift */; };
040AE9782CE73BA600310241 /* YHWorkExperiencePositionTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9772CE73BA600310241 /* YHWorkExperiencePositionTableViewCell.swift */; };
040AE97A2CE73D9E00310241 /* YHWorkExperiencePositionViewViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9792CE73D9E00310241 /* YHWorkExperiencePositionViewViewController.swift */; };
040AE97C2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97B2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift */; };
040AE97E2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */; };
040AE9802CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */; };
040AE9822CE8810200310241 /* YHWorkExperienceSelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9812CE8810200310241 /* YHWorkExperienceSelectView.swift */; };
040AE9842CE893CC00310241 /* YHWorkExperiencePositionItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9832CE893CC00310241 /* YHWorkExperiencePositionItemView.swift */; };
040AE9862CEB09ED00310241 /* YHWorkExperienceCompanySelectView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9852CEB09ED00310241 /* YHWorkExperienceCompanySelectView.swift */; };
040AE9882CEB6DAC00310241 /* YHWorkExperiencePositionModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 040AE9872CEB6DAC00310241 /* YHWorkExperiencePositionModel.swift */; };
04129E862CD0C8490072F87B /* YHAliYunLogManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04129E852CD0C8490072F87B /* YHAliYunLogManager.swift */; };
041390692C1081FA0098CB8A /* YHFileListEmptyView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */; };
0414708B2C88627B00B7B688 /* YHButlerServiceManager.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0414708A2C88627B00B7B688 /* YHButlerServiceManager.swift */; };
......@@ -99,6 +109,13 @@
0425E6442BA95FE100A5E763 /* YHSchemeTableHeadView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6432BA95FE100A5E763 /* YHSchemeTableHeadView.swift */; };
0425E6462BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6452BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift */; };
0425E6482BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0425E6472BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift */; };
042B20D22CEADBD800655093 /* YHImproveHKView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D12CEADBD800655093 /* YHImproveHKView.swift */; };
042B20D42CEAE5E900655093 /* YHImproveTargetListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D32CEAE5E900655093 /* YHImproveTargetListCell.swift */; };
042B20D62CEB239400655093 /* YHIHKIdentityPlanCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D52CEB239400655093 /* YHIHKIdentityPlanCell.swift */; };
042B20D82CEB325900655093 /* YHImproveSchemeTemplateListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D72CEB325900655093 /* YHImproveSchemeTemplateListView.swift */; };
042B20DA2CEB337100655093 /* YHImproveSchemeTemplateListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D92CEB337100655093 /* YHImproveSchemeTemplateListCell.swift */; };
042B20DC2CEB69CB00655093 /* YHSchemeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20DB2CEB69CB00655093 /* YHSchemeModel.swift */; };
042B20DF2CEB6A8F00655093 /* YHSchemeViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20DE2CEB6A8F00655093 /* YHSchemeViewModel.swift */; };
0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E63A2C6DA106000511E2 /* CGFloat+Extention.swift */; };
0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */; };
0430E6442C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */; };
......@@ -310,7 +327,6 @@
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDBB2B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift */; };
045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDBC2B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift */; };
045EEE992B9F171A0022A143 /* YHPreviewInfoHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDBD2B9F171A0022A143 /* YHPreviewInfoHoldView.swift */; };
045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDC02B9F171A0022A143 /* YHWorkIntroductionViewModel.swift */; };
045EEE9B2B9F171A0022A143 /* YHWorkExperienceViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDC12B9F171A0022A143 /* YHWorkExperienceViewModel.swift */; };
045EEE9C2B9F171A0022A143 /* YHCompanyViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDC22B9F171A0022A143 /* YHCompanyViewModel.swift */; };
045EEE9D2B9F171A0022A143 /* YHWorkItemListViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDC32B9F171A0022A143 /* YHWorkItemListViewModel.swift */; };
......@@ -324,7 +340,6 @@
045EEEA52B9F171A0022A143 /* YHImageViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDCD2B9F171A0022A143 /* YHImageViewController.swift */; };
045EEEA62B9F171A0022A143 /* YHCompanySelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDCE2B9F171A0022A143 /* YHCompanySelectViewController.swift */; };
045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDCF2B9F171A0022A143 /* YHWorkExperienceViewController.swift */; };
045EEEA82B9F171A0022A143 /* YHWorkIntroductionViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDD02B9F171A0022A143 /* YHWorkIntroductionViewController.swift */; };
045EEEA92B9F171A0022A143 /* YHWorkExperienceListViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDD12B9F171A0022A143 /* YHWorkExperienceListViewController.swift */; };
045EEEAA2B9F171A0022A143 /* YHWorkExampleViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDD22B9F171A0022A143 /* YHWorkExampleViewController.swift */; };
045EEEAB2B9F171A0022A143 /* YHImageClipperViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 045EEDD32B9F171A0022A143 /* YHImageClipperViewController.swift */; };
......@@ -487,6 +502,18 @@
047AB5E62CD083CE002A3573 /* YHButlerMessageReportHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047AB5E52CD083CE002A3573 /* YHButlerMessageReportHandler.swift */; };
047F3DD92CE601D1001B2A6D /* YHEducationCertificateConfirmCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DD82CE601D1001B2A6D /* YHEducationCertificateConfirmCell.swift */; };
047F3DDB2CE6DE91001B2A6D /* YHEducationMarkView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DDA2CE6DE91001B2A6D /* YHEducationMarkView.swift */; };
047F3DE22CE72524001B2A6D /* YHMyNewSchemeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DE12CE72524001B2A6D /* YHMyNewSchemeViewController.swift */; };
047F3DE42CE73916001B2A6D /* YHComprehensiveEvaluationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DE32CE73916001B2A6D /* YHComprehensiveEvaluationCell.swift */; };
047F3DE62CE83A0F001B2A6D /* YHHKRequiredItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DE52CE83A0F001B2A6D /* YHHKRequiredItemView.swift */; };
047F3DE82CE83E64001B2A6D /* YHHKRequiredItemListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DE72CE83E64001B2A6D /* YHHKRequiredItemListCell.swift */; };
047F3DEA2CE84B6C001B2A6D /* YHImproveTargetCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DE92CE84B6C001B2A6D /* YHImproveTargetCell.swift */; };
047F3DEC2CE84BD5001B2A6D /* YHImproveRequireItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DEB2CE84BD5001B2A6D /* YHImproveRequireItemView.swift */; };
047F3DEE2CE87E83001B2A6D /* YHIndustryLocationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DED2CE87E83001B2A6D /* YHIndustryLocationCell.swift */; };
047F3DF02CE88380001B2A6D /* YHMaterialListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DEF2CE88380001B2A6D /* YHMaterialListCell.swift */; };
047F3DF22CE888EF001B2A6D /* YHDocumentListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DF12CE888EF001B2A6D /* YHDocumentListCell.swift */; };
047F3DF42CE88ACD001B2A6D /* YHImproveSchemeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DF32CE88ACD001B2A6D /* YHImproveSchemeCell.swift */; };
047F3DF62CE8A1C4001B2A6D /* YHModifySchemeInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DF52CE8A1C4001B2A6D /* YHModifySchemeInfoCell.swift */; };
047F3DF82CE8A570001B2A6D /* YHImproveSchemeViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 047F3DF72CE8A570001B2A6D /* YHImproveSchemeViewController.swift */; };
0480582F2C7CA77900502CAA /* YHDisappointHKAlertView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */; };
048058312C7DBDC900502CAA /* YHTravelCertificateTipsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */; };
048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */; };
......@@ -589,6 +616,31 @@
04B360F52C646844001EB053 /* YHPrincipleApprovedMailViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F42C646844001EB053 /* YHPrincipleApprovedMailViewController.swift */; };
04B360F72C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B360F62C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift */; };
04B401802CDB4B3C005C61A9 /* YHTalentProgramEvaluationView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4017F2CDB4B3B005C61A9 /* YHTalentProgramEvaluationView.swift */; };
04B401D12CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C92CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift */; };
04B401D22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift */; };
04B401D32CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */; };
04B401D42CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CD2CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift */; };
04B401D52CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CA2CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift */; };
04B401D62CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CC2CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift */; };
04B401D72CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C82CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift */; };
04B401D82CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C52CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift */; };
04B401D92CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */; };
04B401DA2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401CB2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift */; };
04B401DC2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401DB2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift */; };
04B401DE2CE73308005C61A9 /* YHIncomeRecordFromCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401DD2CE73308005C61A9 /* YHIncomeRecordFromCell.swift */; };
04B401E02CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401DF2CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift */; };
04B401E22CE746F4005C61A9 /* YHIncomeTypesCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */; };
04B401E42CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */; };
04B401E62CE83C74005C61A9 /* YHIncomeRemarkCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */; };
04B401E82CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */; };
04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */; };
04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */; };
04B401EE2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */; };
04B401F02CEB0C78005C61A9 /* YHIncomeRecordViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401EF2CEB0C78005C61A9 /* YHIncomeRecordViewModel.swift */; };
04B401F22CEB19C1005C61A9 /* YHIncomeRecordCompleteModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401F12CEB19C1005C61A9 /* YHIncomeRecordCompleteModel.swift */; };
04B401F42CEB1C51005C61A9 /* YHIncomeCompanyDetailModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401F32CEB1C51005C61A9 /* YHIncomeCompanyDetailModel.swift */; };
04B401F62CEB239C005C61A9 /* YHIncomeRecordUtilType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401F52CEB239C005C61A9 /* YHIncomeRecordUtilType.swift */; };
04B401F82CEB3E2B005C61A9 /* YHIncomeType.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401F72CEB3E2A005C61A9 /* YHIncomeType.swift */; };
04B4B8D52C89CE5E00ED82BC /* YHButlerServiceMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */; };
04B4B8D72C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */; };
04B4B8DC2C90696E00ED82BC /* YHResignDocumentManagementVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */; };
......@@ -984,6 +1036,16 @@
040450CE2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentMultiLineTipsCell.swift; sourceTree = "<group>"; };
0408C3622BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHVideoPlayerControlView.swift; sourceTree = "<group>"; };
0409BEEA2C5B41D4003FCFD7 /* YHPrincipleProfileListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleProfileListCell.swift; sourceTree = "<group>"; };
040AE9752CE7195600310241 /* YHWorkExperienceListReasonTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceListReasonTableViewCell.swift; sourceTree = "<group>"; };
040AE9772CE73BA600310241 /* YHWorkExperiencePositionTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionTableViewCell.swift; sourceTree = "<group>"; };
040AE9792CE73D9E00310241 /* YHWorkExperiencePositionViewViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionViewViewController.swift; sourceTree = "<group>"; };
040AE97B2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionViewModel.swift; sourceTree = "<group>"; };
040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionListTableViewCell.swift; sourceTree = "<group>"; };
040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionReasonTableViewCell.swift; sourceTree = "<group>"; };
040AE9812CE8810200310241 /* YHWorkExperienceSelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceSelectView.swift; sourceTree = "<group>"; };
040AE9832CE893CC00310241 /* YHWorkExperiencePositionItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionItemView.swift; sourceTree = "<group>"; };
040AE9852CEB09ED00310241 /* YHWorkExperienceCompanySelectView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceCompanySelectView.swift; sourceTree = "<group>"; };
040AE9872CEB6DAC00310241 /* YHWorkExperiencePositionModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkExperiencePositionModel.swift; sourceTree = "<group>"; };
04129E852CD0C8490072F87B /* YHAliYunLogManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAliYunLogManager.swift; sourceTree = "<group>"; };
041390682C1081FA0098CB8A /* YHFileListEmptyView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListEmptyView.swift; sourceTree = "<group>"; };
0414708A2C88627B00B7B688 /* YHButlerServiceManager.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceManager.swift; sourceTree = "<group>"; };
......@@ -1072,6 +1134,13 @@
0425E6432BA95FE100A5E763 /* YHSchemeTableHeadView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeTableHeadView.swift; sourceTree = "<group>"; };
0425E6452BA9678E00A5E763 /* YHSchemeHeadTotalScoreView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeHeadTotalScoreView.swift; sourceTree = "<group>"; };
0425E6472BA96B4100A5E763 /* YHSchemeHeadScoreItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeHeadScoreItemView.swift; sourceTree = "<group>"; };
042B20D12CEADBD800655093 /* YHImproveHKView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveHKView.swift; sourceTree = "<group>"; };
042B20D32CEAE5E900655093 /* YHImproveTargetListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveTargetListCell.swift; sourceTree = "<group>"; };
042B20D52CEB239400655093 /* YHIHKIdentityPlanCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIHKIdentityPlanCell.swift; sourceTree = "<group>"; };
042B20D72CEB325900655093 /* YHImproveSchemeTemplateListView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveSchemeTemplateListView.swift; sourceTree = "<group>"; };
042B20D92CEB337100655093 /* YHImproveSchemeTemplateListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveSchemeTemplateListCell.swift; sourceTree = "<group>"; };
042B20DB2CEB69CB00655093 /* YHSchemeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeModel.swift; sourceTree = "<group>"; };
042B20DE2CEB6A8F00655093 /* YHSchemeViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSchemeViewModel.swift; sourceTree = "<group>"; };
0430E63A2C6DA106000511E2 /* CGFloat+Extention.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "CGFloat+Extention.swift"; sourceTree = "<group>"; };
0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddAdoptersViewController.swift; sourceTree = "<group>"; };
0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMainTableViewCell.swift; sourceTree = "<group>"; };
......@@ -1283,7 +1352,6 @@
045EEDBB2B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoWorkExpView.swift; sourceTree = "<group>"; };
045EEDBC2B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoQuestionAndAnswerItemsView.swift; sourceTree = "<group>"; };
045EEDBD2B9F171A0022A143 /* YHPreviewInfoHoldView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHPreviewInfoHoldView.swift; sourceTree = "<group>"; };
045EEDC02B9F171A0022A143 /* YHWorkIntroductionViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkIntroductionViewModel.swift; sourceTree = "<group>"; };
045EEDC12B9F171A0022A143 /* YHWorkExperienceViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceViewModel.swift; sourceTree = "<group>"; };
045EEDC22B9F171A0022A143 /* YHCompanyViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCompanyViewModel.swift; sourceTree = "<group>"; };
045EEDC32B9F171A0022A143 /* YHWorkItemListViewModel.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkItemListViewModel.swift; sourceTree = "<group>"; };
......@@ -1297,7 +1365,6 @@
045EEDCD2B9F171A0022A143 /* YHImageViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHImageViewController.swift; sourceTree = "<group>"; };
045EEDCE2B9F171A0022A143 /* YHCompanySelectViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHCompanySelectViewController.swift; sourceTree = "<group>"; };
045EEDCF2B9F171A0022A143 /* YHWorkExperienceViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceViewController.swift; sourceTree = "<group>"; };
045EEDD02B9F171A0022A143 /* YHWorkIntroductionViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkIntroductionViewController.swift; sourceTree = "<group>"; };
045EEDD12B9F171A0022A143 /* YHWorkExperienceListViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkExperienceListViewController.swift; sourceTree = "<group>"; };
045EEDD22B9F171A0022A143 /* YHWorkExampleViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHWorkExampleViewController.swift; sourceTree = "<group>"; };
045EEDD32B9F171A0022A143 /* YHImageClipperViewController.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHImageClipperViewController.swift; sourceTree = "<group>"; };
......@@ -1463,6 +1530,18 @@
047AB5E52CD083CE002A3573 /* YHButlerMessageReportHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerMessageReportHandler.swift; sourceTree = "<group>"; };
047F3DD82CE601D1001B2A6D /* YHEducationCertificateConfirmCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEducationCertificateConfirmCell.swift; sourceTree = "<group>"; };
047F3DDA2CE6DE91001B2A6D /* YHEducationMarkView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEducationMarkView.swift; sourceTree = "<group>"; };
047F3DE12CE72524001B2A6D /* YHMyNewSchemeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyNewSchemeViewController.swift; sourceTree = "<group>"; };
047F3DE32CE73916001B2A6D /* YHComprehensiveEvaluationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHComprehensiveEvaluationCell.swift; sourceTree = "<group>"; };
047F3DE52CE83A0F001B2A6D /* YHHKRequiredItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRequiredItemView.swift; sourceTree = "<group>"; };
047F3DE72CE83E64001B2A6D /* YHHKRequiredItemListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHKRequiredItemListCell.swift; sourceTree = "<group>"; };
047F3DE92CE84B6C001B2A6D /* YHImproveTargetCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveTargetCell.swift; sourceTree = "<group>"; };
047F3DEB2CE84BD5001B2A6D /* YHImproveRequireItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveRequireItemView.swift; sourceTree = "<group>"; };
047F3DED2CE87E83001B2A6D /* YHIndustryLocationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIndustryLocationCell.swift; sourceTree = "<group>"; };
047F3DEF2CE88380001B2A6D /* YHMaterialListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMaterialListCell.swift; sourceTree = "<group>"; };
047F3DF12CE888EF001B2A6D /* YHDocumentListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDocumentListCell.swift; sourceTree = "<group>"; };
047F3DF32CE88ACD001B2A6D /* YHImproveSchemeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveSchemeCell.swift; sourceTree = "<group>"; };
047F3DF52CE8A1C4001B2A6D /* YHModifySchemeInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHModifySchemeInfoCell.swift; sourceTree = "<group>"; };
047F3DF72CE8A570001B2A6D /* YHImproveSchemeViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHImproveSchemeViewController.swift; sourceTree = "<group>"; };
0480582E2C7CA77900502CAA /* YHDisappointHKAlertView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHDisappointHKAlertView.swift; sourceTree = "<group>"; };
048058302C7DBDC900502CAA /* YHTravelCertificateTipsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsView.swift; sourceTree = "<group>"; };
048058322C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelCertificateTipsCell.swift; sourceTree = "<group>"; };
......@@ -1565,6 +1644,31 @@
04B360F42C646844001EB053 /* YHPrincipleApprovedMailViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleApprovedMailViewController.swift; sourceTree = "<group>"; };
04B360F62C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPrincipleEnvelopeModel.swift; sourceTree = "<group>"; };
04B4017F2CDB4B3B005C61A9 /* YHTalentProgramEvaluationView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTalentProgramEvaluationView.swift; sourceTree = "<group>"; };
04B401C22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordViewController.swift; sourceTree = "<group>"; };
04B401C52CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAddIncomeRecordCell.swift; sourceTree = "<group>"; };
04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHEmploymentVerificationAvailableCell.swift; sourceTree = "<group>"; };
04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeItemOccupyingCell.swift; sourceTree = "<group>"; };
04B401C82CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordItemCell.swift; sourceTree = "<group>"; };
04B401C92CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordSummaryCell.swift; sourceTree = "<group>"; };
04B401CA2CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHInfoConsentForHKTravelCell.swift; sourceTree = "<group>"; };
04B401CB2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTotalIncomeCell.swift; sourceTree = "<group>"; };
04B401CC2CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkingHourHeaderCell.swift; sourceTree = "<group>"; };
04B401CD2CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHWorkingHoursStatementCell.swift; sourceTree = "<group>"; };
04B401DB2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordWorkExperienceViewController.swift; sourceTree = "<group>"; };
04B401DD2CE73308005C61A9 /* YHIncomeRecordFromCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordFromCell.swift; sourceTree = "<group>"; };
04B401DF2CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypeSelectCell.swift; sourceTree = "<group>"; };
04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypesCell.swift; sourceTree = "<group>"; };
04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeInputMoneyCell.swift; sourceTree = "<group>"; };
04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRemarkCell.swift; sourceTree = "<group>"; };
04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeDocumentationConfirmationCell.swift; sourceTree = "<group>"; };
04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypeSelectViewController.swift; sourceTree = "<group>"; };
04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypePopViewSelectCell.swift; sourceTree = "<group>"; };
04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypeSelectModel.swift; sourceTree = "<group>"; };
04B401EF2CEB0C78005C61A9 /* YHIncomeRecordViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordViewModel.swift; sourceTree = "<group>"; };
04B401F12CEB19C1005C61A9 /* YHIncomeRecordCompleteModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordCompleteModel.swift; sourceTree = "<group>"; };
04B401F32CEB1C51005C61A9 /* YHIncomeCompanyDetailModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeCompanyDetailModel.swift; sourceTree = "<group>"; };
04B401F52CEB239C005C61A9 /* YHIncomeRecordUtilType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeRecordUtilType.swift; sourceTree = "<group>"; };
04B401F72CEB3E2A005C61A9 /* YHIncomeType.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeType.swift; sourceTree = "<group>"; };
04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessage.swift; sourceTree = "<group>"; };
04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHButlerServiceMessageHandler.swift; sourceTree = "<group>"; };
04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentManagementVC.swift; sourceTree = "<group>"; };
......@@ -2264,6 +2368,14 @@
path = Model;
sourceTree = "<group>";
};
042B20DD2CEB6A7500655093 /* VM */ = {
isa = PBXGroup;
children = (
042B20DE2CEB6A8F00655093 /* YHSchemeViewModel.swift */,
);
path = VM;
sourceTree = "<group>";
};
0430E63C2C72DB48000511E2 /* AddAdopters(2新增受养人) */ = {
isa = PBXGroup;
children = (
......@@ -2720,6 +2832,7 @@
045EEE272B9F171A0022A143 /* FamilyMember(家庭成员信息表) */,
045EEE4F2B9F171A0022A143 /* BaseInformation(基本资料) */,
045EEE5C2B9F171A0022A143 /* MainApplicantInformation(主申请人信息) */,
04B401D02CE6E6C8005C61A9 /* IncomeRecord(收入记录) */,
);
path = "ServiceProcess(我的信息流程)";
sourceTree = "<group>";
......@@ -2810,10 +2923,10 @@
045EEDBF2B9F171A0022A143 /* ViewModel */ = {
isa = PBXGroup;
children = (
045EEDC02B9F171A0022A143 /* YHWorkIntroductionViewModel.swift */,
045EEDC12B9F171A0022A143 /* YHWorkExperienceViewModel.swift */,
045EEDC22B9F171A0022A143 /* YHCompanyViewModel.swift */,
045EEDC32B9F171A0022A143 /* YHWorkItemListViewModel.swift */,
040AE97B2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift */,
);
path = ViewModel;
sourceTree = "<group>";
......@@ -2827,6 +2940,7 @@
045EEDC82B9F171A0022A143 /* YHWorkExperienceDetailModel.swift */,
045EEDC92B9F171A0022A143 /* YHWorkExperienceProjectModel.swift */,
045EEDCA2B9F171A0022A143 /* YHCompanyModel.swift */,
040AE9872CEB6DAC00310241 /* YHWorkExperiencePositionModel.swift */,
);
path = Model;
sourceTree = "<group>";
......@@ -2838,10 +2952,10 @@
045EEDCD2B9F171A0022A143 /* YHImageViewController.swift */,
045EEDCE2B9F171A0022A143 /* YHCompanySelectViewController.swift */,
045EEDCF2B9F171A0022A143 /* YHWorkExperienceViewController.swift */,
045EEDD02B9F171A0022A143 /* YHWorkIntroductionViewController.swift */,
045EEDD12B9F171A0022A143 /* YHWorkExperienceListViewController.swift */,
045EEDD22B9F171A0022A143 /* YHWorkExampleViewController.swift */,
045EEDD32B9F171A0022A143 /* YHImageClipperViewController.swift */,
040AE9792CE73D9E00310241 /* YHWorkExperiencePositionViewViewController.swift */,
);
path = C;
sourceTree = "<group>";
......@@ -2871,6 +2985,13 @@
045EEDE72B9F171A0022A143 /* YHResultBottomView.swift */,
045EEDE82B9F171A0022A143 /* YHWorkFileItemView.swift */,
043B0A342C1190C6008A9BBA /* YHSelectFileSheetView.swift */,
040AE9752CE7195600310241 /* YHWorkExperienceListReasonTableViewCell.swift */,
040AE9772CE73BA600310241 /* YHWorkExperiencePositionTableViewCell.swift */,
040AE97D2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift */,
040AE97F2CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift */,
040AE9812CE8810200310241 /* YHWorkExperienceSelectView.swift */,
040AE9832CE893CC00310241 /* YHWorkExperiencePositionItemView.swift */,
040AE9852CEB09ED00310241 /* YHWorkExperienceCompanySelectView.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -3545,6 +3666,56 @@
path = VM;
sourceTree = "<group>";
};
047F3DDD2CE7216D001B2A6D /* MyNewScheme(我的方案) */ = {
isa = PBXGroup;
children = (
042B20DD2CEB6A7500655093 /* VM */,
047F3DE02CE724FF001B2A6D /* C */,
047F3DDF2CE724FA001B2A6D /* V */,
047F3DDE2CE724F4001B2A6D /* M */,
);
path = "MyNewScheme(我的方案)";
sourceTree = "<group>";
};
047F3DDE2CE724F4001B2A6D /* M */ = {
isa = PBXGroup;
children = (
042B20DB2CEB69CB00655093 /* YHSchemeModel.swift */,
);
path = M;
sourceTree = "<group>";
};
047F3DDF2CE724FA001B2A6D /* V */ = {
isa = PBXGroup;
children = (
047F3DE32CE73916001B2A6D /* YHComprehensiveEvaluationCell.swift */,
047F3DE72CE83E64001B2A6D /* YHHKRequiredItemListCell.swift */,
047F3DE92CE84B6C001B2A6D /* YHImproveTargetCell.swift */,
047F3DED2CE87E83001B2A6D /* YHIndustryLocationCell.swift */,
047F3DEF2CE88380001B2A6D /* YHMaterialListCell.swift */,
047F3DF12CE888EF001B2A6D /* YHDocumentListCell.swift */,
047F3DF32CE88ACD001B2A6D /* YHImproveSchemeCell.swift */,
047F3DF52CE8A1C4001B2A6D /* YHModifySchemeInfoCell.swift */,
042B20D32CEAE5E900655093 /* YHImproveTargetListCell.swift */,
042B20D52CEB239400655093 /* YHIHKIdentityPlanCell.swift */,
042B20D12CEADBD800655093 /* YHImproveHKView.swift */,
047F3DE52CE83A0F001B2A6D /* YHHKRequiredItemView.swift */,
047F3DEB2CE84BD5001B2A6D /* YHImproveRequireItemView.swift */,
042B20D72CEB325900655093 /* YHImproveSchemeTemplateListView.swift */,
042B20D92CEB337100655093 /* YHImproveSchemeTemplateListCell.swift */,
);
path = V;
sourceTree = "<group>";
};
047F3DE02CE724FF001B2A6D /* C */ = {
isa = PBXGroup;
children = (
047F3DE12CE72524001B2A6D /* YHMyNewSchemeViewController.swift */,
047F3DF72CE8A570001B2A6D /* YHImproveSchemeViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
0480582C2C7CA6CD00502CAA /* GuideToHongKong(5 赴港行程指南) */ = {
isa = PBXGroup;
children = (
......@@ -3839,6 +4010,70 @@
path = Localized;
sourceTree = "<group>";
};
04B401C32CE6E6C8005C61A9 /* C */ = {
isa = PBXGroup;
children = (
04B401C22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift */,
04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */,
04B401DB2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift */,
);
path = C;
sourceTree = "<group>";
};
04B401C42CE6E6C8005C61A9 /* M */ = {
isa = PBXGroup;
children = (
04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */,
04B401F72CEB3E2A005C61A9 /* YHIncomeType.swift */,
04B401F12CEB19C1005C61A9 /* YHIncomeRecordCompleteModel.swift */,
04B401F32CEB1C51005C61A9 /* YHIncomeCompanyDetailModel.swift */,
04B401F52CEB239C005C61A9 /* YHIncomeRecordUtilType.swift */,
);
path = M;
sourceTree = "<group>";
};
04B401CE2CE6E6C8005C61A9 /* V */ = {
isa = PBXGroup;
children = (
04B401C52CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift */,
04B401DD2CE73308005C61A9 /* YHIncomeRecordFromCell.swift */,
04B401DF2CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift */,
04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */,
04B401E12CE746F4005C61A9 /* YHIncomeTypesCell.swift */,
04B401E32CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift */,
04B401E52CE83C74005C61A9 /* YHIncomeRemarkCell.swift */,
04B401E72CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift */,
04B401C62CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift */,
04B401C72CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift */,
04B401C82CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift */,
04B401C92CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift */,
04B401CA2CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift */,
04B401CB2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift */,
04B401CC2CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift */,
04B401CD2CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift */,
);
path = V;
sourceTree = "<group>";
};
04B401CF2CE6E6C8005C61A9 /* VM */ = {
isa = PBXGroup;
children = (
04B401EF2CEB0C78005C61A9 /* YHIncomeRecordViewModel.swift */,
);
path = VM;
sourceTree = "<group>";
};
04B401D02CE6E6C8005C61A9 /* IncomeRecord(收入记录) */ = {
isa = PBXGroup;
children = (
04B401C32CE6E6C8005C61A9 /* C */,
04B401C42CE6E6C8005C61A9 /* M */,
04B401CE2CE6E6C8005C61A9 /* V */,
04B401CF2CE6E6C8005C61A9 /* VM */,
);
path = "IncomeRecord(收入记录)";
sourceTree = "<group>";
};
04B4B8D32C89CCE400ED82BC /* M */ = {
isa = PBXGroup;
children = (
......@@ -4627,6 +4862,7 @@
A5A60B232CE4C4990083DB2F /* QMAS(优才) */ = {
isa = PBXGroup;
children = (
047F3DDD2CE7216D001B2A6D /* MyNewScheme(我的方案) */,
0449EEE52C8EE99000A397FD /* Resign(续签) */,
0472CBA62C5A11640096F48F /* CustomerService(客服段) */,
A525D22C2BA837C5001A84F5 /* FileList(文件清单) */,
......@@ -5416,6 +5652,7 @@
04213B252C48C15400797900 /* YHHomeIdentityViewController.swift in Sources */,
0472E25C2C521E64008EAB6E /* YHHomeIdentityListVC.swift in Sources */,
045EEF002B9F171A0022A143 /* YHFormItemEnterDetailCell.swift in Sources */,
04B401DC2CE729F2005C61A9 /* YHIncomeRecordWorkExperienceViewController.swift in Sources */,
0485DFD42C649A2500B50293 /* YHPrincipleUploadModel.swift in Sources */,
04213B352C4F85A900797900 /* YHHomeLifeCategoryModel.swift in Sources */,
0430E6602C7470AD000511E2 /* YHAdopterTravelViewController.swift in Sources */,
......@@ -5471,6 +5708,7 @@
048058352C7DC7AC00502CAA /* YHMyTestViewController.swift in Sources */,
045EEEA72B9F171A0022A143 /* YHWorkExperienceViewController.swift in Sources */,
A5FD63BD2B623C2C00D1D9DA /* YHInformationPerfectListVC.swift in Sources */,
047F3DF82CE8A570001B2A6D /* YHImproveSchemeViewController.swift in Sources */,
04CA2BEA2CB7708E00F36DE7 /* YHResignUploadTravelCardListheadView.swift in Sources */,
045EEE8D2B9F171A0022A143 /* YHPreviewInfoCell.swift in Sources */,
047AA3E22C4A66CE009C4554 /* YHLifeItemTableViewCell.swift in Sources */,
......@@ -5517,10 +5755,13 @@
04CCEDF92CA0FD5F0026EA70 /* YHHKImmigrationRecordsSummaryModel.swift in Sources */,
0430E6882C771B06000511E2 /* YHAdopterItemView.swift in Sources */,
045EEEB32B9F171A0022A143 /* YHWorkFileSyncTableViewCell.swift in Sources */,
040AE9842CE893CC00310241 /* YHWorkExperiencePositionItemView.swift in Sources */,
045EEEF12B9F171A0022A143 /* YHChildInfoContainerVC.swift in Sources */,
04CA2BFD2CB7C36D00F36DE7 /* YHResignUploadDocListCell.swift in Sources */,
045EEF0B2B9F171A0022A143 /* YHBasicInfoFillViewController.swift in Sources */,
04B401DE2CE73308005C61A9 /* YHIncomeRecordFromCell.swift in Sources */,
0430E6582C7434F2000511E2 /* YHAdopterNewPeopleViewController.swift in Sources */,
040AE97A2CE73D9E00310241 /* YHWorkExperiencePositionViewViewController.swift in Sources */,
A582B2452BBA4CF9009D098C /* YHHKPlanDocModel.swift in Sources */,
045EEF142B9F171A0022A143 /* YHItemModel.swift in Sources */,
047AB5E62CD083CE002A3573 /* YHButlerMessageReportHandler.swift in Sources */,
......@@ -5536,10 +5777,10 @@
04E86E662B86EB6F00A35F4B /* YHLoginManager.swift in Sources */,
04A7BD112BA4218B00BD35A2 /* YHMyDocumentsListViewModel.swift in Sources */,
0472CBA82C5A11640096F48F /* YHPrincipleUploadListVC.swift in Sources */,
047F3DF62CE8A1C4001B2A6D /* YHModifySchemeInfoCell.swift in Sources */,
A5EF21352BA6E05E005027E6 /* YHQuestionAndAnswerViewController.swift in Sources */,
A5EF213B2BA6EC98005027E6 /* YHQuestionAndAnswerCell.swift in Sources */,
04912F702CB765FE00CC3105 /* YHResignAppointTimeViewController.swift in Sources */,
045EEEA82B9F171A0022A143 /* YHWorkIntroductionViewController.swift in Sources */,
044D0BFC2C21635B00C5CF5E /* YHInformationAuthorizationStepOneViewController.swift in Sources */,
045EEEBF2B9F171A0022A143 /* YHWorkFileItemView.swift in Sources */,
04AF58C42B4FC51C0066011A /* YHLocalizable.swift in Sources */,
......@@ -5547,6 +5788,7 @@
04F4A5282CB8D4270026D469 /* YHResignAppointScheduleListViewController.swift in Sources */,
A598E9E22C7CB32D00F84739 /* YHTravelDocsPreparationListModel.swift in Sources */,
A598E9D72C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift in Sources */,
042B20DC2CEB69CB00655093 /* YHSchemeModel.swift in Sources */,
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */,
04CA2BFF2CB7C9A000F36DE7 /* YHResignUploadSuccessDocListCell.swift in Sources */,
04CE1AE12C2AD91F001CB80A /* YHActivityDetailItemView.swift in Sources */,
......@@ -5572,6 +5814,7 @@
04F2436C2C9D9A3A00DF2C74 /* YHResignDocumentCompleteModel.swift in Sources */,
044D0BF62C2154CA00C5CF5E /* YHAllowUseMyInfoViewController.swift in Sources */,
0485DFE12C6A0B6200B50293 /* YHPrincipleApprovedResultVC.swift in Sources */,
040AE9822CE8810200310241 /* YHWorkExperienceSelectView.swift in Sources */,
04256DF42C73626900A37BA4 /* YHServiceSelectAlertView.swift in Sources */,
04F5F8702C1AC4C2004A463C /* YHHKEventWebViewController.swift in Sources */,
045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */,
......@@ -5585,6 +5828,7 @@
048787D12BCE61B20036E221 /* YHServiceNoOrderView.swift in Sources */,
A567E5AC2BD7643D00D5D5A0 /* YHAgreementAlertView.swift in Sources */,
04F243372C958FB100DF2C74 /* YHHKImmigrationRecordsVC.swift in Sources */,
040AE97C2CE7410100310241 /* YHWorkExperiencePositionViewModel.swift in Sources */,
04CE1ADD2C2AD91F001CB80A /* YHActivityDetailCell.swift in Sources */,
04AA19FD2BB40D5C00C1CBBD /* Applegate(JPush).swift in Sources */,
04912F7E2CB7B2BA00CC3105 /* YHResignAppointOptionResultCell.swift in Sources */,
......@@ -5601,6 +5845,7 @@
A5DE0D3C2BB9016200976FE1 /* YHEmailInputAlertView.swift in Sources */,
04CCEDFD2CA150ED0026EA70 /* YHHKImmigrationRecordsSingleModel.swift in Sources */,
0418922A2C91CB2500B9FB94 /* YHResignDocumentStatus.swift in Sources */,
047F3DF22CE888EF001B2A6D /* YHDocumentListCell.swift in Sources */,
04256DE42C72E3FA00A37BA4 /* YHInfoItemOptionView.swift in Sources */,
04256DF22C734E7E00A37BA4 /* YHGrabFileCell.swift in Sources */,
04CA2C052CB8F75700F36DE7 /* YHResignUploadDocListViewModel.swift in Sources */,
......@@ -5608,17 +5853,21 @@
04FD85662C2124AF00BEF9C5 /* YHNameCardViewController.swift in Sources */,
044E31C72CBD264D00500F8E /* YHResignInfoConfirmInfoListModel.swift in Sources */,
0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */,
04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */,
045EEF192B9F171A0022A143 /* YHAddressModel.swift in Sources */,
A5AC63EA2CE83F800080960D /* YHOtherMultipleChoiceItemView.swift in Sources */,
045EEEDB2B9F171A0022A143 /* YHCollegeSearchViewController.swift in Sources */,
04C85DE72C36ADAE008B20D6 /* YHMyFileListHeaderView.swift in Sources */,
047F3DF42CE88ACD001B2A6D /* YHImproveSchemeCell.swift in Sources */,
A598E9DC2C7CA52300F84739 /* YHTravelDocsPreparationTipsCell.swift in Sources */,
A53A350B2CE88B86002FE6A3 /* YHSingleOptionalItemsView.swift in Sources */,
045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */,
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */,
0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */,
047F3DE22CE72524001B2A6D /* YHMyNewSchemeViewController.swift in Sources */,
A567E5AA2BD7643D00D5D5A0 /* YHGestureTableView.swift in Sources */,
04CE1ADF2C2AD91F001CB80A /* YHActivityListCell.swift in Sources */,
04B401E22CE746F4005C61A9 /* YHIncomeTypesCell.swift in Sources */,
04256DFC2C742C7D00A37BA4 /* YHFamilyInfoConfirmViewModel.swift in Sources */,
A59B43CF2C4B5AD100B28379 /* YHShareViewOnTablebarView.swift in Sources */,
044EE22F2C918D1400A2FE3A /* YHServiceStepAlertView.swift in Sources */,
......@@ -5633,10 +5882,12 @@
04F243552C9C435A00DF2C74 /* YHHKRecordsInfoItemCell.swift in Sources */,
A5D0012C2BABC84A001F003C /* YHFileListBottomView.swift in Sources */,
0485DFDC2C670C7200B50293 /* YHPrincipleSendMailView.swift in Sources */,
04B401EE2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift in Sources */,
044F394A2CB8068E007CA277 /* YHVisaRenewalResidenceActionCell.swift in Sources */,
04E41DE82BD240570077EAE3 /* YHOrderDetailViewController.swift in Sources */,
A5FD63C52B637EE000D1D9DA /* YHSubmitAllInfoCheckView.swift in Sources */,
045EEF222B9F171A0022A143 /* YHImagePickerView.swift in Sources */,
042B20D82CEB325900655093 /* YHImproveSchemeTemplateListView.swift in Sources */,
A5ACE9442B4564F7002C94D2 /* Array+Extension.swift in Sources */,
04F243632C9D4C9700DF2C74 /* YHBaseCornerRadiusBorderView.swift in Sources */,
0435FA812BA186D600024EAE /* YHMyFileMethodTableViewCell.swift in Sources */,
......@@ -5665,6 +5916,7 @@
A5ACE9462B4564F7002C94D2 /* YHHUDSquareBaseView.swift in Sources */,
04F243512C9BB89200DF2C74 /* YHHKRecordsSectionItemBaseCell.swift in Sources */,
04FB01D42C2404F50040115D /* YHMyFriendsNoDataView.swift in Sources */,
042B20D42CEAE5E900655093 /* YHImproveTargetListCell.swift in Sources */,
04D144762C0452E200EE3758 /* YHOneKeyLoginManager.swift in Sources */,
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */,
04B360F72C646B4F001EB053 /* YHPrincipleEnvelopeModel.swift in Sources */,
......@@ -5691,6 +5943,7 @@
0457921B2CBE0C3F00EBD99B /* YHLookResignResultModel.swift in Sources */,
045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */,
04FA8B302C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift in Sources */,
04B401F82CEB3E2B005C61A9 /* YHIncomeType.swift in Sources */,
04256E112C75BD2700A37BA4 /* YHVisaPaymentListModel.swift in Sources */,
04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */,
044EE24A2C9434D400A2FE3A /* YHResignCertificateDetailPassPortViewController.swift in Sources */,
......@@ -5704,6 +5957,7 @@
A567E5B82BD7643D00D5D5A0 /* YHSearchItemLayout.swift in Sources */,
A567E5A02BD7643D00D5D5A0 /* YHHomeWebViewController.swift in Sources */,
044D0BF42C21247100C5CF5E /* YHUserInfoSettingViewController.swift in Sources */,
040AE9862CEB09ED00310241 /* YHWorkExperienceCompanySelectView.swift in Sources */,
A567E5942BD7643D00D5D5A0 /* YHHomeListModel.swift in Sources */,
047F3DDB2CE6DE91001B2A6D /* YHEducationMarkView.swift in Sources */,
04CE1AD82C2AD91F001CB80A /* YHActivityListViewController.swift in Sources */,
......@@ -5725,6 +5979,7 @@
049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */,
04256E152C75BD2700A37BA4 /* YHPayMembersCell.swift in Sources */,
0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */,
042B20DF2CEB6A8F00655093 /* YHSchemeViewModel.swift in Sources */,
044F394C2CB806D0007CA277 /* YHVisaRenewalPayMethodUrlCell.swift in Sources */,
A567E5B12BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift in Sources */,
A582B2432BB95E20009D098C /* YHHKPlanCell.swift in Sources */,
......@@ -5756,6 +6011,7 @@
045792192CBE08BA00EBD99B /* YHLookResignResultViewModel.swift in Sources */,
A5ACE9342B4564F7002C94D2 /* YHAllApiName.swift in Sources */,
04AF82D62C25542D0028CE2A /* YHInterestTopicLayout.swift in Sources */,
040AE9802CE8340000310241 /* YHWorkExperiencePositionReasonTableViewCell.swift in Sources */,
04912F6E2CB6A64700CC3105 /* YHResignAppointSubmitTipsView.swift in Sources */,
045EEE902B9F171A0022A143 /* YHPreviewInfoNameAndSubNameItemsView.swift in Sources */,
A5ACE9502B4564F7002C94D2 /* YhCacheTool.swift in Sources */,
......@@ -5785,6 +6041,7 @@
04CA2BF42CB7B33500F36DE7 /* YHResignUploadTravelGuideView.swift in Sources */,
A5ACE93F2B4564F7002C94D2 /* UIViewController+Extension.swift in Sources */,
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */,
042B20D22CEADBD800655093 /* YHImproveHKView.swift in Sources */,
04F243662C9D5CB200DF2C74 /* YHResignDocumentViewModel.swift in Sources */,
A567E5B22BD7643D00D5D5A0 /* YHHomeBannerCollectionViewCell.swift in Sources */,
0430E68A2C77415D000511E2 /* YHAdopterAddModel.swift in Sources */,
......@@ -5815,7 +6072,6 @@
04256DD02C7041C700A37BA4 /* YHInfoItemView.swift in Sources */,
A5ACE9312B4564F7002C94D2 /* YHPersonalCenterCell.swift in Sources */,
0430E6562C7342AB000511E2 /* YHAdopterIncomeFileCountTableViewCell.swift in Sources */,
045EEE9A2B9F171A0022A143 /* YHWorkIntroductionViewModel.swift in Sources */,
0449EEEB2C8EF2B700A397FD /* YHResignMaterialListVC.swift in Sources */,
044D0C1C2C22C30B00C5CF5E /* YHEditSchoolViewController.swift in Sources */,
044E31C92CBD2AA400500F8E /* YHResignInfoConfirmIViewModel.swift in Sources */,
......@@ -5842,8 +6098,10 @@
045EEF102B9F171A0022A143 /* YHMainApplicantInformationViewModel.swift in Sources */,
0493B3DC2BA7EFE600AF9393 /* YHCertificateSearchViewController.swift in Sources */,
A5DF9C632C78733200CE48E6 /* YHHKLegaldaysModel.swift in Sources */,
047F3DEC2CE84BD5001B2A6D /* YHImproveRequireItemView.swift in Sources */,
0430E65A2C7436CD000511E2 /* YHAdopterNewPeopleViewModel.swift in Sources */,
04256E1D2C75C74200A37BA4 /* YHAppointHKResultModel.swift in Sources */,
047F3DE62CE83A0F001B2A6D /* YHHKRequiredItemView.swift in Sources */,
04CE1ADB2C2AD91F001CB80A /* YHActivityTitleItemView.swift in Sources */,
A5FD63BF2B6250BC00D1D9DA /* YHInformationPerfectCell.swift in Sources */,
04CA2C2F2CBA5C9E00F36DE7 /* YHLookResignGuideLineView.swift in Sources */,
......@@ -5895,7 +6153,9 @@
04CE1AD22C2AD91F001CB80A /* YHActivityModel.swift in Sources */,
044EE23A2C92BEF900A2FE3A /* YHResignCertificateListViewModel.swift in Sources */,
04256E002C7440A500A37BA4 /* YHFamilyWarmTipsCell.swift in Sources */,
042B20DA2CEB337100655093 /* YHImproveSchemeTemplateListCell.swift in Sources */,
0445E6AF2BE9CFF6003C52F9 /* YHAppVersionForceUpdateView.swift in Sources */,
040AE9882CEB6DAC00310241 /* YHWorkExperiencePositionModel.swift in Sources */,
04213B272C48C95E00797900 /* YHHomeIdentityCell.swift in Sources */,
041892262C91BDF500B9FB94 /* YHResignDocumentHeaderCell.swift in Sources */,
0449EEE92C8EEB1E00A397FD /* YHResinMaterialManageContainerVC.swift in Sources */,
......@@ -5918,6 +6178,7 @@
04C85DE12C3677CB008B20D6 /* YHConsultantQRCodeView.swift in Sources */,
A567E5A32BD7643D00D5D5A0 /* YHHomeBannerView.swift in Sources */,
A5ACE9402B4564F7002C94D2 /* String+Extension.swift in Sources */,
040AE9782CE73BA600310241 /* YHWorkExperiencePositionTableViewCell.swift in Sources */,
04CCEDFB2CA142010026EA70 /* YHHKImmigrationRecordsStatisticsModel.swift in Sources */,
045EEEE42B9F171A0022A143 /* YHMySignatureDetailModel.swift in Sources */,
A5DF9C652C78B5A400CE48E6 /* YHUploadCertificateViewModel.swift in Sources */,
......@@ -5948,6 +6209,9 @@
047AA3E82C4A6D69009C4554 /* YHListViewController.swift in Sources */,
048787D92BCF68530036E221 /* YHProgressView.swift in Sources */,
04256DEE2C73338200A37BA4 /* YHGrabingNumberListCell.swift in Sources */,
047F3DF02CE88380001B2A6D /* YHMaterialListCell.swift in Sources */,
04B401F02CEB0C78005C61A9 /* YHIncomeRecordViewModel.swift in Sources */,
04B401E62CE83C74005C61A9 /* YHIncomeRemarkCell.swift in Sources */,
045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */,
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */,
042092B72C9D6719001184F0 /* YHSignatureWebViewController.swift in Sources */,
......@@ -6051,6 +6315,7 @@
045EEE882B9F171A0022A143 /* YHPreviewAcademicAndProfessionalQualificationViewController.swift in Sources */,
0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */,
A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */,
04B401F22CEB19C1005C61A9 /* YHIncomeRecordCompleteModel.swift in Sources */,
0468D42B2B55019900CFB916 /* YHAnalytics.swift in Sources */,
04912F842CB7D14D00CC3105 /* YHResignScheduleLineCollectCell.swift in Sources */,
0445E6B12BE9E15C003C52F9 /* YHFindAppNewVersionView.swift in Sources */,
......@@ -6083,6 +6348,7 @@
045EEEEA2B9F171A0022A143 /* YHFamilyInitialInfo.swift in Sources */,
A59FD0772CC0A62A00BBED55 /* YHPickTimeHoldView.swift in Sources */,
04256E232C76D22400A37BA4 /* YHAppointItem.swift in Sources */,
04B401E02CE738C0005C61A9 /* YHIncomeTypeSelectCell.swift in Sources */,
04256E212C76CA7800A37BA4 /* YHActivateHKVisaCell.swift in Sources */,
043BA8752C241B38006EF02D /* YHAddFriendCardCell.swift in Sources */,
A5C382CF2B5F9A9100C5E65C /* YHServiceCenterMainViewModel.swift in Sources */,
......@@ -6104,6 +6370,7 @@
047AA3D52C4A3643009C4554 /* YHInvitationWithGiftsDetailView.swift in Sources */,
04CA2C272CBA0EDB00F36DE7 /* YHLookResignResultStateTwoTableViewCell.swift in Sources */,
04CA2C2B2CBA47CB00F36DE7 /* YHLookResignResultStateThreePeopleTableViewCell.swift in Sources */,
047F3DE82CE83E64001B2A6D /* YHHKRequiredItemListCell.swift in Sources */,
A5DF3D462BF72BA1003D5F03 /* YHTestViewController.swift in Sources */,
A566A79C2C227C9B00980D06 /* YHOrderTipsItemView.swift in Sources */,
A517A4E52BB6C4BB000DEECD /* YHDocumentFileItemView.swift in Sources */,
......@@ -6124,6 +6391,7 @@
A5FD63C12B62616D00D1D9DA /* YHInformationPerfectModel.swift in Sources */,
044F395C2CB8D58A007CA277 /* YHVisaRenewalPayInfoBaseCell.swift in Sources */,
A567E5A62BD7643D00D5D5A0 /* YHHomeSearchView.swift in Sources */,
040AE97E2CE7464000310241 /* YHWorkExperiencePositionListTableViewCell.swift in Sources */,
045792212CBF8B3900EBD99B /* YHResignUploadDetailFileNameCell.swift in Sources */,
045EEE912B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemView.swift in Sources */,
04358E082C77657000811928 /* YHReAppointViewController.swift in Sources */,
......@@ -6132,9 +6400,20 @@
045EEEE62B9F171A0022A143 /* YHMySignatureListViewController.swift in Sources */,
049537852BA9B28500AF7E59 /* YHCertificateTemplateCell.swift in Sources */,
A582B23D2BB944ED009D098C /* YHHKPlanDoctumentVC.swift in Sources */,
042B20D62CEB239400655093 /* YHIHKIdentityPlanCell.swift in Sources */,
045EEEE12B9F171A0022A143 /* YHMySignatureListViewModel.swift in Sources */,
04A7BD152BA4361700BD35A2 /* YHMyDocumentDetailModel.swift in Sources */,
045EEEA02B9F171A0022A143 /* YHWorkItemListModel.swift in Sources */,
04B401D12CE6E6C8005C61A9 /* YHIncomeRecordSummaryCell.swift in Sources */,
04B401D22CE6E6C8005C61A9 /* YHIncomeRecordViewController.swift in Sources */,
04B401D32CE6E6C8005C61A9 /* YHEmploymentVerificationAvailableCell.swift in Sources */,
04B401D42CE6E6C8005C61A9 /* YHWorkingHoursStatementCell.swift in Sources */,
04B401D52CE6E6C8005C61A9 /* YHInfoConsentForHKTravelCell.swift in Sources */,
04B401D62CE6E6C8005C61A9 /* YHWorkingHourHeaderCell.swift in Sources */,
04B401D72CE6E6C8005C61A9 /* YHIncomeRecordItemCell.swift in Sources */,
04B401D82CE6E6C8005C61A9 /* YHAddIncomeRecordCell.swift in Sources */,
04B401D92CE6E6C8005C61A9 /* YHIncomeItemOccupyingCell.swift in Sources */,
04B401DA2CE6E6C8005C61A9 /* YHTotalIncomeCell.swift in Sources */,
04EA230E2BB538E9009DA928 /* YHDocumentUploadTableViewCell.swift in Sources */,
04256DEA2C73263A00A37BA4 /* YHInfoItemSelectSheetView.swift in Sources */,
0430E6822C75E068000511E2 /* YHAdopterCardOtherGuideView.swift in Sources */,
......@@ -6176,6 +6455,7 @@
04174D782BCD5B74000BA46D /* YHMessageListVC.swift in Sources */,
0430E6742C74A02B000511E2 /* YHAdopterIdCardViewController.swift in Sources */,
04F243472C9BB6C000DF2C74 /* YHHKRecordsSectionHeaderCell.swift in Sources */,
047F3DE42CE73916001B2A6D /* YHComprehensiveEvaluationCell.swift in Sources */,
044E31C52CBCFDD200500F8E /* YHResignAppointGuideLineView.swift in Sources */,
A517A4E12BB573EB000DEECD /* YHDocListCell.swift in Sources */,
A58037212BAD7B2A0031C312 /* YHMySchemeModel.swift in Sources */,
......@@ -6198,6 +6478,7 @@
04A7BC912B6B7B89000E8D47 /* YHTwoOptionAlertView.swift in Sources */,
A5F886B62C61F76200B63CF5 /* YHLongtapPictureSheetView.swift in Sources */,
045EEF1C2B9F171A0022A143 /* YHAddressPresentAnimated.swift in Sources */,
04B401E82CE83FBD005C61A9 /* YHIncomeDocumentationConfirmationCell.swift in Sources */,
04E86E0D2B70D51D00A35F4B /* YHWebViewViewController.swift in Sources */,
048058332C7DC0CF00502CAA /* YHTravelCertificateTipsCell.swift in Sources */,
04256E252C76E26100A37BA4 /* YHNoNeedAppointMembersCell.swift in Sources */,
......@@ -6214,10 +6495,12 @@
04912F822CB7CFAE00CC3105 /* YHResignAppointedScheduleLineView.swift in Sources */,
04912F8A2CB9000200CC3105 /* YHResignScheduleSingleInfoCell.swift in Sources */,
04256E102C75BD2700A37BA4 /* YHVisaPaymentVC.swift in Sources */,
047F3DEA2CE84B6C001B2A6D /* YHImproveTargetCell.swift in Sources */,
A5ACE9562B4564F7002C94D2 /* YHBouncesContentView.swift in Sources */,
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */,
045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */,
044EE2362C92916600A2FE3A /* YHResignCertificateListViewController.swift in Sources */,
04B401F62CEB239C005C61A9 /* YHIncomeRecordUtilType.swift in Sources */,
04F243412C9AFBAB00DF2C74 /* YHHKRecordItemDetailType.swift in Sources */,
04256DDE2C72DA3B00A37BA4 /* YHCertificateAppointViewController.swift in Sources */,
A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */,
......@@ -6236,6 +6519,7 @@
045EEEB82B9F171A0022A143 /* YHWorkExampleMessageView.swift in Sources */,
04256E142C75BD2700A37BA4 /* YHPayMemberItemsView.swift in Sources */,
04F4B76B2BAA7E1E00D13284 /* YHCertificateTemplateSheetView.swift in Sources */,
040AE9762CE7195600310241 /* YHWorkExperienceListReasonTableViewCell.swift in Sources */,
045EEEA22B9F171A0022A143 /* YHWorkExperienceProjectModel.swift in Sources */,
04213B332C4A084600797900 /* YHHomeInfoClassifyModel.swift in Sources */,
04F316442C3568F000024164 /* YHAboutGalaxyViewController.swift in Sources */,
......@@ -6266,9 +6550,12 @@
04F9574B2C2032D8003C631C /* YHMyFriendsCell.swift in Sources */,
0430E65E2C74624E000511E2 /* YHAdopterCardTableViewCell.swift in Sources */,
045EEF1F2B9F171A0022A143 /* YHDatePickView.swift in Sources */,
04B401E42CE76B10005C61A9 /* YHIncomeInputMoneyCell.swift in Sources */,
04174D7A2BCD5B74000BA46D /* YHDetailMessageCell.swift in Sources */,
04912F942CB921C300CC3105 /* YHResignAppointContainerViewController.swift in Sources */,
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */,
04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */,
04B401F42CEB1C51005C61A9 /* YHIncomeCompanyDetailModel.swift in Sources */,
044BACC72BCFA58E00184C64 /* YHNoDataTipsView.swift in Sources */,
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */,
A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */,
......@@ -6282,6 +6569,7 @@
A5DF9C672C78B7E600CE48E6 /* YHUploadCertificateListModel.swift in Sources */,
045EEEDC2B9F171A0022A143 /* YHQualificationDetailVC.swift in Sources */,
045EEEF52B9F171A0022A143 /* YHSpouseInfoContainerVC.swift in Sources */,
047F3DEE2CE87E83001B2A6D /* YHIndustryLocationCell.swift in Sources */,
047AA3F62C50E773009C4554 /* YHShareCashOutModel.swift in Sources */,
0472CBAC2C5A11640096F48F /* YHPrincleViewModel.swift in Sources */,
044F39542CB80731007CA277 /* YHVisaRenewalPayTipsCell.swift in Sources */,
......
......@@ -23,7 +23,6 @@ class AppDelegate: UIResponder, UIApplicationDelegate, WXApiDelegate {
var window: UIWindow?
func application(_ application: UIApplication, didFinishLaunchingWithOptions launchOptions: [UIApplication.LaunchOptionsKey: Any]?) -> Bool {
Thread.sleep(forTimeInterval: 0.5) // 应产品同学Nick要求 启动页时间展示长点
......
......@@ -34,8 +34,8 @@ class YHAliYunLogManager {
static let SLS_PROJECT_DEV = "dev-yinhe-app"
static let SLS_PROJECT_RELEASE = "release-yinhe-app"
static let SLS_LOG_STORE = "yinhe_logstore"
static let SLS_KEY = "LTAI5tPV7UEB2Dqyaippchbq"
static let SLS_SECRET = "K6AOXrVnLzb0Zn6HtHm9qFv8DfmEFv"
static let SLS_KEY = "LTAI5tRiRFQGiM3DtDVpjHWr"
static let SLS_SECRET = "f9Uc3LNhxDWwlBS7rmdg4UPCTUL57M"
static let shared = createManager()
private var config: LogProducerConfig?
......
......@@ -307,6 +307,8 @@ extension YHHomeHoldViewPageViewController {
NotificationCenter.default.addObserver(self, selector: #selector(didRefreshMessageCount), name: YhConstant.YhNotification.didQiYuUnReadMsgCountChangeNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didJumpToIdentityTab), name: YhConstant.YhNotification.didJumpToHomePageIdentityTabNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didJumpToNewsTab), name: YhConstant.YhNotification.didJumpToHomePageNewsTabNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didJumpToLifeTab), name: YhConstant.YhNotification.didJumpToHomePageLifeTabNotification, object: nil)
......@@ -368,6 +370,10 @@ extension YHHomeHoldViewPageViewController {
jumpToItemIndex(itemIndex: 2)
}
@objc func didJumpToIdentityTab() {
jumpToItemIndex(itemIndex: 1)
}
@objc func didLoadYhManager() {
if needShowManagerTipsView {
needShowManagerTipsView = false
......
......@@ -74,7 +74,7 @@ class YHServiceOrderListView: YHBaseViewController {
} else if type == 4 { // 方案
//我的方案
let vc = YHMineSchemeViewController()
let vc = YHMyNewSchemeViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 5 {
......
......@@ -19,6 +19,11 @@ class YHDocumentPromptTableViewCell: UITableViewCell {
updatePrompt()
}
}
var workList: Int = 0 {
didSet {
updateWorkPrompt()
}
}
override func awakeFromNib() {
super.awakeFromNib()
......@@ -121,6 +126,13 @@ class YHDocumentPromptTableViewCell: UITableViewCell {
}
}
func updateWorkPrompt() {
let a: ASAttributedString = .init("温馨提示:优才获批后,您需要提供获批时在职公司盖章的赴港居留同意书,请您知悉。", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.subTextColor2))
let aa: ASAttributedString = .init("查看示例模板", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor), .underline(.single), .action {
})
subTitleLabel.attributed.text = a + aa
}
}
//
// YHImproveSchemeViewController.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHImproveSchemeViewController: YHBaseViewController {
var orderId: Int = 0
let viewModel = YHSchemeViewModel()
var items:[YHImproveDetailModel] = []
var isPass: Bool = false
lazy var bgImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "my_scheme_improve_list_bg"))
view.frame = CGRectMake(0, 0, KScreenWidth, 528)
return view
}()
lazy var headerView: UIView = {
let view = UIView()
view.addSubview(greetLabel)
let tipsLabel = UILabel()
tipsLabel.numberOfLines = 0
tipsLabel.font = UIFont.PFSC_R(ofSize: 14)
tipsLabel.textColor = .white
tipsLabel.text = "您好,根据您的信息,这是我们为您定制的提升方案,方案详情如下:"
view.addSubview(tipsLabel)
let leftImgV = UIImageView(image: UIImage(named: "my_scheme_improve_wheatear_left"))
let rightImgV = UIImageView(image: UIImage(named: "my_scheme_improve_wheatear_right"))
view.addSubview(leftImgV)
view.addSubview(rightImgV)
greetLabel.snp.makeConstraints { make in
make.top.equalTo(32)
make.left.equalTo(leftImgV.snp.right).offset(8)
make.right.equalTo(rightImgV.snp.left).offset(-8)
make.height.equalTo(34)
}
leftImgV.snp.makeConstraints { make in
make.width.equalTo(14)
make.height.equalTo(24)
make.left.equalTo(24)
make.centerY.equalTo(greetLabel)
}
rightImgV.snp.makeConstraints { make in
make.width.equalTo(14)
make.height.equalTo(24)
make.centerY.equalTo(greetLabel)
}
tipsLabel.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(greetLabel.snp.bottom).offset(12)
make.bottom.equalTo(-32)
}
return view
}()
lazy var greetLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 24)
label.textColor = .init(hex: 0xFFDEC8)
label.text = "尊敬的先生"
return label
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHImproveTargetListCell.self, forCellReuseIdentifier: YHImproveTargetListCell.cellReuseIdentifier)
tableView.register(YHIHKIdentityPlanCell.self, forCellReuseIdentifier: YHIHKIdentityPlanCell.cellReuseIdentifier)
tableView.bounces = false
return tableView
}()
lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.addSubview(leftBtn)
view.addSubview(rightBtn)
leftBtn.snp.makeConstraints { make in
make.top.equalTo(8)
make.left.equalTo(16)
make.width.equalTo(rightBtn)
make.right.equalTo(rightBtn.snp.left).offset(-10)
make.height.equalTo(46)
}
rightBtn.snp.makeConstraints { make in
make.top.equalTo(8)
make.right.equalTo(-16)
make.height.equalTo(46)
}
return view
}()
lazy var rightBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .brandMainColor
btn.setTitle("重新选择提升目标", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
btn.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius3
return btn
}()
lazy var leftBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .white
btn.layer.borderColor = UIColor.brandMainColor.cgColor
btn.layer.borderWidth = 1.0
btn.setTitle("修改信息", for: .normal)
btn.setTitleColor(.brandMainColor, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
btn.addTarget(self, action: #selector(didLeftBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius3
return btn
}()
@objc func didLeftBtnClicked() {
self.modifyInfo()
}
@objc func didRightBtnClicked() {
self.navigationController?.popViewController(animated: true)
}
override func viewDidLoad() {
super.viewDidLoad()
view.backgroundColor = .init(hex: 0xF6F7FA)
gk_navTitle = "提升方案"
gk_navTitleColor = .white
gk_backImage = UIImage(named: "back_icon_white")
gk_navigationBar.backgroundColor = .clear
self.view.addSubview(bgImgView)
self.view.addSubview(tableView)
self.view.addSubview(bottomView)
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
bottomView.isHidden = isPass
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(isPass ? 0.0 : 64+k_Height_safeAreaInsetsBottom())
}
view.bringSubviewToFront(gk_navigationBar)
tableView.reloadData()
}
override func backItemClick(_ sender: Any) {
self.navigationController?.popToRootViewController(animated: true)
}
func requestData() {
viewModel.getImproveDetail(orderId: orderId) {
[weak self] success, error in
guard let self = self else { return }
items.removeAll()
items.append(contentsOf: viewModel.improveDetailModel.improvePlanItem)
tableView.reloadData()
greetLabel.text = "尊敬的\(viewModel.improveDetailModel.username)\(viewModel.improveDetailModel.sex)"
}
}
func modifyInfo() {
YHHUD.show(.progress(message: "修改中..."))
viewModel.modifyInfo(orderId: orderId) {
[weak self] success, error in
guard let self = self else { return }
YHHUD.hide()
if success {
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
YHHUD.flash(message: error?.errorMsg ?? "修改失败")
}
}
}
extension YHImproveSchemeViewController : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: YHIHKIdentityPlanCell.cellReuseIdentifier, for: indexPath) as! YHIHKIdentityPlanCell
return cell
}
let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveTargetListCell.cellReuseIdentifier, for: indexPath) as! YHImproveTargetListCell
cell.arr = self.items
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if indexPath.row == 1 {
UIViewController.current?.navigationController?.popToRootViewController(animated: false)
goTabBarBy(tabType: .home)
NotificationCenter.default.post(name: YhConstant.YhNotification.didJumpToHomePageIdentityTabNotification, object: nil)
}
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return self.headerView
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.1
}
}
extension YHImproveSchemeViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let scrollY = scrollView.contentOffset.y
if scrollY >= 0.0 {
bgImgView.frame.origin.y = -scrollY
} else {
bgImgView.frame.origin.y = 0.0
}
if scrollY >= 44.0 {
gk_navigationBar.backgroundColor = .init(hex: 0x082F84)
} else {
gk_navigationBar.backgroundColor = .clear
}
}
}
//
// YHMyNewSchemeViewController.swift
// galaxy
//
// Created by Dufet on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum YHSchemeItemType: Int {
case none = 0
case evaluate = 1 // 综合评估
case industryLocation = 2 // 行业定位
case materialList = 3 // 资料清单
case documentList = 4 // 文书清单
case improveScheme = 5 // 提升方案
case modifyInfo = 6 // 修改信息
case improveTarget = 7 // 提升目标
case hkRequireList = 8 // 港府要求
}
class YHSchemeItem {
var type: YHSchemeItemType
init(type: YHSchemeItemType) {
self.type = type
}
}
class YHMyNewSchemeViewController: YHBaseViewController {
var orderId: Int = 0
var items: [[YHSchemeItem]] = []
var passArr: [YHComprehensiveEevaluationModel] = []
var unpassArr: [YHComprehensiveEevaluationModel] = []
var isPass: Bool = false
let viewModel = YHSchemeViewModel()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHComprehensiveEvaluationCell.self, forCellReuseIdentifier: YHComprehensiveEvaluationCell.cellReuseIdentifier)
tableView.register(YHHKRequiredItemListCell.self, forCellReuseIdentifier: YHHKRequiredItemListCell.cellReuseIdentifier)
tableView.register(YHIndustryLocationCell.self, forCellReuseIdentifier: YHIndustryLocationCell.cellReuseIdentifier)
tableView.register(YHMaterialListCell.self, forCellReuseIdentifier: YHMaterialListCell.cellReuseIdentifier)
tableView.register(YHDocumentListCell.self, forCellReuseIdentifier: YHDocumentListCell.cellReuseIdentifier)
tableView.register(YHImproveSchemeCell.self, forCellReuseIdentifier: YHImproveSchemeCell.cellReuseIdentifier)
tableView.register(YHImproveTargetCell.self, forCellReuseIdentifier: YHImproveTargetCell.cellReuseIdentifier)
tableView.register(YHModifySchemeInfoCell.self, forCellReuseIdentifier: YHModifySchemeInfoCell.cellReuseIdentifier)
tableView.bounces = false
tableView.tableFooterView = bottomLogoView
return tableView
}()
lazy var bgView: UIView = {
let view = UIView()
view.backgroundColor = .red
let bgImgView = UIImageView(image: UIImage(named: "my_scheme_head_img"))
view.addSubview(bgImgView)
let leftWheatearImgV = UIImageView(image: UIImage(named: "my_scheme_wheatear_left"))
view.addSubview(leftWheatearImgV)
let rightWheatearImgV = UIImageView(image: UIImage(named: "my_scheme_wheatear_right"))
view.addSubview(rightWheatearImgV)
view.addSubview(titleLabel)
view.addSubview(subTitleLabel)
bgImgView.snp.makeConstraints { make in
make.left.equalTo(-0)
make.right.equalTo(0)
make.top.equalToSuperview()
make.height.equalTo(416.0)
}
leftWheatearImgV.snp.makeConstraints { make in
make.left.equalTo(35)
make.top.equalTo(27)
make.width.equalTo(65)
make.height.equalTo(80)
}
rightWheatearImgV.snp.makeConstraints { make in
make.right.equalTo(-35)
make.top.equalTo(27)
make.width.equalTo(65)
make.height.equalTo(80)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(27)
make.height.equalTo(34)
make.centerX.equalToSuperview()
}
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(leftWheatearImgV.snp.left).offset(38)
make.right.equalTo(rightWheatearImgV.snp.right).offset(-38)
make.top.equalTo(titleLabel.snp.bottom).offset(8)
}
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 24)
label.textColor = .white
label.text = "尊敬的先生"
return label
}()
lazy var subTitleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .white
label.textAlignment = .center
label.text = "您好,根据您的信息,这是我们为您定制的申请方案,方案详情如下:"
return label
}()
lazy var bottomLogoView: UIView = {
let view = UIView(frame: CGRectMake(0, 0, KScreenWidth, 66+k_Height_safeAreaInsetsBottom()))
let leftImgV = UIImageView(image: UIImage(named: "my_scheme_logo_line_left"))
let rightImgV = UIImageView(image: UIImage(named: "my_scheme_logo_line_right"))
let logoImgV = UIImageView(image: UIImage(named: "my_scheme_logo"))
view.addSubview(leftImgV)
view.addSubview(rightImgV)
view.addSubview(logoImgV)
logoImgV.snp.makeConstraints { make in
make.width.equalTo(90)
make.height.equalTo(17)
make.top.equalTo(32)
make.bottom.equalTo(-16-k_Height_safeAreaInsetsBottom())
make.centerX.equalToSuperview()
}
leftImgV.snp.makeConstraints { make in
make.height.equalTo(2.75)
make.left.equalTo(11)
make.right.equalTo(logoImgV.snp.left).offset(-10)
make.bottom.equalTo(logoImgV.snp.bottom).offset(-3)
}
rightImgV.snp.makeConstraints { make in
make.height.equalTo(2.75)
make.right.equalTo(-11)
make.left.equalTo(logoImgV.snp.right).offset(10)
make.bottom.equalTo(logoImgV.snp.bottom).offset(-3)
}
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "我的方案"
gk_navTitleColor = .white
gk_navBarAlpha = 1
gk_navBackgroundImage = UIImage(named: "my_scheme_nav")
gk_backImage = UIImage(named: "back_icon_white")
view.backgroundColor = .init(hex: 0x090B26)
self.view.addSubview(bgView)
self.view.addSubview(tableView)
bgView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.height.equalTo(415)
}
tableView.snp.makeConstraints { make in
make.left.equalTo(8.5)
make.right.equalTo(-8.5)
make.bottom.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
}
tableView.reloadData()
requestData()
}
func requestData() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") as? Int {
orderId = orderID
}
viewModel.getMySchemeData(orderId: orderId) {
[weak self] success, error in
guard let self = self else { return }
titleLabel.text = "尊敬的\(viewModel.schemeModel.username)\(viewModel.schemeModel.sex)"
passArr = self.viewModel.schemeModel.comprehensive_evaluation.filter {
$0.is_pass == true
}
unpassArr = self.viewModel.schemeModel.comprehensive_evaluation.filter {
$0.is_pass == false
}
isPass = passArr.count >= 6
if isPass {
let item1 = YHSchemeItem(type: .evaluate)
let item2 = YHSchemeItem(type: .hkRequireList)
let item3 = YHSchemeItem(type: .industryLocation)
let item4 = YHSchemeItem(type: .materialList)
let item5 = YHSchemeItem(type: .documentList)
let item6 = YHSchemeItem(type: .improveScheme)
var arr1: [YHSchemeItem]
if passArr.count > 0 {
arr1 = [item1, item2, item3, item4, item5, item6]
} else {
arr1 = [item1, item3, item4, item5, item6]
}
items.append(arr1)
} else {
let item01 = YHSchemeItem(type: .evaluate)
let item02 = YHSchemeItem(type: .hkRequireList)
let item03 = YHSchemeItem(type: .modifyInfo)
var arr1: [YHSchemeItem] = []
if passArr.count > 0 {
arr1 = [item01, item02, item03]
} else {
arr1 = [item01, item03]
}
let item11 = YHSchemeItem(type: .improveTarget)
let arr2: [YHSchemeItem] = [item11]
items.append(contentsOf: [arr1, arr2])
}
self.tableView.reloadData()
}
}
func submitTargets() {
let targets: [String] = unpassArr.map {
return $0.standard_key
}
YHHUD.show(.progress(message: "提交中..."))
viewModel.postSelectImproveTargets(orderId: orderId, targets: targets) {
[weak self] success, error in
YHHUD.hide()
guard let self = self else { return }
if success {
let vc = YHImproveSchemeViewController()
vc.isPass = self.isPass
UIViewController.current?.navigationController?.pushViewController(vc)
return
}
YHHUD.flash(message: error?.errorMsg ?? "提交失败")
}
}
func modifyInfo() {
YHHUD.show(.progress(message: "修改中..."))
viewModel.modifyInfo(orderId: orderId) {
[weak self] success, error in
YHHUD.hide()
guard let self = self else { return }
if success {
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
YHHUD.flash(message: error?.errorMsg ?? "修改失败")
}
}
func getIndustryDetail(id: Int, industryOther: String) -> String {
let target = "\(id)"
if target == "15" {
return "其他(\(industryOther))"
}
for(_, item) in YHConstantArrayData.arrSkill.enumerated() {
if target == item["value"] {
return item["title"] ?? ""
}
}
return ""
}
}
extension YHMyNewSchemeViewController : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if 0 <= section, section < items.count {
let arr = items[section]
return arr.count
}
return 0
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if 0 <= indexPath.section, indexPath.section < items.count {
let arr = items[indexPath.section]
var targetCell: UITableViewCell? = nil
if 0 <= indexPath.row && indexPath.row < arr.count {
let item = arr[indexPath.row]
if item.type == .evaluate {
let cell = tableView.dequeueReusableCell(withIdentifier: YHComprehensiveEvaluationCell.cellReuseIdentifier, for: indexPath) as! YHComprehensiveEvaluationCell
cell.isPass = isPass
targetCell = cell
}
if item.type == .hkRequireList {
let cell = tableView.dequeueReusableCell(withIdentifier: YHHKRequiredItemListCell.cellReuseIdentifier, for: indexPath) as! YHHKRequiredItemListCell
cell.passArr = self.passArr
targetCell = cell
}
if item.type == .industryLocation {
let cell = tableView.dequeueReusableCell(withIdentifier: YHIndustryLocationCell.cellReuseIdentifier, for: indexPath) as! YHIndustryLocationCell
targetCell = cell
}
if item.type == .materialList {
let cell = tableView.dequeueReusableCell(withIdentifier: YHMaterialListCell.cellReuseIdentifier, for: indexPath) as! YHMaterialListCell
cell.rightBtnClick = {
[weak self] in
guard let self = self else { return }
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderID as? Int ?? 0
UIViewController.current?.navigationController?.pushViewController(vc)
} else {
YHHUD.flash(message: "订单号为空")
}
}
targetCell = cell
}
if item.type == .documentList {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDocumentListCell.cellReuseIdentifier, for: indexPath) as! YHDocumentListCell
cell.rightBtnClick = {
[weak self] in
guard let self = self else { return }
if !self.viewModel.schemeModel.supplement_skip_status {
YHHUD.flash(message: "您的文书正在制作中,请耐心等待")
return
}
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let vc = YHMyDocumentsListViewController()
vc.orderId = orderID as? Int ?? 0
UIViewController.current?.navigationController?.pushViewController(vc)
} else {
YHHUD.flash(message: "订单号为空")
}
}
targetCell = cell
}
if item.type == .improveScheme {
let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveSchemeCell.cellReuseIdentifier, for: indexPath) as! YHImproveSchemeCell
cell.rightBtnClick = {
[weak self] in
guard let self = self else { return }
if !self.viewModel.schemeModel.plan_skip_status {
YHHUD.flash(message: "您的提升方案正在制作中,请耐心等待")
return
}
let vc = YHImproveSchemeViewController()
vc.isPass = self.isPass
UIViewController.current?.navigationController?.pushViewController(vc)
}
targetCell = cell
}
if item.type == .modifyInfo {
let cell = tableView.dequeueReusableCell(withIdentifier: YHModifySchemeInfoCell.cellReuseIdentifier, for: indexPath) as! YHModifySchemeInfoCell
cell.modifyBlock = {
[weak self] in
guard let self = self else { return }
self.modifyInfo()
}
targetCell = cell
}
if item.type == .improveTarget {
let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveTargetCell.cellReuseIdentifier, for: indexPath) as! YHImproveTargetCell
cell.submitClick = {
[weak self] in
guard let self = self else { return }
self.submitTargets()
}
targetCell = cell
}
if let targetCell = targetCell {
return targetCell
}
}
}
let defaultCell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return defaultCell
}
func tableView(_ tableView: UITableView, willDisplay cell: UITableViewCell, forRowAt indexPath: IndexPath) {
if 0 <= indexPath.section, indexPath.section < items.count {
let arr = items[indexPath.section]
if 0 <= indexPath.row && indexPath.row < arr.count {
// 最后一个cell切底部圆角
self.createCorner(cell: cell, isLastCell: indexPath.row == arr.count-1)
}
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0.01
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 12.0
}
func createCorner(cell:UITableViewCell, isLastCell:Bool) {
if (isLastCell) {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue)
cell.createCorner(CGSizeMake(6.0, 6.0), corner)
} else {
cell.layer.mask = nil
}
}
}
extension YHMyNewSchemeViewController: UIScrollViewDelegate {
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let scrollY = scrollView.contentOffset.y
if scrollY >= 0.0 {
bgView.frame.origin.y = k_Height_NavigationtBarAndStatuBar-scrollY
} else {
bgView.frame.origin.y = k_Height_NavigationtBarAndStatuBar
}
}
}
//
// YHSchemeModel.swift
// galaxy
//
// Created by Dufet on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHSchemeModel: NSObject {
}
class YHComprehensiveEevaluationModel: SmartCodable {
var standard_name: String = ""
var standard_key: String = ""
var is_pass: Bool = false
var is_select: Bool = false
required init() {
}
}
class YHMySchemeDetailModel: SmartCodable {
var comprehensive_evaluation: [YHComprehensiveEevaluationModel] = []
var comprehensive_evaluation_selected: [String] = []
var industry_positioning: Int = 0
var plan_skip_status: Bool = false
var supplement_skip_status: Bool = false
var username: String = ""
var sex: String = ""
required init() {
}
}
class YHImproveDetailModel: SmartCodable {
var hk_require: String = ""
var improve_content: String = ""
var sort_num: Int = -1
var templates: [YHSchemeTemplatesModel] = []
required init() {
}
}
class YHSchemeTemplatesModel: SmartCodable {
var name: String = ""
var url: String = ""
required init() {
}
}
class YHImproveSchemeDetailModel: SmartCodable {
var improvePlanItem: [YHImproveDetailModel] = []
var username: String = ""
var sex: String = ""
required init() {
}
}
//
// YHComprehensiveEvaluationCell.swift
// galaxy
//
// Created by Dufet on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHComprehensiveEvaluationCell: UITableViewCell {
static let cellReuseIdentifier = "YHComprehensiveEvaluationCell"
var isPass: Bool = false {
didSet {
tipsLabel.attributed.text = isPass ? passText : unPassText
}
}
lazy var markImgV: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_mark"))
return v
}()
lazy var evaluationLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
label.text = "综合评估"
return label
}()
lazy var yellowContentView: UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0xCF9764, alpha: 0.12)
view.layer.cornerRadius = 4.0
view.clipsToBounds = true
return view
}()
lazy var tipsLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.attributed.text = unPassText
return label
}()
lazy var passText: ASAttributedString = {
let aa: ASAttributedString = .init("经初步评估,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("您符合【优秀人才入境计划-综合计分制】甄选条件", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.init(hex: 0xD48638)))
let cc: ASAttributedString = .init(",您在以下方面具备明显优势,为您感到开心!接下来辛苦您根据指引配合准备申请材料", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
return aa+bb+cc
}()
lazy var unPassText: ASAttributedString = {
let aa: ASAttributedString = .init("经初步评估,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("您目前已符合【优秀人才入境计划 - 综合计分制】的部分重要甄选条件", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.init(hex: 0xD48638)))
let cc: ASAttributedString = .init(",在如下方面具备优势,足以证明您的优秀之处!考虑到优才计划的的多维度要求,以及您目前已经具备的良好基础,如果您能进一步去孵化其他条件,后续的申请将会更具竞争力", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
return aa+bb+cc
}()
lazy var bgView: UIView = {
let view = UIView()
view.backgroundColor = .clear
return view
}()
lazy var whiteBottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.addSubview(bgView)
contentView.addSubview(whiteBottomView)
contentView.addSubview(markImgV)
contentView.addSubview(evaluationLabel)
contentView.addSubview(yellowContentView)
yellowContentView.addSubview(tipsLabel)
bgView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalToSuperview()
make.height.equalTo(416)
}
whiteBottomView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalTo(bgView.snp.bottom).offset(0)
make.bottom.equalToSuperview()
}
markImgV.snp.makeConstraints { make in
make.left.equalTo(24)
make.width.equalTo(4)
make.height.equalTo(16)
make.centerY.equalTo(evaluationLabel)
}
evaluationLabel.snp.makeConstraints { make in
make.top.equalTo(238)
make.height.equalTo(24)
make.left.equalTo(markImgV.snp.right).offset(8)
make.right.equalTo(-32)
}
yellowContentView.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(evaluationLabel.snp.bottom).offset(16)
make.bottom.equalTo(-24)
}
tipsLabel.snp.makeConstraints { make in
make.left.equalTo(12)
make.right.equalTo(-12)
make.top.equalTo(12)
make.bottom.equalTo(-12)
}
}
}
//
// YHDocumentListCell.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHDocumentListCell: UITableViewCell {
static let cellReuseIdentifier = "YHDocumentListCell"
var rightBtnClick:(()->())?
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.clipsToBounds = true
return view
}()
lazy var dotLine: YHDashLineView = {
let view = YHDashLineView(strokeColor: UIColor.init(hex: 0xF7F2ED).cgColor, lineWidth: 0.8, lineDashPattern: [3, 3])
return view
}()
lazy var markImgV: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_mark"))
return v
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
label.text = "文书清单"
return label
}()
lazy var tips1Label: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let aa: ASAttributedString = .init("您的文书清单,包括推荐信、赴港计划书。文书编写后会发送至APP【我的文书】,与您一起沟通定稿,预计", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("3周-4周", .font(UIFont.PFSC_M(ofSize: 14)),.foreground(UIColor.init(hex: 0xD48638)))
let cc: ASAttributedString = .init("左右完成,需要咱们共同配合完成噢", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
label.attributed.text = aa+bb+cc
return label
}()
lazy var rightBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 12)
button.backgroundColor = UIColor(hex: 0xd48638).withAlphaComponent(0.08)
button.contentHorizontalAlignment = .center
button.setTitle("文书写作", for: .normal)
button.setImage(UIImage(named: "scheme_button_icon"), for: .normal)
button.setTitleColor(UIColor(hex:0xd48638), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20)
button.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
return button
}()
@objc func didRightBtnClicked() {
rightBtnClick?()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(dotLine)
whiteContentView.addSubview(markImgV)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(tips1Label)
whiteContentView.addSubview(rightBtn)
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.bottom.equalToSuperview()
}
dotLine.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(0)
make.height.equalTo(1)
}
markImgV.snp.makeConstraints { make in
make.left.equalTo(24)
make.width.equalTo(4)
make.height.equalTo(16)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(26)
make.height.equalTo(24)
make.left.equalTo(markImgV.snp.right).offset(8)
make.right.equalTo(-24)
}
tips1Label.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(titleLabel.snp.bottom).offset(18)
make.bottom.equalTo(-26)
}
rightBtn.snp.makeConstraints { make in
make.width.equalTo(76)
make.height.equalTo(27)
make.right.equalTo(-24)
make.top.equalTo(titleLabel)
}
rightBtn.iconInRight(with: 2)
}
}
//
// YHHKRequiredItemListCell.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRequiredItemListCell: UITableViewCell {
static let cellReuseIdentifier = "YHHKRequiredItemListCell"
var passArr: [YHComprehensiveEevaluationModel] = [] {
didSet {
listView.removeSubviews()
listView.addSubview(topView)
topView.snp.remakeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(42)
}
var lastItemView: YHHKRequiredItemView? = nil
for (index, model) in passArr.enumerated() {
let itemView = YHHKRequiredItemView(frame: .zero)
itemView.text = model.standard_name
itemView.backgroundColor = index%2 == 0 ? .white : .init(hex: 0xFBF7F3)
listView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
if let lastItemView = lastItemView {
make.top.equalTo(lastItemView.snp.bottom)
} else {
make.top.equalTo(topView.snp.bottom)
}
if index == passArr.count-1 {
make.bottom.equalToSuperview()
}
}
lastItemView = itemView
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var topView: UIView = {
let view = UIView()
view.backgroundColor = .init(hex: 0xFBF7F3)
let requireLabel = UILabel()
requireLabel.text = "港府要求"
requireLabel.font = UIFont.PFSC_M(ofSize: 13)
requireLabel.textColor = UIColor.init(hex: 0xD48638)
view.addSubview(requireLabel)
let fitLabel = UILabel()
fitLabel.text = "是否符合"
fitLabel.font = UIFont.PFSC_M(ofSize: 13)
fitLabel.textColor = UIColor.init(hex: 0x6D788A)
view.addSubview(fitLabel)
let line = UIView()
line.backgroundColor = UIColor.init(hex: 0xF7F2ED)
view.addSubview(line)
requireLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(12)
}
fitLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(-12)
}
line.snp.makeConstraints { make in
make.right.equalTo(-72)
make.top.bottom.equalToSuperview()
make.width.equalTo(0.5)
}
return view
}()
lazy var whiteBgView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
lazy var listView: UIView = {
let view = UIView()
view.layer.cornerRadius = 4.0
view.layer.borderWidth = 0.5
view.layer.borderColor = UIColor.init(hex: 0xF7F2ED).cgColor
view.clipsToBounds = true
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
self.addSubview(whiteBgView)
self.addSubview(listView)
listView.addSubview(topView)
whiteBgView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.bottom.equalToSuperview()
}
listView.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalToSuperview()
make.bottom.equalTo(-26)
}
topView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(42)
}
}
}
//
// YHHKRequiredItemView.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHHKRequiredItemView: UIView {
var text: String = "" {
didSet {
titleLabel.text = text
}
}
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = .mainTextColor
return label
}()
lazy var requireView: UIView = {
let view = UIView()
let hookImgV = UIImageView(image: UIImage(named: "my_scheme_require_fit"))
view.addSubview(hookImgV)
hookImgV.snp.makeConstraints { make in
make.width.height.equalTo(14)
make.centerX.equalToSuperview()
make.centerY.equalToSuperview()
}
return view
}()
lazy var topSeparaterLine: UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0xF7F2ED)
return view
}()
lazy var verticalSeparaterLine: UIView = {
let view = UIView()
view.backgroundColor = UIColor.init(hex: 0xF7F2ED)
return view
}()
override init(frame: CGRect) {
super.init(frame: .zero)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
self.addSubview(titleLabel)
self.addSubview(requireView)
self.addSubview(topSeparaterLine)
self.addSubview(verticalSeparaterLine)
requireView.snp.makeConstraints { make in
make.width.equalTo(72)
make.right.top.bottom.equalToSuperview()
}
topSeparaterLine.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(0.5)
}
verticalSeparaterLine.snp.makeConstraints { make in
make.left.equalTo(requireView.snp.left)
make.top.bottom.equalToSuperview()
make.width.equalTo(0.5)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(12)
make.top.equalTo(12)
make.bottom.equalTo(-12)
make.right.equalTo(requireView.snp.left).offset(-12)
}
}
}
//
// YHIHKIdentityPlanCell.swift
// galaxy
//
// Created by Dufet on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHIHKIdentityPlanCell: UITableViewCell {
static let cellReuseIdentifier = "YHIHKIdentityPlanCell"
lazy var titleLabel: UILabel = {
let label = UILabel()
let aa: ASAttributedString = .init("了解更多", .font(UIFont.PFSC_B(ofSize: 18)),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("香港身份计划", .font(UIFont.PFSC_B(ofSize: 18)),.foreground(UIColor.brandMainColor))
label.attributed.text = aa+bb
return label
}()
lazy var subtitleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor(alpha: 0.5)
label.text = "助您香港身份申请无忧"
return label
}()
lazy var knowBtn: UIButton = {
let btn = UIButton(type: .custom)
btn.setTitle("立即了解", for: .normal)
btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = .brandMainColor
btn.titleLabel?.font = .PFSC_M(ofSize: 12)
return btn
}()
lazy var bgImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "my_shceme_plan_bg"))
view.clipsToBounds = true
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
contentView.backgroundColor = .clear
self.backgroundColor = .clear
selectionStyle = .none
contentView.addSubview(bgImgView)
bgImgView.snp.makeConstraints { make in
make.left.equalTo(17)
make.right.equalTo(-17)
make.top.equalToSuperview()
make.height.equalTo(bgImgView.snp.width).multipliedBy(93.0/(KScreenWidth-34.0))
make.bottom.equalTo(-33)
}
// titleLabel.snp.makeConstraints { make in
// make.left.equalTo(18)
// make.top.equalTo(22)
// make.height.equalTo(25)
// }
//
// subtitleLabel.snp.makeConstraints { make in
// make.left.equalTo(18)
// make.top.equalTo(titleLabel.snp.bottom).offset(4)
// make.height.equalTo(20)
// }
//
// knowBtn.snp.makeConstraints { make in
// make.right.equalTo(-24)
// make.centerY.equalToSuperview()
// make.width.equalTo(72)
// make.height.equalTo(32)
// }
}
}
//
// YHImproveHKView.swift
// galaxy
//
// Created by Dufet on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHImproveHKView: UIView {
var item = YHImproveDetailModel() {
didSet {
titleLabel.text = "港府要求:\(item.hk_require)"
tipsLabel.text = item.improve_content
numLabel.text = "\(item.sort_num)"
showTemplateBtn = item.templates.count > 0
}
}
var showTemplateBtn: Bool = true {
didSet {
templateBtn.isHidden = !showTemplateBtn
templateBtn.snp.updateConstraints { make in
make.height.equalTo(showTemplateBtn ? 20 : 0)
make.top.equalTo(tipsLabel.snp.bottom).offset(showTemplateBtn ? 12 : 0)
make.bottom.equalTo(showTemplateBtn ? -14 : 0)
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var grayView: UIView = {
let view = UIView()
view.layer.cornerRadius = 4.0
view.clipsToBounds = true
view.backgroundColor = .init(hex: 0xF8F9FB)
return view
}()
lazy var numImgView: UIImageView = {
let iconV = UIImageView(image: UIImage(named: "my_scheme_num_bg"))
iconV.addSubview(numLabel)
numLabel.snp.makeConstraints { make in
make.top.equalToSuperview()
make.centerX.equalToSuperview()
make.height.equalTo(20)
}
return iconV
}()
lazy var numLabel: UILabel = {
let label = UILabel()
label.text = "19"
label.font = UIFont(name: "DINAlternate-Bold", size: 14)
label.textColor = .white
return label
}()
lazy var markView: UIView = {
let view = UIView()
view.backgroundColor = .brandMainColor
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
lazy var improveTargetContentView: UIView = {
let view = UIView()
view.layer.cornerRadius = 2.0
view.clipsToBounds = true
view.backgroundColor = .white
return view
}()
lazy var iconImgView: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_improve_icon"))
return v
}()
lazy var subtitleLabel: UILabel = {
let label = UILabel()
label.text = "提升方向"
label.font = UIFont.PFSC_B(ofSize: 14)
label.textColor = .mainTextColor
return label
}()
lazy var tipsLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = .init(hex: 0x6D788A)
return label
}()
lazy var templateBtn: UIButton = {
let btn = UIButton(type: .custom)
btn.setTitle("材料示例", for: .normal)
btn.setTitleColor(.brandMainColor, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 14)
btn.setImage(UIImage(named: "blue_right_arrow"), for: .normal)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 10, left: 20, bottom: 20, right: 10)
btn.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
return btn
}()
override init(frame: CGRect) {
super.init(frame: .zero)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@objc func didRightBtnClicked() {
let view = YHImproveSchemeTemplateListView.listView()
view.items = item.templates
view.show()
}
func setupUI() {
self.addSubview(grayView)
self.addSubview(markView)
self.addSubview(titleLabel)
self.addSubview(numImgView)
self.addSubview(improveTargetContentView)
improveTargetContentView.addSubview(iconImgView)
improveTargetContentView.addSubview(subtitleLabel)
improveTargetContentView.addSubview(tipsLabel)
improveTargetContentView.addSubview(templateBtn)
grayView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
markView.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(titleLabel).offset(3)
make.width.equalTo(3)
make.height.equalTo(12)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(markView.snp.right).offset(9)
make.top.equalTo(16)
make.right.equalTo(numImgView.snp.left).offset(-5)
}
numImgView.snp.makeConstraints { make in
make.top.equalTo(0)
make.right.equalTo(-8)
make.width.equalTo(19)
make.height.equalTo(22)
}
improveTargetContentView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(16)
make.left.equalTo(8)
make.right.equalTo(-8)
make.bottom.equalTo(-8)
}
iconImgView.snp.makeConstraints { make in
make.width.height.equalTo(18)
make.left.top.equalTo(12)
}
subtitleLabel.snp.makeConstraints { make in
make.left.equalTo(iconImgView.snp.right).offset(6)
make.centerY.equalTo(iconImgView)
make.height.equalTo(20)
}
tipsLabel.snp.makeConstraints { make in
make.left.equalTo(12)
make.right.equalTo(-12)
make.top.equalTo(subtitleLabel.snp.bottom).offset(8)
}
templateBtn.snp.makeConstraints { make in
make.left.equalTo(12)
make.top.equalTo(tipsLabel.snp.bottom).offset(12)
make.width.equalTo(76)
make.height.equalTo(20)
make.bottom.equalTo(-14)
}
templateBtn.iconInRight(with: 0)
}
}
//
// YHImproveRequireItemView.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHImproveItem {
var title: String = ""
var isSelect: Bool = false
init(title: String, isSelect: Bool) {
self.title = title
self.isSelect = isSelect
}
}
class YHImproveRequireItemView: UIView {
var item: YHComprehensiveEevaluationModel = YHComprehensiveEevaluationModel() {
didSet {
let a: ASAttributedString = .init(string:"港府要求:" , .font(UIFont.PFSC_M(ofSize: 14)), .foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init(string: item.standard_name , .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
titleLabel.attributed.text = a + b
isSelect = item.is_select
}
}
var isSelect: Bool = false {
didSet {
self.backgroundColor = isSelect ? .init(hex: 0xFBF7F3) : .init(hex: 0xF8F9FB)
self.selectImgV.image = UIImage(named: isSelect ? "my_shceme_improve_select" : "my_shceme_improve_unselect")
self.layer.borderColor = isSelect ? UIColor.init(hex: 0xD48638).cgColor : nil
self.layer.borderWidth = isSelect ? 1.0: 0.0
}
}
lazy var selectImgV = {
let imgV = UIImageView(image: UIImage(named: "my_shceme_improve_unselect"))
return imgV
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = .mainTextColor
return label
}()
override init(frame: CGRect) {
super.init(frame: .zero)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
let tap = UITapGestureRecognizer(target: self, action: #selector(tap))
self.addGestureRecognizer(tap)
self.backgroundColor = .init(hex: 0xF8F9FB)
self.layer.cornerRadius = 4.0
self.clipsToBounds = true
self.addSubview(selectImgV)
self.addSubview(titleLabel)
selectImgV.snp.makeConstraints { make in
make.width.height.equalTo(14)
make.left.equalTo(12)
make.centerY.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(12)
make.bottom.equalTo(-12)
make.right.equalTo(-12)
make.left.equalTo(selectImgV.snp.right).offset(12)
}
}
@objc func tap() {
item.is_select = !item.is_select
isSelect = item.is_select
}
}
//
// YHImproveSchemeCell.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHImproveSchemeCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveSchemeCell"
var rightBtnClick:(()->())?
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.clipsToBounds = true
return view
}()
lazy var dotLine: YHDashLineView = {
let view = YHDashLineView(strokeColor: UIColor.init(hex: 0xF7F2ED).cgColor, lineWidth: 0.8, lineDashPattern: [3, 3])
return view
}()
lazy var markImgV: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_mark"))
return v
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
label.text = "提升方案"
return label
}()
lazy var tips1Label: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let aa: ASAttributedString = .init("已根据港府甄选条件,为您规划后续提升方案,您可根据实际情况进行提升~", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
label.attributed.text = aa
return label
}()
lazy var rightBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 12)
button.backgroundColor = UIColor(hex: 0xd48638).withAlphaComponent(0.08)
button.contentHorizontalAlignment = .center
button.setTitle("查看详情", for: .normal)
button.setImage(UIImage(named: "scheme_button_icon"), for: .normal)
button.setTitleColor(UIColor(hex:0xd48638), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20)
button.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
return button
}()
@objc func didRightBtnClicked() {
rightBtnClick?()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(dotLine)
whiteContentView.addSubview(markImgV)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(tips1Label)
whiteContentView.addSubview(rightBtn)
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.bottom.equalToSuperview()
}
dotLine.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(0)
make.height.equalTo(1)
}
markImgV.snp.makeConstraints { make in
make.left.equalTo(24)
make.width.equalTo(4)
make.height.equalTo(16)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(26)
make.height.equalTo(24)
make.left.equalTo(markImgV.snp.right).offset(8)
make.right.equalTo(-24)
}
tips1Label.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(titleLabel.snp.bottom).offset(18)
make.bottom.equalTo(-32)
}
rightBtn.snp.makeConstraints { make in
make.width.equalTo(76)
make.height.equalTo(27)
make.right.equalTo(-24)
make.top.equalTo(titleLabel)
}
rightBtn.iconInRight(with: 2)
}
}
//
// YHImproveSchemeTemplateListCell.swift
// galaxy
//
// Created by Dufet on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHImproveSchemeTemplateListCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveSchemeTemplateListCell"
var model = YHSchemeTemplatesModel() {
didSet {
titleLabel.text = model.name
}
}
lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: UIViewController.current)
return tool
}()
lazy var lineView:UIView = {
let view = UIView()
view.backgroundColor = .init(hex: 0xE9ECF0)
return view
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
label.numberOfLines = 0
return label
}()
lazy var rightBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .init(hex: 0xF5F6F8)
btn.setTitle("查看示例", for: .normal)
btn.setTitleColor(.mainTextColor, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 11)
btn.addTarget(self, action: #selector(didBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius2
return btn
}()
@objc func didBtnClicked() {
if !model.url.isEmpty {
self.previewFileTool.openXLSXRemoteFile(urlString:model.url, fileName:"预览")
}
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
contentView.addSubview(titleLabel)
contentView.addSubview(rightBtn)
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(0.5)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(0)
make.top.equalTo(16)
make.bottom.equalTo(-16)
make.right.equalTo(rightBtn.snp.left).offset(-40)
}
rightBtn.snp.makeConstraints { make in
make.width.equalTo(60)
make.height.equalTo(25)
make.right.equalTo(-20)
make.centerY.equalToSuperview()
}
}
}
//
// YHImproveSchemeTemplateListView.swift
// galaxy
//
// Created by Dufet on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHImproveSchemeTemplateListView: UIView {
static func listView() -> YHImproveSchemeTemplateListView {
let v = YHImproveSchemeTemplateListView(frame: UIScreen.main.bounds)
return v
}
var items: [YHSchemeTemplatesModel] = [] {
didSet {
tableView.reloadData()
}
}
lazy var blackMaskView: UIView = {
let view = UIView()
view.backgroundColor = .alertMaskColor
return view
}()
lazy var whiteView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 4.0
return view
}()
lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.showsVerticalScrollIndicator = false
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(UITableViewCell.self, forCellReuseIdentifier: "UITableViewCell")
tableView.register(YHImproveSchemeTemplateListCell.self, forCellReuseIdentifier: YHImproveSchemeTemplateListCell.cellReuseIdentifier)
tableView.bounces = false
return tableView
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.textAlignment = .center
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
label.text = "材料示例"
return label
}()
lazy var closeBtn: UIButton = {
let btn = UIButton()
btn.setImage(UIImage(named:"my_cer_sheet_close"), for: .normal)
btn.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
btn.YH_clickEdgeInsets = UIEdgeInsets(top: 20, left: 20, bottom: 20, right: 20)
return btn
}()
override init(frame: CGRect) {
super.init(frame: frame)
createUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@objc func show() {
UIApplication.shared.yhKeyWindow()?.addSubview(self)
}
@objc func dismiss() {
self.removeFromSuperview()
}
func createUI() {
self.addSubview(blackMaskView)
self.addSubview(whiteView)
whiteView.addSubview(titleLabel)
whiteView.addSubview(tableView)
whiteView.addSubview(closeBtn)
blackMaskView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
whiteView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(628)
}
titleLabel.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
make.height.equalTo(52)
}
closeBtn.snp.makeConstraints { make in
make.width.height.equalTo(24)
make.centerY.equalTo(titleLabel)
make.right.equalTo(-24)
}
tableView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.bottom.equalToSuperview()
make.top.equalTo(titleLabel.snp.bottom).offset(0)
}
}
}
extension YHImproveSchemeTemplateListView : UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return items.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if 0 <= indexPath.row && indexPath.row < items.count {
let item = items[indexPath.row]
let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveSchemeTemplateListCell.cellReuseIdentifier, for: indexPath) as! YHImproveSchemeTemplateListCell
return cell
}
let defaultCell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
return defaultCell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0.1
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView()
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.1
}
}
//
// YHImproveTargetCell.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHImproveTargetCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveTargetCell"
var submitClick:(()->())?
var unpassArr: [YHComprehensiveEevaluationModel] = [] {
didSet {
}
}
func updateRequireArrUI() {
listView.removeSubviews()
var lastView: YHImproveRequireItemView? = nil
for (index, item) in unpassArr.enumerated() {
let view = YHImproveRequireItemView(frame: .zero)
view.item = item
listView.addSubview(view)
view.snp.makeConstraints { make in
make.left.right.equalToSuperview()
if let lastView = lastView {
make.top.equalTo(lastView.snp.bottom).offset(16)
} else {
make.top.equalTo(0)
}
if index == unpassArr.count-1 {
make.bottom.equalTo(0)
}
}
lastView = view
}
}
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = 6
view.clipsToBounds = true
return view
}()
lazy var topBgView: UIImageView = {
let imgV = UIImageView(image: UIImage(named: "my_scheme_improve_bg"))
return imgV
}()
lazy var markImgV: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_mark"))
return v
}()
lazy var improveLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
label.text = "提升目标"
return label
}()
lazy var optionsLabel: UILabel = {
let optionsLabel = UILabel()
optionsLabel.text = "多选"
optionsLabel.textAlignment = .center
optionsLabel.font = .PFSC_M(ofSize: 11)
optionsLabel.textColor = .init(hex: 0x949494)
optionsLabel.layer.cornerRadius = 4.0
optionsLabel.clipsToBounds = true
optionsLabel.backgroundColor = .init(hex: 0x949494, alpha: 0.12)
optionsLabel.frame = CGRectMake(0, 0, 30, 16)
return optionsLabel
}()
private lazy var titleLabel : UITextView = {
let lable0 = UITextView()
lable0.isScrollEnabled = false
lable0.isEditable = false
lable0.isSelectable = false
lable0.backgroundColor = .clear
let title: ASAttributedString = .init(string:"请选择您的提升目标,我们将为您生成专属提升方案~" , .font(UIFont.PFSC_M(ofSize: 15)), .foreground(UIColor.mainTextColor))
var options: ASAttributedString = " \(.view(optionsLabel, .original(.center)))"
lable0.attributed.text = title + options
return lable0
}()
lazy var listView: UIView = {
let view = UIView()
return view
}()
lazy var bottomBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .init(hex: 0xD48638)
btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 16)
btn.layer.cornerRadius = 3
btn.setTitle("提交,获取详细方案", for: .normal)
btn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
return btn
}()
@objc func didBottomBtnClicked() {
submitClick?()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(topBgView)
whiteContentView.addSubview(markImgV)
whiteContentView.addSubview(improveLabel)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(listView)
whiteContentView.addSubview(bottomBtn)
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.bottom.equalToSuperview()
}
topBgView.snp.makeConstraints { make in
make.left.top.right.equalToSuperview()
make.height.equalTo(105)
}
markImgV.snp.makeConstraints { make in
make.left.equalTo(24)
make.width.equalTo(4)
make.height.equalTo(16)
make.centerY.equalTo(improveLabel)
}
improveLabel.snp.makeConstraints { make in
make.top.equalTo(24)
make.height.equalTo(24)
make.left.equalTo(markImgV.snp.right).offset(8)
make.right.equalTo(-24)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(improveLabel.snp.bottom).offset(16)
}
listView.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(titleLabel.snp.bottom).offset(16)
}
bottomBtn.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(listView.snp.bottom).offset(24)
make.bottom.equalTo(-24)
make.height.equalTo(46)
}
}
}
//
// YHImproveTargetListCell.swift
// galaxy
//
// Created by Dufet on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHImproveTargetListCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveTargetListCell"
var arr: [YHImproveDetailModel] = [] {
didSet {
listView.removeSubviews()
var lastView: YHImproveHKView? = nil
for (i, item) in arr.enumerated() {
let itemView = YHImproveHKView(frame: .zero)
itemView.item = item
listView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
if let lastView = lastView {
make.top.equalTo(lastView.snp.bottom).offset(16)
} else {
make.top.equalTo(0)
}
if i == arr.count-1 {
make.bottom.equalTo(0)
}
}
lastView = itemView
}
}
}
lazy var whiteContentView: UIView = {
let v = UIView()
v.backgroundColor = .white
v.layer.cornerRadius = 6.0
v.clipsToBounds = true
return v
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
label.text = "提升方案"
return label
}()
lazy var subtitleLabel: UILabel = {
let label = UILabel()
label.text = "接下来请您依据如下指引进行提升准备"
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = .init(hex: 0x8993A2)
return label
}()
lazy var lineView: UIView = {
let v = UIView()
v.backgroundColor = .init(hex: 0xE9ECF0)
return v
}()
lazy var listView: UIView = {
let v = UIView()
return v
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
contentView.backgroundColor = .clear
self.backgroundColor = .clear
selectionStyle = .none
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(subtitleLabel)
whiteContentView.addSubview(lineView)
whiteContentView.addSubview(listView)
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(0)
make.bottom.equalTo(-16)
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(16)
make.top.equalTo(16)
make.height.equalTo(24)
make.width.equalTo(69)
}
subtitleLabel.snp.makeConstraints { make in
make.bottom.equalTo(titleLabel)
make.left.equalTo(titleLabel.snp.right).offset(6)
make.right.equalTo(-16)
make.height.equalTo(20)
}
lineView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.equalTo(titleLabel.snp.bottom).offset(12)
make.height.equalTo(0.5)
}
listView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.bottom.equalTo(-16)
make.top.equalTo(lineView.snp.bottom).offset(20)
}
}
}
//
// YHIndustryLocationCell.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIndustryLocationCell: UITableViewCell {
static let cellReuseIdentifier = "YHIndustryLocationCell"
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.clipsToBounds = true
return view
}()
lazy var dotLine: YHDashLineView = {
let view = YHDashLineView(strokeColor: UIColor.init(hex: 0xF7F2ED).cgColor, lineWidth: 0.8, lineDashPattern: [3, 3])
return view
}()
lazy var markImgV: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_mark"))
return v
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
label.text = "行业定位"
return label
}()
lazy var tips1Label: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor
label.numberOfLines = 0
label.text = "根据您目前给来的材料,初步建议您申请的行业:"
return label
}()
lazy var tips2Label: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 16)
label.textColor = .init(hex: 0xD48638)
label.numberOfLines = 0
label.text = "其他(环境科学、HSE)"
return label
}()
lazy var tips3Label: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .init(hex: 0x8993A2)
label.numberOfLines = 0
label.text = "后续会根据您文书准备的补充情况来最终确定,如有修改会再告知您。"
return label
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(dotLine)
whiteContentView.addSubview(markImgV)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(tips1Label)
whiteContentView.addSubview(tips2Label)
whiteContentView.addSubview(tips3Label)
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.bottom.equalToSuperview()
}
dotLine.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(0)
make.height.equalTo(1)
}
markImgV.snp.makeConstraints { make in
make.left.equalTo(24)
make.width.equalTo(4)
make.height.equalTo(16)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(26)
make.height.equalTo(24)
make.left.equalTo(markImgV.snp.right).offset(8)
make.right.equalTo(-24)
}
tips1Label.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(titleLabel.snp.bottom).offset(16)
}
tips2Label.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(tips1Label.snp.bottom).offset(6)
}
tips3Label.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(tips2Label.snp.bottom).offset(6)
make.bottom.equalTo(-26)
}
}
}
//
// YHMaterialListCell.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHMaterialListCell: UITableViewCell {
static let cellReuseIdentifier = "YHMaterialListCell"
var rightBtnClick:(()->())?
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.clipsToBounds = true
return view
}()
lazy var dotLine: YHDashLineView = {
let view = YHDashLineView(strokeColor: UIColor.init(hex: 0xF7F2ED).cgColor, lineWidth: 0.8, lineDashPattern: [3, 3])
return view
}()
lazy var markImgV: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_mark"))
return v
}()
lazy var titleLabel: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 17)
label.textColor = .mainTextColor
label.text = "资料清单"
return label
}()
lazy var tips1Label: UILabel = {
let label = UILabel()
label.numberOfLines = 0
let aa: ASAttributedString = .init("这是您的资料清单,请您前往查看。请您在", .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("1-2周内", .font(UIFont.PFSC_M(ofSize: 14)),.foreground(UIColor.init(hex: 0xD48638)))
let cc: ASAttributedString = .init("上传基础类证件哦,需要重新办理的可以晚些提供。需要注意的点如下:", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
label.attributed.text = aa+bb+cc
return label
}()
lazy var tips2Label: UILabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .init(hex: 0x8993A2)
label.numberOfLines = 0
label.text = "(1)港澳通如未办理,请优先安排办理;\n(2)如为国内学校,需准备由教育部学信网出具的学位认证报告;\n(3)如为海外学校,需准备官方成绩单和第三方机构学位认证文件;\n(4)赴港同意书,在获批后1个月内,由您获批时在职公司盖章出具即可(目前不需要提供)。"
return label
}()
lazy var rightBtn: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 12)
button.backgroundColor = UIColor(hex: 0xd48638).withAlphaComponent(0.08)
button.contentHorizontalAlignment = .center
button.setTitle("资料清单", for: .normal)
button.setImage(UIImage(named: "scheme_button_icon"), for: .normal)
button.setTitleColor(UIColor(hex:0xd48638), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20)
button.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
return button
}()
@objc func didRightBtnClicked() {
rightBtnClick?()
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(dotLine)
whiteContentView.addSubview(markImgV)
whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(tips1Label)
whiteContentView.addSubview(tips2Label)
whiteContentView.addSubview(rightBtn)
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.bottom.equalToSuperview()
}
dotLine.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(0)
make.height.equalTo(1)
}
markImgV.snp.makeConstraints { make in
make.left.equalTo(24)
make.width.equalTo(4)
make.height.equalTo(16)
make.centerY.equalTo(titleLabel)
}
titleLabel.snp.makeConstraints { make in
make.top.equalTo(26)
make.height.equalTo(24)
make.left.equalTo(markImgV.snp.right).offset(8)
make.right.equalTo(-24)
}
tips1Label.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(titleLabel.snp.bottom).offset(18)
}
tips2Label.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(tips1Label.snp.bottom).offset(6)
make.bottom.equalTo(-26)
}
rightBtn.snp.makeConstraints { make in
make.width.equalTo(76)
make.height.equalTo(27)
make.right.equalTo(-24)
make.top.equalTo(titleLabel)
}
rightBtn.iconInRight(with: 2)
}
}
//
// YHModifySchemeInfoCell.swift
// galaxy
//
// Created by Dufet on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHModifySchemeInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHModifySchemeInfoCell"
var modifyBlock: (()->())?
lazy var bottomBtn: UIButton = {
let btn = UIButton()
btn.backgroundColor = .white
btn.setTitleColor(.init(hex: 0xD48638), for: .normal)
btn.layer.borderColor = UIColor.init(hex: 0xD48638).cgColor
btn.layer.borderWidth = 1.0
btn.titleLabel?.font = .PFSC_M(ofSize: 16)
btn.layer.cornerRadius = 3
btn.setTitle("修改信息", for: .normal)
btn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
return btn
}()
@objc func didBottomBtnClicked() {
modifyBlock?()
}
lazy var whiteContentView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.clipsToBounds = true
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
func setupUI() {
selectionStyle = .none
contentView.backgroundColor = .clear
backgroundColor = .clear
contentView.clipsToBounds = true
contentView.addSubview(whiteContentView)
whiteContentView.addSubview(bottomBtn)
whiteContentView.snp.makeConstraints { make in
make.left.equalTo(0)
make.right.equalTo(0)
make.top.bottom.equalToSuperview()
}
bottomBtn.snp.makeConstraints { make in
make.left.equalTo(24)
make.right.equalTo(-24)
make.top.equalTo(0)
make.bottom.equalTo(-24)
make.height.equalTo(46)
}
}
// override func layoutSubviews() {
// super.layoutSubviews()
// let path = UIBezierPath(roundedRect:whiteContentView.bounds,
// byRoundingCorners:UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue),
// cornerRadii: CGSizeMake(6, 6))
// let layer = CAShapeLayer()
// layer.frame = whiteContentView.bounds
// layer.path = path.cgPath
// self.whiteContentView.layer.mask = layer
// }
}
//
// YHSchemeViewModel.swift
// galaxy
//
// Created by Dufet on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSchemeViewModel {
var schemeModel = YHMySchemeDetailModel()
var improveDetailModel = YHImproveSchemeDetailModel()
//我的方案
func getMySchemeData(orderId: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Assessment.applyPlanNewApi
let params: [String : Any] = ["order_id" : orderId]
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let resultModel = YHMySchemeDetailModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false,err)
return
}
self.schemeModel = resultModel
callBackBlock(true,nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false,err)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
// 提交方案
func postSelectImproveTargets(orderId: Int, targets:[String], callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Assessment.submitTargetsApi
let params: [String : Any] = ["order_id" : orderId,
"standard_key" : targets]
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true,nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false, err)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func modifyInfo(orderId: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Assessment.modifyInfoApi
let params: [String : Any] = ["order_id" : orderId]
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true,nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false, err)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func getImproveDetail(orderId: Int, callBackBlock:@escaping (_ success: Bool,_ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Assessment.improveDetailApi
let params: [String : Any] = ["order_id" : orderId]
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
printLog("model 是 ==> \(json)")
if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let resultModel = YHImproveSchemeDetailModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callBackBlock(false,err)
return
}
self.improveDetailModel = resultModel
callBackBlock(true,nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false,err)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
}
......@@ -28,6 +28,15 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
basicInfoVC.child = child
}
}
var mainApplicantInfo: YHMyMainApplicantInfoModel? {
didSet {
if let mainApplicantInfo = mainApplicantInfo {
primaryInfoVC.mainApplicantInfo = mainApplicantInfo
}
}
}
var stepVCs:[YHFaimilyStepItem] = []
var _currentStep = 0
......
......@@ -11,6 +11,8 @@ import UIKit
class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
var child:YHFamilyMember?
var mainApplicantInfo: YHMyMainApplicantInfoModel?
weak var delegate:YHSpouseInfoVCProtocol?
var isNeedShowError = false
// 是否随行能编辑
......@@ -113,12 +115,23 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
// 港澳通信证
var isHiddenHK = true
if child.nationality.contains("中国") { // 中国国籍
if child.isLiveTother() { // 与主申请人同住
if let mainApplicantInfo = mainApplicantInfo {
let isLiveInChina = mainApplicantInfo.applicant_address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !mainApplicantInfo.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
} else { // 不与主申请人同住
let isLiveInChina = child.address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !child.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
}
if !isHiddenHK {
let title3 = YHFormTitleItem(type: .hkAndMacaoPassport)
......
......@@ -49,6 +49,15 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
}
}
}
var mainApplicantInfo: YHMyMainApplicantInfoModel? {
didSet {
if let mainApplicantInfo = mainApplicantInfo {
primaryInfoVC.mainApplicantInfo = mainApplicantInfo
}
}
}
var _currentStep = 0
var currentStep:Int {
......
......@@ -13,6 +13,8 @@ import SwifterSwift
class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
var spouse:YHFamilyMember?
var mainApplicantInfo: YHMyMainApplicantInfoModel?
weak var delegate:YHSpouseInfoVCProtocol?
// 是否显示未填写错误提示
var isNeedShowError = false
......@@ -117,12 +119,23 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
// 港澳通信证
var isHiddenHK = true
if spouse.nationality.contains("中国") { // 中国国籍
if spouse.isLiveTother() { // 与主申请人同住
if let mainApplicantInfo = mainApplicantInfo {
let isLiveInChina = mainApplicantInfo.applicant_address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !mainApplicantInfo.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
} else { // 不与主申请人同住
let isLiveInChina = spouse.address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !spouse.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
}
if !isHiddenHK {
let title3 = YHFormTitleItem(type: .hkAndMacaoPassport)
......
......@@ -594,6 +594,7 @@ extension YHFamilyMemberInfoListVC : UITableViewDelegate, UITableViewDataSource
if detailItem.relationType == .spouse {
let vc = YHSpouseInfoContainerVC()
vc.spouse = detailItem
vc.mainApplicantInfo = self.familyMemberInfo?.applicant
vc.orderId = orderId
self.navigationController?.pushViewController(vc)
return
......@@ -612,6 +613,7 @@ extension YHFamilyMemberInfoListVC : UITableViewDelegate, UITableViewDataSource
if detailItem.relationType == .child {
let vc = YHChildInfoContainerVC()
vc.child = detailItem
vc.mainApplicantInfo = self.familyMemberInfo?.applicant
vc.orderId = orderId
self.navigationController?.pushViewController(vc)
return
......
......@@ -539,6 +539,7 @@ class YHFormDetailItem : YHFormItemProtocol {
/* ***** ***** ***** ***** ***** ***** ***** ***** */
// MARK: - 家庭成员 YHData
class YHFamilyMemberGroupInfo: SmartCodable {
......@@ -547,6 +548,7 @@ class YHFamilyMemberGroupInfo: SmartCodable {
var spouse: YHFamilyMember?
var child: [YHFamilyMember]?
var brother: [YHFamilyMember]?
var applicant: YHMyMainApplicantInfoModel?
enum CodingKeys: String, CodingKey {
case father = "father"
......@@ -554,6 +556,7 @@ class YHFamilyMemberGroupInfo: SmartCodable {
case spouse = "spouse"
case brother = "brother"
case child = "child"
case applicant = "applicant"
}
func checkDefaultValue() -> Self {
......@@ -589,7 +592,23 @@ enum YHFamilyMemberType: Int {
case brother = 5
}
class YHMyMainApplicantInfoModel: SmartCodable {
var applicant_address: YHAddress = YHAddress()
var address_aboard: Int = 0
// 是否在海外居住满1年及以上 1:是 2:否
var is_live_oversea_year: Int = 2
// 是否在海外居住满1年及以上
func isOverSeasOver1Year() -> Bool {
return self.is_live_oversea_year == 1
}
required init() {
}
}
class YHFamilyMember: SmartCodable, YHFormItemProtocol {
......
//
// YHIncomeRecordAndWorkExperienceVC.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import IQKeyboardManagerSwift
import AttributedString
import UIKit
class YHIncomeRecordAndWorkExperienceVC: YHBaseViewController {
enum TableRow {
case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false)
case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String)
case incomeOccupyingItem(_ title: String, _ detail: String)
case addItem
case totalImcome(_ money: ASAttributedString)
case consentForHKTravel(_ isSelectSureBtn: Bool = true)
case currentCompany(_ company: String?)
case timeHeader
case timeStatement(_ placeholder: String, _ remark: String?, _ detail: ASAttributedString)
}
private lazy var datas: [[TableRow]] = []
private lazy var saveButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("保存", for: .normal)
button.setTitle("保存", for: .highlighted)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.mainTextColor, for: .highlighted)
button.addTarget(self, action: #selector(clickSaveButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .contentBkgColor
return button
}()
private lazy var submitButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("提交", for: .normal)
button.setTitle("提交", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.addTarget(self, action: #selector(clickSubmitButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.tableFooterView = UITableViewHeaderFooterView()
view.rowHeight = UITableView.automaticDimension
view.register(YHIncomeRecordSummaryCell.self, forCellReuseIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier)
view.register(YHIncomeRecordItemCell.self, forCellReuseIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier)
view.register(YHAddIncomeRecordCell.self, forCellReuseIdentifier: YHAddIncomeRecordCell.cellReuseIdentifier)
view.register(YHInfoConsentForHKTravelCell.self, forCellReuseIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier)
view.register(YHTotalIncomeCell.self, forCellReuseIdentifier: YHTotalIncomeCell.cellReuseIdentifier)
view.register(YHEmploymentVerificationAvailableCell.self, forCellReuseIdentifier: YHEmploymentVerificationAvailableCell.cellReuseIdentifier)
view.register(YHWorkingHoursStatementCell.self, forCellReuseIdentifier: YHWorkingHoursStatementCell.cellReuseIdentifier)
view.register(YHIncomeItemOccupyingCell.self, forCellReuseIdentifier: YHIncomeItemOccupyingCell.cellReuseIdentifier)
view.register(YHWorkingHourHeaderCell.self, forCellReuseIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier)
view.keyboardDismissMode = .onDrag
return view
}()
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setupData()
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.shared.enable = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
IQKeyboardManager.shared.enable = false
}
}
extension YHIncomeRecordAndWorkExperienceVC {
@objc private func clickSaveButton() {
//
}
@objc private func clickSubmitButton() {
//
}
private func setupUI() {
gk_navTitle = "收入记录/工作经验填写"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(saveButton)
bottomView.addSubview(submitButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-64)
}
saveButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
make.width.equalTo(86)
}
submitButton.snp.makeConstraints { make in
make.left.equalTo(saveButton.snp.right).offset(10)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 44))
}
private func setupData() {
let totalMoney: ASAttributedString = .init(string: "约", .font(.PFSC_R(ofSize: 14))) + .init(string: "1,351,517", .font(UIFont(name: "DINAlternate-Bold", size: 16) ?? UIFont.systemFont(ofSize: 16))) + .init(string: "港币", .font(.PFSC_R(ofSize: 14)))
let firstSection: [TableRow] = [.incomeSummary(false, false), .incomeItem(false, "华为有限公司", "约1,234,234港币", "2019.07-至今"), .incomeItem(false, "腾讯有限公司", "约1,234,234港币", "2015.07-2019.06"), .totalImcome(totalMoney), .addItem]
let secondSection: [TableRow] = [.timeHeader, .timeStatement("如:工作时间灵活,可自由安排", nil, getOverlappingTimeAttributedTips())]
let thirdSection: [TableRow] = [.consentForHKTravel(true), .currentCompany("华为科技有限公司")]
datas = [firstSection, secondSection, thirdSection]
tableView.reloadData()
}
private func getOverlappingTimeAttributedTips() -> ASAttributedString {
let starStr: ASAttributedString = .init(.image(UIImage(named: "gc_red_dot") ?? UIImage(), bounds: CGRect(x: 0, y: 0, width: 6, height: 6)))
let indentStr: ASAttributedString = .init(.image(UIImage(), bounds: CGRect(x: 0, y: 0, width: 5, height: 5)))
let firstStr: ASAttributedString = .init(string: "检测到您的", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let secondStr: ASAttributedString = .init(string: "工作时间有重叠", .font(UIFont.PFSC_B(ofSize: 13)), .foreground(UIColor.failColor))
let thirdStr: ASAttributedString = .init(string: "。请确认是否正确填报,若填报无误请在此处说明工作时间重叠的原因~", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let attributedText = (starStr + indentStr + firstStr + secondStr + thirdStr)
return attributedText
}
}
extension YHIncomeRecordAndWorkExperienceVC: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
let sectionArr = datas[section]
return sectionArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = sectionArr[indexPath.row]
switch tableRow {
case let .incomeSummary(isEditState, isEditEnable):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier) as? YHIncomeRecordSummaryCell {
cell.setupCellInfo(isEditState, isEditEnable)
return cell
}
case let .incomeItem(isEditState, company, money, timeStr):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell {
cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: false)
return cell
}
case .addItem:
if let cell = tableView.dequeueReusableCell(withIdentifier: YHAddIncomeRecordCell.cellReuseIdentifier) as? YHAddIncomeRecordCell {
cell.addButtonClickEvent = {
//
}
return cell
}
case let .totalImcome(money):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell {
cell.setupCellInfo(detail: money)
cell.didClickInfoButton = {
YHHUD.flash(message: "注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准")
}
return cell
}
case let .consentForHKTravel(isSelectSureBtn):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier) as? YHInfoConsentForHKTravelCell {
cell.textClicked = {
//
}
cell.didSelectSureButton = { _ in
//
}
cell.selectedSureButton = isSelectSureBtn
return cell
}
case let .currentCompany(company):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHEmploymentVerificationAvailableCell.cellReuseIdentifier) as? YHEmploymentVerificationAvailableCell {
cell.setupCellInfo(detail: company)
return cell
}
case let .timeStatement(placeholder, remark, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHWorkingHoursStatementCell.cellReuseIdentifier) as? YHWorkingHoursStatementCell {
cell.setupCellInfo(placeholder: placeholder, remark: remark, detail: detail, isShowBottomLine: false)
return cell
}
case let .incomeOccupyingItem(title, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeItemOccupyingCell.cellReuseIdentifier) as? YHIncomeItemOccupyingCell {
cell.setupCellInfo(title: title, rightText: detail)
return cell
}
case .timeHeader:
if let cell = tableView.dequeueReusableCell(withIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier) as? YHWorkingHourHeaderCell {
return cell
}
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
//
}
}
//
// YHIncomeRecordViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import IQKeyboardManagerSwift
import AttributedString
import UIKit
class YHIncomeRecordViewController: YHBaseViewController {
enum TableRow {
case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false)
case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String, _ incomeId: Int)
case totalIncome(_ money: ASAttributedString)
case consentForHKTravel(_ title: String, _ detail: ASAttributedString, _ question: String, _ isSelectSureBtn: Bool = true)
}
private lazy var datas: [[TableRow]] = []
private lazy var viewModel = YHIncomeRecordViewModel()
private var incomeModel = YHIncomeRecordCompleteModel()
private lazy var saveButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("保存", for: .normal)
button.setTitle("保存", for: .highlighted)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.mainTextColor, for: .highlighted)
button.addTarget(self, action: #selector(clickSaveButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .contentBkgColor
return button
}()
private lazy var submitButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("提交", for: .normal)
button.setTitle("提交", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.addTarget(self, action: #selector(clickSubmitButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.tableFooterView = UITableViewHeaderFooterView()
view.rowHeight = UITableView.automaticDimension
view.register(YHIncomeRecordSummaryCell.self, forCellReuseIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier)
view.register(YHIncomeRecordItemCell.self, forCellReuseIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier)
view.register(YHInfoConsentForHKTravelCell.self, forCellReuseIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier)
view.register(YHTotalIncomeCell.self, forCellReuseIdentifier: YHTotalIncomeCell.cellReuseIdentifier)
view.keyboardDismissMode = .onDrag
return view
}()
private let orderId: Int
init(orderId: Int) {
self.orderId = orderId
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
requestData(isNeedLoading: true)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.shared.enable = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
IQKeyboardManager.shared.enable = false
}
}
extension YHIncomeRecordViewController {
@objc private func clickSaveButton() {
updateIncome(.save)
}
@objc private func clickSubmitButton() {
updateIncome(.submit)
}
private func setupUI() {
gk_navTitle = "收入记录信息填写"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(saveButton)
bottomView.addSubview(submitButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-64)
}
saveButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
make.width.equalTo(86)
}
submitButton.snp.makeConstraints { make in
make.left.equalTo(saveButton.snp.right).offset(10)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 44))
}
private func setupData() {
let detail: ASAttributedString = .init(string: "备注:全年收入是指应课税(应纳所得税)的就业或业务收入,包括工资薪金、津贴、股票期权及从其拥有的公司所得的利润。由个人投资所产生的收入不会计算在内。", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let firstSection: [TableRow] = [.consentForHKTravel("收入情况", detail, "您在前一年,全年收入是否达港币100万元或以上", incomeModel.income_over_100 == YHIncomeOver100.true.rawValue)]
guard incomeModel.income_over_100 == YHIncomeOver100.true.rawValue else {
datas = [firstSection]
tableView.reloadData()
return
}
let hkdFormatter = currencyFormat("")
var money: Double = 0
var secondSection: [TableRow] = [.incomeSummary(false, false)]
incomeModel.list.forEach { companyModel in
money += companyModel.income_money
let moneyStr = "约" + (hkdFormatter.string(from: NSNumber(value: companyModel.income_money)) ?? "0") + "港币"
let timeStr: String = companyModel.fill_status ? "已填写" : "有\(companyModel.unfilled_count)项未填写"
let incomeItem: TableRow = .incomeItem(false, companyModel.company_name, moneyStr, timeStr, companyModel.income_id)
secondSection.append(incomeItem)
}
let totalNum = hkdFormatter.string(from: NSNumber(value: money)) ?? "0"
let totalMoney: ASAttributedString = .init(string: "约 ", .font(.PFSC_R(ofSize: 14))) + .init(string: totalNum, .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont.systemFont(ofSize: 20))) + .init(string: " 港币", .font(.PFSC_R(ofSize: 14)))
secondSection.append(.totalIncome(totalMoney))
datas = [firstSection, secondSection]
tableView.reloadData()
}
private func currencyFormat(_ currencySymbol: String) -> NumberFormatter {
let formatter = NumberFormatter()
formatter.numberStyle = .currency
formatter.currencySymbol = currencySymbol
formatter.maximumFractionDigits = 0
return formatter
}
}
extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
let sectionArr = datas[section]
return sectionArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = sectionArr[indexPath.row]
switch tableRow {
case let .incomeSummary(isEditState, isEditEnable):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordSummaryCell.cellReuseIdentifier) as? YHIncomeRecordSummaryCell {
cell.setupCellInfo(isEditState, isEditEnable, showRightButton: false)
return cell
}
case let .incomeItem(isEditState, company, money, timeStr, _):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell {
cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: false)
return cell
}
case let .totalIncome(money):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell {
cell.setupCellInfo(detail: money)
cell.didClickInfoButton = { [weak self] in
guard let self = self else {
return
}
let rate = self.incomeModel.rate > 0 ? self.incomeModel.rate : 0.92
YHHUD.flash(message: "注:按1港币≈\(rate)人民币计算,实际金额按递交时入境处给出的汇率为准")
}
return cell
}
case let .consentForHKTravel(title, detail, question, isSelectSureBtn):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier) as? YHInfoConsentForHKTravelCell {
cell.setupCellInfo(title: title, detail: detail, question: question)
cell.didSelectSureButton = { [weak self] selected in
guard let self = self else {
return
}
self.incomeModel.income_over_100 = selected ? YHIncomeOver100.true.rawValue : YHIncomeOver100.false.rawValue
self.setupData()
}
cell.selectedSureButton = isSelectSureBtn
return cell
}
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
guard datas.count > indexPath.section else {
return
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return
}
let tableRow = sectionArr[indexPath.row]
if case let .incomeItem(_, _, _, _, incomeId) = tableRow {
let ctl = YHIncomeRecordWorkExperienceViewController(incomeId: incomeId)
ctl.submitSuccess = { [weak self] in
self?.requestData(isNeedLoading: true)
}
navigationController?.pushViewController(ctl, animated: true)
}
}
}
extension YHIncomeRecordViewController {
private func requestData(isNeedLoading: Bool = false) {
if isNeedLoading {
YHHUD.show(.progress(message: "加载中..."))
}
viewModel.getIncomeList(orderId: orderId) { [weak self] incomeModel, error in
guard let self = self else {
return
}
if isNeedLoading {
YHHUD.hide()
}
guard let incomeModel = incomeModel else {
printLog("YHIncomeRecordViewController: 请求失败")
if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
YHHUD.flash(message: errorMsg)
}
self.datas = []
self.tableView.reloadData()
return
}
self.incomeModel = incomeModel
self.setupData()
}
}
private func updateIncome(_ type: YHIncomeRecordUpdateType) {
let incomeOver100: YHIncomeOver100 = YHIncomeOver100(rawValue: incomeModel.income_over_100) ?? .true
let msg = type == .save ? "保存中..." : "提交中..."
YHHUD.show(.progress(message: msg))
viewModel.incomeUpdate(orderId: orderId, incomeOver100: incomeOver100, type: type) { [weak self] success, error in
guard let self = self else {
return
}
YHHUD.hide()
if success {
let msg = type == .save ? "保存成功" : "提交成功"
YHHUD.flash(message: msg)
if type == .submit {
self.navigationController?.popViewController(animated: true)
}
} else if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
YHHUD.flash(message: errorMsg)
}
}
}
}
//
// YHIncomeRecordWorkExperienceViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import IQKeyboardManagerSwift
import UIKit
class YHIncomeRecordWorkExperienceViewController: YHBaseViewController {
enum TableRow {
case header(_ title: String)
case incomeFrom(_ title: String, _ detail: String)
case incomeTypeSelect(_ title: String, _ detail: String, _ isSelectedOne: Bool)
case incomeTypes(_ types: [YHIncomeType])
case inputMoney(_ title: String, _ detail: String?, _ inputStr: String?, _ showBottomLine: Bool, _ showStar: Bool, _ isIncomeMoney: Bool)
case inputRemark(_ detail: String)
case documentComfirm(_ title: String, _ question: String, _ isSelectedSure: Bool, _ docs: [String])
}
private lazy var datas: [[TableRow]] = []
private var selectedTypes: [YHIncomeType] = []
private let currencyRate = 0.92
private var isSaving = false
var submitSuccess: (() -> Void)?
private lazy var viewModel = YHIncomeRecordViewModel()
private var companyModel = YHIncomeCompanyDetailModel()
private lazy var submitButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
button.setTitle("提交", for: .normal)
button.setTitle("提交", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.addTarget(self, action: #selector(clickSubmitButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .grouped)
view.estimatedSectionHeaderHeight = 16.0
view.estimatedSectionFooterHeight = 0.01
view.sectionHeaderHeight = 16.0
view.sectionFooterHeight = 0.01
view.contentInsetAdjustmentBehavior = .never
view.showsVerticalScrollIndicator = false
view.separatorStyle = .none
view.delegate = self
view.dataSource = self
view.backgroundColor = .clear
view.tableFooterView = UITableViewHeaderFooterView()
view.rowHeight = UITableView.automaticDimension
view.register(YHWorkingHourHeaderCell.self, forCellReuseIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier)
view.register(YHIncomeRecordFromCell.self, forCellReuseIdentifier: YHIncomeRecordFromCell.cellReuseIdentifier)
view.register(YHIncomeTypeSelectCell.self, forCellReuseIdentifier: YHIncomeTypeSelectCell.cellReuseIdentifier)
view.register(YHIncomeTypesCell.self, forCellReuseIdentifier: YHIncomeTypesCell.cellReuseIdentifier)
view.register(YHIncomeInputMoneyCell.self, forCellReuseIdentifier: YHIncomeInputMoneyCell.cellReuseIdentifier)
view.register(YHIncomeRemarkCell.self, forCellReuseIdentifier: YHIncomeRemarkCell.cellReuseIdentifier)
view.register(YHIncomeDocumentationConfirmationCell.self, forCellReuseIdentifier: YHIncomeDocumentationConfirmationCell.cellReuseIdentifier)
view.keyboardDismissMode = .onDrag
return view
}()
private let incomeId: Int
init(incomeId: Int) {
self.incomeId = incomeId
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
requestData(isNeedLoading: true)
}
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
IQKeyboardManager.shared.enable = true
}
override func viewWillDisappear(_ animated: Bool) {
super.viewWillDisappear(animated)
IQKeyboardManager.shared.enable = false
}
override func backItemClick(_ sender: Any) {
guard !isSaving else {
return
}
isSaving = true
submitIncome(.save) { [weak self] _ in
self?.isSaving = false
}
}
/// 是否可以返回,包括点击返回和手势返回,默认YES
override func navigationShouldPop() -> Bool {
guard !isSaving else {
return false
}
isSaving = true
submitIncome(.save) { [weak self] _ in
self?.isSaving = false
}
return false
}
}
extension YHIncomeRecordWorkExperienceViewController {
@objc private func clickSubmitButton() {
submitIncome(.submit, complete: { _ in })
}
private func setupUI() {
gk_navTitle = "工作经验信息填写"
gk_navBarAlpha = 1.0
gk_navBackgroundColor = .white
view.backgroundColor = UIColor.contentBkgColor
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(submitButton)
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
make.top.equalTo(view.safeAreaLayoutGuide.snp.bottom).offset(-64)
}
submitButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(16)
make.right.equalToSuperview().offset(-16)
make.top.equalToSuperview().offset(10)
make.height.equalTo(44)
}
tableView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 44))
}
private func setupData() {
selectedTypes = companyModel.income_type.compactMap {
YHIncomeType(rawValue: $0)
}
var firstSection: [TableRow] = [.header("收入信息"), .incomeFrom("收入来源公司", companyModel.company_name), .incomeTypeSelect("收入类型(多选)", "请选择", selectedTypes.count > 0)]
if selectedTypes.count > 0 {
firstSection.append(.incomeTypes(selectedTypes))
}
let hkdFmt = currencyFormat("")
let rmbFmt = currencyFormat("¥")
let rate = companyModel.rate > 0 ? companyModel.rate : 0.92
if selectedTypes.contains(.incomeOfMainland) || selectedTypes.contains(.incomeOfHKCompanies) || selectedTypes.contains(.incomeOfMacauCompanies) || selectedTypes.contains(.incomeOfOtherOverseasCompanies) {
firstSection.append(.inputMoney("公司营业额(近一年)", "约\(hkdFmt.string(from: NSNumber(value: companyModel.corporate_turnover / rate)) ?? "0")港币", (rmbFmt.string(from: NSNumber(value: companyModel.corporate_turnover)) ?? "0"), true, false, false))
}
firstSection.append(.inputMoney("收入金额", "约\(hkdFmt.string(from: NSNumber(value: companyModel.income_money / rate)) ?? "0")港币", (rmbFmt.string(from: NSNumber(value: companyModel.income_money)) ?? "0"), false, true, true))
firstSection.append(.inputRemark("注:按1港币≈\(rate)人民币计算,实际金额按递交时入境处给出的汇率为准"))
let set = Set(selectedTypes.map { $0.docsArray() }.flatMap{ $0 })
var arr = Array(set)
if set.count == 0 {
arr = YHIncomeType.defaultDocs()
}
let secondSection: [TableRow] = [.documentComfirm("证件提供确认", "您是否可以提供以下所有证明文件", companyModel.has_all_file == YHIncomeRecordHasAllFile.true.rawValue, arr)]
datas = [firstSection, secondSection]
tableView.reloadData()
}
private func showSelectIncomeTypePopVC(selectedTypes: [YHIncomeType]) {
let ctl = YHIncomeTypeSelectViewController(selectedTypes: selectedTypes)
let bpc = YHBottomPresentationController(presentedViewController: ctl, presenting: self)
bpc.customRadius = 8.0
ctl.transitioningDelegate = bpc
ctl.sureButtonEvent = { [weak self] selectedTypes in
guard let self = self else {
return
}
self.selectedTypes = selectedTypes
self.updateSelectTypes()
}
present(ctl, animated: true, completion: nil)
}
private func updateSelectTypes() {
companyModel.income_type = selectedTypes.map { $0.rawValue }
var incomeTypesIndexPath: IndexPath?
var incomeTypeSelectIndexPath: IndexPath?
var docIndexPath: IndexPath?
datas = datas.enumerated().map { section, sectionArr in
sectionArr.enumerated().map { row, tableRow in
switch tableRow {
case .incomeTypes:
incomeTypesIndexPath = IndexPath(row: row, section: section)
return .incomeTypes(selectedTypes)
case let .incomeTypeSelect(title, detail, _):
incomeTypeSelectIndexPath = IndexPath(row: row, section: section)
return .incomeTypeSelect(title, detail, selectedTypes.count > 0)
case let .documentComfirm(title, question, isSelectSure, docs):
docIndexPath = IndexPath(row: row, section: section)
let set = Set(selectedTypes.map { $0.docsArray() }.flatMap{ $0 })
if set.count > 0 {
return .documentComfirm(title, question, isSelectSure, Array(set))
} else {
return .documentComfirm(title, question, isSelectSure, YHIncomeType.defaultDocs())
}
default:
return tableRow
}
}
}
guard let incomeTypeSelectIndexPath = incomeTypeSelectIndexPath else {
return
}
if selectedTypes.count > 0 {
if incomeTypesIndexPath == nil {
var sectionArr = datas[incomeTypeSelectIndexPath.section]
sectionArr.insert(.incomeTypes(selectedTypes), at: incomeTypeSelectIndexPath.row + 1)
datas[incomeTypeSelectIndexPath.section] = sectionArr
}
} else {
guard let incomeTypesIndexPath = incomeTypesIndexPath else {
return
}
var sectionArr = datas[incomeTypesIndexPath.section]
sectionArr.remove(at: incomeTypesIndexPath.row)
datas[incomeTypesIndexPath.section] = sectionArr
}
if let secondSection = docIndexPath?.section {
tableView.performBatchUpdates { [weak tableView] in
tableView?.reloadSections(IndexSet(arrayLiteral: incomeTypeSelectIndexPath.section, secondSection), with: .automatic)
}
} else {
tableView.performBatchUpdates { [weak tableView] in
tableView?.reloadSections(IndexSet(integer: incomeTypeSelectIndexPath.section), with: .automatic)
}
}
}
private func currencyFormat(_ currencySymbol: String) -> NumberFormatter {
let formatter = NumberFormatter()
formatter.numberStyle = .currency
formatter.currencySymbol = currencySymbol
formatter.maximumFractionDigits = 0
return formatter
}
}
extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
let sectionArr = datas[section]
return sectionArr.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return UITableViewCell()
}
let tableRow = sectionArr[indexPath.row]
switch tableRow {
case let .header(title):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHWorkingHourHeaderCell.cellReuseIdentifier) as? YHWorkingHourHeaderCell {
cell.setupCellInfo(title)
return cell
}
case let .incomeFrom(title, detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordFromCell.cellReuseIdentifier) as? YHIncomeRecordFromCell {
cell.setupCellInfo(title: title, detail: detail, showBottomLine: true)
return cell
}
case let .incomeTypeSelect(title, detail, isSelectedOne):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypeSelectCell.cellReuseIdentifier) as? YHIncomeTypeSelectCell {
cell.setupCellInfo(title: title, detail: detail, isSelectedOne: isSelectedOne, showBottomLine: !isSelectedOne)
return cell
}
case let .incomeTypes(types):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypesCell.cellReuseIdentifier) as? YHIncomeTypesCell {
cell.setupCellInfo(types: types.map { $0.nameString() })
cell.didClickTypeView = { [weak self] index in
guard let self = self else {
return
}
self.selectedTypes.remove(at: index)
self.updateSelectTypes()
}
return cell
}
case let .inputMoney(title, detail, inputStr, showBottomLine, showStar, isIncomeMoney):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeInputMoneyCell.cellReuseIdentifier) as? YHIncomeInputMoneyCell {
cell.setupCellInfo(title: title, detail: detail, inputValue: inputStr, showBottomLine: showBottomLine, showStarIcon: showStar)
cell.didBeginEditing = { textField in
var text = textField.text ?? ""
text = text.replacingOccurrences(of: "¥", with: "")
text = text.replacingOccurrences(of: ",", with: "")
textField.text = text
}
cell.didEndEditing = { [weak self] textField in
guard let self = self else {
return
}
guard let text = textField.text else {
return
}
// 转换为数字
let number = Double(text) ?? 0
// 格式化为带货币符号和千分位
let detail = number / self.currencyRate
if isIncomeMoney {
self.companyModel.income_money = number
} else {
self.companyModel.corporate_turnover = number
}
let rmbFormatter = self.currencyFormat("¥")
let hkdFormatter = self.currencyFormat("")
if let formattedString = rmbFormatter.string(from: NSNumber(value: number)) {
textField.text = formattedString
let detailStr = "约" + (hkdFormatter.string(from: NSNumber(value: detail)) ?? "") + "港币"
if self.datas.count > indexPath.section {
let sectionArr = self.datas[indexPath.section]
if sectionArr.count > indexPath.row {
let currentRow = sectionArr[indexPath.row]
if case let .inputMoney(title, _, _, showBottomLine, showStar, isIncomeMoney) = currentRow {
self.datas[indexPath.section][indexPath.row] = .inputMoney(title, detailStr, formattedString, showBottomLine, showStar, isIncomeMoney)
self.tableView.reloadRows(at: [indexPath], with: .automatic)
}
}
}
}
}
return cell
}
case let .inputRemark(detail):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRemarkCell.cellReuseIdentifier) as? YHIncomeRemarkCell {
cell.setupCellInfo(detail)
return cell
}
case let .documentComfirm(title, question, isSelectedSure, docs):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeDocumentationConfirmationCell.cellReuseIdentifier) as? YHIncomeDocumentationConfirmationCell {
cell.setupCellInfo(title: title, question: question, documents: docs)
cell.selectedSureButton = isSelectedSure
cell.didSelectSureButton = { [weak self] flag in
guard let self = self else {
return
}
if flag {
self.companyModel.has_all_file = YHIncomeRecordHasAllFile.true.rawValue
} else {
self.companyModel.has_all_file = YHIncomeRecordHasAllFile.false.rawValue
}
}
return cell
}
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: true)
guard datas.count > indexPath.section else {
return
}
let sectionArr = datas[indexPath.section]
guard sectionArr.count > indexPath.row else {
return
}
let tableRow = sectionArr[indexPath.row]
if case .incomeTypeSelect = tableRow {
showSelectIncomeTypePopVC(selectedTypes: selectedTypes)
}
}
}
extension YHIncomeRecordWorkExperienceViewController {
private func requestData(isNeedLoading: Bool = false) {
if isNeedLoading {
YHHUD.show(.progress(message: "加载中..."))
}
viewModel.getIncomeDetail(incomeId: incomeId) { [weak self] companyModel, error in
guard let self = self else {
return
}
if isNeedLoading {
YHHUD.hide()
}
guard let companyModel = companyModel else {
printLog("YHIncomeRecordWorkExperienceViewController: 请求失败")
if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
YHHUD.flash(message: errorMsg)
}
self.datas = []
self.tableView.reloadData()
return
}
self.companyModel = companyModel
self.setupData()
}
}
private func submitIncome(_ type: YHIncomeRecordUpdateType, complete: @escaping (Bool) -> Void) {
let msg = type == .save ? "保存中..." : "提交中..."
YHHUD.show(.progress(message: msg))
let hasFile: YHIncomeRecordHasAllFile = companyModel.has_all_file == YHIncomeRecordHasAllFile.true.rawValue ? .true : .false
viewModel.updateDetail(incomeId: incomeId, incomeMoney: companyModel.income_money, corporateTurnover: companyModel.corporate_turnover, incomeType: companyModel.income_type, hasAllFile: hasFile) { [weak self] success, error in
guard let self = self else {
complete(false)
return
}
YHHUD.hide()
complete(success)
if success {
let msg = type == .save ? "保存成功" : "提交成功"
YHHUD.flash(message: msg)
self.submitSuccess?()
self.navigationController?.popViewController(animated: true)
} else {
if let errorMsg = error?.errorMsg, errorMsg.count > 0 {
YHHUD.flash(message: errorMsg)
}
if type == .save {
self.navigationController?.popViewController(animated: true)
}
}
}
}
}
//
// YHIncomeTypeSelectViewController.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypeSelectViewController: YHBaseViewController {
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = .mainTextColor
label.text = "选择收入类型(多选)"
return label
}()
private lazy var closeButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "work_example_close"), for: .normal)
button.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside)
return button
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#F0F0F0")
return view
}()
private lazy var tableView: UITableView = {
let view = UITableView(frame: .zero, style: .plain)
view.backgroundColor = .clear
view.separatorStyle = .none
view.rowHeight = UITableView.automaticDimension
view.estimatedRowHeight = 52.0
view.dataSource = self
view.delegate = self
view.showsVerticalScrollIndicator = false
view.register(YHIncomeTypePopViewSelectCell.self, forCellReuseIdentifier: YHIncomeTypePopViewSelectCell.cellReuseIdentifier)
return view
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.setTitle("确认", for: .normal)
button.setTitle("确认", for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .normal)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .highlighted)
button.setTitleColor(UIColor(hex: 0xFFFFFF), for: .disabled)
button.addTarget(self, action: #selector(clickSureButton), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
button.backgroundColor = .brandMainColor
return button
}()
private lazy var bottomView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
private lazy var datas: [YHIncomeTypeSelectModel] = {
YHIncomeType.allCases.map {
YHIncomeTypeSelectModel(type: $0, isSelected: false)
}
}()
var sureButtonEvent: (([YHIncomeType]) -> Void)?
private var selectedTypes: [YHIncomeType] = []
init(selectedTypes: [YHIncomeType]) {
self.selectedTypes = selectedTypes
super.init(nibName: nil, bundle: nil)
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
override func viewDidLoad() {
super.viewDidLoad()
setupUI()
setupDatas()
}
@objc private func clickSureButton() {
sureButtonEvent?(selectedTypes.sorted(by: { $0.rawValue < $1.rawValue }))
dismiss(animated: true)
}
@objc private func closeButtonClicked() {
dismiss(animated: true)
}
private func setupUI() {
gk_navBarAlpha = 0
gk_navigationBar.isHidden = true
view.backgroundColor = UIColor.white
view.addSubview(infoTitleLabel)
view.addSubview(closeButton)
view.addSubview(topLineView)
view.addSubview(tableView)
view.addSubview(bottomView)
bottomView.addSubview(sureButton)
infoTitleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.centerX.equalToSuperview()
}
closeButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-21)
make.height.width.equalTo(24)
make.centerY.equalTo(infoTitleLabel)
}
topLineView.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-21)
make.left.equalToSuperview().offset(21)
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
}
bottomView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(view.safeAreaLayoutGuide.snp.bottom)
make.height.equalTo(64)
}
sureButton.snp.makeConstraints { make in
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.centerY.equalToSuperview()
make.height.equalTo(48)
}
tableView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.top.equalTo(topLineView.snp.bottom).offset(12)
make.bottom.equalTo(bottomView.snp.top)
}
tableView.tableFooterView = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 20))
preferredContentSize = CGSize(width: KScreenWidth, height: KScreenHeight - k_Height_NavigationtBarAndStatuBar - 44)
}
private func setupDatas() {
datas.forEach { [weak self] model in
guard let self = self else {
return
}
if self.selectedTypes.contains(model.type) {
model.isSelected = true
}
}
}
}
extension YHIncomeTypeSelectViewController: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return datas.count
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
guard datas.count > section else {
return 0
}
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
guard datas.count > indexPath.section else {
return UITableViewCell()
}
let model = datas[indexPath.section]
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypePopViewSelectCell.cellReuseIdentifier) as? YHIncomeTypePopViewSelectCell {
cell.setupCellInfo(title: model.type.nameString(), isSelected: model.isSelected)
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 0
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 12.0
}
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
tableView.deselectRow(at: indexPath, animated: false)
guard datas.count > indexPath.section else {
return
}
let model = datas[indexPath.section]
model.isSelected.toggle()
if model.isSelected {
if !selectedTypes.contains(model.type) {
selectedTypes.append(model.type)
}
} else {
if let index = selectedTypes.firstIndex(where: { type in
type == model.type
}) {
selectedTypes.remove(at: index)
}
}
tableView.reloadRows(at: [indexPath], with: .automatic)
}
}
//
// YHIncomeCompanyDetailModel.swift
// galaxy
//
// Created by alexzzw on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
import SmartCodable
class YHIncomeCompanyDetailModel: SmartCodable {
var company_name: String = ""
var income_money: Double = 0
var corporate_turnover: Double = 0
var income_type: [Int] = []
var template_id: [Int] = []
var has_all_file: Int = 0
var rate: Double = 0
required init() {
}
}
//
// YHIncomeRecordCompleteModel.swift
// galaxy
//
// Created by alexzzw on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
import SmartCodable
class YHIncomeRecordCompleteModel: SmartCodable {
var income_over_100: Int = -1
var rate: Double = 0
var list: [YHIncomeRecordListModel] = []
required init() {
}
}
class YHIncomeRecordListModel: SmartCodable {
var income_id: Int = 0
var company_name: String = ""
var income_money: Double = 0
var fill_status: Bool = false
var unfilled_count: Int = 0
required init() {
}
}
//
// YHIncomeRecordUtilType.swift
// galaxy
//
// Created by alexzzw on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
enum YHIncomeRecordHasAllFile: Int {
case unknown = 0
case `true` = 1
case `false` = 2
}
enum YHIncomeOver100: Int {
case `true` = 1
case `false` = 2
}
enum YHIncomeRecordUpdateType: Int {
case save = 1
case submit = 2
}
//
// YHIncomeType.swift
// galaxy
//
// Created by alexzzw on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import Foundation
enum YHIncomeType: Int, CaseIterable {
case incomeOfMainland = 1
case incomeOfHKCompanies = 2
case incomeOfMacauCompanies = 3
case stockOrEquityIncome = 4
case salaryIncomeAndBonus = 5
case dividendIncome = 6
case equityTransferIncome = 7
case businessIncome = 8
case incomeOfOtherOverseasCompanies = 9
static func defaultDocs() -> [String] {
return ["纳税记录",
"纳税清单",
"工作证明"]
}
func nameString() -> String {
switch self {
case .incomeOfMainland:
return "内地公司收入(持股50%及以上)"
case .incomeOfHKCompanies:
return "香港公司收入(持股50%及以上)"
case .incomeOfMacauCompanies:
return "澳门公司收入(持股50%及以上)"
case .stockOrEquityIncome:
return "上市公司股票期权或股权收入"
case .salaryIncomeAndBonus:
return "工资薪金所得及全年一次性奖金"
case .dividendIncome:
return "持股公司分红收入"
case .equityTransferIncome:
return "股权转让收入"
case .businessIncome:
return "个体工商户/合伙企业/独资企业经营所得收入"
case .incomeOfOtherOverseasCompanies:
return "其他境外公司收入(持股50%及以上"
}
}
func docsArray() -> [String] {
switch self {
case .incomeOfMainland:
return ["验资报告",
"审计报告",
"绝对实益拥有人声明书",
"企业所得税月(季)度预缴纳税申报表(A类)(前4个季度/前12个月)",
"企业所得税完税证明(表格式)",
"企业所得税年度纳税申报表(A类)(近一年度)"]
case .incomeOfHKCompanies:
return ["周年申报表",
"审计报告",
"利得税申请表",
"利得税缴纳通知书",
"缴税凭证",
"绝对实益拥有人声明书",
"工作签证",
"工作证明"]
case .incomeOfMacauCompanies:
return ["商业登记证明",
"审计报告",
"所得补充税B组──收益申报书(M1)",
"所得补充税—收益评定通知书(M5)",
"缴税凭证",
"绝对实益拥有人声明书",
"工作签证",
"工作证明"]
case .stockOrEquityIncome:
return ["纳税记录",
"纳税清单",
"股票或期权的发放证明(能看到个人的发放股数和每股价值)",
"工作证明"]
case .salaryIncomeAndBonus:
return ["纳税记录",
"纳税清单",
"工作证明"]
case .dividendIncome:
return ["纳税记录",
"纳税清单",
"持股证明",
"股东分红决议",
"分红入账记录(银行回单)",
"工作证明(持股公司开具)"]
case .equityTransferIncome:
return ["纳税记录",
"纳税清单",
"股权转让相关入账记录(银行回单)",
"股权转让协议",
"股权交割证明&股权变更登记表(显示公司股权占比更改)",
"完税证明(表格式)",
"工作证明"]
case .businessIncome:
return ["纳税记录",
"纳税清单",
"个人所得税经营所得纳税申报表(A表)(前4个季度/前12个月)",
"个人所得税经营所得纳税申报表(A表&B表)(最新年度)",
"个人所得税经营所得纳税申报表(C表)",
"工作证明"]
case .incomeOfOtherOverseasCompanies:
return ["财务报表",
"合法纳税及完税证明",
"公司所有权官方证明文件"]
}
}
}
//
// YHIncomeTypeSelectModel.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypeSelectModel: NSObject {
var isSelected: Bool = false
var type: YHIncomeType = .businessIncome
init(type: YHIncomeType, isSelected: Bool) {
self.type = type
self.isSelected = isSelected
}
}
//
// YHAddIncomeRecordCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHAddIncomeRecordCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHAddIncomeRecordCell"
var addButtonClickEvent: (() -> Void)?
private lazy var addItemView: YHWorkItemAddView = {
let view = YHWorkItemAddView()
view.addBtn.setTitle("新增收入信息".local, for: .normal)
view.addBtn.setImage(UIImage(named: "income_item_add"), for: .normal)
view.clickBlock = { [weak self] in
guard let self = self else { return }
self.addButtonClickEvent?()
}
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension YHAddIncomeRecordCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(addItemView)
addItemView.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(44)
}
}
}
//
// YHEmploymentVerificationAvailableCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHEmploymentVerificationAvailableCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHEmploymentVerificationAvailableCell"
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "可提供的在职公司"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "请选择"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(detail: String?) {
infoDetailLabel.text = detail
updateContentState((detail?.count ?? 0) > 0)
}
}
extension YHEmploymentVerificationAvailableCell {
private func updateContentState(_ isBlank: Bool) {
if isBlank {
infoDetailLabel.text = "请选择"
infoDetailLabel.font = .PFSC_R(ofSize: 14)
infoDetailLabel.textColor = UIColor(hexString: "#B9C1CC")
} else {
infoDetailLabel.font = .PFSC_M(ofSize: 14)
infoDetailLabel.textColor = UIColor.mainTextColor
}
}
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(rightArrowIcon)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.height.width.equalTo(6)
make.centerY.equalToSuperview()
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(dotIcon.snp.right).offset(2)
make.centerY.equalToSuperview()
}
rightArrowIcon.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
make.centerY.equalToSuperview()
}
infoDetailLabel.snp.makeConstraints { make in
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(20)
make.centerY.equalToSuperview()
make.right.equalTo(rightArrowIcon.snp.left)
make.top.greaterThanOrEqualToSuperview().offset(16)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
}
updateContentState(false)
}
}
//
// YHIncomeDocumentationConfirmationCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeDocumentationConfirmationCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeDocumentationConfirmationCell"
var didSelectSureButton: ((Bool) -> Void)?
private var documentationViews: [YHIncomeDocumentationView] = []
var selectedSureButton: Bool = true {
didSet {
updateButtonState(sureButton, selectedSureButton)
updateButtonState(cancelButton, !selectedSureButton)
}
}
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
return label
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoQuestionLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("是", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(sureButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16.0
button.clipsToBounds = true
return button
}()
private lazy var cancelButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("否", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(cancelButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16
button.clipsToBounds = true
return button
}()
private lazy var containerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 3, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, question: String, documents: [String]) {
infoTitleLabel.text = title
infoQuestionLabel.text = question
documentationViews.forEach {
$0.removeFromSuperview()
}
documentationViews.removeAll()
let count = documents.count
documents.enumerated().forEach { [weak self] index, title in
guard let self = self else {
return
}
let documentationView = YHIncomeDocumentationView()
documentationView.setupInfo(title)
self.documentationViews.append(documentationView)
self.containerView.addSubview(documentationView)
documentationView.snp.makeConstraints { make in
if index == 0 {
make.top.equalToSuperview().offset(16)
} else {
make.top.equalTo(self.documentationViews[index - 1].snp.bottom).offset(12)
}
make.left.equalToSuperview().offset(16)
make.right.lessThanOrEqualToSuperview().offset(-8)
if index == count - 1 {
make.bottom.equalToSuperview().offset(-16)
}
}
}
}
}
extension YHIncomeDocumentationConfirmationCell {
@objc private func cancelButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = false
didSelectSureButton?(false)
}
@objc private func sureButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = true
didSelectSureButton?(true)
}
private func setupUI() {
updateCellCorner(.single)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(topLineView)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoQuestionLabel)
subContainerView.addSubview(sureButton)
subContainerView.addSubview(cancelButton)
subContainerView.addSubview(containerView)
sureButton.setContentCompressionResistancePriority(.required, for: .horizontal)
cancelButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoQuestionLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
topLineView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
}
dotIcon.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.height.width.equalTo(6)
make.top.equalTo(infoQuestionLabel.snp.top).offset(7)
}
infoQuestionLabel.snp.makeConstraints { make in
make.left.equalTo(dotIcon.snp.right).offset(2)
make.top.equalTo(topLineView.snp.bottom).offset(16)
make.height.greaterThanOrEqualTo(40)
make.width.lessThanOrEqualTo(113)
}
cancelButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
}
sureButton.snp.makeConstraints { make in
make.right.equalTo(cancelButton.snp.left).offset(-8)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
make.left.greaterThanOrEqualTo(infoQuestionLabel.snp.right).offset(8)
}
containerView.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.right.equalToSuperview().offset(-18)
make.top.equalTo(infoQuestionLabel.snp.bottom).offset(16)
make.bottom.equalToSuperview().offset(-16)
}
selectedSureButton = true
}
private func updateButtonState(_ button: UIButton, _ isSelected: Bool) {
button.isSelected = isSelected
button.backgroundColor = isSelected ? UIColor(hexString: "#EBF0F9") : .contentBkgColor
button.layer.borderColor = isSelected ? UIColor.brandMainColor.cgColor : nil
button.layer.borderWidth = isSelected ? 1 : 0
}
}
private class YHIncomeDocumentationView: UIView {
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = .mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var dotView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#B3C8E9")
view.layer.cornerRadius = 1
view.clipsToBounds = true
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupInfo(_ detail: String) {
infoDetailLabel.text = detail
}
private func setupUI() {
addSubview(dotView)
addSubview(infoDetailLabel)
dotView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.height.width.equalTo(5)
make.top.equalTo(infoDetailLabel.snp.top).offset(6)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(dotView.snp.right).offset(8)
make.top.bottom.right.equalToSuperview()
}
}
}
//
// YHIncomeInputMoneyCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeInputMoneyCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeInputMoneyCell"
var didBeginEditing: ((UITextField) -> Void)?
var didEndEditing: ((UITextField) -> Void)?
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#6D788A")
return label
}()
private lazy var inputTextField: UITextField = {
let textField = UITextField(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 40))
textField.textColor = .mainTextColor
textField.font = .PFSC_M(ofSize: 14)
textField.placeholder = "请输入人民币金额"
textField.borderStyle = .none
textField.delegate = self
textField.keyboardType = .numberPad
return textField
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String?, inputValue: String?, showBottomLine: Bool = true, showStarIcon: Bool = false) {
infoTitleLabel.text = title
bottomLineView.isHidden = !showBottomLine
inputTextField.text = inputValue
dotIcon.isHidden = !showStarIcon
if showStarIcon {
infoTitleLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalTo(dotIcon.snp.right).offset(2)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.width.lessThanOrEqualTo(102)
}
} else {
infoTitleLabel.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(18)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.width.lessThanOrEqualTo(102)
}
}
updateDetailText(detail)
}
func updateDetailText(_ text: String?) {
infoDetailLabel.text = text
if let text = text, text.count > 0 {
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalTo(inputTextField.snp.bottom).offset(4)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
} else {
infoDetailLabel.snp.remakeConstraints { make in
make.top.equalTo(inputTextField.snp.bottom).offset(0)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
}
}
}
extension YHIncomeInputMoneyCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(inputTextField)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(bottomLineView)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
inputTextField.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.centerY.equalTo(infoTitleLabel)
make.left.equalToSuperview().offset(18)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalTo(dotIcon.snp.right).offset(2)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
make.width.lessThanOrEqualTo(102)
}
inputTextField.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalTo(inputTextField.snp.bottom).offset(4)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
}
extension YHIncomeInputMoneyCell: UITextFieldDelegate {
// MARK: - UITextFieldDelegate
func textFieldDidBeginEditing(_ textField: UITextField) {
if textField == inputTextField {
didBeginEditing?(textField)
}
}
func textFieldShouldReturn(_ textField: UITextField) -> Bool {
textField.endEditing(false)
return true
}
func textFieldDidEndEditing(_ textField: UITextField) {
if textField == inputTextField {
didEndEditing?(textField)
}
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if textField == inputTextField {
/// 输入删除
if string == "" {
return true
}
/// 禁止拷贝非数字
let number = CharacterSet(charactersIn: "0123456789")
if (string as NSString).rangeOfCharacter(from: number.inverted).location != NSNotFound {
return false
}
}
return true
}
}
//
// YHIncomeItemOccupyingCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/14.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeItemOccupyingCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeItemOccupyingCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入信息1"
return label
}()
private lazy var rightLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
label.text = "待填写"
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, rightText: String = "待填写", showBottomLine: Bool = false) {
infoTitleLabel.text = title
rightLabel.text = rightText
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeItemOccupyingCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(rightArrowIcon)
subContainerView.addSubview(rightLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
rightLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
}
rightArrowIcon.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
make.centerY.equalTo(infoTitleLabel)
}
rightLabel.snp.makeConstraints { make in
make.right.equalTo(rightArrowIcon.snp.left).offset(-2)
make.centerY.equalTo(infoTitleLabel)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(10)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(16)
}
}
}
//
// YHIncomeRecordFromCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordFromCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeRecordFromCell"
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入来源公司"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String, showBottomLine: Bool = true) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeRecordFromCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(bottomLineView)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(dotIcon.snp.right).offset(2)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
}
//
// YHIncomeRecordItemCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordItemCell: YHResignDocumentCell {
var deleteButtonClickEvent: (() -> Void)?
static let cellReuseIdentifier = "YHIncomeRecordItemCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入信息1"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
return label
}()
private lazy var rightLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
private lazy var deleteButton: UIButton = {
let button = UIButton(type: .custom)
button.setTitle("删除", for: .normal)
button.addTarget(self, action: #selector(deleteButtonDidClick(_:)), for: .touchUpInside)
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String, rightText: String, isEditing: Bool, showBottomLine: Bool) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
rightLabel.text = rightText
if isEditing {
rightLabel.isHidden = true
rightArrowIcon.isHidden = true
deleteButton.isHidden = true
bottomLineView.snp.remakeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
} else {
rightLabel.isHidden = false
rightArrowIcon.isHidden = false
deleteButton.isHidden = true
bottomLineView.snp.remakeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
}
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeRecordItemCell {
@objc private func deleteButtonDidClick(_ sender: UIButton) {
deleteButtonClickEvent?()
}
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(deleteButton)
subContainerView.addSubview(rightArrowIcon)
subContainerView.addSubview(rightLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
deleteButton.setContentCompressionResistancePriority(.required, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
rightLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
}
deleteButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.centerY.equalTo(infoTitleLabel)
make.width.equalTo(28)
make.height.equalTo(20)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(10)
}
rightArrowIcon.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
make.centerY.equalTo(infoTitleLabel)
}
rightLabel.snp.makeConstraints { make in
make.right.equalTo(rightArrowIcon.snp.left).offset(-2)
make.centerY.equalTo(infoTitleLabel)
make.left.greaterThanOrEqualTo(infoTitleLabel.snp.right).offset(10)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(2)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
}
}
//
// YHIncomeRecordSummaryCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordSummaryCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeRecordSummaryCell"
var rightButtonClickEvent: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "主申请人收入记录"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
label.text = "(仅申报近12个月应纳税收入总额))"
return label
}()
private lazy var rightButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "work_more"), for: .normal)
button.addTarget(self, action: #selector(rightButtonDidClick(_:)), for: .touchUpInside)
return button
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ isEditing: Bool, _ isEditEnable: Bool, showRightButton: Bool, showBottomLine: Bool = true) {
bottomLineView.isHidden = !showBottomLine
rightButton.isHidden = !showRightButton
rightButton.isEnabled = isEditEnable
updateRightButtonState(isEditing)
}
}
extension YHIncomeRecordSummaryCell {
@objc private func rightButtonDidClick(_ sender: UIButton) {
rightButtonClickEvent?()
}
private func updateRightButtonState(_ isEditing: Bool) {
if isEditing {
rightButton.setImage(nil, for: .normal)
rightButton.setTitle("取消操作", for: .normal)
rightButton.setTitleColor(.brandMainColor, for: .normal)
rightButton.titleLabel?.font = .PFSC_R(ofSize: 14)
} else {
rightButton.setImage(UIImage(named: "work_more"), for: .normal)
rightButton.setTitle(nil, for: .normal)
}
}
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(rightButton)
subContainerView.addSubview(bottomLineView)
rightButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.top.equalToSuperview().offset(16)
make.width.height.equalTo(24)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.right.lessThanOrEqualTo(rightButton.snp.left).offset(-10)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(2)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
}
}
}
//
// YHIncomeRemarkCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRemarkCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeRemarkCell"
private lazy var containerView: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 3, corner: .allCorners)
view.backgroundColor = UIColor(hexString: "#F5F6F8")
return view
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = UIColor(hexString: "#8993A2")
label.text = "注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准"
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ detail: String) {
infoDetailLabel.text = detail
}
}
extension YHIncomeRemarkCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(containerView)
containerView.addSubview(infoDetailLabel)
containerView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(8)
make.left.equalToSuperview().offset(10)
make.right.equalToSuperview().offset(-10)
make.bottom.equalToSuperview().offset(-8)
}
}
}
//
// YHIncomeTypePopViewSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypePopViewSelectCell: UITableViewCell {
static let cellReuseIdentifier = "YHIncomeTypePopViewSelectCell"
var isCurrentSelected: Bool = false {
didSet {
checkIcon.image = isCurrentSelected ? UIImage(named: "income_type_check_btn_1") : UIImage(named: "income_type_check_btn_0")
containerView.lineWidth = isCurrentSelected ? 1 : nil
containerView.lineColor = isCurrentSelected ? UIColor.brandMainColor.cgColor : nil
}
}
private lazy var checkIcon: UIImageView = { // income_type_check_btn_1
let imageView = UIImageView(image: UIImage(named: "income_type_check_btn_0"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#141414")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var containerView: YHBaseCornerRadiusBorderView = {
let view = YHBaseCornerRadiusBorderView.init(cornerRadius: 3, corner: .allCorners, lineWidth: nil, lineColor: nil)
view.backgroundColor = .contentBkgColor
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, isSelected: Bool) {
infoTitleLabel.text = title
isCurrentSelected = isSelected
}
private func setupUI() {
selectionStyle = .none
backgroundColor = .clear
contentView.addSubview(containerView)
containerView.addSubview(checkIcon)
containerView.addSubview(infoTitleLabel)
containerView.snp.makeConstraints { make in
make.top.bottom.equalToSuperview()
make.left.equalToSuperview().offset(21)
make.right.equalToSuperview().offset(-21)
}
checkIcon.snp.makeConstraints { make in
make.top.equalTo(infoTitleLabel.snp.top).offset(4)
make.left.equalToSuperview().offset(16)
make.width.height.equalTo(14)
}
infoTitleLabel.snp.makeConstraints { make in
make.left.equalTo(checkIcon.snp.right).offset(8)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.right.lessThanOrEqualToSuperview().offset(-16)
}
}
}
//
// YHIncomeTypeSelectCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHIncomeTypeSelectCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeTypeSelectCell"
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "收入类型(多选)"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#B9C1CC")
label.text = "请选择"
return label
}()
private lazy var rightArrowIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "form_right_arrow"))
return imageView
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: String = "请选择", isSelectedOne: Bool = false, showBottomLine: Bool = false) {
infoTitleLabel.text = title
infoDetailLabel.text = detail
infoDetailLabel.isHidden = isSelectedOne
bottomLineView.isHidden = !showBottomLine
}
}
extension YHIncomeTypeSelectCell {
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(rightArrowIcon)
subContainerView.addSubview(bottomLineView)
dotIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
infoTitleLabel.setContentCompressionResistancePriority(.defaultHigh, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
rightArrowIcon.setContentCompressionResistancePriority(.required, for: .horizontal)
dotIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.width.height.equalTo(6)
}
infoTitleLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalTo(dotIcon.snp.right).offset(2)
}
rightArrowIcon.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalToSuperview().offset(-18)
make.width.height.equalTo(20)
}
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
make.left.equalToSuperview().offset(147)
make.right.lessThanOrEqualTo(rightArrowIcon.snp.left).offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
}
//
// YHIncomeTypesCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeTypesCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHIncomeTypesCell"
var didClickTypeView: ((Int) -> Void)?
private var typeViews: [YHIncomeTypeView] = []
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private func setupUI() {
updateCellCorner(.mid)
subContainerView.addSubview(bottomLineView)
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
}
}
func setupCellInfo(types: [String]) {
typeViews.forEach {
$0.removeFromSuperview()
}
typeViews.removeAll()
let count = types.count
types.enumerated().forEach { [weak self] index, title in
guard let self = self else {
return
}
let typeView = YHIncomeTypeView()
typeView.clipsToBounds = true
typeView.layer.cornerRadius = 3
typeView.setupInfo(title)
typeView.closeButtonEvent = { [weak self] in
guard let self = self else {
return
}
self.didClickTypeView?(index)
}
self.typeViews.append(typeView)
self.subContainerView.addSubview(typeView)
typeView.snp.makeConstraints { make in
if index == 0 {
make.top.equalToSuperview()
} else {
make.top.equalTo(self.typeViews[index - 1].snp.bottom).offset(8)
}
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
if index == count - 1 {
make.bottom.equalToSuperview().offset(-16)
}
}
}
}
}
private class YHIncomeTypeView: UIView {
var closeButtonEvent: (() -> Void)?
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 12)
label.textColor = .mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var closeButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "income_type_close"), for: .normal)
button.addTarget(self, action: #selector(closeButtonClicked), for: .touchUpInside)
return button
}()
private lazy var lineView: UIView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
@MainActor required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
@objc private func closeButtonClicked() {
closeButtonEvent?()
}
func setupInfo(_ detail: String) {
infoDetailLabel.text = detail
}
private func setupUI() {
backgroundColor = UIColor(hexString: "#F5F6F8")
addSubview(infoDetailLabel)
addSubview(lineView)
addSubview(closeButton)
infoDetailLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(10)
make.top.equalToSuperview().offset(8)
make.bottom.equalToSuperview().offset(-8)
}
lineView.snp.makeConstraints { make in
make.left.equalTo(infoDetailLabel.snp.right).offset(8)
make.height.equalTo(20)
make.width.equalTo(1)
make.centerY.equalToSuperview()
}
closeButton.snp.makeConstraints { make in
make.right.equalToSuperview()
make.left.equalTo(lineView.snp.right)
make.width.height.equalTo(26)
make.centerY.equalToSuperview()
}
}
}
//
// YHInfoConsentForHKTravelCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHInfoConsentForHKTravelCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHInfoConsentForHKTravelCell"
var didSelectSureButton: ((Bool) -> Void)?
var selectedSureButton: Bool = true {
didSet {
updateButtonState(sureButton, selectedSureButton)
updateButtonState(cancelButton, !selectedSureButton)
}
}
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
return label
}()
private lazy var topLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = UIColor(hexString: "#8993A2")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var dotIcon: UIImageView = {
let imageView = UIImageView(image: UIImage(named: "red_dot_6"))
return imageView
}()
private lazy var infoQuestionLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.numberOfLines = 0
label.lineBreakMode = .byWordWrapping
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
private lazy var sureButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("是", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(sureButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16.0
button.clipsToBounds = true
return button
}()
private lazy var cancelButton: UIButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = .PFSC_M(ofSize: 13)
button.setTitle("否", for: .normal)
button.setTitleColor(.mainTextColor, for: .normal)
button.setTitleColor(.brandMainColor, for: .selected)
button.addTarget(self, action: #selector(cancelButtonDidClick(_:)), for: .touchUpInside)
button.layer.cornerRadius = 16
button.clipsToBounds = true
return button
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(title: String, detail: ASAttributedString, question: String, showBottomLine: Bool = false) {
bottomLineView.isHidden = !showBottomLine
infoTitleLabel.text = title
infoDetailLabel.attributed.text = detail
infoQuestionLabel.text = question
}
}
extension YHInfoConsentForHKTravelCell {
@objc private func cancelButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = false
didSelectSureButton?(false)
}
@objc private func sureButtonDidClick(_ sender: UIButton) {
guard !sender.isSelected else {
return
}
selectedSureButton = true
didSelectSureButton?(true)
}
private func setupUI() {
updateCellCorner(.single)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(topLineView)
subContainerView.addSubview(bottomLineView)
subContainerView.addSubview(dotIcon)
subContainerView.addSubview(infoQuestionLabel)
subContainerView.addSubview(sureButton)
subContainerView.addSubview(cancelButton)
sureButton.setContentCompressionResistancePriority(.required, for: .horizontal)
cancelButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoQuestionLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
topLineView.snp.makeConstraints { make in
make.left.equalToSuperview()
make.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
}
infoDetailLabel.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.top.equalTo(topLineView.snp.bottom).offset(16)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
dotIcon.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.left)
make.height.width.equalTo(6)
make.top.equalTo(infoQuestionLabel.snp.top).offset(7)
}
infoQuestionLabel.snp.makeConstraints { make in
make.left.equalTo(dotIcon.snp.right).offset(2)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
make.height.greaterThanOrEqualTo(40)
make.width.lessThanOrEqualTo(113)
}
cancelButton.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
}
sureButton.snp.makeConstraints { make in
make.right.equalTo(cancelButton.snp.left).offset(-8)
make.height.equalTo(32)
make.width.equalTo(69)
make.centerY.equalTo(infoQuestionLabel)
make.left.greaterThanOrEqualTo(infoQuestionLabel.snp.right).offset(8)
}
bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
make.top.equalTo(infoQuestionLabel.snp.bottom).offset(22)
}
selectedSureButton = true
}
private func updateButtonState(_ button: UIButton, _ isSelected: Bool) {
button.isSelected = isSelected
button.backgroundColor = isSelected ? UIColor(hexString: "#EBF0F9") : .contentBkgColor
button.layer.borderColor = isSelected ? UIColor.brandMainColor.cgColor : nil
button.layer.borderWidth = isSelected ? 1 : 0
}
}
//
// YHTotalIncomeCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHTotalIncomeCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHTotalIncomeCell"
var didClickInfoButton: (() -> Void)?
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_B(ofSize: 14)
label.textColor = UIColor.mainTextColor
label.text = "总收入"
return label
}()
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 20)
label.textColor = .brandMainColor
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var infoButton: UIButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "other_info_warning"), for: .normal)
button.addTarget(self, action: #selector(infoButtonDidClick(_:)), for: .touchUpInside)
return button
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(detail: ASAttributedString) {
infoDetailLabel.attributed.text = detail
}
}
extension YHTotalIncomeCell {
@objc private func infoButtonDidClick(_ sender: UIButton) {
didClickInfoButton?()
}
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(infoButton)
infoTitleLabel.setContentCompressionResistancePriority(.required, for: .horizontal)
infoButton.setContentCompressionResistancePriority(.required, for: .horizontal)
infoDetailLabel.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
infoTitleLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.top.equalToSuperview().offset(16)
make.bottom.equalToSuperview().offset(-16)
}
infoButton.snp.makeConstraints { make in
make.left.equalTo(infoTitleLabel.snp.right).offset(4)
make.centerY.equalTo(infoTitleLabel)
make.width.height.equalTo(16)
}
infoDetailLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-18)
make.centerY.equalTo(infoTitleLabel)
make.left.greaterThanOrEqualTo(infoButton.snp.right).offset(10)
}
}
}
//
// YHWorkingHourHeaderCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/14.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkingHourHeaderCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHWorkingHourHeaderCell"
private lazy var infoTitleLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "工作时间说明"
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(_ title: String) {
infoTitleLabel.text = title
}
}
extension YHWorkingHourHeaderCell {
private func setupUI() {
updateCellCorner(.top)
subContainerView.addSubview(infoTitleLabel)
subContainerView.addSubview(bottomLineView)
infoTitleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
bottomLineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(0.5)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(12)
make.bottom.equalToSuperview()
}
}
}
//
// YHWorkingHoursStatementCell.swift
// galaxy
//
// Created by alexzzw on 2024/11/13.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import AttributedString
import UIKit
class YHWorkingHoursStatementCell: YHResignDocumentCell {
static let cellReuseIdentifier = "YHWorkingHoursStatementCell"
private let maxCount = 200
var textViewDidChanged: ((UITextView) -> Void)?
var textDidExceedsMaxLimit: ((Int) -> Void)?
private lazy var infoDetailLabel: UILabel = {
let label = UILabel()
label.font = .PFSC_R(ofSize: 13)
label.textColor = UIColor(hexString: "#8993A2")
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var remarkTextViewContainer: YHBaseDynamicCornerRadiusView = {
let view = YHBaseDynamicCornerRadiusView(cornerRadius: 1, corner: .allCorners)
view.backgroundColor = .contentBkgColor
return view
}()
private lazy var remarkTextView: UITextView = {
let view = UITextView()
view.backgroundColor = .clear
view.font = .PFSC_R(ofSize: 14)
view.textColor = .mainTextColor
view.tintColor = .mainTextColor
view.returnKeyType = .default
view.enablesReturnKeyAutomatically = true
view.delegate = self
view.textContainerInset = .zero
view.textContainer.lineFragmentPadding = 0
return view
}()
private lazy var editTipsLabel: UILabel = {
let label = UILabel()
label.isHidden = true
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor.init(hexString: "#B9C1CC")
return label
}()
private lazy var countLabel: UILabel = {
let label = UILabel()
label.text = "0/\(maxCount)"
label.font = .PFSC_R(ofSize: 14)
label.textColor = UIColor(hexString: "#D5DAE1")
return label
}()
private lazy var bottomLineView: UIView = {
let view = UIView()
view.backgroundColor = UIColor(hexString: "#E9ECF0")
return view
}()
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupCellInfo(placeholder: String, remark: String?, detail: ASAttributedString, isShowBottomLine: Bool) {
editTipsLabel.text = placeholder
remarkTextView.text = remark
infoDetailLabel.attributed.text = detail
bottomLineView.isHidden = !isShowBottomLine
}
}
extension YHWorkingHoursStatementCell {
private func setupUI() {
updateCellCorner(.bottom)
subContainerView.addSubview(infoDetailLabel)
subContainerView.addSubview(remarkTextViewContainer)
subContainerView.addSubview(bottomLineView)
remarkTextViewContainer.addSubview(editTipsLabel)
remarkTextViewContainer.addSubview(remarkTextView)
remarkTextViewContainer.addSubview(countLabel)
infoDetailLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(16)
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
}
remarkTextViewContainer.snp.makeConstraints { make in
make.top.equalTo(infoDetailLabel.snp.bottom).offset(8)
make.left.equalTo(infoDetailLabel.snp.left)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(160)
make.bottom.equalToSuperview().offset(-16)
}
editTipsLabel.snp.makeConstraints { make in
make.left.equalToSuperview().offset(12)
make.top.equalToSuperview().offset(12)
make.right.lessThanOrEqualToSuperview().offset(-12)
}
countLabel.snp.makeConstraints { make in
make.right.equalToSuperview().offset(-12)
make.bottom.equalToSuperview().offset(-12)
make.left.greaterThanOrEqualToSuperview().offset(12)
}
remarkTextView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(12)
make.top.equalToSuperview().offset(12)
make.right.equalToSuperview().offset(-12)
make.bottom.equalTo(countLabel.snp.top)
}
bottomLineView.snp.makeConstraints { make in
make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18)
make.height.equalTo(0.5)
make.bottom.equalToSuperview()
}
}
}
extension YHWorkingHoursStatementCell: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
editTipsLabel.isHidden = textView.text.count > 0
let textCount = textView.text?.utf16.count ?? 0
countLabel.text = "\(textCount)/\(maxCount)"
textViewDidChanged?(textView)
}
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
if textView == remarkTextView {
/// 正在输入拼音
if let textRange = textView.markedTextRange, range.length == 0 {
/// 刚输入拼音的时候总字数
let start = textView.offset(from: textView.beginningOfDocument, to: textRange.start)
return start <= maxCount
}
let count = (textView.text?.utf16.count ?? 0) - range.length + text.utf16.count
if count > maxCount && text == "" {
return true
}
guard count > maxCount else {
return true
}
textDidExceedsMaxLimit?(maxCount)
return false
}
return true
}
}
//
// YHIncomeRecordViewModel.swift
// galaxy
//
// Created by alexzzw on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHIncomeRecordViewModel: YHBaseViewModel {
func getIncomeList(orderId: Int, callback: @escaping (_ incomeModel: YHIncomeRecordCompleteModel?, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.IncomeRecord.incomeList
_ = YHNetRequest.getRequest(url: strUrl, params: ["order_id": orderId]) { json, _ in
// 1. json字符串 转 对象
printLog("model 是 ==> \(json)")
if json.code == 200 {
guard let dic = json.data?.peel as? [String: Any], let resultModel = YHIncomeRecordCompleteModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callback(nil, err)
return
}
callback(resultModel, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callback(nil, err)
}
} failBlock: { err in
callback(nil, err)
}
}
func getIncomeDetail(incomeId: Int, callback: @escaping (_ companyDetail: YHIncomeCompanyDetailModel?, _ error: YHErrorModel?) -> Void) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.IncomeRecord.incomeDetail
_ = YHNetRequest.getRequest(url: strUrl, params: ["income_id": incomeId]) { json, _ in
// 1. json字符串 转 对象
printLog("model 是 ==> \(json)")
if json.code == 200 {
guard let dic = json.data?.peel as? [String: Any], let resultModel = YHIncomeCompanyDetailModel.deserialize(from: dic) else {
let err = YHErrorModel(errorCode: YHErrorCode.dictParseError.rawValue, errorMsg: YHErrorCode.dictParseError.description())
callback(nil, err)
return
}
callback(resultModel, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callback(nil, err)
}
} failBlock: { err in
callback(nil, err)
}
}
func updateDetail(incomeId: Int, incomeMoney: Double, corporateTurnover: Double, incomeType: [Int], hasAllFile: YHIncomeRecordHasAllFile, callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let params: [String: Any] = ["income_id": incomeId,
"income_money": incomeMoney,
"corporate_turnover": corporateTurnover,
"income_type": incomeType,
"has_all_file": hasAllFile.rawValue]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.IncomeRecord.updateDetail
_ = YHNetRequest.postRequest(url: strUrl, params: params) { json, _ in
// 1. json字符串 转 对象
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false, err)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func incomeUpdate(orderId: Int, incomeOver100: YHIncomeOver100, type: YHIncomeRecordUpdateType, callBackBlock: @escaping (_ success: Bool, _ error: YHErrorModel?) -> Void) {
let params: [String: Any] = ["order_id": orderId,
"income_over_100": incomeOver100.rawValue,
"type": type.rawValue]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.IncomeRecord.incomeUpdate
_ = YHNetRequest.postRequest(url: strUrl, params: params) { json, _ in
// 1. json字符串 转 对象
printLog("model 是 ==> \(json)")
if json.code == 200 {
callBackBlock(true, nil)
} else {
let err = YHErrorModel(errorCode: Int32(json.code), errorMsg: json.msg.isEmpty ? "" : json.msg)
callBackBlock(false, err)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
}
......@@ -60,10 +60,6 @@ class YHImageResultViewController: YHBaseViewController {
if controller.isKind(of: YHWorkExperienceViewController.self) {
targetVC = controller
}
if controller.isKind(of: YHWorkIntroductionViewController.self) {
targetVC = controller
}
}
if let targetVC = targetVC {
self.navigationController?.popToViewController(targetVC, animated: true)
......
......@@ -17,6 +17,7 @@ class YHWorkExperienceListViewController: YHBaseViewController {
var isMore: Bool = false
var orderId: Int = 0
var showPrompt: Bool = false
override func viewDidLoad() {
super.viewDidLoad()
viewModel = YHWorkItemListViewModel()
......@@ -57,6 +58,8 @@ class YHWorkExperienceListViewController: YHBaseViewController {
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHWorkExperienceListTableViewCell.self)
tableView.register(cellWithClass: YHDocumentPromptTableViewCell.self)
tableView.register(cellWithClass: YHWorkExperienceListReasonTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
......@@ -110,12 +113,17 @@ class YHWorkExperienceListViewController: YHBaseViewController {
return
}
}
viewModel?.requestWorkTimeRemarkWorkExperience("\(orderId)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
})
viewModel?.requestSaveAllWorkExperience("\(orderId)", callBackBlock: {[weak self] success, error in
guard let self = self else { return }
if success ?? false {
self.navigationController?.popViewController(animated: true)
}
})
}
func showDeleteAlert(_ model: YHWorkItemListModel) {
......@@ -130,10 +138,17 @@ class YHWorkExperienceListViewController: YHBaseViewController {
extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
return 3
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHDocumentPromptTableViewCell.self)
cell.workList = 0
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
} else if indexPath.row == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceListTableViewCell.self)
cell.showPrompt = showPrompt
cell.dataSource = dataSource
......@@ -176,9 +191,31 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
} else if indexPath.row == 2 {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceListReasonTableViewCell.self)
cell.model = viewModel?.mainModel
cell.clickBlock = { [weak self] value, index in
guard let self = self else { return }
if index == 0 {
self.viewModel?.mainModel.work_time_empty_remark = value
} else {
self.viewModel?.mainModel.work_time_overlap_remark = value
}
}
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
}
return UITableViewCell()
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
return 104
}
if indexPath.row == 2 {
return 540
}
let number = dataSource?.count ?? 0
var height = 23 + 154
if let data = dataSource {
......
//
// YHWorkExperiencePositionViewViewController.swift
// galaxy
//
// Created by EDY on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHWorkExperiencePositionViewViewController: YHBaseViewController {
var bottomView: YHBottomNextView!
var tableView: UITableView!
var viewModel: YHWorkExperiencePositionViewModel!
var baseDataSource: [YHSectionWorkExperienceModel]?
var introductionDataSource: [YHWorkExperienceProjectModel]?
var fileDataSource: [YHWorkExperienceFileModel]?
var workExperienceID: String?
var orderID: Int = 0
var isMore: Bool = false
var isShowPrompt: Bool = false
var isShowMessageSelect: Bool = true
var isKeyboardShow: Bool = false
var selectEditItem = YHWorkExperienceFileModel()
override func viewDidLoad() {
super.viewDidLoad()
viewModel = YHWorkExperiencePositionViewModel()
gk_navTitle = "职位信息填写"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1.0
setView()
getData()
}
func getData() {
self.baseDataSource = self.viewModel.getBaseDataSource(false)
updateDataSource()
}
func getTextWithType(type: Int) -> ASAttributedString {
if type == 0 {
return .init("海外工作签证", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
}
if type == 1 {
let a:ASAttributedString = .init("护照出入境盖章记录\n", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("(此类文件加分以港府审批为准)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
return a + b
}
if type == 2 {
let a:ASAttributedString = .init("出入境打印记录\n", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("(此类文件加分以港府审批为准)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
return a + b
}
if type == 3 {
let a:ASAttributedString = .init("以上均不能提供\n", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("(或将导致您的该段工作经验", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
let c: ASAttributedString = .init("不被认可不予加分", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.failColor))
let d: ASAttributedString = .init(",请尽可能准备以上材料并修改此选项)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
return a + b + c + d
}
return .init("", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
func getTipsWithType() -> [ASAttributedString] {
return [self.getTextWithType(type: 0),
self.getTextWithType(type: 1),
self.getTextWithType(type: 2),
self.getTextWithType(type: 3)]
}
func updateDataSource() {
bottomView.nextButton.setTitle("提交", for: .normal)
self.tableView.reloadData()
}
func setView() {
tableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
if #available(iOS 11.0, *) {
tableView.contentInsetAdjustmentBehavior = .never
}
tableView.backgroundColor = .clear
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHWorkExperiencePositionListTableViewCell.self)
tableView.register(cellWithClass: YHWorkExperiencePositionReasonTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
make.left.right.bottom.equalTo(view)
}
bottomView = {
let bottom = YHBottomNextView()
bottom.nextblock = { [weak self] in
bottom.nextButton.isEnabled = false
guard let self = self else { return }
// if self.viewModel.isCanNext(self.stepView.currentIndex) {
// self.viewModel.mainModel.step = self.stepView.currentIndex
// self.viewModel.saveWorkDetail(1, orderID: self.orderID, callBackBlock: {[weak self] flag, error in
// guard let self = self else { return }
// bottom.nextButton.isEnabled = true
// if let error = error {
// YHHUD.flash(message: error.errorMsg )
// } else {
// YHHUD.hideFlashMessage()
// if self.stepView.currentIndex == 3 {
// YHHUD.flash(message: "提交成功")
// self.navigationController?.popViewController()
// } else {
// self.stepView.currentIndex = self.stepView.currentIndex + 1
// self.updateDataSource()
// }
// }
// })
// } else {
// bottom.nextButton.isEnabled = true
// self.isShowPrompt = true
// self.updateDataSource()
// YHHUD.flash(message: "您还有信息未填写")
// }
}
bottom.saveBlock = { [weak self] in
guard let self = self else { return }
// self.viewModel.saveWorkDetail(0, orderID: self.orderID, callBackBlock: {[weak self] flag, error in
// guard let self = self else { return }
// if let error = error {
// YHHUD.flash(message: error.errorMsg )
// } else {
// YHHUD.flash(message: "保存成功")
// }
// })
}
return bottom
}()
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalTo(view)
make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
}
bottomView.layoutIfNeeded()
bottomView.nextButton.addYinHeGradualLayer()
}
func showDeleteAlert(_ model: YHWorkExperienceProjectModel) {
YHCommonAlertView.show("", "确定要删除该项目介绍吗?", "取消", "确认") {[weak self] in
guard let self = self else { return }
}
}
func showDeleteAlert(_ model: YHWorkExperienceFileModel) {
YHCommonAlertView.show("", "确定要删除吗?", "取消", "确认") {[weak self] in
guard let self = self else { return }
for i in 0..<(self.fileDataSource?.count ?? 0) {
let data = self.fileDataSource?[i]
if data?.fileName == model.fileName {
self.fileDataSource?.remove(at: i)
self.tableView.reloadData()
self.viewModel.mainModel.file = self.fileDataSource ?? []
return
}
}
}
}
deinit {
NotificationCenter.default.removeObserver(self)
}
}
extension YHWorkExperiencePositionViewViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperiencePositionListTableViewCell.self)
cell.country = self.viewModel.mainModel.location.country
cell.dataSource = baseDataSource?[indexPath.row]
cell.workExperienceBlock = {[weak self] model in
guard let self = self else { return }
self.viewModel.updateModel(model)
let id = model.id
if id != .id1 && id != .id3 && id != .id4 && id != .id7 && id != .id8 && id != .id12 && id != .id14 && id != .id16 && id != .id17 && id != .id18 {
self.updateDataSource()
}
}
cell.companyBlock = {[weak self] company in
guard let self = self else { return }
// self.viewModel.updateModel(company)
self.updateDataSource()
}
return cell
} else {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperiencePositionReasonTableViewCell.self)
cell.dataSource = getTipsWithType()
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
}
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 {
let array = baseDataSource?[indexPath.row].models ?? []
var h = 0
for i in 0..<array.count {
let data = array[i]
let message = data.message ?? ""
let isShow = data.isShowPrompts ?? false
if data.id == .id13 {
h = h + 72
} else {
h = h + 52
}
if isShow && message.count == 0 {
h = h + 20
}
}
return CGFloat(h + 52 + 14)
} else {
return UITableView.automaticDimension
}
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 7))
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 7
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
}
......@@ -8,6 +8,7 @@
import UIKit
import IQKeyboardManagerSwift
import AttributedString
class YHWorkExperienceViewController: YHBaseViewController {
var stepView: YHStepView!
......@@ -24,6 +25,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
var isShowMessageSelect: Bool = true
var isKeyboardShow: Bool = false
var selectEditItem = YHWorkExperienceFileModel()
var fileMessageArray: [String] = ["签字盖章的推荐信", "盖章的工作证明+签字的推荐信", "其他证明(退工单或合同+社保等证明)", "以上均不能提供"]
var renameInputView: YHFileRenameInputView = {
let view = YHFileRenameInputView.inputView(defalutText: "请输入名称")
return view
......@@ -102,13 +104,13 @@ class YHWorkExperienceViewController: YHBaseViewController {
viewModel.requestWorkExample { success, error in
}
viewModel.requestWorkDetail(workExperienceID ?? "") {[weak self] success, error in
viewModel.requestWorkDetail("\(orderID)", workExperienceID ?? "") {[weak self] success, error in
guard let self = self else { return }
self.stepView.currentIndex = self.viewModel.mainModel.step
self.stepView.maxIndex = self.viewModel.mainModel.step
self.updateDataSource()
self.stepView.dataSource = ["基本信息", "工作职责", "工作亮点", "简历/工作总结"]
self.viewModel.requestWorkInfoProject("\(self.viewModel.mainModel.id )") {[weak self] success, error in
self.viewModel.requestWorkInfoProject("\(self.viewModel.mainModel.word_id)") {[weak self] success, error in
guard let self = self else { return }
self.introductionDataSource = success
self.fileDataSource = self.viewModel.mainModel.file
......@@ -130,6 +132,41 @@ class YHWorkExperienceViewController: YHBaseViewController {
self.tableView.reloadData()
}
func getTextWithType(type: Int) -> ASAttributedString {
if type == 0 {
return .init("签字盖章的推荐信", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
}
if type == 1 {
let a:ASAttributedString = .init("盖章的工作证明+签字的推荐信", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
return a
}
if type == 2 {
let a:ASAttributedString = .init("其他证明(退工单或合同+社保等证明) \n", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("(此类文件加分以港府审批为准)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
return a + b
}
if type == 3 {
let a:ASAttributedString = .init("以上均不能提供\n", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init("(或将导致您的该段工作经验", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
let c: ASAttributedString = .init("不被认可不予加分", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.failColor))
let d: ASAttributedString = .init(",请尽可能准备以上材料并修改此选项)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
return a + b + c + d
}
return .init("", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.mainTextColor(alpha: 0.5)))
}
func getTipsWithType() -> [ASAttributedString] {
return [self.getTextWithType(type: 0),
self.getTextWithType(type: 1),
self.getTextWithType(type: 2),
self.getTextWithType(type: 3)]
}
func getSelectCompany() -> Int {
return fileMessageArray.firstIndex(where: {$0 == viewModel.mainModel.work_certificate}) ?? 5
}
func setView() {
stepView = {
let step = YHStepView()
......@@ -165,6 +202,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
tableView.register(cellWithClass: YHWorkIntroductionTableViewCell.self)
tableView.register(cellWithClass: YHWorkMessageSelectTableViewCell.self)
tableView.register(cellWithClass: YHWorkFileSyncTableViewCell.self)
tableView.register(cellWithClass: YHWorkExperiencePositionTableViewCell.self)
return tableView
}()
view.addSubview(tableView)
......@@ -429,7 +467,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
if stepView.currentIndex == 4 {
return 1
}
return baseDataSource?.count ?? 0
return 2
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......@@ -637,23 +675,70 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
return cell
} else {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceTableViewCell.self)
cell.country = self.viewModel.mainModel.location.country
cell.selectDataSource = getTipsWithType()
cell.selectItem = getSelectCompany()
cell.dataSource = baseDataSource?[indexPath.row]
cell.workExperienceBlock = {[weak self] model in
guard let self = self else { return }
self.viewModel.updateModel(model)
let id = model.id
if id != .id1 && id != .id3 && id != .id4 && id != .id7 && id != .id8 && id != .id12 && id != .id14 && id != .id16 && id != .id17 && id != .id18 {
if id != .id1 {
self.updateDataSource()
}
}
cell.companyBlock = {[weak self] company in
cell.selectBlock = {[weak self] index in
guard let self = self else { return }
self.viewModel.updateModel(company)
self.updateDataSource()
self.viewModel.mainModel.work_certificate = fileMessageArray[index.first ?? 0]
}
return cell
} else {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperiencePositionTableViewCell.self)
cell.showPrompt = isShowPrompt
// cell.dataSource = dataSource
if isMore {
cell.more()
} else {
cell.cannal()
}
cell.clickBlock = {[weak self] model in
guard let self = self else { return }
// let firstModel = self.dataSource?.first
// let vc = YHWorkExperienceViewController()
// vc.workExperienceID = "\(model.id ?? 0)"
// vc.orderID = self.orderId
// vc.isShowMessageSelect = true
// if firstModel?.id == model.id {
// vc.isShowMessageSelect = false
// }
// self.navigationController?.pushViewController(vc, animated: true)
}
cell.deleteBlock = {[weak self] model in
guard let self = self else { return }
// self.showDeleteAlert(model)
}
cell.isMoreBlock = {[weak self] isMore in
guard let self = self else { return }
self.isMore = isMore
}
cell.newWorkBlock = {[weak self] in
guard let self = self else { return }
// if self.dataSource?.count == 10 {
// YHHUD.flash(message: "新增工作经历不能超过10条")
// } else {
// let vc = YHWorkExperienceViewController()
// vc.isShowMessageSelect = true
// vc.orderID = self.orderId
// self.navigationController?.pushViewController(vc, animated: true)
// }
let vc = YHWorkExperiencePositionViewViewController()
self.navigationController?.pushViewController(vc, animated: true)
}
cell.backgroundColor = .clear
cell.contentView.backgroundColor = .clear
return cell
}
}
}
......@@ -664,24 +749,47 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
let count = fileDataSource?.count ?? 0
return CGFloat(69 * count + 171)
} else {
if indexPath.row == 0 {
let array = baseDataSource?[indexPath.row].models ?? []
var h = 0
for i in 0..<array.count {
let data = array[i]
let message = data.message ?? ""
let isShow = data.isShowPrompts ?? false
if data.id == .id3 || data.id == .id4 || data.id == .id18 {
h = h + 132
} else if data.id == .id13 {
h = h + 72
} else {
h = h + 52
}
if isShow && message.count == 0 {
h = h + 20
}
}
return CGFloat(h + 52 + 14)
return CGFloat(h + 52 + 14 + 386)
} else {
// let number = dataSource?.count ?? 0
var height = 23 + 154
// if let data = dataSource {
// for item in data {
// if item.company_name == "" {
// height = height + 52
// } else {
// let text = item.company_name // 要显示的文本内容
// let font = UIFont.PFSC_B(ofSize: 14) // 字体大小
// let maxWidth = 143.0 // 最大宽度限制
//
// // 创建NSAttributedString对象并设置属性
// let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
// _ = NSMutableAttributedString(string: text ?? "", attributes: attributes)
//
// // 根据指定的最大宽度和字体大小计算文本的高度
// let size = (text! as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
// if size.height > 20 {
// height = height + 96
// } else {
// height = height + 76
// }
// }
// }
// }
return CGFloat(height)
}
}
}
......
//
// YHWorkIntroductionViewController.swift
// galaxy
//
// Created by EDY on 2024/2/20.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkIntroductionViewController: YHBaseViewController {
typealias SaveBlock = () -> ()
var saveBlock: SaveBlock?
var nameTextField: UITextField!
var startTextField: UITextField!
var endTextField: UITextField!
// var longTimeButton: UIButton!
var messageTextField: UITextView!
var startButton: UIButton!
var endButton: UIButton!
var promptsLabel: UILabel!
var actionView: YHWorkActionView!
var bottomView: UIView!
var bottomButton: UIButton!
var viewModel: YHWorkIntroductionViewModel!
var workModel: YHWorkExperienceDetailModel?
var dataSource: YHWorkExperienceProjectModel = YHWorkExperienceProjectModel()
override func viewDidLoad() {
super.viewDidLoad()
gk_navTitle = "工作经验信息填写"
gk_navBackgroundColor = .white
gk_navBarAlpha = 1.0
viewModel = YHWorkIntroductionViewModel()
setView()
getData()
isShowPromptsLabel()
// Do any additional setup after loading the view.
}
func getData() {
viewModel?.requestIntroducetionExample(callBackBlock: { success, error in
})
}
func setView() {
view.backgroundColor = .white
let array = ["项目名称", "项目开始时间", "项目结束时间", "项目业绩/亮点"]
for i in 0..<array.count {
let label = UILabel()
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = array[i]
view.addSubview(label)
label.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(CGFloat(51 * i) + k_Height_NavigationtBarAndStatuBar)
make.width.equalTo(100)
make.height.equalTo(51)
}
if i != array.count - 1 {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
view.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(CGFloat(51 * (i + 1)) + k_Height_NavigationtBarAndStatuBar)
make.right.equalTo(-18)
make.height.equalTo(1)
}
}
}
nameTextField = {
let textField = UITextField()
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.placeholder = "如方便提供,请填写"
textField.text = dataSource.project_name
textField.delegate = self
return textField
}()
view.addSubview(nameTextField)
nameTextField.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.left.equalTo(117)
make.height.equalTo(51)
}
startTextField = {
let textField = UITextField()
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.placeholder = "开始时间"
textField.isEnabled = false
textField.isUserInteractionEnabled = false
textField.text = dataSource.project_start_time
return textField
}()
view.addSubview(startTextField)
startTextField.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 52)
make.left.equalTo(117)
make.height.equalTo(51)
make.right.equalTo(-18)
}
startButton = {
let button = UIButton(type: .custom)
button.addTarget(self, action: #selector(startClick), for: .touchUpInside)
return button
}()
view.addSubview(startButton)
startButton.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 52)
make.left.equalTo(117)
make.height.equalTo(51)
make.right.equalTo(-18)
}
endTextField = {
let textField = UITextField()
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.placeholder = "结束时间"
textField.isEnabled = false
textField.isUserInteractionEnabled = false
if dataSource.project_end_time != "至今" {
textField.text = dataSource.project_end_time
} else {
textField.text = ""
}
return textField
}()
view.addSubview(endTextField)
endTextField.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 104)
make.left.equalTo(117)
make.height.equalTo(51)
make.right.equalTo(-18)
}
endButton = {
let button = UIButton(type: .custom)
button.addTarget(self, action: #selector(endClick), for: .touchUpInside)
return button
}()
view.addSubview(endButton)
endButton.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 104)
make.left.equalTo(117)
make.height.equalTo(51)
make.right.equalTo(-18)
}
// longTimeButton = {
// let button = UIButton(type: .custom)
// button.setImage(UIImage(named: "main_time_normal"), for: .normal)
// button.setImage(UIImage(named: "login_privacy_agree"), for: .selected)
// button.setTitleColor(UIColor.mainTextColor, for: .normal)
// button.setTitle("至今", for: .normal)
// button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
// button.contentHorizontalAlignment = .right
// button.addTarget(self, action: #selector(longTimeButtonClick), for: .touchUpInside)
// if dataSource.project_end_time == "至今" {
// button.isSelected = true
// } else {
// button.isSelected = false
// }
// return button
// }()
// view.addSubview(longTimeButton)
// if dataSource.project_end_time != "至今" {
// longTimeButton.snp.makeConstraints { make in
// make.right.equalTo(-18)
// make.centerY.equalTo(endTextField.snp.centerY)
// make.height.equalTo(32)
// make.width.equalTo(43)
// }
endTextField.isHidden = false
endButton.isHidden = false
// }
// else {
// longTimeButton.snp.makeConstraints { make in
// make.left.equalTo(117)
// make.centerY.equalTo(endTextField.snp.centerY)
// make.height.equalTo(32)
// make.width.equalTo(43)
// }
// endTextField.isHidden = true
// endButton.isHidden = true
// }
// longTimeButton.iconInLeft(spacing: 3)
messageTextField = {
let textField = UITextView()
textField.backgroundColor = UIColor.contentBkgColor
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.layer.cornerRadius = kCornerRadius6
textField.delegate = self
textField.text = dataSource.project_highlights
return textField
}()
view.addSubview(messageTextField)
messageTextField.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(208 + k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 124)
}
promptsLabel = {
let prompts = UILabel()
prompts.font = UIFont.PFSC_R(ofSize: 14)
prompts.textColor = UIColor(hex: 0xc0c0c0)
prompts.text = "在职期间负责的核心项目,如果负责过多个项目,请分段描述:\n\n例子:\n\n模式1、本人对XX项目展开深入研究,通过对XX方法/方式,研究出XX。此外,她还指出XX问题,反映了XX。XX的研究成果对XX产生了重要性,为XX领域/方面提供参考依据;\n\n模式2、本人在司参与了XX项目,该项目具有XX突出意义。在此项目中,XX是个难点,本人通过XX方法,实现了XX成果。在XX方面,本人通过XX方式,完成了XX工作。本人凭借在XX领域的丰富经验,推动项目在中国/海外市场取得XX成果。"
prompts.numberOfLines = 0
return prompts
}()
view.addSubview(promptsLabel)
promptsLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.top.equalTo(220 + k_Height_NavigationtBarAndStatuBar)
}
actionView = {
let view = YHWorkActionView()
view.exampleBlock = {[weak self] in
guard let self = self else { return }
self.view.endEditing(true)
let mainVc = YHWorkExampleViewController()
mainVc.dataSource = self.viewModel?.introducetionExampleModels
mainVc.type = .introduction
mainVc.exampleBlock = {[weak self] message in
guard let self = self else { return }
self.dataSource.project_highlights = message
self.messageTextField.text = message
self.isShowPromptsLabel()
}
let vc = UINavigationController(rootVC: mainVc)
vc.modalPresentationStyle = .pageSheet
self.navigationController?.present(vc, animated: true)
}
view.photoBlock = {[weak self] in
guard let self = self else { return }
self.view.endEditing(true)
YHImagePickerView.show() {[weak self] image in
guard let self = self else { return }
let clipperVC = YHImageClipperViewController()
clipperVC.setBaseImg(image, resultImgSize: CGSize(width: image.size.width, height: image.size.height), type: .Stay)
clipperVC.successClippedHandler = {[weak self] result in
guard let self = self else { return }
self.dataSource.project_highlights = result
self.messageTextField.text = result
self.isShowPromptsLabel()
}
self.navigationController?.pushViewController(clipperVC, animated: true)
}
}
return view
}()
view.addSubview(actionView)
actionView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.height.equalTo(44)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom() - 64)
}
bottomView = {
let bottom = UIView()
bottom.backgroundColor = .white
return bottom
}()
view.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(k_Height_safeAreaInsetsBottom() + 64)
}
bottomButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("保存", for: .normal)
button.setTitleColor( UIColor(hex:0xffffff), for: .normal)
button.layer.cornerRadius = kCornerRadius3
button.addTarget(self, action: #selector(submit), for: .touchUpInside)
return button
}()
bottomView.addSubview(bottomButton)
bottomButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.top.equalTo(8)
make.height.equalTo(48)
make.left.equalTo(16)
}
}
// @objc func longTimeButtonClick() {
// longTimeButton.isSelected = !longTimeButton.isSelected
// if longTimeButton.isSelected {
// longTimeButton.snp.remakeConstraints { make in
// make.left.equalTo(117)
// make.centerY.equalTo(endTextField.snp.centerY)
// make.height.equalTo(32)
// make.width.equalTo(43)
// }
// endTextField.isHidden = true
// endButton.isHidden = true
// } else {
// longTimeButton.snp.remakeConstraints { make in
// make.right.equalTo(-18)
// make.centerY.equalTo(endTextField.snp.centerY)
// make.height.equalTo(32)
// make.width.equalTo(43)
// }
// endTextField.isHidden = false
// endButton.isHidden = false
// }
// }
@objc func submit() {
// if longTimeButton.isSelected {
// dataSource.project_end_time = "至今"
// }
guard let name = dataSource.project_name, name.count != 0 else {
YHHUD.flash(message: "您还有信息未填写")
return
}
guard let _ = dataSource.project_start_time else {
YHHUD.flash(message: "您还有信息未填写")
return
}
guard let _ = dataSource.project_end_time else {
YHHUD.flash(message: "您还有信息未填写")
return
}
guard let _ = dataSource.project_highlights else {
YHHUD.flash(message: "您还有信息未填写")
return
}
viewModel?.saveWorkProjectDetail(workModel ?? YHWorkExperienceDetailModel(), projectModel: dataSource, callBackBlock: {[weak self] success, error in
guard let self = self else { return }
if success {
if let block = self.saveBlock {
block()
}
self.navigationController?.popViewController(animated: true)
} else {
YHHUD.flash(message: error?.errorMsg ?? "")
}
})
}
@objc func startClick() {
view.endEditing(true)
YHDatePickView.show(type: .yyyymmdd, title: "选择开始时间", lastIsTaday: true, currentDay: dataSource.project_start_time ?? "") { date in
if date > self.dataSource.project_end_time ?? "" && self.dataSource.project_end_time?.count ?? 0 > 0 && self.dataSource.project_end_time != "至今" {
YHHUD.flash(message: "开始时间不能晚于结束时间")
} else {
let format = DateFormatter()
format.dateFormat = "yyyy-MM-dd"
if let selectDate = format.date(from:date) {
let selectTimeInterval = selectDate.timeIntervalSince1970
let currentTimeInterval = Date().timeIntervalSince1970
if selectTimeInterval > currentTimeInterval {
YHHUD.flash(message: "开始时间不能晚于当前时间")
} else {
self.startTextField.text = date
self.dataSource.project_start_time = date
}
}
}
}
}
@objc func endClick() {
view.endEditing(true)
YHDatePickView.show(type: .yyyymmdd, title: "请选择结束时间", lastIsTaday: true, currentDay: dataSource.project_end_time ?? "") { date in
if date < self.dataSource.project_start_time ?? "" {
YHHUD.flash(message: "结束时间不能早于开始时间")
} else {
self.endTextField.text = date
self.dataSource.project_end_time = date
}
}
}
func isShowPromptsLabel() {
if messageTextField.text.count != 0 {
promptsLabel.isHidden = true
} else {
promptsLabel.isHidden = false
}
}
}
extension YHWorkIntroductionViewController: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
self.dataSource.project_highlights = textView.text
if textView.text.count != 0 {
promptsLabel.isHidden = true
} else {
promptsLabel.isHidden = false
}
}
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
let newLength = (textView.text as NSString).length + text.count - range.length
return newLength <= 2000
}
}
extension YHWorkIntroductionViewController: UITextFieldDelegate {
func textFieldDidEndEditing(_ textField: UITextField) {
}
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if newText.count > 15 {
return false
}
dataSource.project_name = newText
return true
}
}
......@@ -10,9 +10,12 @@ import Foundation
import SmartCodable
class YHWorkExperienceDetailModel: SmartCodable {
var id: Int = 0
var word_id: Int = 0
var order_id: Int = 0
var company_name: String = ""
var professional_level: Int = 0
var work_certificate: String = ""
var is_famous_enterprise: Int = 0
var duty: String = ""
var entry_time: String = ""
......@@ -20,7 +23,6 @@ class YHWorkExperienceDetailModel: SmartCodable {
var industry: String = ""
var location: YHAddressModel = YHAddressModel()
var location_aboard: Int = 0
var professional_level: Int = 0
var professional_other: String = ""
var position: String = ""
var remark: String = ""
......@@ -32,7 +34,6 @@ class YHWorkExperienceDetailModel: SmartCodable {
var operator_name: String = ""
var operator_english_name: String = ""
var operator_id: Int = 0
var work_certificate: String = ""
var executives_certificate: String = ""
var is_executives: Int = 0
var wduty: String = ""
......
......@@ -19,6 +19,7 @@ enum YHWorkExperienceSelectType: Int {
case structure = 7
case level = 8
case prove = 9
case company = 10
}
enum YHWorkExperienceID: Int {
......
//
// YHWorkExperiencePositionModel.swift
// galaxy
//
// Created by EDY on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import SmartCodable
class YHWorkExperiencePositionModel: SmartCodable {
var position_id: Int = 0
var order_id: Int = 0
var work_id: Int = 0
var position_name: String = ""
var wduty: String = ""
var entry_time: String = ""
var departure_time: String = ""
var experience_scope: String = ""
var experience_sub_scope: String = ""
var is_international_work_experience: Int = 0
var provide_certificate_type: Int = 0
var work_country: String?
var work_city: String?
required init() {
}
}
......@@ -11,6 +11,8 @@ import SmartCodable
class YHWorkModel: SmartCodable {
var count: Int?
var work_time_overlap_remark: String = "" //重叠期
var work_time_empty_remark: String = "" //空窗期
var list: [YHWorkItemListModel]?
required init() {
}
......
//
// YHWorkExperienceCompanySelectIView.swift
// galaxy
//
// Created by EDY on 2024/11/18.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHWorkExperienceCompanySelectView: UIView {
var backDate: (([YHWorkExperienceFileModel]) -> Void)?
var centerView: UIView!
var titleLabel: UILabel!
var closeButton: UIButton!
var sureButton: UIButton!
var tableView: UITableView!
var dataSource: [YHWorkExperienceFileModel] = []
var viewModel = YHWorkExperienceViewModel()
var title: String = "" {
didSet {
titleLabel.text = title
}
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1)
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tap.delegate = self
addGestureRecognizer(tap)
setView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setView() {
backgroundColor = UIColor(hex: 0x000000, alpha: 0.5)
centerView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.height.equalTo(724)
}
titleLabel = {
let label = UILabel()
label.text = title
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.textAlignment = .center
label.text = "公司基本情况"
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.top.equalTo(16)
make.height.equalTo(24)
make.width.equalTo(200)
make.centerX.equalToSuperview()
}
closeButton = {
let button = UIButton(type: .custom)
button.setImage(UIImage(named: "my_cer_sheet_close"), for: .normal)
button.addTarget(self, action: #selector(dismiss), for: .touchUpInside)
return button
}()
centerView.addSubview(closeButton)
closeButton.snp.makeConstraints { make in
make.right.equalTo(-21)
make.height.width.equalTo(24)
make.top.equalTo(16)
}
sureButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
button.contentHorizontalAlignment = .center
button.setTitle("确定", for: .normal)
button.setTitleColor(UIColor.white, for: .normal)
button.backgroundColor = UIColor.brandMainColor
button.layer.cornerRadius = 3
button.addTarget(self, action: #selector(sure), for: .touchUpInside)
return button
}()
centerView.addSubview(sureButton)
sureButton.snp.makeConstraints { make in
make.right.equalTo(-16)
make.height.equalTo(48)
make.left.equalTo(16)
make.bottom.equalTo(-42)
}
tableView = {
let tableView = UITableView(frame: .zero, style: .grouped)
tableView.estimatedSectionHeaderHeight = 14
tableView.contentInsetAdjustmentBehavior = .never
tableView.backgroundColor = .contentBkgColor
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.register(cellWithClass: YHCompanySelectFileCell.self)
tableView.register(cellWithClass: YHCompanyReasonFileCell.self)
return tableView
}()
centerView.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(53)
make.bottom.equalTo(-98)
make.left.right.equalToSuperview()
}
centerView.layoutIfNeeded()
let corner = UIRectCorner(rawValue: UIRectCorner.topLeft.rawValue | UIRectCorner.topRight.rawValue)
let path = UIBezierPath(roundedRect:bounds,byRoundingCorners: corner,cornerRadii:CGSizeMake(kCornerRadius6, kCornerRadius6))
let layer = CAShapeLayer()
layer.frame = centerView.bounds
layer.path = path.cgPath
centerView.layer.mask = layer
}
@objc private func handleTap(_ sender: AnyObject?) {
dismiss()
}
static func show(callBack: @escaping (([YHWorkExperienceFileModel]) -> Void)) {
let view = YHWorkExperienceCompanySelectView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.backDate = callBack
let window = UIApplication.shared.yhKeyWindow()
window?.addSubview(view)
}
@objc func dismiss() {
removeFromSuperview()
}
@objc func sure() {
if let block = backDate {
// block(array)
}
dismiss()
}
}
extension YHWorkExperienceCompanySelectView: UIGestureRecognizerDelegate {
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
}
extension YHWorkExperienceCompanySelectView: UITableViewDelegate, UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 2
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return 1
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHCompanyReasonFileCell.self)
cell.selectData = []
return cell
}
let cell = tableView.dequeueReusableCell(withClass: YHCompanySelectFileCell.self)
cell.selectData = []
return cell
}
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension
}
func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 14))
return view
}
func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
return 14
}
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
return UIView()
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0.01
}
}
class YHCompanySelectFileCell: UITableViewCell {
typealias SelectBlock = (_ selectIndex: [Int]) -> ()
var selectBlock: SelectBlock?
var selectItem: [Int] = []
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var mainItemView: UIView!
var dataSource: [String] = ["内地", "香港", "澳门", "境外"]
var selectData: [Int]? {
didSet {
updateAllViews()
}
}
var messageDataSource: [String] = ["公司是否为上市公司", "您目前是否拥有此公司10%以上股权", "您目前是否拥有此公司50%以上股权", "公司全年盈利达港币 500 万元或以上(或等值外币)", "请选择您的公司所在地:"]
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.bottom.equalToSuperview()
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "主申请人公司"
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(20)
make.right.equalTo(-18)
}
// lineView = {
// let label = UIView()
// label.backgroundColor = UIColor.separatorColor
// return label
// }()
// centerView.addSubview(lineView)
// lineView.snp.makeConstraints { make in
// make.height.equalTo(1)
// make.top.equalTo(52)
// make.left.right.equalToSuperview()
// }
//
mainItemView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-16)
make.top.equalTo(52)
}
}
func updateAllViews() {
mainItemView.removeSubviews()
for j in 0..<messageDataSource.count {
let lineView = {
let label = UIView()
label.backgroundColor = UIColor.separatorColor
return label
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.height.equalTo(1)
make.left.equalTo(18)
make.right.equalTo(-18)
if j == 0 {
make.top.equalTo(52)
} else {
let view = mainItemView.viewWithTag(2000 + j - 1)
make.top.equalTo(view?.snp.bottom ?? mainItemView.snp.bottom).offset(15)
}
}
let titleLabel = {
let label = UILabel()
// label.attributed.text = dataSource?[i]
label.numberOfLines = 0
let str = "*" + messageDataSource[j]
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
label.tag = 2000 + j
return label
}()
mainItemView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(15)
make.left.equalTo(18)
make.width.equalTo(106)
if j == 4 {
make.width.equalTo(400)
}
}
if j == 4 {
for i in 0..<dataSource.count {
let bgviewButton = {
let view = UIButton()
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 3
view.layer.borderColor = UIColor.brandMainColor.cgColor
view.addTarget(self, action: #selector(agreeClick(sender:)), for: .touchUpInside)
view.tag = 20000 + i
return view
}()
mainItemView.addSubview(bgviewButton)
let agreeButton = {
let button = UIImageView()
button.image = UIImage(named: "login_privacy_disagree_glay")
button.tag = 10000 + i
if selectItem.contains(i) {
button.image = UIImage(named: "login_privacy_agree")
} else {
button.image = UIImage(named: "login_privacy_disagree_glay")
}
button.isUserInteractionEnabled = false
return button
}()
mainItemView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
if i == 0 {
make.top.equalTo(titleLabel.snp.bottom).offset(32)
} else {
let view = mainItemView.viewWithTag(1000 + i - 1)
make.top.equalTo(view?.snp.bottom ?? mainItemView.snp.bottom).offset(48)
}
make.left.equalTo(34)
make.height.equalTo(13)
make.width.equalTo(13)
}
let subTitleLabel = {
let label = UILabel()
label.text = dataSource[i]
label.numberOfLines = 0
label.tag = 1000 + i
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 14)
label.isUserInteractionEnabled = false
return label
}()
mainItemView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.top.equalTo(agreeButton.snp.top).offset(-3)
make.left.equalTo(56)
make.right.equalTo(-35)
if i == (dataSource.count) - 1 {
make.bottom.equalToSuperview().offset(-16)
}
}
bgviewButton.snp.makeConstraints { make in
make.top.equalTo(subTitleLabel.snp.top).offset(-16)
make.bottom.equalTo(subTitleLabel.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
}
} else {
let rightButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setTitle("否", for: .normal)
button.layer.cornerRadius = 16
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.addTarget(self, action: #selector(rightClick(sender:)), for: .touchUpInside)
button.tag = 3000 + j
return button
}()
addSubview(rightButton)
rightButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(32)
make.width.equalTo(74)
}
let leftButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.contentBkgColor
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.setTitle("是", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.addTarget(self, action: #selector(leftClick(sender:)), for: .touchUpInside)
button.tag = 4000 + j
return button
}()
addSubview(leftButton)
leftButton.snp.makeConstraints { make in
make.right.equalTo(rightButton.snp.left).offset(-12)
make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(32)
make.width.equalTo(74)
}
}
}
}
@objc func agreeClick(sender: UIButton) {
sender.isSelected = !sender.isSelected
if sender.isSelected {
sender.layer.borderWidth = 1
sender.backgroundColor = UIColor(hex: 0xebf0f9)
selectItem.append(sender.tag - 20000)
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_agree")
} else {
sender.layer.borderWidth = 0
sender.backgroundColor = UIColor.contentBkgColor
selectItem.removeAll(where: {$0 == sender.tag - 20000})
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_disagree_glay")
}
if let block = selectBlock {
block(selectItem)
}
}
@objc func leftClick(sender: UIButton) {
}
@objc func rightClick(sender: UIButton) {
}
}
class YHCompanyReasonFileCell: UITableViewCell {
typealias SelectBlock = (_ selectIndex: [Int]) -> ()
var selectBlock: SelectBlock?
var selectItem: [Int] = []
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var mainItemView: UIView!
var dataSource: [String] = ["验资报告", "审计报告", "绝对实益拥有人声明书", "企业所得税月(季)度预缴纳税申报表(A类)(前4个季度/前12个月)", "企业所得税完税证明(表格式)", "企业所得税年度纳税申报表(A类) (近一年度)", "工作证明"]
var selectData: [Int]? {
didSet {
updateAllViews()
}
}
var messageDataSource: [String] = ["您是否可以提供以下所有证明文件"]
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.bottom.equalToSuperview()
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "证件提供确认"
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(20)
make.right.equalTo(-18)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-16)
make.top.equalTo(52)
}
}
func updateAllViews() {
mainItemView.removeSubviews()
for j in 0..<messageDataSource.count {
let lineView = {
let label = UIView()
label.backgroundColor = UIColor.separatorColor
return label
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.height.equalTo(1)
make.left.right.equalToSuperview()
if j == 0 {
make.top.equalTo(52)
} else {
let view = mainItemView.viewWithTag(2000 + j - 1)
make.top.equalTo(view?.snp.bottom ?? mainItemView.snp.bottom).offset(15)
}
}
let titleLabel = {
let label = UILabel()
// label.attributed.text = dataSource?[i]
label.numberOfLines = 0
let str = "*" + messageDataSource[j]
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
label.tag = 2000 + j
return label
}()
mainItemView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.top.equalTo(lineView.snp.bottom).offset(15)
make.left.equalTo(18)
make.width.equalTo(106)
}
let rightButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.brandMainColor.withAlphaComponent(0.08)
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setTitle("否", for: .normal)
button.layer.cornerRadius = 16
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.addTarget(self, action: #selector(rightClick(sender:)), for: .touchUpInside)
button.tag = 3000 + j
return button
}()
addSubview(rightButton)
rightButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(32)
make.width.equalTo(74)
}
let leftButton = {
let button = UIButton(type: .custom)
button.backgroundColor = UIColor.contentBkgColor
button.setTitleColor(UIColor.brandMainColor, for: .selected)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.layer.cornerRadius = 16
button.setTitle("是", for: .normal)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 13)
button.addTarget(self, action: #selector(leftClick(sender:)), for: .touchUpInside)
button.tag = 4000 + j
return button
}()
addSubview(leftButton)
leftButton.snp.makeConstraints { make in
make.right.equalTo(rightButton.snp.left).offset(-12)
make.centerY.equalTo(titleLabel.snp.centerY)
make.height.equalTo(32)
make.width.equalTo(74)
}
let bgviewButton = {
let view = UIButton()
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 3
view.layer.borderColor = UIColor.brandMainColor.cgColor
return view
}()
mainItemView.addSubview(bgviewButton)
for i in 0..<dataSource.count {
let agreeButton = {
let button = UIView()
button.tag = 10000 + i
button.backgroundColor = UIColor(hex: 0xb3c8e9)
return button
}()
mainItemView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
if i == 0 {
make.top.equalTo(titleLabel.snp.bottom).offset(32)
} else {
let view = mainItemView.viewWithTag(1000 + i - 1)
make.top.equalTo(view?.snp.bottom ?? mainItemView.snp.bottom).offset(18)
}
make.left.equalTo(34)
make.height.equalTo(5)
make.width.equalTo(5)
}
let subTitleLabel = {
let label = UILabel()
label.text = dataSource[i]
label.numberOfLines = 0
label.tag = 1000 + i
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 14)
label.isUserInteractionEnabled = false
return label
}()
mainItemView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.top.equalTo(agreeButton.snp.top).offset(-3)
make.left.equalTo(56)
make.right.equalTo(-35)
if i == (dataSource.count) - 1 {
make.bottom.equalToSuperview().offset(-16)
}
}
if i == dataSource.count - 1 {
bgviewButton.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(16)
make.bottom.equalTo(subTitleLabel.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
}
}
}
}
@objc func agreeClick(sender: UIButton) {
sender.isSelected = !sender.isSelected
if sender.isSelected {
sender.layer.borderWidth = 1
sender.backgroundColor = UIColor(hex: 0xebf0f9)
selectItem.append(sender.tag - 20000)
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_agree")
} else {
sender.layer.borderWidth = 0
sender.backgroundColor = UIColor.contentBkgColor
selectItem.removeAll(where: {$0 == sender.tag - 20000})
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_disagree_glay")
}
if let block = selectBlock {
block(selectItem)
}
}
@objc func leftClick(sender: UIButton) {
}
@objc func rightClick(sender: UIButton) {
}
}
......@@ -247,6 +247,8 @@ class YHWorkExperienceItemView: UIView {
}
case .prove:
break
case .company:
break
}
}
nextStepImageView.isHidden = false
......@@ -500,6 +502,10 @@ class YHWorkExperienceItemView: UIView {
block(self.dataSource ?? YHWorkExperienceModel())
}
}
case .company:
YHWorkExperienceCompanySelectView.show { array in
}
}
}
}
......
//
// YHWorkExperienceListReasonTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHWorkExperienceListReasonTableViewCell: UITableViewCell {
typealias ExperienceListBlock = (_ value: String, _ index: Int) -> ()
var clickBlock: ExperienceListBlock?
var centerView: UIView!
var titleLabel: UILabel!
var lineView: UIView!
var messageLabel: UILabel!
var messageTwoLabel: UILabel!
var messageView: UIView!
var messageTextField: UITextView!
var promptsLabel: UILabel!
var messageNumberLabel: UILabel!
var messageTwoView: UIView!
var messageTwoTextField: UITextView!
var promptsTwoLabel: UILabel!
var messageTwoNumberLabel: UILabel!
var model: YHWorkModel? {
didSet {
messageTextField.text = model?.work_time_empty_remark
if messageTextField.text.count != 0 {
promptsLabel.isHidden = true
messageNumberLabel.text = "\(messageTextField.text.count)/1000"
}
messageTwoTextField.text = model?.work_time_overlap_remark
if messageTwoTextField.text.count != 0 {
promptsTwoLabel.isHidden = true
messageTwoNumberLabel.text = "\(messageTwoTextField.text.count)/1000"
}
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.text = "工作时间说明"
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(23)
make.height.equalTo(24)
make.right.equalTo(-20)
}
lineView = {
let view = UIView()
view.backgroundColor = UIColor.separatorColor
return view
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(52)
make.height.equalTo(1)
}
messageLabel = {
let label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("*", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.failColor))
let aa: ASAttributedString = .init(" 检测到您的", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x8893a2)))
let aaa: ASAttributedString = .init("工作时间有重叠", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.failColor))
let aaaa: ASAttributedString = .init(" 。请确认是否正确填报,若填报无误请在此处说明工作时间重叠的原因~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x8893a2)))
label.attributed.text = a + aa + aaa + aaaa
return label
}()
centerView.addSubview(messageLabel)
messageLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(68)
}
messageTwoLabel = {
let label = UILabel()
label.numberOfLines = 0
let a: ASAttributedString = .init("*", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.failColor))
let aa: ASAttributedString = .init(" 检测到您的", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x8893a2)))
let aaa: ASAttributedString = .init("工作时间有空窗", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.failColor))
let aaaa: ASAttributedString = .init("。请确认是否正确填报,若填报无误请在此处说明工作时间空窗的原因~", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor(hex:0x8893a2)))
label.attributed.text = a + aa + aaa + aaaa
return label
}()
centerView.addSubview(messageTwoLabel)
messageTwoLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(306)
}
messageView = {
let view = UIView()
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 1
return view
}()
centerView.addSubview(messageView)
messageView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(112)
make.height.equalTo(160)
}
messageTextField = {
let textField = UITextView()
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.backgroundColor = .clear
textField.delegate = self
return textField
}()
centerView.addSubview(messageTextField)
messageTextField.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(112)
make.height.equalTo(128)
}
promptsLabel = {
let prompts = UILabel()
prompts.font = UIFont.PFSC_R(ofSize: 14)
prompts.textColor = UIColor(hex: 0xc0c0c0)
prompts.text = "如:工作时间灵活,可自由安排"
prompts.numberOfLines = 0
prompts.backgroundColor = .clear
return prompts
}()
centerView.addSubview(promptsLabel)
promptsLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.top.equalTo(116)
}
messageNumberLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "0/1000"
label.textAlignment = .right
label.textColor = UIColor(hex: 0xd5dae1)
return label
}()
centerView.addSubview(messageNumberLabel)
messageNumberLabel.snp.makeConstraints { make in
make.right.equalTo(-30)
make.top.equalTo(240)
make.height.equalTo(20)
}
messageTwoView = {
let view = UIView()
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 1
return view
}()
centerView.addSubview(messageTwoView)
messageTwoView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(350)
make.height.equalTo(160)
}
messageTwoTextField = {
let textField = UITextView()
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.backgroundColor = .clear
textField.delegate = self
return textField
}()
centerView.addSubview(messageTwoTextField)
messageTwoTextField.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(350)
make.height.equalTo(128)
}
promptsTwoLabel = {
let prompts = UILabel()
prompts.font = UIFont.PFSC_R(ofSize: 14)
prompts.textColor = UIColor(hex: 0xc0c0c0)
prompts.text = "如:为创业做准备或进行自我提升,期间未就职于任何单位"
prompts.backgroundColor = .clear
prompts.numberOfLines = 0
return prompts
}()
centerView.addSubview(promptsTwoLabel)
promptsTwoLabel.snp.makeConstraints { make in
make.left.equalTo(22)
make.right.equalTo(-22)
make.top.equalTo(352)
}
messageTwoNumberLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 14)
label.text = "0/1000"
label.textAlignment = .right
label.textColor = UIColor(hex: 0xd5dae1)
return label
}()
centerView.addSubview(messageTwoNumberLabel)
messageTwoNumberLabel.snp.makeConstraints { make in
make.right.equalTo(-30)
make.top.equalTo(478)
make.height.equalTo(20)
}
}
}
extension YHWorkExperienceListReasonTableViewCell: UITextViewDelegate {
func textViewDidChange(_ textView: UITextView) {
let number = textView.text.count
var numberIndex = 0
if textView.text.count != 0 {
if textView == messageTextField {
promptsLabel.isHidden = true
messageNumberLabel.text = "\(number)/1000"
numberIndex = 0
} else {
promptsTwoLabel.isHidden = true
messageTwoNumberLabel.text = "\(number)/1000"
numberIndex = 1
}
} else {
if textView == messageTextField {
promptsLabel.isHidden = false
messageNumberLabel.text = "\(number)/1000"
numberIndex = 0
} else {
promptsTwoLabel.isHidden = false
messageTwoNumberLabel.text = "\(number)/1000"
numberIndex = 1
}
}
if let block = clickBlock {
block(textView.text, numberIndex)
}
}
func textView(_ textView: UITextView, shouldChangeTextIn range: NSRange, replacementText text: String) -> Bool {
let newLength = (textView.text as NSString).length + text.count - range.length
return newLength <= 1000
}
}
//
// YHWorkExperiencePositionItemView.swift
// galaxy
//
// Created by EDY on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkExperiencePositionItemView: UIView {
typealias ItemBlock = (_ model: YHWorkItemListModel) -> ()
var clickBlock: ItemBlock?
var deleteBlock: ItemBlock?
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var explainLabel: UILabel!
var nextStepImageView: UIImageView!
var deleteButton: UIButton!
var centerButton: UIButton!
var showPrompt: Bool = false {
didSet {
if showPrompt {
if dataSource?.vacant_num != 0 {
subTitleLabel.text = "有" + "\(dataSource?.vacant_num ?? 0)" + "项未填写"
subTitleLabel.textColor = UIColor.failColor
} else {
subTitleLabel.textColor = UIColor.labelTextColor2
}
} else {
subTitleLabel.textColor = UIColor.labelTextColor2
}
}
}
var dataSource: YHWorkItemListModel? {
didSet {
updateAllViews()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
backgroundColor = .white
setUpView()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setUpView() {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_B(ofSize: 14)
label.textAlignment = .left
label.numberOfLines = 2
label.textColor = UIColor.mainTextColor
return label
}()
addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalToSuperview()
make.top.equalTo(16)
make.width.equalTo(143)
}
explainLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 14)
label.textAlignment = .right
label.textColor = UIColor.labelTextColor2
return label
}()
addSubview(explainLabel)
explainLabel.snp.makeConstraints { make in
make.right.equalTo(-24)
make.left.equalTo(titleLabel.snp.right)
make.height.equalTo(20)
make.top.equalTo(16)
}
nextStepImageView = {
let imageView = UIImageView()
imageView.image = UIImage(named: "form_right_arrow")
return imageView
}()
addSubview(nextStepImageView)
nextStepImageView.snp.makeConstraints { make in
make.right.equalToSuperview()
make.centerY.equalTo(explainLabel.snp.centerY)
make.height.width.equalTo(20)
}
centerButton = {
let button = UIButton(type: .custom)
button.addTarget(self, action: #selector(centerClick), for: .touchUpInside)
return button
}()
addSubview(centerButton)
centerButton.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview()
make.left.equalTo(112)
}
deleteButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("删除", for: .normal)
button.contentHorizontalAlignment = .right
button.setTitleColor(UIColor.failColor, for: .normal)
button.addTarget(self, action: #selector(deleteClick), for: .touchUpInside)
button.isHidden = true
return button
}()
addSubview(deleteButton)
deleteButton.snp.makeConstraints { make in
make.right.equalToSuperview()
make.height.equalTo(20)
make.width.equalTo(35)
make.centerY.equalTo(titleLabel.snp.centerY)
}
}
func updateAllViews() {
guard let dataSource = dataSource else { return }
titleLabel.text = dataSource.company_name
if dataSource.vacant_num != 0 {
explainLabel.text = "有" + "\(dataSource.vacant_num ?? 0)" + "项未填写"
} else {
explainLabel.text = (dataSource.entry_time ?? "") + " ~ " + (dataSource.departure_time ?? "")
}
if dataSource.company_name?.count == 0 {
titleLabel.text = "工作经验\(tag - 4000 + 1)"
}
}
@objc func centerClick() {
if let block = clickBlock {
block(self.dataSource ?? YHWorkItemListModel())
}
}
@objc func deleteClick() {
if let block = deleteBlock {
block(self.dataSource ?? YHWorkItemListModel())
}
}
func isShowDelete(_ index: Int, isShow: Bool) {
if isShow {
explainLabel.isHidden = true
nextStepImageView.isHidden = true
deleteButton.isHidden = false
} else {
explainLabel.isHidden = false
nextStepImageView.isHidden = false
deleteButton.isHidden = true
}
}
}
//
// YHWorkExperiencePositionListTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkExperiencePositionListTableViewCell: UITableViewCell {
typealias WorkExperienceBlock = (_ model: YHWorkExperienceModel) -> ()
typealias CompanyBlock = (_ model: YHCompanyModelListModel) -> ()
var companyBlock: CompanyBlock?
var workExperienceBlock: WorkExperienceBlock?
var centerView: UIView!
var titleLabel: UILabel!
var mainItemView: UIView!
var country: String = ""
var dataSource: YHSectionWorkExperienceModel?{
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(7)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(20)
make.right.equalTo(-18)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(52)
}
}
func updateAllViews() {
titleLabel.text = dataSource?.title
mainItemView.removeSubviews()
var y = 0
for i in 0 ..< (dataSource?.models?.count ?? 0) {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(y)
make.height.equalTo(1)
make.right.equalTo(-18)
}
y = y + 1
let data = dataSource?.models?[i]
let isShow = data?.isShowPrompts ?? false
let message = data?.message ?? ""
var h = 51
if data?.id == .id13 {
h = 71
}
if isShow && message.count == 0 {
h = h + 20
}
let itemView = YHWorkExperienceItemView()
itemView.dataSource = data
itemView.country = country
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.workExperienceBlock {
block(model)
}
}
itemView.companyBlock = {[weak self] company in
guard let self = self else { return }
if let block = self.companyBlock {
block(company)
}
}
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(y)
make.height.equalTo(h)
make.right.equalTo(-18)
}
y = y + h
}
}
}
//
// YHWorkExperiencePositionReasonTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHWorkExperiencePositionReasonTableViewCell: UITableViewCell {
typealias SelectBlock = (_ selectIndex: [Int]) -> ()
var selectBlock: SelectBlock?
var selectItem: [Int] = []
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var lineView: UIView!
var mainItemView: UIView!
var dataSource: [ASAttributedString]? {
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.bottom.equalToSuperview()
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "证件提供确认"
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(20)
make.right.equalTo(-18)
}
subTitleLabel = {
let label = UILabel()
label.numberOfLines = 0
let str = "*" + "您可以提供以下哪种工作证明文件:"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
}()
centerView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(52)
make.height.equalTo(52)
make.right.equalTo(-18)
}
lineView = {
let label = UIView()
label.backgroundColor = UIColor.separatorColor
return label
}()
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.height.equalTo(1)
make.top.equalTo(52)
make.left.right.equalToSuperview()
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-16)
make.top.equalTo(104)
}
}
func updateAllViews() {
mainItemView.removeSubviews()
for i in 0 ..< (dataSource?.count ?? 0) {
let bgviewButton = {
let view = UIButton()
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 3
view.layer.borderColor = UIColor.brandMainColor.cgColor
view.addTarget(self, action: #selector(agreeClick(sender:)), for: .touchUpInside)
view.tag = 20000 + i
return view
}()
mainItemView.addSubview(bgviewButton)
let agreeButton = {
let button = UIImageView()
button.image = UIImage(named: "login_privacy_disagree_glay")
button.tag = 10000 + i
if selectItem.contains(i) {
button.image = UIImage(named: "login_privacy_agree")
} else {
button.image = UIImage(named: "login_privacy_disagree_glay")
}
button.isUserInteractionEnabled = false
return button
}()
mainItemView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
if i == 0 {
make.top.equalToSuperview().offset(16)
} else {
let view = mainItemView.viewWithTag(1000 + i - 1)
make.top.equalTo(view?.snp.bottom ?? mainItemView.snp.bottom).offset(48)
}
make.left.equalTo(34)
make.height.equalTo(13)
make.width.equalTo(13)
}
let subTitleLabel = {
let label = UILabel()
label.attributed.text = dataSource?[i]
label.numberOfLines = 0
label.tag = 1000 + i
label.isUserInteractionEnabled = false
return label
}()
mainItemView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.top.equalTo(agreeButton.snp.top).offset(-3)
make.left.equalTo(56)
make.right.equalTo(-35)
if i == (dataSource?.count ?? 0) - 1 && !selectItem.contains(6) {
make.bottom.equalToSuperview().offset(-16)
}
}
bgviewButton.snp.makeConstraints { make in
make.top.equalTo(subTitleLabel.snp.top).offset(-16)
make.bottom.equalTo(subTitleLabel.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
}
}
@objc func agreeClick(sender: UIButton) {
sender.isSelected = !sender.isSelected
if sender.isSelected {
sender.layer.borderWidth = 1
sender.backgroundColor = UIColor(hex: 0xebf0f9)
selectItem.append(sender.tag - 20000)
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_agree")
} else {
sender.layer.borderWidth = 0
sender.backgroundColor = UIColor.contentBkgColor
selectItem.removeAll(where: {$0 == sender.tag - 20000})
let view = mainItemView.viewWithTag(sender.tag - 20000 + 10000) as! UIImageView
view.image = UIImage(named: "login_privacy_disagree_glay")
}
if let block = selectBlock {
block(selectItem)
}
}
}
//
// YHWorkExperiencePositionTableViewCell.swift
// galaxy
//
// Created by EDY on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkExperiencePositionTableViewCell: UITableViewCell {
typealias ExperienceListBlock = (_ model: YHWorkItemListModel) -> ()
typealias IsMoreBlock = (_ isMore: Bool) -> ()
typealias NewWorkBlock = () -> ()
var clickBlock: ExperienceListBlock?
var deleteBlock: ExperienceListBlock?
var isMoreBlock: IsMoreBlock?
var newWorkBlock: NewWorkBlock?
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var cannalButton: UIButton!
var moreButton: UIButton!
var mainItemView: UIView!
var bottomView: YHWorkItemAddView!
var showPrompt: Bool = false
var dataSource: [YHWorkItemListModel]?{
didSet {
updateAllViews()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
selectionStyle = .none
setupUI()
}
func setupUI() {
backgroundColor = .clear
centerView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
contentView.addSubview(centerView)
centerView.snp.makeConstraints { make in
make.left.equalTo(16)
make.right.equalTo(-16)
make.top.equalTo(14)
make.bottom.equalTo(-7)
}
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_M(ofSize: 17)
label.text = "职位信息"
label.textColor = UIColor.mainTextColor
return label
}()
centerView.addSubview(titleLabel)
titleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(23)
make.height.equalTo(24)
make.right.equalTo(-20)
}
subTitleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "(从该公司第一个职位开始, 直至最后一个职位)"
label.textColor = UIColor.labelTextColor2
return label
}()
centerView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(50)
make.height.equalTo(20)
make.right.equalTo(-20)
}
cannalButton = {
let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 14)
button.contentHorizontalAlignment = .center
button.setTitle("取消操作", for: .normal)
button.setTitleColor(UIColor.brandMainColor, for: .normal)
button.addTarget(self, action: #selector(cannal), for: .touchUpInside)
button.isHidden = true
return button
}()
centerView.addSubview(cannalButton)
cannalButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(24)
make.height.equalTo(20)
make.width.equalTo(60)
}
moreButton = {
let button = UIButton(type: .custom)
button.setBackgroundImage(UIImage(named: "work_more"), for: .normal)
button.addTarget(self, action: #selector(more), for: .touchUpInside)
return button
}()
centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in
make.right.equalTo(-18)
make.top.equalTo(24)
make.height.equalTo(24)
make.width.equalTo(24)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
return view
}()
centerView.addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-65)
make.top.equalTo(85)
}
bottomView = {
let view = YHWorkItemAddView()
view.addBtn.setTitle("新增工作经验".local, for: .normal)
view.clickBlock = {[weak self] in
guard let self = self else { return }
if let block = self.newWorkBlock {
block()
}
}
return view
}()
centerView.addSubview(bottomView)
bottomView.snp.makeConstraints { make in
make.right.bottom.equalTo(-18)
make.left.equalTo(18)
make.height.equalTo(45)
}
}
func updateAllViews() {
mainItemView.removeSubviews()
guard let dataSource = dataSource else {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalToSuperview()
make.height.equalTo(1)
make.right.equalTo(-18)
}
let itemView = YHWorkItemView()
itemView.dataSource = YHWorkItemListModel()
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(1)
make.height.equalTo(51)
make.right.equalTo(-18)
}
return
}
var total = 0
for i in 0 ..< dataSource.count {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(1)
make.right.equalTo(-18)
}
total = total + 1
let itemView = YHWorkExperiencePositionItemView()
itemView.clickBlock = {[weak self] model in
guard let self = self else { return }
if let block = self.clickBlock {
block(model)
}
}
itemView.deleteBlock = {[weak self] model in
guard let self = self else { return }
if let block = self.deleteBlock {
block(model)
}
}
let model = dataSource[i]
itemView.tag = 4000 + i
itemView.dataSource = dataSource[i]
itemView.showPrompt = showPrompt
var h = 0
if model.company_name == "" {
h = 51
} else {
let text = model.company_name // 要显示的文本内容
let font = UIFont.PFSC_B(ofSize: 14) // 字体大小
let maxWidth = 143.0 // 最大宽度限制
// 创建NSAttributedString对象并设置属性
let attributes = [NSAttributedString.Key.font : font] as [NSAttributedString.Key : Any]
_ = NSMutableAttributedString(string: text ?? "", attributes: attributes)
// 根据指定的最大宽度和字体大小计算文本的高度
let size = (text! as NSString).boundingRect(with: CGSize(width: maxWidth, height: .greatestFiniteMagnitude), options: .usesLineFragmentOrigin, attributes: attributes, context: nil).size
if size.height > 20 {
h = 95
} else {
h = 75
}
}
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(h)
make.right.equalTo(-18)
}
total = total + h
}
}
@objc func cannal() {
moreButton.isHidden = false
cannalButton.isHidden = true
for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHWorkItemView
view.isShowDelete(i, isShow: false)
}
if let block = isMoreBlock {
block(false)
}
}
@objc func more() {
moreButton.isHidden = true
cannalButton.isHidden = false
for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHWorkItemView
view.isShowDelete(i, isShow: true)
}
if let block = isMoreBlock {
block(true)
}
}
}
//
// YHWorkExperienceSelectView.swift
// galaxy
//
// Created by EDY on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import AttributedString
class YHWorkExperienceSelectView: UIView {
typealias SelectBlock = (_ selectIndex: [Int]) -> ()
var selectBlock: SelectBlock?
var selectItem: [Int] = []
var lineView: UIView!
var subTitleLabel: UILabel!
var mainItemView: UIView!
var dataSource: [ASAttributedString]? {
didSet {
updateAllViews()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
func setupUI() {
backgroundColor = .clear
lineView = {
let view = UIView()
view.backgroundColor = .separatorColor
return view
}()
addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(0)
make.height.equalTo(1)
make.right.equalTo(-18)
}
subTitleLabel = {
let label = UILabel()
label.numberOfLines = 0
let str = "*" + "您可以提供以下哪种工作证明文件:"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
}()
addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(0)
make.height.equalTo(52)
make.right.equalTo(-18)
}
mainItemView = {
let view = UIView()
view.backgroundColor = .white
return view
}()
addSubview(mainItemView)
mainItemView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview()
make.top.equalTo(52)
}
}
func updateAllViews() {
for i in 0 ..< (dataSource?.count ?? 0) {
let bgviewButton = {
let view = UIButton()
view.backgroundColor = UIColor.contentBkgColor
view.layer.cornerRadius = 3
view.layer.borderColor = UIColor.brandMainColor.cgColor
view.addTarget(self, action: #selector(agreeClick(sender:)), for: .touchUpInside)
view.tag = 20000 + i
if selectItem.contains(i) {
view.layer.borderWidth = 1
view.backgroundColor = UIColor(hex: 0xebf0f9)
} else {
view.layer.borderWidth = 0
view.backgroundColor = UIColor.contentBkgColor
}
return view
}()
mainItemView.addSubview(bgviewButton)
let agreeButton = {
let button = UIImageView()
button.image = UIImage(named: "login_privacy_disagree_glay")
button.tag = 10000 + i
if selectItem.contains(i) {
button.image = UIImage(named: "login_privacy_agree")
} else {
button.image = UIImage(named: "login_privacy_disagree_glay")
}
button.isUserInteractionEnabled = false
return button
}()
mainItemView.addSubview(agreeButton)
agreeButton.snp.makeConstraints { make in
if i == 0 {
make.top.equalToSuperview().offset(16)
} else {
let view = mainItemView.viewWithTag(1000 + i - 1)
make.top.equalTo(view?.snp.bottom ?? mainItemView.snp.bottom).offset(48)
}
make.left.equalTo(34)
make.height.equalTo(13)
make.width.equalTo(13)
}
let subTitleLabel = {
let label = UILabel()
label.attributed.text = dataSource?[i]
label.numberOfLines = 0
label.tag = 1000 + i
label.isUserInteractionEnabled = false
return label
}()
mainItemView.addSubview(subTitleLabel)
subTitleLabel.snp.makeConstraints { make in
make.top.equalTo(agreeButton.snp.top).offset(-3)
make.left.equalTo(56)
make.right.equalTo(-35)
}
bgviewButton.snp.makeConstraints { make in
make.top.equalTo(subTitleLabel.snp.top).offset(-16)
make.bottom.equalTo(subTitleLabel.snp.bottom).offset(16)
make.left.equalTo(18)
make.right.equalTo(-18)
}
}
}
@objc func agreeClick(sender: UIButton) {
selectItem.removeAll()
selectItem.append(sender.tag - 20000)
sender.isSelected = !sender.isSelected
for i in 0..<(dataSource?.count ?? 0) {
if i == sender.tag - 20000 {
let view = mainItemView.viewWithTag(i + 20000)
view?.layer.borderWidth = 1
view?.backgroundColor = UIColor(hex: 0xebf0f9)
let subview = mainItemView.viewWithTag(i + 10000) as! UIImageView
subview.image = UIImage(named: "login_privacy_agree")
} else {
let view = mainItemView.viewWithTag(i + 20000)
view?.layer.borderWidth = 0
view?.backgroundColor = UIColor.contentBkgColor
let subview = mainItemView.viewWithTag(i + 10000) as! UIImageView
subview.image = UIImage(named: "login_privacy_disagree_glay")
}
}
if let block = selectBlock {
block(selectItem)
}
}
}
......@@ -7,21 +7,25 @@
//
import UIKit
import AttributedString
class YHWorkExperienceTableViewCell: UITableViewCell {
typealias WorkExperienceBlock = (_ model: YHWorkExperienceModel) -> ()
typealias CompanyBlock = (_ model: YHCompanyModelListModel) -> ()
typealias SelectBlock = (_ selectIndex: [Int]) -> ()
var companyBlock: CompanyBlock?
var workExperienceBlock: WorkExperienceBlock?
var selectBlock: SelectBlock?
var centerView: UIView!
var titleLabel: UILabel!
var mainItemView: UIView!
var country: String = ""
var selectItem: Int = 5
var dataSource: YHSectionWorkExperienceModel?{
didSet {
updateAllViews()
}
}
var selectDataSource: [ASAttributedString]?
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
......@@ -104,12 +108,11 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
let data = dataSource?.models?[i]
let isShow = data?.isShowPrompts ?? false
let message = data?.message ?? ""
if data?.id == .id3 || data?.id == .id4 || data?.id == .id18 {
var h = 131
var h = 51
if isShow && message.count == 0 {
h = h + 20
}
let itemView = YHWorkExperienceTextItemView()
let itemView = YHWorkExperienceItemView()
itemView.dataSource = data
itemView.block = {[weak self] model in
guard let self = self else { return }
......@@ -125,37 +128,18 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
make.right.equalTo(-18)
}
y = y + h
} else {
var h = 51
if data?.id == .id13 {
h = 71
}
if isShow && message.count == 0 {
h = h + 20
}
let itemView = YHWorkExperienceItemView()
itemView.dataSource = data
itemView.country = country
itemView.block = {[weak self] model in
if i == 1 {
let view = YHWorkExperienceSelectView(frame: CGRect(x: 0, y: y, width: Int(KScreenWidth) - 32, height: 386))
view.selectItem = [selectItem]
view.dataSource = selectDataSource
view.selectBlock = { [weak self] index in
guard let self = self else { return }
if let block = self.workExperienceBlock {
block(model)
if let block = self.selectBlock {
block(index)
}
}
itemView.companyBlock = {[weak self] company in
guard let self = self else { return }
if let block = self.companyBlock {
block(company)
}
}
mainItemView.addSubview(itemView)
itemView.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(y)
make.height.equalTo(h)
make.right.equalTo(-18)
}
y = y + h
mainItemView.addSubview(view)
y = y + 386
}
}
}
......
//
// YHWorkExperiencePositionViewModel.swift
// galaxy
//
// Created by EDY on 2024/11/15.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHWorkExperiencePositionViewModel: YHBaseViewModel {
var mainModel: YHWorkExperienceDetailModel = YHWorkExperienceDetailModel()
override init() {
super.init()
}
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] {
let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "职位名称", isUserKeyBoard: true, prompts: "请输入", message: mainModel.company_name, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "职责性质", isUserKeyBoard: true, prompts: "请输入", message: mainModel.industry, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item2 = YHWorkExperienceModel(id: .id3, isNeed: false, title: "开始就职年月", isUserKeyBoard: false, prompts: "请选择", message: mainModel.company_introduce, type: .time)
let item3 = YHWorkExperienceModel(id: .id4, isNeed: false, title: "结束就职年月", isUserKeyBoard: true, prompts: "请选择", message: mainModel.company_website, type: .time)
let item6 = YHWorkExperienceModel(id: .id5, isNeed: true, title: "经验领域", isUserKeyBoard: false, prompts: "请选择", message: mainModel.location.country, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item11 = YHWorkExperienceModel(id: .id13, isNeed: true, title: "相关工作经验是否属于国际工作经验", isUserKeyBoard: false, prompts: "", message: "\(mainModel.international_work_experience)", leftButtonString: "是", rightButtonString: "否")
let item4 = YHWorkExperienceModel(id: .id5, isNeed: true, title: "工作国家/地区", isUserKeyBoard: false, prompts: "请选择", message: mainModel.location.country, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请选择工作国家/地区")
var string = ""
let array = mainModel.location.area
for item in array {
if string.count != 0 {
string = string + "/" + item
} else {
string = string + item
}
}
let item5 = YHWorkExperienceModel(id: .id6, isNeed: true, title: "工作城市", isUserKeyBoard: false, prompts: "请选择", message: string, type: .address, isShowPrompts: isShowPrompt, alertMessage:"请选择工作国家/地区")
let item55 = YHWorkExperienceModel(id: .id7, isNeed: true, title: "工作城市", isUserKeyBoard: true, prompts: "请输入", message: mainModel.location.foreign, isShowPrompts: isShowPrompt, alertMessage:"请输入工作国家/地区")
let addressCountry = mainModel.location.country
var section = YHSectionWorkExperienceModel()
if addressCountry.contains("中国") {
section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2, item3, item6, item11, item4, item5])
} else {
section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2, item3, item6, item11, item4, item55])
}
return [section]
}
func updateModel(_ item: YHWorkExperienceModel) {
guard let type = item.id else { return }
switch type {
case .id1: // 用人单位
mainModel.company_name = item.message ?? ""
case .id2: // 用人单位性质
mainModel.industry = item.message ?? ""
case .id3: // 用人单位介绍
mainModel.company_introduce = item.message ?? ""
case .id4: // 用人单位官网
mainModel.company_website = item.message ?? ""
case .id5: // 工作地区国家
mainModel.location.country = item.message ?? ""
case .id6: // 工作城市 国内
mainModel.location.area = item.value ?? []
case .id7: // 工作城市国外
mainModel.location.foreign = item.message ?? ""
case .id8: // 职位
mainModel.position = item.message ?? ""
case .id9: // 入职年月
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? "") {
let selectTimeInterval = selectDate.timeIntervalSince1970
let currentTimeInterval = Date().timeIntervalSince1970
if selectTimeInterval > currentTimeInterval {
YHHUD.flash(message: "入职日期不能晚于当前日期")
} else {
guard let endDate = format.date(from: mainModel.departure_time) else {
mainModel.entry_time = item.message ?? ""
return
}
let endTimeInterval = endDate.timeIntervalSince1970
if selectTimeInterval > endTimeInterval {
YHHUD.flash(message: "入职日期不能晚于离职日期")
} else {
mainModel.entry_time = item.message ?? ""
}
}
}
case .id10: // 离职年月
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? ""), let startDate = format.date(from:mainModel.entry_time) {
let selectTimeInterval = selectDate.timeIntervalSince1970
let startTimeInterval = startDate.timeIntervalSince1970
if selectTimeInterval < startTimeInterval {
YHHUD.flash(message: "离职日期不能早于入职日期")
} else {
mainModel.departure_time = item.message ?? ""
}
} else {
mainModel.departure_time = item.message ?? ""
}
case .id11: // 工作证明文件
mainModel.work_certificate = item.message ?? ""
case .id12: // 职责性质
mainModel.duty = item.message ?? ""
case .id13: // 是否国际工作经验
mainModel.international_work_experience = Int(item.value?.first ?? "0") ?? 0
case .id14: // 企业人数规模
mainModel.company_member_total = Int(item.message ?? "0") ?? 0
case .id15: // 行政架构层级
mainModel.administrative_level = Int(item.value?.first ?? "0") ?? 0
case .id16: // 下属管理人数
mainModel.company_manage_total = Int(item.message ?? "0") ?? 0
case .id17: // 公司营业额/港元
mainModel.turnover = Int(item.message ?? "0") ?? 0
case .id18: // 公司性质/范畴/所属行业
mainModel.business_nature = item.message ?? ""
case .id19: // 职位水平类型
mainModel.professional_level = Int(item.value?.first ?? "0") ?? 0
case .id20: // 高管证明文件
mainModel.executives_certificate = item.message ?? ""
case .id21: // 高管在职开始时间
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? "") {
let selectTimeInterval = selectDate.timeIntervalSince1970
let currentTimeInterval = Date().timeIntervalSince1970
if selectTimeInterval > currentTimeInterval {
YHHUD.flash(message: "高管在职开始时间不能晚于当前日期")
} else {
guard let endDate = format.date(from: mainModel.top_manager_end_at) else {
mainModel.top_manager_start_at = item.message ?? ""
return
}
let endTimeInterval = endDate.timeIntervalSince1970
if selectTimeInterval > endTimeInterval {
YHHUD.flash(message: "高管在职开始时间不能晚于离职日期")
} else {
mainModel.top_manager_start_at = item.message ?? ""
}
}
}
case .id22: // 高管在职结束时间
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? ""), let startDate = format.date(from:mainModel.top_manager_start_at) {
let selectTimeInterval = selectDate.timeIntervalSince1970
let startTimeInterval = startDate.timeIntervalSince1970
if selectTimeInterval < startTimeInterval {
YHHUD.flash(message: "高管在职结束时间不能早于开始日期")
} else {
mainModel.top_manager_end_at = item.message ?? ""
}
} else {
mainModel.top_manager_end_at = item.message ?? ""
}
}
}
func isCanNext(_ step: Int) -> Bool {
if step == 0 {
let companyName = mainModel.company_name //公司名称
let industry = mainModel.industry //用人单位性质
let country = mainModel.location.country //工作国家
let area = mainModel.location.area //工作城市
let foreign = mainModel.location.foreign //工作城市 国外
let entryTime = mainModel.entry_time //入职年月
let departureTime = mainModel.departure_time //离职年月
let workCertificate = mainModel.work_certificate //工作证明文件
let duty = mainModel.duty //职责性质
let companyMemberTotal = mainModel.company_member_total //企业人数规模
let companyManageTotal = mainModel.company_manage_total //下属管理人数
let professionalLevel = mainModel.professional_level //职位水平类别
let executivesCertificate = mainModel.executives_certificate //高管证明文件
let topManagerStartAt = mainModel.top_manager_start_at //高管在职开始时间
let topManagerEndAt = mainModel.top_manager_end_at //高管在职开始时间
guard companyName.count > 0 else { return false }
guard industry.count > 0 else { return false }
guard country.count > 0 else { return false }
guard entryTime.count > 0 else { return false }
guard workCertificate.count > 0 else { return false }
guard duty.count > 0 else { return false }
guard companyMemberTotal >= 0 else { return false }
guard companyManageTotal >= 0 else { return false }
guard professionalLevel > 0 else { return false }
if country.contains("中国") {
guard area.count > 0 else { return false }
} else {
guard foreign.count > 0 else { return false }
}
if professionalLevel == 1 {
guard executivesCertificate.count > 0 else { return false }
guard topManagerStartAt.count > 0 else { return false }
guard topManagerEndAt.count > 0 else { return false }
}
return true
} else if step == 1 {
let message = mainModel.wduty
guard message.count > 0 else { return false }
return true
} else if step == 2 {
let message = mainModel.highlights
guard message.count > 0 else { return false }
return true
} else if step == 3 {
return true
} else {
return true
}
}
}
......@@ -19,53 +19,12 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
}
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] {
let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "用人单位", isUserKeyBoard: false, prompts: "请输入", message: mainModel.company_name , type: .unit, isShowPrompts: isShowPrompt, alertMessage:"请输入用人单位")
let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "用人单位性质", isUserKeyBoard: false, prompts: "请输入", message: mainModel.industry, type: .nature, isShowPrompts: isShowPrompt, alertMessage:"请选择用人单位性质")
let item2 = YHWorkExperienceModel(id: .id3, isNeed: false, title: "用人单位介绍", isUserKeyBoard: true, prompts: "如方便提供,请填写", message: mainModel.company_introduce)
let item3 = YHWorkExperienceModel(id: .id4, isNeed: false, title: "用人单位官网", isUserKeyBoard: true, prompts: "如有,请输入官网链接", message: mainModel.company_website)
let item4 = YHWorkExperienceModel(id: .id5, isNeed: true, title: "工作国家/地区", isUserKeyBoard: false, prompts: "请选择", message: mainModel.location.country, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请选择工作国家/地区")
var string = ""
let array = mainModel.location.area
for item in array {
if string.count != 0 {
string = string + "/" + item
} else {
string = string + item
}
}
let item5 = YHWorkExperienceModel(id: .id6, isNeed: true, title: "工作城市", isUserKeyBoard: false, prompts: "请选择", message: string, type: .address, isShowPrompts: isShowPrompt, alertMessage:"请选择工作国家/地区")
let item55 = YHWorkExperienceModel(id: .id7, isNeed: true, title: "工作城市", isUserKeyBoard: true, prompts: "请输入", message: mainModel.location.foreign, isShowPrompts: isShowPrompt, alertMessage:"请输入工作国家/地区")
let item6 = YHWorkExperienceModel(id: .id8, isNeed: true, title: "职位", isUserKeyBoard: true, prompts: "请输入", message: mainModel.position, isShowPrompts: isShowPrompt, alertMessage:"请输入职位")
let item7 = YHWorkExperienceModel(id: .id9, isNeed: true, title: "入职年月", isUserKeyBoard: false, prompts: "请选择", message: mainModel.entry_time, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择入职年月")
let item8 = YHWorkExperienceModel(id: .id10, isNeed: true, title: "离职年月", isUserKeyBoard: false, prompts: "请选择", message: mainModel.departure_time, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择离职年月")
let item9 = YHWorkExperienceModel(id: .id11, isNeed: true, title: "工作证明文件", isUserKeyBoard: false, prompts: "请选择", message: mainModel.work_certificate, type: .certificate, isShowPrompts: isShowPrompt, alertMessage:"请选择工作证明文件")
let item10 = YHWorkExperienceModel(id: .id12, isNeed: true, title: "职责性质", isUserKeyBoard: true, prompts: "请选择", message: mainModel.duty, isShowPrompts: isShowPrompt, alertMessage:"请输入职责性质")
let item11 = YHWorkExperienceModel(id: .id13, isNeed: false, title: "相关工作经验是否属于国际工作经验", isUserKeyBoard: false, prompts: "", message: "\(mainModel.international_work_experience)", leftButtonString: "是", rightButtonString: "否")
let addressCountry = mainModel.location.country
let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "用人单位", isUserKeyBoard: true, prompts: "请输入", message: mainModel.company_name, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "公司基本情况", isUserKeyBoard: false, prompts: "请选择", message: mainModel.industry, type: .company, isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item2 = YHWorkExperienceModel(id: .id3, isNeed: true, title: "职位水平类别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.professional_level)", type: .level, isShowPrompts: isShowPrompt, alertMessage:"请选择")
var section = YHSectionWorkExperienceModel()
if addressCountry.contains("中国") {
section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2, item3, item4, item5, item6, item7, item8, item9, item10, item11])
} else {
section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2, item3, item4, item55, item6, item7, item8, item9, item10, item11])
}
let item12 = YHWorkExperienceModel(id: .id14, isNeed: true, title: "企业人数规模", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_member_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入企业人数规模")
let item13 = YHWorkExperienceModel(id: .id15, isNeed: false, title: "行政架构层级", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.administrative_level)", type: .structure)
let item14 = YHWorkExperienceModel(id: .id16, isNeed: true, title: "下属管理人数", isUserKeyBoard: true, prompts: "请输入", message: "\(mainModel.company_manage_total)", isShowPrompts: isShowPrompt, alertMessage:"请输入下属管理人数")
let item15 = YHWorkExperienceModel(id: .id17, isNeed: false, title: "公司营业额/港元 (近一年)", isUserKeyBoard: true, prompts: "请输入具体数字", message: "\(mainModel.turnover)")
let item16 = YHWorkExperienceModel(id: .id18, isNeed: false, title: "公司业务性质/范畴/所属行业", isUserKeyBoard: true, prompts: "请输入,100字内", message: mainModel.business_nature)
let item17 = YHWorkExperienceModel(id: .id19, isNeed: true, title: "职位水平类别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.professional_level)", type: .level, isShowPrompts: isShowPrompt, alertMessage:"请选择职位水平类别")
let item18 = YHWorkExperienceModel(id: .id20, isNeed: true, title: "高管证明文件", isUserKeyBoard: false, prompts: "请选择", message: mainModel.executives_certificate, type: .prove, isShowPrompts: isShowPrompt, alertMessage:"请选择高管证明文件")
let item19 = YHWorkExperienceModel(id: .id21, isNeed: true, title: "高管在职开始时间", isUserKeyBoard: false, prompts: "请选择", message: mainModel.top_manager_start_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择高管在职开始时间")
let item20 = YHWorkExperienceModel(id: .id22, isNeed: true, title: "高管在职结束时间", isUserKeyBoard: false, prompts: "请选择", message: mainModel.top_manager_end_at, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择高管在职结束时间")
var section1 = YHSectionWorkExperienceModel()
if mainModel.professional_level == 1 {
section1 = YHSectionWorkExperienceModel(title: "企业规模", models: [item12, item13, item14, item15, item16, item17, item18, item19, item20])
} else {
section1 = YHSectionWorkExperienceModel(title: "企业规模", models: [item12, item13, item14, item15, item16, item17])
}
return [section, section1]
section = YHSectionWorkExperienceModel(title: "企业信息", models: [item, item1, item2])
return [section]
}
func updateModel(_ item: YHWorkExperienceModel) {
......@@ -76,115 +35,10 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
mainModel.company_name = item.message ?? ""
case .id2: // 用人单位性质
mainModel.industry = item.message ?? ""
case .id3: // 用人单位介绍
mainModel.company_introduce = item.message ?? ""
case .id4: // 用人单位官网
mainModel.company_website = item.message ?? ""
case .id5: // 工作地区国家
mainModel.location.country = item.message ?? ""
case .id6: // 工作城市 国内
mainModel.location.area = item.value ?? []
case .id7: // 工作城市国外
mainModel.location.foreign = item.message ?? ""
case .id8: // 职位
mainModel.position = item.message ?? ""
case .id9: // 入职年月
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? "") {
let selectTimeInterval = selectDate.timeIntervalSince1970
let currentTimeInterval = Date().timeIntervalSince1970
if selectTimeInterval > currentTimeInterval {
YHHUD.flash(message: "入职日期不能晚于当前日期")
} else {
guard let endDate = format.date(from: mainModel.departure_time) else {
mainModel.entry_time = item.message ?? ""
return
}
let endTimeInterval = endDate.timeIntervalSince1970
if selectTimeInterval > endTimeInterval {
YHHUD.flash(message: "入职日期不能晚于离职日期")
} else {
mainModel.entry_time = item.message ?? ""
}
}
}
case .id10: // 离职年月
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? ""), let startDate = format.date(from:mainModel.entry_time) {
let selectTimeInterval = selectDate.timeIntervalSince1970
let startTimeInterval = startDate.timeIntervalSince1970
if selectTimeInterval < startTimeInterval {
YHHUD.flash(message: "离职日期不能早于入职日期")
} else {
mainModel.departure_time = item.message ?? ""
}
} else {
mainModel.departure_time = item.message ?? ""
}
case .id11: // 工作证明文件
mainModel.work_certificate = item.message ?? ""
case .id12: // 职责性质
mainModel.duty = item.message ?? ""
case .id13: // 是否国际工作经验
mainModel.international_work_experience = Int(item.value?.first ?? "0") ?? 0
case .id14: // 企业人数规模
mainModel.company_member_total = Int(item.message ?? "0") ?? 0
case .id15: // 行政架构层级
mainModel.administrative_level = Int(item.value?.first ?? "0") ?? 0
case .id16: // 下属管理人数
mainModel.company_manage_total = Int(item.message ?? "0") ?? 0
case .id17: // 公司营业额/港元
mainModel.turnover = Int(item.message ?? "0") ?? 0
case .id18: // 公司性质/范畴/所属行业
mainModel.business_nature = item.message ?? ""
case .id19: // 职位水平类型
case .id3: // 职位水平类型
mainModel.professional_level = Int(item.value?.first ?? "0") ?? 0
case .id20: // 高管证明文件
mainModel.executives_certificate = item.message ?? ""
case .id21: // 高管在职开始时间
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? "") {
let selectTimeInterval = selectDate.timeIntervalSince1970
let currentTimeInterval = Date().timeIntervalSince1970
if selectTimeInterval > currentTimeInterval {
YHHUD.flash(message: "高管在职开始时间不能晚于当前日期")
} else {
guard let endDate = format.date(from: mainModel.top_manager_end_at) else {
mainModel.top_manager_start_at = item.message ?? ""
return
}
let endTimeInterval = endDate.timeIntervalSince1970
if selectTimeInterval > endTimeInterval {
YHHUD.flash(message: "高管在职开始时间不能晚于离职日期")
} else {
mainModel.top_manager_start_at = item.message ?? ""
}
}
default : break
}
case .id22: // 高管在职结束时间
let format = DateFormatter()
format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? ""), let startDate = format.date(from:mainModel.top_manager_start_at) {
let selectTimeInterval = selectDate.timeIntervalSince1970
let startTimeInterval = startDate.timeIntervalSince1970
if selectTimeInterval < startTimeInterval {
YHHUD.flash(message: "高管在职结束时间不能早于开始日期")
} else {
mainModel.top_manager_end_at = item.message ?? ""
}
} else {
mainModel.top_manager_end_at = item.message ?? ""
}
}
}
func updateModel(_ item: YHCompanyModelListModel) {
mainModel.company_name = item.company_name ?? ""
mainModel.company_introduce = item.company_introduce ?? ""
mainModel.company_website = item.company_link ?? ""
}
func updateWduty(_ value: String) {
......@@ -221,10 +75,10 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
}
}
func requestWorkDetail(_ workId: String, callBackBlock:@escaping (_ success: Bool?, _ error:YHErrorModel?)->()) {
func requestWorkDetail(_ orderId: String, _ workId: String, callBackBlock:@escaping (_ success: Bool?, _ error:YHErrorModel?)->()) {
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.detail + "?id=\(workId)"
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.detail
let param: [String: Any] = ["id": workId]
let param: [String: Any] = ["work_id": workId, "order_id": orderId]
let _ = YHNetRequest.getRequest(url: strUrl,params: param) { [weak self] json, code in
//1. json字符串 转 对象
......@@ -283,7 +137,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
"executives_certificate": mainModel.executives_certificate,
"file": file,
"highlights": mainModel.highlights,
"id": mainModel.id,
// "id": mainModel.id,
"order_id": orderID,
"industry": mainModel.industry,
"international_work_experience": mainModel.international_work_experience,
......@@ -323,7 +177,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
callBackBlock(false,nil)
return
}
self.mainModel.id = result.id
// self.mainModel.id = result.id
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
......
//
// YHWorkIntroductionViewModel.swift
// galaxy
//
// Created by EDY on 2024/2/21.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
import Alamofire
class YHWorkIntroductionViewModel: YHBaseViewModel {
var introducetionExampleModels: [YHWorkExampleModel]?
override init() {
super.init()
}
func requestIntroducetionExample(callBackBlock:@escaping (_ success: Bool?, _ error:YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.projectExample
let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [Any], let result = [YHWorkExampleModel].deserialize(from: dic) else {
callBackBlock(false,nil)
return
}
self.introducetionExampleModels = result as? [YHWorkExampleModel]
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
// 0保存 1下一步
func saveWorkProjectDetail(_ workModel: YHWorkExperienceDetailModel, projectModel: YHWorkExperienceProjectModel, callBackBlock:@escaping (_ success: Bool, _ error:YHErrorModel?)->()) {
let params: [String : Any] = ["id": projectModel.id ?? 0,
"order_id": workModel.order_id,
"work_id": workModel.id,
"project_name": projectModel.project_name ?? "",
"project_start_time": projectModel.project_start_time ?? "",
"project_end_time": projectModel.project_end_time ?? "",
"project_highlights": projectModel.project_highlights ?? 0,
"create_from_appid": projectModel.create_from_appid ?? 2,
"update_from_appid": projectModel.create_from_appid ?? 2
]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.saveProject
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
guard let self = self else { return }
if json.code == 200 {
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
func requestFileMessage(_ url: String, callBackBlock:@escaping (_ success: Bool, _ model: YHFileContent?,_ error:YHErrorModel?)->()) {
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.ocrFileContent + "?file_url=\(url)"
let strUrl = YHBaseUrlManager.shared.curOssURL() + YHAllApiName.OCR.normal
let param: [String: Any] = ["url": url]
let _ = YHNetRequest.postRequest(url: strUrl,params:param) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let result = YHFileContent.deserialize(from: dic) else {
callBackBlock(false, nil, nil)
return
}
callBackBlock(true, result, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, nil,error)
}
} failBlock: { err in
callBackBlock(false, nil, err)
}
}
}
......@@ -9,8 +9,8 @@
import UIKit
class YHWorkItemListViewModel: YHBaseViewModel {
var mainModel: [YHWorkItemListModel]?
var mainModel: YHWorkModel = YHWorkModel()
var listModel: [YHWorkItemListModel]?
override init() {
super.init()
......@@ -29,8 +29,9 @@ class YHWorkItemListViewModel: YHBaseViewModel {
callBackBlock([],nil)
return
}
self.mainModel = result.list
callBackBlock(self.mainModel, nil)
self.mainModel = result
self.listModel = result.list
callBackBlock(self.listModel, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock([], error)
......@@ -73,4 +74,23 @@ class YHWorkItemListViewModel: YHBaseViewModel {
callBackBlock(false, err)
}
}
func requestWorkTimeRemarkWorkExperience(_ orderId: String, callBackBlock:@escaping (_ success: Bool?, _ error:YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderId,
"work_time_overlap_remark": self.mainModel.work_time_overlap_remark,
"work_time_empty_remark": self.mainModel.work_time_empty_remark]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.saveWorkTimeRemark
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
callBackBlock(true, nil)
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock(false, error)
}
} failBlock: { err in
callBackBlock(false, err)
}
}
}
......@@ -474,7 +474,7 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
}
} else if msg.redirectPage == YHRedirectPage.myPlan.rawValue { // 我的方案
let vc = YHMineSchemeViewController()
let vc = YHMyNewSchemeViewController()
navigationController?.pushViewController(vc)
} else if msg.redirectPage == YHRedirectPage.myDocument.rawValue { // 我的文书
......
......@@ -349,6 +349,13 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
return
}
if true {
let vc = YHMyNewSchemeViewController()
// let vc = YHImproveSchemeViewController()
self.navigationController?.pushViewController(vc)
return
}
let item: PersonalModuleItem = items[indexPath.row]
switch item.type {
case .myCard://我的名片
......
......@@ -300,6 +300,10 @@ extension YhConstant {
// 跳转到首页生活tab
public static let didJumpToHomePageLifeTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.life")
// 跳转到首页身份tab
public static let didJumpToHomePageIdentityTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.identity")
// 跳转到首页生活tab - 教育
public static let didJumpToHomePageLifeEduTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.life.edu")
......
......@@ -225,12 +225,13 @@ class YHAllApiName {
struct WorkExperience {
//工作经验列表
static let list = "infoflow/work/list"
static let list = "infoflow/work/v1/list"
//工作经验详情
static let detail = "infoflow/work/detail"
static let detail = "infoflow/work/v1/workDetail"
//工作经验保存
static let save = "infoflow/work/save"
static let saveAll = "infoflow/work/save-all"
static let saveWorkTimeRemark = "infoflow/work/v1/saveWorkTimeRemark"
//公司列表
static let company = "infoflow/company/search"
//工作经历删除
......@@ -376,6 +377,10 @@ class YHAllApiName {
struct Assessment {
//方案计划
static let applyPlanApi = "infoflow/assessment/apply_plan"
static let applyPlanNewApi = "infoflow/assessment/apply_plan"
static let submitTargetsApi = "infoflow/assessment/save_apply_plan_target"
static let modifyInfoApi = "infoflow/assessment/save_apply_plan_target"
static let improveDetailApi = "infoflow/assessment/improve_plan_detail"
}
// 消息
......@@ -627,4 +632,15 @@ class YHAllApiName {
static let result = "super-app/renewal/renewal-result"
}
struct IncomeRecord {
// 收入信息
static let incomeList = "infoflow/order/income/get-income-work-company-list"
// 公司收入详情
static let incomeDetail = "infoflow/order/income/detail"
// 收入信息编辑
static let updateDetail = "infoflow/order/income/update-detail"
// 收入情况保存和提交
static let incomeUpdate = "infoflow/order/income/update"
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "头部-1 1.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "头部.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 7416.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 7416-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame 2033196296.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame 2033196296-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "提升方案-头图@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "提升方案-头图@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "穗麦-左@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "穗麦-左@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "穗麦-右@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "穗麦-右@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "yinhe-1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "yinhe-1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Vector 513@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Vector 513@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Vector 512@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Vector 512@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "角标.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "角标-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 346241964.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 346241964-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33333992.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33333992-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "image 470@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "image 470@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "image 469@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "image 469@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33333990.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33333990-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2956.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2956-1.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "香港身份计划banner@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "香港身份计划banner@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_income_item_add@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_income_item_add@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "income_type_check_btn_0@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "income_type_check_btn_0@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "income_type_check_btn_1@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "income_type_check_btn_1@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "income_type_close@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "income_type_close@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "gc_red_dot@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "gc_red_dot@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment