Commit 60a06533 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:
  收入记录工作经验部分金额填写,初始为0时变成空串以方便输入
  // 预览
  aaaaa
  工作经验bug修复
  // 学历
  // 学历
  // 预览
  收入记录工作经验填写部分bug修复
parents 745e2616 f3fe384d
...@@ -17,7 +17,7 @@ class YHCollegeNameCell: UITableViewCell { ...@@ -17,7 +17,7 @@ class YHCollegeNameCell: UITableViewCell {
label.textColor = .mainTextColor label.textColor = .mainTextColor
label.textAlignment = .left label.textAlignment = .left
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_B(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 14)
return label return label
}() }()
......
...@@ -25,7 +25,6 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate { ...@@ -25,7 +25,6 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate {
private lazy var contentView = { private lazy var contentView = {
let view = UIView() let view = UIView()
view.backgroundColor = .contentBkgColor view.backgroundColor = .contentBkgColor
view.layer.cornerRadius = Self.height/2.0
view.clipsToBounds = true view.clipsToBounds = true
return view return view
}() }()
...@@ -47,7 +46,6 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate { ...@@ -47,7 +46,6 @@ class YHCollegeSearchBar: UIView, UITextFieldDelegate {
btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 12) btn.titleLabel?.font = UIFont.PFSC_M(ofSize: 12)
btn.setTitleColor(.white, for: .normal) btn.setTitleColor(.white, for: .normal)
btn.backgroundColor = UIColor.brandMainColor btn.backgroundColor = UIColor.brandMainColor
btn.layer.cornerRadius = Self.confirmBtnHeight/2.0
btn.addTarget(self, action: #selector(confirmBtnClicked), for: .touchUpInside) btn.addTarget(self, action: #selector(confirmBtnClicked), for: .touchUpInside)
return btn return btn
}() }()
......
...@@ -17,7 +17,7 @@ class YHMajorNameCell: UITableViewCell { ...@@ -17,7 +17,7 @@ class YHMajorNameCell: UITableViewCell {
label.textColor = .mainTextColor label.textColor = .mainTextColor
label.textAlignment = .left label.textAlignment = .left
label.numberOfLines = 0 label.numberOfLines = 0
label.font = UIFont.PFSC_B(ofSize: 14) label.font = UIFont.PFSC_R(ofSize: 14)
return label return label
}() }()
......
...@@ -388,6 +388,9 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -388,6 +388,9 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
var text = textField.text ?? "" var text = textField.text ?? ""
text = text.replacingOccurrences(of: "¥", with: "") text = text.replacingOccurrences(of: "¥", with: "")
text = text.replacingOccurrences(of: ",", with: "") text = text.replacingOccurrences(of: ",", with: "")
if text == "0" {
text = ""
}
textField.text = text textField.text = text
} }
cell.didEndEditing = { [weak self] textField in cell.didEndEditing = { [weak self] textField in
...@@ -497,32 +500,36 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab ...@@ -497,32 +500,36 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
extension YHIncomeRecordWorkExperienceViewController { extension YHIncomeRecordWorkExperienceViewController {
private func checkInput() -> Bool { private func checkInput() -> Bool {
var retValue = true
var updateRows: [IndexPath] = []
if companyModel.has_all_file == YHIncomeRecordHasAllFile.unknown.rawValue { if companyModel.has_all_file == YHIncomeRecordHasAllFile.unknown.rawValue {
isHasAllFileOK = false isHasAllFileOK = false
if let hasAllFileIndexPath = hasAllFileIndexPath, tableView.numberOfSections > hasAllFileIndexPath.section, tableView.numberOfRows(inSection: hasAllFileIndexPath.section) > hasAllFileIndexPath.row { if let hasAllFileIndexPath = hasAllFileIndexPath, tableView.numberOfSections > hasAllFileIndexPath.section, tableView.numberOfRows(inSection: hasAllFileIndexPath.section) > hasAllFileIndexPath.row {
tableView.reloadRows(at: [hasAllFileIndexPath], with: .none) updateRows.append(hasAllFileIndexPath)
} }
return false retValue = false
} }
isHasAllFileOK = true
if companyModel.income_type.count == 0 { if companyModel.income_type.count == 0 {
isIncomeTypeOK = false isIncomeTypeOK = false
if let incomeTypeIndexPath = incomeTypeIndexPath, tableView.numberOfSections > incomeTypeIndexPath.section, tableView.numberOfRows(inSection: incomeTypeIndexPath.section) > incomeTypeIndexPath.row { if let incomeTypeIndexPath = incomeTypeIndexPath, tableView.numberOfSections > incomeTypeIndexPath.section, tableView.numberOfRows(inSection: incomeTypeIndexPath.section) > incomeTypeIndexPath.row {
tableView.reloadRows(at: [incomeTypeIndexPath], with: .none) updateRows.append(incomeTypeIndexPath)
} }
return false retValue = false
} }
isIncomeTypeOK = true
if companyModel.income_money == 0 { if companyModel.income_money == 0 {
isIncomeMoneyOK = false isIncomeMoneyOK = false
if let incomMoneyIndexPath = incomMoneyIndexPath, tableView.numberOfSections > incomMoneyIndexPath.section, tableView.numberOfRows(inSection: incomMoneyIndexPath.section) > incomMoneyIndexPath.row { if let incomMoneyIndexPath = incomMoneyIndexPath, tableView.numberOfSections > incomMoneyIndexPath.section, tableView.numberOfRows(inSection: incomMoneyIndexPath.section) > incomMoneyIndexPath.row {
tableView.reloadRows(at: [incomMoneyIndexPath], with: .none) updateRows.append(incomMoneyIndexPath)
} }
return false retValue = false
}
if updateRows.count > 0 {
tableView.reloadRows(at: updateRows, with: .none)
isHasAllFileOK = true
isIncomeTypeOK = true
isIncomeMoneyOK = true
} }
isIncomeMoneyOK = true return retValue
return true
} }
private func requestData(isNeedLoading: Bool = false) { private func requestData(isNeedLoading: Bool = false) {
......
...@@ -57,7 +57,7 @@ class YHIncomeInputMoneyCell: YHResignDocumentCell { ...@@ -57,7 +57,7 @@ class YHIncomeInputMoneyCell: YHResignDocumentCell {
let label = UILabel() let label = UILabel()
label.font = .PFSC_R(ofSize: 12) label.font = .PFSC_R(ofSize: 12)
label.textColor = .failColor label.textColor = .failColor
label.text = "请选择" label.text = "请输入"
return label return label
}() }()
...@@ -110,11 +110,11 @@ class YHIncomeInputMoneyCell: YHResignDocumentCell { ...@@ -110,11 +110,11 @@ class YHIncomeInputMoneyCell: YHResignDocumentCell {
infoFailLabel.isHidden = !needShowFailButton infoFailLabel.isHidden = !needShowFailButton
infoFailLabel.snp.remakeConstraints { make in infoFailLabel.snp.remakeConstraints { make in
if needShowFailButton { if needShowFailButton {
make.top.equalTo(infoDetailLabel.snp.bottom).offset(6) make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
} }
make.left.equalToSuperview().offset(18) make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18) make.right.lessThanOrEqualToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16) make.bottom.lessThanOrEqualToSuperview().offset(-16)
} }
} }
......
...@@ -511,7 +511,7 @@ private extension YHPreviewViewModel { ...@@ -511,7 +511,7 @@ private extension YHPreviewViewModel {
var title = "" var title = ""
if let item = model.school_address { if let item = model.school_address {
if item.country.contains("中国") { if item.country.contains("中国") {
title = "" title = item.country
if item.area.count > 1 { if item.area.count > 1 {
title = title + item.area[0] + "/" + item.area[1] title = title + item.area[0] + "/" + item.area[1]
} }
...@@ -1498,7 +1498,6 @@ private extension YHPreviewViewModel { ...@@ -1498,7 +1498,6 @@ private extension YHPreviewViewModel {
} }
do { do {
//子女信息 //子女信息
var arr = [YHPreviewQuestionAndAnswerModel]()
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "子女姓名:", answer: model.subsetName) let tmp0 = YHPreviewQuestionAndAnswerModel(question: "子女姓名:", answer: model.subsetName)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: model.usedName.defaultStringIfEmpty()) let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: model.usedName.defaultStringIfEmpty())
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: model.surname.defaultStringIfEmpty()) let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: model.surname.defaultStringIfEmpty())
...@@ -1508,11 +1507,8 @@ private extension YHPreviewViewModel { ...@@ -1508,11 +1507,8 @@ private extension YHPreviewViewModel {
var city = "" var city = ""
if model.birthPlaceAboard == 0 { if model.birthPlaceAboard == 0 {
//国内 //国内
if model.birthPlace.area.count > 1 { city = "国内 " + model.birthPlace.details
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else { } else {
//国外 //国外
city = "国外 " + model.birthPlace.foreign city = "国外 " + model.birthPlace.foreign
...@@ -1520,7 +1516,8 @@ private extension YHPreviewViewModel { ...@@ -1520,7 +1516,8 @@ private extension YHPreviewViewModel {
let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city) let tmp4 = YHPreviewQuestionAndAnswerModel(question: "出生城市:", answer: city)
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married) let tmp5 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married)
var arr:[YHPreviewQuestionAndAnswerModel] = [tmp0, tmp1, tmp2, tmp3, tmp4, tmp5]
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: model.nows == 1 ? "是" : "否") let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: model.nows == 1 ? "是" : "否")
arr.append(tmp10) arr.append(tmp10)
...@@ -1601,7 +1598,7 @@ private extension YHPreviewViewModel { ...@@ -1601,7 +1598,7 @@ private extension YHPreviewViewModel {
do { do {
//配偶信息-否 //配偶信息-否
let tmp0 = YHPreviewQuestionAndAnswerModel(question: "配偶姓名:", answer: model.subsetName) let tmp0 = YHPreviewQuestionAndAnswerModel(question: "子女姓名:", answer: model.subsetName)
let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: model.usedName.defaultStringIfEmpty()) let tmp1 = YHPreviewQuestionAndAnswerModel(question: "曾用名:", answer: model.usedName.defaultStringIfEmpty())
let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: model.surname.defaultStringIfEmpty()) let tmp2 = YHPreviewQuestionAndAnswerModel(question: "婚前姓氏:", answer: model.surname.defaultStringIfEmpty())
let sexStr = YHConstantArrayData.getShowNameBy(indexStr: String(model.sex), type: .sex) let sexStr = YHConstantArrayData.getShowNameBy(indexStr: String(model.sex), type: .sex)
...@@ -1609,11 +1606,8 @@ private extension YHPreviewViewModel { ...@@ -1609,11 +1606,8 @@ private extension YHPreviewViewModel {
var city = "" var city = ""
if model.birthPlaceAboard == 0 { if model.birthPlaceAboard == 0 {
//国内 //国内
if model.birthPlace.area.count > 1 { city = "国内 " + model.birthPlace.details
city = "国内 " + model.birthPlace.area[0] + "/" + model.birthPlace.area[1]
} else {
city = "国内 --"
}
} else { } else {
//国外 //国外
city = "国外 " + model.birthPlace.foreign city = "国外 " + model.birthPlace.foreign
...@@ -1622,6 +1616,50 @@ private extension YHPreviewViewModel { ...@@ -1622,6 +1616,50 @@ private extension YHPreviewViewModel {
let tmp44 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married.defaultStringIfEmpty()) let tmp44 = YHPreviewQuestionAndAnswerModel(question: "婚姻状况:", answer: model.married.defaultStringIfEmpty())
var arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp44] var arr = [tmp0,tmp1,tmp2,tmp3,tmp4,tmp44]
let tmp10 = YHPreviewQuestionAndAnswerModel(question: "是否和主申请人同住:", answer: model.nows == 1 ? "是" : "否")
arr.append(tmp10)
var liveAbord = false //海外
var address = ""
if model.nows == 0 {
var title = ""
if model.address.country.contains("中国") {
//国内
title = "国内 "
if model.address.area.count > 1 {
title = title + model.address.area[0] + "/" + model.address.area[1]
} else {
title = "国内 --"
}
address = model.address.details
} else {
//国外
title = model.address.country
liveAbord = true
address = model.address.foreign
}
let tmp11 = YHPreviewQuestionAndAnswerModel(question: "现居住地址:", answer: title)
arr.append(tmp11)
}
if liveAbord == true {
let title = model.isLiveOverseaYear == 1 ? "是" : "否"
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "是否在海外居住满1年及以上:", answer: title)
arr.append(tmp12)
}
if true {
let title = model.isPreviousMarriageChild() ? "是" : "否"
let tmp12 = YHPreviewQuestionAndAnswerModel(question: "是否为前次婚姻的子女", answer: title)
arr.append(tmp12)
}
if model.nows == 0 {
let tmp133 = YHPreviewQuestionAndAnswerModel(question: "详细地址:", answer: address.defaultStringIfEmpty())
arr.append(tmp133)
}
let isHKIdCardHandled = model.isHaveHKIdentityCard() let isHKIdCardHandled = model.isHaveHKIdentityCard()
let isHKIdCardHandledString = isHKIdCardHandled ? "是" : "否" let isHKIdCardHandledString = isHKIdCardHandled ? "是" : "否"
let tmp5 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: isHKIdCardHandledString) let tmp5 = YHPreviewQuestionAndAnswerModel(question: "是否办理过香港身份证:", answer: isHKIdCardHandledString)
......
...@@ -149,10 +149,6 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa ...@@ -149,10 +149,6 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
let vc = YHWorkExperienceViewController() let vc = YHWorkExperienceViewController()
vc.workId = model.id ?? 0 vc.workId = model.id ?? 0
vc.orderID = self.orderId vc.orderID = self.orderId
vc.isShowMessageSelect = true
if firstModel?.id == model.id {
vc.isShowMessageSelect = false
}
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
cell.deleteBlock = {[weak self] model in cell.deleteBlock = {[weak self] model in
...@@ -170,11 +166,12 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa ...@@ -170,11 +166,12 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
} else { } else {
self.viewModel?.requestCreateNewWork(self.orderId, callBackBlock: {[weak self] success, error in self.viewModel?.requestCreateNewWork(self.orderId, callBackBlock: {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
let vc = YHWorkExperienceViewController() if success != 0 {
vc.isShowMessageSelect = true let vc = YHWorkExperienceViewController()
vc.orderID = self.orderId vc.orderID = self.orderId
vc.workId = self.viewModel?.workId ?? 0 vc.workId = success
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
}
}) })
} }
} }
...@@ -187,9 +184,9 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa ...@@ -187,9 +184,9 @@ extension YHWorkExperienceListViewController: UITableViewDelegate, UITableViewDa
cell.clickBlock = { [weak self] value, index in cell.clickBlock = { [weak self] value, index in
guard let self = self else { return } guard let self = self else { return }
if index == 0 { if index == 0 {
self.viewModel?.mainModel.work_time_empty_remark = value
} else {
self.viewModel?.mainModel.work_time_overlap_remark = value self.viewModel?.mainModel.work_time_overlap_remark = value
} else {
self.viewModel?.mainModel.work_time_empty_remark = value
} }
} }
cell.backgroundColor = .clear cell.backgroundColor = .clear
......
...@@ -21,7 +21,6 @@ class YHWorkExperienceViewController: YHBaseViewController { ...@@ -21,7 +21,6 @@ class YHWorkExperienceViewController: YHBaseViewController {
var orderID: Int = 0 var orderID: Int = 0
var isMore: Bool = false var isMore: Bool = false
var isShowPrompt: Bool = false var isShowPrompt: Bool = false
var isShowMessageSelect: Bool = true
var isKeyboardShow: Bool = false var isKeyboardShow: Bool = false
var selectEditItem = YHWorkExperienceFileModel() var selectEditItem = YHWorkExperienceFileModel()
var fileMessageArray: [String] = ["签字盖章的推荐信", "盖章的工作证明+签字的推荐信", "其他证明(退工单或合同+社保等证明)", "以上均不能提供"] var fileMessageArray: [String] = ["签字盖章的推荐信", "盖章的工作证明+签字的推荐信", "其他证明(退工单或合同+社保等证明)", "以上均不能提供"]
......
...@@ -10,7 +10,7 @@ import Foundation ...@@ -10,7 +10,7 @@ import Foundation
import SmartCodable import SmartCodable
class YHWorkExperienceDetailModel: SmartCodable { class YHWorkExperienceDetailModel: SmartCodable {
var word_id: Int = 0 var work_id: Int = 0
var order_id: Int = 0 var order_id: Int = 0
var company_name: String = "" var company_name: String = ""
var professional_level: Int = 0 var professional_level: Int = 0
......
...@@ -46,6 +46,8 @@ enum YHWorkExperienceID: Int { ...@@ -46,6 +46,8 @@ enum YHWorkExperienceID: Int {
case id20 = 19 // 高管证明文件 case id20 = 19 // 高管证明文件
case id21 = 20 // 高管在职开始时间 case id21 = 20 // 高管在职开始时间
case id22 = 21 // 高管在职结束时间 case id22 = 21 // 高管在职结束时间
case id23 = 22 // 入职年月
case id24 = 23 // 离职年月
} }
......
...@@ -181,7 +181,7 @@ class YHSelectFileSheetView: UIView { ...@@ -181,7 +181,7 @@ class YHSelectFileSheetView: UIView {
} }
@objc func sure() { @objc func sure() {
var array:[YHWorkExperienceFileModel] = [] var array: [YHWorkExperienceFileModel] = []
for item in dataSource { for item in dataSource {
if item.isSelect { if item.isSelect {
array.append(item) array.append(item)
...@@ -211,13 +211,17 @@ extension YHSelectFileSheetView: UITableViewDelegate, UITableViewDataSource { ...@@ -211,13 +211,17 @@ extension YHSelectFileSheetView: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withClass: YHSelectFileCell.self) let cell = tableView.dequeueReusableCell(withClass: YHSelectFileCell.self)
cell.updateModel(dataSource[indexPath.row]) cell.updateModel(dataSource[indexPath.row])
cell.index = indexPath.row
cell.editBlock = { [weak self] model in cell.editBlock = { [weak self] model in
guard let self = self else { return } guard let self = self else { return }
var i = 0
for item in dataSource { for item in dataSource {
if item.fileUrl == model.fileUrl { if i == model {
item.isSelect = !item.isSelect item.isSelect = !item.isSelect
} }
i = i + 1
} }
self.tableView.reloadData()
} }
return cell return cell
} }
...@@ -248,8 +252,8 @@ class YHSelectFileCell: UITableViewCell { ...@@ -248,8 +252,8 @@ class YHSelectFileCell: UITableViewCell {
static let cellReuseIdentifier = "YHSelectFileCell" static let cellReuseIdentifier = "YHSelectFileCell"
var editBlock:((YHWorkExperienceFileModel)->())? var editBlock:((Int)->())?
var index: Int = 0
var whiteView: UIView! var whiteView: UIView!
var iconImgV: UIImageView! var iconImgV: UIImageView!
var nameLabel: UILabel! var nameLabel: UILabel!
...@@ -306,7 +310,7 @@ class YHSelectFileCell: UITableViewCell { ...@@ -306,7 +310,7 @@ class YHSelectFileCell: UITableViewCell {
@objc func didEditBtnClicked() { @objc func didEditBtnClicked() {
editBtn.isSelected = !editBtn.isSelected editBtn.isSelected = !editBtn.isSelected
if let editBlock = editBlock { if let editBlock = editBlock {
editBlock(contentItem) editBlock(index)
} }
} }
......
...@@ -308,7 +308,7 @@ class YHWorkExperienceItemView: UIView { ...@@ -308,7 +308,7 @@ class YHWorkExperienceItemView: UIView {
showPromptLabel.isHidden = true showPromptLabel.isHidden = true
} }
if dataSource.id == .id10 || dataSource.id == .id22{ if dataSource.id == .id10 || dataSource.id == .id22 || dataSource.id == .id24 {
longTimeButton.isHidden = false longTimeButton.isHidden = false
nextStepImageView.isHidden = true nextStepImageView.isHidden = true
if dataSource.message == "至今" { if dataSource.message == "至今" {
...@@ -439,6 +439,14 @@ class YHWorkExperienceItemView: UIView { ...@@ -439,6 +439,14 @@ class YHWorkExperienceItemView: UIView {
title = "选择高管在职结束时间" title = "选择高管在职结束时间"
lastIsTaday = true lastIsTaday = true
} }
if dataSource?.id == .id23 {
title = "选择开始就职年月"
lastIsTaday = true
}
if dataSource?.id == .id24 {
title = "选择结束就职年月"
lastIsTaday = true
}
YHDatePickView.show(type: .yyyymm, title: title, lastIsTaday: lastIsTaday, currentDay: dataSource?.message ?? "") { date in YHDatePickView.show(type: .yyyymm, title: title, lastIsTaday: lastIsTaday, currentDay: dataSource?.message ?? "") { date in
self.dataSource?.message = date self.dataSource?.message = date
self.updateAllViews() self.updateAllViews()
......
...@@ -174,12 +174,12 @@ class YHWorkExperienceListReasonTableViewCell: UITableViewCell { ...@@ -174,12 +174,12 @@ class YHWorkExperienceListReasonTableViewCell: UITableViewCell {
make.bottom.equalTo(-28) make.bottom.equalTo(-28)
} }
} }
messageTextField.text = model?.work_time_empty_remark messageTextField.text = model?.work_time_overlap_remark
if messageTextField.text.count != 0 { if messageTextField.text.count != 0 {
promptsLabel.isHidden = true promptsLabel.isHidden = true
messageNumberLabel.text = "\(messageTextField.text.count)/1000" messageNumberLabel.text = "\(messageTextField.text.count)/1000"
} }
messageTwoTextField.text = model?.work_time_overlap_remark messageTwoTextField.text = model?.work_time_empty_remark
if messageTwoTextField.text.count != 0 { if messageTwoTextField.text.count != 0 {
promptsTwoLabel.isHidden = true promptsTwoLabel.isHidden = true
messageTwoNumberLabel.text = "\(messageTwoTextField.text.count)/1000" messageTwoNumberLabel.text = "\(messageTwoTextField.text.count)/1000"
......
...@@ -18,8 +18,8 @@ class YHWorkExperiencePositionViewModel: YHBaseViewModel { ...@@ -18,8 +18,8 @@ class YHWorkExperiencePositionViewModel: YHBaseViewModel {
func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] { func getBaseDataSource(_ isShowPrompt: Bool) -> [YHSectionWorkExperienceModel] {
let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "职位名称", isUserKeyBoard: true, prompts: "请输入", message: position.position_name, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item = YHWorkExperienceModel(id: .id1, isNeed: true, title: "职位名称", isUserKeyBoard: true, prompts: "请输入", message: position.position_name, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "职责性质", isUserKeyBoard: true, prompts: "请输入", message: position.wduty, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item1 = YHWorkExperienceModel(id: .id2, isNeed: true, title: "职责性质", isUserKeyBoard: true, prompts: "请输入", message: position.wduty, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item2 = YHWorkExperienceModel(id: .id3, isNeed: true, title: "开始就职年月", isUserKeyBoard: false, prompts: "请选择", message: position.entry_time, type: .time) let item2 = YHWorkExperienceModel(id: .id23, isNeed: true, title: "开始就职年月", isUserKeyBoard: false, prompts: "请选择", message: position.entry_time, type: .time)
let item3 = YHWorkExperienceModel(id: .id10, isNeed: true, title: "结束就职年月", isUserKeyBoard: false, prompts: "请选择", message: position.departure_time, type: .time) let item3 = YHWorkExperienceModel(id: .id24, isNeed: true, title: "结束就职年月", isUserKeyBoard: false, prompts: "请选择", message: position.departure_time, type: .time)
let item6 = YHWorkExperienceModel(id: .id5, isNeed: true, title: "经验领域", isUserKeyBoard: false, prompts: "请选择", message: position.experience_scope, type: .field, isShowPrompts: isShowPrompt, alertMessage:"请选择") let item6 = YHWorkExperienceModel(id: .id5, isNeed: true, title: "经验领域", isUserKeyBoard: false, prompts: "请选择", message: position.experience_scope, type: .field, isShowPrompts: isShowPrompt, alertMessage:"请选择")
let item66 = YHWorkExperienceModel(id: .id6, isNeed: true, title: "具体经验领域", isUserKeyBoard: true, prompts: "请输入", message: position.experience_sub_scope, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请输入") let item66 = YHWorkExperienceModel(id: .id6, isNeed: true, title: "具体经验领域", isUserKeyBoard: true, prompts: "请输入", message: position.experience_sub_scope, type: .country, isShowPrompts: isShowPrompt, alertMessage:"请输入")
let item11 = YHWorkExperienceModel(id: .id7, isNeed: true, title: "相关工作经验是否属于国际工作经验", isUserKeyBoard: false, prompts: "", message: "\(position.is_international_work_experience)", leftButtonString: "是", rightButtonString: "否") let item11 = YHWorkExperienceModel(id: .id7, isNeed: true, title: "相关工作经验是否属于国际工作经验", isUserKeyBoard: false, prompts: "", message: "\(position.is_international_work_experience)", leftButtonString: "是", rightButtonString: "否")
...@@ -56,7 +56,7 @@ class YHWorkExperiencePositionViewModel: YHBaseViewModel { ...@@ -56,7 +56,7 @@ class YHWorkExperiencePositionViewModel: YHBaseViewModel {
position.position_name = item.message ?? "" position.position_name = item.message ?? ""
case .id2: // 用人单位性质 case .id2: // 用人单位性质
position.wduty = item.message ?? "" position.wduty = item.message ?? ""
case .id3: // 入职年月 case .id23: // 入职年月
let format = DateFormatter() let format = DateFormatter()
format.dateFormat = "yyyy-MM" format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? "") { if let selectDate = format.date(from:item.message ?? "") {
...@@ -77,7 +77,7 @@ class YHWorkExperiencePositionViewModel: YHBaseViewModel { ...@@ -77,7 +77,7 @@ class YHWorkExperiencePositionViewModel: YHBaseViewModel {
} }
} }
} }
case .id10: // 离职年月 case .id24: // 离职年月
let format = DateFormatter() let format = DateFormatter()
format.dateFormat = "yyyy-MM" format.dateFormat = "yyyy-MM"
if let selectDate = format.date(from:item.message ?? ""), let startDate = format.date(from:position.entry_time) { if let selectDate = format.date(from:item.message ?? ""), let startDate = format.date(from:position.entry_time) {
......
...@@ -304,7 +304,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel { ...@@ -304,7 +304,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
self.mainModel.word_id = result.word_id self.mainModel.work_id = result.work_id
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
...@@ -352,7 +352,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel { ...@@ -352,7 +352,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
self.mainModel.word_id = result.word_id self.mainModel.work_id = result.work_id
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
...@@ -400,7 +400,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel { ...@@ -400,7 +400,7 @@ class YHWorkExperienceViewModel: YHBaseViewModel {
callBackBlock(false,nil) callBackBlock(false,nil)
return return
} }
self.mainModel.word_id = result.word_id self.mainModel.work_id = result.work_id
callBackBlock(true, nil) callBackBlock(true, nil)
} else { } else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
......
...@@ -78,7 +78,7 @@ class YHWorkItemListViewModel: YHBaseViewModel { ...@@ -78,7 +78,7 @@ class YHWorkItemListViewModel: YHBaseViewModel {
} }
} }
func requestCreateNewWork(_ orderId: Int, callBackBlock:@escaping (_ success: [YHWorkItemListModel]?, _ error:YHErrorModel?)->()) { func requestCreateNewWork(_ orderId: Int, callBackBlock:@escaping (_ success: Int, _ error:YHErrorModel?)->()) {
// let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.list + "?order_id=\(orderId)" // let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.list + "?order_id=\(orderId)"
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.createNewWork let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.createNewWork
let params: [String : Any] = ["order_id": orderId] let params: [String : Any] = ["order_id": orderId]
...@@ -88,17 +88,17 @@ class YHWorkItemListViewModel: YHBaseViewModel { ...@@ -88,17 +88,17 @@ class YHWorkItemListViewModel: YHBaseViewModel {
guard let self = self else { return } guard let self = self else { return }
if json.code == 200 { if json.code == 200 {
guard let dic = json.data?.peel as? [String : Any], let result = YHWorkExperienceDetailModel.deserialize(from: dic) else { guard let dic = json.data?.peel as? [String : Any], let result = YHWorkExperienceDetailModel.deserialize(from: dic) else {
callBackBlock([],nil) callBackBlock(0,nil)
return return
} }
self.workId = result.word_id self.workId = result.work_id
callBackBlock(self.listModel, nil) callBackBlock(result.work_id, nil)
} else { } else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg) let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code), errorMsg: json.msg)
callBackBlock([], error) callBackBlock(0, error)
} }
} failBlock: { err in } failBlock: { err in
callBackBlock([],err) callBackBlock(0,err)
} }
} }
} }
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