Commit b8fdc8bd authored by David黄金龙's avatar David黄金龙

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

* 'develop' of http://gitlab.galaxy-immi.com/mobile-group/galaxy-iOS:
  // 原则批
  // 原则批
  原则批
  //  原则批
  //  原则批
  //  必填字段
parents bd7f47bc e89847cf
...@@ -54,6 +54,7 @@ class YHPrincipleApprovedResultVC: YHBaseViewController { ...@@ -54,6 +54,7 @@ class YHPrincipleApprovedResultVC: YHBaseViewController {
// 已发送邮件 // 已发送邮件
self.mailVC.requestData() self.mailVC.requestData()
self.mailVC.view.isHidden = false self.mailVC.view.isHidden = false
return
} }
// 未发送邮件 // 未发送邮件
YHHUD.show(.progress(message:"加载中")) YHHUD.show(.progress(message:"加载中"))
......
...@@ -130,10 +130,11 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -130,10 +130,11 @@ class YHPrincipleUploadListVC: YHBaseViewController {
// 赴港居留同意书 // 赴港居留同意书
let agreementModel = self.viewModel.uploadDetailModel.file_data.agreement let agreementModel = self.viewModel.uploadDetailModel.file_data.agreement
if agreementModel.id > 0 { if agreementModel.id > 0 {
agreementModel.customType = YHPrincipleAgreementType.agreement.rawValue agreementModel.customType = YHPrincipleAgreementType.agreement.rawValue
agreementModel.isMust = true
agreementModel.isNeedTemplate = true agreementModel.isNeedTemplate = true
self.items.append(agreementModel) self.items.append(agreementModel)
} }
...@@ -141,7 +142,6 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -141,7 +142,6 @@ class YHPrincipleUploadListVC: YHBaseViewController {
let opinionModel = self.viewModel.uploadDetailModel.file_data.opinion let opinionModel = self.viewModel.uploadDetailModel.file_data.opinion
if opinionModel.id > 0 { if opinionModel.id > 0 {
opinionModel.customType = YHPrincipleAgreementType.opinion.rawValue opinionModel.customType = YHPrincipleAgreementType.opinion.rawValue
opinionModel.isMust = true
opinionModel.isNeedTemplate = true opinionModel.isNeedTemplate = true
self.items.append(opinionModel) self.items.append(opinionModel)
} }
...@@ -150,11 +150,17 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -150,11 +150,17 @@ class YHPrincipleUploadListVC: YHBaseViewController {
let otherModel = self.viewModel.uploadDetailModel.file_data.other let otherModel = self.viewModel.uploadDetailModel.file_data.other
if otherModel.id > 0 { if otherModel.id > 0 {
otherModel.customType = YHPrincipleAgreementType.other.rawValue otherModel.customType = YHPrincipleAgreementType.other.rawValue
otherModel.isMust = false
otherModel.isNeedTemplate = false otherModel.isNeedTemplate = false
self.items.append(otherModel) self.items.append(otherModel)
} }
let isBottomUploadBtnHidden = !agreementModel.isCanUpload && !opinionModel.isCanUpload && !otherModel.isCanUpload
self.uploadBtn.isHidden = isBottomUploadBtnHidden
uploadBtn.snp.updateConstraints { make in
let bottomMargin = isBottomUploadBtnHidden ? 48 : -42
make.bottom.equalTo(bottomMargin)
}
// 已获得港府甄选名额 // 已获得港府甄选名额
if !self.viewModel.envelopModel.name.isEmpty, !self.viewModel.envelopModel.url.isEmpty { if !self.viewModel.envelopModel.name.isEmpty, !self.viewModel.envelopModel.url.isEmpty {
self.items.append(self.viewModel.envelopModel) self.items.append(self.viewModel.envelopModel)
...@@ -178,6 +184,9 @@ class YHPrincipleUploadListVC: YHBaseViewController { ...@@ -178,6 +184,9 @@ class YHPrincipleUploadListVC: YHBaseViewController {
self.items.append(model3) self.items.append(model3)
self.tableView.reloadData() self.tableView.reloadData()
self.view.setNeedsLayout()
self.view.layoutIfNeeded()
} }
} }
...@@ -186,16 +195,23 @@ extension YHPrincipleUploadListVC { ...@@ -186,16 +195,23 @@ extension YHPrincipleUploadListVC {
func checkMustItems() -> Bool { func checkMustItems() -> Bool {
// 赴港居留同意书 // 赴港居留同意书
let agreementModel = self.viewModel.uploadDetailModel.file_data.agreement let agreementModel = self.viewModel.uploadDetailModel.file_data.agreement
if agreementModel.content_url.count <= 0 { if agreementModel.isMust, agreementModel.content_url.count <= 0 {
YHHUD.flash(message: "请上传必要文件赴港居留同意书") YHHUD.flash(message: "请上传必要文件赴港居留同意书")
return false return false
} }
// 申请人意见访问 // 申请人意见访问
let opinionModel = self.viewModel.uploadDetailModel.file_data.opinion let opinionModel = self.viewModel.uploadDetailModel.file_data.opinion
if opinionModel.content_url.count <= 0 { if opinionModel.isMust, opinionModel.content_url.count <= 0 {
YHHUD.flash(message: "请上传必要文件申请人意见访问") YHHUD.flash(message: "请上传必要文件申请人意见访问")
return false return false
} }
// 其他证明条件
let otherModel = self.viewModel.uploadDetailModel.file_data.opinion
if otherModel.isMust, otherModel.content_url.count <= 0 {
YHHUD.flash(message: "请上传必要文件其他证明条件")
return false
}
return true return true
} }
...@@ -368,7 +384,7 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -368,7 +384,7 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadStatusCell let cell = tableView.dequeueReusableCell(withIdentifier: YHPrincipleUploadStatusCell.cellReuseIdentifier, for: indexPath) as! YHPrincipleUploadStatusCell
let model = m as! YHPrincipleAgreementModel let model = m as! YHPrincipleAgreementModel
if isNeedShowSubmitCheckError, model.content_url.count <= 0 { if isNeedShowSubmitCheckError, model.isMust == true, model.content_url.count <= 0 {
model.isShowRedTips = true model.isShowRedTips = true
} else { } else {
model.isShowRedTips = false model.isShowRedTips = false
...@@ -402,6 +418,10 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource { ...@@ -402,6 +418,10 @@ extension YHPrincipleUploadListVC: UITableViewDelegate, UITableViewDataSource {
cell.uploadBtnClick = { cell.uploadBtnClick = {
[weak self] selectModel in [weak self] selectModel in
guard let self = self else { return } guard let self = self else { return }
if model.content_url.count >= 10 {
YHHUD.flash(message: "最多长传10张照片或文件")
return
}
self.showSelectImageAndFileView(model) self.showSelectImageAndFileView(model)
} }
// 点击模版 // 点击模版
......
...@@ -95,15 +95,15 @@ extension YHPrincipleWaitResultViewController { ...@@ -95,15 +95,15 @@ extension YHPrincipleWaitResultViewController {
viewModel.getPrincipleWaitReviewResult(params: params) { success, error in viewModel.getPrincipleWaitReviewResult(params: params) { success, error in
self.items.removeAll() self.items.removeAll()
let waitResultModel = self.viewModel.waitResultModel let waitResultModel = self.viewModel.waitResultModel
// 待补件和未获批准不显示实时入境处身份申请进度 if self.status == YHCustomerServiceStatus.principleWaitResult.rawValue {
if self.status != YHCustomerServiceStatus.principleSupplement.rawValue && if waitResultModel.resultImageList.count > 0 {
self.status != YHCustomerServiceStatus.principleRejected.rawValue { // 实时入境处身份申请进度
// 实时入境处身份申请进度 let model1 = waitResultModel.copy()
let model1 = waitResultModel.copy() model1.type = .photo
model1.type = .photo model1.title = "实时入境处身份申请进度"
model1.title = "实时入境处身份申请进度" model1.isUnfold = true
model1.isUnfold = true self.items.append(model1)
self.items.append(model1) }
} }
// 入境处已认收受理 // 入境处已认收受理
......
...@@ -195,13 +195,28 @@ class YHPrincipleAgreementModel: SmartCodable { ...@@ -195,13 +195,28 @@ class YHPrincipleAgreementModel: SmartCodable {
// 自定义属性 // 自定义属性
var customType: Int = YHPrincipleAgreementType.none.rawValue var customType: Int = YHPrincipleAgreementType.none.rawValue
var isMust: Bool = false // 是否必须 var isMust: Bool {// 是否必须 0:必须提供 1:无需提供
get {
return self.upload_requirement == 0
}
}
var isNeedTemplate: Bool = false var isNeedTemplate: Bool = false
var isNeedUploadBtn: Bool { var isNeedUploadBtn: Bool {
// 待上传或已驳回状态才显示上传按钮 且最多上传10个 // 待上传或已驳回状态才显示上传按钮 且最多上传10个
return (self.check_status == YHPrincipleUploadStatus.preUpload.rawValue || get {
self.check_status == YHPrincipleUploadStatus.rejected.rawValue) && self.content_url.count < 10 return (self.check_status == YHPrincipleUploadStatus.preUpload.rawValue ||
self.check_status == YHPrincipleUploadStatus.rejected.rawValue)
}
} }
var isCanUpload: Bool {
get {
return (self.check_status == YHPrincipleUploadStatus.preUpload.rawValue ||
self.check_status == YHPrincipleUploadStatus.rejected.rawValue)
}
}
// 是否展示上传状态 // 是否展示上传状态
var isNeedUploadStatus: Bool { var isNeedUploadStatus: Bool {
return self.check_status != YHPrincipleUploadStatus.preUpload.rawValue return self.check_status != YHPrincipleUploadStatus.preUpload.rawValue
......
...@@ -208,6 +208,8 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -208,6 +208,8 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
// 审核状态 // 审核状态
if model.isNeedUploadStatus { if model.isNeedUploadStatus {
self.statusLabel.text = self.getUploadStatusText(status: model.check_status) self.statusLabel.text = self.getUploadStatusText(status: model.check_status)
let width = model.check_status == YHPrincipleUploadStatus.mail.rawValue ? 58.0 : 38.0
self.statusLabel.frame = CGRect(x: 0, y: 0, width: width, height: 16)
self.statusLabel.textColor = self.getUploadTitleColor(status: model.check_status) self.statusLabel.textColor = self.getUploadTitleColor(status: model.check_status)
self.statusLabel.backgroundColor = self.getUploadBgColor(status: model.check_status) self.statusLabel.backgroundColor = self.getUploadBgColor(status: model.check_status)
let status: ASAttributedString = " \(.view(self.statusLabel, .original(.center)))" let status: ASAttributedString = " \(.view(self.statusLabel, .original(.center)))"
...@@ -425,7 +427,11 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -425,7 +427,11 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
return "" return ""
} }
if type == YHPrincipleAgreementType.other.rawValue { if type == YHPrincipleAgreementType.other.rawValue {
return "1.新公司在职证明(在申请期间更换了工作时必传)\n2.主申人的曾用名证明文件,例如户口本副本\n3.主申请人的中国无刑事罪行记录证明书副本(由公安局开具)" var text = ""
if let remark = self.itemModel?.remark, !remark.isEmpty {
text = "\n"+remark
}
return "新公司在职证明(在申请期间更换了工作时必传)"+text
} }
return "" return ""
} }
...@@ -438,7 +444,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell { ...@@ -438,7 +444,7 @@ class YHPrincipleUploadStatusCell: UITableViewCell {
return "请上传申请人意见访问" return "请上传申请人意见访问"
} }
if type == YHPrincipleAgreementType.other.rawValue { if type == YHPrincipleAgreementType.other.rawValue {
return "" return "请上传其他证明材料"
} }
return "" return ""
} }
......
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