Commit 8c5e21b4 authored by 刘俊宏's avatar 刘俊宏

修正详情UI+添加打电话

parent 4fa26543
...@@ -99,6 +99,14 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -99,6 +99,14 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
HUD.hide() HUD.hide()
} }
} }
override func backAction() {
if isYDBc {
self.navigationController?.popToRootViewController(animated: true)
}else{
self.navigationController?.popViewController(animated: true)
}
}
@IBAction func bottomAction(_ sender: LGButton) { @IBAction func bottomAction(_ sender: LGButton) {
if bottomLbl.text == "取消订单" { if bottomLbl.text == "取消订单" {
let vc = HuolalaCancelViewController() let vc = HuolalaCancelViewController()
...@@ -268,6 +276,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -268,6 +276,7 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
if indexPath.section == 0 { if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "WayBillStautsTableViewCell") as! WayBillStautsTableViewCell let cell = tableView.dequeueReusableCell(withIdentifier: "WayBillStautsTableViewCell") as! WayBillStautsTableViewCell
switch dataModel?.order_detail_item?.order_item?.order_status { switch dataModel?.order_detail_item?.order_item?.order_status {
case 0: case 0:
cell.statusLbl.text = "等待司机接单" cell.statusLbl.text = "等待司机接单"
...@@ -290,6 +299,10 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -290,6 +299,10 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
default: default:
break break
} }
if isYDBc {
cell.statusLbl.text = "下单成功"
cell.statusImgV.image = UIImage.init(named: "货拉拉下单成功")
}
return cell return cell
} }
...@@ -299,6 +312,9 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab ...@@ -299,6 +312,9 @@ class WaybillDetailViewController: BaseViewController ,UITableViewDelegate,UITab
cell.driverNameLbl.text = dataModel?.driver_info?.name cell.driverNameLbl.text = dataModel?.driver_info?.name
cell.driverNumLbL.text = dataModel?.driver_info?.license_plate cell.driverNumLbL.text = dataModel?.driver_info?.license_plate
cell.driverTypeLbl.text = "联系方式:" + (dataModel?.driver_info?.phone_no)! cell.driverTypeLbl.text = "联系方式:" + (dataModel?.driver_info?.phone_no)!
cell.driverTypeLbl.isHidden = true
cell.callPhoneStr = (dataModel?.driver_info?.phone_no)!
cell.callBtn.setTitle(" 联系方式:" + (dataModel?.driver_info?.phone_no)!, for: .normal)
} }
return cell return cell
......
...@@ -10,6 +10,12 @@ import UIKit ...@@ -10,6 +10,12 @@ import UIKit
class DriverItemTableViewCell: UITableViewCell { class DriverItemTableViewCell: UITableViewCell {
var callPhoneStr = ""
@IBAction func callAction(_ sender: UIButton) {
UIApplication.shared.openURL(NSURL.init(string: "tel://\(callPhoneStr)")! as URL)
}
@IBOutlet weak var callBtn: UIButton!
@IBOutlet weak var driverTypeLbl: UILabel! @IBOutlet weak var driverTypeLbl: UILabel!
@IBOutlet weak var driverNumLbL: UILabel! @IBOutlet weak var driverNumLbL: UILabel!
@IBOutlet weak var driverNameLbl: UILabel! @IBOutlet weak var driverNameLbl: UILabel!
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="driverIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Wqp-PP-Pfx"> <imageView clipsSubviews="YES" userInteractionEnabled="NO" contentMode="scaleAspectFit" horizontalHuggingPriority="251" verticalHuggingPriority="251" image="driverIcon" translatesAutoresizingMaskIntoConstraints="NO" id="Wqp-PP-Pfx">
<rect key="frame" x="40" y="37" width="68" height="68"/> <rect key="frame" x="45" y="37" width="68" height="68"/>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="68" id="EGf-63-lkU"/> <constraint firstAttribute="height" constant="68" id="EGf-63-lkU"/>
...@@ -32,37 +32,50 @@ ...@@ -32,37 +32,50 @@
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</imageView> </imageView>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c3R-LQ-jdQ"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="c3R-LQ-jdQ">
<rect key="frame" x="130" y="37" width="0.0" height="0.0"/> <rect key="frame" x="153" y="37" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="15"/> <fontDescription key="fontDescription" name="PingFangSC-Medium" family="PingFang SC" pointSize="15"/>
<color key="textColor" name="标题字颜色"/> <color key="textColor" name="标题字颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nhF-X3-1zA"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="nhF-X3-1zA">
<rect key="frame" x="130" y="102" width="0.0" height="0.0"/> <rect key="frame" x="153" y="102" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/> <color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bcL-SK-guN"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="bcL-SK-guN">
<rect key="frame" x="130" y="105" width="0.0" height="0.0"/> <rect key="frame" x="133" y="105" width="0.0" height="0.0"/>
<fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/> <fontDescription key="fontDescription" name="PingFangSC-Regular" family="PingFang SC" pointSize="13"/>
<color key="textColor" name="灰色字体颜色"/> <color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/> <nil key="highlightedColor"/>
</label> </label>
<button opaque="NO" contentMode="scaleToFill" semanticContentAttribute="forceLeftToRight" contentHorizontalAlignment="center" contentVerticalAlignment="center" lineBreakMode="middleTruncation" translatesAutoresizingMaskIntoConstraints="NO" id="Mb9-b1-pnZ">
<rect key="frame" x="133" y="94.5" width="15.5" height="21"/>
<fontDescription key="fontDescription" type="system" pointSize="13"/>
<state key="normal" image="dianhua">
<color key="titleColor" name="灰色字体颜色"/>
</state>
<connections>
<action selector="callAction:" destination="KGk-i7-Jjw" eventType="touchUpInside" id="orf-yT-vpS"/>
</connections>
</button>
</subviews> </subviews>
<constraints> <constraints>
<constraint firstItem="bcL-SK-guN" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="22" id="7Al-j8-Lyg"/> <constraint firstItem="bcL-SK-guN" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="20" id="7Al-j8-Lyg"/>
<constraint firstItem="bcL-SK-guN" firstAttribute="bottom" secondItem="Wqp-PP-Pfx" secondAttribute="bottom" id="Ce9-JT-2f6"/> <constraint firstItem="bcL-SK-guN" firstAttribute="bottom" secondItem="Wqp-PP-Pfx" secondAttribute="bottom" id="Ce9-JT-2f6"/>
<constraint firstItem="Wqp-PP-Pfx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="40" id="Rpj-Y6-gIc"/> <constraint firstItem="Wqp-PP-Pfx" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="45" id="Rpj-Y6-gIc"/>
<constraint firstItem="Mb9-b1-pnZ" firstAttribute="centerY" secondItem="bcL-SK-guN" secondAttribute="centerY" id="UjO-sO-01b"/>
<constraint firstItem="c3R-LQ-jdQ" firstAttribute="top" secondItem="Wqp-PP-Pfx" secondAttribute="top" id="dNU-hd-aY5"/> <constraint firstItem="c3R-LQ-jdQ" firstAttribute="top" secondItem="Wqp-PP-Pfx" secondAttribute="top" id="dNU-hd-aY5"/>
<constraint firstItem="c3R-LQ-jdQ" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="22" id="giH-j3-uz0"/> <constraint firstItem="c3R-LQ-jdQ" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="40" id="giH-j3-uz0"/>
<constraint firstItem="Wqp-PP-Pfx" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="hBt-Bl-2Gz"/> <constraint firstItem="Wqp-PP-Pfx" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="hBt-Bl-2Gz"/>
<constraint firstItem="nhF-X3-1zA" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="22" id="jwA-BP-bb4"/> <constraint firstItem="nhF-X3-1zA" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="40" id="jwA-BP-bb4"/>
<constraint firstItem="Mb9-b1-pnZ" firstAttribute="leading" secondItem="Wqp-PP-Pfx" secondAttribute="trailing" constant="20" id="pz9-Pv-37k"/>
<constraint firstItem="bcL-SK-guN" firstAttribute="top" secondItem="nhF-X3-1zA" secondAttribute="bottom" constant="3" id="zZB-N8-JAA"/> <constraint firstItem="bcL-SK-guN" firstAttribute="top" secondItem="nhF-X3-1zA" secondAttribute="bottom" constant="3" id="zZB-N8-JAA"/>
</constraints> </constraints>
</tableViewCellContentView> </tableViewCellContentView>
<viewLayoutGuide key="safeArea" id="njF-e1-oar"/> <viewLayoutGuide key="safeArea" id="njF-e1-oar"/>
<connections> <connections>
<outlet property="callBtn" destination="Mb9-b1-pnZ" id="sZm-N3-Cw2"/>
<outlet property="driverNameLbl" destination="c3R-LQ-jdQ" id="C3m-lo-xJH"/> <outlet property="driverNameLbl" destination="c3R-LQ-jdQ" id="C3m-lo-xJH"/>
<outlet property="driverNumLbL" destination="nhF-X3-1zA" id="Ytf-0e-zQk"/> <outlet property="driverNumLbL" destination="nhF-X3-1zA" id="Ytf-0e-zQk"/>
<outlet property="driverTypeLbl" destination="bcL-SK-guN" id="9w6-1w-7Ik"/> <outlet property="driverTypeLbl" destination="bcL-SK-guN" id="9w6-1w-7Ik"/>
...@@ -71,7 +84,8 @@ ...@@ -71,7 +84,8 @@
</tableViewCell> </tableViewCell>
</objects> </objects>
<resources> <resources>
<image name="driverIcon" width="68" height="68"/> <image name="dianhua" width="15.5" height="21"/>
<image name="driverIcon" width="68" height="67.5"/>
<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>
......
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