Commit e2f7952f authored by 刘俊宏's avatar 刘俊宏

调整普通下运单 智能选择物流公司

parent 692d3661
......@@ -229,6 +229,19 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
alertView.jdPriceLbl.text = "京东冷运(预估运费" + (logPayPriceModel?.price_jd)! + "元)"
alertView.sfPriceLbl.text = "顺丰冷运(预估运费" + (logPayPriceModel?.price_sf)! + "元)"
self.view.window?.addSubview(alertView)
if logPayPriceModel?.price_sf == "-" {
alertView.jdSelectBtn.isSelected = true
alertView.sfSelectBtn.isSelected = false
}else if logPayPriceModel?.price_sf != "-" && logPayPriceModel?.price_jd != "-" {
alertView.jdSelectBtn.isSelected = false
alertView.sfSelectBtn.isSelected = true
let num1 = logPayPriceModel?.price_sf as! NSString
let num2 = logPayPriceModel?.price_jd as! NSString
if num1.floatValue > num2.floatValue {
alertView.jdSelectBtn.isSelected = true
alertView.sfSelectBtn.isSelected = false
}
}
}else{
HUD.flash(.label("未同意快件服务协议无法下单"), delay: 1.2)
}
......@@ -1307,6 +1320,16 @@ class XiaYunDanViewController: BaseViewController,UITableViewDelegate,UITableVie
let dataModel = data as! registerModel
self.logPayPriceModel = dataModel.data
self.priceLbl.text = "¥" + (dataModel.data?.price_sf)!
if dataModel.data?.price_sf == "-"{
self.priceLbl.text = "¥" + (dataModel.data?.price_jd)!
}else if dataModel.data?.price_sf != "-" && dataModel.data?.price_jd != "-" {
self.priceLbl.text = "¥" + (dataModel.data?.price_sf)!
let num1 = dataModel.data?.price_sf as! NSString
let num2 = dataModel.data?.price_jd as! NSString
if num1.floatValue > num2.floatValue {
self.priceLbl.text = "¥" + (dataModel.data?.price_jd)!
}
}
}) { (error) in
}
......
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