Commit 013825c6 authored by 刘俊宏's avatar 刘俊宏

详情保证数据

parent ce4779c0
...@@ -36,7 +36,6 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -36,7 +36,6 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
listView.register(UINib(nibName: "TitleAndLblCell", bundle: nil), forCellReuseIdentifier: "TitleAndLblCell") listView.register(UINib(nibName: "TitleAndLblCell", bundle: nil), forCellReuseIdentifier: "TitleAndLblCell")
listView.register(UINib(nibName: "LalamoveBillTableViewCell", bundle: nil), forCellReuseIdentifier: "LalamoveBillTableViewCell") listView.register(UINib(nibName: "LalamoveBillTableViewCell", bundle: nil), forCellReuseIdentifier: "LalamoveBillTableViewCell")
// setPaymentUI(data:datas)
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(loadData), name: NSNotification.Name(rawValue: "HuolalaOrderChange"), object: nil)
...@@ -45,6 +44,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -45,6 +44,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
bottomLheight.constant = 0 bottomLheight.constant = 0
bottomLbl.isHidden = true bottomLbl.isHidden = true
bottomBtn.isHidden = true bottomBtn.isHidden = true
// setPaymentUI(data:datas)
} }
@objc func loadData(){ @objc func loadData(){
...@@ -54,6 +54,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -54,6 +54,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
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 {
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 {
...@@ -62,21 +63,26 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -62,21 +63,26 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
self.bottomLheight.constant = 49 self.bottomLheight.constant = 49
self.bottomLbl.isHidden = false self.bottomLbl.isHidden = false
self.bottomBtn.isHidden = false self.bottomBtn.isHidden = false
self.bottomLbl.text = "取消订单"
case 1: case 1:
print("待装货") print("待装货")
self.bottomLheight.constant = 49 self.bottomLheight.constant = 49
self.bottomLbl.isHidden = false self.bottomLbl.isHidden = false
self.bottomBtn.isHidden = false self.bottomBtn.isHidden = false
self.bottomLbl.text = "取消订单"
case 15: case 15:
print("待装中") print("待装中")
case 7: case 7:
print("运输中") print("运输中")
case 2: case 2:
print("已完成") print("已完成")
if self.dataModel?.order_detail_item?.order_item?.pay_status == 0 {
self.bottomLheight.constant = 49 self.bottomLheight.constant = 49
self.bottomLbl.isHidden = false self.bottomLbl.isHidden = false
self.bottomBtn.isHidden = false self.bottomBtn.isHidden = false
self.bottomLbl.text = "立即支付51.2元" self.bottomLbl.text = "立即支付" + String(format: "%.2f", (self.dataModel?.order_detail_item?.order_item?.price_fen)!) + "元"
}
case 3,4,5: case 3,4,5:
print("已取消") print("已取消")
default: default:
...@@ -85,10 +91,23 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -85,10 +91,23 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
} }
self.listView.reloadData() self.listView.reloadData()
}else {
self.loadData()
}
}) { (error) in }) { (error) in
HUD.hide() HUD.hide()
} }
} }
@IBAction func bottomAction(_ sender: LGButton) {
if bottomLbl.text == "取消订单" {
let vc = HuolalaCancelViewController()
vc.lwbno = lwb_no
self.navigationController?.pushViewController(vc, animated: true)
}else if (bottomLbl.text?.contains("立即支付"))!{
setPaymentUI(data:datas)
}
}
func selectBtmBtnCellBy(index: Int) { func selectBtmBtnCellBy(index: Int) {
switch index { switch index {
case 0: case 0:
......
...@@ -43,6 +43,9 @@ ...@@ -43,6 +43,9 @@
</userDefinedRuntimeAttribute> </userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/> <userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
<connections>
<action selector="bottomAction:" destination="-1" eventType="touchUpInside" id="zkd-LF-I00"/>
</connections>
</view> </view>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="取消订单" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tOa-jF-wGg"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="取消订单" textAlignment="center" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="tOa-jF-wGg">
<rect key="frame" x="0.0" y="813" width="414" height="49"/> <rect key="frame" x="0.0" y="813" width="414" height="49"/>
......
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