Commit 3301bc0c authored by Steven杜宇's avatar Steven杜宇

// 预约

parent 70648f27
......@@ -73,6 +73,16 @@ class YHResignHaveAppointedApplicantsInfoCell: UITableViewCell {
return view
}()
lazy var leaveHKSwithView: YHResignLeaveHKSwitchItemView = {
let view = YHResignLeaveHKSwitchItemView()
view.title = "暂不离港"
view.switchBtn.isUserInteractionEnabled = false
view.switchBtn.isOn = true
view.switchBtn.alpha = 0.3
view.selectBlock = nil
return view
}()
required init?(coder: NSCoder) {
super.init(coder: coder)
}
......@@ -93,7 +103,36 @@ class YHResignHaveAppointedApplicantsInfoCell: UITableViewCell {
}
applicantNamesLabel.text = names
submitTimeView.detail = model.getSubmitHKTime()
leaveHKTimeView.snp.removeConstraints()
leaveHKTimeView.isHidden = model.notleaveHK
leaveHKTimeView.detail = model.getLeaveHKTime()
leaveHKSwithView.snp.removeConstraints()
leaveHKSwithView.isHidden = !model.notleaveHK
if model.notleaveHK { // 暂不离港 显示预约在港递交时间和暂不离港两行
leaveHKSwithView.snp.remakeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(submitTimeView.snp.bottom)
make.bottom.equalTo(0)
}
} else { // 离港 显示预约在港递交时间和预计离港时间两行
leaveHKTimeView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(submitTimeView.snp.bottom).offset(0)
make.bottom.equalTo(0)
}
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
func setupUI() {
......@@ -109,6 +148,7 @@ class YHResignHaveAppointedApplicantsInfoCell: UITableViewCell {
applicantContentView.addSubview(applicantNamesLabel)
whiteContentView.addSubview(submitTimeView)
whiteContentView.addSubview(leaveHKTimeView)
whiteContentView.addSubview(leaveHKSwithView)
whiteContentView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview()
......@@ -159,8 +199,13 @@ class YHResignHaveAppointedApplicantsInfoCell: UITableViewCell {
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(submitTimeView.snp.bottom).offset(0)
make.bottom.equalTo(0)
}
leaveHKSwithView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
make.top.equalTo(leaveHKTimeView.snp.bottom)
make.bottom.equalTo(0)
}
}
}
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