Commit b5c4c742 authored by 刘俊宏's avatar 刘俊宏

调整详情

parent 7e5d5f85
...@@ -12,7 +12,7 @@ import LGButton ...@@ -12,7 +12,7 @@ import LGButton
class HuolalaCancelViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource{ class HuolalaCancelViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource{
@IBOutlet weak var bottomLbl: UILabel! @IBOutlet weak var bottomLbl: UILabel!
var lwbno = "203920109087" var lwbno = ""
var isShowIndex = 0 var isShowIndex = 0
var selectID = 81338860 var selectID = 81338860
var reason_id = 0 var reason_id = 0
......
...@@ -7,9 +7,14 @@ ...@@ -7,9 +7,14 @@
// //
import UIKit import UIKit
import LGButton
class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource,BtmBtnCellDelegate{ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITableViewDataSource,BtmBtnCellDelegate{
@IBOutlet weak var bottomLheight: NSLayoutConstraint!
@IBOutlet weak var bottomLbl: UILabel!
@IBOutlet weak var bottomBtn: LGButton!
//测试数据 //测试数据
var isYDBc = false var isYDBc = false
var lwb_no = "" var lwb_no = ""
...@@ -36,6 +41,10 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -36,6 +41,10 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
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)
} }
bottomLheight.constant = 0
bottomLbl.isHidden = true
bottomBtn.isHidden = true
} }
@objc func loadData(){ @objc func loadData(){
...@@ -46,6 +55,32 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -46,6 +55,32 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
HUD.hide() HUD.hide()
let model = data as! getHllOrderDetailsModel let model = data as! getHllOrderDetailsModel
self.dataModel = model.data! self.dataModel = model.data!
switch self.dataModel?.order_detail_item?.order_item?.order_status {
case 0:
print("等待司机接单")
self.bottomLheight.constant = 49
self.bottomLbl.isHidden = false
self.bottomBtn.isHidden = false
case 1:
print("待装货")
self.bottomLheight.constant = 49
self.bottomLbl.isHidden = false
self.bottomBtn.isHidden = false
case 15:
print("待装中")
case 7:
print("运输中")
case 2:
print("已完成")
self.bottomLheight.constant = 49
self.bottomLbl.isHidden = false
self.bottomBtn.isHidden = false
self.bottomLbl.text = "立即支付51.2元"
case 3,4,5:
print("已取消")
default:
break
}
self.listView.reloadData() self.listView.reloadData()
}) { (error) in }) { (error) in
HUD.hide() HUD.hide()
...@@ -243,7 +278,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -243,7 +278,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
case 8: case 8:
cell.nameLbl.text = "司机添加的额外费用" cell.nameLbl.text = "司机添加的额外费用"
case 15: case 15:
cell.nameLbl.text = "货物保险费用" cell.nameLbl.text = "货物保障(0元最高保5万)"
case 21: case 21:
cell.nameLbl.text = "高速费" cell.nameLbl.text = "高速费"
case 22: case 22:
...@@ -288,17 +323,21 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -288,17 +323,21 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
cell.nameLbl.text = "关联平台:" cell.nameLbl.text = "关联平台:"
if dataModel?.delivery?.sale_plat != nil { if dataModel?.delivery?.sale_plat != nil {
cell.textTF.text = dataModel?.delivery?.sale_plat cell.textTF.text = dataModel?.delivery?.sale_plat
if dataModel?.delivery?.sale_plat?.count == 0 {
cell.textTF.text = "-"
}else{ }
cell.textTF.text = "-"
} }
if indexPath.row == 1 { if indexPath.row == 1 {
cell.nameLbl.text = "关联订单号:" cell.nameLbl.text = "关联订单号:"
if dataModel?.delivery?.order_sn != nil { if dataModel?.delivery?.order_sn != nil {
cell.textTF.text = dataModel?.delivery?.order_sn cell.textTF.text = dataModel?.delivery?.order_sn
}else{ if dataModel?.delivery?.order_sn?.count == 0 {
cell.textTF.text = "-" cell.textTF.text = "-"
}
} }
} }
...@@ -422,6 +461,9 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -422,6 +461,9 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
} }
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat { func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
if section == 2 { if section == 2 {
if dataModel?.order_detail_item?.spec_req_price_arr?.count == 0 {
return 65
}
return 95 return 95
} }
if section == 4 { if section == 4 {
......
...@@ -11,6 +11,9 @@ ...@@ -11,6 +11,9 @@
<objects> <objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WaybillDetailViewController" customModule="TestClass" customModuleProvider="target"> <placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="WaybillDetailViewController" customModule="TestClass" customModuleProvider="target">
<connections> <connections>
<outlet property="bottomBtn" destination="LNV-ad-a6k" id="rgF-Pc-5gw"/>
<outlet property="bottomLbl" destination="tOa-jF-wGg" id="pig-iC-avK"/>
<outlet property="bottomLheight" destination="wN4-bJ-EqO" id="nAJ-44-ZAw"/>
<outlet property="listView" destination="t9e-fZ-mil" id="VdO-Ax-iiU"/> <outlet property="listView" destination="t9e-fZ-mil" id="VdO-Ax-iiU"/>
<outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/> <outlet property="view" destination="i5M-Pr-FkT" id="sfx-zR-JGt"/>
</connections> </connections>
...@@ -21,28 +24,66 @@ ...@@ -21,28 +24,66 @@
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/> <autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<subviews> <subviews>
<tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="t9e-fZ-mil"> <tableView clipsSubviews="YES" contentMode="scaleToFill" alwaysBounceVertical="YES" style="grouped" separatorStyle="none" rowHeight="-1" estimatedRowHeight="-1" sectionHeaderHeight="-1" estimatedSectionHeaderHeight="-1" sectionFooterHeight="-1" estimatedSectionFooterHeight="-1" translatesAutoresizingMaskIntoConstraints="NO" id="t9e-fZ-mil">
<rect key="frame" x="0.0" y="44" width="414" height="852"/> <rect key="frame" x="0.0" y="44" width="414" height="769"/>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<connections> <connections>
<outlet property="dataSource" destination="-1" id="Ue9-ix-Dvl"/> <outlet property="dataSource" destination="-1" id="Ue9-ix-Dvl"/>
<outlet property="delegate" destination="-1" id="g8m-rX-68V"/> <outlet property="delegate" destination="-1" id="g8m-rX-68V"/>
</connections> </connections>
</tableView> </tableView>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="LNV-ad-a6k" customClass="LGButton" customModule="LGButton">
<rect key="frame" x="0.0" y="813" width="414" height="83"/>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<userDefinedRuntimeAttributes>
<userDefinedRuntimeAttribute type="color" keyPath="gradientStartColor">
<color key="value" name="按钮渐变色上"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="color" keyPath="gradientEndColor">
<color key="value" name="按钮渐变色下,字体颜色"/>
</userDefinedRuntimeAttribute>
<userDefinedRuntimeAttribute type="boolean" keyPath="gradientHorizontal" value="YES"/>
</userDefinedRuntimeAttributes>
</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">
<rect key="frame" x="0.0" y="813" width="414" height="49"/>
<constraints>
<constraint firstAttribute="height" constant="49" id="wN4-bJ-EqO"/>
</constraints>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="15"/>
<color key="textColor" name="白色背景色"/>
<nil key="highlightedColor"/>
</label>
</subviews> </subviews>
<color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/> <color key="backgroundColor" systemColor="systemBackgroundColor" cocoaTouchSystemColor="whiteColor"/>
<constraints> <constraints>
<constraint firstItem="t9e-fZ-mil" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="1yK-Aa-n27"/> <constraint firstItem="t9e-fZ-mil" firstAttribute="top" secondItem="fnl-2z-Ty3" secondAttribute="top" id="1yK-Aa-n27"/>
<constraint firstItem="LNV-ad-a6k" firstAttribute="top" secondItem="t9e-fZ-mil" secondAttribute="bottom" id="A7F-HJ-emZ"/>
<constraint firstItem="tOa-jF-wGg" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="Gjb-1p-daE"/>
<constraint firstItem="LNV-ad-a6k" firstAttribute="top" secondItem="tOa-jF-wGg" secondAttribute="top" id="Ikq-ic-j72"/>
<constraint firstItem="t9e-fZ-mil" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="KiF-kF-x0G"/> <constraint firstItem="t9e-fZ-mil" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="KiF-kF-x0G"/>
<constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="t9e-fZ-mil" secondAttribute="trailing" id="YsZ-fO-gKR"/> <constraint firstItem="fnl-2z-Ty3" firstAttribute="trailing" secondItem="t9e-fZ-mil" secondAttribute="trailing" id="YsZ-fO-gKR"/>
<constraint firstAttribute="bottom" secondItem="t9e-fZ-mil" secondAttribute="bottom" id="sg2-wZ-QVS"/> <constraint firstItem="LNV-ad-a6k" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="bpD-Ua-2uW"/>
<constraint firstItem="LNV-ad-a6k" firstAttribute="trailing" secondItem="fnl-2z-Ty3" secondAttribute="trailing" id="iv9-0q-Vd3"/>
<constraint firstAttribute="bottom" secondItem="LNV-ad-a6k" secondAttribute="bottom" id="n2f-sO-iRS"/>
<constraint firstItem="tOa-jF-wGg" firstAttribute="bottom" secondItem="fnl-2z-Ty3" secondAttribute="bottom" id="sZS-id-ZNc"/>
<constraint firstItem="tOa-jF-wGg" firstAttribute="leading" secondItem="fnl-2z-Ty3" secondAttribute="leading" id="x9b-qn-W90"/>
</constraints> </constraints>
<viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/> <viewLayoutGuide key="safeArea" id="fnl-2z-Ty3"/>
<point key="canvasLocation" x="132" y="125"/> <point key="canvasLocation" x="131.8840579710145" y="124.55357142857142"/>
</view> </view>
</objects> </objects>
<resources> <resources>
<namedColor name="app底色"> <namedColor name="app底色">
<color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/> <color red="0.94509803921568625" green="0.94509803921568625" blue="0.94509803921568625" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor> </namedColor>
<namedColor name="按钮渐变色上">
<color red="0.3880000114440918" green="0.62400001287460327" blue="0.90200001001358032" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="按钮渐变色下,字体颜色">
<color red="0.27843137254901962" green="0.5607843137254902" blue="0.8901960784313725" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
<namedColor name="白色背景色">
<color red="1" green="1" blue="1" alpha="1" colorSpace="custom" customColorSpace="sRGB"/>
</namedColor>
</resources> </resources>
</document> </document>
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