Commit 402f3e5d authored by pete谢兆麟's avatar pete谢兆麟

产品验收bug修复

parent 52ebb13a
...@@ -25,6 +25,7 @@ class YHServiceOrderListView: YHBaseViewController { ...@@ -25,6 +25,7 @@ class YHServiceOrderListView: YHBaseViewController {
lazy var noDataView: YHEmptyDataView = { lazy var noDataView: YHEmptyDataView = {
let view = YHEmptyDataView.createView("暂无", kEmptyCommonBgName) let view = YHEmptyDataView.createView("暂无", kEmptyCommonBgName)
view.backgroundColor = .clear view.backgroundColor = .clear
view.isHidden = true
return view return view
}() }()
......
...@@ -28,6 +28,7 @@ class YHAddAdoptersViewController: YHBaseViewController { ...@@ -28,6 +28,7 @@ class YHAddAdoptersViewController: YHBaseViewController {
override func viewWillAppear(_ animated: Bool) { override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated) super.viewWillAppear(animated)
isMore = false
getData() getData()
} }
......
...@@ -139,6 +139,9 @@ extension YHAdoptedChinaTravelViewController: UITableViewDelegate, UITableViewDa ...@@ -139,6 +139,9 @@ extension YHAdoptedChinaTravelViewController: UITableViewDelegate, UITableViewDa
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 { if indexPath.row == 0 {
if model.reject_reason.count != 0 && model.status == 2 {
return 73
}
return 40 return 40
} }
if indexPath.row == 1 { if indexPath.row == 1 {
......
...@@ -148,6 +148,9 @@ extension YHAdopterBirthViewController: UITableViewDelegate, UITableViewDataSour ...@@ -148,6 +148,9 @@ extension YHAdopterBirthViewController: UITableViewDelegate, UITableViewDataSour
return 118 return 118
} }
if indexPath.row == 1 { if indexPath.row == 1 {
if model.reject_reason.count != 0 && model.status == 2 {
return 91
}
return 58 return 58
} }
if indexPath.row == 2 { if indexPath.row == 2 {
......
...@@ -139,6 +139,9 @@ extension YHAdopterChinaLifeViewController: UITableViewDelegate, UITableViewData ...@@ -139,6 +139,9 @@ extension YHAdopterChinaLifeViewController: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 { if indexPath.row == 0 {
if model.reject_reason.count != 0 && model.status == 2 {
return 73
}
return 40 return 40
} }
if indexPath.row == 1 { if indexPath.row == 1 {
......
...@@ -17,6 +17,7 @@ class YHAdopterChinaViewController: YHBaseViewController { ...@@ -17,6 +17,7 @@ class YHAdopterChinaViewController: YHBaseViewController {
var model: YHAdopterDependentDataDocModel = YHAdopterDependentDataDocModel() var model: YHAdopterDependentDataDocModel = YHAdopterDependentDataDocModel()
var isShowPrompt = false var isShowPrompt = false
var urls : [String] = ["",""] var urls : [String] = ["",""]
var name: String = ""
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -33,6 +34,7 @@ class YHAdopterChinaViewController: YHBaseViewController { ...@@ -33,6 +34,7 @@ class YHAdopterChinaViewController: YHBaseViewController {
func getData() { func getData() {
viewModel.mainModel = model viewModel.mainModel = model
viewModel.name = name
data = viewModel.getChinaDataSource(isShowPrompt) data = viewModel.getChinaDataSource(isShowPrompt)
tableView.reloadData() tableView.reloadData()
} }
...@@ -167,6 +169,7 @@ extension YHAdopterChinaViewController: UITableViewDelegate, UITableViewDataSour ...@@ -167,6 +169,7 @@ extension YHAdopterChinaViewController: UITableViewDelegate, UITableViewDataSour
} }
let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelItemTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHAdopterTravelItemTableViewCell.self)
cell.dataSource = data[indexPath.row] cell.dataSource = data[indexPath.row]
cell.state = model.status
cell.informationBlock = {[weak self] model in cell.informationBlock = {[weak self] model in
guard let self = self else { return } guard let self = self else { return }
self.viewModel.updateModel(model) self.viewModel.updateModel(model)
...@@ -185,6 +188,9 @@ extension YHAdopterChinaViewController: UITableViewDelegate, UITableViewDataSour ...@@ -185,6 +188,9 @@ extension YHAdopterChinaViewController: UITableViewDelegate, UITableViewDataSour
return 118 return 118
} }
if indexPath.row == 1 { if indexPath.row == 1 {
if model.reject_reason.count != 0 && model.status == 2 {
return 91
}
return 58 return 58
} }
if indexPath.row == 2 { if indexPath.row == 2 {
......
...@@ -135,6 +135,9 @@ extension YHAdopterIdCardViewController: UITableViewDelegate, UITableViewDataSou ...@@ -135,6 +135,9 @@ extension YHAdopterIdCardViewController: UITableViewDelegate, UITableViewDataSou
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.row == 0 { if indexPath.row == 0 {
if model.reject_reason.count != 0 && model.status == 2 {
return 117
}
return 84 return 84
} }
if indexPath.row == 1 { if indexPath.row == 1 {
......
...@@ -146,6 +146,9 @@ extension YHAdopterMarryViewController: UITableViewDelegate, UITableViewDataSour ...@@ -146,6 +146,9 @@ extension YHAdopterMarryViewController: UITableViewDelegate, UITableViewDataSour
return 118 return 118
} }
if indexPath.row == 1 { if indexPath.row == 1 {
if model.reject_reason.count != 0 && model.status == 2 {
return 117
}
return 84 return 84
} }
if indexPath.row == 2 { if indexPath.row == 2 {
......
...@@ -18,6 +18,7 @@ class YHAdopterNewPeopleViewController: YHBaseViewController { ...@@ -18,6 +18,7 @@ class YHAdopterNewPeopleViewController: YHBaseViewController {
var isShowPrompt: Bool = false var isShowPrompt: Bool = false
var id: Int = 0 var id: Int = 0
var titleText: String = "新增子女" var titleText: String = "新增子女"
var isShowRed: Bool = false
override func viewDidLoad() { override func viewDidLoad() {
super.viewDidLoad() super.viewDidLoad()
...@@ -155,6 +156,14 @@ class YHAdopterNewPeopleViewController: YHBaseViewController { ...@@ -155,6 +156,14 @@ class YHAdopterNewPeopleViewController: YHBaseViewController {
YHHUD.flash(message: "您还有信息未填写") YHHUD.flash(message: "您还有信息未填写")
} }
} else { } else {
for item in cardDataSource {
if (item.status == 0 || item.status == 2) && item.require == 1 {
YHHUD.flash(message: "请上传相关证件")
isShowRed = true
tableView.reloadData()
return
}
}
self.viewModel.getDependentsCheck {[weak self] success, error in self.viewModel.getDependentsCheck {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.navigationController?.popViewController(animated: true) self.navigationController?.popViewController(animated: true)
...@@ -197,6 +206,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData ...@@ -197,6 +206,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if stepView.currentIndex == 1 { if stepView.currentIndex == 1 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardTableViewCell.self) let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardTableViewCell.self)
cell.isShowRed = isShowRed
cell.dataSource = cardDataSource[indexPath.row] cell.dataSource = cardDataSource[indexPath.row]
cell.clickBlock = {[weak self] tag in cell.clickBlock = {[weak self] tag in
guard let self = self else { return } guard let self = self else { return }
...@@ -209,6 +219,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData ...@@ -209,6 +219,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData
case 1://身份证(正反面) case 1://身份证(正反面)
let vc = YHAdopterChinaViewController() let vc = YHAdopterChinaViewController()
vc.model = model vc.model = model
vc.name = viewModel.mainModel.info.dep_name
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
case 2://户口信息页 case 2://户口信息页
let vc = YHAdopterResidentViewController() let vc = YHAdopterResidentViewController()
...@@ -257,6 +268,9 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData ...@@ -257,6 +268,9 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if stepView.currentIndex == 1 { if stepView.currentIndex == 1 {
let model = cardDataSource[indexPath.row] let model = cardDataSource[indexPath.row]
if isShowRed && (model.status == 0 || model.status == 2) && model.require == 1 {
return 99
}
if model.dep_type == 1 || model.dep_type == 2 { if model.dep_type == 1 || model.dep_type == 2 {
return 90 return 90
} else { } else {
...@@ -316,6 +330,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData ...@@ -316,6 +330,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData
case 1://身份证(正反面) case 1://身份证(正反面)
let vc = YHAdopterChinaViewController() let vc = YHAdopterChinaViewController()
vc.model = model vc.model = model
vc.name = viewModel.mainModel.info.dep_name
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
case 2://户口信息页 case 2://户口信息页
let vc = YHAdopterResidentViewController() let vc = YHAdopterResidentViewController()
......
...@@ -165,6 +165,9 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour ...@@ -165,6 +165,9 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour
return 118 return 118
} }
if indexPath.row == 1 { if indexPath.row == 1 {
if model.reject_reason.count != 0 && model.status == 2 {
return 117
}
return 84 return 84
} }
if indexPath.row == 2 { if indexPath.row == 2 {
......
...@@ -148,6 +148,9 @@ extension YHAdopterResidentViewController: UITableViewDelegate, UITableViewDataS ...@@ -148,6 +148,9 @@ extension YHAdopterResidentViewController: UITableViewDelegate, UITableViewDataS
return 118 return 118
} }
if indexPath.row == 1 { if indexPath.row == 1 {
if model.reject_reason.count != 0 && model.status == 2 {
return 117
}
return 84 return 84
} }
if indexPath.row == 2 { if indexPath.row == 2 {
......
...@@ -187,7 +187,7 @@ extension YHAdopterTravelViewController: UITableViewDelegate, UITableViewDataSou ...@@ -187,7 +187,7 @@ extension YHAdopterTravelViewController: UITableViewDelegate, UITableViewDataSou
if indexPath.section == 0 { if indexPath.section == 0 {
if indexPath.row == 0 { if indexPath.row == 0 {
if model.reject_reason.count != 0 { if model.reject_reason.count != 0 && model.status == 2 {
return 119 return 119
} else { } else {
if isOneYearAfter(model.certificates_info.sign_expire_date) && model.certificates_info.sign_expire_date.count != 0 { if isOneYearAfter(model.certificates_info.sign_expire_date) && model.certificates_info.sign_expire_date.count != 0 {
......
...@@ -71,7 +71,7 @@ class YHAdopterDependentDataDocCertificatesModel: SmartCodable { ...@@ -71,7 +71,7 @@ class YHAdopterDependentDataDocCertificatesModel: SmartCodable {
var before_marriage_name : String = "" // 婚前姓氏 var before_marriage_name : String = "" // 婚前姓氏
var birthday : String = "" // 出生日期 var birthday : String = "" // 出生日期
var birth_place : String = "" // 出生地点 var birth_place : String = "" // 出生地点
var id_card : String = "" // 身份证号 var idcard : String = "" // 身份证号
var hk_idcard : String = "" //香港身份证号 var hk_idcard : String = "" //香港身份证号
var travel_papers_number : String = "" //旅行证件号码 var travel_papers_number : String = "" //旅行证件号码
var sign_address : String = "" // 签发地点 var sign_address : String = "" // 签发地点
......
...@@ -162,13 +162,6 @@ class YHAdopterAddNewTableViewCell: UITableViewCell { ...@@ -162,13 +162,6 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
guard let dataSource = dataSource else { guard let dataSource = dataSource else {
return return
} }
if dataSource.count == 0 {
moreButton.isHidden = true
cannalButton.isHidden = true
} else {
moreButton.isHidden = false
cannalButton.isHidden = true
}
var total = 0 var total = 0
for i in 0 ..< dataSource.count { for i in 0 ..< dataSource.count {
if i != 0 { if i != 0 {
...@@ -215,6 +208,10 @@ class YHAdopterAddNewTableViewCell: UITableViewCell { ...@@ -215,6 +208,10 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
@objc func cannal() { @objc func cannal() {
moreButton.isHidden = false moreButton.isHidden = false
cannalButton.isHidden = true cannalButton.isHidden = true
if dataSource?.count == 0 {
moreButton.isHidden = true
cannalButton.isHidden = true
}
for i in 0..<(dataSource?.count ?? 0) { for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHAdopterItemView let view = mainItemView.viewWithTag(4000 + i) as! YHAdopterItemView
view.isShowDelete(i, isShow: false) view.isShowDelete(i, isShow: false)
...@@ -227,6 +224,10 @@ class YHAdopterAddNewTableViewCell: UITableViewCell { ...@@ -227,6 +224,10 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
@objc func more() { @objc func more() {
moreButton.isHidden = true moreButton.isHidden = true
cannalButton.isHidden = false cannalButton.isHidden = false
if dataSource?.count == 0 {
moreButton.isHidden = true
cannalButton.isHidden = true
}
for i in 0..<(dataSource?.count ?? 0) { for i in 0..<(dataSource?.count ?? 0) {
let view = mainItemView.viewWithTag(4000 + i) as! YHAdopterItemView let view = mainItemView.viewWithTag(4000 + i) as! YHAdopterItemView
view.isShowDelete(i, isShow: true) view.isShowDelete(i, isShow: true)
......
...@@ -12,6 +12,8 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell { ...@@ -12,6 +12,8 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
var titleLabel: UILabel! var titleLabel: UILabel!
var subTitleLabel: UILabel! var subTitleLabel: UILabel!
var alertLabel: UILabel! var alertLabel: UILabel!
var failLabel: UILabel!
var failImageView: UIImageView!
var docDataSource: YHAdopterDependentDataDocModel? { var docDataSource: YHAdopterDependentDataDocModel? {
didSet { didSet {
updateDocContent() updateDocContent()
...@@ -97,6 +99,33 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell { ...@@ -97,6 +99,33 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
make.right.equalTo(-18) make.right.equalTo(-18)
} }
failLabel = {
let label = UILabel()
label.text = "驳回原因:存款证明钱不够"
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor(hex: 0xf81d22)
return label
}()
contentView.addSubview(failLabel)
failLabel.snp.makeConstraints { make in
make.left.equalTo(36)
make.bottom.equalTo(0)
make.height.equalTo(17)
make.right.equalToSuperview()
}
failImageView = {
let view = UIImageView()
view.image = UIImage(named: "service_adopter_income_fail_alert")
return view
}()
contentView.addSubview(failImageView)
failImageView.snp.makeConstraints { make in
make.left.equalTo(20)
make.width.height.equalTo(12)
make.centerY.equalTo(failLabel.snp.centerY)
}
} }
func updateDocContent() { func updateDocContent() {
...@@ -105,21 +134,30 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell { ...@@ -105,21 +134,30 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
subTitleLabel.textColor = UIColor.brandMainColor subTitleLabel.textColor = UIColor.brandMainColor
subTitleLabel.backgroundColor = UIColor(hex: 0xf0f4fb) subTitleLabel.backgroundColor = UIColor(hex: 0xf0f4fb)
subTitleLabel.text = "待上传" subTitleLabel.text = "待上传"
failImageView.isHidden = true
failLabel.isHidden = true
} }
if data.status == 1 { if data.status == 1 {
subTitleLabel.textColor = UIColor(hex: 0xff8000) subTitleLabel.textColor = UIColor(hex: 0xff8000)
subTitleLabel.backgroundColor = UIColor(hex: 0xfff5eb) subTitleLabel.backgroundColor = UIColor(hex: 0xfff5eb)
subTitleLabel.text = "审核中" subTitleLabel.text = "审核中"
failImageView.isHidden = true
failLabel.isHidden = true
} }
if data.status == 3 { if data.status == 3 {
subTitleLabel.textColor = UIColor(hex: 0x3cc694) subTitleLabel.textColor = UIColor(hex: 0x3cc694)
subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7) subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7)
subTitleLabel.text = "已完成" subTitleLabel.text = "已完成"
failImageView.isHidden = true
failLabel.isHidden = true
} }
if data.status == 2 { if data.status == 2 {
subTitleLabel.textColor = UIColor(hex: 0xf81d22) subTitleLabel.textColor = UIColor(hex: 0xf81d22)
subTitleLabel.backgroundColor = UIColor(hex: 0xfff2f2) subTitleLabel.backgroundColor = UIColor(hex: 0xfff2f2)
subTitleLabel.text = "已驳回" subTitleLabel.text = "已驳回"
failImageView.isHidden = false
failLabel.isHidden = false
} }
failLabel.text = data.reject_reason
} }
} }
...@@ -16,6 +16,7 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -16,6 +16,7 @@ class YHAdopterCardTableViewCell: UITableViewCell {
var titleLabel: UILabel! var titleLabel: UILabel!
var selectLabel: UILabel! var selectLabel: UILabel!
var moreButton: UIButton! var moreButton: UIButton!
var isShowRed: Bool = false
var dataSource: YHAdopterDependentDataDocModel? { var dataSource: YHAdopterDependentDataDocModel? {
didSet { didSet {
updateContent() updateContent()
...@@ -114,7 +115,7 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -114,7 +115,7 @@ class YHAdopterCardTableViewCell: UITableViewCell {
}() }()
centerView.addSubview(moreButton) centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in moreButton.snp.makeConstraints { make in
make.centerY.equalToSuperview() make.centerY.equalTo(titleLabel.snp.centerY)
make.right.equalTo(-14) make.right.equalTo(-14)
make.height.equalTo(20) make.height.equalTo(20)
make.width.equalTo(62) make.width.equalTo(62)
...@@ -196,5 +197,16 @@ class YHAdopterCardTableViewCell: UITableViewCell { ...@@ -196,5 +197,16 @@ class YHAdopterCardTableViewCell: UITableViewCell {
moreButton.setTitleColor(UIColor(hex: 0x3cc694), for: .normal) moreButton.setTitleColor(UIColor(hex: 0x3cc694), for: .normal)
moreButton.setImage(UIImage(named: "service_adopter_income_success"), for: .normal) moreButton.setImage(UIImage(named: "service_adopter_income_success"), for: .normal)
} }
if isShowRed && (data.status == 0 || data.status == 2) && data.require == 1 {
let a: ASAttributedString = .init("请上传\(data.dep_name)", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.failColor))
selectLabel.attributed.text = a
titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(20)
make.height.equalTo(22)
make.right.equalTo(-80)
}
}
} }
} }
...@@ -77,9 +77,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -77,9 +77,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
frontDeleteButton.isHidden = true frontDeleteButton.isHidden = true
backSurfaceDeleteButton.isHidden = true backSurfaceDeleteButton.isHidden = true
thirdDeleteButton.isHidden = true thirdDeleteButton.isHidden = true
frontImageButton.isEnabled = false // frontImageButton.isEnabled = false
backSurfaceImageButton.isEnabled = false // backSurfaceImageButton.isEnabled = false
thirdImageButton.isEnabled = false // thirdImageButton.isEnabled = false
} }
} }
} }
...@@ -286,6 +286,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -286,6 +286,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
return return
} }
if state == 1 || state == 3 {
return
}
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.frontImageButton.setContent("card_loading", "上传中") self.frontImageButton.setContent("card_loading", "上传中")
...@@ -312,6 +315,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -312,6 +315,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
return return
} }
if state == 1 || state == 3 {
return
}
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.thirdImageButton.setContent("card_loading", "上传中") self.thirdImageButton.setContent("card_loading", "上传中")
...@@ -338,6 +344,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell { ...@@ -338,6 +344,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
return return
} }
if state == 1 || state == 3 {
return
}
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.backSurfaceImageButton.setContent("card_loading", "上传中") self.backSurfaceImageButton.setContent("card_loading", "上传中")
......
...@@ -50,7 +50,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell { ...@@ -50,7 +50,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell {
didSet { didSet {
if state == 1 || state == 3 { if state == 1 || state == 3 {
frontDeleteButton.isHidden = true frontDeleteButton.isHidden = true
frontImageButton.isEnabled = false // frontImageButton.isEnabled = false
} }
} }
} }
...@@ -161,6 +161,9 @@ class YHAdopterResidentTableViewCell: UITableViewCell { ...@@ -161,6 +161,9 @@ class YHAdopterResidentTableViewCell: UITableViewCell {
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
return return
} }
if state == 1 || state == 3 {
return
}
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.frontImageButton.setContent("card_loading", "上传中") self.frontImageButton.setContent("card_loading", "上传中")
......
...@@ -79,8 +79,8 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell { ...@@ -79,8 +79,8 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
if state == 1 || state == 3 { if state == 1 || state == 3 {
frontDeleteButton.isHidden = true frontDeleteButton.isHidden = true
backSurfaceDeleteButton.isHidden = true backSurfaceDeleteButton.isHidden = true
frontImageButton.isEnabled = false // frontImageButton.isEnabled = false
backSurfaceImageButton.isEnabled = false // backSurfaceImageButton.isEnabled = false
} }
} }
} }
...@@ -240,6 +240,9 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell { ...@@ -240,6 +240,9 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
return return
} }
if state == 1 || state == 3 {
return
}
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.frontImageButton.setContent("card_loading", "上传中") self.frontImageButton.setContent("card_loading", "上传中")
...@@ -266,6 +269,9 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell { ...@@ -266,6 +269,9 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
UIViewController.current?.navigationController?.pushViewController(vc) UIViewController.current?.navigationController?.pushViewController(vc)
return return
} }
if state == 1 || state == 3 {
return
}
YHImagePickerView.show() {[weak self] image in YHImagePickerView.show() {[weak self] image in
guard let self = self else { return } guard let self = self else { return }
self.backSurfaceImageButton.setContent("card_loading", "上传中") self.backSurfaceImageButton.setContent("card_loading", "上传中")
......
...@@ -52,7 +52,7 @@ class YHAdopterTravelItemTableViewCell: UITableViewCell { ...@@ -52,7 +52,7 @@ class YHAdopterTravelItemTableViewCell: UITableViewCell {
contentView.addSubview(line) contentView.addSubview(line)
line.snp.makeConstraints { make in line.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.equalTo(y) make.top.equalTo(0)
make.height.equalTo(1) make.height.equalTo(1)
make.right.equalTo(-18) make.right.equalTo(-18)
} }
...@@ -69,7 +69,8 @@ class YHAdopterTravelItemTableViewCell: UITableViewCell { ...@@ -69,7 +69,8 @@ class YHAdopterTravelItemTableViewCell: UITableViewCell {
contentView.addSubview(itemView) contentView.addSubview(itemView)
itemView.snp.makeConstraints { make in itemView.snp.makeConstraints { make in
make.left.equalTo(18) make.left.equalTo(18)
make.top.bottom.equalTo(0) make.top.equalTo(1)
make.bottom.equalToSuperview()
make.right.equalTo(-18) make.right.equalTo(-18)
} }
} }
......
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
import UIKit import UIKit
import AttributedString import AttributedString
class YHNoAdopterAlertView: UIView { class YHNoAdopterAlertView: UIView, UIGestureRecognizerDelegate {
var centerView: UIView! var centerView: UIView!
var topImageView: UIImageView! var topImageView: UIImageView!
var bgImageView: UIImageView! var bgImageView: UIImageView!
...@@ -21,6 +21,9 @@ class YHNoAdopterAlertView: UIView { ...@@ -21,6 +21,9 @@ class YHNoAdopterAlertView: UIView {
super.init(frame: frame) super.init(frame: frame)
backgroundColor = UIColor(white: 0.5, alpha: 0.1) backgroundColor = UIColor(white: 0.5, alpha: 0.1)
setView() setView()
let tap = UITapGestureRecognizer(target: self, action: #selector(handleTap))
tap.delegate = self
addGestureRecognizer(tap)
} }
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
...@@ -106,6 +109,11 @@ class YHNoAdopterAlertView: UIView { ...@@ -106,6 +109,11 @@ class YHNoAdopterAlertView: UIView {
} }
} }
@objc private func handleTap(_ sender: AnyObject?) {
print("处理点击手势")
dismiss()
}
@objc func dismiss() { @objc func dismiss() {
removeFromSuperview() removeFromSuperview()
} }
...@@ -113,5 +121,12 @@ class YHNoAdopterAlertView: UIView { ...@@ -113,5 +121,12 @@ class YHNoAdopterAlertView: UIView {
@objc func nextStep() { @objc func nextStep() {
removeFromSuperview() removeFromSuperview()
} }
func gestureRecognizer(_ gestureRecognizer:UIGestureRecognizer, shouldReceive touch:UITouch) -> Bool {
if touch.view == self {
return true
}
return false
}
} }
...@@ -10,7 +10,7 @@ import UIKit ...@@ -10,7 +10,7 @@ import UIKit
class YHYHAdopterTravelViewModel: YHBaseViewModel { class YHYHAdopterTravelViewModel: YHBaseViewModel {
var mainModel: YHAdopterDependentDataDocModel = YHAdopterDependentDataDocModel() var mainModel: YHAdopterDependentDataDocModel = YHAdopterDependentDataDocModel()
var name: String = ""
override init() { override init() {
super.init() super.init()
} }
...@@ -26,8 +26,8 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel { ...@@ -26,8 +26,8 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel {
} }
func getChinaDataSource(_ isShowPrompt: Bool) -> [YHItemModel] { func getChinaDataSource(_ isShowPrompt: Bool) -> [YHItemModel] {
let item = YHItemModel(id: .id21, isNeed: true, title: "姓名", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates_info.en_name, isShowPrompts: isShowPrompt, alertMessage:"请输入姓名") let item = YHItemModel(id: .id21, isNeed: true, title: "姓名", isUserKeyBoard: true, prompts: "请输入", message: name, isShowPrompts: isShowPrompt, alertMessage:"请输入姓名")
let item1 = YHItemModel(id: .id22, isNeed: true, title: "身份证号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates_info.id_card, isShowPrompts: isShowPrompt, alertMessage:"请输入身份证号码") let item1 = YHItemModel(id: .id22, isNeed: true, title: "身份证号码", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates_info.idcard, isShowPrompts: isShowPrompt, alertMessage:"请输入身份证号码")
let item2 = YHItemModel(id: .id23, isNeed: true, title: "出生日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates_info.birthday, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择出生日期") let item2 = YHItemModel(id: .id23, isNeed: true, title: "出生日期", isUserKeyBoard: false, prompts: "请选择", message: mainModel.certificates_info.birthday, type: .time, isShowPrompts: isShowPrompt, alertMessage:"请选择出生日期")
let item3 = YHItemModel(id: .id24, isNeed: true, title: "出生地点", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates_info.birth_place, isShowPrompts: isShowPrompt, alertMessage:"请输入出生地点") let item3 = YHItemModel(id: .id24, isNeed: true, title: "出生地点", isUserKeyBoard: true, prompts: "请输入", message: mainModel.certificates_info.birth_place, isShowPrompts: isShowPrompt, alertMessage:"请输入出生地点")
let item4 = YHItemModel(id: .id25, isNeed: true, title: "性别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.certificates_info.gender)", type: .sex, isShowPrompts: isShowPrompt, alertMessage:"请选择性别") let item4 = YHItemModel(id: .id25, isNeed: true, title: "性别", isUserKeyBoard: false, prompts: "请选择", message: "\(mainModel.certificates_info.gender)", type: .sex, isShowPrompts: isShowPrompt, alertMessage:"请选择性别")
...@@ -50,9 +50,9 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel { ...@@ -50,9 +50,9 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel {
case .id6: case .id6:
mainModel.certificates_info.sign_expire_date = item.message ?? "" mainModel.certificates_info.sign_expire_date = item.message ?? ""
case .id21: case .id21:
mainModel.certificates_info.en_name = item.message ?? "" name = item.message ?? ""
case .id22: case .id22:
mainModel.certificates_info.id_card = item.message ?? "" mainModel.certificates_info.idcard = item.message ?? ""
case .id23: case .id23:
mainModel.certificates_info.birthday = item.message ?? "" mainModel.certificates_info.birthday = item.message ?? ""
case .id24: case .id24:
...@@ -85,8 +85,8 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel { ...@@ -85,8 +85,8 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel {
if model.end_of_term.count != 0 { if model.end_of_term.count != 0 {
mainModel.certificates_info.sign_expire_date = model.end_of_term mainModel.certificates_info.sign_expire_date = model.end_of_term
} }
if model.issuing_authority.count != 0 { if model.IssueAddress.count != 0 {
mainModel.certificates_info.sign_address = model.issuing_authority mainModel.certificates_info.sign_address = model.IssueAddress
} }
if model.card_num.count != 0 { if model.card_num.count != 0 {
mainModel.certificates_info.travel_papers_number = model.card_num mainModel.certificates_info.travel_papers_number = model.card_num
...@@ -117,7 +117,7 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel { ...@@ -117,7 +117,7 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel {
mainModel.certificates_info.birth_place = model.address mainModel.certificates_info.birth_place = model.address
} }
if model.card_num.count != 0 { if model.card_num.count != 0 {
mainModel.certificates_info.id_card = model.card_num mainModel.certificates_info.idcard = model.card_num
} }
} }
...@@ -137,13 +137,12 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel { ...@@ -137,13 +137,12 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel {
guard sign_expire_date.count > 0 else { return false } guard sign_expire_date.count > 0 else { return false }
return true return true
} else { } else {
let en_name = mainModel.certificates_info.en_name let idcard = mainModel.certificates_info.idcard
let idcard = mainModel.certificates_info.id_card
let birthday = mainModel.certificates_info.birthday let birthday = mainModel.certificates_info.birthday
let birth_place = mainModel.certificates_info.birth_place let birth_place = mainModel.certificates_info.birth_place
let gender = mainModel.certificates_info.gender let gender = mainModel.certificates_info.gender
guard gender < 2 else { return false } guard gender < 3 else { return false }
guard en_name.count > 0 else { return false } guard name.count > 0 else { return false }
guard birthday.count > 0 else { return false } guard birthday.count > 0 else { return false }
guard birth_place.count > 0 else { return false } guard birth_place.count > 0 else { return false }
guard idcard.count > 0 else { return false } guard idcard.count > 0 else { return false }
...@@ -234,8 +233,8 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel { ...@@ -234,8 +233,8 @@ class YHYHAdopterTravelViewModel: YHBaseViewModel {
if mainModel.certificates_info.birth_place.count != 0 { if mainModel.certificates_info.birth_place.count != 0 {
certificates_info.updateValue(mainModel.certificates_info.birth_place, forKey: "birth_place") certificates_info.updateValue(mainModel.certificates_info.birth_place, forKey: "birth_place")
} }
if mainModel.certificates_info.id_card.count != 0 { if mainModel.certificates_info.idcard.count != 0 {
certificates_info.updateValue(mainModel.certificates_info.id_card, forKey: "id_card") certificates_info.updateValue(mainModel.certificates_info.idcard, forKey: "idcard")
} }
if mainModel.certificates_info.hk_idcard.count != 0 { if mainModel.certificates_info.hk_idcard.count != 0 {
certificates_info.updateValue(mainModel.certificates_info.hk_idcard, forKey: "hk_idcard") certificates_info.updateValue(mainModel.certificates_info.hk_idcard, forKey: "hk_idcard")
......
...@@ -16,6 +16,7 @@ class YHHKIDCardModel: YHBaseModel { ...@@ -16,6 +16,7 @@ class YHHKIDCardModel: YHBaseModel {
var term_begins: String = "" var term_begins: String = ""
var end_of_term: String = "" var end_of_term: String = ""
var issuing_authority: String = "" var issuing_authority: String = ""
var IssueAddress: String = ""
var card_num: String = "" var card_num: String = ""
var is_back: String = "" var is_back: String = ""
} }
...@@ -320,7 +320,11 @@ extension YHServiceOrderProgressTableViewCell { ...@@ -320,7 +320,11 @@ extension YHServiceOrderProgressTableViewCell {
if model.type == 24 { if model.type == 24 {
titleLabel.text = "赴港办证预约" titleLabel.text = "赴港办证预约"
if model.percentage == 50 {
messageLabel.text = "抢号中~" messageLabel.text = "抢号中~"
} else {
messageLabel.text = "请填写意向办证时间,银河代预约~"
}
buttonLabel.text = "去查看" buttonLabel.text = "去查看"
messageLabel.textColor = UIColor.yhGreyColor50 messageLabel.textColor = UIColor.yhGreyColor50
} }
......
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