Commit 93be7c37 authored by pete谢兆麟's avatar pete谢兆麟

签字确认逻辑及接口

parent ac8638a6
......@@ -89,6 +89,17 @@ class YHServiceOrderListView: YHBaseViewController {
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 7 {
//递交确认
let viewModel = YHServiceCenterViewModel()
viewModel.getServiceMainDocUrl(orderId: orderId) {success, error in
let vc = YHH5WebViewVC()
vc.url = viewModel.url
vc.isFullScreenFlag = false
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
} else if type == 11 || type == 12 || type == 14 {
// 11 原则批等待结果
......
......@@ -78,13 +78,15 @@ class YHLookResignAlertView: UIView {
button.setTitleColor(UIColor.white, for: .normal)
button.backgroundColor = UIColor.brandMainColor
button.addTarget(self, action: #selector(sure), for: .touchUpInside)
button.layer.cornerRadius = kCornerRadius3
button.clipsToBounds = true
return button
}()
centerView.addSubview(sureButton)
sureButton.snp.makeConstraints { make in
make.right.equalTo(-20)
make.left.equalTo(20)
make.width.equalTo(30)
make.height.equalTo(48)
make.bottom.equalTo(-42)
}
......
......@@ -48,9 +48,13 @@ class YHLookResignResultPrivateView: UIView {
messageLabel = {
let label = UILabel()
let a = ASAttributedString.init("已阅读并同意", .font(UIFont.PFSC_M(ofSize:13)), .foreground(UIColor.mainTextColor50))
let c = ASAttributedString.init("缴费须知", .font(UIFont.PFSC_M(ofSize:13)),.foreground(UIColor.brandMainColor), .underline(.single), .action {
let c = ASAttributedString.init("缴费须知", .font(UIFont.PFSC_M(ofSize:13)),.foreground(UIColor.brandMainColor), .action {
// 跳转引导
YHLookResignAlertView.show()
YHLookResignAlertView.show { [weak self] in
guard let self = self else { return }
self.agreeButton.isSelected = true
self.isAgree = self.agreeButton.isSelected
}
})
let e = ASAttributedString.init(",请勿在香港境外点击缴费链接", .font(UIFont.PFSC_M(ofSize:13)), .foreground(UIColor.mainTextColor50))
label.attributed.text = a+c+e
......
......@@ -108,6 +108,11 @@ extension YHServiceOrderProgressTableViewCell {
titleLabel.text = "我的文书"
messageLabel.text = "您的文书还没确认哦~"
}
if model.type == 7 {
titleLabel.text = "递交确认"
messageLabel.text = "您的信息确认签署还没生成哦~"
buttonLabel.text = "去确认"
}
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
......@@ -267,6 +272,16 @@ extension YHServiceOrderProgressTableViewCell {
}
}
if model.type == 7 {
titleLabel.text = "递交确认"
let a: ASAttributedString = .init("您还有", .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.yhGreyColor))
let aa: ASAttributedString = .init(NSAttributedString(string: "\(model.num)项"), .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.brandMainColor))
let aaa: ASAttributedString = .init("信息确认签署待完成哦~", .font(UIFont.PFSC_M(ofSize: 13)),.foreground(UIColor.yhGreyColor))
messageLabel.attributed.text = a + aa + aaa
buttonLabel.text = "去确认"
}
let b: ASAttributedString = .init(NSAttributedString(string: "\(model.percentage)"), .font(UIFont(name: "DINAlternate-Bold", size: 24)!),.foreground(UIColor.mainTextColor))
let bb: ASAttributedString = .init("%", .font(UIFont.PFSC_M(ofSize: 10)),.foreground(UIColor.mainTextColor.withAlphaComponent(0.3)))
progressLabel.attributed.text = b + bb
......@@ -491,6 +506,10 @@ extension YHServiceOrderProgressTableViewCell {
titleLabel.text = "我的文书"
messageLabel.text = "恭喜您,文书已全部定稿~"
}
if model.type == 7 {
titleLabel.text = "递交确认"
messageLabel.text = "恭喜您,信息确认签署已完成~"
}
if model.type == 15 {
titleLabel.text = "港府获批结果"
......
......@@ -7,6 +7,7 @@
//
import UIKit
import SmartCodable
class YHServiceCenterViewModel: YHBaseViewModel {
//合同列表 数据
......@@ -14,6 +15,7 @@ class YHServiceCenterViewModel: YHBaseViewModel {
//服务中心进度模型
var arrDataForSeviceCenterProgress: [YHServiceCenterProgressModel] = []
var mainModel: YHServiceCenterMainModel = YHServiceCenterMainModel()
var url: String = ""
}
//请求接口
......@@ -122,5 +124,40 @@ extension YHServiceCenterViewModel {
callBackBlock(false,err)
}
}
func getServiceMainDocUrl(orderId: Int, callBackBlock:@escaping (_ success: Bool, _ error:YHErrorModel?)->()) {
let params: [String : Any] = ["order_id": orderId]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.Signature.signUrl
let _ = YHNetRequest.getRequest(url: strUrl, params: params) { [weak self] json, code in
//1. json字符串 转 对象
guard let self = self else { return }
if json.code == 200 {
DispatchQueue.global().async {
guard let dic = json.data?.peel as? [String : Any], let resultModel = YHDocModel.deserialize(from: dic) else {
DispatchQueue.main.async {
callBackBlock(false,nil)
}
return
}
DispatchQueue.main.async {
self.url = resultModel.url
callBackBlock(true,nil)
}
}
} else {
let error : YHErrorModel = YHErrorModel(errorCode:Int32(json.code),errorMsg: json.msg.count > 0 ? json.msg : "数据错误")
callBackBlock(false,error)
}
} failBlock: { err in
callBackBlock(false,err)
}
}
//
}
struct YHDocModel : SmartCodable {
var url : String = ""
}
......@@ -334,6 +334,7 @@ class YHAllApiName {
// 查看签署状态
static let signCallBack = "infoflow/sign/sign-callback"
static let personal = "infoflow/sign/check-personal-status"
static let signUrl = "infoflow/get-sign-url"
}
//我的文书
......
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