Commit 0894cb9b authored by lujunye's avatar lujunye

调整点击通过bug

parent 04c5c46c
...@@ -93,15 +93,17 @@ class CRKCell: UITableViewCell { ...@@ -93,15 +93,17 @@ class CRKCell: UITableViewCell {
rightBtn.isHidden = true rightBtn.isHidden = true
btmH.constant = 15 btmH.constant = 15
}else{ }else{
if status == 1 { if status == 1 {
leftBtn.isHidden = false leftBtn.isHidden = false
rightBtn.isHidden = false rightBtn.isHidden = false
leftBtn.backgroundColor = UIColor.white leftBtn.backgroundColor = UIColor.white
leftBtn.setTitle("通过", for: .normal) leftBtn.setTitle("通过", for: .normal)
leftBtn.setTitleColor(UIColor.white, for: .normal) leftBtn.setTitleColor(UIColor.white, for: .normal)
leftBtn.isUserInteractionEnabled = true
leftBtn.backgroundColor = UIColor(named: "蓝色字体颜色") leftBtn.backgroundColor = UIColor(named: "蓝色字体颜色")
leftBtn.layer.cornerRadius = 3 leftBtn.layer.cornerRadius = 3
}else{ //通过,不通过 }else{
rightBtn.isHidden = true rightBtn.isHidden = true
leftBtn.isHidden = false leftBtn.isHidden = false
leftBtn.backgroundColor = UIColor.white leftBtn.backgroundColor = UIColor.white
......
...@@ -392,9 +392,11 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -392,9 +392,11 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
var alterView:GeliAlertTextView? var alterView:GeliAlertTextView?
//MARK: - 通过,不通过方法 //MARK: - 通过,不通过方法
func CRKCellBtnClick(sender: UIButton, cell: CRKCell) { func CRKCellBtnClick(sender: UIButton, cell: CRKCell) {
selectIdx = cell.tag selectIdx = cell.tag
let data = datas![selectIdx!]
if sender.tag == 0 {//通过 if sender.tag == 0 {//通过
if io_type == 1 { if data.io_type == 1{
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 = ""
...@@ -402,7 +404,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -402,7 +404,7 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确定"), for: .normal) alertView.rightBtn.setAttributedTitle(NSAttributedString(string: "确定"), for: .normal)
self.view.window?.addSubview(alertView) self.view.window?.addSubview(alertView)
} }
if io_type == 2 { if data.io_type == 2 {
let alterView = GeliAlertTextView(frame: self.view.window!.bounds) let alterView = GeliAlertTextView(frame: self.view.window!.bounds)
alterView.delegate = self alterView.delegate = self
self.view.window?.addSubview(alterView) self.view.window?.addSubview(alterView)
...@@ -444,12 +446,15 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR ...@@ -444,12 +446,15 @@ class CRKListVC: BaseViewController,UITableViewDelegate,UITableViewDataSource,CR
cell.isGm = isGm cell.isGm = isGm
let model = datas![indexPath.row] let model = datas![indexPath.row]
cell.status = model.status cell.status = model.status
cell.isGm = false cell.isGm = false
if model.io_type == 1 && auth.contains("122"){ if model.io_type == 1 && auth.contains("122"){
cell.isGm = true cell.isGm = true
} }
if model.io_type == 2 && auth.contains("121"){ if model.io_type == 2 && auth.contains("121"){
cell.isGm = true cell.isGm = true
} }
cell.dataArr = model.goods_res cell.dataArr = model.goods_res
cell.delegate = self cell.delegate = self
......
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