瀏覽代碼

Merge branch 'feature/liuxuqing' into develop

Chris 6 年之前
父節點
當前提交
2f38eb7cbc

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

@@ -323,6 +323,11 @@
 		BD7AB841228438C80030646A /* OrderPaySelfPickAddressCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB840228438C80030646A /* OrderPaySelfPickAddressCell.swift */; };
 		BD7AB8432284390B0030646A /* OrderPaySelfPickInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB8422284390B0030646A /* OrderPaySelfPickInfoCell.swift */; };
 		BD7AB8452284398A0030646A /* OrderPaySelfPickAddInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BD7AB8442284398A0030646A /* OrderPaySelfPickAddInfoCell.swift */; };
+		BDAA40F7228E947500CF841D /* OrderApplyRefundAccountCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40F6228E947500CF841D /* OrderApplyRefundAccountCell.swift */; };
+		BDAA40F9228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40F8228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift */; };
+		BDAA40FB228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40FA228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift */; };
+		BDAA40FD228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40FC228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift */; };
+		BDAA40FF228EA37900CF841D /* OrderApplyRefundPhotoCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDAA40FE228EA37900CF841D /* OrderApplyRefundPhotoCell.swift */; };
 		BDD4FB1222840597006FE833 /* ShoppingCartPayOrderController.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD4FB1122840597006FE833 /* ShoppingCartPayOrderController.swift */; };
 		BDD4FB1422840954006FE833 /* ShoppingCartOrderPayView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD4FB1322840954006FE833 /* ShoppingCartOrderPayView.swift */; };
 		BDD4FB1722840DD3006FE833 /* OrderPayAcountView.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD4FB1622840DD3006FE833 /* OrderPayAcountView.swift */; };
@@ -697,6 +702,11 @@
 		BD7AB8422284390B0030646A /* OrderPaySelfPickInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderPaySelfPickInfoCell.swift; sourceTree = "<group>"; };
 		BD7AB8442284398A0030646A /* OrderPaySelfPickAddInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderPaySelfPickAddInfoCell.swift; sourceTree = "<group>"; };
 		BD9052C044FD3AE4E62D3929 /* Pods-RainbowPlanet.debug.xcconfig */ = {isa = PBXFileReference; includeInIndex = 1; lastKnownFileType = text.xcconfig; name = "Pods-RainbowPlanet.debug.xcconfig"; path = "Pods/Target Support Files/Pods-RainbowPlanet/Pods-RainbowPlanet.debug.xcconfig"; sourceTree = "<group>"; };
+		BDAA40F6228E947500CF841D /* OrderApplyRefundAccountCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundAccountCell.swift; sourceTree = "<group>"; };
+		BDAA40F8228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundReasonCell.swift; sourceTree = "<group>"; };
+		BDAA40FA228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundNoteInfoCell.swift; sourceTree = "<group>"; };
+		BDAA40FC228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundPhoneCell.swift; sourceTree = "<group>"; };
+		BDAA40FE228EA37900CF841D /* OrderApplyRefundPhotoCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderApplyRefundPhotoCell.swift; sourceTree = "<group>"; };
 		BDD4FB1122840597006FE833 /* ShoppingCartPayOrderController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartPayOrderController.swift; sourceTree = "<group>"; };
 		BDD4FB1322840954006FE833 /* ShoppingCartOrderPayView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ShoppingCartOrderPayView.swift; sourceTree = "<group>"; };
 		BDD4FB1622840DD3006FE833 /* OrderPayAcountView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = OrderPayAcountView.swift; sourceTree = "<group>"; };
@@ -2912,6 +2922,11 @@
 			isa = PBXGroup;
 			children = (
 				BDF862B0228E6690000DEF84 /* OrderApplyRefundProductCell.swift */,
+				BDAA40F6228E947500CF841D /* OrderApplyRefundAccountCell.swift */,
+				BDAA40F8228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift */,
+				BDAA40FC228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift */,
+				BDAA40FA228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift */,
+				BDAA40FE228EA37900CF841D /* OrderApplyRefundPhotoCell.swift */,
 			);
 			path = View;
 			sourceTree = "<group>";
@@ -3228,6 +3243,7 @@
 				A77F2CC722320627001BD3F6 /* WRNavigationBar.swift in Sources */,
 				A7D46092227619CD00A5A54E /* BaiduToCityFactory.swift in Sources */,
 				A71AA51C227219EF008FF1A5 /* EditExpressAddressView.swift in Sources */,
+				BDAA40FB228E9CC300CF841D /* OrderApplyRefundNoteInfoCell.swift in Sources */,
 				A7CC751122715AE3003C4F38 /* MessageDetailesTimeView.swift in Sources */,
 				A7BB684F2268DCEC00AB07A2 /* SelfRecommendationViewController.swift in Sources */,
 				A7B4E7352281907A0012914A /* CMSModel.swift in Sources */,
@@ -3258,6 +3274,7 @@
 				A71D2A602265673A00A55D16 /* RegisterLoginView.swift in Sources */,
 				A73D7C682268A032002A4CE3 /* SwiftyStarRatingView.swift in Sources */,
 				A71AA5102272156A008FF1A5 /* ExpressAddressListViewController.swift in Sources */,
+				BDAA40FF228EA37900CF841D /* OrderApplyRefundPhotoCell.swift in Sources */,
 				A7A98E14227ED0E2005306E9 /* CategoryListModel.swift in Sources */,
 				A70B2C532288584500B2449F /* ShareView.swift in Sources */,
 				A71AF0AE226EF0A3001730FE /* SearchHeaderCollectionReusableView.swift in Sources */,
@@ -3296,6 +3313,7 @@
 				A729B5AD2266FF45004AE098 /* BindPhoneNumberView.swift in Sources */,
 				A7FF1592228C918100A85748 /* OrderRefunddetailsStatusTableViewCell.swift in Sources */,
 				A7CC74E62270628B003C4F38 /* DeliveryMethodTypeModel.swift in Sources */,
+				BDAA40FD228E9CD600CF841D /* OrderApplyRefundPhoneCell.swift in Sources */,
 				A71AA51F22729F35008FF1A5 /* AuthorizationSwift.swift in Sources */,
 				A7A98E3622802AD7005306E9 /* ShoppingMallBannerFSPagerViewCell.swift in Sources */,
 				A7824AFD2271EAC900ABA381 /* SelfMentionContactsListTableViewCell.swift in Sources */,
@@ -3466,6 +3484,7 @@
 				A7778CD522460D8E00C7C47A /* PhoneCountryAreaTableViewCell.swift in Sources */,
 				A70B2C5C22886B0000B2449F /* ShopView.swift in Sources */,
 				A7CC750A22715755003C4F38 /* MessageDetailesViewController.swift in Sources */,
+				BDAA40F7228E947500CF841D /* OrderApplyRefundAccountCell.swift in Sources */,
 				A71AF0B8226EF9EC001730FE /* SearchResultNavigationbarView.swift in Sources */,
 				A70B2C5A22886ADF00B2449F /* ShopViewController.swift in Sources */,
 				BDF862AE228E57E1000DEF84 /* OrderCommentDefaultCollectionCell.swift in Sources */,
@@ -3502,6 +3521,7 @@
 				BD20F1CB2283C12000677D8E /* ShoppingCartListNoneItemCell.swift in Sources */,
 				A7B4E756228281620012914A /* ShoppingMallSlidingLeftRightBgCollectionViewCell.swift in Sources */,
 				A757C92E22744ACE00226355 /* AddressManagerListModel.swift in Sources */,
+				BDAA40F9228E9ADA00CF841D /* OrderApplyRefundReasonCell.swift in Sources */,
 				A7541502224C5ECB002480B5 /* BaiduMapManager.swift in Sources */,
 				A757C9342274882E00226355 /* UIScrollView+MJRefreshEX.m in Sources */,
 				A77F2C9C2231FDCF001BD3F6 /* BaseView.swift in Sources */,

+ 98 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundAccountCell.swift

@@ -0,0 +1,98 @@
+//
+//  OrderApplyRefundAccountCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//  申请退款--全选/退款金额Cell
+
+import UIKit
+import RxSwift
+
+class OrderApplyRefundAccountCell: UITableViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundAccountCell {
+        let ID = "OrderApplyRefundAccountCell"
+        tableView.register(OrderApplyRefundAccountCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderApplyRefundAccountCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderApplyRefundAccountCell
+        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(allSelectBtn)
+        addSubview(priceLabel)
+    }
+    
+    private func setupLayouts() {
+        
+        priceLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(14)
+            make.bottom.equalTo(-14)
+            make.right.equalTo(-14)
+            make.height.equalTo(20)
+        }
+        
+        allSelectBtn.snp.makeConstraints { (make) in
+            make.left.equalToSuperview().offset(10)
+            make.centerY.equalTo(priceLabel)
+            make.width.equalTo(54)
+            make.height.equalTo(30)
+        }
+        allSelectBtn.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.left, imageTitleSpace: 4)
+    }
+    
+    private lazy var allSelectBtn: UIButton = {
+        let allSelectBtn = UIButton(type: UIButton.ButtonType.custom)
+        allSelectBtn.setTitle("全选", for: UIControl.State.normal)
+        allSelectBtn.setTitleColor(k333333Color, for: UIControl.State.normal)
+        allSelectBtn.setTitleColor(k666666Color, for: UIControl.State.selected)
+        allSelectBtn.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
+        allSelectBtn.setImage(kImage(name: "common_check_icon"), for: UIControl.State.selected)
+        allSelectBtn.titleLabel?.font = kRegularFont14
+        allSelectBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
+            allSelectBtn.isSelected = !allSelectBtn.isSelected
+//            if let allSelectBlock = self?.allSelectBlock {
+//                let isAllSel: Int = allSelectBtn.isSelected == true ? 1 : 0
+//                allSelectBlock(isAllSel)
+//            }
+            print("点击了全选")
+        }).disposed(by: disposeBag)
+        return allSelectBtn
+    }()
+    
+    lazy var priceLabel: UILabel = {
+        let priceLabel = UILabel()
+        priceLabel.textColor = k333333Color
+        priceLabel.font = kRegularFont14
+        priceLabel.text = "退款金额¥260"
+//        let str = "退款金额 ¥xx"
+//        let attributedString = NSMutableAttributedString.init(string: str)
+//        let range = str.range(of: "¥xx")
+//        attributedString.changeForegroundColor(kfe352bColor, range: NSRange(range!, in: "¥xx"))
+//        attributedString.changeSystemFont(kBoldFont14, range: NSRange(range!, in: "¥xx"))
+//        priceLabel.attributedText = attributedString
+        return priceLabel
+    }()
+    
+}
+

+ 73 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundNoteInfoCell.swift

@@ -0,0 +1,73 @@
+//
+//  OrderApplyRefundNoteInfoCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class OrderApplyRefundNoteInfoCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundNoteInfoCell {
+        let ID = "OrderApplyRefundNoteInfoCell"
+        tableView.register(OrderApplyRefundNoteInfoCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderApplyRefundNoteInfoCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderApplyRefundNoteInfoCell
+        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(titleLabel)
+        addSubview(noteLabel)
+    }
+    
+    private func setupLayouts() {
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.left.equalTo(14)
+            make.width.equalTo(56)
+            make.height.equalTo(20)
+        }
+        noteLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(14)
+            make.left.equalTo(titleLabel.snp_right).offset(20)
+            make.bottom.right.equalTo(-14)
+        }
+    }
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kRegularFont14
+        titleLabel.text = "备注信息"
+        return titleLabel
+    }()
+    
+    lazy var noteLabel: UILabel = {
+        let noteLabel = UILabel()
+        noteLabel.textColor = k999999Color
+        noteLabel.font = kRegularFont14
+        noteLabel.text = "对于做移动端开发而言,算法,数据结构似乎只用于面试装B用,数据的查找,排序,增加,删除,如果一个for循环不能解决,那么再嵌套一层循环"
+        noteLabel.numberOfLines = 0
+        return noteLabel
+    }()
+    
+}

+ 73 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundPhoneCell.swift

@@ -0,0 +1,73 @@
+//
+//  OrderApplyRefundPhoneCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class OrderApplyRefundPhoneCell: UITableViewCell {
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundPhoneCell {
+        let ID = "OrderApplyRefundPhoneCell"
+        tableView.register(OrderApplyRefundPhoneCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderApplyRefundPhoneCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderApplyRefundPhoneCell
+        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(titleLabel)
+        addSubview(phoneLabel)
+    }
+    
+    private func setupLayouts() {
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.left.equalTo(14)
+            make.bottom.equalTo(-14)
+            make.width.equalTo(56)
+            make.height.equalTo(20)
+        }
+        phoneLabel.snp.makeConstraints { (make) in            
+            make.left.equalTo(titleLabel.snp_right).offset(20)
+            make.centerY.equalTo(titleLabel)
+            make.height.equalTo(20)
+        }
+    }
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kRegularFont14
+        titleLabel.text = "手机号码"
+        return titleLabel
+    }()
+    
+    lazy var phoneLabel: UILabel = {
+        let phoneLabel = UILabel()
+        phoneLabel.textColor = k333333Color
+        phoneLabel.font = kRegularFont14
+        phoneLabel.text = "158xxxxxxxx"
+        return phoneLabel
+    }()
+    
+}

+ 178 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundPhotoCell.swift

@@ -0,0 +1,178 @@
+//
+//  OrderApplyRefundPhotoCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+
+class OrderApplyRefundPhotoCell: UITableViewCell {
+    
+    private let maxImageCount: Int = 3
+    
+    var productMdl : ProductModel? {
+        didSet {
+            
+        }
+    }
+    
+    var imgCount: Int? {
+        didSet {
+            collectionView.reloadData()
+        }
+    }
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundPhotoCell {
+        let ID = "OrderApplyRefundPhotoCell"
+        tableView.register(OrderApplyRefundPhotoCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderApplyRefundPhotoCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderApplyRefundPhotoCell
+        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(titleLabel)
+        addSubview(collectionView)
+        addSubview(rmdBackView)
+        rmdBackView.addSubview(remindLabel)
+    }
+    
+    private func setupLayouts() {
+        titleLabel.snp.makeConstraints { (make) in
+            make.left.top.equalTo(14)
+            make.height.equalTo(20)
+        }
+        collectionView.snp.makeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp_bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(200)
+        }
+        rmdBackView.snp.makeConstraints { (make) in
+            make.top.equalTo(collectionView.snp_bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(69)
+        }
+        remindLabel.snp.makeConstraints { (make) in
+            make.top.equalTo(20)
+            make.centerX.equalToSuperview()
+            make.height.equalTo(20)
+        }
+    }
+    
+    private lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.text = "拍照上传问题"
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kBoldFont14
+        titleLabel.textAlignment = .left
+        return titleLabel
+    }()
+    
+    private lazy var rmdBackView: UIView = {
+        let rmdBackView = UIView()
+        rmdBackView.backgroundColor = kf7f8faColor
+        return rmdBackView
+    }()
+    
+    private lazy var remindLabel: UILabel = {
+        let remindLabel = UILabel()
+        remindLabel.text = "退款将根据支付方式原路返回"
+        remindLabel.textColor = k333333Color
+        remindLabel.font = kBoldFont13
+        return remindLabel
+    }()
+    
+    private lazy var collectionView: UICollectionView = {
+        let collectionView = UICollectionView.init(frame: CGRect.zero, collectionViewLayout: collectionViewLayout)
+        collectionView.backgroundColor = kffffffColor
+        collectionView.delegate = self;
+        collectionView.dataSource = self;
+        collectionView.showsVerticalScrollIndicator = false
+        collectionView.showsHorizontalScrollIndicator = false
+        return collectionView
+    }()
+    
+    private lazy var collectionViewLayout: UICollectionViewFlowLayout = {
+        let collectionViewLayout = UICollectionViewFlowLayout.init()
+        collectionViewLayout.minimumLineSpacing = 10
+        collectionViewLayout.minimumInteritemSpacing = 0
+        return collectionViewLayout
+    }()
+    
+    //加载数据
+    func reloadData() {
+        //collectionView重新加载数据
+        self.collectionView.reloadData()
+        //更新collectionView的高度约束
+        let contentSize = self.collectionView.collectionViewLayout.collectionViewContentSize
+        collectionView.snp.remakeConstraints { (make) in
+            make.top.equalTo(titleLabel.snp_bottom)
+            make.left.right.equalToSuperview()
+            make.height.equalTo(contentSize.height)
+        }
+        self.collectionView.collectionViewLayout.invalidateLayout()
+    }
+}
+
+extension OrderApplyRefundPhotoCell: UICollectionViewDelegateFlowLayout,UICollectionViewDataSource,UICollectionViewDelegate {
+    func numberOfSections(in collectionView: UICollectionView) -> Int {
+        return 1
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
+        if imgCount! < maxImageCount {
+            return imgCount!+1
+        } else {
+            return maxImageCount
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
+        if imgCount! < maxImageCount && indexPath.row == imgCount {
+            // 添加图片
+            let cell = OrderCommentDefaultCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+            return cell
+        } else {
+            // 展示图片
+            let cell = OrderCommentAddImgCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
+            return cell
+        }
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, sizeForItemAt indexPath: IndexPath) -> CGSize {
+        return CGSize(width:(kScreenWidth-30-5*3)/4, height: (kScreenWidth-30-5*3)/4)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
+        return UIEdgeInsets(top: 10, left: 15, bottom: 0, right: 15)
+    }
+    
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
+        if imgCount! < maxImageCount && indexPath.row == imgCount {
+            // 添加图片
+            print("点击添加图片")
+        }
+    }
+    
+}

+ 88 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundReasonCell.swift

@@ -0,0 +1,88 @@
+//
+//  OrderApplyRefundReasonCell.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/17.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import UIKit
+import RxSwift
+
+class OrderApplyRefundReasonCell: UITableViewCell {
+    
+    let disposeBag = DisposeBag()
+    
+    class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundReasonCell {
+        let ID = "OrderApplyRefundReasonCell"
+        tableView.register(OrderApplyRefundReasonCell.self, forCellReuseIdentifier: ID)
+        let cell : OrderApplyRefundReasonCell = tableView.dequeueReusableCell(withIdentifier: ID, for: indexPath) as! OrderApplyRefundReasonCell
+        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(titleLabel)
+        addSubview(chooseBtn)
+    }
+    
+    private func setupLayouts() {
+        
+        titleLabel.snp.makeConstraints { (make) in
+            make.top.left.equalTo(14)
+            make.bottom.equalTo(-14)
+            make.height.equalTo(20)
+        }
+        
+        chooseBtn.snp.makeConstraints { (make) in
+            make.right.equalToSuperview().offset(-14)
+            make.centerY.equalTo(titleLabel)
+            make.width.equalTo(54)
+            make.height.equalTo(30)
+        }
+        chooseBtn.layoutButton(edgeInsetsStyle: ButtonEdgeInsetsStyle.right, imageTitleSpace: 4)
+    }
+    
+    lazy var titleLabel: UILabel = {
+        let titleLabel = UILabel()
+        titleLabel.textColor = k333333Color
+        titleLabel.font = kRegularFont14
+        titleLabel.text = "退款原因"
+        return titleLabel
+    }()
+    
+    private lazy var chooseBtn: UIButton = {
+        let chooseBtn = UIButton(type: UIButton.ButtonType.custom)
+        chooseBtn.setTitle("请选择", for: UIControl.State.normal)
+        chooseBtn.setTitleColor(k999999Color, for: UIControl.State.normal)
+        chooseBtn.titleLabel?.font = kRegularFont14
+        chooseBtn.setImage(kImage(name: "my_arrows_unfold"), for: UIControl.State.normal)
+        chooseBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
+            chooseBtn.isSelected = !chooseBtn.isSelected
+            //            if let allSelectBlock = self?.allSelectBlock {
+            //                let isAllSel: Int = chooseBtn.isSelected == true ? 1 : 0
+            //                allSelectBlock(isAllSel)
+            //            }
+            print("点击了--选择")
+        }).disposed(by: disposeBag)
+        return chooseBtn
+    }()
+    
+}

+ 45 - 10
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/ViewController/OrderApplyRefundController.swift

@@ -58,7 +58,7 @@ class OrderApplyRefundController: BaseViewController {
     lazy var tableView: UITableView = {
         let tableView = UITableView(frame: CGRect.zero, style: UITableView.Style.grouped)
         tableView.separatorStyle = .none
-        tableView.backgroundColor = kffffffColor
+        tableView.backgroundColor = kf7f8faColor
         tableView.dataSource = self
         tableView.delegate = self
         tableView.estimatedRowHeight = 0.000001
@@ -72,19 +72,54 @@ class OrderApplyRefundController: BaseViewController {
 // MARK: - tableView dataSource && delegate
 extension OrderApplyRefundController : UITableViewDelegate, UITableViewDataSource {
     
-    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+    func numberOfSections(in tableView: UITableView) -> Int {
         return 1+4
     }
     
-    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
-        let infoCell = OrderLogisticsInfoCell.cellWith(tableView: tableView, indexPath: indexPath)
-        if indexPath.row == 0 {
-            infoCell.isFirstCell = true
+    func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
+        if section == 0 {
+            return 2+3
+        } else {
+            return 1
         }
-        if indexPath.row == 4 {
-            infoCell.isLastCell = true
+    }
+    
+    func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
+        switch indexPath.section {
+        case 0:
+            switch indexPath.row {
+            case 0:
+                let titleCell = OrderShopAndStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                return titleCell
+            case 1:
+                let dtCell = OrderDeliveryModeAndTimeTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                return dtCell
+            case 4:
+                let actCell = OrderApplyRefundAccountCell.cellWith(tableView: tableView, indexPath: indexPath)
+                return actCell
+            default:
+                let productCell = OrderApplyRefundProductCell.cellWith(tableView: tableView, indexPath: indexPath)
+                return productCell
+            }
+        case 1:
+            let reasonCell = OrderApplyRefundReasonCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return reasonCell
+        case 2:
+            let phoneCell = OrderApplyRefundPhoneCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return phoneCell
+        case 3:
+            let noteCell = OrderApplyRefundNoteInfoCell.cellWith(tableView: tableView, indexPath: indexPath)
+            return noteCell
+        case 4:
+            let photoCell = OrderApplyRefundPhotoCell.cellWith(tableView: tableView, indexPath: indexPath)
+            photoCell.frame = tableView.frame
+            photoCell.setNeedsLayout()
+            photoCell.reloadData()
+            photoCell.imgCount = 0
+            return photoCell
+        default:
+            return UITableViewCell()
         }
-        return infoCell
     }
     
     func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
@@ -92,7 +127,7 @@ extension OrderApplyRefundController : UITableViewDelegate, UITableViewDataSourc
     }
     
     func tableView(_ tableView: UITableView, heightForHeaderInSection section: Int) -> CGFloat {
-        return 0.000001
+        return 10
     }
     
     func tableView(_ tableView: UITableView, viewForHeaderInSection section: Int) -> UIView? {

+ 12 - 9
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/View/OrderCommentTableViewCell.swift

@@ -24,6 +24,12 @@ class OrderCommentTableViewCell: UITableViewCell {
         }
     }
     
+    var imgCount: Int? {
+        didSet {
+            
+        }
+    }
+    
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderCommentTableViewCell {
         let ID = "OrderCommentTableViewCell"
         tableView.register(OrderCommentTableViewCell.self, forCellReuseIdentifier: ID)
@@ -175,17 +181,15 @@ extension OrderCommentTableViewCell: UICollectionViewDelegateFlowLayout,UICollec
     }
     
     func collectionView(_ collectionView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
-        let imgCount: Int = 6
-        if imgCount < maxImageCount {
-            return imgCount+1
+        if imgCount! < maxImageCount {
+            return imgCount!+1
         } else {
             return maxImageCount
         }
     }
     
     func collectionView(_ collectionView: UICollectionView, cellForItemAt indexPath: IndexPath) -> UICollectionViewCell {
-        let imgCount: Int = 6
-        if imgCount < maxImageCount && indexPath.row == imgCount {
+        if imgCount! < maxImageCount && indexPath.row == imgCount {
             // 添加图片
             let cell = OrderCommentDefaultCollectionCell.cellWith(collectionView: collectionView, indexPath: indexPath)
             return cell
@@ -201,12 +205,11 @@ extension OrderCommentTableViewCell: UICollectionViewDelegateFlowLayout,UICollec
     }
     
     func collectionView(_ collectionView: UICollectionView, layout collectionViewLayout: UICollectionViewLayout, insetForSectionAt section: Int) -> UIEdgeInsets {
-        return UIEdgeInsets(top: 0, left: 15, bottom: 0, right: 15)
+        return UIEdgeInsets(top: 10, left: 15, bottom: 0, right: 15)
     }
     
-    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {
-        let imgCount: Int = 6
-        if imgCount < maxImageCount && indexPath.row == imgCount {
+    func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) {        
+        if imgCount! < maxImageCount && indexPath.row == imgCount {
             // 添加图片
             print("点击添加图片")
         }

+ 1 - 0
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderComment/ViewController/OrderCommentController.swift

@@ -77,6 +77,7 @@ extension OrderCommentController : UITableViewDelegate, UITableViewDataSource {
     
     func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
         let commentCell = OrderCommentTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+        commentCell.imgCount = 3
         return commentCell
     }