Commit 792c1697 authored by lujunye's avatar lujunye

1.5待提交版本

parent f3c7948b
...@@ -95,6 +95,7 @@ class accountsPayableDetailDataListModel: Mappable { ...@@ -95,6 +95,7 @@ class accountsPayableDetailDataListModel: Mappable {
var payable_money:String? //欠款额 var payable_money:String? //欠款额
var status :Int? //支付状态:1应付未付 2应付已付 var status :Int? //支付状态:1应付未付 2应付已付
var po_no :String? //采购单号 var po_no :String? //采购单号
var pay_time:Double?//支付时间
required init?( map: Map) { required init?( map: Map) {
...@@ -111,6 +112,7 @@ class accountsPayableDetailDataListModel: Mappable { ...@@ -111,6 +112,7 @@ class accountsPayableDetailDataListModel: Mappable {
payable_money <- map["payable_money"] payable_money <- map["payable_money"]
status <- map["status"] status <- map["status"]
po_no <- map["po_no"] po_no <- map["po_no"]
pay_time <- map["pay_time"]
} }
} }
...@@ -211,7 +213,7 @@ class accountReceivableDetailListModel: Mappable { ...@@ -211,7 +213,7 @@ class accountReceivableDetailListModel: Mappable {
var money_type :Int? var money_type :Int?
var order_sn:String? //单号 var order_sn:String? //单号
var pay_time:Double?
required init?( map: Map) { required init?( map: Map) {
} }
...@@ -232,5 +234,6 @@ class accountReceivableDetailListModel: Mappable { ...@@ -232,5 +234,6 @@ class accountReceivableDetailListModel: Mappable {
money_type <- map["money_type"] money_type <- map["money_type"]
order_sn <- map["order_sn"] order_sn <- map["order_sn"]
pay_time <- map["pay_time"]
} }
} }
...@@ -44,14 +44,18 @@ class YingFuZhangKuanXQCell: UITableViewCell { ...@@ -44,14 +44,18 @@ class YingFuZhangKuanXQCell: UITableViewCell {
if data != nil { if data != nil {
nameLbl.text = data?.order_sn nameLbl.text = data?.order_sn
dateLbl.text = dayAndTimeByDouble(sender: (data?.create_time)!) if data?.create_time != nil {
date2Lbl.text = "收款时间:" + dateLbl.text! dateLbl.text = dayAndTimeByDouble(sender: (data?.create_time)!)
}
date2Lbl.isHidden = true
if data?.pay_time != 0 && data?.pay_time != nil {
date2Lbl.text = "收款时间:" + dayAndTimeByDouble(sender: (data?.pay_time)!)
date2Lbl.isHidden = false
}
priceLbl3.text = data?.arrears_money! priceLbl3.text = data?.arrears_money!
// if data?.type == 1 { priceLbl1.text = data?.money
priceLbl1.text = data?.money priceLbl2.text = data?.money
// }else{
priceLbl2.text = data?.money
// }
submitBtn.isUserInteractionEnabled = true submitBtn.isUserInteractionEnabled = true
if data?.type == 2 && data?.status == 0 { if data?.type == 2 && data?.status == 0 {
...@@ -59,9 +63,9 @@ class YingFuZhangKuanXQCell: UITableViewCell { ...@@ -59,9 +63,9 @@ class YingFuZhangKuanXQCell: UITableViewCell {
submitBtn.setTitleColor(UIColor(named: "灰色字体颜色"), for: .normal) submitBtn.setTitleColor(UIColor(named: "灰色字体颜色"), for: .normal)
submitBtn.setTitle("设置未收款", for: .normal) submitBtn.setTitle("设置未收款", for: .normal)
submitBtn.layer.borderWidth = 1 submitBtn.layer.borderWidth = 1
date2Lbl.isHidden = false
}else if data?.type == 1 && data?.status == 1 { }else if data?.type == 1 && data?.status == 1 {
date2Lbl.isHidden = true
priceLbl2.text = "-" priceLbl2.text = "-"
submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色") submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色")
submitBtn.setTitle("收款", for: .normal) submitBtn.setTitle("收款", for: .normal)
...@@ -77,23 +81,26 @@ class YingFuZhangKuanXQCell: UITableViewCell { ...@@ -77,23 +81,26 @@ class YingFuZhangKuanXQCell: UITableViewCell {
} }
if model != nil { if model != nil {
nameLbl.text = model?.po_no! nameLbl.text = model?.po_no!
dateLbl.text = dayAndTimeByDouble(sender: (model?.create_time!)!) dateLbl.text = dayAndTimeByDouble(sender: (model?.create_time!)!)
date2Lbl.text = "付款时间:" + dateLbl.text! date2Lbl.isHidden = true
// if model?.type == 1 {//应付 if model?.pay_time != 0 && model?.pay_time != nil {
priceLbl1.text = model?.money date2Lbl.text = "付款时间:" + dayAndTimeByDouble(sender: (model?.pay_time!)!)
// }else{//已付 date2Lbl.isHidden = false
priceLbl2.text = model?.money }
// } // if model?.type == 1 {//应付
priceLbl1.text = model?.money
// }else{//已付
priceLbl2.text = model?.money
// }
priceLbl3.text = model?.payable_money priceLbl3.text = model?.payable_money
submitBtn.backgroundColor = UIColor.clear submitBtn.backgroundColor = UIColor.clear
submitBtn.setTitleColor(UIColor(named: "灰色字体颜色"), for: .normal) submitBtn.setTitleColor(UIColor(named: "灰色字体颜色"), for: .normal)
submitBtn.setTitle("设置未付款", for: .normal) submitBtn.setTitle("设置未付款", for: .normal)
submitBtn.layer.borderWidth = 1 submitBtn.layer.borderWidth = 1
date2Lbl.isHidden = false
if model?.status == 1 { if model?.status == 1 {
date2Lbl.isHidden = true
priceLbl2.text = "-" priceLbl2.text = "-"
submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色") submitBtn.backgroundColor = UIColor(named: "按钮渐变色下,字体颜色")
submitBtn.setTitle("付款", for: .normal) submitBtn.setTitle("付款", for: .normal)
......
...@@ -399,7 +399,7 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea ...@@ -399,7 +399,7 @@ class YingFuZhangKuanXQViewController:BaseViewController,UISearchBarDelegate,Sea
}else{ }else{
self.second = "0" self.second = "0"
} }
self.listView.reloadData() self.listView.reloadData()
self.listView.mj_header?.endRefreshing() self.listView.mj_header?.endRefreshing()
self.page = 2 self.page = 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