Commit 91065bcf authored by lujunye's avatar lujunye

新增分销退款提示面板

parent 998c74e7
...@@ -66,6 +66,8 @@ ...@@ -66,6 +66,8 @@
E0206335246CE45A007A40C4 /* HeaderOnlyTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0206334246CE45A007A40C4 /* HeaderOnlyTitleView.xib */; }; E0206335246CE45A007A40C4 /* HeaderOnlyTitleView.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0206334246CE45A007A40C4 /* HeaderOnlyTitleView.xib */; };
E0228BB0246FDA9A005812FA /* TitleAndLblCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0228BAE246FDA9A005812FA /* TitleAndLblCell.swift */; }; E0228BB0246FDA9A005812FA /* TitleAndLblCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0228BAE246FDA9A005812FA /* TitleAndLblCell.swift */; };
E0228BB1246FDA9A005812FA /* TitleAndLblCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0228BAF246FDA9A005812FA /* TitleAndLblCell.xib */; }; E0228BB1246FDA9A005812FA /* TitleAndLblCell.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0228BAF246FDA9A005812FA /* TitleAndLblCell.xib */; };
E0232D6425C260A800FB56D4 /* Refund_Commend_View.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0232D6325C260A800FB56D4 /* Refund_Commend_View.swift */; };
E0232D6925C260B200FB56D4 /* Refund_Commend_View.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0232D6825C260B200FB56D4 /* Refund_Commend_View.xib */; };
E0239202249069FD00C4C632 /* CGDXQVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0239200249069FD00C4C632 /* CGDXQVc.swift */; }; E0239202249069FD00C4C632 /* CGDXQVc.swift in Sources */ = {isa = PBXBuildFile; fileRef = E0239200249069FD00C4C632 /* CGDXQVc.swift */; };
E0239203249069FD00C4C632 /* CGDXQVc.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0239201249069FD00C4C632 /* CGDXQVc.xib */; }; E0239203249069FD00C4C632 /* CGDXQVc.xib in Resources */ = {isa = PBXBuildFile; fileRef = E0239201249069FD00C4C632 /* CGDXQVc.xib */; };
E02392062490819600C4C632 /* CGDListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E02392042490819600C4C632 /* CGDListCell.swift */; }; E02392062490819600C4C632 /* CGDListCell.swift in Sources */ = {isa = PBXBuildFile; fileRef = E02392042490819600C4C632 /* CGDListCell.swift */; };
...@@ -779,6 +781,8 @@ ...@@ -779,6 +781,8 @@
E0206334246CE45A007A40C4 /* HeaderOnlyTitleView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HeaderOnlyTitleView.xib; sourceTree = "<group>"; }; E0206334246CE45A007A40C4 /* HeaderOnlyTitleView.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = HeaderOnlyTitleView.xib; sourceTree = "<group>"; };
E0228BAE246FDA9A005812FA /* TitleAndLblCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleAndLblCell.swift; sourceTree = "<group>"; }; E0228BAE246FDA9A005812FA /* TitleAndLblCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = TitleAndLblCell.swift; sourceTree = "<group>"; };
E0228BAF246FDA9A005812FA /* TitleAndLblCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TitleAndLblCell.xib; sourceTree = "<group>"; }; E0228BAF246FDA9A005812FA /* TitleAndLblCell.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = TitleAndLblCell.xib; sourceTree = "<group>"; };
E0232D6325C260A800FB56D4 /* Refund_Commend_View.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Refund_Commend_View.swift; sourceTree = "<group>"; };
E0232D6825C260B200FB56D4 /* Refund_Commend_View.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = Refund_Commend_View.xib; sourceTree = "<group>"; };
E0239200249069FD00C4C632 /* CGDXQVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGDXQVc.swift; sourceTree = "<group>"; }; E0239200249069FD00C4C632 /* CGDXQVc.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGDXQVc.swift; sourceTree = "<group>"; };
E0239201249069FD00C4C632 /* CGDXQVc.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CGDXQVc.xib; sourceTree = "<group>"; }; E0239201249069FD00C4C632 /* CGDXQVc.xib */ = {isa = PBXFileReference; lastKnownFileType = file.xib; path = CGDXQVc.xib; sourceTree = "<group>"; };
E02392042490819600C4C632 /* CGDListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGDListCell.swift; sourceTree = "<group>"; }; E02392042490819600C4C632 /* CGDListCell.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CGDListCell.swift; sourceTree = "<group>"; };
...@@ -3242,6 +3246,8 @@ ...@@ -3242,6 +3246,8 @@
F97E73312552A22000A11F98 /* DistributorSettingAlertView.xib */, F97E73312552A22000A11F98 /* DistributorSettingAlertView.xib */,
E0F038FB2599C5F500721011 /* GLTimeSelectView.swift */, E0F038FB2599C5F500721011 /* GLTimeSelectView.swift */,
E0F039002599C60200721011 /* GLTimeSelectView.xib */, E0F039002599C60200721011 /* GLTimeSelectView.xib */,
E0232D6325C260A800FB56D4 /* Refund_Commend_View.swift */,
E0232D6825C260B200FB56D4 /* Refund_Commend_View.xib */,
); );
path = AlertView; path = AlertView;
sourceTree = "<group>"; sourceTree = "<group>";
...@@ -3799,6 +3805,7 @@ ...@@ -3799,6 +3805,7 @@
E0A7548B244A8F0F00A84B67 /* CheckWareHourseViewController.xib in Resources */, E0A7548B244A8F0F00A84B67 /* CheckWareHourseViewController.xib in Resources */,
F956D5A4246A2D9C003FF510 /* .gitignore in Resources */, F956D5A4246A2D9C003FF510 /* .gitignore in Resources */,
E0BE8A80245A740600E80134 /* ChengGongCell.xib in Resources */, E0BE8A80245A740600E80134 /* ChengGongCell.xib in Resources */,
E0232D6925C260B200FB56D4 /* Refund_Commend_View.xib in Resources */,
E0190A2E2487696F00B1E067 /* NewSelectItemVc.xib in Resources */, E0190A2E2487696F00B1E067 /* NewSelectItemVc.xib in Resources */,
F95D9B5024484FAE0080D6E3 /* GeliAlertView.xib in Resources */, F95D9B5024484FAE0080D6E3 /* GeliAlertView.xib in Resources */,
F91E9EBF2579D00900FAFCFA /* RetailListMgVC.xib in Resources */, F91E9EBF2579D00900FAFCFA /* RetailListMgVC.xib in Resources */,
...@@ -4181,6 +4188,7 @@ ...@@ -4181,6 +4188,7 @@
E02392062490819600C4C632 /* CGDListCell.swift in Sources */, E02392062490819600C4C632 /* CGDListCell.swift in Sources */,
F950FDAB2451634B00C40530 /* LocationGeliPayModel.swift in Sources */, F950FDAB2451634B00C40530 /* LocationGeliPayModel.swift in Sources */,
E0CC84802482378D009B1FE9 /* IoGoodsDetailModel.swift in Sources */, E0CC84802482378D009B1FE9 /* IoGoodsDetailModel.swift in Sources */,
E0232D6425C260A800FB56D4 /* Refund_Commend_View.swift in Sources */,
E0D197C6244845FD002B080C /* PersonCenterViewController.swift in Sources */, E0D197C6244845FD002B080C /* PersonCenterViewController.swift in Sources */,
E0F1BE4824692379003015B2 /* ItemCell.swift in Sources */, E0F1BE4824692379003015B2 /* ItemCell.swift in Sources */,
E09B03AB2445B0A300211A51 /* LoginModel.swift in Sources */, E09B03AB2445B0A300211A51 /* LoginModel.swift in Sources */,
......
...@@ -91,6 +91,7 @@ class OrderDetailResModel: Mappable { ...@@ -91,6 +91,7 @@ class OrderDetailResModel: Mappable {
var pay_type_cn : String? //支付方式中文 var pay_type_cn : String? //支付方式中文
var pay_status_cn : String? //支付状态中文 var pay_status_cn : String? //支付状态中文
var order_type : Int?//订单类型 1普通2期货3团购4预售 var order_type : Int?//订单类型 1普通2期货3团购4预售
var commission_time_type:Int?//佣金退款类型
var order_status : Int?//订单状态 var order_status : Int?//订单状态
var order_status_d : Int?//订单详细状态 var order_status_d : Int?//订单详细状态
var shipping_type : Int?//配送方式:1派送,2自提 var shipping_type : Int?//配送方式:1派送,2自提
...@@ -139,6 +140,7 @@ class OrderDetailResModel: Mappable { ...@@ -139,6 +140,7 @@ class OrderDetailResModel: Mappable {
pay_type_cn <- map["pay_type_cn"] pay_type_cn <- map["pay_type_cn"]
pay_status_cn <- map["pay_status_cn"] pay_status_cn <- map["pay_status_cn"]
order_type <- map["order_type"] order_type <- map["order_type"]
commission_time_type <- map["commission_time_type"]
order_status <- map["order_status"] order_status <- map["order_status"]
order_status_d <- map["order_status_d"] order_status_d <- map["order_status_d"]
logistics_price <- map["logistics_price"] logistics_price <- map["logistics_price"]
......
...@@ -33,6 +33,7 @@ class OrderListDataModel: Mappable { ...@@ -33,6 +33,7 @@ class OrderListDataModel: Mappable {
var order_status_d : Int? //订单详细状态 var order_status_d : Int? //订单详细状态
var goods_before_pay :Int? //是否为先货后款:0否 1是 var goods_before_pay :Int? //是否为先货后款:0否 1是
var order_type : Int? //订单类型 1普通2期货3团购4预售5分销商品 var order_type : Int? //订单类型 1普通2期货3团购4预售5分销商品
var commission_time_type:Int?//佣金退款类型
var pay_status : Int? //支付状态 var pay_status : Int? //支付状态
var pay_type : Int? //支付类型 var pay_type : Int? //支付类型
var apply_cancel:Int? //申请取消订单标识:0待申请 1申请取消中 2已取消 var apply_cancel:Int? //申请取消订单标识:0待申请 1申请取消中 2已取消
...@@ -65,7 +66,7 @@ class OrderListDataModel: Mappable { ...@@ -65,7 +66,7 @@ class OrderListDataModel: Mappable {
cus_name <- map["cus_name"] cus_name <- map["cus_name"]
goods_number <- map["goods_number"] goods_number <- map["goods_number"]
order_goods <- map["order_goods"] order_goods <- map["order_goods"]
commission_time_type <- map["commission_time_type"]
} }
} }
......
//
// Refund_Commend_View.swift
// GeliBusinessPlatform
//
// Created by junye lu on 2021/1/28.
// Copyright © 2021 junye lu. All rights reserved.
//
import UIKit
protocol Refund_Commend_View_Delegate {
func Refund_Commend_View_submit(type:Int)
}
class Refund_Commend_View: UIView {
var delegate:Refund_Commend_View_Delegate?
var is_pay_own = 1
@IBAction func submit_action(_ sender: UIButton) {
delegate?.Refund_Commend_View_submit(type: is_pay_own)
}
@IBAction func btn_click(_ sender: UIButton) {
btns_select_bg.isHidden = true
status_lbl.text = sender.titleLabel?.text
is_pay_own = sender.tag
}
@IBOutlet weak var btns_select_bg: UIView!
@IBAction func show_hide_action(_ sender: UIButton) {
btns_select_bg.isHidden = !btns_select_bg.isHidden
}
@IBOutlet weak var status_lbl: UILabel!
@IBAction func closet_action(_ sender: UIButton) {
self.removeFromSuperview()
}
var contentView:UIView!
//初始化时将xib中的view添加进来
override init(frame: CGRect) {
super.init(frame: frame)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
// /初始化时将xib中的view添加进来
required init?(coder aDecoder: NSCoder) {
super.init(coder: aDecoder)
contentView = loadViewFromNib()
addSubview(contentView)
contentView.snp.makeConstraints { (make) in
make.left.top.right.bottom.equalToSuperview()
}
}
//加载xib
func loadViewFromNib() -> UIView {
let className = type(of: self)
let bundle = Bundle(for: className)
let name = NSStringFromClass(className).components(separatedBy: ".").last
let nib = UINib(nibName: name!, bundle: bundle)
let view = nib.instantiate(withOwner: self, options: nil).first as! UIView
return view
}
}
This diff is collapsed.
...@@ -9,10 +9,14 @@ ...@@ -9,10 +9,14 @@
import UIKit import UIKit
import ViewAnimator //cell动效 import ViewAnimator //cell动效
class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSource, GeliAlertViewDelegate, OrderDViewControllerDelegate,CGDListCellDelegate{ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSource, GeliAlertViewDelegate, OrderDViewControllerDelegate,CGDListCellDelegate, Refund_Commend_View_Delegate{
let UserToken = UserDefaults.standard.value(forKey: "user_token") func Refund_Commend_View_submit(type: Int) {
is_pay_own = type
}
let UserToken = UserDefaults.standard.value(forKey: "user_token")
//MARK:--基础数据 //MARK:--基础数据
var is_pay_own = 0
var keyword: String = "" var keyword: String = ""
var startTime : Int = 0 var startTime : Int = 0
var endTime : Int = 0 var endTime : Int = 0
...@@ -150,7 +154,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -150,7 +154,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
var tableV :UITableView! var tableV :UITableView!
var tableSearchV :UITableView! = nil var tableSearchV :UITableView! = nil
// private let animations = [AnimationType.from(direction: .bottom, offset: 300*glscale)] // private let animations = [AnimationType.from(direction: .bottom, offset: 300*glscale)]
private let animations = [AnimationType.vector(CGVector(dx: 0, dy: 300*glscale))] private let animations = [AnimationType.vector(CGVector(dx: 0, dy: 300*glscale))]
func setTabv() { func setTabv() {
tableV = UITableView() tableV = UITableView()
...@@ -374,6 +378,12 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -374,6 +378,12 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
}else if sender.titleLabel?.text == "退款" || sender.titleLabel?.text == "取消订单并退款"{ }else if sender.titleLabel?.text == "退款" || sender.titleLabel?.text == "取消订单并退款"{
isSrueOrder = 3 isSrueOrder = 3
if rowModel.commission_time_type == 1 && rowModel.order_type == 5 {
let alertView = Refund_Commend_View(frame: self.view.window!.bounds)
alertView.delegate = self
self.view.window?.addSubview(alertView)
return
}
let alertView = GeliAlertView(frame: self.view.window!.bounds) let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self; alertView.delegate = self;
alertView.tishiLbl.text = "" alertView.tishiLbl.text = ""
...@@ -577,7 +587,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -577,7 +587,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
} }
break break
case 3: case 3:
orderRefund(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in orderRefund(["user_token":UserToken as Any,"order_id" : sender.tag as Any , "is_pay_own":is_pay_own as Any], success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "提交成功"),delay: 1.2) HUD.flash(.labeledSubSuccess(subtitle: "提交成功"),delay: 1.2)
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "orderChange"), object: nil) NotificationCenter.default.post(name: NSNotification.Name(rawValue: "orderChange"), object: nil)
......
...@@ -11,7 +11,11 @@ import Photos ...@@ -11,7 +11,11 @@ import Photos
protocol OrderDViewControllerDelegate { protocol OrderDViewControllerDelegate {
func refishingOrderDchange() func refishingOrderDchange()
} }
class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate,UpBillDataTableViewCellDelegate, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate{ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate,UpBillDataTableViewCellDelegate, DaiKeXiaDanGouWuCellDelegate, S_Y_View_Delegate, Refund_Commend_View_Delegate{
func Refund_Commend_View_submit(type: Int) {
is_pay_own = type
}
var is_pay_own = 0
func S_Y_View_Check_Detail() { func S_Y_View_Check_Detail() {
print("查看溯源") print("查看溯源")
let vc = S_Y_Detail_Vc() let vc = S_Y_Detail_Vc()
...@@ -1451,6 +1455,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1451,6 +1455,13 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
break break
case "退款","取消订单并退款": case "退款","取消订单并退款":
if self.dataMdoel?.order_res?.commission_time_type == 1 && self.dataMdoel?.order_res?.order_type == 5 {
let alertView = Refund_Commend_View(frame: self.view.window!.bounds)
alertView.delegate = self
self.view.window?.addSubview(alertView)
return
}
let alertView = GeliAlertView(frame: self.view.window!.bounds) let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self; alertView.delegate = self;
alertView.tishiLbl.text = "" alertView.tishiLbl.text = ""
...@@ -1633,7 +1644,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1633,7 +1644,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
}else if sender.tag == 1004 { }else if sender.tag == 1004 {
HUD.flash(.progress) HUD.flash(.progress)
orderRefund(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any], success: { (data) in orderRefund(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any,"is_pay_own":is_pay_own as Any], success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "提交成功"),delay: 1.2) HUD.flash(.labeledSubSuccess(subtitle: "提交成功"),delay: 1.2)
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "orderChange"), object: nil) NotificationCenter.default.post(name: NSNotification.Name(rawValue: "orderChange"), object: nil)
self.delegate?.refishingOrderDchange() self.delegate?.refishingOrderDchange()
......
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