Commit 52b84f99 authored by 刘俊宏's avatar 刘俊宏

完成运单列表+运单跟踪

parent c4eb9ee2
...@@ -454,10 +454,12 @@ class LogisticsTrackingDataModel: Mappable { ...@@ -454,10 +454,12 @@ class LogisticsTrackingDataModel: Mappable {
var lc_name:String? var lc_name:String?
var s_city_name:String? var s_city_name:String?
var delivery_status:String? // 运单状态:1下单完成 2揽收成功 3运输中 4已签收 5已取消 6拒收 7再投 var delivery_status:String? // 运单状态:1下单完成 2揽收成功 3运输中 4已签收 5已取消 6拒收 7再投
var delivery_status_cn:String? //
var r_city_name:String? var r_city_name:String?
var express_item_name:String? var express_item_name:String?
var sale_plat:String? var sale_plat:String?
var sign_time:String?//签收时间 var sign_time:Double?//签收时间
var order_sn:String? var order_sn:String?
var jd_tracking:Array<LogisticsJdTrackingModel>? var jd_tracking:Array<LogisticsJdTrackingModel>?
var sf_tracking:LogisticsSFTrackingModel? var sf_tracking:LogisticsSFTrackingModel?
...@@ -477,6 +479,9 @@ class LogisticsTrackingDataModel: Mappable { ...@@ -477,6 +479,9 @@ class LogisticsTrackingDataModel: Mappable {
sign_time <- map["sign_time"] sign_time <- map["sign_time"]
order_sn <- map["order_sn"] order_sn <- map["order_sn"]
delivery_status_cn <- map["delivery_status_cn"]
jd_tracking <- map["jd_tracking"]
sf_tracking <- map["sf_tracking"]
} }
} }
......
...@@ -86,7 +86,7 @@ ...@@ -86,7 +86,7 @@
<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="aOy-Ef-DsK"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="寄托物名称:-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="aOy-Ef-DsK">
<rect key="frame" x="10" y="92" width="325" height="15"/> <rect key="frame" x="10" y="92" width="325" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="Ca6-cl-SK8"/> <constraint firstAttribute="height" constant="15" id="Ca6-cl-SK8"/>
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<userDefinedRuntimeAttribute type="boolean" keyPath="isSkeletonable" value="NO"/> <userDefinedRuntimeAttribute type="boolean" keyPath="isSkeletonable" value="NO"/>
</userDefinedRuntimeAttributes> </userDefinedRuntimeAttributes>
</label> </label>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="已签收:已签收,签收人:梁小锋 (155" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tvb-s6-5wR"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签收状态:-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Tvb-s6-5wR">
<rect key="frame" x="10" y="112" width="325" height="15"/> <rect key="frame" x="10" y="112" width="325" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="anD-de-Kaw"/> <constraint firstAttribute="height" constant="15" id="anD-de-Kaw"/>
...@@ -107,7 +107,7 @@ ...@@ -107,7 +107,7 @@
<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="qAr-R6-DzW"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单平台:-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="qAr-R6-DzW">
<rect key="frame" x="10" y="132" width="325" height="15"/> <rect key="frame" x="10" y="132" width="325" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="hyp-zo-0nJ"/> <constraint firstAttribute="height" constant="15" id="hyp-zo-0nJ"/>
...@@ -116,7 +116,7 @@ ...@@ -116,7 +116,7 @@
<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="签收时间:2020.04.26" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Ne-Ed-fWp"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="签收时间:-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="2Ne-Ed-fWp">
<rect key="frame" x="10" y="152" width="325" height="15"/> <rect key="frame" x="10" y="152" width="325" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="GvQ-or-yfK"/> <constraint firstAttribute="height" constant="15" id="GvQ-or-yfK"/>
...@@ -125,7 +125,7 @@ ...@@ -125,7 +125,7 @@
<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="订单号:2564143616316132" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8BK-xs-SBV"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="订单号:-" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="8BK-xs-SBV">
<rect key="frame" x="10" y="172" width="325" height="15"/> <rect key="frame" x="10" y="172" width="325" height="15"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="q4j-ZM-Emy"/> <constraint firstAttribute="height" constant="15" id="q4j-ZM-Emy"/>
......
...@@ -14,7 +14,6 @@ class WLGZCell: UITableViewCell { ...@@ -14,7 +14,6 @@ class WLGZCell: UITableViewCell {
@IBOutlet weak var firstLbl: UILabel! @IBOutlet weak var firstLbl: UILabel!
@IBOutlet weak var bottomLine: UIView! @IBOutlet weak var bottomLine: UIView!
@IBOutlet weak var topLine: UIView! @IBOutlet weak var topLine: UIView!
@IBOutlet weak var timeLbl: UILabel!
@IBOutlet weak var dateLbl: UILabel! @IBOutlet weak var dateLbl: UILabel!
override func awakeFromNib() { override func awakeFromNib() {
super.awakeFromNib() super.awakeFromNib()
......
...@@ -18,25 +18,15 @@ ...@@ -18,25 +18,15 @@
<rect key="frame" x="0.0" y="0.0" width="375" height="49"/> <rect key="frame" x="0.0" y="0.0" width="375" height="49"/>
<autoresizingMask key="autoresizingMask"/> <autoresizingMask key="autoresizingMask"/>
<subviews> <subviews>
<label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="2020.04.26" textAlignment="natural" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U7Y-ud-15C"> <label opaque="NO" userInteractionEnabled="NO" contentMode="left" horizontalHuggingPriority="251" verticalHuggingPriority="251" text="" textAlignment="right" lineBreakMode="tailTruncation" numberOfLines="0" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="U7Y-ud-15C">
<rect key="frame" x="20" y="25" width="61" height="15"/> <rect key="frame" x="20" y="24.5" width="61" height="0.0"/>
<constraints> <constraints>
<constraint firstAttribute="height" constant="15" id="BS8-Y0-GqC"/>
<constraint firstAttribute="width" constant="61" id="zYY-uG-E5b"/> <constraint firstAttribute="width" constant="61" id="zYY-uG-E5b"/>
</constraints> </constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/> <fontDescription key="fontDescription" type="system" pointSize="11"/>
<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="10:25" textAlignment="right" lineBreakMode="tailTruncation" baselineAdjustment="alignBaselines" adjustsFontSizeToFit="NO" translatesAutoresizingMaskIntoConstraints="NO" id="S66-qc-l6E">
<rect key="frame" x="15" y="10" width="66" height="13.5"/>
<constraints>
<constraint firstAttribute="height" constant="13.5" id="EVf-8A-oPq"/>
</constraints>
<fontDescription key="fontDescription" type="system" pointSize="11"/>
<color key="textColor" name="灰色字体颜色"/>
<nil key="highlightedColor"/>
</label>
<view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ytX-rl-jqI"> <view contentMode="scaleToFill" translatesAutoresizingMaskIntoConstraints="NO" id="ytX-rl-jqI">
<rect key="frame" x="118" y="21" width="7" height="7"/> <rect key="frame" x="118" y="21" width="7" height="7"/>
<color key="backgroundColor" name="#999999"/> <color key="backgroundColor" name="#999999"/>
...@@ -86,7 +76,7 @@ ...@@ -86,7 +76,7 @@
<fragment content="代签收(雄狮前台),感谢使用京东冷运;期待再次为您服务(住单总件数:1件)"> <fragment content="代签收(雄狮前台),感谢使用京东冷运;期待再次为您服务(住单总件数:1件)">
<attributes> <attributes>
<color key="NSColor" name="灰色字体颜色"/> <color key="NSColor" name="灰色字体颜色"/>
<font key="NSFont" metaFont="message" size="11"/> <font key="NSFont" metaFont="controlContent" size="11"/>
<paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="3" tighteningFactorForTruncation="0.0"/> <paragraphStyle key="NSParagraphStyle" alignment="left" lineBreakMode="wordWrapping" baseWritingDirection="natural" lineSpacing="3" tighteningFactorForTruncation="0.0"/>
</attributes> </attributes>
</fragment> </fragment>
...@@ -96,22 +86,19 @@ ...@@ -96,22 +86,19 @@
</subviews> </subviews>
<color key="backgroundColor" name="app底色"/> <color key="backgroundColor" name="app底色"/>
<constraints> <constraints>
<constraint firstItem="S66-qc-l6E" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="15" id="4sS-0g-PoW"/>
<constraint firstItem="bZe-na-nJZ" firstAttribute="top" secondItem="ytX-rl-jqI" secondAttribute="bottom" id="51X-Tn-dua"/> <constraint firstItem="bZe-na-nJZ" firstAttribute="top" secondItem="ytX-rl-jqI" secondAttribute="bottom" id="51X-Tn-dua"/>
<constraint firstAttribute="trailing" secondItem="V26-2d-fHS" secondAttribute="trailing" constant="20" id="GYN-KD-UwI"/> <constraint firstAttribute="trailing" secondItem="V26-2d-fHS" secondAttribute="trailing" constant="20" id="GYN-KD-UwI"/>
<constraint firstItem="ytX-rl-jqI" firstAttribute="top" secondItem="ctM-ta-8Cf" secondAttribute="bottom" id="LfF-kL-ikB"/> <constraint firstItem="ytX-rl-jqI" firstAttribute="top" secondItem="ctM-ta-8Cf" secondAttribute="bottom" id="LfF-kL-ikB"/>
<constraint firstItem="48a-pK-yb0" firstAttribute="centerY" secondItem="ytX-rl-jqI" secondAttribute="centerY" id="QY0-ys-Rye"/> <constraint firstItem="48a-pK-yb0" firstAttribute="centerY" secondItem="ytX-rl-jqI" secondAttribute="centerY" id="QY0-ys-Rye"/>
<constraint firstItem="U7Y-ud-15C" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" constant="8" id="ZfA-wD-GVo"/> <constraint firstItem="U7Y-ud-15C" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="ZfA-wD-GVo"/>
<constraint firstItem="V26-2d-fHS" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="bCM-jr-XIz"/> <constraint firstItem="V26-2d-fHS" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" constant="5" id="bCM-jr-XIz"/>
<constraint firstItem="V26-2d-fHS" firstAttribute="leading" secondItem="ytX-rl-jqI" secondAttribute="trailing" constant="26" id="h7T-am-IWL"/> <constraint firstItem="V26-2d-fHS" firstAttribute="leading" secondItem="ytX-rl-jqI" secondAttribute="trailing" constant="26" id="h7T-am-IWL"/>
<constraint firstItem="S66-qc-l6E" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" constant="-8" id="hPr-JF-IN8"/>
<constraint firstItem="U7Y-ud-15C" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="hnZ-uQ-DLy"/> <constraint firstItem="U7Y-ud-15C" firstAttribute="leading" secondItem="H2p-sc-9uM" secondAttribute="leading" constant="20" id="hnZ-uQ-DLy"/>
<constraint firstItem="bZe-na-nJZ" firstAttribute="centerX" secondItem="ytX-rl-jqI" secondAttribute="centerX" id="l89-5O-UNN"/> <constraint firstItem="bZe-na-nJZ" firstAttribute="centerX" secondItem="ytX-rl-jqI" secondAttribute="centerX" id="l89-5O-UNN"/>
<constraint firstItem="48a-pK-yb0" firstAttribute="centerX" secondItem="ytX-rl-jqI" secondAttribute="centerX" id="mj8-Rs-N4b"/> <constraint firstItem="48a-pK-yb0" firstAttribute="centerX" secondItem="ytX-rl-jqI" secondAttribute="centerX" id="mj8-Rs-N4b"/>
<constraint firstItem="ctM-ta-8Cf" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="nNc-s7-ALL"/> <constraint firstItem="ctM-ta-8Cf" firstAttribute="top" secondItem="H2p-sc-9uM" secondAttribute="top" id="nNc-s7-ALL"/>
<constraint firstItem="ctM-ta-8Cf" firstAttribute="centerX" secondItem="ytX-rl-jqI" secondAttribute="centerX" id="q8P-18-FYY"/> <constraint firstItem="ctM-ta-8Cf" firstAttribute="centerX" secondItem="ytX-rl-jqI" secondAttribute="centerX" id="q8P-18-FYY"/>
<constraint firstItem="ytX-rl-jqI" firstAttribute="leading" secondItem="U7Y-ud-15C" secondAttribute="trailing" constant="37" id="qMM-0N-p7h"/> <constraint firstItem="ytX-rl-jqI" firstAttribute="leading" secondItem="U7Y-ud-15C" secondAttribute="trailing" constant="37" id="qMM-0N-p7h"/>
<constraint firstItem="S66-qc-l6E" firstAttribute="trailing" secondItem="U7Y-ud-15C" secondAttribute="trailing" id="t0m-kh-yBj"/>
<constraint firstItem="ytX-rl-jqI" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="uSz-TX-lJz"/> <constraint firstItem="ytX-rl-jqI" firstAttribute="centerY" secondItem="H2p-sc-9uM" secondAttribute="centerY" id="uSz-TX-lJz"/>
<constraint firstAttribute="bottom" secondItem="bZe-na-nJZ" secondAttribute="bottom" id="v7d-nl-P4f"/> <constraint firstAttribute="bottom" secondItem="bZe-na-nJZ" secondAttribute="bottom" id="v7d-nl-P4f"/>
<constraint firstAttribute="bottom" secondItem="V26-2d-fHS" secondAttribute="bottom" constant="5" id="wFT-ZG-7dq"/> <constraint firstAttribute="bottom" secondItem="V26-2d-fHS" secondAttribute="bottom" constant="5" id="wFT-ZG-7dq"/>
...@@ -123,7 +110,6 @@ ...@@ -123,7 +110,6 @@
<outlet property="contentLbl" destination="V26-2d-fHS" id="4Nw-O6-qtI"/> <outlet property="contentLbl" destination="V26-2d-fHS" id="4Nw-O6-qtI"/>
<outlet property="dateLbl" destination="U7Y-ud-15C" id="85Z-2p-c9U"/> <outlet property="dateLbl" destination="U7Y-ud-15C" id="85Z-2p-c9U"/>
<outlet property="firstLbl" destination="48a-pK-yb0" id="YGh-ct-W23"/> <outlet property="firstLbl" destination="48a-pK-yb0" id="YGh-ct-W23"/>
<outlet property="timeLbl" destination="S66-qc-l6E" id="QNA-vJ-E3f"/>
<outlet property="topLine" destination="ctM-ta-8Cf" id="G8A-5e-bkw"/> <outlet property="topLine" destination="ctM-ta-8Cf" id="G8A-5e-bkw"/>
</connections> </connections>
<point key="canvasLocation" x="131.15942028985509" y="121.54017857142857"/> <point key="canvasLocation" x="131.15942028985509" y="121.54017857142857"/>
......
...@@ -25,6 +25,36 @@ class WuLiuGenZongViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -25,6 +25,36 @@ class WuLiuGenZongViewController: BaseViewController,UITableViewDelegate,UITable
} }
listView.register(UINib(nibName: "WLGZCell", bundle: nil), forCellReuseIdentifier: "WLGZCell") listView.register(UINib(nibName: "WLGZCell", bundle: nil), forCellReuseIdentifier: "WLGZCell")
listView.register(UINib(nibName: "YunDanLieBiaoCell", bundle: nil), forCellReuseIdentifier: "YunDanLieBiaoCell") listView.register(UINib(nibName: "YunDanLieBiaoCell", bundle: nil), forCellReuseIdentifier: "YunDanLieBiaoCell")
loadData()
}
var orderId:Int?
var dataModel:LogisticsTrackingDataModel? = nil
func loadData() {
HUD.flash(.progress)
let UserToken = UserDefaults.standard.value(forKey: "user_token")
LogisticsTracking(["user_token":UserToken as Any,"id":orderId as Any], success: { (data) in
let model = data as! LogisticsTrackingModel
self.dataModel = model.data
self.dataArr.removeAll()
if self.dataModel?.lc_name == "京东冷链" {
self.dataArr = self.dataModel?.jd_tracking! as! Array<Any>
}else if self.dataModel?.lc_name == "顺丰冷运" {
if self.dataModel?.sf_tracking?.code == 200 {
self.dataArr = self.dataModel?.sf_tracking?.model! as! Array<Any>
}
}
self.listView.reloadData()
HUD.hide()
}) { (error) in
HUD.hide()
}
} }
//cell //cell
...@@ -48,6 +78,29 @@ class WuLiuGenZongViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -48,6 +78,29 @@ class WuLiuGenZongViewController: BaseViewController,UITableViewDelegate,UITable
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell { func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
if indexPath.section == 0 { if indexPath.section == 0 {
let cell = tableView.dequeueReusableCell(withIdentifier: "YunDanLieBiaoCell") as! YunDanLieBiaoCell let cell = tableView.dequeueReusableCell(withIdentifier: "YunDanLieBiaoCell") as! YunDanLieBiaoCell
if self.dataModel != nil {
cell.title1.text = "运单号:" + dataModel!.lwb_no!
cell.title2.text = dataModel!.lc_name
cell.senderLbl.text = dataModel!.s_city_name
cell.receiverLbl.text = dataModel!.r_city_name
cell.statusLbl.text = dataModel?.delivery_status_cn
cell.productNameLbl.text = "寄托物:" + dataModel!.express_item_name!
cell.signLbl.text = "签收状态:-"
cell.standerLbl.text = "订单平台:" + dataModel!.sale_plat!
if dataModel!.sale_plat?.count == 0 {
cell.standerLbl.text = "订单平台:-"
}
cell.timeLbl.text = "签收时间:" + dayByDouble(sender: dataModel!.sign_time!)
if dataModel!.sign_time! == 0 {
cell.timeLbl.text = "签收时间:-"
}
cell.orderNumLbl.text = "订单号:" + dataModel!.order_sn!
if dataModel!.order_sn?.count == 0 {
cell.orderNumLbl.text = "订单号:-"
}
}
return cell return cell
} }
let cell = tableView.dequeueReusableCell(withIdentifier: "WLGZCell") as! WLGZCell let cell = tableView.dequeueReusableCell(withIdentifier: "WLGZCell") as! WLGZCell
...@@ -60,6 +113,21 @@ class WuLiuGenZongViewController: BaseViewController,UITableViewDelegate,UITable ...@@ -60,6 +113,21 @@ class WuLiuGenZongViewController: BaseViewController,UITableViewDelegate,UITable
cell.bottomLine.isHidden = true cell.bottomLine.isHidden = true
} }
} }
if self.dataModel?.lc_name == "京东冷链" {
let rowModel = self.dataArr[indexPath.row] as! LogisticsJdTrackingModel
cell.contentLbl.text = rowModel.opeRemark
cell.dateLbl.text = rowModel.opeTime
}else if self.dataModel?.lc_name == "顺丰冷运" {
if self.dataModel?.sf_tracking?.code == 200 {
let rowModel = self.dataArr[indexPath.row] as! LogisticsSFTrackingDataModel
cell.contentLbl.text = rowModel.owsRemark
cell.dateLbl.text = rowModel.barScanTm
}
}
return cell return cell
} }
......
...@@ -156,6 +156,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -156,6 +156,9 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData)) headerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadData))
self.listView!.mj_header = headerMJ self.listView!.mj_header = headerMJ
self.listView.mj_header?.beginRefreshing() self.listView.mj_header?.beginRefreshing()
footerMJ.setRefreshingTarget(self, refreshingAction: #selector(loadMoreData))
self.listView!.mj_footer = footerMJ
self.listView?.mj_header?.beginRefreshing()
} }
func btnUISet(btn:UIButton){ func btnUISet(btn:UIButton){
...@@ -541,10 +544,11 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -541,10 +544,11 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
var pay_status = "" //运单运费支付状态:1待支付 2已支付 3已退款 var pay_status = "" //运单运费支付状态:1待支付 2已支付 3已退款
var delivery_status = "" //运单状态:1下单完成 2揽收成功 3运输中 4已签收 5已取消 6拒收 7再投 var delivery_status = "" //运单状态:1下单完成 2揽收成功 3运输中 4已签收 5已取消 6拒收 7再投
var page = 1
@objc func loadData(){ @objc func loadData(){
print("加载数据") print("加载数据")
removeBlackBtnView() removeBlackBtnView()
page = 1
if BeginDate == nil { if BeginDate == nil {
start_time = 0 start_time = 0
end_time = 0 end_time = 0
...@@ -557,12 +561,14 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -557,12 +561,14 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
let UserToken = UserDefaults.standard.value(forKey: "user_token") let UserToken = UserDefaults.standard.value(forKey: "user_token")
jdOrderList(["user_token":UserToken as Any,"keyword":keyWord as Any,"start_time":start_time as Any,"end_time":end_time as Any,"lc_id":lc_id as Any,"order_sn":order_sn as Any,"sale_plat":sale_plat as Any,"pay_status":pay_status as Any,"delivery_status":delivery_status as Any], success: { (data) in jdOrderList(["user_token":UserToken as Any,"keyword":keyWord as Any,"start_time":start_time as Any,"end_time":end_time as Any,"lc_id":lc_id as Any,"order_sn":order_sn as Any,"sale_plat":sale_plat as Any,"pay_status":pay_status as Any,"delivery_status":delivery_status as Any,"page":page as Any], success: { (data) in
self.datas.removeAll() self.datas.removeAll()
let dataModel = data as! LogisticsModel let dataModel = data as! LogisticsModel
if dataModel.code == 1 { if dataModel.code == 1 {
self.datas = dataModel.data! self.datas = dataModel.data!
self.page = 2
} }
self.listView.mj_header?.endRefreshing() self.listView.mj_header?.endRefreshing()
self.listView.reloadData() self.listView.reloadData()
...@@ -572,6 +578,43 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea ...@@ -572,6 +578,43 @@ class YDLBVc: BaseViewController,UITableViewDelegate,UITableViewDataSource,UISea
} }
} }
@objc func loadMoreData(){
print("加载数据")
removeBlackBtnView()
if BeginDate == nil {
start_time = 0
end_time = 0
}else{
let timeInterval:TimeInterval = BeginDate!.timeIntervalSince1970
let timeIntervalEnd:TimeInterval = EndDate!.timeIntervalSince1970
start_time = Int(timeInterval)
end_time = Int(timeIntervalEnd)
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
jdOrderList(["user_token":UserToken as Any,"keyword":keyWord as Any,"start_time":start_time as Any,"end_time":end_time as Any,"lc_id":lc_id as Any,"order_sn":order_sn as Any,"sale_plat":sale_plat as Any,"pay_status":pay_status as Any,"delivery_status":delivery_status as Any,"page":page as Any], success: { (data) in
let dataModel = data as! LogisticsModel
if dataModel.code == 1 {
dataModel.data?.forEach({ (item) in
self.datas.append(item)
})
self.page = self.page + 1
}
self.listView.reloadData()
self.listView?.mj_footer?.endRefreshing()
}) { (error) in
self.listView?.mj_footer?.endRefreshing()
}
}
//MARK:--搜索模块 //MARK:--搜索模块
//MAKR:--调起搜索后添加个蒙版本 //MAKR:--调起搜索后添加个蒙版本
var blackBtnView:UIButton! = nil var blackBtnView:UIButton! = nil
......
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