Commit 8558bf82 authored by Steven杜宇's avatar Steven杜宇

// 续签证件列表状态更改

parent 82cff99b
...@@ -93,16 +93,19 @@ extension YHResignCertificateListViewController: UITableViewDelegate, UITableVie ...@@ -93,16 +93,19 @@ extension YHResignCertificateListViewController: UITableViewDelegate, UITableVie
guard let self = self else { return } guard let self = self else { return }
if indexPath.row == 0 { if indexPath.row == 0 {
if model.cert_type == "PASS_PORT" { if model.cert_type == "PASS_PORT" {
// 护照
let vc = YHResignCertificateDetailPassPortViewController() let vc = YHResignCertificateDetailPassPortViewController()
vc.cerId = model.id vc.cerId = model.id
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} else { } else {
// 港澳通行证
let vc = YHResignCertificateDetailHkViewController() let vc = YHResignCertificateDetailHkViewController()
vc.cerId = model.id vc.cerId = model.id
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
} }
if indexPath.row == 1 { if indexPath.row == 1 {
// 电子签证
let vc = YHResignCertificateDetailEVisaViewController() let vc = YHResignCertificateDetailEVisaViewController()
vc.data = model vc.data = model
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
...@@ -111,12 +114,14 @@ extension YHResignCertificateListViewController: UITableViewDelegate, UITableVie ...@@ -111,12 +114,14 @@ extension YHResignCertificateListViewController: UITableViewDelegate, UITableVie
if model.age < 11 { if model.age < 11 {
return return
} }
// 香港身份证
let vc = YHResignCertificateDetailViewController() let vc = YHResignCertificateDetailViewController()
vc.detailType = .HongKongCard vc.detailType = .HongKongCard
vc.dataModel = model vc.dataModel = model
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
} }
if indexPath.row == 3 { if indexPath.row == 3 {
// 小白条
let vc = YHResignCertificateDetailViewController() let vc = YHResignCertificateDetailViewController()
vc.detailType = .SmallWhiteNote vc.detailType = .SmallWhiteNote
vc.dataModel = model vc.dataModel = model
......
...@@ -8,6 +8,13 @@ ...@@ -8,6 +8,13 @@
import UIKit import UIKit
enum ResignCertificateStatus: Int {
case NotUpload = 0 // 待上传
case Review = 1 // 审核中
case Complete = 2 // 已完成
case Rejected = 3 // 已驳回
}
class YHResignCertificateListTableViewCell: UITableViewCell { class YHResignCertificateListTableViewCell: UITableViewCell {
typealias ResignCertificateBlock = (_ model: YHResignCertificateModel) -> Void typealias ResignCertificateBlock = (_ model: YHResignCertificateModel) -> Void
var clickBlock: ResignCertificateBlock? var clickBlock: ResignCertificateBlock?
...@@ -213,15 +220,32 @@ class YHResignCertificateView: UIView { ...@@ -213,15 +220,32 @@ class YHResignCertificateView: UIView {
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
titleLabel.text = dataSource.name titleLabel.text = dataSource.name
if dataSource.status == 1 { if dataSource.status == ResignCertificateStatus.NotUpload.rawValue {
explainLabel.text = "待上传" explainLabel.text = "待上传"
explainLabel.textColor = UIColor.brandMainColor explainLabel.textColor = UIColor.brandMainColor
nextStepImageView.image = UIImage(named: "service_adopter_income_start") nextStepImageView.image = UIImage(named: "service_adopter_income_start")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor.brandMainColor
}
if dataSource.status == ResignCertificateStatus.Review.rawValue {
explainLabel.text = "审核中"
explainLabel.textColor = UIColor(hex: 0xFF8000)
nextStepImageView.image = UIImage(named: "service_adopter_income_start")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor(hex: 0xFF8000)
} }
if dataSource.status == 2 { if dataSource.status == ResignCertificateStatus.Complete.rawValue {
explainLabel.text = "已完成" explainLabel.text = "已完成"
explainLabel.textColor = UIColor(hex: 0x3cc694) explainLabel.textColor = UIColor(hex: 0x3cc694)
nextStepImageView.image = UIImage(named: "service_adopter_income_success") nextStepImageView.image = UIImage(named: "service_adopter_income_success")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor(hex: 0x3cc694)
}
if dataSource.status == ResignCertificateStatus.Rejected.rawValue {
explainLabel.text = "已驳回"
explainLabel.textColor = UIColor(hex: 0xF81D22)
nextStepImageView.image = UIImage(named: "service_adopter_income_start")?.withRenderingMode(.alwaysTemplate)
nextStepImageView.tintColor = UIColor(hex: 0xF81D22)
} }
if dataSource.cert_type == "PASS_PORT" { if dataSource.cert_type == "PASS_PORT" {
......
...@@ -18,5 +18,8 @@ ...@@ -18,5 +18,8 @@
"info" : { "info" : {
"author" : "xcode", "author" : "xcode",
"version" : 1 "version" : 1
},
"properties" : {
"template-rendering-intent" : "template"
} }
} }
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