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

状态解决

parent fd233090
......@@ -124,9 +124,6 @@ class YHMyDocumentsDetailViewController: YHBaseViewController {
if self.type == 3 && self.viewModel.mainModel?.writing_document.doc_sign.doc_return_manual.count == 0 && !success {
self.bottomButton.isEnabled = false
self.bottomButton.alpha = 0.4
} else {
self.bottomButton.isEnabled = true
self.bottomButton.alpha = 1
}
self.tableView.reloadData()
})
......
......@@ -69,8 +69,9 @@ class YHDocumentFileItemView: UIView {
}()
addSubview(centerButton)
centerButton.snp.makeConstraints { make in
make.right.top.bottom.equalToSuperview()
make.top.bottom.equalToSuperview()
make.left.equalTo(112)
make.right.equalTo(-50)
}
deleteButton = {
......@@ -86,6 +87,7 @@ class YHDocumentFileItemView: UIView {
make.width.height.equalTo(16)
}
deleteButton.YH_clickEdgeInsets = UIEdgeInsets(top: 10, left: 10, bottom: 10, right: 10)
}
func updateAllViews() {
......
......@@ -211,61 +211,50 @@ class YHDocumentMessageTableViewCell: UITableViewCell {
func updateAllViews() {
guard let dataSource = dataSource else { return }
if dataSource.prospectus.id == 0 {
/*
docOpt: {
1: '待确认',
2: '待签章',
3: '已驳回',
4: '待核对',
5: '已签章',
6: '已定稿',
7: '已完成'
},
*/
var statusTxt = ""
var color : UIColor = .brandMainColor
let status = dataSource.writing_document.status
if status == 1 {
statusTxt = "待确认"
statusTxt = "不展示"
color = UIColor.brandMainColor
lookButton.isHidden = true
} else if status == 2 {
statusTxt = "待签章"
statusTxt = " 待确认 "
color = UIColor.brandMainColor
lookButton.isHidden = true
} else if status == 3 {
statusTxt = "已驳回"
statusTxt = " 核对中 "
color = UIColor.failColor
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else if status == 4 {
statusTxt = "核对中"
statusTxt = " 核对中 "
color = UIColor.warnColor
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else if status == 5 {
statusTxt = "已签章"
statusTxt = " 已驳回 "
color = UIColor.successColor
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else if status == 6 {
statusTxt = "已定稿"
statusTxt = " 已定稿 "
color = UIColor.labelTextColor2
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else if status == 7 {
statusTxt = "已完成"
statusTxt = " 已完成 "
color = UIColor.labelTextColor2
editButton.isHidden = true
submitButton.isHidden = true
bottomCenterLineView.isHidden = true
} else {
statusTxt = "--"
statusTxt = " -- "
color = UIColor.failColor
editButton.isHidden = true
submitButton.isHidden = true
......
......@@ -107,9 +107,6 @@ class YHMySignatureDetailViewController: YHBaseViewController {
if self.type == 3 && self.viewModel.mainModel?.doc_return_manual.count == 0 && !success {
self.bottomButton.isEnabled = false
self.bottomButton.alpha = 0.4
} else {
self.bottomButton.isEnabled = true
self.bottomButton.alpha = 1
}
self.tableView.reloadData()
})
......
......@@ -11,7 +11,7 @@ import UIKit
class YHServiceSectionView: UIView {
var items: [String] = []
var selectIndex = 0
lazy var myCollectView = {
// 设置布局方向
let flowLayout = UICollectionViewFlowLayout()
......@@ -77,11 +77,18 @@ extension YHServiceSectionView: UICollectionViewDelegate, UICollectionViewDataSo
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHServiceSectionCollectionViewCell.cellReuseIdentifier, for: indexPath) as! YHServiceSectionCollectionViewCell
cell.dataSource = items[indexPath.row]
if indexPath.row == selectIndex {
cell.isSelected = true
} else {
cell.isSelected = false
}
return cell
}
private func collectionView(collectionView: UICollectionView, didSelectItemAtIndexPath indexPath: NSIndexPath) {
selectIndex = indexPath.row
collectionView.reloadData()
print("index is \(indexPath.row)")
}
}
......@@ -89,6 +96,31 @@ extension YHServiceSectionView: UICollectionViewDelegate, UICollectionViewDataSo
class YHServiceSectionCollectionViewCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHServiceSectionCollectionViewCell"
private var isSelect: Bool = false
override var isSelected: Bool {
set {
self.isSelect = newValue
if newValue {
self.setSelectedStyle()
} else {
self.setDeSelectedStyle()
}
}
get {
return self.isSelect
}
}
private func setSelectedStyle() {
contentView.backgroundColor = UIColor.brandMainColor
descripeLable.textColor = UIColor.white
}
private func setDeSelectedStyle() {
contentView.backgroundColor = UIColor(hex: 0xf4f6fa)
descripeLable.textColor = UIColor(hex: 0x94a3bb)
}
var dataSource: String? {
didSet {
updataAllSubViews()
......
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