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

产品验收bug修复

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