Bladeren bron

查看物流View

Chris 6 jaren geleden
bovenliggende
commit
feca11d063

+ 58 - 0
RainbowPlanet/RainbowPlanet.xcodeproj/project.pbxproj

@@ -316,6 +316,8 @@
 		BD20F1D52283D15500677D8E /* ShoppingCartPayFailureCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD20F1D42283D15500677D8E /* ShoppingCartPayFailureCell.swift */; };
 		BD20F1D82283D2AA00677D8E /* ShoppingCartModule.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = BD20F1D72283D2AA00677D8E /* ShoppingCartModule.xcassets */; };
 		BD3474F522857B85000908C5 /* CommonPayHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD3474F422857B85000908C5 /* CommonPayHeader.swift */; };
+		BD77BE1F228D8D960060E23C /* OrderLogisticsController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD77BE1E228D8D960060E23C /* OrderLogisticsController.swift */; };
+		BD77BE23228D90840060E23C /* OrderLogisticsInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD77BE22228D90840060E23C /* OrderLogisticsInfoCell.swift */; };
 		BD7AB83622841A8B0030646A /* ShoppingCartPayOrderItemCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB83522841A8B0030646A /* ShoppingCartPayOrderItemCell.swift */; };
 		BD7AB838228420310030646A /* ShoppingCartPayOrderHeader.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB837228420310030646A /* ShoppingCartPayOrderHeader.swift */; };
 		BD7AB83A2284288D0030646A /* ShoppingCartPayOrderFooter.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB8392284288D0030646A /* ShoppingCartPayOrderFooter.swift */; };
@@ -682,6 +684,8 @@
 		BD20F1D42283D15500677D8E /* ShoppingCartPayFailureCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayFailureCell.swift; sourceTree = "<group>"; };
 		BD20F1D72283D2AA00677D8E /* ShoppingCartModule.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = ShoppingCartModule.xcassets; sourceTree = "<group>"; };
 		BD3474F422857B85000908C5 /* CommonPayHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CommonPayHeader.swift; sourceTree = "<group>"; };
+		BD77BE1E228D8D960060E23C /* OrderLogisticsController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderLogisticsController.swift; sourceTree = "<group>"; };
+		BD77BE22228D90840060E23C /* OrderLogisticsInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderLogisticsInfoCell.swift; sourceTree = "<group>"; };
 		BD7AB83522841A8B0030646A /* ShoppingCartPayOrderItemCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderItemCell.swift; sourceTree = "<group>"; };
 		BD7AB837228420310030646A /* ShoppingCartPayOrderHeader.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderHeader.swift; sourceTree = "<group>"; };
 		BD7AB8392284288D0030646A /* ShoppingCartPayOrderFooter.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderFooter.swift; sourceTree = "<group>"; };
@@ -2601,6 +2605,8 @@
 				A7FF155B228C68B200A85748 /* Order */,
 				A7FF155C228C68C900A85748 /* OrderDetail */,
 				A7FF158A228C910600A85748 /* OrderRefunddetails */,
+				BD77BE1B228D8D320060E23C /* OrderLogistics */,
+				BD77BE18228D8C2E0060E23C /* OrderComment */,
 			);
 			path = OrderModule;
 			sourceTree = "<group>";
@@ -2772,6 +2778,56 @@
 			path = ViewController;
 			sourceTree = "<group>";
 		};
+		BD77BE18228D8C2E0060E23C /* OrderComment */ = {
+			isa = PBXGroup;
+			children = (
+				BD77BE19228D8C4C0060E23C /* View */,
+				BD77BE1A228D8C570060E23C /* ViewController */,
+			);
+			path = OrderComment;
+			sourceTree = "<group>";
+		};
+		BD77BE19228D8C4C0060E23C /* View */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = View;
+			sourceTree = "<group>";
+		};
+		BD77BE1A228D8C570060E23C /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+			);
+			path = ViewController;
+			sourceTree = "<group>";
+		};
+		BD77BE1B228D8D320060E23C /* OrderLogistics */ = {
+			isa = PBXGroup;
+			children = (
+				BD77BE1D228D8D6D0060E23C /* View */,
+				BD77BE1C228D8D6D0060E23C /* ViewController */,
+			);
+			path = OrderLogistics;
+			sourceTree = "<group>";
+		};
+		BD77BE1C228D8D6D0060E23C /* ViewController */ = {
+			isa = PBXGroup;
+			children = (
+				BD77BE1E228D8D960060E23C /* OrderLogisticsController.swift */,
+			);
+			name = ViewController;
+			path = RainbowPlanet/Modules/OrderModule/OrderComment/ViewController;
+			sourceTree = SOURCE_ROOT;
+		};
+		BD77BE1D228D8D6D0060E23C /* View */ = {
+			isa = PBXGroup;
+			children = (
+				BD77BE22228D90840060E23C /* OrderLogisticsInfoCell.swift */,
+			);
+			name = View;
+			path = RainbowPlanet/Modules/OrderModule/OrderComment/View;
+			sourceTree = SOURCE_ROOT;
+		};
 		BD7AB83B228437940030646A /* AdressCell */ = {
 			isa = PBXGroup;
 			children = (
@@ -3172,6 +3228,7 @@
 				A72C01222275404A0065E0C3 /* ProvinceCityAreaModel.swift in Sources */,
 				A7FF1579228C82CE00A85748 /* OrderDetailViewController.swift in Sources */,
 				A7C3DD1C226422D200FA262E /* SwiftMoyaNetWorkServiceSMS.swift in Sources */,
+				BD77BE23228D90840060E23C /* OrderLogisticsInfoCell.swift in Sources */,
 				A72A7386223396CB00B21995 /* SwiftMoyaNetWorkManager.swift in Sources */,
 				A70B2C252286C03800B2449F /* NXLPageControl.swift in Sources */,
 				A7A98E12227ECA11005306E9 /* ProductSearchModel.swift in Sources */,
@@ -3354,6 +3411,7 @@
 				A7B4E72F2281773F0012914A /* ProductFloorCenterTitleView.swift in Sources */,
 				A7284A542252FB5C000BAEC4 /* PaginationModel.swift in Sources */,
 				A72A72D022321E2700B21995 /* FontMacro.swift in Sources */,
+				BD77BE1F228D8D960060E23C /* OrderLogisticsController.swift in Sources */,
 				BD1DC6C9228D005000B89C57 /* OrderCreateParameterModel.swift in Sources */,
 				A71AA52622732068008FF1A5 /* SwiftMoyaServiceConfigApi.swift in Sources */,
 				A77F2C982231FD25001BD3F6 /* BaseNavigationViewController.swift in Sources */,

+ 140 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderLogisticsInfoCell.swift

@@ -0,0 +1,140 @@
+//
+//  OrderLogisticsInfoCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class OrderLogisticsInfoCell: UITableViewCell {
+    
+    var productMdl : ProductModel? {
+        didSet {
+            
+        }
+    }
+    
+    var isFirstCell: Bool = false {
+        didSet {
+            if isFirstCell == true {
+                topLineView.isHidden = true
+            }
+        }
+    }
+    
+    var isLastCell: Bool = false {
+        didSet {
+            if isLastCell == true {
+                botLineView.isHidden = true
+            }
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderLogisticsInfoCell {
+        let ID = "OrderLogisticsInfoCell"
+        tableView.register(OrderLogisticsInfoCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderLogisticsInfoCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderLogisticsInfoCell
+        cell.indexPath = indexPath
+        return cell
+    }
+    
+    override init(style: UITableViewCell.CellStyle, reuseIdentifier: String?) {
+        super.init(style: style, reuseIdentifier: reuseIdentifier)
+        setupViews()
+        setupLayouts()
+    }
+    
+    required init?(coder aDecoder: NSCoder) {
+        fatalError("init(coder:) has not been implemented")
+    }
+    
+    var indexPath: IndexPath? {
+        didSet {
+            
+        }
+    }
+    
+    //MRAK: - 设置View
+    private func setupViews() {
+        self.selectionStyle = .none
+        
+        addSubview(informationLabel)
+        addSubview(iconImageView)
+        addSubview(timeInfoLabel)
+        addSubview(topLineView)
+        addSubview(botLineView)
+    }
+    
+    private func setupLayouts() {
+        informationLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(13)
+            make.right.equalTo(-28)
+            make.left.equalTo(48)
+        }
+        iconImageView.snp.makeConstraints { (make) in
+            make.left.equalToSuperview().offset(18)
+            make.size.equalTo(12)
+            make.centerY.equalTo(informationLabel)
+        }
+        timeInfoLabel.snp.makeConstraints { (make) in
+            make.left.equalTo(informationLabel.snp_left)
+            make.top.equalTo(informationLabel.snp_bottom).offset(8)
+            make.bottom.equalTo(-12)
+            make.height.equalTo(17)
+        }
+        topLineView.snp.makeConstraints { (make) in
+            make.centerX.equalTo(iconImageView)
+            make.top.equalToSuperview()
+            make.bottom.equalTo(iconImageView.snp_top)
+            make.width.equalTo(1)
+        }
+        botLineView.snp.makeConstraints { (make) in
+            make.centerX.equalTo(iconImageView)
+            make.top.equalTo(iconImageView.snp_bottom)
+            make.bottom.equalToSuperview()
+            make.width.equalTo(1)
+        }
+    }
+    
+    
+    private lazy var iconImageView: UIImageView = {
+        let iconImageView = UIImageView()
+        iconImageView.image = kImage(name: "shopping_cart_trade_finish")
+        return iconImageView
+    }()
+    
+    private lazy var informationLabel: UILabel = {
+        let informationLabel = UILabel()
+        informationLabel.text = "时间轴展示也是一种比较常见的展现形式。一般用于展示以时间为主线的一连串事件"
+        informationLabel.textColor = k333333Color
+        informationLabel.font = kRegularFont13
+        informationLabel.textAlignment = .left
+        informationLabel.numberOfLines = 0
+        return informationLabel
+    }()
+    
+    private lazy var timeInfoLabel: UILabel = {
+        let timeInfoLabel = UILabel()
+        timeInfoLabel.text = "2019-02-29  17:20:08"
+        timeInfoLabel.textColor = k666666Color
+        timeInfoLabel.font = kRegularFont12
+        timeInfoLabel.textAlignment = .left
+        return timeInfoLabel
+    }()
+    
+    private lazy var topLineView: UIView = {
+        let topLineView = UIView()
+        topLineView.backgroundColor = ke6e6e6Color
+        return topLineView
+    }()
+    
+    private lazy var botLineView: UIView = {
+        let botLineView = UILabel()
+        botLineView.backgroundColor = ke6e6e6Color
+        return botLineView
+    }()
+    
+}
+

+ 125 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/ViewController/OrderLogisticsController.swift

@@ -0,0 +1,125 @@
+//
+//  OrderLogisticsController.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/16.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  订单--查看物流Vc
+
+import UIKit
+import RxSwift
+
+class OrderLogisticsController: BaseViewController {
+    
+    override func viewDidLoad() {
+        super.viewDidLoad()
+        setupViews()
+        setupData()
+        
+    }
+    
+    override func setupViews() {
+        navigationBar.title = "查看物流"
+        
+        self.view.backgroundColor = kf7f8faColor
+        
+        let serialNumView = UIView()
+        serialNumView.backgroundColor = kffffffColor
+        self.view.addSubview(serialNumView)
+        serialNumView.snp.makeConstraints { (make) in
+            make.left.right.equalToSuperview()
+            make.top.equalToSuperview().offset(kSafeStatusBarHeight+40+10)
+            make.height.equalTo(44)
+        }
+        
+        let titleLbl = UILabel()
+        titleLbl.text = "订单编号"
+        titleLbl.textColor = k999999Color
+        titleLbl.font = kRegularFont13
+        serialNumView.addSubview(titleLbl)
+        titleLbl.snp.makeConstraints { (make) in
+            make.left.equalTo(14)
+            make.centerY.equalToSuperview()
+            make.height.equalTo(20)
+        }
+        
+        let numLbl = UILabel()
+        numLbl.text = "821xxxxxxxxxxx2001"
+        numLbl.textColor = k333333Color
+        numLbl.font = kRegularFont13
+        serialNumView.addSubview(numLbl)
+        numLbl.snp.makeConstraints { (make) in
+            make.centerY.equalTo(titleLbl.snp_centerY)
+            make.left.equalTo(titleLbl.snp_right).offset(20)
+            make.height.equalTo(titleLbl)
+        }
+        
+        self.view.addSubview(tableView)
+        let emptyView =  EmptyView.shared.diyCustomEmptyViewStyle2(iconStr: "page04", titleStr: "当前暂无数据")
+        emptyView.contentViewY = kScaleValue(value: 182)
+        tableView.ly_emptyView = emptyView
+        tableView.ly_startLoading()
+        tableView.snp.makeConstraints { (make) in
+            make.top.equalTo(serialNumView.snp_bottom).offset(10)
+            make.left.right.bottom.equalToSuperview()
+        }
+        
+    }
+    
+    override func setupData() {
+        
+    }
+    
+    lazy var tableView: UITableView = {
+        let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
+        tableView.separatorStyle = .none
+        tableView.backgroundColor = kffffffColor
+        tableView.dataSource = self
+        tableView.delegate = self
+        tableView.estimatedRowHeight = 0.000001
+        tableView.estimatedSectionFooterHeight = 0.000001
+        tableView.estimatedSectionHeaderHeight = 0.000001
+        return tableView
+    }()
+    
+}
+
+// MARK: - tableView dataSource && delegate
+extension OrderLogisticsController : UITableViewDelegate, UITableViewDataSource {
+    
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        return 5
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        let infoCell = OrderLogisticsInfoCell.cellWith(tableView: tableView, indexPath: indexPath)
+        if indexPath.row == 0 {
+            infoCell.isFirstCell = true
+        }
+        if indexPath.row == 4 {
+            infoCell.isLastCell = true
+        }
+        return infoCell
+    }
+    
+    func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
+        return  UITableView.automaticDimension
+    }
+    
+    func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+    func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
+        return 0.000001
+    }
+    
+    func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
+        return nil
+    }
+    
+}