Commit ac26e5dd authored by David黄金龙's avatar David黄金龙

完成 信息完善 列表逻辑

parent 379921ee
......@@ -125,6 +125,7 @@ class YHInformationPerfectListVC: YHBaseViewController {
// @objc func navigationShouldPop() -> Bool
override func navigationShouldPop() -> Bool {
//6-全部填完, 7-已提交
if self.serviceCenterMainReqVM.informationFillStepModel?.step == 6 {
YHSubmitAllInfoCheckView.showCheckView(tipMsg: "你已填完所有信息,是否马上提交?") { agree in
if agree == true {
......@@ -194,7 +195,7 @@ extension YHInformationPerfectListVC {
guard let orderId = orderId else { return}
self.serviceCenterMainReqVM.getPersonInfoFillStep(params: ["orderId":orderId]) { success, error in
if success == true {
if self.serviceCenterMainReqVM.myInfoFillStep > 6 {
if self.serviceCenterMainReqVM.myInfoFillStep == 7 {
self.hasSubmitFlag = true
} else {
self.hasSubmitFlag = false
......@@ -441,8 +442,8 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
private func handleJumpLogic(tapIndex : Int) {
//开发模式下 任意跳转
#if DEBUG
//开发模式下 任意跳转
handleJumpLogicDebug(tapIndex: tapIndex)
return
#endif
......@@ -451,17 +452,17 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
}
private func handleJumpLogicRelease(tapIndex : Int) {
if self.serviceCenterMainReqVM.myInfoFillStep > 6 {
if self.serviceCenterMainReqVM.myInfoFillStep == 7 {
goInfoListVCOp(index:tapIndex)
return
}
if tapIndex <= serviceCenterMainReqVM.myInfoFillStep {
if tapIndex <= serviceCenterMainReqVM.myTargetIndex {
handleJumpLogicDebug(tapIndex: tapIndex)
} else {
//请先完成 xxx 的填写
if serviceCenterMainReqVM.myInfoFillStep < serviceCenterMainReqVM.arrInfoFillStep.count {
let model = serviceCenterMainReqVM.arrInfoFillStep[serviceCenterMainReqVM.myInfoFillStep]
if serviceCenterMainReqVM.myTargetIndex < serviceCenterMainReqVM.arrInfoFillStep.count {
let model = serviceCenterMainReqVM.arrInfoFillStep[serviceCenterMainReqVM.myTargetIndex]
let msg = "请先完成" + model.name + "填写"
YHHUD.flash(message: msg)
}
......@@ -469,13 +470,6 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
}
private func handleJumpLogicDebug(tapIndex : Int) {
if self.serviceCenterMainReqVM.myInfoFillStep > 6 {
goInfoListVCOp(index:tapIndex)
return
}
if tapIndex == 0 {
if self.serviceCenterMainReqVM.informationFillStepModel?.sweet_notify_status == 0 {
self.showTipsAlert()
......@@ -511,7 +505,16 @@ extension YHInformationPerfectListVC : UITableViewDelegate,UITableViewDataSource
vc.orderId = orderId ?? 0
navigationController?.pushViewController(vc)
} else if tapIndex == 5 {
}
else if tapIndex == 5 {
//收入记录
// let vc = YHOtherInfoFillViewController()
// vc.orderId = orderId
// navigationController?.pushViewController(vc)
YHHUD.flash(message: "这里完善 收入记录 跳转逻辑")
}
else if tapIndex == 6 {
//其他信息
let vc = YHOtherInfoFillViewController()
vc.orderId = orderId
......
......@@ -33,7 +33,13 @@ class YHInformationPerfectModel {
} else if type == 4 {
name = "工作经验"
icon = "gzjy_icon"
} else if type == 5 {
}
else if type == 8 {
name = "收入记录"
icon = "srjl_icon"
}
else if type == 5 {
name = "其他信息"
icon = "qtxx_icon"
isLastestCell = true
......
......@@ -19,6 +19,7 @@ class YHServiceCenterMainViewModel: YHBaseViewModel {
//信息完善列表
var arrInfoFillStep : [YHInformationPerfectModel] = []
var myInfoFillStep : Int = 0
var myTargetIndex : Int = -1
var informationFillStepModel : YHPersonInfoFillStepModel?
//我的评分
......@@ -309,28 +310,46 @@ extension YHServiceCenterMainViewModel {
informationFillStepModel = resultModel
myInfoFillStep = resultModel.step
let arr = [0,1,2,3,4,5]
let arr = [0,1,2,3,4,8,5]
let target = myInfoFillStep
for item in arr {
var targetIndex : Int = -1
for (index , item) in arr.enumerated() {
if item == target {
targetIndex = index
}
}
self.myTargetIndex = targetIndex
for (index , item) in arr.enumerated() {
let model = YHInformationPerfectModel()
model.type = item
arrInfoFillStep.append(model)
if item < target {
if targetIndex == -1 {
//已完成6 或者 已提交7
model.isFinished = true
model.isDoing = false
// model.isNextDoingCell = false
} else {
model.isFinished = false
}
if item == target {
model.isDoing = true
if index < targetIndex {
model.isFinished = true
} else {
model.isFinished = false
}
if index == targetIndex {
model.isDoing = true
}
// if item == target + 1 {
// model.isNextDoingCell = true
// } else {
// model.isNextDoingCell = false
// }
}
if item == target + 1 {
model.isNextDoingCell = true
} else {
model.isNextDoingCell = false
}
}
callBackBlock(true,nil)
......
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "Frame@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "Frame@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
{
"images" : [
{
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "收入记录icon@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "收入记录icon@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
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