Commit 7a8f6e1c authored by David黄金龙's avatar David黄金龙

我的文书 我的签字列表的全部流程

parent f9c2ba62
...@@ -1191,8 +1191,8 @@ ...@@ -1191,8 +1191,8 @@
045EEE222B9F171A0022A143 /* C */ = { 045EEE222B9F171A0022A143 /* C */ = {
isa = PBXGroup; isa = PBXGroup;
children = ( children = (
045EEE232B9F171A0022A143 /* YHMySignatureDetailViewController.swift */,
045EEE242B9F171A0022A143 /* YHMySignatureListViewController.swift */, 045EEE242B9F171A0022A143 /* YHMySignatureListViewController.swift */,
045EEE232B9F171A0022A143 /* YHMySignatureDetailViewController.swift */,
); );
path = C; path = C;
sourceTree = "<group>"; sourceTree = "<group>";
......
...@@ -9,12 +9,12 @@ ...@@ -9,12 +9,12 @@
import UIKit import UIKit
import IQKeyboardManagerSwift import IQKeyboardManagerSwift
/* /*
*我的文书 列表 *我的文书 列表
*/ */
class YHMyDocumentsListViewController: YHBaseViewController { class YHMyDocumentsListViewController: YHBaseViewController {
var tableView: UITableView! var tableView: UITableView!
var dataSource: [YHMyDocumentsListModel]? // var dataSource: [YHMyDocumentsListModel]?
var viewModel: YHMyDocumentsListViewModel? var viewModel: YHMyDocumentsListViewModel?
var orderId: Int = 0 var orderId: Int = 0
var mobile: String = "" var mobile: String = ""
...@@ -42,9 +42,6 @@ class YHMyDocumentsListViewController: YHBaseViewController { ...@@ -42,9 +42,6 @@ class YHMyDocumentsListViewController: YHBaseViewController {
return imagV return imagV
}() }()
lazy var emailInputView: YHEmailInputAlertView = { lazy var emailInputView: YHEmailInputAlertView = {
let view = YHEmailInputAlertView.emailInputView(defalutText: "请输入邮箱") let view = YHEmailInputAlertView.emailInputView(defalutText: "请输入邮箱")
return view return view
......
...@@ -133,6 +133,7 @@ class YHDocListCell: UITableViewCell { ...@@ -133,6 +133,7 @@ class YHDocListCell: UITableViewCell {
checkButton.isHidden = true checkButton.isHidden = true
} }
//文书状态
func updateAllViewsForDocs() { func updateAllViewsForDocs() {
guard let dataSource = dataSourceForDocs else { return } guard let dataSource = dataSourceForDocs else { return }
titleLabel.text = dataSource.doc_type_name titleLabel.text = dataSource.doc_type_name
...@@ -144,18 +145,20 @@ class YHDocListCell: UITableViewCell { ...@@ -144,18 +145,20 @@ class YHDocListCell: UITableViewCell {
checkButton.isHidden = true checkButton.isHidden = true
statusHoldView.isHidden = false statusHoldView.isHidden = false
/* /*
* 1: '待确认', docOpt: {
* 2: '待签章', 1: '待确认',
* 3: '已驳回', 2: '待签章',
* 4: '待核对', 3: '已驳回',
* 5: '已签章', 4: '待核对',
* 6: '已定稿', 5: '已签章',
* 7: '已完成' 6: '已定稿',
7: '已完成'
},
*/ */
var statusTxt = "" var statusTxt = ""
var color : UIColor = .brandMainColor var color : UIColor = .brandMainColor
let status = dataSource.document_check_status let status = dataSource.status
if status == 1 { if status == 1 {
statusTxt = "待确认" statusTxt = "待确认"
color = UIColor.brandMainColor color = UIColor.brandMainColor
...@@ -166,7 +169,7 @@ class YHDocListCell: UITableViewCell { ...@@ -166,7 +169,7 @@ class YHDocListCell: UITableViewCell {
statusTxt = "已驳回" statusTxt = "已驳回"
color = UIColor.failColor color = UIColor.failColor
} else if status == 4 { } else if status == 4 {
statusTxt = "待审核" statusTxt = "待核对"
color = UIColor.warnColor color = UIColor.warnColor
} else if status == 5 { } else if status == 5 {
statusTxt = "已签章" statusTxt = "已签章"
...@@ -183,12 +186,56 @@ class YHDocListCell: UITableViewCell { ...@@ -183,12 +186,56 @@ class YHDocListCell: UITableViewCell {
} }
statusLabel.text = statusTxt statusLabel.text = statusTxt
statusLabel.textColor = color statusLabel.textColor = color
//0-待上传,1-未发送, 2-发送中,3-已发送,4-已签收,5-审核通过,6-驳回
} }
} }
//签字状态
func updateAllViewsForSign() { func updateAllViewsForSign() {
guard let dataSource = dataSourceForSign else { return } guard let dataSource = dataSourceForSign else { return }
titleLabel.text = dataSource.doc_type_name
if dataSource.isEditFlag {
checkButton.isHidden = false
statusHoldView.isHidden = true
checkButton.isSelected = dataSource.isSelectedFlag
} else {
checkButton.isHidden = true
statusHoldView.isHidden = false
/*
statusOpt: {
3: '待签章',
4: '已签章',
5: '已完成',
6: '已驳回'
},
*/
var statusTxt = ""
var color : UIColor = .brandMainColor
let status = dataSource.status
if status == 3 {
statusTxt = "待签章"
color = UIColor.failColor
} else if status == 4 {
statusTxt = "已签章"
color = UIColor.warnColor
} else if status == 5 {
statusTxt = "已完成"
color = UIColor.successColor
} else if status == 6 {
statusTxt = "已驳回"
color = UIColor.failColor
} else {
statusTxt = "--"
color = UIColor.brandMainColor
}
statusLabel.text = statusTxt
statusLabel.textColor = color
}
} }
} }
......
...@@ -25,6 +25,10 @@ class YHMySignatureModel: YHBaseModel { ...@@ -25,6 +25,10 @@ class YHMySignatureModel: YHBaseModel {
var is_second_page: Bool = false var is_second_page: Bool = false
var contract_id: String = "" var contract_id: String = ""
var doc_type_label: String = "" var doc_type_label: String = ""
var isEditFlag : Bool = false //是否为编辑状态
var isSelectedFlag : Bool = true //是否被选择 默认全部全部选择
} }
class YHMySignatureUserInfoModel: YHBaseModel { class YHMySignatureUserInfoModel: YHBaseModel {
......
...@@ -92,7 +92,7 @@ extension YHPhoneMessageView: UITextFieldDelegate { ...@@ -92,7 +92,7 @@ extension YHPhoneMessageView: UITextFieldDelegate {
} }
func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool { func textField(_ textField: UITextField, shouldChangeCharactersIn range: NSRange, replacementString string: String) -> Bool {
var newText = (textField.text! as NSString).replacingCharacters(in: range, with: string) let newText = (textField.text! as NSString).replacingCharacters(in: range, with: string)
if newText.count > 11 { if newText.count > 11 {
return false return false
} }
......
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