Commit 795bea64 authored by pete谢兆麟's avatar pete谢兆麟

新增受养人UI走查bug

parent ad8498d2
......@@ -54,6 +54,8 @@ class YHAddAdoptersViewController: YHBaseViewController {
tableView.separatorStyle = .none
tableView.delegate = self
tableView.dataSource = self
tableView.showsVerticalScrollIndicator = false
tableView.showsHorizontalScrollIndicator = false
tableView.register(cellWithClass: YHAdopterMainTableViewCell.self)
tableView.register(cellWithClass: YHAdopterStepTableViewCell.self)
tableView.register(cellWithClass: YHAdopterAddNewTableViewCell.self)
......@@ -63,7 +65,8 @@ class YHAddAdoptersViewController: YHBaseViewController {
view.addSubview(tableView)
tableView.snp.makeConstraints { make in
make.top.equalTo(k_Height_NavigationtBarAndStatuBar + 8)
make.bottom.left.right.equalTo(view)
make.left.right.equalTo(view)
make.bottom.equalTo(-k_Height_safeAreaInsetsBottom())
}
bottonView = UIView()
......
......@@ -108,8 +108,13 @@ extension YHAdoptedChinaTravelViewController: UITableViewDelegate, UITableViewDa
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.titleLabel.text = "中国居留许可签证"
cell.titleLabel.text = "中国旅行证"
cell.docDataSource = model
cell.titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
}
return cell
}
if indexPath.row == 1 {
......
......@@ -108,8 +108,13 @@ extension YHAdopterChinaLifeViewController: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterCardExplainTableViewCell.self)
cell.titleLabel.text = "中国旅行证"
cell.titleLabel.text = "中国居留许可签证"
cell.docDataSource = model
cell.titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
}
return cell
}
if indexPath.row == 1 {
......
......@@ -46,6 +46,7 @@ class YHAdopterIncomeDetailViewController: YHBaseViewController {
}
func setView() {
view.backgroundColor = .white
tableView = {
let tableView = UITableView(frame:.zero, style:.plain)
tableView.contentInsetAdjustmentBehavior = .never
......@@ -338,7 +339,7 @@ extension YHAdopterIncomeDetailViewController: UITableViewDelegate, UITableViewD
if self.data.status == 2 {
return 119
} else {
return 66
return 86
}
}
if indexPath.row == 1 {
......@@ -350,7 +351,7 @@ extension YHAdopterIncomeDetailViewController: UITableViewDelegate, UITableViewD
}
}
if indexPath.row == 2 {
return 71
return 61
}
return 45
}
......
......@@ -257,7 +257,7 @@ extension YHAdopterNewPeopleViewController: UITableViewDelegate, UITableViewData
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if stepView.currentIndex == 1 {
let model = cardDataSource[indexPath.row]
if model.dep_id == 1 || model.dep_id == 2 {
if model.dep_type == 1 || model.dep_type == 2 {
return 90
} else {
return 78
......
......@@ -111,6 +111,7 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour
if indexPath.row == 0 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterExampleTableViewCell.self)
cell.titleLabel.text = "其他相关证件说明"
cell.templateView.titleLabel.text = "查看其他相关证件说明"
cell.exampleBlock = {[weak self] in
let view = YHAdopterCardExampleView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight))
view.type = .other
......@@ -144,19 +145,18 @@ extension YHAdopterOtherViewController: UITableViewDelegate, UITableViewDataSour
}
}
}
if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterIncomeFileCountTableViewCell.self)
cell.setContentData(self.urls.count)
if urls.count == 0 {
cell.isHidden = true
} else {
cell.isHidden = false
}
return cell
return cell
}
if indexPath.row == 3 {
let cell = tableView.dequeueReusableCell(withClass: YHAdopterIncomeFileCountTableViewCell.self)
cell.setContentData(self.urls.count)
if urls.count == 0 {
cell.isHidden = true
} else {
cell.isHidden = false
}
return cell
}
return UITableViewCell()
}
......
......@@ -121,7 +121,7 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
centerView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.right.equalToSuperview()
make.top.equalTo(63)
make.top.equalTo(62.5)
make.height.equalTo(0.5)
}
......@@ -171,14 +171,16 @@ class YHAdopterAddNewTableViewCell: UITableViewCell {
}
var total = 0
for i in 0 ..< dataSource.count {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(1)
make.right.equalTo(-18)
if i != 0 {
let line = UIView()
line.backgroundColor = UIColor.separatorColor
mainItemView.addSubview(line)
line.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(total)
make.height.equalTo(0.5)
make.right.equalTo(-18)
}
}
total = total + 1
let itemView = YHAdopterItemView()
......
......@@ -44,7 +44,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "中国身份证"
return label
......@@ -59,7 +59,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
subTitleLabel = {
let label = UILabel()
label.text = "已完成"
label.font = UIFont.PFSC_R(ofSize: 10)
label.font = UIFont.PFSC_M(ofSize: 10)
label.textColor = UIColor(hex: 0x3cc694)
label.backgroundColor = UIColor(hex: 0xf0fbf7)
label.textAlignment = .center
......@@ -114,7 +114,7 @@ class YHAdopterCardExplainTableViewCell: UITableViewCell {
if data.status == 3 {
subTitleLabel.textColor = UIColor(hex: 0x3cc694)
subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7)
subTitleLabel.text = "已通过"
subTitleLabel.text = "已完成"
}
if data.status == 2 {
subTitleLabel.textColor = UIColor(hex: 0xf81d22)
......
......@@ -60,13 +60,13 @@ class YHAdopterCardTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "主申请人资料"
label.numberOfLines = 0
let str = "*" + "受养人信息核实"
let str = "* " + "受养人信息核实"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 17),
.font: UIFont.PFSC_M(ofSize: 17),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
......@@ -98,7 +98,7 @@ class YHAdopterCardTableViewCell: UITableViewCell {
centerView.addSubview(selectLabel)
selectLabel.snp.makeConstraints { make in
make.left.equalTo(20)
make.bottom.equalTo(-12)
make.top.equalTo(titleLabel.snp.bottom).offset(6)
make.right.equalTo(-20)
}
......@@ -115,9 +115,9 @@ class YHAdopterCardTableViewCell: UITableViewCell {
centerView.addSubview(moreButton)
moreButton.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.right.equalTo(-20)
make.right.equalTo(-14)
make.height.equalTo(20)
make.width.equalTo(69)
make.width.equalTo(62)
}
moreButton.iconInRight(with: 1)
......@@ -132,13 +132,13 @@ class YHAdopterCardTableViewCell: UITableViewCell {
func updateContent() {
guard let data = dataSource else { return }
if data.require == 1 {
let str = "*" + data.dep_name
let str = "* " + data.dep_name
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 16),
.font: UIFont.PFSC_M(ofSize: 16),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
let starRange = NSRange(location: 0, length: 2)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
......@@ -146,27 +146,27 @@ class YHAdopterCardTableViewCell: UITableViewCell {
}
if data.dep_type == 1 {
let a: ASAttributedString = .init("如有", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("中国身份证", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.brandMainColor))
let a: ASAttributedString = .init("如有", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor50))
let b: ASAttributedString = .init("中国身份证", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.brandMainColor))
let c: ASAttributedString = .init(",需要供用做证明", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a + b + c
titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(12)
make.top.equalTo(14)
make.height.equalTo(22)
make.right.equalTo(-18)
}
} else if data.dep_type == 2 {
let a: ASAttributedString = .init("如曾更名,需要供用做证明", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let a: ASAttributedString = .init("如曾更名,需要供用做证明", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a
titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20)
make.top.equalTo(12)
make.top.equalTo(14)
make.height.equalTo(22)
make.right.equalTo(-18)
}
} else {
let a: ASAttributedString = .init("", .font(UIFont.PFSC_R(ofSize: 13)),.foreground(UIColor.mainTextColor50))
let a: ASAttributedString = .init("", .font(UIFont.PFSC_R(ofSize: 12)),.foreground(UIColor.mainTextColor50))
selectLabel.attributed.text = a
titleLabel.snp.remakeConstraints { make in
make.left.equalTo(20)
......
......@@ -41,7 +41,7 @@ class YHAdopterExampleTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "中国身份证示例模版"
return label
......
......@@ -58,7 +58,6 @@ class YHAdopterIncomeFileTableViewCell: UITableViewCell {
mainItemView.removeSubviews()
for i in 0 ..< (dataSource?.count ?? 0) {
let itemView = YHWorkFileItemView()
itemView.backgroundColor = UIColor.pageBkgColor
itemView.dataSource = dataSource?[i]
itemView.block = {[weak self] model, type in
guard let self = self else { return }
......
......@@ -63,7 +63,7 @@ class YHAdopterIncomeTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "主申请人资料"
return label
......
......@@ -52,7 +52,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
label.text = "存款证明"
return label
......@@ -67,7 +67,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell {
subTitleLabel = {
let label = UILabel()
label.text = "已完成"
label.font = UIFont.PFSC_R(ofSize: 10)
label.font = UIFont.PFSC_M(ofSize: 10)
label.textColor = UIColor(hex: 0x3cc694)
label.backgroundColor = UIColor(hex: 0xf0fbf7)
label.textAlignment = .center
......@@ -188,7 +188,7 @@ class YHAdopterIncomeTitleTableViewCell: UITableViewCell {
subTitleLabel.backgroundColor = UIColor(hex: 0xf0fbf7)
failImageView.isHidden = true
failLabel.isHidden = true
subTitleLabel.text = "已通过"
subTitleLabel.text = "已完成"
}
if data.status == 2 {
subTitleLabel.textColor = UIColor(hex: 0xf81d22)
......
......@@ -76,15 +76,15 @@ class YHAdopterMainTableViewCell: UITableViewCell {
titleLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 17)
label.font = UIFont.PFSC_M(ofSize: 17)
label.textColor = UIColor.mainTextColor
let str = "*" + "受养人信息核实"
let str = "* " + "受养人信息核实"
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 17),
.font: UIFont.PFSC_M(ofSize: 17),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
let starRange = NSRange(location: 0, length: 2)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
label.attributedText = questionAttrStr
return label
......@@ -93,7 +93,7 @@ class YHAdopterMainTableViewCell: UITableViewCell {
titleLabel.snp.makeConstraints { make in
make.left.equalTo(18)
make.top.equalTo(16)
make.height.equalTo(24)
// make.height.equalTo(24)
make.right.equalTo(-18)
}
......
......@@ -77,6 +77,9 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
frontDeleteButton.isHidden = true
backSurfaceDeleteButton.isHidden = true
thirdDeleteButton.isHidden = true
frontImageButton.isEnabled = false
backSurfaceImageButton.isEnabled = false
thirdImageButton.isEnabled = false
}
}
}
......@@ -121,7 +124,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textColor = UIColor.mainTextColor50
label.text = "证件页1"
label.textAlignment = .center
return label
......@@ -137,7 +140,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
backSurfaceLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textColor = UIColor.mainTextColor50
label.textAlignment = .center
label.text = "证件页2"
return label
......@@ -153,7 +156,7 @@ class YHAdopterMarryCardTableViewCell: UITableViewCell {
thirdLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textColor = UIColor.mainTextColor50
label.text = "证件页3"
label.textAlignment = .center
return label
......
......@@ -12,13 +12,13 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell {
typealias UrlBlock = (_ url: String, _ index: Int) -> ()
var urlBlock: UrlBlock?
var deleteBlock: UrlBlock?
lazy var collectView = {
// 设置布局方向
let flowLayout = YHHomeCollectionLayout()
flowLayout.minimumInteritemSpacing = 7.0
flowLayout.minimumColumnSpacing = 7.0
flowLayout.sectionInset = UIEdgeInsets(top: 8, left: 20, bottom: 0, right: 20)
flowLayout.sectionInset = UIEdgeInsets(top: 16, left: 20, bottom: 0, right: 20)
let collectinoView = UICollectionView(frame: .zero, collectionViewLayout: flowLayout)
collectinoView.backgroundColor = .white
......@@ -32,7 +32,7 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell {
var state: Int = 0
var dataSource: [String] = [] {
didSet {
if state == 1 || state == 2 {
if state == 1 || state == 3 {
} else {
self.dataSource.append("")
......@@ -64,9 +64,21 @@ class YHAdopterOtherCardTableViewCell: UITableViewCell {
func setupUI() {
backgroundColor = .clear
let lineView = UIView()
lineView.backgroundColor = UIColor.separatorColor
contentView.addSubview(lineView)
lineView.snp.makeConstraints { make in
make.left.equalTo(20)
make.right.equalTo(-20)
make.height.equalTo(0.5)
make.top.equalTo(16)
}
contentView.addSubview(collectView)
collectView.snp.makeConstraints { make in
make.left.right.top.bottom.equalToSuperview()
make.left.right.bottom.equalToSuperview()
make.top.equalTo(17)
}
}
}
......@@ -80,6 +92,7 @@ extension YHAdopterOtherCardTableViewCell: UICollectionViewDelegate, UICollectio
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHAdopterOtherCardCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHAdopterOtherCardCollectionViewCell
cell.url = self.dataSource[indexPath.row]
cell.index = indexPath.row + 1
cell.state = state
cell.urlBlock = { [weak self] url, index in
guard let self = self else { return }
......@@ -128,6 +141,12 @@ class YHAdopterOtherCardCollectionViewCell: UICollectionViewCell {
}
}
}
var index: Int = 0 {
didSet {
imagePickView.defaultName = "相关证件\(index)"
}
}
required init?(coder: NSCoder) {
super.init(coder: coder)
}
......
......@@ -50,6 +50,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell {
didSet {
if state == 1 || state == 3 {
frontDeleteButton.isHidden = true
frontImageButton.isEnabled = false
}
}
}
......@@ -94,7 +95,7 @@ class YHAdopterResidentTableViewCell: UITableViewCell {
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textColor = UIColor.mainTextColor50
label.text = "证件页1"
label.textAlignment = .center
return label
......
......@@ -79,6 +79,8 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
if state == 1 || state == 3 {
frontDeleteButton.isHidden = true
backSurfaceDeleteButton.isHidden = true
frontImageButton.isEnabled = false
backSurfaceImageButton.isEnabled = false
}
}
}
......@@ -124,7 +126,7 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textColor = UIColor.mainTextColor50
label.text = "证件页1"
label.textAlignment = .center
return label
......@@ -140,7 +142,7 @@ class YHAdopterTravelCardTableViewCell: UITableViewCell {
backSurfaceLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textColor = UIColor.mainTextColor50
label.textAlignment = .center
label.text = "证件页2"
return label
......
......@@ -79,7 +79,7 @@ class YHCardUploadView: UIView {
frontLabel = {
let label = UILabel()
label.font = UIFont.PFSC_R(ofSize: 12)
label.textColor = UIColor.subTextColor
label.textColor = UIColor.mainTextColor50
label.text = defaultName
label.textAlignment = .center
return label
......
......@@ -198,13 +198,13 @@ class YHItemView: UIView {
messageTextField.keyboardType = .numberPad
}
if dataSource.isNeed ?? false {
let str = "*" + (dataSource.title ?? "")
let str = "* " + (dataSource.title ?? "")
let attributes: [NSAttributedString.Key: Any] = [
.font: UIFont.PFSC_R(ofSize: 14),
.foregroundColor: UIColor.mainTextColor
]
let questionAttrStr = NSMutableAttributedString(string: str, attributes: attributes)
let starRange = NSRange(location: 0, length: 1)
let starRange = NSRange(location: 0, length: 2)
questionAttrStr.addAttribute(NSAttributedString.Key.foregroundColor, value: UIColor.failColor, range: starRange)
titleLabel.attributedText = questionAttrStr
} else {
......@@ -430,7 +430,7 @@ class YHItemView: UIView {
}
@objc func centerClick() {
if state == 1 || state == 2 {
if state == 1 || state == 3 {
return
}
UIViewController.current?.view.endEditing(true) // 收起键盘
......
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