Commit 8c081e1f authored by Alex朱枝文's avatar Alex朱枝文

Merge branch 'qmas-1130' into yinhe-live-1212

parents fd27691a 0bbd29f8
......@@ -497,32 +497,36 @@ extension YHIncomeRecordWorkExperienceViewController: UITableViewDelegate, UITab
extension YHIncomeRecordWorkExperienceViewController {
private func checkInput() -> Bool {
var retValue = true
var updateRows: [IndexPath] = []
if companyModel.has_all_file == YHIncomeRecordHasAllFile.unknown.rawValue {
isHasAllFileOK = false
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 {
isIncomeTypeOK = false
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 {
isIncomeMoneyOK = false
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
return true
}
return retValue
}
private func requestData(isNeedLoading: Bool = false) {
......
......@@ -57,7 +57,7 @@ class YHIncomeInputMoneyCell: YHResignDocumentCell {
let label = UILabel()
label.font = .PFSC_R(ofSize: 12)
label.textColor = .failColor
label.text = "请选择"
label.text = "请输入"
return label
}()
......@@ -110,11 +110,11 @@ class YHIncomeInputMoneyCell: YHResignDocumentCell {
infoFailLabel.isHidden = !needShowFailButton
infoFailLabel.snp.remakeConstraints { make in
if needShowFailButton {
make.top.equalTo(infoDetailLabel.snp.bottom).offset(6)
make.top.equalTo(infoTitleLabel.snp.bottom).offset(6)
}
make.left.equalToSuperview().offset(18)
make.right.lessThanOrEqualToSuperview().offset(-18)
make.bottom.equalToSuperview().offset(-16)
make.bottom.lessThanOrEqualToSuperview().offset(-16)
}
}
......
......@@ -187,7 +187,7 @@ extension YHMainApplicantInformationViewController: UITableViewDelegate, UITable
guard let self = self else { return }
self.viewModel.updateModel(model)
let id = model.id
if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id17 && id != .id18 && id != .id21 && id != .id22 && id != .id23 && id != .id34 && id != .id29 && id != .id30 && id != .id35 {
if id != .id32 && id != .id4 && id != .id8 && id != .id9 && id != .id12 && id != .id13 && id != .id17 && id != .id18 && id != .id21 && id != .id22 && id != .id23 && id != .id26 && id != .id34 && id != .id29 && id != .id30 && id != .id35 {
self.updateDataSource()
}
}
......
......@@ -112,9 +112,9 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let section2 = YHSectionItemModel(title: section3String, models: [item5, item6, item7, item8])
let addressCountry = mainModel.address.country
if (nationality.contains("中国") && addressCountry.contains("中国")) || (nationality.contains("中国") && is_live_oversea_year == 0) {
if (nationality.contains("中国-China") && addressCountry.contains("中国-China")) || (nationality.contains("中国-China") && is_live_oversea_year == 0) {
return [section, section1]
} else if nationality.contains("中国") && is_live_oversea_year == 1 {
} else if nationality.contains("中国-China") && is_live_oversea_year == 1 {
return [section, section2]
} else {
return [section2]
......@@ -158,13 +158,13 @@ class YHMainApplicantInformationViewModel: YHBaseViewModel {
let addressCountry = mainModel.address.country
let nationality = mainModel.nationality
let is_live_oversea_year = mainModel.is_live_oversea_year
if (nationality.contains("中国-China") && addressCountry.contains("中国-China")) || (nationality.contains("中国-China") && is_live_oversea_year == 0) {
if (nationality.contains("中国") && addressCountry.contains("中国")) || (nationality.contains("中国") && is_live_oversea_year == 0) {
if mainModel.is_handled == 1 {
return [section, section1]
} else {
return [section]
}
} else if nationality.contains("中国-China") && is_live_oversea_year == 1 {
} else if nationality.contains("中国") && is_live_oversea_year == 1 {
return [section, section2]
} else {
return [section2]
......
......@@ -32,6 +32,7 @@ class YHWorkExpInfoPreviewDetail_NewModel : SmartCodable {
var professional_level : String = ""
var work_duty : String = ""
var work_highlights : String = ""
var company_location : String = ""
var attachment_list : [WorkExpFilePreviewModel] = []
var position_list : [YHWorkExpPosition_NewModel] = []
......
......@@ -42,10 +42,10 @@ class YHPreviewInfoNameAndSubNameItemView: UIView {
nameLable.snp.makeConstraints { make in
make.top.equalToSuperview().offset(18)
make.left.equalToSuperview()
make.width.lessThanOrEqualTo(154)
// make.width.lessThanOrEqualTo(154)
make.height.equalTo(20)
}
nameLable.setContentCompressionResistancePriority(.required, for: .horizontal)
addSubview(subtitleLable)
subtitleLable.snp.makeConstraints { make in
......@@ -56,6 +56,9 @@ class YHPreviewInfoNameAndSubNameItemView: UIView {
make.bottom.equalToSuperview()
}
nameLable.setContentCompressionResistancePriority(.required, for: .horizontal)
subtitleLable.setContentCompressionResistancePriority(.defaultLow, for: .horizontal)
}
}
......@@ -65,22 +68,22 @@ extension YHPreviewInfoNameAndSubNameItemView {
subtitleLable.text = subtitle
//处理特长的字符
if title.contains("相关工作是否属国际工作经验:") || title.contains("公司营业额/港元(近一年):") || title.contains("是否在海外居住满1年及以上:") {
nameLable.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(18)
make.left.equalToSuperview()
make.width.lessThanOrEqualTo(240)
make.height.equalTo(20)
}
nameLable.setContentCompressionResistancePriority(.required, for: .horizontal)
} else if title.contains("主申请人或现配偶是否拥有孩子护养权:") {
nameLable.snp.remakeConstraints { make in
make.top.equalToSuperview().offset(18)
make.left.equalToSuperview()
make.width.lessThanOrEqualTo(260)
make.height.equalTo(20)
}
}
// if title.contains("相关工作是否属国际工作经验:") || title.contains("公司营业额/港元(近一年):") || title.contains("是否在海外居住满1年及以上:") {
// nameLable.snp.remakeConstraints { make in
// make.top.equalToSuperview().offset(18)
// make.left.equalToSuperview()
// make.width.lessThanOrEqualTo(240)
// make.height.equalTo(20)
// }
// nameLable.setContentCompressionResistancePriority(.required, for: .horizontal)
// } else if title.contains("主申请人或现配偶是否拥有孩子护养权:") {
// nameLable.snp.remakeConstraints { make in
// make.top.equalToSuperview().offset(18)
// make.left.equalToSuperview()
// make.width.lessThanOrEqualTo(260)
// make.height.equalTo(20)
// }
// }
}
}
......@@ -24,7 +24,7 @@ class YHWorkExperiencePositionViewViewController: YHBaseViewController {
var isShowPrompt: Bool = false
var isShowMessageSelect: Bool = true
var isKeyboardShow: Bool = false
var selectReasonIndex: Int = 5
var selectReasonIndex: Int = 0
var selectEditItem = YHWorkExperienceFileModel()
override func viewDidLoad() {
......@@ -170,7 +170,11 @@ class YHWorkExperiencePositionViewViewController: YHBaseViewController {
extension YHWorkExperiencePositionViewViewController: UITableViewDelegate, UITableViewDataSource {
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
if self.viewModel.position.is_international_work_experience == 1 {
return 2
} else {
return 1
}
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
......
......@@ -379,7 +379,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
}
@objc func keyboardWillShow(_ notification: Notification) {
if stepView.currentIndex != 0 {
if stepView.currentIndex != 0 && stepView.currentIndex != 3 {
// 当键盘将要显示时调用此函数
stepView.snp.remakeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
......@@ -402,7 +402,7 @@ class YHWorkExperienceViewController: YHBaseViewController {
}
@objc func keyboardWillHide(_ notification: Notification) {
if stepView.currentIndex != 0 {
if stepView.currentIndex != 0 && stepView.currentIndex != 3 {
// 当键盘将要隐藏时调用此函数
stepView.snp.remakeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar)
......
......@@ -809,7 +809,7 @@ class YHCompanyReasonFileCell: UITableViewCell {
var titleLabel: UILabel!
var subTitleLabel: UILabel!
var mainItemView: UIView!
var alertLabel: UILabel!
var dataSource: [String] = ["验资报告", "审计报告", "绝对实益拥有人声明书", "企业所得税月(季)度预缴纳税申报表(A类)(前4个季度/前12个月)", "企业所得税完税证明(表格式)", "企业所得税年度纳税申报表(A类) (近一年度)", "工作证明"]
var model: YHWorkExperienceCompanyModel? {
didSet {
......@@ -892,6 +892,21 @@ class YHCompanyReasonFileCell: UITableViewCell {
make.top.equalTo(52)
}
alertLabel = {
let label = UILabel()
label.numberOfLines = 0
let b: ASAttributedString = .init("若不能提供以上证明材料,将导致您的该收入", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
let c: ASAttributedString = .init("不被认可不予加分", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor.failColor))
let d: ASAttributedString = .init(",请尽可能准备以上材料并修改此选项)", .font(UIFont.PFSC_R(ofSize:14)),.foreground(UIColor(hex: 0x8993a2)))
label.attributed.text = b + c + d
return label
}()
centerView.addSubview(alertLabel)
alertLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.bottom.equalTo(-16)
}
}
func updateAllViews() {
......@@ -999,12 +1014,14 @@ class YHCompanyReasonFileCell: UITableViewCell {
rightButton.isSelected = false
leftButton.layer.borderWidth = 1
rightButton.layer.borderWidth = 0
alertLabel.isHidden = true
}
if model?.has_provide_certificate == 2 {
rightButton.isSelected = true
leftButton.isSelected = false
leftButton.layer.borderWidth = 0
rightButton.layer.borderWidth = 1
alertLabel.isHidden = false
}
for i in 0..<dataSource.count {
let agreeButton = {
......@@ -1062,6 +1079,13 @@ class YHCompanyReasonFileCell: UITableViewCell {
if let block = selectBlock {
block(model ?? YHWorkExperienceCompanyModel())
}
mainItemView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-16)
make.top.equalTo(52)
}
alertLabel.isHidden = true
}
@objc func rightClick(sender: UIButton) {
......@@ -1069,6 +1093,12 @@ class YHCompanyReasonFileCell: UITableViewCell {
if let block = selectBlock {
block(model ?? YHWorkExperienceCompanyModel())
}
mainItemView.snp.remakeConstraints { make in
make.left.right.equalToSuperview()
make.bottom.equalTo(-72)
make.top.equalTo(52)
}
alertLabel.isHidden = false
}
}
......@@ -60,8 +60,8 @@ class YHWorkItemListViewModel: YHBaseViewModel {
func requestWorkTimeRemarkWorkExperience(_ orderId: String, _ isSaveAll: Int = 0, callBackBlock:@escaping (_ success: Bool?, _ error:YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderId,
"work_time_overlap_remark": self.mainModel.work_time_overlap_remark,
"work_time_empty_remark": self.mainModel.work_time_empty_remark,
"work_time_empty_remark": self.mainModel.work_time_overlap_remark,
"work_time_overlap_remark": self.mainModel.work_time_empty_remark,
"is_save_all": isSaveAll]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.WorkExperience.saveWorkTimeRemark
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
......
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