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
This diff is collapsed.
...@@ -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
} }
} }
......
//
// 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)
}
}
}
}
...@@ -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
......
//
// 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
}
}
...@@ -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