Commit f71bf621 authored by lujunye's avatar lujunye

补充逻辑

parent 00df6f60
...@@ -70,7 +70,7 @@ class OrderDetailResModel: Mappable { ...@@ -70,7 +70,7 @@ class OrderDetailResModel: Mappable {
var order_status_d : Int?//订单详细状态 var order_status_d : Int?//订单详细状态
var shipping_type : Int?//配送方式:1派送,2自提 var shipping_type : Int?//配送方式:1派送,2自提
var shipping_status : Int?//商品配送情况;0未发货,1已发货,2已收货,4退货 var shipping_status : Int?//商品配送情况;0未发货,1已发货,2已收货,4退货
var goods_before_pay:Int?
var sale_res : OrderDetailSaleResModel?//订单预售详情(不是预售订单为空数组,无key=>value) var sale_res : OrderDetailSaleResModel?//订单预售详情(不是预售订单为空数组,无key=>value)
required init?( map: Map) { required init?( map: Map) {
...@@ -79,6 +79,7 @@ class OrderDetailResModel: Mappable { ...@@ -79,6 +79,7 @@ class OrderDetailResModel: Mappable {
func mapping(map: Map) { func mapping(map: Map) {
order_id <- map["order_id"] order_id <- map["order_id"]
order_sn <- map["order_sn"] order_sn <- map["order_sn"]
goods_before_pay <- map["goods_before_pay"]
add_time <- map["add_time"] add_time <- map["add_time"]
apply_cancel <- map["apply_cancel"] apply_cancel <- map["apply_cancel"]
user_id <- map["user_id"] user_id <- map["user_id"]
...@@ -113,7 +114,7 @@ class OrderDetailResModel: Mappable { ...@@ -113,7 +114,7 @@ class OrderDetailResModel: Mappable {
} }
} }
func orderStatusStrByInt(statusNumber:Int,status_d:Int) -> String? { func orderStatusStrByInt(statusNumber:Int,status_d:Int,isBfPay:Int,LmIdx:Int) -> String? {
var str = "订单完成" var str = "订单完成"
switch statusNumber { switch statusNumber {
case 0: case 0:
...@@ -126,6 +127,11 @@ func orderStatusStrByInt(statusNumber:Int,status_d:Int) -> String? { ...@@ -126,6 +127,11 @@ func orderStatusStrByInt(statusNumber:Int,status_d:Int) -> String? {
break break
case 6: case 6:
str = "待发货" str = "待发货"
if LmIdx == 1 {
if isBfPay == 1 {
str = "待付款"
}
}
break break
case 7: case 7:
str = "待收货" str = "待收货"
......
...@@ -195,7 +195,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -195,7 +195,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
cell.nameLbl.text = rowModel.user_name! cell.nameLbl.text = rowModel.user_name!
} }
cell.orderNumerLbl.text = rowModel.order_sn! cell.orderNumerLbl.text = rowModel.order_sn!
cell.statusLbl.text = orderStatusStrByInt(statusNumber: rowModel.order_status!,status_d:rowModel.order_status_d!) cell.statusLbl.text = orderStatusStrByInt(statusNumber: rowModel.order_status!, status_d: rowModel.order_status_d!, isBfPay: rowModel.goods_before_pay!, LmIdx: orderStatus)
cell.countLbl.text = "\(rowModel.goods_number!)" cell.countLbl.text = "\(rowModel.goods_number!)"
cell.priceLbl.text = rowModel.sum_amount cell.priceLbl.text = rowModel.sum_amount
cell.timeLbl.text = TimeByDouble(sender: rowModel.add_time!) cell.timeLbl.text = TimeByDouble(sender: rowModel.add_time!)
...@@ -262,7 +262,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -262,7 +262,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
break break
case 10://已收货 case 10://已收货
btnStr = ["交易关闭"] btnStr = ["查看订单"]
if rowModel.pay_status == 0 { if rowModel.pay_status == 0 {
btnStr = ["确认收款"] btnStr = ["确认收款"]
} }
...@@ -430,6 +430,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -430,6 +430,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
let vc = OrderDViewController() let vc = OrderDViewController()
vc.delegate = self vc.delegate = self
vc.orderId = rowModel.order_id! vc.orderId = rowModel.order_id!
vc.lmIdx = orderStatus
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
} }
...@@ -572,7 +573,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc ...@@ -572,7 +573,7 @@ class OrderListVC: BaseViewController, UITableViewDelegate, UITableViewDataSourc
let vc = OrderDViewController() let vc = OrderDViewController()
vc.delegate = self vc.delegate = self
vc.orderId = rowModel.order_id! vc.orderId = rowModel.order_id!
vc.lmIdx = orderStatus
self.navigationController?.pushViewController(vc, animated: true) self.navigationController?.pushViewController(vc, animated: true)
} }
func refishingOrderDchange() { func refishingOrderDchange() {
......
...@@ -11,6 +11,8 @@ protocol OrderDViewControllerDelegate { ...@@ -11,6 +11,8 @@ protocol OrderDViewControllerDelegate {
func refishingOrderDchange() func refishingOrderDchange()
} }
class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate{ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDataSource,TitleAndBtnCellDelegate,GuanLianKehuVCDelegate,OrderDViewFooterViewDelegate,TitleAndTFCellDelegate,GeliAlertViewDelegate,GLAlertSelectViewDelegate,XiuGaiYuShouJiaViewControllerDelegate,ChangeGoodsPriceVCDelegate,GeliAlertTextFiledDelegate,GeliAlertTextViewDelegate{
var lmIdx = 100
func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) { func GLASClose(view: GLAlertSelectView, selectnum: Int, selectArr: Array<Int>) {
if selectnum != 10086 { if selectnum != 10086 {
if view.titleLbl.text == "请选择支付方式" { if view.titleLbl.text == "请选择支付方式" {
...@@ -1091,7 +1093,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1091,7 +1093,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
let view1 = TitleAndLblView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49)) let view1 = TitleAndLblView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 49))
view1.nameLbl.text = "订单状态" view1.nameLbl.text = "订单状态"
//订单状态 //订单状态
view1.contentLbl.text = orderStatusStrByInt(statusNumber: (self.dataMdoel?.order_res?.order_status)!,status_d: (self.dataMdoel?.order_res?.order_status_d)!) view1.contentLbl.text = orderStatusStrByInt(statusNumber: (self.dataMdoel?.order_res?.order_status)!, status_d: (self.dataMdoel?.order_res?.order_status_d)!, isBfPay:(self.dataMdoel?.order_res!.goods_before_pay)! , LmIdx: lmIdx)
view.addSubview(view1) view.addSubview(view1)
return view return view
case 3: case 3:
...@@ -1210,7 +1212,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1210,7 +1212,7 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
break break
case 10: case 10:
// str = "订单关闭"str = "已取消" //用户取消(预售 // str = "订单关闭"str = "已取消" //用户取消(预售
titleArr = ["退货退款","交易关闭"] titleArr = ["退货退款","查看订单"]
if self.dataMdoel!.order_res?.pay_status == 0 { if self.dataMdoel!.order_res?.pay_status == 0 {
titleArr = ["确认收款"] titleArr = ["确认收款"]
} }
......
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