Commit 4b0f09f8 authored by Steven杜宇's avatar Steven杜宇

// 赴港办证预约

parent 8fa3be52
...@@ -247,7 +247,7 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa ...@@ -247,7 +247,7 @@ extension YHCertificateAppointViewController: UITableViewDelegate, UITableViewDa
if item.type == .grabingNumberBatch { if item.type == .grabingNumberBatch {
// 赴港办理抢号中批次 // 赴港办理抢号中批次
let cell = tableView.dequeueReusableCell(withIdentifier: YHGrabingNumberListCell.cellReuseIdentifier, for: indexPath) as! YHGrabingNumberListCell let cell = tableView.dequeueReusableCell(withIdentifier: YHGrabingNumberListCell.cellReuseIdentifier, for: indexPath) as! YHGrabingNumberListCell
cell.listArr = self.waitList
return cell return cell
} }
......
...@@ -12,7 +12,7 @@ class YHGrabFileCell: UICollectionViewCell { ...@@ -12,7 +12,7 @@ class YHGrabFileCell: UICollectionViewCell {
static let cellReuseIdentifier = "YHGrabFileCell" static let cellReuseIdentifier = "YHGrabFileCell"
lazy var selectImgView:UIImageView = { lazy var fileImgView:UIImageView = {
let view = UIImageView(image: UIImage(named: "")) let view = UIImageView(image: UIImage(named: ""))
return view return view
}() }()
...@@ -30,5 +30,9 @@ class YHGrabFileCell: UICollectionViewCell { ...@@ -30,5 +30,9 @@ class YHGrabFileCell: UICollectionViewCell {
self.layer.cornerRadius = 5.0 self.layer.cornerRadius = 5.0
self.layer.borderWidth = 0.5 self.layer.borderWidth = 0.5
self.layer.borderColor = UIColor.init(hex: 0xD8D8D8).cgColor self.layer.borderColor = UIColor.init(hex: 0xD8D8D8).cgColor
self.addSubview(fileImgView)
fileImgView.snp.makeConstraints { make in
make.edges.equalToSuperview()
}
} }
} }
...@@ -89,8 +89,10 @@ class YHGrabNumberInfoItemView: UIView { ...@@ -89,8 +89,10 @@ class YHGrabNumberInfoItemView: UIView {
make.height.equalTo(0) make.height.equalTo(0)
} }
} }
self.setNeedsLayout() self.setNeedsLayout()
self.layoutIfNeeded() self.layoutIfNeeded()
} }
lazy var dotView: UIView = { lazy var dotView: UIView = {
...@@ -267,7 +269,7 @@ extension YHGrabNumberInfoItemView: UICollectionViewDelegate, UICollectionViewDa ...@@ -267,7 +269,7 @@ extension YHGrabNumberInfoItemView: UICollectionViewDelegate, UICollectionViewDa
func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell { func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHGrabFileCell.cellReuseIdentifier, for: indexPath) as! YHGrabFileCell let cell = collectionView.dequeueReusableCell(withReuseIdentifier: YHGrabFileCell.cellReuseIdentifier, for: indexPath) as! YHGrabFileCell
if 0 <= indexPath.item && indexPath.item < item.files.count { if 0 <= indexPath.item && indexPath.item < item.files.count {
let applicant = item.files[indexPath.item] let url = item.files[indexPath.item]
} }
return cell return cell
......
...@@ -11,8 +11,48 @@ import UIKit ...@@ -11,8 +11,48 @@ import UIKit
class YHGrabingNumberListCell: UITableViewCell { class YHGrabingNumberListCell: UITableViewCell {
static let cellReuseIdentifier = "YHGrabingNumberListCell" static let cellReuseIdentifier = "YHGrabingNumberListCell"
var listArr: [YHAppointMemberGroupModel] = [] {
didSet {
listContainView.removeSubviews()
var lastView: YHHaveGrabbedNumberInfoView? = nil
for (index, group) in listArr.enumerated() {
let listView = YHHaveGrabbedNumberInfoView(frame: .zero)
let chineseNum = convertNumberToChineseText(index+1)
listView.titleLabel.text = "第\(chineseNum)批"
listView.membersLabel.text = "成员:\(group.getMemberNames())"
// 抢号信息
let items1 = [YHGrabItem(type: .grab, title: "赴港时间:", detail: "抢号中"),
YHGrabItem(type: .grab, title: "香港入境处:", detail: "抢号中"),
YHGrabItem(type: .grab, title: "抢号反馈回执:", detail: "抢号中"),]
listView.grabInfoView.updateItems(items1)
// 意向信息
let items2 = [YHGrabItem(type: .info, title: "期望赴港时间:", detail: "\(group.wantMinTime)~\(group.wantMaxTime)"),
YHGrabItem(type: .info, title: "期望香港办证点:", detail: group.wantImmigrationOffice)]
listView.intentionInfoView.updateItems(items2)
var items:[String] = ["", ""] listContainView.addSubview(listView)
listView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
if let last = lastView {
make.top.equalTo(last.snp.bottom).offset(16)
} else {
make.top.equalTo(listContainView.snp.top)
}
if index == listArr.count-1 {
make.bottom.equalTo(-16)
}
}
lastView = listView
}
self.setNeedsLayout()
self.layoutIfNeeded()
}
}
lazy var whiteContentView: UIView = { lazy var whiteContentView: UIView = {
let view = UIView() let view = UIView()
...@@ -36,6 +76,11 @@ class YHGrabingNumberListCell: UITableViewCell { ...@@ -36,6 +76,11 @@ class YHGrabingNumberListCell: UITableViewCell {
return label return label
}() }()
lazy var listContainView: UIView = {
let view = UIView()
return view
}()
required init?(coder: NSCoder) { required init?(coder: NSCoder) {
super.init(coder: coder) super.init(coder: coder)
} }
...@@ -53,6 +98,8 @@ class YHGrabingNumberListCell: UITableViewCell { ...@@ -53,6 +98,8 @@ class YHGrabingNumberListCell: UITableViewCell {
contentView.addSubview(whiteContentView) contentView.addSubview(whiteContentView)
whiteContentView.addSubview(titleLabel) whiteContentView.addSubview(titleLabel)
whiteContentView.addSubview(lineView) whiteContentView.addSubview(lineView)
whiteContentView.addSubview(listContainView)
whiteContentView.snp.makeConstraints { make in whiteContentView.snp.makeConstraints { make in
make.top.equalTo(16) make.top.equalTo(16)
...@@ -73,27 +120,9 @@ class YHGrabingNumberListCell: UITableViewCell { ...@@ -73,27 +120,9 @@ class YHGrabingNumberListCell: UITableViewCell {
make.height.equalTo(0.5) make.height.equalTo(0.5)
} }
var lastView: YHGrabingNumberListView? = nil listContainView.snp.makeConstraints { make in
for (index, _) in items.enumerated() { make.top.equalTo(lineView.snp.bottom).offset(0)
let listView = YHGrabingNumberListView(frame: .zero) make.left.right.bottom.equalToSuperview()
let chineseNum = convertNumberToChineseText(index+1)
listView.titleLabel.text = "第\(chineseNum)批"
listView.membersLabel.text = "成员:刘德华德成员:刘德华德、刘德华德、刘德华德、刘德华德、刘德华德、刘德华德、刘德华德、刘德华德、刘德华德"
whiteContentView.addSubview(listView)
listView.snp.makeConstraints { make in
make.left.equalTo(18)
make.right.equalTo(-18)
if let last = lastView {
make.top.equalTo(last.snp.bottom)
} else {
make.top.equalTo(lineView.snp.bottom)
}
if index == items.count-1 {
make.bottom.equalTo(-16)
}
}
lastView = listView
} }
} }
......
...@@ -29,7 +29,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell { ...@@ -29,7 +29,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell {
listView.grabInfoView.updateItems(items1) listView.grabInfoView.updateItems(items1)
// 意向信息 // 意向信息
let items2 = [YHGrabItem(type: .info, title: "期望赴港时间:", detail: "\(group.wantMinTime)-\(group.wantMaxTime)"), let items2 = [YHGrabItem(type: .info, title: "期望赴港时间:", detail: "\(group.wantMinTime)~\(group.wantMaxTime)"),
YHGrabItem(type: .info, title: "期望香港办证点:", detail: group.wantImmigrationOffice)] YHGrabItem(type: .info, title: "期望香港办证点:", detail: group.wantImmigrationOffice)]
listView.intentionInfoView.updateItems(items2) listView.intentionInfoView.updateItems(items2)
...@@ -38,7 +38,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell { ...@@ -38,7 +38,7 @@ class YHHaveGrabbedNumberListCell: UITableViewCell {
make.left.equalTo(18) make.left.equalTo(18)
make.right.equalTo(-18) make.right.equalTo(-18)
if let last = lastView { if let last = lastView {
make.top.equalTo(last.snp.bottom) make.top.equalTo(last.snp.bottom).offset(16)
} else { } else {
make.top.equalTo(listContainView.snp.top) make.top.equalTo(listContainView.snp.top)
} }
......
...@@ -355,7 +355,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource { ...@@ -355,7 +355,7 @@ extension YHMyViewController : UITableViewDelegate, UITableViewDataSource {
// } // }
let vc = YHCertificateAppointViewController() let vc = YHCertificateAppointViewController()
vc.orderId = 151090 vc.orderId = 151085
self.navigationController?.pushViewController(vc) self.navigationController?.pushViewController(vc)
return return
} }
......
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