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

高才我的签字细节

parent ff6dc038
...@@ -175,7 +175,7 @@ class YHDocumentFileItemView: UIView { ...@@ -175,7 +175,7 @@ class YHDocumentFileItemView: UIView {
} }
fileImageView.image = UIImage(named: iconImgName) fileImageView.image = UIImage(named: iconImgName)
fileNameLabel.text = docDataSource.fileName fileNameLabel.text = docDataSource.name
} }
......
...@@ -36,7 +36,7 @@ class YHMyDocumentsListViewModel: YHBaseViewModel { ...@@ -36,7 +36,7 @@ class YHMyDocumentsListViewModel: YHBaseViewModel {
//发送邮箱 //发送邮箱
func sendEmailForDocs(_ params : [String : Any], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) { func sendEmailForDocs(_ params : [String : Any], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.sendMail let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.gcsendMail
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { guard let self = self else {
......
...@@ -26,6 +26,7 @@ class YHMySignatureDetailModel: SmartCodable { ...@@ -26,6 +26,7 @@ class YHMySignatureDetailModel: SmartCodable {
var signFile: String = "" var signFile: String = ""
var docType: Int = 0 var docType: Int = 0
var signedDocument: [YHMySignedDocumentModel] = [] var signedDocument: [YHMySignedDocumentModel] = []
var templateUrl: String = ""
required init() { required init() {
} }
} }
......
...@@ -62,7 +62,7 @@ class YHGCMySignatureDetailViewController: YHBaseViewController { ...@@ -62,7 +62,7 @@ class YHGCMySignatureDetailViewController: YHBaseViewController {
viewModel.requestSignatureDetail("\(id)", callBackBlock: {[weak self] success, error in viewModel.requestSignatureDetail("\(id)", callBackBlock: {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
if success { if success {
let state = self.viewModel.mainModel?.status ?? 0 let state = self.viewModel.mainModel?.docStatus ?? 0
// 1000 1001 1002 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成 // 1000 1001 1002 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成
if state == 1000 || state == 1001 || state == 1002 || state == 1003 { if state == 1000 || state == 1001 || state == 1002 || state == 1003 {
...@@ -344,20 +344,32 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD ...@@ -344,20 +344,32 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
} }
if type == .look { if type == .look {
if self.viewModel.mainModel?.docStatus == 1007 { if self.viewModel.mainModel?.docStatus == 1002 {
let url = URL(string: self.viewModel.mainModel?.signFile) ?? URL(fileURLWithPath: "") YHCommonAlertView.show("", "文书编写中,请稍候查看", "", "我知道了") {
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close }
safariViewController.delegate = self } else if self.viewModel.mainModel?.docStatus == 1007 {
safariViewController.modalPresentationStyle = .fullScreen if self.viewModel.mainModel?.signFile.count != 0 {
present(safariViewController, animated: true, completion: nil) let url = URL(string: self.viewModel.mainModel?.signFile) ?? URL(fileURLWithPath: "")
let safariViewController = SFSafariViewController(url: url)
safariViewController.dismissButtonStyle = .close
safariViewController.delegate = self
safariViewController.modalPresentationStyle = .fullScreen
present(safariViewController, animated: true, completion: nil)
} else {
}
} else { } else {
let url = URL(string: self.viewModel.mainModel?.signFileOrigin) ?? URL(fileURLWithPath: "") if self.viewModel.mainModel?.signFile.count != 0 {
let safariViewController = SFSafariViewController(url: url) let url = URL(string: self.viewModel.mainModel?.signFileOrigin) ?? URL(fileURLWithPath: "")
safariViewController.dismissButtonStyle = .close let safariViewController = SFSafariViewController(url: url)
safariViewController.delegate = self safariViewController.dismissButtonStyle = .close
safariViewController.modalPresentationStyle = .fullScreen safariViewController.delegate = self
present(safariViewController, animated: true, completion: nil) safariViewController.modalPresentationStyle = .fullScreen
present(safariViewController, animated: true, completion: nil)
} else {
}
} }
} }
...@@ -548,7 +560,11 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD ...@@ -548,7 +560,11 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
return 180 return 180
} else { } else {
guard let count = self.viewModel.mainModel?.signedDocument.count else { return CGFloat(221) } guard let count = self.viewModel.mainModel?.signedDocument.count else { return CGFloat(221) }
return CGFloat(221 + count * 71) if self.viewModel.mainModel?.docStatus == 1007 {
return CGFloat(168 + count * 71)
} else {
return CGFloat(221 + count * 71)
}
} }
} }
......
...@@ -263,7 +263,7 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell { ...@@ -263,7 +263,7 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell {
} }
fileNameLabel.text = name fileNameLabel.text = name
// 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成 // 1003-待签署; 1004-已签署; 1005-待审核; 1006-已驳回; 1007-已完成
if dataSource.docStatus == 1000 || dataSource.docStatus == 1001 || dataSource.docStatus == 1002 { if dataSource.docStatus == 1000 || dataSource.docStatus == 1001 {
bottomLeftLineView.isHidden = true bottomLeftLineView.isHidden = true
editButton.isHidden = false editButton.isHidden = false
submitButton.isHidden = true submitButton.isHidden = true
...@@ -272,6 +272,19 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell { ...@@ -272,6 +272,19 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell {
flagLabel.text = "待补充" flagLabel.text = "待补充"
flagLabel.backgroundColor = UIColor(hex: 0xebf0f9) flagLabel.backgroundColor = UIColor(hex: 0xebf0f9)
editButton.setTitle("补充信息", for: .normal) editButton.setTitle("补充信息", for: .normal)
} else if dataSource.docStatus == 1002 {
bottomLeftLineView.isHidden = true
editButton.isHidden = true
submitButton.isHidden = false
lookButton.isHidden = true
submitButton.snp.remakeConstraints { make in
make.bottom.equalToSuperview()
make.top.equalTo(bottomView.snp.bottom)
make.left.equalToSuperview()
make.right.equalToSuperview()
}
flagLabel.text = "待补充"
flagLabel.backgroundColor = UIColor(hex: 0xebf0f9)
} else if dataSource.docStatus == 1003 { } else if dataSource.docStatus == 1003 {
bottomLeftLineView.isHidden = true bottomLeftLineView.isHidden = true
editButton.isHidden = false editButton.isHidden = false
...@@ -320,7 +333,7 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell { ...@@ -320,7 +333,7 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell {
make.bottom.equalToSuperview() make.bottom.equalToSuperview()
make.top.equalTo(bottomView.snp.bottom) make.top.equalTo(bottomView.snp.bottom)
make.left.equalToSuperview() make.left.equalToSuperview()
make.right.equalTo((KScreenWidth - 32)/2.0) make.width.equalTo((KScreenWidth - 32)/2.0)
} }
flagLabel.textColor = UIColor(hex: 0x3cc694) flagLabel.textColor = UIColor(hex: 0x3cc694)
flagLabel.text = "已完成" flagLabel.text = "已完成"
......
...@@ -153,7 +153,7 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel { ...@@ -153,7 +153,7 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel {
array.append(param) array.append(param)
} }
let params: [String : Any] = ["id": orderID, "doc_id":id, "signed_docs": array] let params: [String : Any] = ["id": orderID, "doc_id":id, "signed_docs": array]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.gcinfo let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.gcconfirm
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { return } guard let self = self else { return }
...@@ -169,7 +169,7 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel { ...@@ -169,7 +169,7 @@ class YHGCMySignatureDetailViewModel: YHBaseViewModel {
} }
func sendEmailForDocs(_ params : [String : Any], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) { func sendEmailForDocs(_ params : [String : Any], callBackBlock:@escaping (_ success: Bool, _ error: YHErrorModel?)->()) {
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.sendMail let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.gcsendMail
let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in let _ = YHNetRequest.postRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象 //1. json字符串 转 对象
guard let self = self else { guard let self = self else {
......
...@@ -380,7 +380,7 @@ class YHAllApiName { ...@@ -380,7 +380,7 @@ class YHAllApiName {
static let gcinfo = "super-app/gc/hk-consent-info" static let gcinfo = "super-app/gc/hk-consent-info"
static let gcSaveinfo = "super-app/gc/edit-hk-consent-info" static let gcSaveinfo = "super-app/gc/edit-hk-consent-info"
static let gcconfirm = "super-app/gc/upload-sign-file" static let gcconfirm = "super-app/gc/upload-sign-file"
static let gcsendMail = "super-app/gc/signature/doc/send/email"
} }
//我的文书 //我的文书
......
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