Commit 02c23b49 authored by lujunye's avatar lujunye

asdfsadfasf232323dasdf

parent 07f30b2b
...@@ -17,7 +17,7 @@ import IQKeyboardManagerSwift ...@@ -17,7 +17,7 @@ import IQKeyboardManagerSwift
class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,JiTuoWuXinXiViewDelegate,JiPaiFangShiViewControllerDelegate,ZengZhiServicesViewControllerDelegate,AdressSelectCellDelegate,DZGLViewControllerDelegate,XinZengDiZhiViewControllerDelegate,TitleAndTFBtnCellDelegate,WenDuCellDelegate,LogisticalSelectViewDelegate, UIPickerViewDataSource, UIPickerViewDelegate, GLAlertSelectViewDelegate,CLLocationManagerDelegate, CityListViewControllerDelegate,ToAndFormSelectViewControllerDelegate,WayBillAddressCanDelItemCellDelegate,HLLTopCellDelegate,OtherDemandViewControllerDelegate,OnlyViewCellDelegate, XiaDanUserInfoViewControllerDelegate, P_P_H_Time_Select_View_Delegate{ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,JiTuoWuXinXiViewDelegate,JiPaiFangShiViewControllerDelegate,ZengZhiServicesViewControllerDelegate,AdressSelectCellDelegate,DZGLViewControllerDelegate,XinZengDiZhiViewControllerDelegate,TitleAndTFBtnCellDelegate,WenDuCellDelegate,LogisticalSelectViewDelegate, UIPickerViewDataSource, UIPickerViewDelegate, GLAlertSelectViewDelegate,CLLocationManagerDelegate, CityListViewControllerDelegate,ToAndFormSelectViewControllerDelegate,WayBillAddressCanDelItemCellDelegate,HLLTopCellDelegate,OtherDemandViewControllerDelegate,OnlyViewCellDelegate, XiaDanUserInfoViewControllerDelegate, P_P_H_Time_Select_View_Delegate{
var isPPH = false
//MARK: - 拼拼货 //MARK: - 拼拼货
var pph_time = "" var pph_time = ""
func P_P_H_Time_Select_View_Time_Select(time: String) { func P_P_H_Time_Select_View_Time_Select(time: String) {
...@@ -357,11 +357,22 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -357,11 +357,22 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
func HLLTopCellScrollIdx(idx: Int) { func HLLTopCellScrollIdx(idx: Int) {
if isPPH {
pph_selectCarType = idx
pph_showScrollUI()
return
}
selectCarType = idx selectCarType = idx
showScrollUI() showScrollUI()
} }
func HLLTopCellBtnClick(idx: Int) { func HLLTopCellBtnClick(idx: Int) {
print("abc == ",idx)
if isPPH {
pph_selectCarType = idx
pph_showScrollUI()
return
}
selectCarType = idx selectCarType = idx
showScrollUI() showScrollUI()
} }
...@@ -885,6 +896,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -885,6 +896,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
@IBAction func selectAction(_ sender: UIButton) { @IBAction func selectAction(_ sender: UIButton) {
closeCarList() closeCarList()
isPPH = false
pph_closeCarList() pph_closeCarList()
lineV.frame.origin.x = fullScreenWidth * 0.333 * CGFloat(sender.tag) lineV.frame.origin.x = fullScreenWidth * 0.333 * CGFloat(sender.tag)
if rightBtn == sender {//货拉拉 if rightBtn == sender {//货拉拉
...@@ -935,6 +947,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -935,6 +947,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
hllView.isHidden = true hllView.isHidden = true
}else{//拼拼货 }else{//拼拼货
isPPH = true
rightBtn.isSelected = false rightBtn.isSelected = false
leftBtn.isSelected = false leftBtn.isSelected = false
pin_pin_huo.isSelected = true pin_pin_huo.isSelected = true
...@@ -2666,7 +2679,23 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -2666,7 +2679,23 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
} }
@objc func carSelect(sender:UIButton){ @objc func carSelect(sender:UIButton){
if isPPH {
let btn = pph_btnArr[sender.tag]
pph_topBtnClick(btn: btn)
pph_closeCarList()
let idx = IndexPath(row: 0, section: 0)
let cell = pph_listView.cellForRow(at:idx) as! HLLTopCell
let w = cell.scViewBg.bounds.size.width
cell.scrollView?.setContentOffset(CGPoint(x: sender.tag * Int(w), y: 0), animated: true)
cell.idx = sender.tag
let x = btn.frame.minX
let rect = CGRect(x: Int(x), y: 0, width: Int(w), height: 1)
pph_topBtnScv.scrollRectToVisible(rect, animated: true)
pph_selectCarType = sender.tag
return
}
let btn = btnArr[sender.tag] let btn = btnArr[sender.tag]
topBtnClick(btn: btn) topBtnClick(btn: btn)
closeCarList() closeCarList()
......
...@@ -30,11 +30,20 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate { ...@@ -30,11 +30,20 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate {
leftBtn.isHidden = true leftBtn.isHidden = true
} }
}else{ }else{
if idx < datas.count - 1 { if isPPH {
idx += 1 if idx < pph_datas.count - 1 {
} idx += 1
if idx == datas.count - 1 { }
rightBtn.isHidden = true if idx == pph_datas.count - 1 {
rightBtn.isHidden = true
}
}else{
if idx < datas.count - 1 {
idx += 1
}
if idx == datas.count - 1 {
rightBtn.isHidden = true
}
} }
} }
...@@ -48,8 +57,14 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate { ...@@ -48,8 +57,14 @@ class HLLTopCell: UITableViewCell,UIScrollViewDelegate {
if idx < 0 { if idx < 0 {
idx = 0 idx = 0
} }
if idx > datas.count - 1 { if isPPH {
idx = datas.count - 1 if idx > pph_datas.count - 1 {
idx = pph_datas.count - 1
}
}else{
if idx > datas.count - 1 {
idx = datas.count - 1
}
} }
delegate?.HLLTopCellScrollIdx(idx:idx) delegate?.HLLTopCellScrollIdx(idx:idx)
} }
......
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