Commit 5e93d467 authored by Steven杜宇's avatar Steven杜宇

// 信息确认

parent b9b8fd1c
......@@ -178,15 +178,20 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
let vc = YHResignAppointTimeViewController()
vc.renewalId = self.renewalId
if scheduleArr.count > 0 {
let group = scheduleArr[0]
vc.togetherSetting.isCanEdit = false
vc.togetherSetting.is_together = 1
vc.defaultSubmitTime = group.ready_to_submit_at
vc.defaultLeaveHKTime = group.leave_hk_at
vc.allAppointUsers = group.user_list.map {
return $0.transformToMember()
// 先得到所有分批用户的集合
YHHUD.show(.progress(message: "加载中..."))
self.viewModel.getResignAppointUserlist(renewalId: self.renewalId) {
[weak self] success, error in
YHHUD.hide()
guard let self = self else { return }
let group = scheduleArr[0]
vc.togetherSetting.isCanEdit = false
vc.togetherSetting.is_together = 1
vc.defaultSubmitTime = group.ready_to_submit_at
vc.defaultLeaveHKTime = group.leave_hk_at
vc.allAppointUsers = self.viewModel.appointUsers
self.navigationController?.pushViewController(vc)
}
self.navigationController?.pushViewController(vc)
}
return
}
......
......@@ -31,6 +31,7 @@ class YHResignAppointMember: SmartCodable, NSCopying {
var apply_name: String = ""
var stay_deadline: String = ""
var state: String = ""
var stay_deadline_start: String = ""
// 自定义 是否选中
var isSelected: Bool = false
......@@ -39,7 +40,7 @@ class YHResignAppointMember: SmartCodable, NSCopying {
}
init(id: Int, renewal_number: Int, apply_relation: Int, apply_uid: String, apply_name: String, stay_deadline: String, state: String, isSelected: Bool) {
init(id: Int, renewal_number: Int, apply_relation: Int, apply_uid: String, apply_name: String, stay_deadline: String, state: String, stay_deadline_start: String, isSelected: Bool) {
self.id = id
self.renewal_number = renewal_number
......@@ -49,11 +50,12 @@ class YHResignAppointMember: SmartCodable, NSCopying {
self.stay_deadline = stay_deadline
self.state = state
self.isSelected = isSelected
self.stay_deadline_start = stay_deadline_start
}
func copy(with zone: NSZone? = nil) -> Any {
return YHResignAppointMember(id: self.id, renewal_number: self.renewal_number, apply_relation: self.apply_relation, apply_uid: self.apply_uid, apply_name: self.apply_name, stay_deadline: self.stay_deadline, state: self.state, isSelected: self.isSelected)
return YHResignAppointMember(id: self.id, renewal_number: self.renewal_number, apply_relation: self.apply_relation, apply_uid: self.apply_uid, apply_name: self.apply_name, stay_deadline: self.stay_deadline, state: self.state, stay_deadline_start: self.stay_deadline_start, isSelected: self.isSelected)
}
......
......@@ -106,6 +106,7 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell {
}
func updateModel(_ model: YHResignAppointGroup) {
titleLabel.text = "第\(String.convertNumberToChineseText(model.batchIndex))批"
var names = "申请人:"
for (index, user) in model.user_list.enumerated() {
......@@ -141,11 +142,11 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell {
}
}
confirmHKTimeLabel.removeFromSuperview()
confirmHKTimeLabel.snp.removeConstraints()
confirmHKTimeLabel.isHidden = true
if self.confirmHKStatus == .haveConfirmHK { // 已确认在港 需要显示确认在港时间
self.addSubview(confirmHKTimeLabel)
confirmHKTimeLabel.isHidden = false
confirmHKTimeLabel.snp.remakeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
......
......@@ -115,7 +115,7 @@ class YHResignAppointViewModel: NSObject {
func submitConfirmInHK(id: Int, callBack: @escaping (_ success: Bool,_ error: YHErrorModel?)->()) {
let params:[String : Any] = ["id" : id]
let strUrl = YHBaseUrlManager.shared.curURL() + YHAllApiName.ResignAppoint.confirmInHK
let _ = YHNetRequest.getRequest(url: strUrl, params:params) { [weak self] json, code in
let _ = YHNetRequest.postRequest(url: strUrl, params:params) { [weak self] json, code in
//1. json字符串 转 对象
guard let _ = self else { return }
if json.code == 200 {
......
......@@ -91,12 +91,24 @@ class YHResignConfirmInfoListViewController: YHBaseViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
showRiskAlertView()
requestList()
}
@objc func didBottomBtnClicked() {
// 风险弹窗
YHResignRiskWarningAlertView.alertView().show()
}
func showRiskAlertView() {
let isShowKey = "isShowResignConfirmRisk_\(stepId)"
if let isShow = UserDefaults.standard.value(forKey: isShowKey) as? Bool, isShow == true {
} else {
// 风险弹窗
YHResignRiskWarningAlertView.alertView().show()
UserDefaults.standard.set(true, forKey: isShowKey)
UserDefaults.standard.synchronize()
}
}
}
......
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