Commit ee318747 authored by DavidHuang's avatar DavidHuang

信息完善 列表页逻辑 、接口、数据处理

parent c65daa11
......@@ -167,7 +167,7 @@ extension YHButlerServiceManager {
UIViewController.current?.navigationController?.pushViewController(vc)
return QYLinkClickActionPolicy.cancel
} else if orderID > -1,type > -1 {
YHServiceOrderListView.jumpToMessageController(type: type, orderId: orderID, batchId)
YHServiceOrderListViewController.jumpToMessageController(type: type, orderId: orderID, batchId)
return QYLinkClickActionPolicy.cancel
}
} else {
......
......@@ -13,8 +13,14 @@ import UIKit
*/
class YHInformationPerfectListVC: YHBaseViewController {
var orderId : Int?
var productType : Int = 0 //0-优才 1-高才A 2-高才B 3-高才C
private var firstCheckFlag : Bool = false
private let serviceCenterMainReqVM : YHServiceCenterMainViewModel = YHServiceCenterMainViewModel()
private lazy var serviceCenterMainReqVM : YHServiceCenterMainViewModel = {
let tmp = YHServiceCenterMainViewModel()
return tmp
}()
private var hasSubmitFlag : Bool = false {
didSet {
......@@ -105,6 +111,7 @@ class YHInformationPerfectListVC: YHBaseViewController {
override func viewDidLoad() {
super.viewDidLoad()
serviceCenterMainReqVM.productType = productType
setupUI()
}
......@@ -546,58 +553,132 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
}
private func handleJumpLogicDebug(tapIndex : Int) {
if tapIndex == 0 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
return
if productType == 0 {
//优才
if tapIndex == 0 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
return
}
//主申请人信息
let vc = YHMainApplicantInformationViewController()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if tapIndex == 1 {
//家庭程序信息
let vc = YHFamilyMemberInfoListVC(orderId: orderId ?? 0)
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if tapIndex == 2 {
//基本信息
let vc = YHBasicInfoFillViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
} else if tapIndex == 3 {
//学历/专业资格
let vc = YHEducationInfoListVC()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if tapIndex == 4 {
//工作经历
let vc = YHWorkExperienceListViewController()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
}
else if tapIndex == 5 {
//收入记录
if let orderId = orderId {
let ctl = YHIncomeRecordViewController(orderId: orderId)
navigationController?.pushViewController(ctl)
}
}
//主申请人信息
let vc = YHMainApplicantInformationViewController()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if tapIndex == 1 {
//家庭程序信息
let vc = YHFamilyMemberInfoListVC(orderId: orderId ?? 0)
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if tapIndex == 2 {
//基本信息
let vc = YHBasicInfoFillViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
} else if tapIndex == 3 {
//学历/专业资格
let vc = YHEducationInfoListVC()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if tapIndex == 4 {
//工作经历
let vc = YHWorkExperienceListViewController()
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
else if tapIndex == 6 {
//其他信息
let vc = YHOtherInfoFillViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
else {
}
}
else if tapIndex == 5 {
//收入记录
if let orderId = orderId {
let ctl = YHIncomeRecordViewController(orderId: orderId)
navigationController?.pushViewController(ctl)
else if productType == 1 {
//高才A
if tapIndex == 0 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
return
}
//高A- 申请类别
YHHUD.flash(message: "高A- 申请类别")
} else if tapIndex == 1 {
//高A- 主申请人信息
YHHUD.flash(message: "高A- 主申请人信息")
} else if tapIndex == 2 {
//高A- 家庭成员信息
YHHUD.flash(message: "高A- 家庭成员信息")
} else if tapIndex == 3 {
//高A- 收入记录/工作经验
YHHUD.flash(message: "高A- 收入记录/工作经验")
} else if tapIndex == 4 {
//高A- 基本资料
YHHUD.flash(message: "高A- 基本资料")
}
else {
}
}
else if tapIndex == 6 {
//其他信息
let vc = YHOtherInfoFillViewController()
vc.orderId = orderId
navigationController?.pushViewController(vc)
}
else {
else if productType == 2 || productType == 3 {
//高才BC
if tapIndex == 0 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
return
}
//高才BC- 申请类别
YHHUD.flash(message: "高才BC- 申请类别")
} else if tapIndex == 1 {
//高才BC- 主申请人信息
YHHUD.flash(message: "高才BC- 主申请人信息")
} else if tapIndex == 2 {
//高才BC- 家庭成员信息
YHHUD.flash(message: "高才BC- 家庭成员信息")
} else if tapIndex == 3 {
//高才BC- 学历资格
YHHUD.flash(message: "高才BC- 学历资格")
} else if tapIndex == 4 {
//高才BC- 工作经验
YHHUD.flash(message: "高才BC- 工作经验")
} else if tapIndex == 5 {
//高才BC- 基本资料
YHHUD.flash(message: "高才BC- 基本资料")
}
else {
}
}
}
}
......@@ -14,10 +14,11 @@ class YHServerCenterHoldViewController: UIViewController {
var stepID: Int = 0
var mobile: String = ""
var orderType: Int = 0
var productInfoMode : YHContactItemModel = YHContactItemModel()
var orderId: Int = 0 {
didSet {
for i in 0..<arrItemTitles.count {
let vc = arrItemVCs[i] as YHServiceOrderListView
let vc = arrItemVCs[i] as YHServiceOrderListViewController
vc.type = i
if i == 1 {
vc.type = 2
......@@ -31,6 +32,7 @@ class YHServerCenterHoldViewController: UIViewController {
vc.state = state
vc.stepID = stepID
vc.orderType = orderType
vc.productInfoMode = productInfoMode
vc.loadData()
}
}
......@@ -44,12 +46,12 @@ class YHServerCenterHoldViewController: UIViewController {
}
}
}
var controllerOne: YHServiceOrderListView = YHServiceOrderListView()
var controllerTwo: YHServiceOrderListView = YHServiceOrderListView()
var controllerThree: YHServiceOrderListView = YHServiceOrderListView()
var controllerFour: YHServiceOrderListView = YHServiceOrderListView()
var controllerOne: YHServiceOrderListViewController = YHServiceOrderListViewController()
var controllerTwo: YHServiceOrderListViewController = YHServiceOrderListViewController()
var controllerThree: YHServiceOrderListViewController = YHServiceOrderListViewController()
var controllerFour: YHServiceOrderListViewController = YHServiceOrderListViewController()
var arrItemTitles = ["全部", "进行中", "待开始", "已完成"]
var arrItemVCs: [YHServiceOrderListView] = []
var arrItemVCs: [YHServiceOrderListViewController] = []
var segmentedView : JXSegmentedView = JXSegmentedView(frame: CGRect(x: 0, y: 0, width: KScreenWidth, height: 48))
lazy var segmentedDataSource: JXSegmentedDotDataSource = {
let dataSource = JXSegmentedDotDataSource()
......@@ -78,6 +80,12 @@ class YHServerCenterHoldViewController: UIViewController {
override func viewDidLoad() {
super.viewDidLoad()
setupView()
controllerOne.productInfoMode = productInfoMode
controllerTwo.productInfoMode = productInfoMode
controllerThree.productInfoMode = productInfoMode
controllerFour.productInfoMode = productInfoMode
NotificationCenter.default.addObserver(self, selector: #selector(goToServiceTabFromFileListPage), name: YhConstant.YhNotification.didClickFileListBackToServiceTabNotifiction, object: nil)
// Do any additional setup after loading the view.
}
......
......@@ -466,6 +466,7 @@ extension YHServiceCenterViewController : UITableViewDelegate,UITableViewDataSou
cellView.mobile = model.mobile
cellView.state = state
cellView.stepID = stepID
cellView.productInfoMode = model
cellView.orderId = orderId
return cell
}
......
......@@ -9,7 +9,18 @@
import UIKit
import JXSegmentedView
class YHServiceOrderListView: YHBaseViewController {
///*
// 银河订单类型 列表
// */
//enum YHProductType: Int {
// case productType_Yc = 0 //优才订单
// case productType_Gc_A = 1 //高才A
// case productType_Gc_B = 2 //高才B
// case productType_Gc_C = 3 //高才C
//}
class YHServiceOrderListViewController: YHBaseViewController {
let principleViewModel: YHPrincleViewModel = YHPrincleViewModel()
let appointViewModel = YHCerAppointViewModel()
public var vcCanScroll : Bool = true
......@@ -23,6 +34,7 @@ class YHServiceOrderListView: YHBaseViewController {
var orderType: Int = 0
var state: Int = 0
var stepID: Int = 0
var productInfoMode : YHContactItemModel = YHContactItemModel()
var arrDataForSeviceCenterProgress: [YHServiceCenterProgressModel] = []
lazy var noDataView: YHEmptyDataView = {
......@@ -52,7 +64,7 @@ class YHServiceOrderListView: YHBaseViewController {
NotificationCenter.default.addObserver(self, selector: #selector(endDragging), name:Notification.Name(rawValue: "scrollViewDidEndDragging0"), object: nil)
}
class func jumpToMessageController(type: Int, orderId: Int, _ stepId: Int = 0) {
class func jumpToMessageController(type: Int, orderId: Int, _ stepId: Int = 0,productType:Int = 0) {
if type == 1 {
//我的证件
let vc = YHMineCertificateEntryViewController()
......@@ -253,11 +265,22 @@ class YHServiceOrderListView: YHBaseViewController {
} else if type == 104 {
//续签证件管理
gotoResignCertificateListVC(orderID: orderId)
} else if type == 201 {
}
/*
高才部分
*/
else if type == 201 {
//高才我的信息
let vc = YHGCWorkExperienceListViewController()
// let vc = YHGCWorkExperienceListViewController()
// vc.orderId = orderId
// UIViewController.current?.navigationController?.pushViewController(vc)
let vc = YHInformationPerfectListVC()
vc.productType = productType
vc.orderId = orderId
UIViewController.current?.navigationController?.pushViewController(vc)
} else if type == 202 {
//高才我的方案
} else if type == 203 {
......@@ -268,7 +291,7 @@ class YHServiceOrderListView: YHBaseViewController {
}
}
extension YHServiceOrderListView {
extension YHServiceOrderListViewController {
func loadData() {
var array: [YHServiceCenterProgressModel] = []
for item in arrDataForSeviceCenterProgress {
......@@ -405,7 +428,7 @@ extension YHServiceOrderListView {
}
}
extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
extension YHServiceOrderListViewController : UITableViewDelegate,UITableViewDataSource {
func numberOfSections(in tableView: UITableView) -> Int {
return 1
}
......@@ -444,18 +467,18 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
if tag == 1 {
//身份续签指引
printLog("身份续签指引")
YHServiceOrderListView.gotoResignGuideVC()
YHServiceOrderListViewController.gotoResignGuideVC()
} else if tag == 2 {
//我的续签方案
printLog("续签方案")
YHServiceOrderListView.gotoResignMethod(orderID: orderID, stepID: stepID)
YHServiceOrderListViewController.gotoResignMethod(orderID: orderID, stepID: stepID)
} else if tag == 3 {
//添加在港记录
YHServiceOrderListView.gotoHKImmigrationRecordsVC(orderID: orderID)
YHServiceOrderListViewController.gotoHKImmigrationRecordsVC(orderID: orderID)
} else if tag == 4 {
//续签证件管理
YHServiceOrderListView.gotoResignCertificateListVC(orderID: orderID)
YHServiceOrderListViewController.gotoResignCertificateListVC(orderID: orderID)
}
}
return view
......@@ -501,7 +524,7 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
if model.status == 1 || model.status == 4 {
return
} else {
YHServiceOrderListView.jumpToMessageController(type: model.type, orderId: orderID, stepID)
YHServiceOrderListViewController.jumpToMessageController(type: model.type, orderId: orderID, stepID,productType: productInfoMode.product_type)
if model.type == 3 {
//我的评分
handleRedPointFor(key: kMyScoreRedPointInfoKey, model: model)
......@@ -534,13 +557,13 @@ extension YHServiceOrderListView : UITableViewDelegate,UITableViewDataSource {
}
extension YHServiceOrderListView: JXSegmentedListContainerViewListDelegate {
extension YHServiceOrderListViewController: JXSegmentedListContainerViewListDelegate {
func listView() -> UIView {
return view
}
}
extension YHServiceOrderListView: UIScrollViewDelegate {
extension YHServiceOrderListViewController: UIScrollViewDelegate {
//控制滑动交互
func scrollViewDidScroll(_ scrollView: UIScrollView) {
let scrollViewSet: CGFloat = scrollView.contentOffset.y
......@@ -559,7 +582,7 @@ extension YHServiceOrderListView: UIScrollViewDelegate {
}
extension YHServiceOrderListView {
extension YHServiceOrderListViewController {
@objc func beginDragging() {
homeTableView.isScrollEnabled = false
vcCanScroll = false
......
......@@ -13,38 +13,104 @@ class YHInformationPerfectModel {
var name : String = ""
var helpModel : YHPersonInfoFillStepModel?
var productType : Int = 0 //0-优才 1-高才A 2-高才B 3-高才C
var type : Int = -1 {
didSet{
isFirstCell = false
isLastestCell = false
if type == 0 {
isFirstCell = true
name = "主申请人信息"
icon = "zsqrxx_icon"
} else if type == 1 {
name = "家庭成员信息"
icon = "jtcyxx_icon"
} else if type == 2 {
name = "基本资料"
icon = "jbzl_icon"
} else if type == 3 {
name = "学历/专业资格"
icon = "xlzyzg_icon"
} else if type == 4 {
name = "工作经验"
icon = "gzjy_icon"
}
else if type == 5 {
name = "收入记录"
icon = "srjl_icon"
}
else if type == 8 {
name = "其他信息"
icon = "qtxx_icon"
isLastestCell = true
if productType == 0 {
//优才
if type == 0 {
isFirstCell = true
name = "主申请人信息"
icon = "zsqrxx_icon"
} else if type == 1 {
name = "家庭成员信息"
icon = "jtcyxx_icon"
} else if type == 2 {
name = "基本资料"
icon = "jbzl_icon"
} else if type == 3 {
name = "学历/专业资格"
icon = "xlzyzg_icon"
} else if type == 4 {
name = "工作经验"
icon = "gzjy_icon"
}
else if type == 5 {
name = "收入记录"
icon = "srjl_icon"
}
else if type == 8 {
name = "其他信息"
icon = "qtxx_icon"
isLastestCell = true
} else {
name = "未知"
icon = "qtxx_icon"
// isLastestCell = true
}
} else if productType == 1 {
//高A
if type == 0 {
isFirstCell = true
name = "申请类别"
icon = "zsqrxx_icon"
} else if type == 1 {
name = "主申请人信息"
icon = "jtcyxx_icon"
} else if type == 2 {
name = "家庭成员信息"
icon = "jbzl_icon"
}else if type == 4 {
name = "收入记录/工作经验"
icon = "gzjy_icon"
}
else if type == 5 {
name = "基本资料"
icon = "srjl_icon"
}
else {
name = "未知"
icon = "qtxx_icon"
// isLastestCell = true
}
} else if productType == 2 || productType == 3 {
//高BC
if type == 0 {
isFirstCell = true
name = "申请类别"
icon = "zsqrxx_icon"
} else if type == 1 {
name = "主申请人信息"
icon = "jtcyxx_icon"
} else if type == 2 {
name = "家庭成员信息"
icon = "jbzl_icon"
} else if type == 3 {
name = "学历资格"
icon = "jbzl_icon"
}
else if type == 4 {
name = "工作经验"
icon = "gzjy_icon"
}
else if type == 5 {
name = "基本资料"
icon = "srjl_icon"
}
else {
name = "未知"
icon = "qtxx_icon"
// isLastestCell = true
}
}
}
}
......
......@@ -16,4 +16,7 @@ struct YHPersonInfoFillStepModel: SmartCodable {
var sex : Int = 0
var policy_switch : Bool = false // false就是待完善 true : 已提交但未满足条件
//高才订单使用
var application_type : Int = -1 //1是A 2是高B 3是高C
}
......@@ -9,6 +9,9 @@
import UIKit
import SmartCodable
class YHServiceCenterMainViewModel: YHBaseViewModel {
var productType : Int = 0 //0-优才 1-高才A 2-高才B 3-高才C
//合同列表 数据
var arrContactList : [YHContactItemModel] = []
......@@ -310,7 +313,22 @@ extension YHServiceCenterMainViewModel {
informationFillStepModel = resultModel
myInfoFillStep = resultModel.step //当前正在进行的步骤
let arr = [0,1,2,3,4,5,8]
var arr : [Int] = []
if productType == 0 {
//优才
arr = [0,1,2,3,4,5,8]
} else if productType == 1 {
//高A
arr = [0,1,2,4,5]
} else if productType == 2 || productType == 3 {
//高B、C
arr = [0,1,2,3,4,5]
} else {
//未知
}
let target = myInfoFillStep
var targetIndex : Int = -1
for (index , item) in arr.enumerated() {
......@@ -323,6 +341,7 @@ extension YHServiceCenterMainViewModel {
for (index,item) in arr.enumerated() {
let model = YHInformationPerfectModel()
model.productType = productType
model.helpModel = resultModel
model.type = item
arrInfoFillStep.append(model)
......
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