Commit 7925a18f authored by lujunye's avatar lujunye

11

parent 7a4712d4
......@@ -48,7 +48,10 @@ class OrderDetailDbtInfoDataModel: Mappable {
var commission_time : String? //提成结算时间
var sum_commission_val : String? //总提成
var commission_type : String? //提成方式
var agent_name:String? //代理商名称
var share_type:String?
var commission_status:String?//结算状态
var commission_time_type:String? //提成发放方式
required init?( map: Map) {
}
......@@ -60,6 +63,10 @@ class OrderDetailDbtInfoDataModel: Mappable {
commission_time <- map["commission_time"]
sum_commission_val <- map["sum_commission_val"]
commission_type <- map["commission_type"]
agent_name <- map["agent_name"]
share_type <- map["share_type"]
commission_status <- map["commission_status"]
commission_time_type <- map["commission_time_type"]
}
}
......
......@@ -56,7 +56,7 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
let goodsTitleArr = ["商品合计"]
let fenxiaoTitleArr = ["分销角色","结算方式","提成方式","提成结算时间","提成分销结算"]
let fenxiaoTitleArr = ["分销角色","所属代理商","分享结算方式","系统结算方式","提现发放方式","提成结算时间"]
let orderTitleArr = ["订单编号","下单时间","订单来源","支付方式","支付状态","买家留言","订单备注"]
@IBOutlet weak var listView: UITableView!
......@@ -158,7 +158,10 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
cell.count_lbl.text = "单价:" + (rowModel?.goods_price)!
cell.yong_jin_lbl.text = "小计:" + String(format: "%.2f", p_count)
cell.dan_jia_lbl.text = "提成:¥" + (rowModel?.commission_val)!
cell.dan_jia_lbl.text = "提成:¥-"
if rowModel?.commission_val != nil {
cell.dan_jia_lbl.text = "提成:¥" + (rowModel?.commission_val)!
}
cell.xiao_ji_lbl.text = "数量:" + StringByInt(number: (rowModel?.cart_number!)!)
cell.delegate = self
cell.tag = indexPath.row
......@@ -177,7 +180,7 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
case 3:
switch indexPath.row {
case 0:
case 0://分销角色:
if self.dataMdoel?.order_res?.dbt_target == 1 {
cell.textTF.text = "供应商" + "(" + (self.dataMdoel?.order_res?.target_name)! + ")"
}else if self.dataMdoel?.order_res?.dbt_target == 2 {
......@@ -187,45 +190,38 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
}else{
cell.textTF.text = "-"
}
case 1:
if self.dataMdoel?.dbt_info?.dbt_type == 1 {
cell.textTF.text = "人工结算"
}else if self.dataMdoel?.dbt_info?.dbt_type == 2{
cell.textTF.text = "自动结算"
}else{
cell.textTF.text = "-"
case 1://所属代理商
cell.textTF.text = "-"
if self.dataMdoel?.dbt_info?.agent_name != nil {
cell.textTF.text = self.dataMdoel?.dbt_info?.agent_name!
}
case 2:
if self.dataMdoel?.dbt_info?.commission_type != nil{
if (self.dataMdoel?.dbt_info?.commission_type!.count)! > 0{
cell.textTF.text = self.dataMdoel?.dbt_info?.commission_type
}else{
cell.textTF.text = "-"
}
}else{
cell.textTF.text = "-"
case 2://分享结算方式:
cell.textTF.text = "-"
if self.dataMdoel?.dbt_info?.share_type != nil{
cell.textTF.text = self.dataMdoel?.dbt_info?.share_type!
}
case 3:
if self.dataMdoel?.dbt_info?.commission_time != nil{
if (self.dataMdoel?.dbt_info?.commission_time!.count)! > 0{
cell.textTF.text = self.dataMdoel?.dbt_info?.commission_time
}else{
cell.textTF.text = "-"
}
}else{
cell.textTF.text = "-"
case 3://系统结算方式:
cell.textTF.text = "-"
if self.dataMdoel?.dbt_info?.commission_status != nil {
var status = "自动结算"
if self.dataMdoel?.dbt_info?.dbt_type != 2{
status = "人工结算"
}
cell.textTF.text = status + "(\(self.dataMdoel!.dbt_info!.commission_status!))"
}
case 4:
cell.textTF.text = "¥" + (self.dataMdoel?.order_res!.sum_commission_val)!
default:
case 4://提现发放方式:
cell.textTF.text = "-"
if self.dataMdoel?.dbt_info!.commission_time_type != nil {
cell.textTF.text = self.dataMdoel?.dbt_info!.commission_time_type
}
break
default://提成结算时间:
cell.textTF.text = "-"
if self.dataMdoel?.dbt_info?.commission_time != nil && (self.dataMdoel?.dbt_info?.commission_time!.count)! > 0 {
cell.textTF.text = self.dataMdoel?.dbt_info!.commission_time
}
break
}
cell.nameLbl.text = fenxiaoTitleArr[indexPath.row]
......
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