Commit 715afda1 authored by Steven杜宇's avatar Steven杜宇

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

parents 17a3af89 809f6166
......@@ -249,6 +249,7 @@
A514E5DC2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift in Sources */ = {isa = PBXBuildFile; fileRef = A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */; };
A520124F2BABCE05008655EA /* YHFileListContentView.swift in Sources */ = {isa = PBXBuildFile; fileRef = A520124E2BABCE05008655EA /* YHFileListContentView.swift */; };
A53026902B4E6F2700F35102 /* YHHomeCustomCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */; };
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */ = {isa = PBXBuildFile; fileRef = A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */; };
A554A5122B99715000EA5973 /* YHConstantArrayData.swift in Sources */ = {isa = PBXBuildFile; fileRef = A554A5112B99715000EA5973 /* YHConstantArrayData.swift */; };
A5551FFE2B4C26CE00510980 /* YHBaseViewModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */; };
A5573ED22B317BFF00D98EC0 /* AppDelegate.swift in Sources */ = {isa = PBXBuildFile; fileRef = A5573ED12B317BFF00D98EC0 /* AppDelegate.swift */; };
......@@ -636,6 +637,7 @@
A514E5DB2B60A2B700C93951 /* YHServiceCenterSecondViewController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHServiceCenterSecondViewController.swift; sourceTree = "<group>"; };
A520124E2BABCE05008655EA /* YHFileListContentView.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = YHFileListContentView.swift; sourceTree = "<group>"; };
A530268F2B4E6F2700F35102 /* YHHomeCustomCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHHomeCustomCell.swift; sourceTree = "<group>"; };
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHFileListItemsView2.swift; sourceTree = "<group>"; };
A554A5112B99715000EA5973 /* YHConstantArrayData.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHConstantArrayData.swift; sourceTree = "<group>"; };
A5551FFD2B4C26CE00510980 /* YHBaseViewModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = YHBaseViewModel.swift; sourceTree = "<group>"; };
A5573ECE2B317BFF00D98EC0 /* galaxy.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = galaxy.app; sourceTree = BUILT_PRODUCTS_DIR; };
......@@ -2023,6 +2025,7 @@
A5D001292BABC84A001F003C /* YHFileListBottomView.swift */,
A58AC0A02BAC0B2900A30FA9 /* YHFileListItemView.swift */,
A58AC09E2BAC05BA00A30FA9 /* YHFileListItemsView.swift */,
A53B61112BB128AF0010B573 /* YHFileListItemsView2.swift */,
);
path = V;
sourceTree = "<group>";
......@@ -2299,6 +2302,7 @@
045EEEB42B9F171A0022A143 /* YHWorkExampleMessageTableViewCell.swift in Sources */,
045EEF132B9F171A0022A143 /* YHCountryMessage.swift in Sources */,
045EEE7B2B9F171A0022A143 /* YHPersonInfoCellModel2.swift in Sources */,
A53B61122BB128AF0010B573 /* YHFileListItemsView2.swift in Sources */,
045EEE892B9F171A0022A143 /* YHPreviewBaseViewController.swift in Sources */,
045EEEA42B9F171A0022A143 /* YHImageResultViewController.swift in Sources */,
045EEE812B9F171A0022A143 /* YHPreviewQuestionAndAnswerModel.swift in Sources */,
......
......@@ -15,6 +15,9 @@ class YHFileListModel: SmartCodable {
var checks_tatus : Int = -1
var supplement_list : [YHFileListSubModel] = []
var type : Int = 0 //0-数据来自服务端 1-客户端自己添加的
var arrTxt : [String] = [] //type=1时使用的内容
required init() {
}
}
......
......@@ -25,7 +25,6 @@ class YHFileListContentView: UIView {
}
}
private extension YHFileListContentView {
func initView() {
backgroundColor = .clear
......@@ -65,38 +64,47 @@ extension YHFileListContentView {
var lastView : UIView?
for (index,item) in arrData.enumerated() {
let view = YHFileListItemsView()
view.dataModel = item
addSubview(view)
if let tttttt = lastView {
if index == arrData.count - 1 {
view.snp.makeConstraints { make in
make.top.equalTo(tttttt.snp.bottom)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-20)
}
} else {
view.snp.makeConstraints { make in
make.top.equalTo(tttttt.snp.bottom)
make.left.right.equalToSuperview()
}
if let iii = item {
var view : UIView = YHFileListItemsView()
if iii.type == 0 {
(view as! YHFileListItemsView).dataModel = item
} else {
//if item?.type == 1
view = YHFileListItemsView2()
(view as! YHFileListItemsView2).dataModel = item
}
} else {
if index == arrData.count - 1 {
view.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-20)
addSubview(view)
if let tttttt = lastView {
if index == arrData.count - 1 {
view.snp.makeConstraints { make in
make.top.equalTo(tttttt.snp.bottom)
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-20)
}
} else {
view.snp.makeConstraints { make in
make.top.equalTo(tttttt.snp.bottom)
make.left.right.equalToSuperview()
}
}
} else {
view.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.equalToSuperview()
if index == arrData.count - 1 {
view.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.equalToSuperview()
make.bottom.equalToSuperview().offset(-20)
}
} else {
view.snp.makeConstraints { make in
make.top.equalToSuperview()
make.left.right.equalToSuperview()
}
}
}
lastView = view
}
lastView = view
}
}
}
//
// YHFileListItemsView2.swift
// galaxy
//
// Created by davidhuangA on 2024/3/25.
// Copyright © 2024 https://www.galaxy-immi.com. All rights reserved.
//
import UIKit
class YHFileListItemsView2: UIView {
override init(frame: CGRect) {
super.init(frame: frame)
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
var dataModel : YHFileListModel? {
didSet {
updateUI()
}
}
private lazy var topBkg : UIView = {
let imagV = UIImageView()
imagV.image = UIImage(named: "file_list_session_bkg")
imagV.contentMode = .scaleAspectFill
return imagV
}()
private lazy var titleLable : UILabel = {
let lable0 = UILabel(text: "title")
lable0.textColor = UIColor.mainTextColor
lable0.font = UIFont.PFSC_R(ofSize: 18)
lable0.textAlignment = .center
return lable0
}()
}
private extension YHFileListItemsView2 {
func updateUI() {
removeSubviews()
guard let dataModel = dataModel else { return }
addSubview(topBkg)
topBkg.snp.makeConstraints { make in
make.top.equalTo(22)
make.centerX.equalToSuperview()
make.width.equalTo(146)
make.height.equalTo(28)
}
titleLable.text = dataModel.ApplicantName.defaultStringIfEmpty(detaultValue: "--")
addSubview(titleLable)
titleLable.snp.makeConstraints { make in
make.top.equalTo(22)
make.centerX.equalToSuperview()
make.left.right.equalToSuperview()
make.height.equalTo(28)
}
var lastView : UIView = topBkg
for (index,item) in dataModel.arrTxt.enumerated() {
let view = UILabel()
view.text = item
view.textColor = UIColor(hex: 0x333333, alpha: 1.0)
view.numberOfLines = 0
view.lineBreakMode = .byWordWrapping
view.font = UIFont.PFSC_R(ofSize: 12)
addSubview(view)
if index == dataModel.arrTxt.count - 1 {
view.snp.makeConstraints { make in
make.top.equalTo(lastView.snp.bottom).offset(kMargin)
make.left.equalTo(kMargin)
make.right.equalToSuperview().offset(-kMargin)
make.bottom.equalToSuperview()
}
} else {
var offset = kMargin
if index == 0 {
offset = 20
}
view.snp.makeConstraints { make in
make.top.equalTo(lastView.snp.bottom).offset(offset)
make.left.equalTo(kMargin)
make.right.equalToSuperview().offset(-kMargin)
}
}
lastView = view
}
}
}
......@@ -61,21 +61,30 @@ class YHCertificateViewModel: YHBaseViewModel {
}
for (index,item) in resultModel.enumerated() {
for (_,item) in resultModel.enumerated() {
let arr = item?.supplement_list.filter { (item) -> Bool in
return item.check_status == 2 || item.check_status == 3
}
item?.supplement_list = arr ?? []
}
let arr = resultModel.filter { (item) -> Bool in
var arr = resultModel.filter { (item) -> Bool in
if let ttt = item,ttt.supplement_list.count > 0 {
return true
}
return false
}
//添加 写死的数据类型
let tmpModel = YHFileListModel()
tmpModel.ApplicantName = "温馨提示"
tmpModel.type = 1
tmpModel.arrTxt = ["1.以上资料请提供清晰完整的彩色扫描件。","2.照片最好同时提供电子档及时通知我们以避免对申请结果产生影响。","3.申请递交之后,如目前所报备的情况有任何变化(包含婚姻状况、新生子女、工作情况、亲属关系变化,请及时通知我们以避免对申请结果产生影响。"]
arr.append(tmpModel)
self.arrFileListData = arr
callBackBlock(true,nil)
} else {
......
......@@ -161,6 +161,7 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
return cell
} else {
let cell = tableView.dequeueReusableCell(withClass: YHMainInformationTableViewCell.self)
cell.country = self.viewModel.mainModel.address.country
cell.dataSource = dataSource?[indexPath.row]
cell.informationBlock = {[weak self] model in
guard let self = self else { return }
......
......@@ -19,6 +19,7 @@ class YHItemView: UIView {
var rightButton: UIButton!
var showPromptLabel: UILabel!
var longTimeButton:UIButton!
var country: String = ""
var dataSource: YHItemModel? {
didSet {
updateAllViews()
......@@ -412,7 +413,17 @@ class YHItemView: UIView {
case .normal:
printLog("不需要跳转")
case .address:
let addressPicker = YHAddressViewController()
var provice = ""
if country.contains("台湾") {
provice = "台湾省"
}
if country.contains("香港") {
provice = "香港特别行政区"
}
if country.contains("澳门") {
provice = "澳门特别行政区"
}
let addressPicker = YHAddressViewController(selectProvince: provice)
addressPicker.backLocationStringController = { (address,province,city,area) in
self.dataSource?.message = address
self.dataSource?.value = [province, city]
......
......@@ -14,6 +14,7 @@ class YHMainInformationTableViewCell: UITableViewCell {
var centerView: UIView!
var titleLabel: UILabel!
var mainItemView: UIView!
var country: String = ""
var dataSource: YHSectionItemModel?{
didSet {
updateAllViews()
......@@ -122,6 +123,7 @@ class YHMainInformationTableViewCell: UITableViewCell {
let itemView = YHItemView()
itemView.dataSource = data
itemView.country = country
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.informationBlock {
......
......@@ -459,6 +459,7 @@ extension YHWorkExperienceViewController: UITableViewDelegate, UITableViewDataSo
}
} else {
let cell = tableView.dequeueReusableCell(withClass: YHWorkExperienceTableViewCell.self)
cell.country = self.viewModel.mainModel.location.country
cell.dataSource = baseDataSource?[indexPath.row]
cell.workExperienceBlock = {[weak self] model in
guard let self = self else { return }
......
......@@ -56,6 +56,7 @@ class YHCountryHotView: UIView {
button.setTitle(dataSource[i], for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.setBackgroundColor(color: UIColor.tipsColor.withAlphaComponent(0.08), forState: .highlighted)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.layer.cornerRadius = 16
button.tag = 3000 + i
......
......@@ -72,6 +72,7 @@ class YHWorkExampleTypeView: UIView {
button.setTitle(dataSource[i], for: .normal)
button.setTitleColor(UIColor.mainTextColor, for: .normal)
button.setBackgroundColor(color: UIColor.contentBkgColor, forState: .normal)
button.setBackgroundColor(color: UIColor.tipsColor.withAlphaComponent(0.08), forState: .highlighted)
button.titleLabel?.font = UIFont.PFSC_R(ofSize: 13)
button.layer.cornerRadius = 16
button.tag = 3000 + i
......
......@@ -21,7 +21,7 @@ class YHWorkExperienceItemView: UIView {
var rightButton: UIButton!
var showPromptLabel: UILabel!
var longTimeButton:UIButton!
var country: String = ""
var dataSource: YHWorkExperienceModel? {
didSet {
updateAllViews()
......@@ -381,7 +381,17 @@ class YHWorkExperienceItemView: UIView {
case .normal:
printLog("不需要跳转")
case .address:
let addressPicker = YHAddressViewController()
var provice = ""
if country.contains("台湾") {
provice = "台湾省"
}
if country.contains("香港") {
provice = "香港特别行政区"
}
if country.contains("澳门") {
provice = "澳门特别行政区"
}
let addressPicker = YHAddressViewController(selectProvince: provice)
addressPicker.backLocationStringController = { (address,province,city,area) in
self.dataSource?.message = address
self.dataSource?.value = [province, city]
......@@ -399,6 +409,12 @@ class YHWorkExperienceItemView: UIView {
if dataSource?.id == .id10 {
title = "请选择离职日期"
}
if dataSource?.id == .id21 {
title = "请选择高管在职开始时间"
}
if dataSource?.id == .id22 {
title = "请选择高管在职结束时间"
}
YHDatePickView.show(type: .yyyymm, title: title) { date in
self.dataSource?.message = date
self.updateAllViews()
......
......@@ -16,6 +16,7 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
var centerView: UIView!
var titleLabel: UILabel!
var mainItemView: UIView!
var country: String = ""
var dataSource: YHSectionWorkExperienceModel?{
didSet {
updateAllViews()
......@@ -134,6 +135,7 @@ class YHWorkExperienceTableViewCell: UITableViewCell {
}
let itemView = YHWorkExperienceItemView()
itemView.dataSource = data
itemView.country = country
itemView.block = {[weak self] model in
guard let self = self else { return }
if let block = self.workExperienceBlock {
......
......@@ -14,14 +14,10 @@ class YHCompanyViewModel: YHBaseViewModel {
}
func requestCompany(_ key: String, callBackBlock:@escaping (_ success: [YHCompanyModelListModel]?, _ error:YHErrorModel?)->()) {
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.company + "?company_name=\(key)&page_size=20&current_page=1"
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.company
let params = ["company_name":key,"page_size":20,"current_page":1] as [String : Any]
let _ = YHNetRequest.getRequest(url: strUrl,params: params) { [weak self] json, code in
// let _ = YHNetRequest.getRequest(url: strUrl) { [weak self] json, code in
//1. json字符串 转 对象
guard self != nil else { return }
if json.code == 200 {
......
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