Commit fef0a621 authored by lujunye's avatar lujunye

asdfasdfasdf433234

parent 7998d979
......@@ -15,21 +15,37 @@ import SDWebImage
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,P_P_H_Adr_VC_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,P_P_H_Adr_VC_Delegate, Suc_LOG_Cell_Delegate{
func Suc_LOG_Cell_Add_Action(cell: Suc_LOG_Cell,isSend:Bool) {
let vc = P_P_H_Adr_VC()
vc.isSend = isSend
vc.delegate = self
vc.idx = cell.tag + 1
self.navigationController?.pushViewController(vc, animated: true)
}
func P_P_H_Adr_VC_Data(adrData: addPinPinOrder_adrInfo, isSend: Bool, idx: Int) {
if isSend {
if pph_send_arr.count == 0 {
pph_send_arr.append(adrData)
}else{
pph_send_arr.insert(adrData, at: idx)
pph_send_arr.remove(at: idx + 1)
if idx > pph_send_arr.count - 1 {
pph_send_arr.append(adrData)
}else{
pph_send_arr.insert(adrData, at: idx)
pph_send_arr.remove(at: idx + 1)
}
}
}else{
if pph_receive_arr.count == 0 {
pph_receive_arr.append(adrData)
}else{
pph_receive_arr.insert(adrData, at: idx)
pph_receive_arr.remove(at: idx + 1)
if idx > pph_receive_arr.count - 1 {
pph_receive_arr.append(adrData)
}else{
pph_receive_arr.insert(adrData, at: idx)
pph_receive_arr.remove(at: idx + 1)
}
}
}
pph_listView.reloadData()
......@@ -1224,7 +1240,7 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
//MARK: - 拼拼货
pph_listView.backgroundColor = UIColor(named: "app底色")
pph_listView.separatorStyle = .none
pph_listView.register(UINib(nibName: "HLLTopCell", bundle: nil), forCellReuseIdentifier: "HLLTopCell")
pph_listView.register(UINib(nibName: "OnlyViewCell", bundle: nil), forCellReuseIdentifier: "OnlyViewCell")
pph_listView.register(UINib(nibName: "TitleAndBtnCell", bundle: nil), forCellReuseIdentifier: "TitleAndBtnCell")
......@@ -1669,8 +1685,16 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
if tableView == pph_listView {
switch section {
case 0:return 1
case 1:return 1
case 2:return 1
case 1:
if pph_send_arr.count == 0 {
return 1
}
return pph_send_arr.count
case 2:
if pph_receive_arr.count == 0 {
return 1
}
return pph_receive_arr.count
case 3:return 1
case 4:return 2
case 5:return 1
......@@ -1730,8 +1754,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
vc.idx = indexPath.row
if pph_send_arr.count != 0 {
let model = pph_send_arr[indexPath.row]
print(model.province_name)
vc.adrInfo = model
}
self.navigationController?.pushViewController(vc, animated: true)
......@@ -2040,7 +2062,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.contentV.isHidden = false
cell.nameLbl.text = sender!
cell.phoneLbl.text = sendPhone!
print("SENDER == ",sendAdr)
cell.adrLbl.text = showSendAdr
}
}
......@@ -2259,6 +2280,11 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
if indexPath.section == 1 {
let cell = tableView.dequeueReusableCell(withIdentifier: "Suc_LOG_Cell") as! Suc_LOG_Cell
cell.delegate = self
cell.status_lbl.text = "装"
cell.status_lbl.backgroundColor = UIColor(named: "green")
cell.tag = indexPath.row
cell.isSend = true
if indexPath.row == 0 {
cell.top_line.isHidden = true
}
......@@ -2274,12 +2300,16 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.commend_lbl.text = model.note
if indexPath.row == pph_send_arr.count - 1 {
cell.add_btn.isHidden = false
}else{
cell.add_btn.isHidden = true
}
}
return cell
}
if indexPath.section == 2 {
let cell = tableView.dequeueReusableCell(withIdentifier: "Suc_LOG_Cell") as! Suc_LOG_Cell
cell.delegate = self
cell.tag = indexPath.row
cell.status_lbl.text = "卸"
cell.status_lbl.backgroundColor = UIColor(named: "#FAA376")
if indexPath.row == 0 {
......@@ -2298,6 +2328,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
cell.commend_lbl.text = model.note
if indexPath.row == pph_receive_arr.count - 1 {
cell.add_btn.isHidden = false
}else{
cell.add_btn.isHidden = true
}
}
return cell
......
......@@ -8,16 +8,17 @@
import UIKit
protocol Suc_LOG_Cell_Delegate {
func Suc_LOG_Cell_Add_Action(cell:Suc_LOG_Cell)
func Suc_LOG_Cell_Add_Action(cell:Suc_LOG_Cell,isSend:Bool)
}
class Suc_LOG_Cell: UITableViewCell {
@IBOutlet weak var holder_lbl: UILabel!
var delegate:Suc_LOG_Cell_Delegate?
@IBAction func add_action(_ sender: UIButton) {
if add_btn.isHidden == false {
delegate?.Suc_LOG_Cell_Add_Action(cell: self)
delegate?.Suc_LOG_Cell_Add_Action(cell: self,isSend: isSend)
}
}
var isSend = false
@IBOutlet weak var add_btn: UILabel!
@IBOutlet weak var commend_lbl: UILabel!
@IBOutlet weak var adr_lbl: UILabel!
......
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