Commit b7eba7a1 authored by pete谢兆麟's avatar pete谢兆麟

文书bug修复

parent 34a6de03
...@@ -18,13 +18,16 @@ class YHServerHKLifeViewController: YHBaseViewController { ...@@ -18,13 +18,16 @@ class YHServerHKLifeViewController: YHBaseViewController {
var homeTableView: UITableView = { var homeTableView: UITableView = {
let tableView = UITableView(frame: .zero, style: .plain) let tableView = UITableView(frame: .zero, style: .plain)
if #available(iOS 15.0, *) {
tableView.sectionHeaderTopPadding = 0
}
tableView.backgroundColor = .clear tableView.backgroundColor = .clear
tableView.separatorStyle = .none tableView.separatorStyle = .none
tableView.showsHorizontalScrollIndicator = false tableView.showsHorizontalScrollIndicator = false
tableView.showsVerticalScrollIndicator = false tableView.showsVerticalScrollIndicator = false
tableView.rowHeight = UITableView.automaticDimension tableView.rowHeight = UITableView.automaticDimension
tableView.estimatedRowHeight = 81.0 tableView.estimatedRowHeight = 81.0
tableView.register(YHContractCell.self,forCellReuseIdentifier: YHContractCell.cellReuseIdentifier) tableView.register(YHServerHKLifeViewCell.self,forCellReuseIdentifier: YHServerHKLifeViewCell.cellReuseIdentifier)
return tableView return tableView
}() }()
...@@ -68,8 +71,8 @@ extension YHServerHKLifeViewController { ...@@ -68,8 +71,8 @@ extension YHServerHKLifeViewController {
tableHeadView = YHServerTableHeadView() tableHeadView = YHServerTableHeadView()
tableHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 365) tableHeadView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: 365)
tableFootView = YHServiceTableFootView() // tableFootView = YHServiceTableFootView()
tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight) // tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)
view.addSubview(homeTableView) view.addSubview(homeTableView)
homeTableView.tableHeaderView = tableHeadView homeTableView.tableHeaderView = tableHeadView
homeTableView.tableFooterView = tableFootView homeTableView.tableFooterView = tableFootView
...@@ -109,7 +112,7 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour ...@@ -109,7 +112,7 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour
} }
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
return 0 return 0.01
} }
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? { func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
...@@ -118,11 +121,12 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour ...@@ -118,11 +121,12 @@ extension YHServerHKLifeViewController : UITableViewDelegate,UITableViewDataSour
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
return 0.1 return KScreenHeight
} }
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell0 = UITableViewCell() let cell0 = tableView.dequeueReusableCell(withClass: YHServerHKLifeViewCell.self)
cell0.selectionStyle = .none
return cell0 return cell0
} }
...@@ -162,3 +166,55 @@ extension YHServerHKLifeViewController: JXSegmentedListContainerViewListDelegate ...@@ -162,3 +166,55 @@ extension YHServerHKLifeViewController: JXSegmentedListContainerViewListDelegate
return view return view
} }
} }
class YHServerHKLifeViewCell: UITableViewCell {
static let cellReuseIdentifier = "YHServerHKLifeViewCell"
var tableFootView: YHServiceTableFootView!
var dataModel : YHContactItemModel? {
didSet {
updateUI()
}
}
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
super.init(style: style, reuseIdentifier: reuseIdentifier)
setupUI()
}
required init?(coder: NSCoder) {
fatalError("init(coder:) has not been implemented")
}
}
extension YHServerHKLifeViewCell {
func updateUI() {
}
func setupUI() {
let holdView = UIView()
holdView.backgroundColor = .white
holdView.layer.cornerRadius = kCornerRadius6
holdView.clipsToBounds = true
backgroundColor = .clear
contentView.backgroundColor = .clear
tableFootView = YHServiceTableFootView()
tableFootView.frame = CGRect(x: 0, y: 0, width: KScreenWidth, height: KScreenHeight)
contentView.addSubview(tableFootView)
}
}
...@@ -212,7 +212,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell { ...@@ -212,7 +212,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
let suffix = dataSource.writing_document.name.pathExtension.lowercased() let suffix = dataSource.writing_document.doc_sign.doc_send.pathExtension.lowercased()
var iconImgName = "my_cer_type_pdf" var iconImgName = "my_cer_type_pdf"
if suffix == "jpeg" { if suffix == "jpeg" {
iconImgName = "my_cer_type_jpg" iconImgName = "my_cer_type_jpg"
...@@ -232,7 +232,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell { ...@@ -232,7 +232,7 @@ class YHDocumentToActionTableViewCell: UITableViewCell {
iconImgName = "my_cer_type_tiff" iconImgName = "my_cer_type_tiff"
} }
fileImageView.image = UIImage(named: iconImgName) fileImageView.image = UIImage(named: iconImgName)
fileNameLabel.text = dataSource.writing_document.name fileNameLabel.text = dataSource.writing_document.doc_sign.doc_type_name
} }
@objc func editButtonClick() { @objc func editButtonClick() {
......
...@@ -224,7 +224,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell { ...@@ -224,7 +224,7 @@ class YHSignatureToActionTableViewCell: UITableViewCell {
func updateAllViews() { func updateAllViews() {
guard let dataSource = dataSource else { return } guard let dataSource = dataSource else { return }
let suffix = dataSource.doc_type_name.pathExtension.lowercased() let suffix = dataSource.doc_send.pathExtension.lowercased()
var iconImgName = "my_cer_type_pdf" var iconImgName = "my_cer_type_pdf"
if suffix == "jpeg" { if suffix == "jpeg" {
iconImgName = "my_cer_type_jpg" iconImgName = "my_cer_type_jpg"
......
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