Commit 457ceb1a authored by pete谢兆麟's avatar pete谢兆麟

用于消息会话的改编

parent 202cc07d
...@@ -52,6 +52,154 @@ class YHServiceOrderListView: YHBaseViewController { ...@@ -52,6 +52,154 @@ class YHServiceOrderListView: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
} }
class func jumpToMessageController(type: Int, orderId: Int, _ stepId: Int = 0) {
if type == 1 {
//我的证件
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 2 {
//我的信息
let vc = YHInformationPerfectListVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 3 {
//我的评分
let vc = YHScoreDetailViewController()
vc.orderId = orderId
// vc.model = serviceCenterMainReqVM.allInfoScoreModel
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 4 { // 方案
//我的方案
let vc = YHMineSchemeViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 5 {
//我的签字
let vc = YHMySignatureListViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 6 {
//我的文书
let vc = YHMyDocumentsListViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 11 || type == 12 || type == 14 {
// 11 原则批等待结果
// 12 原则批待补件
// 14 原则批未获批准
let vc = YHPrincipleWaitResultViewController()
vc.status = type
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 13 {
//原则批已获批~
let vc = YHPrincipleApprovedResultVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 15 {
//正式批已获批~
let vc = YHOfficialApprovalResultVC()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 21 {
//新增受养人
let vc = YHAddAdoptersViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 22 {
//家庭信息确认
let vc = YHFamilyInfoConfirmViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 23 {
//电子签字缴费
let vc = YHVisaPaymentVC()
vc.orderID = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 24 {
//赴港时间预约
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 25 {
// 赴港行程指引
YHHUD.show(.progress(message: "加载中..."))
let appointViewModel = YHCerAppointViewModel()
appointViewModel.getIsNeedGoToHK(orderId: orderId) {
// needGoHK 1需要赴港 0不需要 2没有选择
// reservationToHK 0 没有预约 1 已经预約
needGoHK, reservationToHK in
YHHUD.hide()
var isNeedAppoint = true
if needGoHK == 1, reservationToHK == 1 { // 选择赴港且已预约
isNeedAppoint = false
} else if needGoHK == 0 { // 赴港选择否
isNeedAppoint = false
}
if isNeedAppoint {
//预约弹窗
let alert = YHDisappointHKAlertView.alertView()
alert.confirmBlock = {
let vc = YHCertificateAppointViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
}
alert.show()
} else { // 已预约过直接进入赴港行程指引
if var token = YHLoginManager.shared.userModel?.token {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/tohkList"
let addtionString = String.randomAlphaNumericStringT(6)//随机6个字母或者数字
let indexToInsert = token.index(token.startIndex, offsetBy: 6) //插入位置,这里以第六个字符后面为例
token.insert(contentsOf: addtionString, at: indexToInsert)
url = url + "?paramO=\(orderId)" + "&param=" + token
url = url + "&app_platform=ios" + "&app_version=" + UIDevice.appVersion()
printLog("UURL: \(url)")
let vc = YHH5WebViewVC()
vc.url = url
vc.isFullScreenFlag = false
vc.navTitle = "赴港行程指引"
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
}
} else if type == 26 {
//旅行证件准备
let vc = YHTravelDocsPreparationListViewController()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 27 {
//上传过关证件
let vc = YHUploadCertificateVC()
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 31 {
//续签资料管理
let vc = YHResinMaterialManageContainerVC()
vc.orderId = orderId
vc.id = stepId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 32 {
//续签文书管理
let vc = YHResignDocumentManagementVC(orderId: orderId, id: stepId)
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
} }
extension YHServiceOrderListView { extension YHServiceOrderListView {
...@@ -224,155 +372,13 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource { ...@@ -224,155 +372,13 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
if model.status == 1 || model.status == 4 { if model.status == 1 || model.status == 4 {
return return
} else { } else {
//1 我的证件 2 我的信息 3 我的评分 4 我的方案 5 我的签字 6我的文书 YHServiceOrderListView.jumpToMessageController(type: model.type, orderId: orderID, stepID)
if model.type == 1 { if model.type == 3 {
//我的证件
let vc = YHMineCertificateEntryViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 2 {
//我的信息
let vc = YHInformationPerfectListVC()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 3 {
//我的评分 //我的评分
handleRedPointFor(key: kMyScoreRedPointInfoKey, model: model) handleRedPointFor(key: kMyScoreRedPointInfoKey, model: model)
let vc = YHScoreDetailViewController()
vc.orderId = orderID
// vc.model = serviceCenterMainReqVM.allInfoScoreModel
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 4 { // 方案 } else if model.type == 4 { // 方案
//我的方案 //我的方案
handleRedPointFor(key: kMyPlanRedPointInfoKey, model: model) handleRedPointFor(key: kMyPlanRedPointInfoKey, model: model)
let vc = YHMineSchemeViewController()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 5 {
//我的签字
let vc = YHMySignatureListViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 6 {
//我的文书
let vc = YHMyDocumentsListViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 11 || model.type == 12 || model.type == 14 {
// 11 原则批等待结果
// 12 原则批待补件
// 14 原则批未获批准
let vc = YHPrincipleWaitResultViewController()
vc.status = model.type
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 13 {
//原则批已获批~
let vc = YHPrincipleApprovedResultVC()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 15 {
//正式批已获批~
let vc = YHOfficialApprovalResultVC()
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 21 {
//新增受养人
let vc = YHAddAdoptersViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 22 {
//家庭信息确认
let vc = YHFamilyInfoConfirmViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 23 {
//电子签字缴费
let vc = YHVisaPaymentVC()
vc.orderID = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 24 {
//赴港时间预约
let vc = YHCertificateAppointViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 25 {
// 赴港行程指引
YHHUD.show(.progress(message: "加载中..."))
appointViewModel.getIsNeedGoToHK(orderId: orderID) {
// needGoHK 1需要赴港 0不需要 2没有选择
// reservationToHK 0 没有预约 1 已经预約
[weak self] needGoHK, reservationToHK in
YHHUD.hide()
guard let self = self else { return }
var isNeedAppoint = true
if needGoHK == 1, reservationToHK == 1 { // 选择赴港且已预约
isNeedAppoint = false
} else if needGoHK == 0 { // 赴港选择否
isNeedAppoint = false
}
if isNeedAppoint {
//预约弹窗
let alert = YHDisappointHKAlertView.alertView()
alert.confirmBlock = {
let vc = YHCertificateAppointViewController()
vc.orderId = self.orderID
UIViewController.current?.navigationController?.pushViewController(vc)
}
alert.show()
} else { // 已预约过直接进入赴港行程指引
if var token = YHLoginManager.shared.userModel?.token {
var url = YHBaseUrlManager.shared.curH5URL() + "superAppBridge.html#/tohkList"
let addtionString = String.randomAlphaNumericStringT(6)//随机6个字母或者数字
let indexToInsert = token.index(token.startIndex, offsetBy: 6) //插入位置,这里以第六个字符后面为例
token.insert(contentsOf: addtionString, at: indexToInsert)
url = url + "?paramO=\(self.orderID)" + "&param=" + token
url = url + "&app_platform=ios" + "&app_version=" + UIDevice.appVersion()
printLog("UURL: \(url)")
let vc = YHH5WebViewVC()
vc.url = url
vc.isFullScreenFlag = false
vc.navTitle = "赴港行程指引"
vc.isNeedRefreshDataFlag = true
UIViewController.current?.navigationController?.pushViewController(vc)
}
}
}
} else if model.type == 26 {
//旅行证件准备
let vc = YHTravelDocsPreparationListViewController()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 27 {
//上传过关证件
let vc = YHUploadCertificateVC()
vc.orderId = orderID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 31 {
//续签资料管理
let vc = YHResinMaterialManageContainerVC()
vc.orderId = orderID
vc.id = stepID
UIViewController.current?.navigationController?.pushViewController(vc)
} else if model.type == 32 {
//续签文书管理
let vc = YHResignDocumentManagementVC(orderId: orderID, id: stepID)
UIViewController.current?.navigationController?.pushViewController(vc)
} }
} }
} }
......
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