Commit 46fc2660 authored by David黄金龙's avatar David黄金龙

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

* 'qmas-1130' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  主申请人逻辑修改
parents 36d3a15d cc4b6479
......@@ -127,17 +127,7 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let item2 = YHItemModel(id: .id23, isNeed: false, title: "婚前姓氏", isUserKeyBoard: true, prompts: "如有则填写,仅支持输入字母", message: mainModel.surname, isShowPrompts: isShowPrompt)
let item3 = YHItemModel(id: .id24, isNeed: true, title: "出生日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.birthday, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择出生日期")
let item4 = YHItemModel(id: .id25, isNeed: true, title: "出生国家/地区", isUserKeyBoard: false, prompts: nil, message: "\(mainModel.birth_place_aboard)", leftButtonString: "国内", rightButtonString: "国外", isShowPrompts: isShowPrompt, alertMessage:"请选择出生国家/地区")
var string = ""
let array = mainModel.birth_place.area
for item in array {
if string.count != 0 {
string = string + "/" + item
} else {
string = string + item
}
}
let item5 = YHItemModel(id: .id26, isNeed: true, title: "出生城市", isUserKeyBoard: false, prompts: "请输入", message: string, isShowPrompts: isShowPrompt, alertMessage:"请输入出生城市;")
let item5 = YHItemModel(id: .id26, isNeed: true, title: "出生城市", isUserKeyBoard: true, prompts: "请输入", message: mainModel.birth_place.details, isShowPrompts: isShowPrompt, alertMessage:"请输入出生城市;")
let item55 = YHItemModel(id: .id34, isNeed: true, title: "出生城市", isUserKeyBoard: true, prompts: "请输入", message: mainModel.birth_place.foreign, isShowPrompts: isShowPrompt, alertMessage:"请输入出生城市")
let item6 = YHItemModel(id: .id27, isNeed: true, title: "性别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.sex )", type: .sex, alertMessage:"请选择性别")
let item7 = YHItemModel(id: .id28, isNeed: true, title: "婚姻状况", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.married )", type: .marry, isShowPrompts: isShowPrompt, alertMessage:"请选择婚姻状况")
......
......@@ -56,7 +56,6 @@ class YHWorkExperienceDetailModel: SmartCodable {
var company_website: String = ""
var company_introduce: String = ""
var business_remark: String = ""
var is_project_introduction: Int = 0
var customer_center_id: Int = 0
var projects: [String] = []
......
......@@ -11,19 +11,15 @@ import UIKit
class YHWorkHighlightsTableViewCell: UITableViewCell {
typealias ExampleBlock = () -> ()
typealias MessageBlock = (_ message: String) -> ()
typealias SwitchBlock = (_ isOn: Bool) -> ()
var exampleBlock: ExampleBlock?
var photoBlock: ExampleBlock?
var messageBlock: MessageBlock?
var switchBlock: SwitchBlock?
var centerView: UIView!
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var lineView: UIView!
var messageTextField: UITextView!
var promptsLabel: UILabel!
var detailLabel: UILabel!
var detailSwitch: UISwitch!
var bottomView: YHWorkActionView!
var dataSource: String?{
didSet {
......@@ -143,35 +139,6 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
make.top.equalTo(116)
}
detailLabel = {
let label = UILabel()
label.text = "项目详细介绍"
label.textColor = UIColor.mainTextColor
label.font = UIFont.PFSC_R(ofSize: 14)
return label
}()
centerView.addSubview(detailLabel)
detailLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.bottom.equalTo(-62)
make.height.equalTo(20)
make.width.equalTo(100)
}
detailSwitch = {
let switchView = UISwitch()
switchView.onTintColor = UIColor.brandMainColor
switchView.addTarget(self, action: #selector(switchViewChange), for: .valueChanged)
return switchView
}()
centerView.addSubview(detailSwitch)
detailSwitch.snp.makeConstraints { make in
make.right.equalTo(-18)
make.centerY.equalTo(detailLabel.snp.centerY)
make.height.equalTo(24)
make.width.equalTo(45)
}
bottomView = {
let view = YHWorkActionView()
view.exampleBlock = {[weak self] in
......@@ -193,7 +160,6 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
make.left.right.bottom.equalToSuperview()
make.height.equalTo(44)
}
detailSwitch.transform = CGAffineTransform(scaleX: 0.77, y: 0.77)
}
......@@ -205,20 +171,6 @@ class YHWorkHighlightsTableViewCell: UITableViewCell {
promptsLabel.isHidden = false
}
}
@objc func switchViewChange() {
if let block = switchBlock {
block(detailSwitch.isOn)
}
}
func setSwitchState(_ isOn: Int) {
if isOn == 1 {
detailSwitch.isOn = true
} else {
detailSwitch.isOn = false
}
}
}
extension YHWorkHighlightsTableViewCell: UITextViewDelegate {
......
......@@ -195,14 +195,6 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
mainModel.highlights = value
}
func updateIsProjectIntroduction(isOn: Bool) {
if isOn {
mainModel.is_project_introduction = 1
} else {
mainModel.is_project_introduction = 0
}
}
func updateNotNeedUploadFile(value: Int) {
mainModel.not_need_upload_file = value
}
......@@ -297,7 +289,6 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
"international_work_experience": mainModel.international_work_experience,
"is_executives": mainModel.is_executives,
"is_famous_enterprise": mainModel.is_famous_enterprise,
"is_project_introduction": mainModel.is_project_introduction,
"is_show": mainModel.is_show,
"is_synthetic": mainModel.is_synthetic,
"location": location,
......
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