Commit 6a62c7ec authored by Steven杜宇's avatar Steven杜宇

// 行程

parent e0aee03d
...@@ -118,14 +118,20 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController { ...@@ -118,14 +118,20 @@ class YHResignAppointSubmitScheduleViewController: YHBaseViewController {
guard let self = self else { return } guard let self = self else { return }
if isConfirm { if isConfirm {
// 去修改预约递交时间 // 去修改预约递交时间
YHHUD.flash(message: "去修改预约递交时间")
} }
} }
alert.show() alert.show()
} else if status == .canConfirmHK { // 可点击确认在港 } else if status == .canConfirmHK { // 可点击确认在港
YHHUD.flash(message: "请求提交确认在港")
} }
} }
// 修改行程
@objc func modifySchedule() {
}
} }
extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITableViewDataSource { extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITableViewDataSource {
...@@ -146,8 +152,14 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa ...@@ -146,8 +152,14 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa
guard let self = self else { return } guard let self = self else { return }
self.clickConfirmHKButton(status: status) self.clickConfirmHKButton(status: status)
} }
cell.modifyBtnBlock = {
[weak self] in
guard let self = self else { return }
self.modifySchedule()
}
return cell return cell
} }
// 分组 // 分组
let cell2 = tableView.dequeueReusableCell(withIdentifier: YHResignHaveAppointedMultipleInfoCell.cellReuseIdentifier, for: indexPath) as! YHResignHaveAppointedMultipleInfoCell let cell2 = tableView.dequeueReusableCell(withIdentifier: YHResignHaveAppointedMultipleInfoCell.cellReuseIdentifier, for: indexPath) as! YHResignHaveAppointedMultipleInfoCell
model.batchIndex = indexPath.row+1 model.batchIndex = indexPath.row+1
...@@ -157,6 +169,8 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa ...@@ -157,6 +169,8 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa
guard let self = self else { return } guard let self = self else { return }
self.clickConfirmHKButton(status: status) self.clickConfirmHKButton(status: status)
} }
let isShowCorner = (indexPath.row == scheduleArr.count-1)
cell2.showBottomCorner(isShowCorner)
return cell2 return cell2
} }
let defaultCell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath) let defaultCell = tableView.dequeueReusableCell(withIdentifier: "UITableViewCell", for: indexPath)
...@@ -170,7 +184,7 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa ...@@ -170,7 +184,7 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa
func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) { func tableView(_ tableView: UITableView, didSelectRowAt indexPath: IndexPath) {
if 0 <= indexPath.row && indexPath.row < scheduleArr.count { if 0 <= indexPath.row && indexPath.row < scheduleArr.count {
let model = scheduleArr[indexPath.row] // let model = scheduleArr[indexPath.row]
} }
} }
...@@ -197,27 +211,31 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa ...@@ -197,27 +211,31 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa
} }
let view = UIView() let view = UIView()
let whiteContentView = UIView() view.clipsToBounds = true
view.addSubview(whiteContentView)
let whiteView = UIView()
whiteView.backgroundColor = .white
whiteView.layer.cornerRadius = kCornerRadius6
view.addSubview(whiteView)
let titleLabel = UILabel() let titleLabel = UILabel()
titleLabel.numberOfLines = 0 titleLabel.numberOfLines = 0
titleLabel.font = UIFont.PFSC_M(ofSize: 17) titleLabel.font = UIFont.PFSC_M(ofSize: 17)
titleLabel.textColor = .mainTextColor titleLabel.textColor = .mainTextColor
titleLabel.text = "赴港递交已预约" titleLabel.text = "赴港递交已预约"
whiteContentView.addSubview(titleLabel) view.addSubview(titleLabel)
let modifyBtn = UIButton() let modifyBtn = UIButton()
modifyBtn.setTitle("修改", for: .normal) modifyBtn.setTitle("修改", for: .normal)
modifyBtn.setTitleColor(.brandMainColor, for: .normal) modifyBtn.setTitleColor(.brandMainColor, for: .normal)
modifyBtn.titleLabel?.font = .PFSC_M(ofSize: 14) modifyBtn.titleLabel?.font = .PFSC_M(ofSize: 14)
whiteContentView.addSubview(modifyBtn) modifyBtn.addTarget(self, action: #selector(modifySchedule), for: .touchUpInside)
view.addSubview(modifyBtn)
whiteContentView.snp.makeConstraints { make in whiteView.snp.makeConstraints { make in
make.top.equalTo(0) make.left.right.top.equalToSuperview()
make.left.equalTo(0) make.bottom.equalTo(kCornerRadius6)
make.right.equalTo(0)
make.bottom.equalTo(-16)
} }
titleLabel.snp.makeConstraints { make in titleLabel.snp.makeConstraints { make in
...@@ -225,6 +243,7 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa ...@@ -225,6 +243,7 @@ extension YHResignAppointSubmitScheduleViewController: UITableViewDelegate, UITa
make.left.equalTo(18) make.left.equalTo(18)
make.right.equalTo(-18) make.right.equalTo(-18)
make.height.equalTo(24) make.height.equalTo(24)
make.bottom.equalTo(-12)
} }
modifyBtn.snp.makeConstraints { make in modifyBtn.snp.makeConstraints { make in
......
...@@ -83,6 +83,8 @@ class YHResignAppointedScheduleLineView: UIView { ...@@ -83,6 +83,8 @@ class YHResignAppointedScheduleLineView: UIView {
func createUI() { func createUI() {
self.backgroundColor = .init(hex: 0xF8F9FB) self.backgroundColor = .init(hex: 0xF8F9FB)
self.layer.cornerRadius = 4.0
self.clipsToBounds = true
self.addSubview(collectView) self.addSubview(collectView)
collectView.reloadData() collectView.reloadData()
collectView.snp.makeConstraints { make in collectView.snp.makeConstraints { make in
......
...@@ -14,6 +14,14 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell { ...@@ -14,6 +14,14 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell {
var confirmHKStatus: YHResignConfirmHKStatus = .waitConfirmHK var confirmHKStatus: YHResignConfirmHKStatus = .waitConfirmHK
var clickConfirmBtnBlock: ((YHResignConfirmHKStatus)->())? var clickConfirmBtnBlock: ((YHResignConfirmHKStatus)->())?
lazy var whiteCornerView: UIView = {
let view = UIView()
view.backgroundColor = .white
view.layer.cornerRadius = kCornerRadius6
view.clipsToBounds = true
return view
}()
lazy var lineView: UIView = { lazy var lineView: UIView = {
let view = UIView() let view = UIView()
...@@ -205,20 +213,25 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell { ...@@ -205,20 +213,25 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell {
func createUI() { func createUI() {
self.selectionStyle = .none self.selectionStyle = .none
self.backgroundColor = .white self.backgroundColor = .clear
self.contentView.backgroundColor = .white contentView.backgroundColor = .clear
self.contentView.layer.cornerRadius = kCornerRadius6 contentView.clipsToBounds = true
contentView.addSubview(whiteCornerView)
contentView.addSubview(lineView)
contentView.addSubview(markView)
contentView.addSubview(titleLabel)
contentView.addSubview(confirmInHKBtn)
contentView.addSubview(haveConfirmInHKLabel)
contentView.addSubview(confirmHKTimeLabel)
contentView.addSubview(applicantNamesLabel)
contentView.addSubview(submitTimeLabel)
contentView.addSubview(confirmHKTimeLabel)
contentView.addSubview(scheduleView)
self.addSubview(lineView) whiteCornerView.snp.makeConstraints { make in
self.addSubview(markView) make.top.equalTo(-kCornerRadius6)
self.addSubview(titleLabel) make.left.right.bottom.equalToSuperview()
self.addSubview(confirmInHKBtn) }
self.addSubview(haveConfirmInHKLabel)
self.addSubview(confirmHKTimeLabel)
self.addSubview(applicantNamesLabel)
self.addSubview(submitTimeLabel)
self.addSubview(confirmHKTimeLabel)
self.addSubview(scheduleView)
lineView.snp.makeConstraints { make in lineView.snp.makeConstraints { make in
make.left.right.top.equalToSuperview() make.left.right.top.equalToSuperview()
...@@ -279,5 +292,10 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell { ...@@ -279,5 +292,10 @@ class YHResignHaveAppointedMultipleInfoCell: UITableViewCell {
make.bottom.equalTo(-18) make.bottom.equalTo(-18)
} }
} }
func showBottomCorner(_ isShow: Bool) {
whiteCornerView.layer.cornerRadius = (isShow ? kCornerRadius6 : 0)
whiteCornerView.clipsToBounds = true
}
} }
...@@ -19,6 +19,7 @@ class YHResignHaveAppointedSingleInfoCell: UITableViewCell { ...@@ -19,6 +19,7 @@ class YHResignHaveAppointedSingleInfoCell: UITableViewCell {
static let cellReuseIdentifier = "YHResignHaveAppointedSingleInfoCell" static let cellReuseIdentifier = "YHResignHaveAppointedSingleInfoCell"
var clickConfirmBtnBlock: ((YHResignConfirmHKStatus)->())? var clickConfirmBtnBlock: ((YHResignConfirmHKStatus)->())?
var modifyBtnBlock: (()->())?
lazy var whiteContentView: UIView = { lazy var whiteContentView: UIView = {
let view = UIView() let view = UIView()
...@@ -41,6 +42,7 @@ class YHResignHaveAppointedSingleInfoCell: UITableViewCell { ...@@ -41,6 +42,7 @@ class YHResignHaveAppointedSingleInfoCell: UITableViewCell {
btn.setTitle("修改", for: .normal) btn.setTitle("修改", for: .normal)
btn.setTitleColor(.brandMainColor, for: .normal) btn.setTitleColor(.brandMainColor, for: .normal)
btn.titleLabel?.font = .PFSC_M(ofSize: 14) btn.titleLabel?.font = .PFSC_M(ofSize: 14)
btn.addTarget(self, action: #selector(didModifyBtnClicked), for: .touchUpInside)
return btn return btn
}() }()
...@@ -67,6 +69,10 @@ class YHResignHaveAppointedSingleInfoCell: UITableViewCell { ...@@ -67,6 +69,10 @@ class YHResignHaveAppointedSingleInfoCell: UITableViewCell {
batchView.updateModel(model) batchView.updateModel(model)
} }
@objc func didModifyBtnClicked() {
modifyBtnBlock?()
}
// dateString1 是否不小于dateString2 // dateString1 是否不小于dateString2
func compareDates(_ dateString1: String, _ dateString2: String) -> Bool { func compareDates(_ dateString1: String, _ dateString2: String) -> Bool {
let dateFormatter = DateFormatter() let dateFormatter = DateFormatter()
......
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