Commit 78c360da authored by pete谢兆麟's avatar pete谢兆麟

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

parents a3ee8c01 bb7dc287
...@@ -114,6 +114,8 @@ ...@@ -114,6 +114,8 @@
042B20D62CEB239400655093 /* YHIHKIdentityPlanCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D52CEB239400655093 /* YHIHKIdentityPlanCell.swift */; }; 042B20D62CEB239400655093 /* YHIHKIdentityPlanCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D52CEB239400655093 /* YHIHKIdentityPlanCell.swift */; };
042B20D82CEB325900655093 /* YHImproveSchemeTemplateListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D72CEB325900655093 /* YHImproveSchemeTemplateListView.swift */; }; 042B20D82CEB325900655093 /* YHImproveSchemeTemplateListView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D72CEB325900655093 /* YHImproveSchemeTemplateListView.swift */; };
042B20DA2CEB337100655093 /* YHImproveSchemeTemplateListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 042B20D92CEB337100655093 /* YHImproveSchemeTemplateListCell.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 */; }; 0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E63A2C6DA106000511E2 /* CGFloat+Extention.swift */; };
0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */; }; 0430E6422C72E120000511E2 /* YHAddAdoptersViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6412C72E120000511E2 /* YHAddAdoptersViewController.swift */; };
0430E6442C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */; }; 0430E6442C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */; };
...@@ -634,6 +636,11 @@ ...@@ -634,6 +636,11 @@
04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */; }; 04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */; };
04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */; }; 04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401EB2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift */; };
04B401EE2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.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 */; }; 04B4B8D52C89CE5E00ED82BC /* YHButlerServiceMessage.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D42C89CE5E00ED82BC /* YHButlerServiceMessage.swift */; };
04B4B8D72C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */; }; 04B4B8D72C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8D62C8AE77C00ED82BC /* YHButlerServiceMessageHandler.swift */; };
04B4B8DC2C90696E00ED82BC /* YHResignDocumentManagementVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */; }; 04B4B8DC2C90696E00ED82BC /* YHResignDocumentManagementVC.swift in Sources */ = {isa = PBXBuildFile; fileRef = 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */; };
...@@ -797,6 +804,8 @@ ...@@ -797,6 +804,8 @@
A51D14EB2C75E98500E2820C /* UINavigationController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51D14EA2C75E98500E2820C /* UINavigationController+Extension.swift */; }; A51D14EB2C75E98500E2820C /* UINavigationController+Extension.swift in Sources */ = {isa = PBXBuildFile; fileRef = A51D14EA2C75E98500E2820C /* UINavigationController+Extension.swift */; };
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; }; A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A537126F2C64EA0800FF1844 /* officalsuccess.gif in Resources */ = {isa = PBXBuildFile; fileRef = A537126E2C64EA0800FF1844 /* officalsuccess.gif */; }; A537126F2C64EA0800FF1844 /* officalsuccess.gif in Resources */ = {isa = PBXBuildFile; fileRef = A537126E2C64EA0800FF1844 /* officalsuccess.gif */; };
A53A35092CE87D2A002FE6A3 /* YHOtherLanguageSelecteView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53A35082CE87D2A002FE6A3 /* YHOtherLanguageSelecteView.swift */; };
A53A350B2CE88B86002FE6A3 /* YHSingleOptionalItemsView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53A350A2CE88B86002FE6A3 /* YHSingleOptionalItemsView.swift */; };
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; }; A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; }; A53B61192BB3C9960010B573 /* YHMyDocListHeaderView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */; };
A54A07C92C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A54A07C82C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift */; }; A54A07C92C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A54A07C82C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift */; };
...@@ -887,6 +896,8 @@ ...@@ -887,6 +896,8 @@
A59FD0732CBFAC7800BBED55 /* YHRangeDatePickerCell2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A59FD06D2CBFAC7800BBED55 /* YHRangeDatePickerCell2.swift */; }; A59FD0732CBFAC7800BBED55 /* YHRangeDatePickerCell2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A59FD06D2CBFAC7800BBED55 /* YHRangeDatePickerCell2.swift */; };
A59FD0772CC0A62A00BBED55 /* YHPickTimeHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A59FD0762CC0A62A00BBED55 /* YHPickTimeHoldView.swift */; }; A59FD0772CC0A62A00BBED55 /* YHPickTimeHoldView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A59FD0762CC0A62A00BBED55 /* YHPickTimeHoldView.swift */; };
A5A89FD72C256B94005A71DD /* YHHomeLastMessageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5A89FD62C256B94005A71DD /* YHHomeLastMessageModel.swift */; }; A5A89FD72C256B94005A71DD /* YHHomeLastMessageModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5A89FD62C256B94005A71DD /* YHHomeLastMessageModel.swift */; };
A5AC63EA2CE83F800080960D /* YHOtherMultipleChoiceItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5AC63E92CE83F800080960D /* YHOtherMultipleChoiceItemView.swift */; };
A5AC63EC2CE83FD30080960D /* YHOtherSingleChoiceItemView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5AC63EB2CE83FD30080960D /* YHOtherSingleChoiceItemView.swift */; };
A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */; }; A5ACE9282B4564F7002C94D2 /* YHSmsCodeView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */; };
A5ACE9292B4564F7002C94D2 /* YHSmsCodeInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */; }; A5ACE9292B4564F7002C94D2 /* YHSmsCodeInputView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */; };
A5ACE92C2B4564F7002C94D2 /* YHLoginStyleButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E42B4564F7002C94D2 /* YHLoginStyleButton.swift */; }; A5ACE92C2B4564F7002C94D2 /* YHLoginStyleButton.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5ACE8E42B4564F7002C94D2 /* YHLoginStyleButton.swift */; };
...@@ -1128,6 +1139,8 @@ ...@@ -1128,6 +1139,8 @@
042B20D52CEB239400655093 /* YHIHKIdentityPlanCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIHKIdentityPlanCell.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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 0430E6432C72E6A1000511E2 /* YHAdopterMainTableViewCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHAdopterMainTableViewCell.swift; sourceTree = "<group>"; };
...@@ -1651,6 +1664,11 @@ ...@@ -1651,6 +1664,11 @@
04B401E92CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHIncomeTypeSelectViewController.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>"; }; 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>"; }; 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>"; }; 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>"; }; 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>"; }; 04B4B8DB2C90696E00ED82BC /* YHResignDocumentManagementVC.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHResignDocumentManagementVC.swift; sourceTree = "<group>"; };
...@@ -1816,6 +1834,8 @@ ...@@ -1816,6 +1834,8 @@
A51D14EA2C75E98500E2820C /* UINavigationController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Extension.swift"; sourceTree = "<group>"; }; A51D14EA2C75E98500E2820C /* UINavigationController+Extension.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "UINavigationController+Extension.swift"; sourceTree = "<group>"; };
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; }; A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A537126E2C64EA0800FF1844 /* officalsuccess.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = officalsuccess.gif; sourceTree = "<group>"; }; A537126E2C64EA0800FF1844 /* officalsuccess.gif */ = {isa = PBXFileReference; lastKnownFileType = image.gif; path = officalsuccess.gif; sourceTree = "<group>"; };
A53A35082CE87D2A002FE6A3 /* YHOtherLanguageSelecteView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherLanguageSelecteView.swift; sourceTree = "<group>"; };
A53A350A2CE88B86002FE6A3 /* YHSingleOptionalItemsView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHSingleOptionalItemsView.swift; sourceTree = "<group>"; };
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; }; A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; }; A53B61182BB3C9960010B573 /* YHMyDocListHeaderView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHMyDocListHeaderView.swift; sourceTree = "<group>"; };
A54A07C82C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelHKDLGuideSheetView.swift; sourceTree = "<group>"; }; A54A07C82C7F478200F749AB /* YHTravelHKDLGuideSheetView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHTravelHKDLGuideSheetView.swift; sourceTree = "<group>"; };
...@@ -1910,6 +1930,8 @@ ...@@ -1910,6 +1930,8 @@
A59FD06F2CBFAC7800BBED55 /* YHRangeDatePickerView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHRangeDatePickerView2.swift; sourceTree = "<group>"; }; A59FD06F2CBFAC7800BBED55 /* YHRangeDatePickerView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHRangeDatePickerView2.swift; sourceTree = "<group>"; };
A59FD0762CC0A62A00BBED55 /* YHPickTimeHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPickTimeHoldView.swift; sourceTree = "<group>"; }; A59FD0762CC0A62A00BBED55 /* YHPickTimeHoldView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHPickTimeHoldView.swift; sourceTree = "<group>"; };
A5A89FD62C256B94005A71DD /* YHHomeLastMessageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeLastMessageModel.swift; sourceTree = "<group>"; }; A5A89FD62C256B94005A71DD /* YHHomeLastMessageModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeLastMessageModel.swift; sourceTree = "<group>"; };
A5AC63E92CE83F800080960D /* YHOtherMultipleChoiceItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherMultipleChoiceItemView.swift; sourceTree = "<group>"; };
A5AC63EB2CE83FD30080960D /* YHOtherSingleChoiceItemView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHOtherSingleChoiceItemView.swift; sourceTree = "<group>"; };
A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeView.swift; sourceTree = "<group>"; }; A5ACE8DE2B4564F7002C94D2 /* YHSmsCodeView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeView.swift; sourceTree = "<group>"; };
A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeInputView.swift; sourceTree = "<group>"; }; A5ACE8E02B4564F7002C94D2 /* YHSmsCodeInputView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHSmsCodeInputView.swift; sourceTree = "<group>"; };
A5ACE8E42B4564F7002C94D2 /* YHLoginStyleButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHLoginStyleButton.swift; sourceTree = "<group>"; }; A5ACE8E42B4564F7002C94D2 /* YHLoginStyleButton.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHLoginStyleButton.swift; sourceTree = "<group>"; };
...@@ -2346,6 +2368,14 @@ ...@@ -2346,6 +2368,14 @@
path = Model; path = Model;
sourceTree = "<group>"; sourceTree = "<group>";
}; };
042B20DD2CEB6A7500655093 /* VM */ = {
isa = PBXGroup;
children = (
042B20DE2CEB6A8F00655093 /* YHSchemeViewModel.swift */,
);
path = VM;
sourceTree = "<group>";
};
0430E63C2C72DB48000511E2 /* AddAdopters(2新增受养人) */ = { 0430E63C2C72DB48000511E2 /* AddAdopters(2新增受养人) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
...@@ -3011,7 +3041,11 @@ ...@@ -3011,7 +3041,11 @@
045EEDF42B9F171A0022A143 /* YHOtherTextViewItemView.swift */, 045EEDF42B9F171A0022A143 /* YHOtherTextViewItemView.swift */,
045EEDF52B9F171A0022A143 /* YHOtherYesOrNoItemView.swift */, 045EEDF52B9F171A0022A143 /* YHOtherYesOrNoItemView.swift */,
045EEDF62B9F171A0022A143 /* YHOtherSelecteItemView.swift */, 045EEDF62B9F171A0022A143 /* YHOtherSelecteItemView.swift */,
A53A35082CE87D2A002FE6A3 /* YHOtherLanguageSelecteView.swift */,
045EEDF72B9F171A0022A143 /* YHOtherInfoSessionView.swift */, 045EEDF72B9F171A0022A143 /* YHOtherInfoSessionView.swift */,
A5AC63E92CE83F800080960D /* YHOtherMultipleChoiceItemView.swift */,
A5AC63EB2CE83FD30080960D /* YHOtherSingleChoiceItemView.swift */,
A53A350A2CE88B86002FE6A3 /* YHSingleOptionalItemsView.swift */,
); );
path = V; path = V;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3635,6 +3669,7 @@ ...@@ -3635,6 +3669,7 @@
047F3DDD2CE7216D001B2A6D /* MyNewScheme(我的方案) */ = { 047F3DDD2CE7216D001B2A6D /* MyNewScheme(我的方案) */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
042B20DD2CEB6A7500655093 /* VM */,
047F3DE02CE724FF001B2A6D /* C */, 047F3DE02CE724FF001B2A6D /* C */,
047F3DDF2CE724FA001B2A6D /* V */, 047F3DDF2CE724FA001B2A6D /* V */,
047F3DDE2CE724F4001B2A6D /* M */, 047F3DDE2CE724F4001B2A6D /* M */,
...@@ -3645,6 +3680,7 @@ ...@@ -3645,6 +3680,7 @@
047F3DDE2CE724F4001B2A6D /* M */ = { 047F3DDE2CE724F4001B2A6D /* M */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
042B20DB2CEB69CB00655093 /* YHSchemeModel.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3988,6 +4024,10 @@ ...@@ -3988,6 +4024,10 @@
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */, 04B401ED2CE8709A005C61A9 /* YHIncomeTypeSelectModel.swift */,
04B401F72CEB3E2A005C61A9 /* YHIncomeType.swift */,
04B401F12CEB19C1005C61A9 /* YHIncomeRecordCompleteModel.swift */,
04B401F32CEB1C51005C61A9 /* YHIncomeCompanyDetailModel.swift */,
04B401F52CEB239C005C61A9 /* YHIncomeRecordUtilType.swift */,
); );
path = M; path = M;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -4018,6 +4058,7 @@ ...@@ -4018,6 +4058,7 @@
04B401CF2CE6E6C8005C61A9 /* VM */ = { 04B401CF2CE6E6C8005C61A9 /* VM */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
04B401EF2CEB0C78005C61A9 /* YHIncomeRecordViewModel.swift */,
); );
path = VM; path = VM;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -5747,6 +5788,7 @@ ...@@ -5747,6 +5788,7 @@
04F4A5282CB8D4270026D469 /* YHResignAppointScheduleListViewController.swift in Sources */, 04F4A5282CB8D4270026D469 /* YHResignAppointScheduleListViewController.swift in Sources */,
A598E9E22C7CB32D00F84739 /* YHTravelDocsPreparationListModel.swift in Sources */, A598E9E22C7CB32D00F84739 /* YHTravelDocsPreparationListModel.swift in Sources */,
A598E9D72C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift in Sources */, A598E9D72C7C9EF300F84739 /* YHTravelDocsPreparationListViewController.swift in Sources */,
042B20DC2CEB69CB00655093 /* YHSchemeModel.swift in Sources */,
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */, A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */,
04CA2BFF2CB7C9A000F36DE7 /* YHResignUploadSuccessDocListCell.swift in Sources */, 04CA2BFF2CB7C9A000F36DE7 /* YHResignUploadSuccessDocListCell.swift in Sources */,
04CE1AE12C2AD91F001CB80A /* YHActivityDetailItemView.swift in Sources */, 04CE1AE12C2AD91F001CB80A /* YHActivityDetailItemView.swift in Sources */,
...@@ -5795,6 +5837,7 @@ ...@@ -5795,6 +5837,7 @@
0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */, 0468D4362B57752F00CFB916 /* YHUserModel.swift in Sources */,
040450CF2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift in Sources */, 040450CF2CC8A0F400D1CFE5 /* YHResignDocumentMultiLineTipsCell.swift in Sources */,
A567E5982BD7643D00D5D5A0 /* YHHKEventModel.swift in Sources */, A567E5982BD7643D00D5D5A0 /* YHHKEventModel.swift in Sources */,
A5AC63EC2CE83FD30080960D /* YHOtherSingleChoiceItemView.swift in Sources */,
045EEE992B9F171A0022A143 /* YHPreviewInfoHoldView.swift in Sources */, 045EEE992B9F171A0022A143 /* YHPreviewInfoHoldView.swift in Sources */,
045EEE7E2B9F171A0022A143 /* YHPersonInfoCellModel1.swift in Sources */, 045EEE7E2B9F171A0022A143 /* YHPersonInfoCellModel1.swift in Sources */,
047AA3DD2C4A6126009C4554 /* YHLifeViewController.swift in Sources */, 047AA3DD2C4A6126009C4554 /* YHLifeViewController.swift in Sources */,
...@@ -5812,10 +5855,12 @@ ...@@ -5812,10 +5855,12 @@
0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */, 0430E63B2C6DA106000511E2 /* CGFloat+Extention.swift in Sources */,
04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */, 04B401EA2CE848E6005C61A9 /* YHIncomeTypeSelectViewController.swift in Sources */,
045EEF192B9F171A0022A143 /* YHAddressModel.swift in Sources */, 045EEF192B9F171A0022A143 /* YHAddressModel.swift in Sources */,
A5AC63EA2CE83F800080960D /* YHOtherMultipleChoiceItemView.swift in Sources */,
045EEEDB2B9F171A0022A143 /* YHCollegeSearchViewController.swift in Sources */, 045EEEDB2B9F171A0022A143 /* YHCollegeSearchViewController.swift in Sources */,
04C85DE72C36ADAE008B20D6 /* YHMyFileListHeaderView.swift in Sources */, 04C85DE72C36ADAE008B20D6 /* YHMyFileListHeaderView.swift in Sources */,
047F3DF42CE88ACD001B2A6D /* YHImproveSchemeCell.swift in Sources */, 047F3DF42CE88ACD001B2A6D /* YHImproveSchemeCell.swift in Sources */,
A598E9DC2C7CA52300F84739 /* YHTravelDocsPreparationTipsCell.swift in Sources */, A598E9DC2C7CA52300F84739 /* YHTravelDocsPreparationTipsCell.swift in Sources */,
A53A350B2CE88B86002FE6A3 /* YHSingleOptionalItemsView.swift in Sources */,
045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */, 045EEE982B9F171A0022A143 /* YHPreviewInfoQuestionAndAnswerItemsView.swift in Sources */,
045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */, 045EEE7A2B9F171A0022A143 /* YHPreviewForOtherInfoModel.swift in Sources */,
0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */, 0414BDA92BC7E81500225367 /* YHMyPermissionSettingVC.swift in Sources */,
...@@ -5898,6 +5943,7 @@ ...@@ -5898,6 +5943,7 @@
0457921B2CBE0C3F00EBD99B /* YHLookResignResultModel.swift in Sources */, 0457921B2CBE0C3F00EBD99B /* YHLookResignResultModel.swift in Sources */,
045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */, 045EEEB92B9F171A0022A143 /* YHWorkMessageSelectTableViewCell.swift in Sources */,
04FA8B302C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift in Sources */, 04FA8B302C0874CA00ABE43F /* YHOneKeyLoginViewModel.swift in Sources */,
04B401F82CEB3E2B005C61A9 /* YHIncomeType.swift in Sources */,
04256E112C75BD2700A37BA4 /* YHVisaPaymentListModel.swift in Sources */, 04256E112C75BD2700A37BA4 /* YHVisaPaymentListModel.swift in Sources */,
04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */, 04A7BD0F2BA41C9800BD35A2 /* YHMyDocumentsModel.swift in Sources */,
044EE24A2C9434D400A2FE3A /* YHResignCertificateDetailPassPortViewController.swift in Sources */, 044EE24A2C9434D400A2FE3A /* YHResignCertificateDetailPassPortViewController.swift in Sources */,
...@@ -5933,6 +5979,7 @@ ...@@ -5933,6 +5979,7 @@
049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */, 049AC4C62BC3E55300F857F4 /* YHServiceSectionView.swift in Sources */,
04256E152C75BD2700A37BA4 /* YHPayMembersCell.swift in Sources */, 04256E152C75BD2700A37BA4 /* YHPayMembersCell.swift in Sources */,
0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */, 0408C3632BEC7C6900DB1E25 /* YHVideoPlayerControlView.swift in Sources */,
042B20DF2CEB6A8F00655093 /* YHSchemeViewModel.swift in Sources */,
044F394C2CB806D0007CA277 /* YHVisaRenewalPayMethodUrlCell.swift in Sources */, 044F394C2CB806D0007CA277 /* YHVisaRenewalPayMethodUrlCell.swift in Sources */,
A567E5B12BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift in Sources */, A567E5B12BD7643D00D5D5A0 /* YHHomeCollectionViewCell.swift in Sources */,
A582B2432BB95E20009D098C /* YHHKPlanCell.swift in Sources */, A582B2432BB95E20009D098C /* YHHKPlanCell.swift in Sources */,
...@@ -5947,6 +5994,7 @@ ...@@ -5947,6 +5994,7 @@
043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */, 043D2C8C2C0F037B00172438 /* YHServiceOrderSearchViewModel.swift in Sources */,
0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */, 0468D4262B495A5400CFB916 /* YHPickPhoneAddressViewController.swift in Sources */,
A5FD45232C523DD300908AD9 /* YHJsApi.swift in Sources */, A5FD45232C523DD300908AD9 /* YHJsApi.swift in Sources */,
A53A35092CE87D2A002FE6A3 /* YHOtherLanguageSelecteView.swift in Sources */,
04B360E32C60A346001EB053 /* YHPrinciplePhotoListCell.swift in Sources */, 04B360E32C60A346001EB053 /* YHPrinciplePhotoListCell.swift in Sources */,
044EE2512C955CDE00A2FE3A /* YHResignGuidelinesExampleViewController.swift in Sources */, 044EE2512C955CDE00A2FE3A /* YHResignGuidelinesExampleViewController.swift in Sources */,
0457920F2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift in Sources */, 0457920F2CBCE9D000EBD99B /* YHResignUploadTravelCardListTableViewCell.swift in Sources */,
...@@ -6162,6 +6210,7 @@ ...@@ -6162,6 +6210,7 @@
048787D92BCF68530036E221 /* YHProgressView.swift in Sources */, 048787D92BCF68530036E221 /* YHProgressView.swift in Sources */,
04256DEE2C73338200A37BA4 /* YHGrabingNumberListCell.swift in Sources */, 04256DEE2C73338200A37BA4 /* YHGrabingNumberListCell.swift in Sources */,
047F3DF02CE88380001B2A6D /* YHMaterialListCell.swift in Sources */, 047F3DF02CE88380001B2A6D /* YHMaterialListCell.swift in Sources */,
04B401F02CEB0C78005C61A9 /* YHIncomeRecordViewModel.swift in Sources */,
04B401E62CE83C74005C61A9 /* YHIncomeRemarkCell.swift in Sources */, 04B401E62CE83C74005C61A9 /* YHIncomeRemarkCell.swift in Sources */,
045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */, 045EEEEC2B9F171A0022A143 /* YHBrotherInfoVC.swift in Sources */,
0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */, 0477E17A2BA41C7E00436346 /* YHCertificateModel.swift in Sources */,
...@@ -6266,6 +6315,7 @@ ...@@ -6266,6 +6315,7 @@
045EEE882B9F171A0022A143 /* YHPreviewAcademicAndProfessionalQualificationViewController.swift in Sources */, 045EEE882B9F171A0022A143 /* YHPreviewAcademicAndProfessionalQualificationViewController.swift in Sources */,
0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */, 0435FA7F2BA178C100024EAE /* YHCommonAlertView.swift in Sources */,
A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */, A5ACE9382B4564F7002C94D2 /* UIApplication+Extension.swift in Sources */,
04B401F22CEB19C1005C61A9 /* YHIncomeRecordCompleteModel.swift in Sources */,
0468D42B2B55019900CFB916 /* YHAnalytics.swift in Sources */, 0468D42B2B55019900CFB916 /* YHAnalytics.swift in Sources */,
04912F842CB7D14D00CC3105 /* YHResignScheduleLineCollectCell.swift in Sources */, 04912F842CB7D14D00CC3105 /* YHResignScheduleLineCollectCell.swift in Sources */,
0445E6B12BE9E15C003C52F9 /* YHFindAppNewVersionView.swift in Sources */, 0445E6B12BE9E15C003C52F9 /* YHFindAppNewVersionView.swift in Sources */,
...@@ -6450,6 +6500,7 @@ ...@@ -6450,6 +6500,7 @@
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */, A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */,
045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */, 045EEE962B9F171A0022A143 /* YHPreviewInfoCertificatePictureItemsView.swift in Sources */,
044EE2362C92916600A2FE3A /* YHResignCertificateListViewController.swift in Sources */, 044EE2362C92916600A2FE3A /* YHResignCertificateListViewController.swift in Sources */,
04B401F62CEB239C005C61A9 /* YHIncomeRecordUtilType.swift in Sources */,
04F243412C9AFBAB00DF2C74 /* YHHKRecordItemDetailType.swift in Sources */, 04F243412C9AFBAB00DF2C74 /* YHHKRecordItemDetailType.swift in Sources */,
04256DDE2C72DA3B00A37BA4 /* YHCertificateAppointViewController.swift in Sources */, 04256DDE2C72DA3B00A37BA4 /* YHCertificateAppointViewController.swift in Sources */,
A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */, A592FE912BA6CC010062FACA /* YHCertificateEntryHeadView.swift in Sources */,
...@@ -6504,6 +6555,7 @@ ...@@ -6504,6 +6555,7 @@
04912F942CB921C300CC3105 /* YHResignAppointContainerViewController.swift in Sources */, 04912F942CB921C300CC3105 /* YHResignAppointContainerViewController.swift in Sources */,
045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */, 045EEE972B9F171A0022A143 /* YHPreviewInfoWorkExpView.swift in Sources */,
04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */, 04B401EC2CE84CBD005C61A9 /* YHIncomeTypePopViewSelectCell.swift in Sources */,
04B401F42CEB1C51005C61A9 /* YHIncomeCompanyDetailModel.swift in Sources */,
044BACC72BCFA58E00184C64 /* YHNoDataTipsView.swift in Sources */, 044BACC72BCFA58E00184C64 /* YHNoDataTipsView.swift in Sources */,
04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */, 04D5C5662B8ED92600190021 /* YHBaseModel.swift in Sources */,
A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */, A5F8AC082B9F414000A21EFA /* YHCustomTextView.swift in Sources */,
...@@ -6625,7 +6677,7 @@ ...@@ -6625,7 +6677,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -6652,7 +6704,7 @@ ...@@ -6652,7 +6704,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.3; MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -6770,7 +6822,7 @@ ...@@ -6770,7 +6822,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -6797,7 +6849,7 @@ ...@@ -6797,7 +6849,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.3; MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -6978,7 +7030,7 @@ ...@@ -6978,7 +7030,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -7005,7 +7057,7 @@ ...@@ -7005,7 +7057,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.3; MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
...@@ -7028,7 +7080,7 @@ ...@@ -7028,7 +7080,7 @@
CODE_SIGN_IDENTITY = "Apple Development"; CODE_SIGN_IDENTITY = "Apple Development";
"CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer"; "CODE_SIGN_IDENTITY[sdk=iphoneos*]" = "iPhone Developer";
CODE_SIGN_STYLE = Manual; CODE_SIGN_STYLE = Manual;
CURRENT_PROJECT_VERSION = 4; CURRENT_PROJECT_VERSION = 1;
DEVELOPMENT_TEAM = ""; DEVELOPMENT_TEAM = "";
"DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7; "DEVELOPMENT_TEAM[sdk=iphoneos*]" = RXHYW88XR7;
ENABLE_USER_SCRIPT_SANDBOXING = NO; ENABLE_USER_SCRIPT_SANDBOXING = NO;
...@@ -7055,7 +7107,7 @@ ...@@ -7055,7 +7107,7 @@
"$(inherited)", "$(inherited)",
"@executable_path/Frameworks", "@executable_path/Frameworks",
); );
MARKETING_VERSION = 1.0.3; MARKETING_VERSION = 1.0.4;
PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy; PRODUCT_BUNDLE_IDENTIFIER = com.intelligence.galaxy;
PRODUCT_NAME = "$(TARGET_NAME)"; PRODUCT_NAME = "$(TARGET_NAME)";
PROVISIONING_PROFILE_SPECIFIER = ""; PROVISIONING_PROFILE_SPECIFIER = "";
......
...@@ -24,9 +24,9 @@ class YHConfigManager: NSObject { ...@@ -24,9 +24,9 @@ class YHConfigManager: NSObject {
//测试环境-H5 //测试环境-H5
static let baseH5UrlTest : String = "https://test-hkdiy-h5.galaxy-immi.com" static let baseH5UrlTest : String = "https://test-hklife.galaxy-immi.com"
//正式环境-H5 //正式环境-H5
static let baseH5UrlRelease : String = "https://hkdiy-h5.galaxy-immi.com" static let baseH5UrlRelease : String = "https://hklife.galaxy-immi.com"
//h5地址 //h5地址
var h5Url : String { var h5Url : String {
......
...@@ -307,6 +307,8 @@ extension YHHomeHoldViewPageViewController { ...@@ -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(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(didJumpToNewsTab), name: YhConstant.YhNotification.didJumpToHomePageNewsTabNotification, object: nil)
NotificationCenter.default.addObserver(self, selector: #selector(didJumpToLifeTab), name: YhConstant.YhNotification.didJumpToHomePageLifeTabNotification, object: nil) NotificationCenter.default.addObserver(self, selector: #selector(didJumpToLifeTab), name: YhConstant.YhNotification.didJumpToHomePageLifeTabNotification, object: nil)
...@@ -368,6 +370,10 @@ extension YHHomeHoldViewPageViewController { ...@@ -368,6 +370,10 @@ extension YHHomeHoldViewPageViewController {
jumpToItemIndex(itemIndex: 2) jumpToItemIndex(itemIndex: 2)
} }
@objc func didJumpToIdentityTab() {
jumpToItemIndex(itemIndex: 1)
}
@objc func didLoadYhManager() { @objc func didLoadYhManager() {
if needShowManagerTipsView { if needShowManagerTipsView {
needShowManagerTipsView = false needShowManagerTipsView = false
......
...@@ -222,7 +222,8 @@ extension YHInformationPerfectListVC { ...@@ -222,7 +222,8 @@ extension YHInformationPerfectListVC {
// vc.model = serviceCenterMainReqVM.allInfoScoreModel // vc.model = serviceCenterMainReqVM.allInfoScoreModel
// navigationController?.pushViewController(vc) // navigationController?.pushViewController(vc)
YHHUD.flash(message: "这里跳转 杜宇 新的我的方案") let vc = YHMyNewSchemeViewController()
navigationController?.pushViewController(vc)
} }
@objc func goInfoListVC( ) { @objc func goInfoListVC( ) {
......
...@@ -74,7 +74,7 @@ class YHServiceOrderListView: YHBaseViewController { ...@@ -74,7 +74,7 @@ class YHServiceOrderListView: YHBaseViewController {
} else if type == 4 { // 方案 } else if type == 4 { // 方案
//我的方案 //我的方案
let vc = YHMineSchemeViewController() let vc = YHMyNewSchemeViewController()
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 5 { } else if type == 5 {
......
...@@ -10,7 +10,11 @@ import UIKit ...@@ -10,7 +10,11 @@ import UIKit
class YHImproveSchemeViewController: YHBaseViewController { class YHImproveSchemeViewController: YHBaseViewController {
var items:[String] = ["", "", ""] var orderId: Int = 0
let viewModel = YHSchemeViewModel()
var items:[YHImproveDetailModel] = []
var isPass: Bool = false
lazy var bgImgView: UIImageView = { lazy var bgImgView: UIImageView = {
let view = UIImageView(image: UIImage(named: "my_scheme_improve_list_bg")) let view = UIImageView(image: UIImage(named: "my_scheme_improve_list_bg"))
...@@ -116,7 +120,7 @@ class YHImproveSchemeViewController: YHBaseViewController { ...@@ -116,7 +120,7 @@ class YHImproveSchemeViewController: YHBaseViewController {
btn.setTitle("重新选择提升目标", for: .normal) btn.setTitle("重新选择提升目标", for: .normal)
btn.setTitleColor(.white, for: .normal) btn.setTitleColor(.white, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
// btn.addTarget(self, action: #selector(didSaveBtnClicked), for: .touchUpInside) btn.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius3 btn.layer.cornerRadius = kCornerRadius3
return btn return btn
}() }()
...@@ -129,11 +133,18 @@ class YHImproveSchemeViewController: YHBaseViewController { ...@@ -129,11 +133,18 @@ class YHImproveSchemeViewController: YHBaseViewController {
btn.setTitle("修改信息", for: .normal) btn.setTitle("修改信息", for: .normal)
btn.setTitleColor(.brandMainColor, for: .normal) btn.setTitleColor(.brandMainColor, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 16)
// btn.addTarget(self, action: #selector(didSaveBtnClicked), for: .touchUpInside) btn.addTarget(self, action: #selector(didLeftBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius3 btn.layer.cornerRadius = kCornerRadius3
return btn return btn
}() }()
@objc func didLeftBtnClicked() {
self.modifyInfo()
}
@objc func didRightBtnClicked() {
self.navigationController?.popViewController(animated: true)
}
override func viewDidLoad() { override func viewDidLoad() {
...@@ -153,13 +164,46 @@ class YHImproveSchemeViewController: YHBaseViewController { ...@@ -153,13 +164,46 @@ class YHImproveSchemeViewController: YHBaseViewController {
make.top.equalTo(k_Height_NavigationtBarAndStatuBar) make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
make.bottom.equalTo(bottomView.snp.top) make.bottom.equalTo(bottomView.snp.top)
} }
bottomView.isHidden = isPass
bottomView.snp.makeConstraints { make in bottomView.snp.makeConstraints { make in
make.left.right.bottom.equalToSuperview() make.left.right.bottom.equalToSuperview()
make.height.equalTo(64+k_Height_safeAreaInsetsBottom()) make.height.equalTo(isPass ? 0.0 : 64+k_Height_safeAreaInsetsBottom())
} }
view.bringSubviewToFront(gk_navigationBar) view.bringSubviewToFront(gk_navigationBar)
tableView.reloadData() tableView.reloadData()
requestData()
}
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)
return
}
YHHUD.flash(message: error?.errorMsg ?? "修改失败")
}
} }
} }
...@@ -171,23 +215,19 @@ extension YHImproveSchemeViewController : UITableViewDelegate, UITableViewDataSo ...@@ -171,23 +215,19 @@ extension YHImproveSchemeViewController : UITableViewDelegate, UITableViewDataSo
} }
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int { func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return items.count return 2
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if 0 <= indexPath.row && indexPath.row < items.count { if indexPath.row == 1 {
let item = items[indexPath.row] let cell = tableView.dequeueReusableCell(withIdentifier: YHIHKIdentityPlanCell.cellReuseIdentifier, for: indexPath) as! YHIHKIdentityPlanCell
if indexPath.row == items.count-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
return cell return cell
} }
let defaultCell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath) let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveTargetListCell.cellReuseIdentifier, for: indexPath) as! YHImproveTargetListCell
return defaultCell cell.arr = self.items
return cell
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
...@@ -195,7 +235,11 @@ extension YHImproveSchemeViewController : UITableViewDelegate, UITableViewDataSo ...@@ -195,7 +235,11 @@ extension YHImproveSchemeViewController : UITableViewDelegate, UITableViewDataSo
} }
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { 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? { func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
...@@ -212,7 +256,7 @@ extension YHImproveSchemeViewController : UITableViewDelegate, UITableViewDataSo ...@@ -212,7 +256,7 @@ extension YHImproveSchemeViewController : UITableViewDelegate, UITableViewDataSo
} }
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 12.0 return 0.1
} }
} }
......
...@@ -19,6 +19,7 @@ enum YHSchemeItemType: Int { ...@@ -19,6 +19,7 @@ enum YHSchemeItemType: Int {
case improveTarget = 7 // 提升目标 case improveTarget = 7 // 提升目标
case hkRequireList = 8 // 港府要求 case hkRequireList = 8 // 港府要求
} }
class YHSchemeItem { class YHSchemeItem {
var type: YHSchemeItemType var type: YHSchemeItemType
init(type: YHSchemeItemType) { init(type: YHSchemeItemType) {
...@@ -28,8 +29,13 @@ class YHSchemeItem { ...@@ -28,8 +29,13 @@ class YHSchemeItem {
class YHMyNewSchemeViewController: YHBaseViewController { class YHMyNewSchemeViewController: YHBaseViewController {
var orderId: Int = 0
var items: [[YHSchemeItem]] = [] var items: [[YHSchemeItem]] = []
var passArr: [YHComprehensiveEevaluationModel] = []
var unpassArr: [YHComprehensiveEevaluationModel] = []
var isPass: Bool = false
let viewModel = YHSchemeViewModel()
lazy var tableView: UITableView = { lazy var tableView: UITableView = {
let tableView = UITableView(frame:.zero, style:.grouped) let tableView = UITableView(frame:.zero, style:.grouped)
...@@ -188,30 +194,121 @@ class YHMyNewSchemeViewController: YHBaseViewController { ...@@ -188,30 +194,121 @@ class YHMyNewSchemeViewController: YHBaseViewController {
} }
func requestData() { func requestData() {
items.removeAll()
let isPass = true if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") as? Int {
if isPass { orderId = orderID
let item1 = YHSchemeItem(type: .evaluate) }
let item2 = YHSchemeItem(type: .hkRequireList)
let item3 = YHSchemeItem(type: .industryLocation) viewModel.getMySchemeData(orderId: orderId) {
let item4 = YHSchemeItem(type: .materialList) [weak self] success, error in
let item5 = YHSchemeItem(type: .documentList) guard let self = self else { return }
let item6 = YHSchemeItem(type: .improveScheme) titleLabel.text = "尊敬的\(viewModel.schemeModel.username)\(viewModel.schemeModel.sex)"
let arr1: [YHSchemeItem] = [item1, item2, item3, item4, item5, item6] passArr = self.viewModel.schemeModel.comprehensive_evaluation.filter {
items.append(arr1) $0.isPass == true
}
unpassArr = self.viewModel.schemeModel.comprehensive_evaluation.filter {
$0.isPass == false
}
} else { for item in unpassArr {
if self.viewModel.schemeModel.comprehensive_evaluation_selected.contains(item.standardKey) {
item.is_select = true
} else {
item.is_select = false
}
}
let item01 = YHSchemeItem(type: .evaluate) isPass = passArr.count >= 6
let item02 = YHSchemeItem(type: .hkRequireList) if isPass {
let item03 = YHSchemeItem(type: .modifyInfo) let item1 = YHSchemeItem(type: .evaluate)
let arr1: [YHSchemeItem] = [item01, item02, item03] 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 selectTargets: [YHComprehensiveEevaluationModel] = unpassArr.filter {
return $0.is_select
}
let selectKeys: [String] = selectTargets.map {
return $0.standardKey
}
YHHUD.show(.progress(message: "提交中..."))
viewModel.postSelectImproveTargets(orderId: orderId, targets: selectKeys) {
[weak self] success, error in
YHHUD.hide()
guard let self = self else { return }
if success {
let vc = YHImproveSchemeViewController()
vc.orderId = orderId
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 }
let item11 = YHSchemeItem(type: .improveTarget) if success {
let arr2: [YHSchemeItem] = [item11] let vc = YHInformationPerfectListVC()
items.append(contentsOf: [arr1, arr2]) vc.orderId = orderId
navigationController?.pushViewController(vc)
return
}
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"] ?? ""
}
} }
self.tableView.reloadData() return ""
} }
} }
...@@ -241,58 +338,102 @@ extension YHMyNewSchemeViewController : UITableViewDelegate, UITableViewDataSour ...@@ -241,58 +338,102 @@ extension YHMyNewSchemeViewController : UITableViewDelegate, UITableViewDataSour
if item.type == .evaluate { if item.type == .evaluate {
let cell = tableView.dequeueReusableCell(withIdentifier: YHComprehensiveEvaluationCell.cellReuseIdentifier, for: indexPath) as! YHComprehensiveEvaluationCell let cell = tableView.dequeueReusableCell(withIdentifier: YHComprehensiveEvaluationCell.cellReuseIdentifier, for: indexPath) as! YHComprehensiveEvaluationCell
cell.isPass = isPass
targetCell = cell targetCell = cell
return cell
} }
if item.type == .hkRequireList { if item.type == .hkRequireList {
let cell = tableView.dequeueReusableCell(withIdentifier: YHHKRequiredItemListCell.cellReuseIdentifier, for: indexPath) as! YHHKRequiredItemListCell let cell = tableView.dequeueReusableCell(withIdentifier: YHHKRequiredItemListCell.cellReuseIdentifier, for: indexPath) as! YHHKRequiredItemListCell
cell.passArr = self.passArr
targetCell = cell targetCell = cell
return cell
} }
if item.type == .industryLocation { if item.type == .industryLocation {
let cell = tableView.dequeueReusableCell(withIdentifier: YHIndustryLocationCell.cellReuseIdentifier, for: indexPath) as! YHIndustryLocationCell let cell = tableView.dequeueReusableCell(withIdentifier: YHIndustryLocationCell.cellReuseIdentifier, for: indexPath) as! YHIndustryLocationCell
targetCell = cell targetCell = cell
return cell
} }
if item.type == .materialList { if item.type == .materialList {
let cell = tableView.dequeueReusableCell(withIdentifier: YHMaterialListCell.cellReuseIdentifier, for: indexPath) as! YHMaterialListCell 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 targetCell = cell
return cell
} }
if item.type == .documentList { if item.type == .documentList {
let cell = tableView.dequeueReusableCell(withIdentifier: YHDocumentListCell.cellReuseIdentifier, for: indexPath) as! YHDocumentListCell 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 targetCell = cell
return cell
} }
if item.type == .improveScheme { if item.type == .improveScheme {
let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveSchemeCell.cellReuseIdentifier, for: indexPath) as! YHImproveSchemeCell 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.orderId = orderId
vc.isPass = self.isPass
UIViewController.current?.navigationController?.pushViewController(vc)
}
targetCell = cell targetCell = cell
return cell
} }
if item.type == .modifyInfo { if item.type == .modifyInfo {
let cell = tableView.dequeueReusableCell(withIdentifier: YHModifySchemeInfoCell.cellReuseIdentifier, for: indexPath) as! YHModifySchemeInfoCell 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 targetCell = cell
return cell
} }
if item.type == .improveTarget { if item.type == .improveTarget {
let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveTargetCell.cellReuseIdentifier, for: indexPath) as! YHImproveTargetCell let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveTargetCell.cellReuseIdentifier, for: indexPath) as! YHImproveTargetCell
cell.unpassArr = unpassArr
cell.submitClick = {
[weak self] in
guard let self = self else { return }
self.submitTargets()
}
targetCell = cell targetCell = cell
return cell
} }
// 最后一个cell切底部圆角 if let targetCell = targetCell {
let corner = UIRectCorner(rawValue: UIRectCorner.bottomLeft.rawValue | UIRectCorner.bottomRight.rawValue) return targetCell
if indexPath.row == arr.count-1 {
targetCell?.createCorner(CGSizeMake(6.0, 6.0), corner)
} else {
targetCell?.layer.mask = nil
} }
} }
} }
...@@ -301,6 +442,17 @@ extension YHMyNewSchemeViewController : UITableViewDelegate, UITableViewDataSour ...@@ -301,6 +442,17 @@ extension YHMyNewSchemeViewController : UITableViewDelegate, UITableViewDataSour
return defaultCell 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 { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return UITableView.automaticDimension return UITableView.automaticDimension
} }
...@@ -326,6 +478,16 @@ extension YHMyNewSchemeViewController : UITableViewDelegate, UITableViewDataSour ...@@ -326,6 +478,16 @@ extension YHMyNewSchemeViewController : UITableViewDelegate, UITableViewDataSour
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 12.0 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 { extension YHMyNewSchemeViewController: UIScrollViewDelegate {
......
//
// 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 standardName: String = ""
var standardKey: String = ""
var isPass: Bool = false
var is_select: Bool = false
required init() {
}
}
class YHMySchemeDetailModel: SmartCodable {
var comprehensive_evaluation: [YHComprehensiveEevaluationModel] = []
var comprehensive_evaluation_selected: [String] = []
var industry_positioning: String = ""
var industry_positioning_other: String = ""
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() {
}
}
...@@ -13,6 +13,12 @@ class YHComprehensiveEvaluationCell: UITableViewCell { ...@@ -13,6 +13,12 @@ class YHComprehensiveEvaluationCell: UITableViewCell {
static let cellReuseIdentifier = "YHComprehensiveEvaluationCell" static let cellReuseIdentifier = "YHComprehensiveEvaluationCell"
var isPass: Bool = false {
didSet {
tipsLabel.attributed.text = isPass ? passText : unPassText
}
}
lazy var markImgV: UIImageView = { lazy var markImgV: UIImageView = {
let v = UIImageView(image: UIImage(named: "my_scheme_mark")) let v = UIImageView(image: UIImage(named: "my_scheme_mark"))
return v return v
...@@ -37,18 +43,18 @@ class YHComprehensiveEvaluationCell: UITableViewCell { ...@@ -37,18 +43,18 @@ class YHComprehensiveEvaluationCell: UITableViewCell {
lazy var tipsLabel: UILabel = { lazy var tipsLabel: UILabel = {
let label = UILabel() let label = UILabel()
label.numberOfLines = 0 label.numberOfLines = 0
label.attributed.text = unsatisfiedText label.attributed.text = unPassText
return label return label
}() }()
lazy var satisfiedText: ASAttributedString = { lazy var passText: ASAttributedString = {
let aa: ASAttributedString = .init("经初步评估,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor)) 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 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)) let cc: ASAttributedString = .init(",您在以下方面具备明显优势,为您感到开心!接下来辛苦您根据指引配合准备申请材料", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
return aa+bb+cc return aa+bb+cc
}() }()
lazy var unsatisfiedText: ASAttributedString = { lazy var unPassText: ASAttributedString = {
let aa: ASAttributedString = .init("经初步评估,", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor)) 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 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)) let cc: ASAttributedString = .init(",在如下方面具备优势,足以证明您的优秀之处!考虑到优才计划的的多维度要求,以及您目前已经具备的良好基础,如果您能进一步去孵化其他条件,后续的申请将会更具竞争力", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.mainTextColor))
......
...@@ -13,6 +13,8 @@ class YHDocumentListCell: UITableViewCell { ...@@ -13,6 +13,8 @@ class YHDocumentListCell: UITableViewCell {
static let cellReuseIdentifier = "YHDocumentListCell" static let cellReuseIdentifier = "YHDocumentListCell"
var rightBtnClick:(()->())?
lazy var whiteContentView: UIView = { lazy var whiteContentView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .white view.backgroundColor = .white
...@@ -59,10 +61,14 @@ class YHDocumentListCell: UITableViewCell { ...@@ -59,10 +61,14 @@ class YHDocumentListCell: UITableViewCell {
button.layer.cornerRadius = kCornerRadius3 button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true button.clipsToBounds = true
button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20) button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20)
// button.addTarget(self, action: #selector(goNext), for: .touchUpInside) button.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
return button return button
}() }()
@objc func didRightBtnClicked() {
rightBtnClick?()
}
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
......
...@@ -12,16 +12,7 @@ class YHHKRequiredItemListCell: UITableViewCell { ...@@ -12,16 +12,7 @@ class YHHKRequiredItemListCell: UITableViewCell {
static let cellReuseIdentifier = "YHHKRequiredItemListCell" static let cellReuseIdentifier = "YHHKRequiredItemListCell"
var arr: [String] = ["申请人是否50岁或以下", var passArr: [YHComprehensiveEevaluationModel] = [] {
"申请人是否持有由合资格大学颁授的硕士或博士学位",
"申请人所持有由合资格大学颁授的硕士或博士学位是否与「STEM」学科有关,即「科学」、「科技」、「工程」或「数学」",
"申请人是否具备两种语言的良好书写及口语能力",
"申请人是否具备良好的英文书写及口语能力",
"申请人是否拥有不少于五年相当于学位程度或专平的工作经验",
"申请人是否拥有不少于三年相当于学位程度或专家水平在跨国公司或知名企业的工作经验,例如上市公司或位列《福布斯》全球企业2000 强、《财富》世界500 强和胡润中国 500 强的企业",
"申请人是否拥有不少于三年相当于学位程度或专家水平在特定领域/行业的工作经验,包括「创新及科技」、「金融」及「国际贸易」(当中包括跨境海运及空运,以及供应链管理)",]
var requireArr: [String] = [] {
didSet { didSet {
listView.removeSubviews() listView.removeSubviews()
listView.addSubview(topView) listView.addSubview(topView)
...@@ -31,9 +22,9 @@ class YHHKRequiredItemListCell: UITableViewCell { ...@@ -31,9 +22,9 @@ class YHHKRequiredItemListCell: UITableViewCell {
} }
var lastItemView: YHHKRequiredItemView? = nil var lastItemView: YHHKRequiredItemView? = nil
for (index, text) in requireArr.enumerated() { for (index, model) in passArr.enumerated() {
let itemView = YHHKRequiredItemView(frame: .zero) let itemView = YHHKRequiredItemView(frame: .zero)
itemView.text = text itemView.text = model.standardName
itemView.backgroundColor = index%2 == 0 ? .white : .init(hex: 0xFBF7F3) itemView.backgroundColor = index%2 == 0 ? .white : .init(hex: 0xFBF7F3)
listView.addSubview(itemView) listView.addSubview(itemView)
itemView.snp.makeConstraints { make in itemView.snp.makeConstraints { make in
...@@ -44,7 +35,7 @@ class YHHKRequiredItemListCell: UITableViewCell { ...@@ -44,7 +35,7 @@ class YHHKRequiredItemListCell: UITableViewCell {
} else { } else {
make.top.equalTo(topView.snp.bottom) make.top.equalTo(topView.snp.bottom)
} }
if index == requireArr.count-1 { if index == passArr.count-1 {
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
} }
} }
...@@ -147,7 +138,5 @@ class YHHKRequiredItemListCell: UITableViewCell { ...@@ -147,7 +138,5 @@ class YHHKRequiredItemListCell: UITableViewCell {
make.left.right.top.equalToSuperview() make.left.right.top.equalToSuperview()
make.height.equalTo(42) make.height.equalTo(42)
} }
requireArr = arr
} }
} }
...@@ -10,6 +10,14 @@ import UIKit ...@@ -10,6 +10,14 @@ import UIKit
class YHImproveHKView: UIView { class YHImproveHKView: UIView {
var item = YHImproveDetailModel() {
didSet {
titleLabel.text = "港府要求:\(item.hk_require)"
tipsLabel.text = item.improve_content
showTemplateBtn = item.templates.count > 0
}
}
var showTemplateBtn: Bool = true { var showTemplateBtn: Bool = true {
didSet { didSet {
templateBtn.isHidden = !showTemplateBtn templateBtn.isHidden = !showTemplateBtn
...@@ -62,7 +70,6 @@ class YHImproveHKView: UIView { ...@@ -62,7 +70,6 @@ class YHImproveHKView: UIView {
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_M(ofSize: 14) label.font = UIFont.PFSC_M(ofSize: 14)
label.textColor = .mainTextColor label.textColor = .mainTextColor
label.text = "港府要求:申请人是否具备良好的英文书写及口语能力申请人是否具备良好的英文书写及口语能力申请人是否具备良好的英文书写及口语能力"
return label return label
}() }()
...@@ -92,7 +99,6 @@ class YHImproveHKView: UIView { ...@@ -92,7 +99,6 @@ class YHImproveHKView: UIView {
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 13) label.font = UIFont.PFSC_R(ofSize: 13)
label.textColor = .init(hex: 0x6D788A) label.textColor = .init(hex: 0x6D788A)
label.text = "如您拥有某业务实体接近某50%的股权主体,且该业务实体在紧接申请前一年,全年盈利达港币500万元或以上(或等值外币),或您通过转股或其他方式孵化实现,即可满足申请条件"
return label return label
}() }()
...@@ -117,7 +123,9 @@ class YHImproveHKView: UIView { ...@@ -117,7 +123,9 @@ class YHImproveHKView: UIView {
} }
@objc func didRightBtnClicked() { @objc func didRightBtnClicked() {
YHImproveSchemeTemplateListView.listView().show() let view = YHImproveSchemeTemplateListView.listView()
view.items = item.templates
view.show()
} }
func setupUI() { func setupUI() {
......
...@@ -22,12 +22,12 @@ class YHImproveItem { ...@@ -22,12 +22,12 @@ class YHImproveItem {
class YHImproveRequireItemView: UIView { class YHImproveRequireItemView: UIView {
var item: YHImproveItem = YHImproveItem(title: "", isSelect: false) { var item: YHComprehensiveEevaluationModel = YHComprehensiveEevaluationModel() {
didSet { didSet {
let a: ASAttributedString = .init(string:"港府要求:" , .font(UIFont.PFSC_M(ofSize: 14)), .foreground(UIColor.mainTextColor)) let a: ASAttributedString = .init(string:"港府要求:" , .font(UIFont.PFSC_M(ofSize: 14)), .foreground(UIColor.mainTextColor))
let b: ASAttributedString = .init(string: item.title , .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor)) let b: ASAttributedString = .init(string: item.standardName , .font(UIFont.PFSC_R(ofSize: 14)), .foreground(UIColor.mainTextColor))
titleLabel.attributed.text = a + b titleLabel.attributed.text = a + b
isSelect = item.isSelect isSelect = item.is_select
} }
} }
...@@ -89,8 +89,8 @@ class YHImproveRequireItemView: UIView { ...@@ -89,8 +89,8 @@ class YHImproveRequireItemView: UIView {
} }
@objc func tap() { @objc func tap() {
item.isSelect = !item.isSelect item.is_select = !item.is_select
isSelect = item.isSelect isSelect = item.is_select
} }
} }
...@@ -13,6 +13,8 @@ class YHImproveSchemeCell: UITableViewCell { ...@@ -13,6 +13,8 @@ class YHImproveSchemeCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveSchemeCell" static let cellReuseIdentifier = "YHImproveSchemeCell"
var rightBtnClick:(()->())?
lazy var whiteContentView: UIView = { lazy var whiteContentView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .white view.backgroundColor = .white
...@@ -57,10 +59,14 @@ class YHImproveSchemeCell: UITableViewCell { ...@@ -57,10 +59,14 @@ class YHImproveSchemeCell: UITableViewCell {
button.layer.cornerRadius = kCornerRadius3 button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true button.clipsToBounds = true
button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20) button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20)
// button.addTarget(self, action: #selector(goNext), for: .touchUpInside) button.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
return button return button
}() }()
@objc func didRightBtnClicked() {
rightBtnClick?()
}
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
......
...@@ -11,6 +11,11 @@ import UIKit ...@@ -11,6 +11,11 @@ import UIKit
class YHImproveSchemeTemplateListCell: UITableViewCell { class YHImproveSchemeTemplateListCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveSchemeTemplateListCell" static let cellReuseIdentifier = "YHImproveSchemeTemplateListCell"
lazy var previewFileTool:YHFilePreviewTool = {
let tool = YHFilePreviewTool(targetVC: UIViewController.current)
return tool
}()
lazy var lineView:UIView = { lazy var lineView:UIView = {
let view = UIView() let view = UIView()
...@@ -23,7 +28,6 @@ class YHImproveSchemeTemplateListCell: UITableViewCell { ...@@ -23,7 +28,6 @@ class YHImproveSchemeTemplateListCell: UITableViewCell {
label.font = UIFont.PFSC_R(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 14)
label.textColor = .mainTextColor label.textColor = .mainTextColor
label.numberOfLines = 0 label.numberOfLines = 0
label.text = "5、持股证明文件.pdf(周年申报表/工商备案的公司章程/验资报告/国家企业信用信息公示报告)"
return label return label
}() }()
...@@ -33,11 +37,17 @@ class YHImproveSchemeTemplateListCell: UITableViewCell { ...@@ -33,11 +37,17 @@ class YHImproveSchemeTemplateListCell: UITableViewCell {
btn.setTitle("查看示例", for: .normal) btn.setTitle("查看示例", for: .normal)
btn.setTitleColor(.mainTextColor, for: .normal) btn.setTitleColor(.mainTextColor, for: .normal)
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 11) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 11)
// btn.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside) btn.addTarget(self, action: #selector(didBtnClicked), for: .touchUpInside)
btn.layer.cornerRadius = kCornerRadius2 btn.layer.cornerRadius = kCornerRadius2
return btn return btn
}() }()
@objc func didBtnClicked() {
if !model.url.isEmpty {
self.previewFileTool.openXLSXRemoteFile(urlString:model.url, fileName:"预览")
}
}
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
...@@ -76,6 +86,5 @@ class YHImproveSchemeTemplateListCell: UITableViewCell { ...@@ -76,6 +86,5 @@ class YHImproveSchemeTemplateListCell: UITableViewCell {
make.right.equalTo(-20) make.right.equalTo(-20)
make.centerY.equalToSuperview() make.centerY.equalToSuperview()
} }
} }
} }
...@@ -15,8 +15,12 @@ class YHImproveSchemeTemplateListView: UIView { ...@@ -15,8 +15,12 @@ class YHImproveSchemeTemplateListView: UIView {
return v return v
} }
var items: [String] = ["", "", "", ""] var items: [YHSchemeTemplatesModel] = [] {
didSet {
tableView.reloadData()
}
}
lazy var blackMaskView: UIView = { lazy var blackMaskView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .alertMaskColor view.backgroundColor = .alertMaskColor
...@@ -133,6 +137,7 @@ extension YHImproveSchemeTemplateListView : UITableViewDelegate, UITableViewData ...@@ -133,6 +137,7 @@ extension YHImproveSchemeTemplateListView : UITableViewDelegate, UITableViewData
if 0 <= indexPath.row && indexPath.row < items.count { if 0 <= indexPath.row && indexPath.row < items.count {
let item = items[indexPath.row] let item = items[indexPath.row]
let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveSchemeTemplateListCell.cellReuseIdentifier, for: indexPath) as! YHImproveSchemeTemplateListCell let cell = tableView.dequeueReusableCell(withIdentifier: YHImproveSchemeTemplateListCell.cellReuseIdentifier, for: indexPath) as! YHImproveSchemeTemplateListCell
cell.titleLabel.text = "\(indexPath.row+1)\(item.name)"
return cell return cell
} }
......
...@@ -13,15 +13,9 @@ class YHImproveTargetCell: UITableViewCell { ...@@ -13,15 +13,9 @@ class YHImproveTargetCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveTargetCell" static let cellReuseIdentifier = "YHImproveTargetCell"
var arr:[YHImproveItem] = { var submitClick:(()->())?
let a = YHImproveItem(title: "申请人拥有不少于两年相当于学位程度或专家水平的国际工作经验", isSelect: false)
let b = YHImproveItem(title: "申请人现时是否拥有一家业务实体,而该业务实体在紧接申请前一年,全年盈利达港币500万元或以上(或等值外币", isSelect: false) var unpassArr: [YHComprehensiveEevaluationModel] = [] {
let c = YHImproveItem(title: "申请人是否具备良好的英文书写及口语能力", isSelect: false)
let d = YHImproveItem(title: "申请人是否拥有不少于五年相当于学位程度或专业水平的工作经验", isSelect: false)
return [a, b, c, d]
}()
var requireArr:[YHImproveItem] = [] {
didSet { didSet {
updateRequireArrUI() updateRequireArrUI()
} }
...@@ -30,7 +24,7 @@ class YHImproveTargetCell: UITableViewCell { ...@@ -30,7 +24,7 @@ class YHImproveTargetCell: UITableViewCell {
func updateRequireArrUI() { func updateRequireArrUI() {
listView.removeSubviews() listView.removeSubviews()
var lastView: YHImproveRequireItemView? = nil var lastView: YHImproveRequireItemView? = nil
for (index, item) in requireArr.enumerated() { for (index, item) in unpassArr.enumerated() {
let view = YHImproveRequireItemView(frame: .zero) let view = YHImproveRequireItemView(frame: .zero)
view.item = item view.item = item
listView.addSubview(view) listView.addSubview(view)
...@@ -41,12 +35,14 @@ class YHImproveTargetCell: UITableViewCell { ...@@ -41,12 +35,14 @@ class YHImproveTargetCell: UITableViewCell {
} else { } else {
make.top.equalTo(0) make.top.equalTo(0)
} }
if index == requireArr.count-1 { if index == unpassArr.count-1 {
make.bottom.equalTo(0) make.bottom.equalTo(0)
} }
} }
lastView = view lastView = view
} }
self.setNeedsLayout()
self.layoutIfNeeded()
} }
lazy var whiteContentView: UIView = { lazy var whiteContentView: UIView = {
...@@ -114,8 +110,13 @@ class YHImproveTargetCell: UITableViewCell { ...@@ -114,8 +110,13 @@ class YHImproveTargetCell: UITableViewCell {
btn.titleLabel?.font = .PFSC_M(ofSize: 16) btn.titleLabel?.font = .PFSC_M(ofSize: 16)
btn.layer.cornerRadius = 3 btn.layer.cornerRadius = 3
btn.setTitle("提交,获取详细方案", for: .normal) btn.setTitle("提交,获取详细方案", for: .normal)
btn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
return btn return btn
}() }()
@objc func didBottomBtnClicked() {
submitClick?()
}
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
...@@ -185,7 +186,5 @@ class YHImproveTargetCell: UITableViewCell { ...@@ -185,7 +186,5 @@ class YHImproveTargetCell: UITableViewCell {
make.bottom.equalTo(-24) make.bottom.equalTo(-24)
make.height.equalTo(46) make.height.equalTo(46)
} }
requireArr = arr
} }
} }
...@@ -12,6 +12,33 @@ class YHImproveTargetListCell: UITableViewCell { ...@@ -12,6 +12,33 @@ class YHImproveTargetListCell: UITableViewCell {
static let cellReuseIdentifier = "YHImproveTargetListCell" 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
itemView.numLabel.text = "\(i+1)"
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 = { lazy var whiteContentView: UIView = {
let v = UIView() let v = UIView()
v.backgroundColor = .white v.backgroundColor = .white
...@@ -103,32 +130,6 @@ class YHImproveTargetListCell: UITableViewCell { ...@@ -103,32 +130,6 @@ class YHImproveTargetListCell: UITableViewCell {
make.bottom.equalTo(-16) make.bottom.equalTo(-16)
make.top.equalTo(lineView.snp.bottom).offset(20) make.top.equalTo(lineView.snp.bottom).offset(20)
} }
listView.removeSubviews()
let arr = ["港府要求:申请人是否具备良好的英文书写及口语能力",
"港府要求:申请人现时是否拥有一家业务实体,而该业务实体在紧接申请前一年,全年盈利达港币500万元或以上(或等值外币)"]
var lastView: YHImproveHKView? = nil
for (i, text) in arr.enumerated() {
let itemView = YHImproveHKView(frame: .zero)
itemView.titleLabel.text = text
itemView.numLabel.text = "\(i)"
itemView.showTemplateBtn = i%2 == 0
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
}
} }
} }
...@@ -13,6 +13,8 @@ class YHMaterialListCell: UITableViewCell { ...@@ -13,6 +13,8 @@ class YHMaterialListCell: UITableViewCell {
static let cellReuseIdentifier = "YHMaterialListCell" static let cellReuseIdentifier = "YHMaterialListCell"
var rightBtnClick:(()->())?
lazy var whiteContentView: UIView = { lazy var whiteContentView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .white view.backgroundColor = .white
...@@ -68,10 +70,14 @@ class YHMaterialListCell: UITableViewCell { ...@@ -68,10 +70,14 @@ class YHMaterialListCell: UITableViewCell {
button.layer.cornerRadius = kCornerRadius3 button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true button.clipsToBounds = true
button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20) button.YH_clickEdgeInsets = UIEdgeInsets(top: 0, left: 20, bottom: 20, right: 20)
// button.addTarget(self, action: #selector(goNext), for: .touchUpInside) button.addTarget(self, action: #selector(didRightBtnClicked), for: .touchUpInside)
return button return button
}() }()
@objc func didRightBtnClicked() {
rightBtnClick?()
}
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
......
...@@ -12,6 +12,8 @@ class YHModifySchemeInfoCell: UITableViewCell { ...@@ -12,6 +12,8 @@ class YHModifySchemeInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHModifySchemeInfoCell" static let cellReuseIdentifier = "YHModifySchemeInfoCell"
var modifyBlock: (()->())?
lazy var bottomBtn: UIButton = { lazy var bottomBtn: UIButton = {
let btn = UIButton() let btn = UIButton()
btn.backgroundColor = .white btn.backgroundColor = .white
...@@ -21,9 +23,14 @@ class YHModifySchemeInfoCell: UITableViewCell { ...@@ -21,9 +23,14 @@ class YHModifySchemeInfoCell: UITableViewCell {
btn.titleLabel?.font = .PFSC_M(ofSize: 16) btn.titleLabel?.font = .PFSC_M(ofSize: 16)
btn.layer.cornerRadius = 3 btn.layer.cornerRadius = 3
btn.setTitle("修改信息", for: .normal) btn.setTitle("修改信息", for: .normal)
btn.addTarget(self, action: #selector(didBottomBtnClicked), for: .touchUpInside)
return btn return btn
}() }()
@objc func didBottomBtnClicked() {
modifyBlock?()
}
lazy var whiteContentView: UIView = { lazy var whiteContentView: UIView = {
let view = UIView() let view = UIView()
view.backgroundColor = .white view.backgroundColor = .white
......
//
// 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 { ...@@ -28,6 +28,15 @@ class YHChildInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
basicInfoVC.child = child basicInfoVC.child = child
} }
} }
var mainApplicantInfo: YHMyMainApplicantInfoModel? {
didSet {
if let mainApplicantInfo = mainApplicantInfo {
primaryInfoVC.mainApplicantInfo = mainApplicantInfo
}
}
}
var stepVCs:[YHFaimilyStepItem] = [] var stepVCs:[YHFaimilyStepItem] = []
var _currentStep = 0 var _currentStep = 0
......
...@@ -11,6 +11,8 @@ import UIKit ...@@ -11,6 +11,8 @@ import UIKit
class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
var child:YHFamilyMember? var child:YHFamilyMember?
var mainApplicantInfo: YHMyMainApplicantInfoModel?
weak var delegate:YHSpouseInfoVCProtocol? weak var delegate:YHSpouseInfoVCProtocol?
var isNeedShowError = false var isNeedShowError = false
// 是否随行能编辑 // 是否随行能编辑
...@@ -113,10 +115,21 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -113,10 +115,21 @@ class YHChildPrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
// 港澳通信证 // 港澳通信证
var isHiddenHK = true var isHiddenHK = true
if child.nationality.contains("中国") { // 中国国籍 if child.nationality.contains("中国") { // 中国国籍
let isLiveInChina = child.address.country.contains("中国".local) if child.isLiveTother() { // 与主申请人同住
if isLiveInChina || (!isLiveInChina && !child.isOverSeasOver1Year()) { if let mainApplicantInfo = mainApplicantInfo {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框 let isLiveInChina = mainApplicantInfo.applicant_address.country.contains("中国".local)
isHiddenHK = false if isLiveInChina || (!isLiveInChina && !mainApplicantInfo.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
} else { // 不与主申请人同住
let isLiveInChina = child.address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !child.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
} }
} }
......
...@@ -49,6 +49,15 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol { ...@@ -49,6 +49,15 @@ class YHSpouseInfoContainerVC: YHBaseViewController, YHSpouseInfoVCProtocol {
} }
} }
} }
var mainApplicantInfo: YHMyMainApplicantInfoModel? {
didSet {
if let mainApplicantInfo = mainApplicantInfo {
primaryInfoVC.mainApplicantInfo = mainApplicantInfo
}
}
}
var _currentStep = 0 var _currentStep = 0
var currentStep:Int { var currentStep:Int {
......
...@@ -13,6 +13,8 @@ import SwifterSwift ...@@ -13,6 +13,8 @@ import SwifterSwift
class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
var spouse:YHFamilyMember? var spouse:YHFamilyMember?
var mainApplicantInfo: YHMyMainApplicantInfoModel?
weak var delegate:YHSpouseInfoVCProtocol? weak var delegate:YHSpouseInfoVCProtocol?
// 是否显示未填写错误提示 // 是否显示未填写错误提示
var isNeedShowError = false var isNeedShowError = false
...@@ -117,10 +119,21 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol { ...@@ -117,10 +119,21 @@ class YHSpousePrimaryInfoVC: YHBaseViewController, YHFamilyMemberProtol {
// 港澳通信证 // 港澳通信证
var isHiddenHK = true var isHiddenHK = true
if spouse.nationality.contains("中国") { // 中国国籍 if spouse.nationality.contains("中国") { // 中国国籍
let isLiveInChina = spouse.address.country.contains("中国".local) if spouse.isLiveTother() { // 与主申请人同住
if isLiveInChina || (!isLiveInChina && !spouse.isOverSeasOver1Year()) { if let mainApplicantInfo = mainApplicantInfo {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框 let isLiveInChina = mainApplicantInfo.applicant_address.country.contains("中国".local)
isHiddenHK = false if isLiveInChina || (!isLiveInChina && !mainApplicantInfo.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
}
} else { // 不与主申请人同住
let isLiveInChina = spouse.address.country.contains("中国".local)
if isLiveInChina || (!isLiveInChina && !spouse.isOverSeasOver1Year()) {
// 中国国籍&居住国内、中国国籍&居住国外不满一年 需展示“港澳通行证”询问框
isHiddenHK = false
}
} }
} }
......
...@@ -592,38 +592,40 @@ extension YHFamilyMemberInfoListVC : UITableViewDelegate, UITableViewDataSource ...@@ -592,38 +592,40 @@ extension YHFamilyMemberInfoListVC : UITableViewDelegate, UITableViewDataSource
// 配偶 // 配偶
if detailItem.relationType == .spouse { if detailItem.relationType == .spouse {
let vc = YHSpouseInfoContainerVC() let vc = YHSpouseInfoContainerVC()
vc.spouse = detailItem vc.spouse = detailItem
vc.orderId = orderId vc.mainApplicantInfo = self.familyMemberInfo?.applicant
self.navigationController?.pushViewController(vc) vc.orderId = orderId
return self.navigationController?.pushViewController(vc)
return
} }
// 父母 // 父母
if detailItem.relationType == .father || detailItem.relationType == .mother { if detailItem.relationType == .father || detailItem.relationType == .mother {
let vc = YHParentInfoVC() let vc = YHParentInfoVC()
vc.parentInfo = detailItem vc.parentInfo = detailItem
vc.orderId = orderId vc.orderId = orderId
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
return return
} }
// 子女 // 子女
if detailItem.relationType == .child { if detailItem.relationType == .child {
let vc = YHChildInfoContainerVC() let vc = YHChildInfoContainerVC()
vc.child = detailItem vc.child = detailItem
vc.orderId = orderId vc.mainApplicantInfo = self.familyMemberInfo?.applicant
self.navigationController?.pushViewController(vc) vc.orderId = orderId
return self.navigationController?.pushViewController(vc)
return
} }
// 兄弟姐妹 // 兄弟姐妹
if detailItem.relationType == .brother { if detailItem.relationType == .brother {
let vc = YHBrotherInfoVC() let vc = YHBrotherInfoVC()
vc.orderId = orderId vc.orderId = orderId
vc.brotherInfo = detailItem vc.brotherInfo = detailItem
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
return return
} }
} }
......
...@@ -539,6 +539,7 @@ class YHFormDetailItem : YHFormItemProtocol { ...@@ -539,6 +539,7 @@ class YHFormDetailItem : YHFormItemProtocol {
/* ***** ***** ***** ***** ***** ***** ***** ***** */ /* ***** ***** ***** ***** ***** ***** ***** ***** */
// MARK: - 家庭成员 YHData // MARK: - 家庭成员 YHData
class YHFamilyMemberGroupInfo: SmartCodable { class YHFamilyMemberGroupInfo: SmartCodable {
...@@ -547,6 +548,7 @@ class YHFamilyMemberGroupInfo: SmartCodable { ...@@ -547,6 +548,7 @@ class YHFamilyMemberGroupInfo: SmartCodable {
var spouse: YHFamilyMember? var spouse: YHFamilyMember?
var child: [YHFamilyMember]? var child: [YHFamilyMember]?
var brother: [YHFamilyMember]? var brother: [YHFamilyMember]?
var applicant: YHMyMainApplicantInfoModel?
enum CodingKeys: String, CodingKey { enum CodingKeys: String, CodingKey {
case father = "father" case father = "father"
...@@ -554,6 +556,7 @@ class YHFamilyMemberGroupInfo: SmartCodable { ...@@ -554,6 +556,7 @@ class YHFamilyMemberGroupInfo: SmartCodable {
case spouse = "spouse" case spouse = "spouse"
case brother = "brother" case brother = "brother"
case child = "child" case child = "child"
case applicant = "applicant"
} }
func checkDefaultValue() -> Self { func checkDefaultValue() -> Self {
...@@ -589,7 +592,23 @@ enum YHFamilyMemberType: Int { ...@@ -589,7 +592,23 @@ enum YHFamilyMemberType: Int {
case brother = 5 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 { class YHFamilyMember: SmartCodable, YHFormItemProtocol {
......
...@@ -13,13 +13,16 @@ import UIKit ...@@ -13,13 +13,16 @@ import UIKit
class YHIncomeRecordViewController: YHBaseViewController { class YHIncomeRecordViewController: YHBaseViewController {
enum TableRow { enum TableRow {
case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false) case incomeSummary(_ isEditing: Bool = false, _ isEditEnable: Bool = false)
case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String) case incomeItem(_ isEditState: Bool = false, _ company: String, _ money: String, _ timeStr: String, _ incomeId: Int)
case totalIncome(_ money: ASAttributedString) case totalIncome(_ money: ASAttributedString)
case consentForHKTravel(_ title: String, _ detail: ASAttributedString, _ question: String, _ isSelectSureBtn: Bool = true) case consentForHKTravel(_ title: String, _ detail: ASAttributedString, _ question: String, _ isSelectSureBtn: Bool = true)
} }
private lazy var datas: [[TableRow]] = [] private lazy var datas: [[TableRow]] = []
private lazy var viewModel = YHIncomeRecordViewModel()
private var incomeModel = YHIncomeRecordCompleteModel()
private lazy var saveButton: UIButton = { private lazy var saveButton: UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15) button.titleLabel?.font = UIFont.PFSC_M(ofSize: 15)
...@@ -76,11 +79,21 @@ class YHIncomeRecordViewController: YHBaseViewController { ...@@ -76,11 +79,21 @@ class YHIncomeRecordViewController: YHBaseViewController {
view.keyboardDismissMode = .onDrag view.keyboardDismissMode = .onDrag
return view 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() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
setupData() requestData(isNeedLoading: true)
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
...@@ -96,11 +109,11 @@ class YHIncomeRecordViewController: YHBaseViewController { ...@@ -96,11 +109,11 @@ class YHIncomeRecordViewController: YHBaseViewController {
extension YHIncomeRecordViewController { extension YHIncomeRecordViewController {
@objc private func clickSaveButton() { @objc private func clickSaveButton() {
// updateIncome(.save)
} }
@objc private func clickSubmitButton() { @objc private func clickSubmitButton() {
// updateIncome(.submit)
} }
private func setupUI() { private func setupUI() {
...@@ -145,12 +158,36 @@ extension YHIncomeRecordViewController { ...@@ -145,12 +158,36 @@ extension YHIncomeRecordViewController {
private func setupData() { private func setupData() {
let detail: ASAttributedString = .init(string: "备注:全年收入是指应课税(应纳所得税)的就业或业务收入,包括工资薪金、津贴、股票期权及从其拥有的公司所得的利润。由个人投资所产生的收入不会计算在内。", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray)) let detail: ASAttributedString = .init(string: "备注:全年收入是指应课税(应纳所得税)的就业或业务收入,包括工资薪金、津贴、股票期权及从其拥有的公司所得的利润。由个人投资所产生的收入不会计算在内。", .font(UIFont.PFSC_R(ofSize: 13)), .foreground(UIColor(hexString: "#8993A2") ?? .gray))
let firstSection: [TableRow] = [.consentForHKTravel("收入情况", detail, "您在前一年,全年收入是否达港币100万元或以上", true)] let firstSection: [TableRow] = [.consentForHKTravel("收入情况", detail, "您在前一年,全年收入是否达港币100万元或以上", incomeModel.income_over_100 == YHIncomeOver100.true.rawValue)]
let totalMoney: ASAttributedString = .init(string: "约 ", .font(.PFSC_R(ofSize: 14))) + .init(string: "1,351,517", .font(UIFont(name: "DINAlternate-Bold", size: 20) ?? UIFont.systemFont(ofSize: 20))) + .init(string: " 港币", .font(.PFSC_R(ofSize: 14))) guard incomeModel.income_over_100 == YHIncomeOver100.true.rawValue else {
let secondSection: [TableRow] = [.incomeSummary(false, false), .incomeItem(false, "华为有限公司", "约1,234,234港币", "已填写"), .incomeItem(false, "腾讯有限公司", "约1,234,234港币", "有5项未填写"), .totalIncome(totalMoney)] 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] datas = [firstSection, secondSection]
tableView.reloadData() 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 { extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSource {
...@@ -182,7 +219,7 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour ...@@ -182,7 +219,7 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour
cell.setupCellInfo(isEditState, isEditEnable, showRightButton: false) cell.setupCellInfo(isEditState, isEditEnable, showRightButton: false)
return cell return cell
} }
case let .incomeItem(isEditState, company, money, timeStr): case let .incomeItem(isEditState, company, money, timeStr, _):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeRecordItemCell.cellReuseIdentifier) as? YHIncomeRecordItemCell {
cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: false) cell.setupCellInfo(title: company, detail: money, rightText: timeStr, isEditing: isEditState, showBottomLine: false)
return cell return cell
...@@ -190,16 +227,24 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour ...@@ -190,16 +227,24 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour
case let .totalIncome(money): case let .totalIncome(money):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHTotalIncomeCell.cellReuseIdentifier) as? YHTotalIncomeCell {
cell.setupCellInfo(detail: money) cell.setupCellInfo(detail: money)
cell.didClickInfoButton = { cell.didClickInfoButton = { [weak self] in
YHHUD.flash(message: "注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准") guard let self = self else {
return
}
let rate = self.incomeModel.rate > 0 ? self.incomeModel.rate : 0.92
YHHUD.flash(message: "注:按1港币≈\(rate)人民币计算,实际金额按递交时入境处给出的汇率为准")
} }
return cell return cell
} }
case let .consentForHKTravel(title, detail, question, isSelectSureBtn): case let .consentForHKTravel(title, detail, question, isSelectSureBtn):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier) as? YHInfoConsentForHKTravelCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHInfoConsentForHKTravelCell.cellReuseIdentifier) as? YHInfoConsentForHKTravelCell {
cell.setupCellInfo(title: title, detail: detail, question: question) cell.setupCellInfo(title: title, detail: detail, question: question)
cell.didSelectSureButton = { _ in 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 cell.selectedSureButton = isSelectSureBtn
return cell return cell
...@@ -231,9 +276,61 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour ...@@ -231,9 +276,61 @@ extension YHIncomeRecordViewController: UITableViewDelegate, UITableViewDataSour
return return
} }
let tableRow = sectionArr[indexPath.row] let tableRow = sectionArr[indexPath.row]
if case .incomeItem = tableRow { if case let .incomeItem(_, _, _, _, incomeId) = tableRow {
let ctl = YHIncomeRecordWorkExperienceViewController() let ctl = YHIncomeRecordWorkExperienceViewController(incomeId: incomeId)
ctl.submitSuccess = { [weak self] in
self?.requestData(isNeedLoading: true)
}
navigationController?.pushViewController(ctl, animated: 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)
}
}
}
}
...@@ -14,17 +14,22 @@ class YHIncomeRecordWorkExperienceViewController: YHBaseViewController { ...@@ -14,17 +14,22 @@ class YHIncomeRecordWorkExperienceViewController: YHBaseViewController {
case header(_ title: String) case header(_ title: String)
case incomeFrom(_ title: String, _ detail: String) case incomeFrom(_ title: String, _ detail: String)
case incomeTypeSelect(_ title: String, _ detail: String, _ isSelectedOne: Bool) case incomeTypeSelect(_ title: String, _ detail: String, _ isSelectedOne: Bool)
case incomeTypes(_ types: [String]) case incomeTypes(_ types: [YHIncomeType])
case inputMoney(_ title: String, _ detail: String?, _ inputStr: String?, _ showBottomLine: Bool, _ showStar: Bool) case inputMoney(_ title: String, _ detail: String?, _ inputStr: String?, _ showBottomLine: Bool, _ showStar: Bool, _ isIncomeMoney: Bool)
case inputRemark(_ detail: String) case inputRemark(_ detail: String)
case documentComfirm(_ title: String, _ question: String, _ isSelectedSure: Bool, _ docs: [String]) case documentComfirm(_ title: String, _ question: String, _ isSelectedSure: Bool, _ docs: [String])
} }
private lazy var datas: [[TableRow]] = [] private lazy var datas: [[TableRow]] = []
private var selectedTypes: [String] = [] private var selectedTypes: [YHIncomeType] = []
private let currencyRate = 0.92 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 = { private lazy var submitButton: UIButton = {
let button = UIButton(type: .custom) let button = UIButton(type: .custom)
...@@ -71,11 +76,21 @@ class YHIncomeRecordWorkExperienceViewController: YHBaseViewController { ...@@ -71,11 +76,21 @@ class YHIncomeRecordWorkExperienceViewController: YHBaseViewController {
view.keyboardDismissMode = .onDrag view.keyboardDismissMode = .onDrag
return view 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() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
setupUI() setupUI()
setupData() requestData(isNeedLoading: true)
} }
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
...@@ -87,11 +102,33 @@ class YHIncomeRecordWorkExperienceViewController: YHBaseViewController { ...@@ -87,11 +102,33 @@ class YHIncomeRecordWorkExperienceViewController: YHBaseViewController {
super.viewWillDisappear(animated) super.viewWillDisappear(animated)
IQKeyboardManager.shared.enable = false 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 { extension YHIncomeRecordWorkExperienceViewController {
@objc private func clickSubmitButton() { @objc private func clickSubmitButton() {
// submitIncome(.submit, complete: { _ in })
} }
private func setupUI() { private func setupUI() {
...@@ -127,15 +164,32 @@ extension YHIncomeRecordWorkExperienceViewController { ...@@ -127,15 +164,32 @@ extension YHIncomeRecordWorkExperienceViewController {
} }
private func setupData() { private func setupData() {
selectedTypes = ["工资薪金所得及全年一次性奖金", "个体工商户/合伙企业/独资企业经营所得收入", "其他境外公司收入(持股50%及以上)"] selectedTypes = companyModel.income_type.compactMap {
let firstSection: [TableRow] = [.header("收入信息"), .incomeFrom("收入来源公司", "华为科技有限公司"), .incomeTypeSelect("收入类型(多选)", "请选择", selectedTypes.count > 0), .incomeTypes(selectedTypes), .inputMoney("公司营业额(近一年)", "约10,869,564港币", "¥9,999,999", true, false), .inputMoney("收入金额", "约10,869,564港币", "¥9,999,999", false, true), .inputRemark("注:按1港币≈0.92人民币计算,实际金额按递交时入境处给出的汇率为准")] YHIncomeType(rawValue: $0)
}
let secondSection: [TableRow] = [.documentComfirm("证件提供确认", "您是否可以提供以下所有证明文件", true, ["验资报告", "审计报告", "绝对实益拥有人声明书", "国家企业信用信息公示系统报告", "企业所得税月(季)度预缴纳税申报表(A类)", "企业所得税完税证明", "企业所得税年度纳税申报表(A类)"])] 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] datas = [firstSection, secondSection]
tableView.reloadData() tableView.reloadData()
} }
private func showSelectIncomeTypePopVC(selectedTypes: [String]) { private func showSelectIncomeTypePopVC(selectedTypes: [YHIncomeType]) {
let ctl = YHIncomeTypeSelectViewController(selectedTypes: selectedTypes) let ctl = YHIncomeTypeSelectViewController(selectedTypes: selectedTypes)
let bpc = YHBottomPresentationController(presentedViewController: ctl, presenting: self) let bpc = YHBottomPresentationController(presentedViewController: ctl, presenting: self)
bpc.customRadius = 8.0 bpc.customRadius = 8.0
...@@ -151,8 +205,10 @@ extension YHIncomeRecordWorkExperienceViewController { ...@@ -151,8 +205,10 @@ extension YHIncomeRecordWorkExperienceViewController {
} }
private func updateSelectTypes() { private func updateSelectTypes() {
companyModel.income_type = selectedTypes.map { $0.rawValue }
var incomeTypesIndexPath: IndexPath? var incomeTypesIndexPath: IndexPath?
var incomeTypeSelectIndexPath: IndexPath? var incomeTypeSelectIndexPath: IndexPath?
var docIndexPath: IndexPath?
datas = datas.enumerated().map { section, sectionArr in datas = datas.enumerated().map { section, sectionArr in
sectionArr.enumerated().map { row, tableRow in sectionArr.enumerated().map { row, tableRow in
switch tableRow { switch tableRow {
...@@ -162,6 +218,14 @@ extension YHIncomeRecordWorkExperienceViewController { ...@@ -162,6 +218,14 @@ extension YHIncomeRecordWorkExperienceViewController {
case let .incomeTypeSelect(title, detail, _): case let .incomeTypeSelect(title, detail, _):
incomeTypeSelectIndexPath = IndexPath(row: row, section: section) incomeTypeSelectIndexPath = IndexPath(row: row, section: section)
return .incomeTypeSelect(title, detail, selectedTypes.count > 0) 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: default:
return tableRow return tableRow
} }
...@@ -184,9 +248,16 @@ extension YHIncomeRecordWorkExperienceViewController { ...@@ -184,9 +248,16 @@ extension YHIncomeRecordWorkExperienceViewController {
sectionArr.remove(at: incomeTypesIndexPath.row) sectionArr.remove(at: incomeTypesIndexPath.row)
datas[incomeTypesIndexPath.section] = sectionArr datas[incomeTypesIndexPath.section] = sectionArr
} }
tableView.performBatchUpdates { [weak tableView] in if let secondSection = docIndexPath?.section {
tableView?.reloadSections(IndexSet(integer: incomeTypeSelectIndexPath.section), with: .automatic) 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 { private func currencyFormat(_ currencySymbol: String) -> NumberFormatter {
...@@ -238,7 +309,7 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -238,7 +309,7 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
} }
case let .incomeTypes(types): case let .incomeTypes(types):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypesCell.cellReuseIdentifier) as? YHIncomeTypesCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypesCell.cellReuseIdentifier) as? YHIncomeTypesCell {
cell.setupCellInfo(types: types) cell.setupCellInfo(types: types.map { $0.nameString() })
cell.didClickTypeView = { [weak self] index in cell.didClickTypeView = { [weak self] index in
guard let self = self else { guard let self = self else {
return return
...@@ -248,7 +319,7 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -248,7 +319,7 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
} }
return cell return cell
} }
case let .inputMoney(title, detail, inputStr, showBottomLine, showStar): case let .inputMoney(title, detail, inputStr, showBottomLine, showStar, isIncomeMoney):
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeInputMoneyCell.cellReuseIdentifier) as? YHIncomeInputMoneyCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeInputMoneyCell.cellReuseIdentifier) as? YHIncomeInputMoneyCell {
cell.setupCellInfo(title: title, detail: detail, inputValue: inputStr, showBottomLine: showBottomLine, showStarIcon: showStar) cell.setupCellInfo(title: title, detail: detail, inputValue: inputStr, showBottomLine: showBottomLine, showStarIcon: showStar)
cell.didBeginEditing = { textField in cell.didBeginEditing = { textField in
...@@ -268,6 +339,12 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -268,6 +339,12 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
let number = Double(text) ?? 0 let number = Double(text) ?? 0
// 格式化为带货币符号和千分位 // 格式化为带货币符号和千分位
let detail = number / self.currencyRate let detail = number / self.currencyRate
if isIncomeMoney {
self.companyModel.income_money = number
} else {
self.companyModel.corporate_turnover = number
}
let rmbFormatter = self.currencyFormat("¥") let rmbFormatter = self.currencyFormat("¥")
let hkdFormatter = self.currencyFormat("") let hkdFormatter = self.currencyFormat("")
if let formattedString = rmbFormatter.string(from: NSNumber(value: number)) { if let formattedString = rmbFormatter.string(from: NSNumber(value: number)) {
...@@ -277,8 +354,8 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -277,8 +354,8 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
let sectionArr = self.datas[indexPath.section] let sectionArr = self.datas[indexPath.section]
if sectionArr.count > indexPath.row { if sectionArr.count > indexPath.row {
let currentRow = sectionArr[indexPath.row] let currentRow = sectionArr[indexPath.row]
if case let .inputMoney(title, detail, inputStr, showBottomLine, showStar) = currentRow { if case let .inputMoney(title, _, _, showBottomLine, showStar, isIncomeMoney) = currentRow {
self.datas[indexPath.section][indexPath.row] = .inputMoney(title, detailStr, formattedString, showBottomLine, showStar) self.datas[indexPath.section][indexPath.row] = .inputMoney(title, detailStr, formattedString, showBottomLine, showStar, isIncomeMoney)
self.tableView.reloadRows(at: [indexPath], with: .automatic) self.tableView.reloadRows(at: [indexPath], with: .automatic)
} }
} }
...@@ -296,6 +373,17 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -296,6 +373,17 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeDocumentationConfirmationCell.cellReuseIdentifier) as? YHIncomeDocumentationConfirmationCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeDocumentationConfirmationCell.cellReuseIdentifier) as? YHIncomeDocumentationConfirmationCell {
cell.setupCellInfo(title: title, question: question, documents: docs) cell.setupCellInfo(title: title, question: question, documents: docs)
cell.selectedSureButton = isSelectedSure 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 cell
} }
} }
...@@ -330,3 +418,59 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -330,3 +418,59 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
} }
} }
} }
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)
}
}
}
}
}
...@@ -66,23 +66,15 @@ class YHIncomeTypeSelectViewController: YHBaseViewController { ...@@ -66,23 +66,15 @@ class YHIncomeTypeSelectViewController: YHBaseViewController {
}() }()
private lazy var datas: [YHIncomeTypeSelectModel] = { private lazy var datas: [YHIncomeTypeSelectModel] = {
["工资薪金所得及全年一次性奖金", YHIncomeType.allCases.map {
"上市公司股票期权或股权收入", YHIncomeTypeSelectModel(type: $0, isSelected: false)
"持股公司分红收入",
"个体工商户/合伙企业/独资企业经营所得收入",
"股权转让收入",
"内地公司收入(持股50%及以上)",
"香港公司收入(持股50%及以上)",
"澳门公司收入(持股50%及以上)",
"其他境外公司收入(持股50%及以上)"].map {
YHIncomeTypeSelectModel(title: $0, isSelected: false)
} }
}() }()
var sureButtonEvent: (([String]) -> Void)? var sureButtonEvent: (([YHIncomeType]) -> Void)?
private var selectedTypes: [String] = [] private var selectedTypes: [YHIncomeType] = []
init(selectedTypes: [String]) { init(selectedTypes: [YHIncomeType]) {
self.selectedTypes = selectedTypes self.selectedTypes = selectedTypes
super.init(nibName: nil, bundle: nil) super.init(nibName: nil, bundle: nil)
} }
...@@ -98,7 +90,7 @@ class YHIncomeTypeSelectViewController: YHBaseViewController { ...@@ -98,7 +90,7 @@ class YHIncomeTypeSelectViewController: YHBaseViewController {
} }
@objc private func clickSureButton() { @objc private func clickSureButton() {
sureButtonEvent?(selectedTypes) sureButtonEvent?(selectedTypes.sorted(by: { $0.rawValue < $1.rawValue }))
dismiss(animated: true) dismiss(animated: true)
} }
...@@ -162,7 +154,7 @@ class YHIncomeTypeSelectViewController: YHBaseViewController { ...@@ -162,7 +154,7 @@ class YHIncomeTypeSelectViewController: YHBaseViewController {
guard let self = self else { guard let self = self else {
return return
} }
if self.selectedTypes.contains(model.title) { if self.selectedTypes.contains(model.type) {
model.isSelected = true model.isSelected = true
} }
} }
...@@ -187,7 +179,7 @@ extension YHIncomeTypeSelectViewController: UITableViewDelegate, UITableViewData ...@@ -187,7 +179,7 @@ extension YHIncomeTypeSelectViewController: UITableViewDelegate, UITableViewData
} }
let model = datas[indexPath.section] let model = datas[indexPath.section]
if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypePopViewSelectCell.cellReuseIdentifier) as? YHIncomeTypePopViewSelectCell { if let cell = tableView.dequeueReusableCell(withIdentifier: YHIncomeTypePopViewSelectCell.cellReuseIdentifier) as? YHIncomeTypePopViewSelectCell {
cell.setupCellInfo(title: model.title, isSelected: model.isSelected) cell.setupCellInfo(title: model.type.nameString(), isSelected: model.isSelected)
return cell return cell
} }
return UITableViewCell() return UITableViewCell()
...@@ -221,12 +213,12 @@ extension YHIncomeTypeSelectViewController: UITableViewDelegate, UITableViewData ...@@ -221,12 +213,12 @@ extension YHIncomeTypeSelectViewController: UITableViewDelegate, UITableViewData
let model = datas[indexPath.section] let model = datas[indexPath.section]
model.isSelected.toggle() model.isSelected.toggle()
if model.isSelected { if model.isSelected {
if !selectedTypes.contains(model.title) { if !selectedTypes.contains(model.type) {
selectedTypes.append(model.title) selectedTypes.append(model.type)
} }
} else { } else {
if let index = selectedTypes.firstIndex(where: { title in if let index = selectedTypes.firstIndex(where: { type in
title == model.title type == model.type
}) { }) {
selectedTypes.remove(at: index) selectedTypes.remove(at: index)
} }
......
//
// 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 ["财务报表",
"合法纳税及完税证明",
"公司所有权官方证明文件"]
}
}
}
...@@ -9,11 +9,11 @@ ...@@ -9,11 +9,11 @@
import UIKit import UIKit
class YHIncomeTypeSelectModel: NSObject { class YHIncomeTypeSelectModel: NSObject {
var title: String = ""
var isSelected: Bool = false var isSelected: Bool = false
var type: YHIncomeType = .businessIncome
init(title: String, isSelected: Bool) { init(type: YHIncomeType, isSelected: Bool) {
self.title = title self.type = type
self.isSelected = isSelected self.isSelected = isSelected
} }
......
...@@ -50,7 +50,8 @@ class YHIncomeRecordSummaryCell: YHResignDocumentCell { ...@@ -50,7 +50,8 @@ class YHIncomeRecordSummaryCell: YHResignDocumentCell {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
func setupCellInfo(_ isEditing: Bool, _ isEditEnable: Bool, showRightButton: Bool) { func setupCellInfo(_ isEditing: Bool, _ isEditEnable: Bool, showRightButton: Bool, showBottomLine: Bool = true) {
bottomLineView.isHidden = !showBottomLine
rightButton.isHidden = !showRightButton rightButton.isHidden = !showRightButton
rightButton.isEnabled = isEditEnable rightButton.isEnabled = isEditEnable
updateRightButtonState(isEditing) updateRightButtonState(isEditing)
...@@ -100,8 +101,8 @@ extension YHIncomeRecordSummaryCell { ...@@ -100,8 +101,8 @@ extension YHIncomeRecordSummaryCell {
bottomLineView.snp.makeConstraints { make in bottomLineView.snp.makeConstraints { make in
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
make.left.equalToSuperview().offset(18) make.left.equalToSuperview()
make.right.equalToSuperview().offset(-18) make.right.equalToSuperview()
make.height.equalTo(0.5) make.height.equalTo(0.5)
make.top.equalTo(infoDetailLabel.snp.bottom).offset(16) make.top.equalTo(infoDetailLabel.snp.bottom).offset(16)
} }
......
...@@ -51,6 +51,8 @@ class YHIncomeTypesCell: YHResignDocumentCell { ...@@ -51,6 +51,8 @@ class YHIncomeTypesCell: YHResignDocumentCell {
return return
} }
let typeView = YHIncomeTypeView() let typeView = YHIncomeTypeView()
typeView.clipsToBounds = true
typeView.layer.cornerRadius = 3
typeView.setupInfo(title) typeView.setupInfo(title)
typeView.closeButtonEvent = { [weak self] in typeView.closeButtonEvent = { [weak self] in
guard let self = self else { guard let self = self else {
......
...@@ -95,7 +95,8 @@ class YHInfoConsentForHKTravelCell: YHResignDocumentCell { ...@@ -95,7 +95,8 @@ class YHInfoConsentForHKTravelCell: YHResignDocumentCell {
fatalError("init(coder:) has not been implemented") fatalError("init(coder:) has not been implemented")
} }
func setupCellInfo(title: String, detail: ASAttributedString, question: String) { func setupCellInfo(title: String, detail: ASAttributedString, question: String, showBottomLine: Bool = false) {
bottomLineView.isHidden = !showBottomLine
infoTitleLabel.text = title infoTitleLabel.text = title
infoDetailLabel.attributed.text = detail infoDetailLabel.attributed.text = detail
infoQuestionLabel.text = question infoQuestionLabel.text = question
......
//
// 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)
}
}
}
...@@ -112,6 +112,25 @@ extension YHOtherInfoFillViewController { ...@@ -112,6 +112,25 @@ extension YHOtherInfoFillViewController {
private func submitDataOp(flag : Bool) { private func submitDataOp(flag : Bool) {
//提交 //提交
let model = otherInfoVM.otherInfoFillData let model = otherInfoVM.otherInfoFillData
//处理提交的数据 //for test hjl
var tID = 0
if let arr = model?.language_detail_new, arr.count > 0 {
tID = arr[0].id
}
let fakeData : LanguageDetailNew = LanguageDetailNew()
fakeData.id = tID
fakeData.first_select = 3
fakeData.second_select = "1"
fakeData.other_instructions = "DavidTest"
model?.language_detail_new = [fakeData]
model?.is_update = flag model?.is_update = flag
//保存 //保存
if let param = model?.toDictionary() { if let param = model?.toDictionary() {
...@@ -145,27 +164,27 @@ extension YHOtherInfoFillViewController { ...@@ -145,27 +164,27 @@ extension YHOtherInfoFillViewController {
private func dataIsOK() -> Bool { private func dataIsOK() -> Bool {
var returnValue : Bool = true var returnValue : Bool = true
if let model = otherInfoVM.otherInfoFillData { if let model = otherInfoVM.otherInfoFillData {
//1.居住信息 // //1.居住信息
for item in model.residences { // for item in model.residences {
if item.country.isEmpty || item.start_time.isEmpty || item.end_time.isEmpty { // if item.country.isEmpty || item.start_time.isEmpty || item.end_time.isEmpty {
returnValue = false // returnValue = false
return returnValue // return returnValue
} // }
} // }
//2.语言水平 // //2.语言水平
if model.language_detail?.levelDes.isEmpty == true { // if model.language_detail?.levelDes.isEmpty == true {
returnValue = false // returnValue = false
return returnValue // return returnValue
} else { // } else {
if let language = model.language_detail,language.level == 4 { // if let language = model.language_detail,language.level == 4 {
if language.name.isEmpty || language.remark.isEmpty { // if language.name.isEmpty || language.remark.isEmpty {
returnValue = false // returnValue = false
return returnValue // return returnValue
} // }
} // }
//
} // }
//3.专业技能行业 //3.专业技能行业
if model.profession?.optionDes.isEmpty == true { if model.profession?.optionDes.isEmpty == true {
......
...@@ -13,6 +13,13 @@ class YHOtherInfoFillModel: SmartCodable { ...@@ -13,6 +13,13 @@ class YHOtherInfoFillModel: SmartCodable {
var order_id: String = "" var order_id: String = ""
var residences: [Residence] = [] var residences: [Residence] = []
var language_detail: LanguageDetail? var language_detail: LanguageDetail?
//服务器返回
var language_detail_new : [LanguageDetailNew] = []
//数据储存在各端的数据
var language_detail_new_data : [LanguageDetailModel] = []
var profession: Profession? var profession: Profession?
var question: Question? var question: Question?
var is_update : Bool = false //true-提交 false-保存 var is_update : Bool = false //true-提交 false-保存
...@@ -63,6 +70,40 @@ class LanguageDetail : SmartCodable { ...@@ -63,6 +70,40 @@ class LanguageDetail : SmartCodable {
} }
} }
class LanguageDetailNew : SmartCodable {
var id: Int = 0
var first_select: Int = 0
var second_select : String = "" //"1,2,3" 兼容多选
var other_instructions: String = ""
required init() {
}
}
class LanguageOptionModel : SmartCodable {
var id: Int = 0
var name: String = ""
var select : Bool = false
var subname: String = ""
var highlight : String = ""
required init() {
}
}
class LanguageDetailModel : SmartCodable {
var id: Int = 0
var name: String = ""
var select : Bool = false
var other_instructions: String = ""
var options : [LanguageOptionModel] = []
required init() {
}
}
// MARK: - Profession // MARK: - Profession
class Profession : SmartCodable{ class Profession : SmartCodable{
var option: Int = -1 var option: Int = -1
......
...@@ -54,6 +54,11 @@ class YHOtherInfoFillCell: UITableViewCell { ...@@ -54,6 +54,11 @@ class YHOtherInfoFillCell: UITableViewCell {
let languageView = YHOtherSelecteItemView() let languageView = YHOtherSelecteItemView()
let skillView = YHOtherSelecteItemView() let skillView = YHOtherSelecteItemView()
private lazy var languageViewNew : YHOtherLanguageSelecteView = {
let view = YHOtherLanguageSelecteView()
return view
}()
} }
extension YHOtherInfoFillCell { extension YHOtherInfoFillCell {
...@@ -71,133 +76,134 @@ extension YHOtherInfoFillCell { ...@@ -71,133 +76,134 @@ extension YHOtherInfoFillCell {
contentView.backgroundColor = .clear contentView.backgroundColor = .clear
backgroundColor = .clear backgroundColor = .clear
//1.居住信息 // //1.居住信息
let holdView1 = createHoldView() // let holdView1 = createHoldView()
contentView.addSubview(holdView1) // contentView.addSubview(holdView1)
holdView1.snp.makeConstraints { make in // holdView1.snp.makeConstraints { make in
make.top.left.right.equalToSuperview() // make.top.left.right.equalToSuperview()
} // }
//
do { // do {
//
var lastTargetView : UIView! // var lastTargetView : UIView!
if dataModel.residences.count > 1 { // if dataModel.residences.count > 1 {
for (index,item) in dataModel.residences.enumerated() { // for (index,item) in dataModel.residences.enumerated() {
if index == 0 { // if index == 0 {
let sessionView = YHOtherInfoSessionView(frame: .zero) // let sessionView = YHOtherInfoSessionView(frame: .zero)
sessionView.type = 3 // sessionView.type = 3
sessionView.updateTitle(title: "居住信息") // sessionView.updateTitle(title: "居住信息")
holdView1.addSubview(sessionView) // holdView1.addSubview(sessionView)
sessionView.snp.makeConstraints { make in // sessionView.snp.makeConstraints { make in
make.top.equalToSuperview() // make.top.equalToSuperview()
make.left.equalToSuperview().offset(18) // make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
make.height.equalTo(YHOtherInfoSessionView.viewH) // make.height.equalTo(YHOtherInfoSessionView.viewH)
} // }
//
let residenceView = YHOtherResidenceFillView(frame: .zero) // let residenceView = YHOtherResidenceFillView(frame: .zero)
item.needCheckFlag = dataModel.needCheckFlag // item.needCheckFlag = dataModel.needCheckFlag
residenceView.dataModel = item // residenceView.dataModel = item
holdView1.addSubview(residenceView) // holdView1.addSubview(residenceView)
//
residenceView.snp.makeConstraints { make in // residenceView.snp.makeConstraints { make in
make.top.equalTo(sessionView.snp.bottom) // make.top.equalTo(sessionView.snp.bottom)
make.left.equalToSuperview().offset(18) // make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
} // }
//
lastTargetView = residenceView // lastTargetView = residenceView
} else { // } else {
let sessionView = YHOtherInfoSessionView(frame: .zero) // let sessionView = YHOtherInfoSessionView(frame: .zero)
//
let addationIndex = dataModel.residences.count > 1 ? String(index + 1) : "" // let addationIndex = dataModel.residences.count > 1 ? String(index + 1) : ""
let title = "居住信息" + addationIndex // let title = "居住信息" + addationIndex
sessionView.updateTitle(title: title) // sessionView.updateTitle(title: title)
sessionView.type = 1 // sessionView.type = 1
sessionView.tag = index // sessionView.tag = index
sessionView.block = { tag in // sessionView.block = { tag in
if tag < dataModel.residences.count { // if tag < dataModel.residences.count {
dataModel.residences.remove(at: tag) // dataModel.residences.remove(at: tag)
self.block?() // self.block?()
} // }
} // }
//
holdView1.addSubview(sessionView) // holdView1.addSubview(sessionView)
sessionView.snp.makeConstraints { make in // sessionView.snp.makeConstraints { make in
make.top.equalTo(lastTargetView.snp.bottom).offset(kMargin) // make.top.equalTo(lastTargetView.snp.bottom).offset(kMargin)
make.left.equalToSuperview().offset(18) // make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
make.height.equalTo(YHOtherInfoSessionView.viewH) // make.height.equalTo(YHOtherInfoSessionView.viewH)
} // }
//
let residenceView = YHOtherResidenceFillView(frame: .zero) // let residenceView = YHOtherResidenceFillView(frame: .zero)
item.needCheckFlag = dataModel.needCheckFlag // item.needCheckFlag = dataModel.needCheckFlag
residenceView.dataModel = item // residenceView.dataModel = item
holdView1.addSubview(residenceView) // holdView1.addSubview(residenceView)
residenceView.snp.makeConstraints { make in // residenceView.snp.makeConstraints { make in
make.top.equalTo(sessionView.snp.bottom) // make.top.equalTo(sessionView.snp.bottom)
make.left.equalToSuperview().offset(18) // make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
} // }
//
lastTargetView = residenceView // lastTargetView = residenceView
} // }
} // }
} else { // } else {
//
let sessionView = YHOtherInfoSessionView(frame: .zero) // let sessionView = YHOtherInfoSessionView(frame: .zero)
sessionView.type = 3 // sessionView.type = 3
sessionView.updateTitle(title: "居住信息") // sessionView.updateTitle(title: "居住信息")
holdView1.addSubview(sessionView) // holdView1.addSubview(sessionView)
sessionView.snp.makeConstraints { make in // sessionView.snp.makeConstraints { make in
make.top.equalToSuperview() // make.top.equalToSuperview()
make.left.equalToSuperview().offset(18) // make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
make.height.equalTo(YHOtherInfoSessionView.viewH) // make.height.equalTo(YHOtherInfoSessionView.viewH)
} // }
//
let residenceView = YHOtherResidenceFillView(frame: .zero) // let residenceView = YHOtherResidenceFillView(frame: .zero)
if dataModel.residences.count > 0 { // if dataModel.residences.count > 0 {
let item = dataModel.residences[0] // let item = dataModel.residences[0]
item.needCheckFlag = dataModel.needCheckFlag // item.needCheckFlag = dataModel.needCheckFlag
residenceView.dataModel = item // residenceView.dataModel = item
} else { // } else {
printLog("error: 数据源有问题") // printLog("error: 数据源有问题")
} // }
//
holdView1.addSubview(residenceView) // holdView1.addSubview(residenceView)
residenceView.snp.makeConstraints { make in // residenceView.snp.makeConstraints { make in
make.top.equalTo(sessionView.snp.bottom) // make.top.equalTo(sessionView.snp.bottom)
make.left.equalToSuperview().offset(18) // make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
} // }
//
lastTargetView = residenceView // lastTargetView = residenceView
} // }
//
//添加按钮 // //添加按钮
holdView1.addSubview(addBtn) // holdView1.addSubview(addBtn)
addBtn.layer.addSublayer(dotLineLayer) // addBtn.layer.addSublayer(dotLineLayer)
//
//
addBtn.snp.makeConstraints { make in // addBtn.snp.makeConstraints { make in
make.top.equalTo(lastTargetView.snp.bottom).offset(kMargin) // make.top.equalTo(lastTargetView.snp.bottom).offset(kMargin)
make.left.equalToSuperview().offset(18) // make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) // make.right.equalToSuperview().offset(-18)
make.height.equalTo(44) // make.height.equalTo(44)
//
make.bottom.equalToSuperview().offset(-18).priority(.high) // make.bottom.equalToSuperview().offset(-18).priority(.high)
} // }
addBtn.layoutIfNeeded() // addBtn.layoutIfNeeded()
dotLineLayer.path = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: KScreenWidth - 18 * 2 - 16 * 2, height: 44), cornerRadius: kCornerRadius6).cgPath // dotLineLayer.path = UIBezierPath(roundedRect: CGRect(x: 0, y: 0, width: KScreenWidth - 18 * 2 - 16 * 2, height: 44), cornerRadius: kCornerRadius6).cgPath
} // }
holdView1.layoutIfNeeded() // holdView1.layoutIfNeeded()
//2.语言水平 //2.语言水平
let holdView2 = createHoldView() let holdView2 = createHoldView()
contentView.addSubview(holdView2) contentView.addSubview(holdView2)
holdView2.snp.makeConstraints { make in holdView2.snp.makeConstraints { make in
make.top.equalTo(holdView1.snp.bottom).offset(18).priority(.low) // make.top.equalTo(holdView1.snp.bottom).offset(18).priority(.low)
make.top.equalToSuperview()
make.left.right.equalToSuperview() make.left.right.equalToSuperview()
} }
...@@ -213,28 +219,55 @@ extension YHOtherInfoFillCell { ...@@ -213,28 +219,55 @@ extension YHOtherInfoFillCell {
} }
let view = languageView // let view = languageView
view.updateKeyName(name: "您的语言水平与下列哪一项符合", keyValue:dataModel.language_detail?.levelDes ?? "",firstTxt: dataModel.language_detail?.name ?? "",secondTxt: dataModel.language_detail?.remark ?? "") // view.updateKeyName(name: "您的语言水平与下列哪一项符合(多选)", keyValue:dataModel.language_detail?.levelDes ?? "",firstTxt: dataModel.language_detail?.name ?? "",secondTxt: dataModel.language_detail?.remark ?? "")
view.needCheckFlag = dataModel.needCheckFlag // view.needCheckFlag = dataModel.needCheckFlag
view.type = 2 // view.type = 2
//
// view.textBlock = {firstTxt,secondTxt in
// self.dataModel?.language_detail?.name = firstTxt
// self.dataModel?.language_detail?.remark = secondTxt
// }
//
// holdView2.addSubview(view)
// view.snp.makeConstraints { make in
// make.top.equalTo(sessionView.snp.bottom)
// make.left.equalToSuperview().offset(18)
// make.right.equalToSuperview().offset(-18)
//
// make.bottom.equalToSuperview()
// }
view.textBlock = {firstTxt,secondTxt in // let tap = UITapGestureRecognizer(target: self, action: #selector(tapViewItem))
self.dataModel?.language_detail?.name = firstTxt // view.addGestureRecognizer(tap)
self.dataModel?.language_detail?.remark = secondTxt
languageViewNew.dataModel = dataModel.language_detail_new_data
languageViewNew.block = { model in
if let tmpModel = model {
var targetIndex : Int = -1
for (index,item) in dataModel.language_detail_new_data.enumerated() {
if item.id == tmpModel.id {
targetIndex = index
}
}
if targetIndex > -1,targetIndex < dataModel.language_detail_new_data.count {
dataModel.language_detail_new_data[targetIndex] = tmpModel
}
}
self.block?()
} }
holdView2.addSubview(view) holdView2.addSubview(languageViewNew)
view.snp.makeConstraints { make in languageViewNew.snp.makeConstraints { make in
make.top.equalTo(sessionView.snp.bottom) make.top.equalTo(sessionView.snp.bottom)
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.equalToSuperview().offset(-18) make.right.equalToSuperview().offset(-18)
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
} }
let tap = UITapGestureRecognizer(target: self, action: #selector(tapViewItem))
view.addGestureRecognizer(tap)
} }
holdView2.layoutIfNeeded() holdView2.layoutIfNeeded()
......
//
// YHOtherLanguageSelecteView.swift
// galaxy
//
// Created by davidhuangA on 2024/2/19.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHOtherLanguageSelecteView: UIView {
typealias Block = (LanguageDetailModel?) -> ()
var block: Block?
var needCheckFlag : Bool = false {
didSet {
layoutIfNeeded()
}
}
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
private lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.textAlignment = .left
label.numberOfLines = 0
label.font = UIFont.PFSC_R(ofSize: 14)
label.lineBreakMode = .byCharWrapping
return label
}()
//提示lable
private lazy var noTextTipsLable: UILabel = {
let label = UILabel()
label.textColor = .failColor
label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "请选择"
return label
}()
var mutilHoldView : UIView = {
let view = UIView()
return view
}()
//
private var arrLanguage : [UIView] = []
private var arrLanguageOptions : [UIView] = []
var dataModel : [LanguageDetailModel] = [] {
didSet {
updateUI()
}
}
override func layoutSubviews() {
super.layoutSubviews()
updateUI()
}
}
extension YHOtherLanguageSelecteView {
func setupUI() {
noTextTipsLable.text = "请选择"
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)
titleLabel.attributedText = questionAttrStr
addSubview(titleLabel)
addSubview(mutilHoldView)
addSubview(noTextTipsLable)
titleLabel.snp.makeConstraints { make in
make.top.equalToSuperview().offset(kMargin)
make.left.right.equalToSuperview()
make.height.equalTo(20)
}
mutilHoldView.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(kMargin)
make.right.equalToSuperview()
make.left.equalToSuperview()
make.bottom.equalToSuperview().offset(-kMargin)
}
//初始化页面数据
arrLanguage.removeAll()
arrLanguageOptions.removeAll()
if let arr = [LanguageDetailModel].deserialize(from: YHOtherInfoFillViewModel.languageJsonData),arr.count > 0 {
var lastView : UIView?
for (index ,item) in arr.enumerated() {
let tmpView = YHOtherMultipleChoiceItemView()
tmpView.dataModel = item
tmpView.block = { model in
self.block?(model)
}
mutilHoldView.addSubview(tmpView)
arrLanguage.append(tmpView)
if index == 0 {
//第一个
tmpView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)
}
} else if index + 1 == arr.count {
//最后一个
if let tttV = lastView {
tmpView.snp.makeConstraints { make in
make.top.equalTo(tttV.snp.bottom).offset(12)
make.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)
make.bottom.equalToSuperview()
}
}
} else {
//中间
if let tttV = lastView {
tmpView.snp.makeConstraints { make in
make.top.equalTo(tttV.snp.bottom).offset(12)
make.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)
}
}
}
lastView = tmpView
//对应的选项 view
let optionView = YHSingleOptionalItemsView()
optionView.dataModel = item
mutilHoldView.addSubview(optionView)
optionView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)//占位置
}
arrLanguageOptions.append(optionView)
optionView.isHidden = true
}
}
}
func updateUI() {
if dataModel.count > 0 {
for (_,item) in arrLanguage.enumerated() {
item.snp.removeConstraints()
}
for (_,item) in arrLanguageOptions.enumerated() {
item.snp.removeConstraints()
}
if dataModel.count == 3 {
var lastView : UIView?
var offsetY : CGFloat = 12.0
for (index,item) in dataModel.enumerated() {
let multiCheckView = arrLanguage[index]
let optionView = arrLanguageOptions[index]
if index == 0 {
multiCheckView.snp.remakeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)
}
if item.select {
//展示选择项
optionView.isHidden = false
optionView.snp.remakeConstraints { make in
make.top.equalTo(multiCheckView.snp.bottom).offset(8)
make.left.right.equalToSuperview()
}
offsetY = 8
lastView = optionView
} else {
optionView.isHidden = true
offsetY = 12
lastView = multiCheckView
}
}
else if index + 1 == dataModel.count {
if let tttView = lastView {
if item.select {
//展示选择项
multiCheckView.snp.remakeConstraints { make in
make.top.equalTo(tttView.snp.bottom).offset(offsetY)
make.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)
}
optionView.isHidden = false
optionView.snp.remakeConstraints { make in
make.top.equalTo(multiCheckView.snp.bottom).offset(8)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
offsetY = 8
lastView = optionView
} else {
optionView.isHidden = true
multiCheckView.snp.remakeConstraints { make in
make.top.equalTo(tttView.snp.bottom).offset(offsetY)
make.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)
make.bottom.equalToSuperview()
}
}
}
} else {
if let tttView = lastView {
multiCheckView.snp.remakeConstraints { make in
make.top.equalTo(tttView.snp.bottom).offset(offsetY)
make.left.right.equalToSuperview()
make.height.equalTo(YHOtherMultipleChoiceItemView.viewH)
}
if item.select {
//展示选择项
optionView.isHidden = false
optionView.snp.remakeConstraints { make in
make.top.equalTo(multiCheckView.snp.bottom).offset(8)
make.left.right.equalToSuperview()
}
offsetY = 8
lastView = optionView
} else {
optionView.isHidden = true
offsetY = 12
lastView = multiCheckView
}
}
}
}
}
}
}
}
//
// YHOtherLanguageItemsView.swift
// galaxy
//
// Created by davidhuangA on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHOtherMultipleChoiceItemView: UIView {
static let viewH : CGFloat = 52.0
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var isSelected : Bool = false {
didSet {
setViewSelected()
}
}
//数据结构
var dataModel : LanguageDetailModel? {
didSet {
updateUI()
}
}
private lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "中文"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var checkImgV:UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "other_multi_normal")
view.contentMode = .scaleAspectFill
return view
}()
typealias Block = (LanguageDetailModel?) -> ()
var block: Block?
}
extension YHOtherMultipleChoiceItemView {
func setupUI() {
addSubview(checkImgV)
addSubview(titleLabel)
layer.cornerRadius = 3
layer.masksToBounds = true
checkImgV.snp.makeConstraints { make in
make.left.equalTo(kMargin)
make.width.height.equalTo(14)
make.centerY.equalToSuperview()
}
titleLabel.snp.makeConstraints { make in
make.left.equalTo(checkImgV.snp.right).offset(8)
make.right.equalToSuperview().offset(-kMargin)
make.centerY.equalToSuperview()
}
setViewSelected()
let tap : UITapGestureRecognizer = UITapGestureRecognizer(target: self, action: #selector(tapItem(gestureRecognizer:)))
addGestureRecognizer(tap)
}
func setViewSelected() {
if isSelected {
backgroundColor = UIColor(hexString: "#EBF0F9")!
layer.borderWidth = 1
layer.borderColor = UIColor.brandMainColor.cgColor
checkImgV.image = UIImage(named: "other_multi_check")
} else {
backgroundColor = .contentBkgColor
layer.borderWidth = 0
layer.borderColor = UIColor.clear.cgColor
checkImgV.image = UIImage(named: "other_multi_normal")
}
}
func updateUI() {
guard let model = dataModel else {
return
}
titleLabel.text = model.name
isSelected = model.select
}
@objc func tapItem(gestureRecognizer:UITapGestureRecognizer) {
guard let model = dataModel else {
return
}
model.select = !model.select
isSelected = model.select
self.block?(model)
}
}
//
// YHOtherSingleChoiceItemView.swift
// galaxy
//
// Created by davidhuangA on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHOtherSingleChoiceItemView: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var isSelected : Bool = false {
didSet {
setViewSelected()
}
}
private lazy var titleLabel: UILabel = {
let label = UILabel()
label.textColor = .mainTextColor
label.font = UIFont.PFSC_R(ofSize: 14)
label.text = "相关语言国家授予的学位证及成绩单相关语言国家授予的学位证及成绩单"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var descLabel: UILabel = {
let label = UILabel()
label.textColor = UIColor.init(hex: 0x8993A2)
label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "(仅可尝试加分,此类文件加分以港府审批为准)"
label.numberOfLines = 0
label.lineBreakMode = .byCharWrapping
return label
}()
private lazy var checkImgV:UIImageView = {
let view = UIImageView()
view.image = UIImage(named: "other_single_normal")
view.contentMode = .scaleAspectFill
return view
}()
var dataModel : LanguageOptionModel? {
didSet {
updateUI()
}
}
}
extension YHOtherSingleChoiceItemView {
func setupUI() {
addSubview(checkImgV)
addSubview(titleLabel)
addSubview(descLabel)
checkImgV.snp.makeConstraints { make in
make.left.equalToSuperview()
make.top.equalToSuperview().offset(2)
make.width.height.equalTo(14)
}
titleLabel.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.equalTo(checkImgV.snp.right).offset(8)
make.right.equalToSuperview()
make.height.greaterThanOrEqualTo(18)
}
descLabel.snp.makeConstraints { make in
make.top.equalTo(titleLabel.snp.bottom).offset(2)
make.left.equalTo(titleLabel.snp.left)
make.right.equalTo(titleLabel.snp.right)
make.bottom.equalToSuperview()
}
setViewSelected()
}
func updateUI() {
guard let model = dataModel else {
return
}
titleLabel.text = model.name
descLabel.text = model.subname
isSelected = model.select
setViewSelected()
}
func setViewSelected() {
if isSelected {
checkImgV.image = UIImage(named: "other_single_check")
} else {
checkImgV.image = UIImage(named: "other_single_normal")
}
}
}
//
// YHSingleOptionalItemsView.swift
// galaxy
//
// Created by davidhuangA on 2024/11/16.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHSingleOptionalItemsView: UIView {
//提示lable
private lazy var noTextTipsLable: UILabel = {
let label = UILabel()
label.textColor = .failColor
label.font = UIFont.PFSC_R(ofSize: 12)
label.text = "请选择"
return label
}()
//输入名称
private lazy var languageTextField:UITextField = {
let textField = UITextField()
textField.backgroundColor = .clear
textField.attributedPlaceholder = NSAttributedString(string: "请输入语言".local, attributes: [NSAttributedString.Key.foregroundColor : UIColor(hex: 0xB9C1CC)])
textField.font = UIFont.PFSC_R(ofSize: 14)
textField.tintColor = UIColor.brandMainColor
textField.textColor = UIColor.mainTextColor
textField.clearButtonMode = .whileEditing
textField.addTarget(self, action: #selector(textFieldChanged(textField:)), for: .editingChanged)
textField.delegate = self
return textField
}()
var textFieldHoldView : UIView = {
let view = UIView()
view.backgroundColor = .contentBkgColor
view.clipsToBounds = true
view.layer.cornerRadius = kCornerRadius3
return view
}()
var optionsHoldView : UIView = {
let view = UIView()
view.backgroundColor = .contentBkgColor
view.clipsToBounds = true
view.layer.cornerRadius = kCornerRadius3
return view
}()
override init(frame: CGRect) {
super.init(frame: frame)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
//数据结构
var dataModel : LanguageDetailModel? {
didSet {
updateUI()
}
}
}
private extension YHSingleOptionalItemsView {
func setupUI() {
addSubview(textFieldHoldView)
textFieldHoldView.isHidden = true
textFieldHoldView.snp.makeConstraints { make in
make.top.left.right.equalToSuperview()
make.height.equalTo(52)
}
textFieldHoldView.addSubview(languageTextField)
languageTextField.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
}
addSubview(optionsHoldView)
optionsHoldView.snp.makeConstraints { make in
make.top.equalTo(textFieldHoldView.snp.bottom).offset(8)
make.left.right.equalToSuperview()
make.height.equalTo(60)//for test hjl
make.bottom.equalToSuperview()
}
//for test hjl
let tmpOption = YHOtherSingleChoiceItemView()
optionsHoldView.addSubview(tmpOption)
tmpOption.snp.makeConstraints { make in
make.top.equalToSuperview().offset(kMargin)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
}
let tmpOption1 = YHOtherSingleChoiceItemView()
tmpOption1.isSelected = true
optionsHoldView.addSubview(tmpOption1)
tmpOption1.snp.makeConstraints { make in
make.top.equalTo(tmpOption.snp.bottom).offset(kMargin)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
}
let tmpOption2 = YHOtherSingleChoiceItemView()
optionsHoldView.addSubview(tmpOption2)
tmpOption2.snp.makeConstraints { make in
make.top.equalTo(tmpOption1.snp.bottom).offset(kMargin)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.bottom.equalToSuperview().offset(-kMargin)
}
}
@objc func textFieldChanged(textField:UITextField) {
printLog(textField.text)
}
func updateUI() {
guard let model = dataModel else {
return
}
if model.options.count > 0 {
optionsHoldView.snp.removeConstraints()
optionsHoldView.removeSubviews()
if model.id == 3 {
textFieldHoldView.isHidden = false
optionsHoldView.snp.remakeConstraints() { make in
make.top.equalTo(textFieldHoldView.snp.bottom).offset(8)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
} else {
textFieldHoldView.isHidden = true
optionsHoldView.snp.remakeConstraints() { make in
make.top.equalToSuperview()
make.left.right.equalToSuperview()
make.bottom.equalToSuperview()
}
}
var lastView : UIView?
for(index,item) in model.options.enumerated() {
let tmpOption = YHOtherSingleChoiceItemView()
tmpOption.dataModel = item
optionsHoldView.addSubview(tmpOption)
if index == 0 {
//第一个
tmpOption.snp.makeConstraints { make in
make.top.equalToSuperview().offset(kMargin)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
}
} else if index + 1 == model.options.count {
//最后一个
if let tttView = lastView {
tmpOption.snp.makeConstraints { make in
make.top.equalTo(tttView.snp.bottom).offset(kMargin)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.bottom.equalToSuperview().offset(-kMargin)
}
}
} else {
//中间
if let tttView = lastView {
tmpOption.snp.makeConstraints { make in
make.top.equalTo(tttView.snp.bottom).offset(kMargin)
make.left.equalToSuperview().offset(kMargin)
make.right.equalToSuperview().offset(-kMargin)
}
}
}
lastView = tmpOption
}
}
}
}
extension YHSingleOptionalItemsView: UITextFieldDelegate {
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
if string.isEmpty == true { // 点击删除
return true
}
let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if newText.count > 30 {
return false
}
return true
}
}
...@@ -10,6 +10,211 @@ import UIKit ...@@ -10,6 +10,211 @@ import UIKit
class YHOtherInfoFillViewModel: YHBaseViewModel { class YHOtherInfoFillViewModel: YHBaseViewModel {
var otherInfoFillData : YHOtherInfoFillModel? var otherInfoFillData : YHOtherInfoFillModel?
/*
//语言枚举
const LANGUAGE_DETAIL = [
"data" => [
[
"id" => 1,
'name' => "中文",
"select" => 0,
"other_instructions" => "",
'child' => [
['id' => 99, "name" => "均不能提供", "select" => 0,],
['id' => 1, "name" => "母语(不用任何证明)", "select" => 0,],
['id' => 2, "name" => "《普通话水平测试》取得及格或以上成绩的证书", "select" => 0,],
['id' => 3, "name" => "《中国汉语水平考试》取得第三级或以上成绩的证书", "select" => 0,],
['id' => 4, "name" => "其他证件(仅尝试加分)", "select" => 0,],
],
],
[
"id" => 2,
'name' => "英文",
"select" => 0,
"other_instructions" => "",
'child' => [
['id' => 99, "name" => "均不能提供", "select" => 0,],
['id' => 1, "name" => "母语(不用任何证明)", "select" => 0,],
['id' => 2, "name" => "雅思(ELTS)考试取得7.0或以上成绩的成绩单", "select" => 0,],
['id' => 3, "name" => "托福(TOEFL)网上考试取得94分或以上成绩的成绩单", "select" => 0,],
['id' => 4, "name" => "全国大学英语六级考试(CET-6)取得520分或以上成绩的证书", "select" => 0,],
['id' => 5, "name" => "英语授课证明", "select" => 0,],
['id' => 6, "name" => "英语国家授予的学位证及成绩单", "select" => 0,],
['id' => 7, "name" => "英语相关专业学位证 、 毕业证、 学位认证报告", "select" => 0,],
['id' => 8, "name" => "其他证件(仅尝试加分)", "select" => 0,],
],
],
[
"id" => 3,
'name' => "其他",
"select" => 0,
"other_instructions" => "",
'child' => [
['id' => 99, "name" => "均不能提供", "select" => 0,],
['id' => 1, "name" => "母语", "select" => 0,],
['id' => 2, "name" => "授课语言证明]", "select" => 0,],
['id' => 3, "name" => "相关语言国家授予的学位证及成绩单", "select" => 0,],
['id' => 4, "name" => "该语言相关专业学位证 、 毕业证、 学位认证报告", "select" => 0,],
['id' => 5, "name" => "官方语言成绩单", "select" => 0,],
],
],
],
];
*/
static let languageJsonData : [[String : Any]] = [
["id":1,
"name":"中文",
"select":0,
"other_instructions":"",
"options":[
["id" : 1,
"name" : "母语(不用任何证明)",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 2,
"name" : "《普通话水平测试》取得及格或以上成绩的证书",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 3,
"name" : "《中国汉语水平考试》取得第三级或以上成绩的证书",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 4,
"name" : "其他证件",
"select" : 0,
"subname" : "(仅可尝试加分,此类文件加分以港府审批为准)",
"highlight" : ""],
["id" : 99,
"name" : "以上均不能提供",
"select" : 0,
"subname" : "(或将导致您的该语言能力不被认可,请尽可能准备以上材料并修改此选项)",
"highlight" : "不被认可"],
]
],
["id":2,
"name":"英文",
"select":0,
"other_instructions":"",
"options":[
["id" : 1,
"name" : "母语(不用任何证明)",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 2,
"name" : "雅思(ELTS)考试取得7.0或以上成绩的成绩单",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 3,
"name" : "托福(TOEFL)网上考试取得94分或以上成绩的成绩单",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 4,
"name" : "全国大学英语六级考试(CET-6)取得520分或以上成绩的证书",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 5,
"name" : "英语授课证明",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 6,
"name" : "英语国家授予的学位证及成绩单",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 7,
"name" : "英语相关专业学位证 、 毕业证、 学位认证报告",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 8,
"name" : "其他证明",
"select" : 0,
"subname" : "(仅可尝试加分,此类文件加分以港府审批为准)",
"highlight" : ""],
["id" : 99,
"name" : "以上均不能提供",
"select" : 0,
"subname" : "(或将导致您的该语言能力不被认可,请尽可能准备以上材料并修改此选项)",
"highlight" : "不被认可"],
]
],
["id":3,
"name":"其他",
"select":0,
"other_instructions":"",
"options":[
["id" : 1,
"name" : "母语",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 2,
"name" : "授课语言证明",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 3,
"name" : "相关语言国家授予的学位证及成绩单",
"select" : 0,
"subname" : "",
"highlight" : ""],
["id" : 4,
"name" : "其他证件",
"select" : 0,
"subname" : "该语言相关专业学位证 、 毕业证、 学位认证报告",
"highlight" : ""],
["id" : 5,
"name" : "其他证件",
"select" : 0,
"subname" : "官方语言成绩单",
"highlight" : ""],
["id" : 6,
"name" : "其他证明",
"select" : 0,
"subname" : "(仅可尝试加分,此类文件加分以港府审批为准)",
"highlight" : ""],
["id" : 99,
"name" : "以上均不能提供",
"select" : 0,
"subname" : "(或将导致您的该语言能力不被认可,请尽可能准备以上材料并修改此选项)",
"highlight" : "不被认可"],
]
],
]
} }
extension YHOtherInfoFillViewModel { extension YHOtherInfoFillViewModel {
...@@ -28,15 +233,15 @@ extension YHOtherInfoFillViewModel { ...@@ -28,15 +233,15 @@ extension YHOtherInfoFillViewModel {
return return
} }
if resultModel.residences.isEmpty { // if resultModel.residences.isEmpty {
resultModel.residences.append(Residence()) // resultModel.residences.append(Residence())
} // }
self.otherInfoFillData = resultModel self.otherInfoFillData = resultModel
//根据返回值 组装 真实的数据
handleData() handleData()
//根据返回值 组装 真实的数据
callBackBlock(true,nil) callBackBlock(true,nil)
} else { } else {
...@@ -74,19 +279,47 @@ extension YHOtherInfoFillViewModel { ...@@ -74,19 +279,47 @@ extension YHOtherInfoFillViewModel {
extension YHOtherInfoFillViewModel { extension YHOtherInfoFillViewModel {
func handleData() { func handleData() {
if let language = self.otherInfoFillData?.language_detail { // if let language = self.otherInfoFillData?.language_detail {
if language.level > 0 { // if language.level > 0 {
let target = String(language.level) // let target = String(language.level)
for(_,item) in YHConstantArrayData.arrLanguage.enumerated() { // for(_,item) in YHConstantArrayData.arrLanguage.enumerated() {
//
if target == item["id"] { // if target == item["id"] {
language.levelDes = item["title"] ?? "" // language.levelDes = item["title"] ?? ""
break // break
// }
// }
// }
// }
//语言 根据 返回值 进行数据结构
if let arr = [LanguageDetailModel].deserialize(from: YHOtherInfoFillViewModel.languageJsonData) {
if let arrT = self.otherInfoFillData?.language_detail_new,arrT.count > 0 {
for (index,item) in arrT.enumerated() {
for (ii,tt) in arr.enumerated() {
if item.first_select == tt.id {
tt.select = true
let arrTTT = item.second_select.split(separator: ",")
if arrTTT.count > 0 {
let tmpId : Int = Int(arrTTT[0]) ?? 0
for (iii,ttt) in tt.options.enumerated() {
if tmpId == ttt.id {
ttt.select = true
}
}
}
}
} }
} }
} }
self.otherInfoFillData?.language_detail_new_data = arr
} else {
self.otherInfoFillData?.language_detail_new_data = []
} }
if let profession = self.otherInfoFillData?.profession { if let profession = self.otherInfoFillData?.profession {
if profession.option > 0 { if profession.option > 0 {
let target = String(profession.option) let target = String(profession.option)
......
...@@ -474,7 +474,7 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -474,7 +474,7 @@ extension YHMessageDetailListVC: UITableViewDelegate, UITableViewDataSource {
} }
} else if msg.redirectPage == YHRedirectPage.myPlan.rawValue { // 我的方案 } else if msg.redirectPage == YHRedirectPage.myPlan.rawValue { // 我的方案
let vc = YHMineSchemeViewController() let vc = YHMyNewSchemeViewController()
navigationController?.pushViewController(vc) navigationController?.pushViewController(vc)
} else if msg.redirectPage == YHRedirectPage.myDocument.rawValue { // 我的文书 } else if msg.redirectPage == YHRedirectPage.myDocument.rawValue { // 我的文书
......
...@@ -300,6 +300,10 @@ extension YhConstant { ...@@ -300,6 +300,10 @@ extension YhConstant {
// 跳转到首页生活tab // 跳转到首页生活tab
public static let didJumpToHomePageLifeTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.life") public static let didJumpToHomePageLifeTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.life")
// 跳转到首页身份tab
public static let didJumpToHomePageIdentityTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.identity")
// 跳转到首页生活tab - 教育 // 跳转到首页生活tab - 教育
public static let didJumpToHomePageLifeEduTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.life.edu") public static let didJumpToHomePageLifeEduTabNotification = Notification.Name(rawValue: "com.yinhe.homePage.life.edu")
......
...@@ -382,6 +382,10 @@ class YHAllApiName { ...@@ -382,6 +382,10 @@ class YHAllApiName {
struct Assessment { struct Assessment {
//方案计划 //方案计划
static let applyPlanApi = "infoflow/assessment/apply_plan" static let applyPlanApi = "infoflow/assessment/apply_plan"
static let applyPlanNewApi = "infoflow/assessment/apply_plan_detail"
static let submitTargetsApi = "infoflow/assessment/save_apply_plan_target"
static let modifyInfoApi = "infoflow/assessment/update-info"
static let improveDetailApi = "infoflow/assessment/improve_plan_detail"
} }
// 消息 // 消息
...@@ -633,4 +637,15 @@ class YHAllApiName { ...@@ -633,4 +637,15 @@ class YHAllApiName {
static let result = "super-app/renewal/renewal-result" 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" : "Group 33333990@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33333990@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2957@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2957@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Group 33333990@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Group 33333990@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Rectangle 2956@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Rectangle 2956@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