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

// 行程

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