Commit 50c12a9b authored by lujunye's avatar lujunye

调整取消订单界面

parent 3800afc7
...@@ -714,13 +714,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -714,13 +714,8 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
@IBAction func selectAction(_ sender: UIButton) { @IBAction func selectAction(_ sender: UIButton) {
if rightBtn == sender { if rightBtn == sender {
hBtnViewH.constant = CGFloat(TabHeight) hBtnViewH.constant = CGFloat(TabHeight)
if adrDatas.count == 0{ if adrDatas.count == 0{
HUD.flash(.progress) HUD.flash(.progress)
cityList(["user_token":UserToken as Any,"nonce_str":String.randomStr(len: 30) as Any], success: { (data) in cityList(["user_token":UserToken as Any,"nonce_str":String.randomStr(len: 30) as Any], success: { (data) in
let model = data as! cityListModel let model = data as! cityListModel
...@@ -734,7 +729,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -734,7 +729,6 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
self.getUICarList() self.getUICarList()
HUD.hide() HUD.hide()
}) { (err) in} }) { (err) in}
}else{ }else{
if isAlready { if isAlready {
getUICarList() getUICarList()
...@@ -746,19 +740,14 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie ...@@ -746,19 +740,14 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
locBtn.isUserInteractionEnabled = true locBtn.isUserInteractionEnabled = true
} }
} }
}else{ }else{
print("adrDatas.count5",adrDatas.count,isAlready)
locBtn.isUserInteractionEnabled = false locBtn.isUserInteractionEnabled = false
rightBtn.isSelected = false rightBtn.isSelected = false
leftBtn.isSelected = true leftBtn.isSelected = true
lineV.frame.origin.x = 0 lineV.frame.origin.x = 0
hllView.isHidden = true hllView.isHidden = true
closeCarList() closeCarList()
} }
} }
......
...@@ -256,7 +256,7 @@ class HuolalaCancelViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -256,7 +256,7 @@ class HuolalaCancelViewController: BaseViewController ,UITableViewDelegate,UITab
orderLalamoveCancel(dict, success: { (data) in orderLalamoveCancel(dict, success: { (data) in
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "HuolalaOrderChange"), object: nil) NotificationCenter.default.post(name: NSNotification.Name(rawValue: "HuolalaOrderChange"), object: "isCancel")
HUD.flash(.labeledSubSuccess(subtitle: "取消成功"),delay: 1.2) HUD.flash(.labeledSubSuccess(subtitle: "取消成功"),delay: 1.2)
......
...@@ -38,7 +38,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -38,7 +38,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
loadData() loadData()
if !isYDBc { if !isYDBc {
NotificationCenter.default.addObserver(self, selector: #selector(loadData), name: NSNotification.Name(rawValue: "HuolalaOrderChange"), object: nil) NotificationCenter.default.addObserver(self, selector: #selector(getNoti(noti:)), name: NSNotification.Name(rawValue: "HuolalaOrderChange"), object: nil)
} }
bottomLheight.constant = 0 bottomLheight.constant = 0
...@@ -46,16 +46,33 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -46,16 +46,33 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
bottomBtn.isHidden = true bottomBtn.isHidden = true
} }
var notiObj = ""
@objc func getNoti(noti:Notification){
notiObj = noti.object as! String
print("abc == ",notiObj)
loadData()
}
@objc func loadData(){ @objc func loadData(){
indexNext = 0 indexNext = 0
HUD.show(.progress) HUD.show(.progress)
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
bottomLheight.constant = 0
bottomLbl.isHidden = true
bottomBtn.isHidden = true
getHllOrderDetails(["user_token":UserToken as Any,"lwb_no":lwb_no as Any], success: { (data) in getHllOrderDetails(["user_token":UserToken as Any,"lwb_no":lwb_no as Any], success: { (data) in
HUD.hide() HUD.hide()
let model = data as! getHllOrderDetailsModel let model = data as! getHllOrderDetailsModel
if model.data?.order_detail_item != nil { if model.data?.order_detail_item != nil {
if (model.data?.order_detail_item?.order_item?.order_status == 0 || model.data?.order_detail_item?.order_item?.order_status == 1) && self.notiObj.count > 0 {
self.loadData()
return
}
self.notiObj = ""
self.dataModel = model.data! self.dataModel = model.data!
if !self.isYDBc { if !self.isYDBc {
switch self.dataModel?.order_detail_item?.order_item?.order_status { switch self.dataModel?.order_detail_item?.order_item?.order_status {
case 0: case 0:
......
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