Commit 9fc3c70e authored by lujunye's avatar lujunye

补充逻辑收款

parent 0a3baf6b
...@@ -25,7 +25,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -25,7 +25,8 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
didSet{ didSet{
if !isUpData { if !isUpData {
if tableV != nil { if tableV != nil {
loadData() // loadData()
tableV.mj_header?.beginRefreshing()
} }
} }
} }
...@@ -363,7 +364,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -363,7 +364,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
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 = ""
alertView.titileLbl.text = "是否\(sender.titleLabel?.text)?" alertView.titileLbl.text = "是否\(sender.titleLabel!.text!)?"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal) alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal)
alertView.rightBtn.tag = rowModel.order_id! alertView.rightBtn.tag = rowModel.order_id!
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
...@@ -376,6 +377,15 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -376,6 +377,15 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal) alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal)
alertView.rightBtn.tag = rowModel.order_id! alertView.rightBtn.tag = rowModel.order_id!
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
}else if sender.titleLabel?.text == "确认收款"{
isSrueOrder = 10
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self;
alertView.tishiLbl.text = ""
alertView.titileLbl.text = "是否\(sender.titleLabel!.text!)?"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal)
alertView.rightBtn.tag = rowModel.order_id!
self.view.window?.addSubview(alertView)
}else if sender.titleLabel?.text == "发货" { }else if sender.titleLabel?.text == "发货" {
isSrueOrder = 4 isSrueOrder = 4
if rowModel.order_type == 4 { if rowModel.order_type == 4 {
...@@ -421,8 +431,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -421,8 +431,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
orderConfirm(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in orderConfirm(["user_token":UserToken as Any,"order_id" : sender.tag 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -431,9 +440,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -431,9 +440,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
orderCancel(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in orderCancel(["user_token":UserToken as Any,"order_id" : sender.tag 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -442,9 +449,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -442,9 +449,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
refuseOrder(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in refuseOrder(["user_token":UserToken as Any,"order_id" : sender.tag 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -453,8 +458,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -453,8 +458,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
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], 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -464,8 +468,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -464,8 +468,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
sendOutAd(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in sendOutAd(["user_token":UserToken as Any,"order_id" : sender.tag 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -473,8 +476,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -473,8 +476,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
sendOut(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in sendOut(["user_token":UserToken as Any,"order_id" : sender.tag 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -484,8 +486,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -484,8 +486,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
refundAndSalesReturn(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in refundAndSalesReturn(["user_token":UserToken as Any,"order_id" : sender.tag 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -501,8 +502,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -501,8 +502,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
orderRefundRefuse(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"type":type as Any], success: { (data) in orderRefundRefuse(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"type":type 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -511,8 +511,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -511,8 +511,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
orderCancelAudit(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"type":1 as Any], success: { (data) in orderCancelAudit(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"type":1 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -521,8 +520,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -521,8 +520,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
orderCancelAudit(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"type":2 as Any], success: { (data) in orderCancelAudit(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"type":2 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.tableV.mj_header?.beginRefreshing()
self.loadData()
}) { (error) in }) { (error) in
} }
...@@ -531,8 +529,16 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -531,8 +529,16 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
orderConfirm(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"goods_before_pay":1 as Any], success: { (data) in orderConfirm(["user_token":UserToken as Any,"order_id" : sender.tag as Any,"goods_before_pay":1 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.tableV.mj_header?.beginRefreshing()
self.loadData() }) { (error) in
}
break
case 10:
ConfirmRefund(["user_token":UserToken as Any,"order_id" : sender.tag as Any], success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "提交成功"),delay: 1.2)
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "orderChange"), object: nil)
}) { (error) in }) { (error) in
} }
......
...@@ -152,8 +152,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -152,8 +152,6 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal) alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal)
alertView.rightBtn.tag = 1010 alertView.rightBtn.tag = 1010
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
break break
case "修改价格": case "修改价格":
if isYuShou { if isYuShou {
...@@ -247,15 +245,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -247,15 +245,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
break break
case "同意接单": case "同意接单":
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 = ""
alertView.titileLbl.text = "是否同意接单?" alertView.titileLbl.text = "是否同意接单?"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal) alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal)
alertView.rightBtn.tag = 1008 alertView.rightBtn.tag = 1008
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
break break
case "拒绝接单": case "拒绝接单":
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 = ""
...@@ -264,6 +262,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -264,6 +262,15 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
alertView.rightBtn.tag = 1009 alertView.rightBtn.tag = 1009
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
break break
case "确认收款","确认收到退款":
let alertView = GeliAlertView(frame: self.view.window!.bounds)
alertView.delegate = self;
alertView.tishiLbl.text = ""
alertView.titileLbl.text = "是否确认收款?"
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确认"), for: .normal)
alertView.rightBtn.tag = 1011
self.view.window?.addSubview(alertView)
break
case "付款码": case "付款码":
let alertView = GeliAltetCodeView(frame: self.view.window!.bounds) let alertView = GeliAltetCodeView(frame: self.view.window!.bounds)
alertView.saveImgID = orderId alertView.saveImgID = orderId
...@@ -1301,13 +1308,22 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1301,13 +1308,22 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
} }
}else if sender.tag == 1010 { }else if sender.tag == 1010 {
orderConfirm(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any,"goods_before_pay":1 as Any], success: { (data) in orderConfirm(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any,"goods_before_pay":1 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()
self.loadData() self.loadData()
}) { (error) in }) { (error) in
} }
}else if sender.tag == 1011{
ConfirmRefund(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id], success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "提交成功"),delay: 1.2)
NotificationCenter.default.post(name: NSNotification.Name(rawValue: "orderChange"), object: nil)
self.delegate?.refishingOrderDchange()
self.loadData()
}) { (error) in
}
}else if sender.tag == 1009 { }else if sender.tag == 1009 {
refuseOrder(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any], success: { (data) in refuseOrder(["user_token":UserToken as Any,"order_id" : self.dataMdoel?.order_res?.order_id as Any], success: { (data) in
HUD.flash(.labeledSubSuccess(subtitle: "取消成功"),delay: 1.2) HUD.flash(.labeledSubSuccess(subtitle: "取消成功"),delay: 1.2)
......
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