Переглянути джерело

Merge branch 'feature/liuxuqing' into develop

Chris 6 роки тому
батько
коміт
d389e9293c

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

@@ -340,6 +340,7 @@
 		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 */; };
+		BDD22F0B228FAA5B00D43BFB /* ImageUrlModel.swift in Sources */ = {isa = PBXBuildFile; fileRef = BDD22F0A228FAA5B00D43BFB /* ImageUrlModel.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 */; };
@@ -733,6 +734,7 @@
 		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>"; };
+		BDD22F0A228FAA5B00D43BFB /* ImageUrlModel.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ImageUrlModel.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>"; };
@@ -2208,6 +2210,7 @@
 			children = (
 				A79057052276EA3D0037F823 /* OpenCityListModel.swift */,
 				A757C92F2274839900226355 /* SelfMentionAddressListModel.swift */,
+				BDD22F0A228FAA5B00D43BFB /* ImageUrlModel.swift */,
 			);
 			path = ConfigModel;
 			sourceTree = "<group>";
@@ -3426,6 +3429,7 @@
 				BD3474F522857B85000908C5 /* CommonPayHeader.swift in Sources */,
 				A71AF0B6226EF99A001730FE /* SearchResultViewController.swift in Sources */,
 				A757C9302274839900226355 /* SelfMentionAddressListModel.swift in Sources */,
+				BDD22F0B228FAA5B00D43BFB /* ImageUrlModel.swift in Sources */,
 				A72A72D522321E2700B21995 /* ColorMacro.swift in Sources */,
 				A72A7333223256E100B21995 /* PayManager.swift in Sources */,
 				A70B2C6722887B2B00B2449F /* ProductDetailEvaluationListTableViewCell.swift in Sources */,

+ 4 - 4
RainbowPlanet/RainbowPlanet/Modules/OrderModule/Order/ViewController/OrderViewController.swift

@@ -168,9 +168,7 @@ extension OrderViewController :JXSegmentedListContainerViewDataSource {
             
         }
         if button.titleLabel?.text == "取消订单" {
-            let vc = OrderApplyRefundController()
-            vc.orderModel = orderModel
-            self.navigationController?.pushViewController(vc, animated: true)
+            
         }
         if button.titleLabel?.text == "确认收货" {
             
@@ -192,7 +190,9 @@ extension OrderViewController :JXSegmentedListContainerViewDataSource {
             self.navigationController?.pushViewController(vc, animated: true)
         }
         if button.titleLabel?.text == "申请退款" {
-            
+            let vc = OrderApplyRefundController()
+            vc.orderDetailModel = orderModel
+            self.navigationController?.pushViewController(vc, animated: true)
         }
     }
 }

+ 23 - 6
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundAccountCell.swift

@@ -13,6 +13,24 @@ class OrderApplyRefundAccountCell: UITableViewCell {
     
     let disposeBag = DisposeBag()
     
+    typealias AllSelectBlock = (_ isAllSelected: Int) -> Void
+    var allSelectBlock : AllSelectBlock?
+    
+    var isAllSelected: Int? {
+        didSet {
+            // 选中状态
+            let selStatus = isAllSelected == 1 ? true : false
+            allSelectBtn.isSelected = selStatus
+        }
+    }
+    
+    // 退款金额
+    var refundPrice: Int? {
+        didSet {
+            priceLabel.text = "退款金额¥\(self.refundPrice ?? 0)"
+        }
+    }
+    
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundAccountCell {
         let ID = "OrderApplyRefundAccountCell"
         tableView.register(OrderApplyRefundAccountCell.self, forCellReuseIdentifier: ID)
@@ -71,11 +89,10 @@ class OrderApplyRefundAccountCell: UITableViewCell {
         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("点击了全选")
+            if let allSelectBlock = self?.allSelectBlock {
+                let isAllSel: Int = allSelectBtn.isSelected == true ? 1 : 0
+                allSelectBlock(isAllSel)
+            }            
         }).disposed(by: disposeBag)
         return allSelectBtn
     }()
@@ -84,7 +101,7 @@ class OrderApplyRefundAccountCell: UITableViewCell {
         let priceLabel = UILabel()
         priceLabel.textColor = k333333Color
         priceLabel.font = kRegularFont14
-        priceLabel.text = "退款金额¥260"
+        priceLabel.text = "退款金额¥0"
 //        let str = "退款金额 ¥xx"
 //        let attributedString = NSMutableAttributedString.init(string: str)
 //        let range = str.range(of: "¥xx")

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

@@ -10,6 +10,12 @@ import UIKit
 
 class OrderApplyRefundNoteInfoCell: UITableViewCell {
     
+    var orderModel: OrderModel? {
+        didSet {
+            noteLabel.text = orderModel?.remark
+        }
+    }
+    
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundNoteInfoCell {
         let ID = "OrderApplyRefundNoteInfoCell"
         tableView.register(OrderApplyRefundNoteInfoCell.self, forCellReuseIdentifier: ID)

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

@@ -10,6 +10,12 @@ import UIKit
 
 class OrderApplyRefundPhoneCell: UITableViewCell {
     
+    var orderModel: OrderModel? {
+        didSet {
+            phoneLabel.text = orderModel?.mobile
+        }
+    }
+    
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundPhoneCell {
         let ID = "OrderApplyRefundPhoneCell"
         tableView.register(OrderApplyRefundPhoneCell.self, forCellReuseIdentifier: ID)

+ 8 - 10
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundPhotoCell.swift

@@ -12,17 +12,10 @@ class OrderApplyRefundPhotoCell: UITableViewCell {
     
     private let maxImageCount: Int = 3
     
-    var productMdl : ProductModel? {
-        didSet {
-            
-        }
-    }
+    typealias ChoosePicBlock = () -> Void
+    var choosePicBlock : ChoosePicBlock?
     
-    var imgCount: Int? {
-        didSet {
-            collectionView.reloadData()
-        }
-    }
+    var imgCount: Int? = 0
     
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundPhotoCell {
         let ID = "OrderApplyRefundPhotoCell"
@@ -67,6 +60,7 @@ class OrderApplyRefundPhotoCell: UITableViewCell {
             make.top.equalTo(titleLabel.snp_bottom)
             make.left.right.equalToSuperview()
             make.height.equalTo(200)
+            make.bottom.equalToSuperview().offset(-69)
         }
         rmdBackView.snp.makeConstraints { (make) in
             make.top.equalTo(collectionView.snp_bottom)
@@ -130,6 +124,7 @@ class OrderApplyRefundPhotoCell: UITableViewCell {
             make.top.equalTo(titleLabel.snp_bottom)
             make.left.right.equalToSuperview()
             make.height.equalTo(contentSize.height)
+            make.bottom.equalToSuperview().offset(-69)
         }
         self.collectionView.collectionViewLayout.invalidateLayout()
     }
@@ -172,6 +167,9 @@ extension OrderApplyRefundPhotoCell: UICollectionViewDelegateFlowLayout,UICollec
         if imgCount! < maxImageCount && indexPath.row == imgCount {
             // 添加图片
             print("点击添加图片")
+            if let choosePicBlock = self.choosePicBlock {
+                choosePicBlock()
+            }
         }
     }
     

+ 45 - 11
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/View/OrderApplyRefundProductCell.swift

@@ -7,9 +7,17 @@
 //  申请退款--商品详情Cell
 
 import UIKit
+import RxSwift
+import RxCocoa
 
 class OrderApplyRefundProductCell: UITableViewCell {
     
+    let disposeBag = DisposeBag()
+    
+    // 选中商品
+    typealias ProductSelBlock = (_ isProductSelected: Int) -> Void
+    var productSelBlock : ProductSelBlock?
+    
     class func cellWith(tableView:UITableView,indexPath:IndexPath) -> OrderApplyRefundProductCell {
         let ID = "OrderApplyRefundProductCell"
         tableView.register(OrderApplyRefundProductCell.self, forCellReuseIdentifier: ID)
@@ -37,25 +45,37 @@ class OrderApplyRefundProductCell: UITableViewCell {
     private func setupViews() {
         self.selectionStyle = .none
         addSubview(productImageView)
+        addSubview(selectBtn)
+        addSubview(priceLabel)
         addSubview(titleLabel)
         addSubview(timeLabel)
         addSubview(skuLabel)
-        addSubview(priceLabel)
         addSubview(numberLabel)
         addSubview(lineLabel)
     }
     
     private func setupLayouts() {
         productImageView.snp.makeConstraints { (make) in
-            make.left.equalTo(14)
-            make.centerY.equalToSuperview()
+            make.left.equalToSuperview().offset(34)
+            make.top.equalToSuperview().offset(14)
+            make.bottom.equalToSuperview().offset(-14)
             make.size.equalTo(80)
         }
-        
-        titleLabel.snp.makeConstraints { (make) in
+        selectBtn.snp.makeConstraints { (make) in
+            make.left.equalToSuperview().offset(14)
+            make.size.equalTo(18)
+            make.centerY.equalTo(productImageView)
+        }
+        priceLabel.snp.remakeConstraints { (make) in
+            make.top.equalToSuperview().offset(21)
+            make.right.equalTo(-14)
+            make.width.lessThanOrEqualTo(60)
+            make.height.equalTo(20)
+        }
+        titleLabel.snp.remakeConstraints { (make) in
             make.left.equalTo(productImageView.snp.right).offset(12)
             make.top.equalTo(20)
-            make.right.equalTo(priceLabel.snp.left).offset(-12)
+            make.right.equalTo(priceLabel.snp.left).offset(-11)
             make.height.equalTo(20)
         }
         timeLabel.snp.makeConstraints { (make) in
@@ -68,15 +88,10 @@ class OrderApplyRefundProductCell: UITableViewCell {
             make.left.equalTo(titleLabel)
             make.height.equalTo(17)
         }
-        priceLabel.snp.makeConstraints { (make) in
-            make.centerY.equalTo(titleLabel)
-            make.right.equalTo(-14)
-        }
         numberLabel.snp.makeConstraints { (make) in
             make.centerY.equalTo(timeLabel)
             make.right.equalTo(-14)
         }
-        
         lineLabel.snp.makeConstraints { (make) in
             make.bottom.equalToSuperview()
             make.height.equalTo(1)
@@ -85,6 +100,20 @@ class OrderApplyRefundProductCell: UITableViewCell {
         }
     }
     
+    private lazy var selectBtn: UIButton = {
+        let selectBtn = UIButton(type: UIButton.ButtonType.custom)
+        selectBtn.setImage(kImage(name: "common_uncheck_icon"), for: UIControl.State.normal)
+        selectBtn.setImage(kImage(name: "common_check_icon"), for: UIControl.State.selected)
+        selectBtn.rx.tap.subscribe(onNext: { [weak self] (data) in
+            selectBtn.isSelected = !selectBtn.isSelected
+            if let productSelBlock = self?.productSelBlock {
+                let isSel: Int = selectBtn.isSelected == true ? 1 : 0
+                productSelBlock(isSel)
+            }
+        }).disposed(by: disposeBag)
+        return selectBtn
+    }()
+    
     private lazy var productImageView: UIImageView = {
         let productImageView = UIImageView()
         productImageView.image = kImage(name: "pic_preload")
@@ -116,6 +145,7 @@ class OrderApplyRefundProductCell: UITableViewCell {
         let priceLabel = UILabel()
         priceLabel.textColor = k333333Color
         priceLabel.font = kRegularFont14
+        priceLabel.textAlignment = .right
         return priceLabel
     }()
     
@@ -134,6 +164,10 @@ class OrderApplyRefundProductCell: UITableViewCell {
     
     var orderModelDetailModel: OrderModelDetailModel? {
         didSet {
+            // 选中状态
+            let selStatus = orderModelDetailModel?.isSelect == 1 ? true : false
+            selectBtn.isSelected = selStatus
+            
             productImageView.kf.setImage(with: kURLImage(name: orderModelDetailModel?.productImg ?? "pic_preload"), placeholder: kImage(name: "pic_preload"))
             titleLabel.text = orderModelDetailModel?.productName
             timeLabel.text = "预计配送时间:\(orderModelDetailModel?.receiveTime ?? "")"

+ 102 - 8
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderApplyRefund/ViewController/OrderApplyRefundController.swift

@@ -8,15 +8,28 @@
 
 import UIKit
 import RxSwift
+import SwiftyJSON
 
 class OrderApplyRefundController: BaseViewController {
     
-    var orderModel: OrderModel?
+    var orderDetailModel: OrderModel? {
+        didSet {
+            self.productArr = self.orderDetailModel?.detail
+            self.tableView.reloadData()
+        }
+    }
+    
+    // 商品数组
+    var productArr: Array<OrderModelDetailModel>?
+    // 当前是否全选
+    var isAllSelected: Int?
     
     // 退款原因数组
     var refundReasonArr: Array<String>?
     // 选中の退款原因
-    var selRefundReason: String?
+    var selRefundReason: String? = ""
+    
+    
     
     override func viewDidLoad() {
         super.viewDidLoad()
@@ -35,7 +48,7 @@ class OrderApplyRefundController: BaseViewController {
         commitButton.backgroundColor = kFFA42FColor
         self.view.addSubview(commitButton)
         commitButton.rx.tap.subscribe(onNext: { [weak self] (data) in
-            print("点击了--提交申请退款")
+            self?.orderPurchaseRefundApi()
             
         }).disposed(by: disposeBag)
         commitButton.snp.makeConstraints { (make) in
@@ -80,12 +93,13 @@ class OrderApplyRefundController: BaseViewController {
 extension OrderApplyRefundController : UITableViewDelegate, UITableViewDataSource {
     
     func numberOfSections(in tableView: UITableView) -> Int {
-        return 1+4
+        return 5
     }
     
     func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
         if section == 0 {
-            return 2+3
+            let count = productArr?.count ?? 0
+            return count + 3
         } else {
             return 1
         }
@@ -97,15 +111,30 @@ extension OrderApplyRefundController : UITableViewDelegate, UITableViewDataSourc
             switch indexPath.row {
             case 0:
                 let titleCell = OrderShopAndStatusTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                titleCell.orderModel = orderDetailModel
                 return titleCell
             case 1:
                 let dtCell = OrderDeliveryModeAndTimeTableViewCell.cellWith(tableView: tableView, indexPath: indexPath)
+                dtCell.orderModel = orderDetailModel
                 return dtCell
-            case 4:
+            case 2+(productArr!.count):
                 let actCell = OrderApplyRefundAccountCell.cellWith(tableView: tableView, indexPath: indexPath)
+                actCell.isAllSelected = isAllSelected
+                actCell.refundPrice = self.calculateRefundAmount()
+                actCell.allSelectBlock = {
+                    [weak self] (isAllSel) in
+                    self?.isAllSelected = isAllSel
+                    self?.allSelectedAction(isAllSel)
+                }
                 return actCell
             default:
                 let productCell = OrderApplyRefundProductCell.cellWith(tableView: tableView, indexPath: indexPath)
+                productCell.orderModelDetailModel = productArr![indexPath.row-2]
+                productCell.productSelBlock = {
+                    [weak self] (isSel) in
+                    self?.productArr![indexPath.row-2].isSelect = isSel
+                    self?.judgeAllSelectedStatus()
+                }
                 return productCell
             }
         case 1:
@@ -123,13 +152,14 @@ extension OrderApplyRefundController : UITableViewDelegate, UITableViewDataSourc
             return reasonCell
         case 2:
             let phoneCell = OrderApplyRefundPhoneCell.cellWith(tableView: tableView, indexPath: indexPath)
+            phoneCell.orderModel = orderDetailModel
             return phoneCell
         case 3:
             let noteCell = OrderApplyRefundNoteInfoCell.cellWith(tableView: tableView, indexPath: indexPath)
+            noteCell.orderModel = orderDetailModel
             return noteCell
         case 4:
-            let photoCell = OrderApplyRefundPhotoCell.cellWith(tableView: tableView, indexPath: indexPath)
-            photoCell.imgCount = 0
+            let photoCell = OrderApplyRefundPhotoCell.cellWith(tableView: tableView, indexPath: indexPath)            
             photoCell.frame = tableView.bounds
             photoCell.layoutIfNeeded()
             photoCell.reloadData()
@@ -163,6 +193,39 @@ extension OrderApplyRefundController : UITableViewDelegate, UITableViewDataSourc
 
 // MARK: - 逻辑处理
 extension OrderApplyRefundController {
+    // 全选点击事件
+    func allSelectedAction(_ isSelected: Int) {
+        for productMdl in productArr ?? [] {
+            productMdl.isSelect = isSelected
+        }
+        tableView.reloadSections([0], with: UITableView.RowAnimation.none)
+    }
+    
+    // 校验商品是否全选
+    func judgeAllSelectedStatus() -> Void {
+        var isAllSel: Int = 1
+        for productMdl in productArr ?? [] {
+            if productMdl.isSelect == 0 {
+                isAllSel = 0
+                break
+            }
+        }
+        
+        self.isAllSelected = isAllSel
+        tableView.reloadSections([0], with: UITableView.RowAnimation.none)
+    }
+    
+    // 计算退款金额
+    func calculateRefundAmount() -> Int {
+        var totalPrice: Int = 0
+        for productMdl in productArr ?? [] {
+            if productMdl.isSelect == 1 {
+                totalPrice += productMdl.amount! * productMdl.productPrice!
+            }
+        }
+        return totalPrice
+    }
+    
     /// 获取退款原因
     func refundReasonApi() {
         SwiftMoyaNetWorkServiceProduct.shared().productRefundReasonApi { [weak self] (refundModel) -> (Void) in
@@ -170,4 +233,35 @@ extension OrderApplyRefundController {
             self?.refundReasonArr = refundModel.refundReason
         }
     }
+    
+    // 申请退款
+    func orderPurchaseRefundApi() {
+        
+        if productArr?.isEmpty ?? true {
+            SwiftProgressHUD.shared().showText("请选择退款商品")
+            return
+        }
+        
+        if selRefundReason?.count == 0 {
+            SwiftProgressHUD.shared().showText("请输入退款原因")
+            return
+        }
+        
+        // 子订单id参数
+        var subIdArr: Array<Int> = []
+        for productMdl in productArr ?? [] {
+            if productMdl.isSelect == 1 {
+                subIdArr.append(productMdl.id!)
+            }
+        }
+        let detailJsonStr = JSON(subIdArr).description
+        
+        
+        
+//        SwiftMoyaNetWorkServiceOrder.shared().orderPurchaseRefundApi(purchaseId: Int(orderDetailModel!.purchaseNo!)!, mobile: orderDetailModel!.mobile!, refundReason: selRefundReason!, refund_remark: orderDetailModel!.remark ?? "", detail: detailJsonStr, imgs: <#T##String#>) { (data) -> (Void) in
+//            print(data)
+//        }
+        
+    }
+    
 }

+ 4 - 2
RainbowPlanet/RainbowPlanet/Modules/OrderModule/OrderDetail/ViewController/OrderDetailViewController.swift

@@ -119,7 +119,9 @@ class OrderDetailViewController: BaseViewController {
             self.navigationController?.pushViewController(vc, animated: true)
         }
         if button.titleLabel?.text == "申请退款" {
-            
+            let vc = OrderApplyRefundController()
+            vc.orderDetailModel = self.orderDetailModel
+            self.navigationController?.pushViewController(vc, animated: true)
         }
     }
     
@@ -237,7 +239,7 @@ extension OrderDetailViewController : UITableViewDelegate, UITableViewDataSource
             case 0:
                 return 43
             case detail?.count ?? 0 + 1:
-                return 112
+                return UITableView.automaticDimension
             default:
                 return 40
             }

+ 28 - 0
RainbowPlanet/RainbowPlanet/Service/Model/ConfigModel/ImageUrlModel.swift

@@ -0,0 +1,28 @@
+//
+//  ImageUrlModel.swift
+//  RainbowPlanet
+//
+//  Created by Christopher on 2019/5/18.
+//  Copyright © 2019 RainbowPlanet. All rights reserved.
+//
+
+import Foundation
+import ObjectMapper
+
+
+class ImageUrlModel : NSObject, Mappable{
+    
+    var url : String?
+    
+    class func newInstance(map: Map) -> Mappable?{
+        return ImageUrlModel()
+    }
+    required init?(map: Map){}
+    private override init(){}
+    
+    func mapping(map: Map)
+    {
+        url <- map["url"]
+    }
+    
+}

+ 3 - 0
RainbowPlanet/RainbowPlanet/Service/Model/OrderModel/OrderListModel.swift

@@ -108,6 +108,9 @@ class OrderModelDetailModel : NSObject, Mappable{
     var skuName : String?
     var status : Int?
     
+    // 申请退款本地计算用
+    var isSelect: Int = 0
+    
     
     class func newInstance(map: Map) -> Mappable?{
         return OrderModelDetailModel()