Commit 647d9724 authored by pete谢兆麟's avatar pete谢兆麟

bug修复

parent 1a093e55
...@@ -65,7 +65,12 @@ extension YHSelectViewController { ...@@ -65,7 +65,12 @@ extension YHSelectViewController {
} }
self.headView.items = dataSource self.headView.items = dataSource
} }
self.viewModel.getGoodsList(categoryID: "0", sortType: 0) {[weak self] success, error in var id = "0"
if selectItem < self.viewModel.categoryArray.count {
let model = self.viewModel.categoryArray[selectItem]
id = model.id
}
self.viewModel.getGoodsList(categoryID: id, sortType: 0) {[weak self] success, error in
guard let self = self else { return } guard let self = self else { return }
self.tableView.reloadData() self.tableView.reloadData()
if self.viewModel.goodsArray.count == 0 { if self.viewModel.goodsArray.count == 0 {
......
...@@ -350,12 +350,11 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD ...@@ -350,12 +350,11 @@ extension YHGCMySignatureDetailViewController: UITableViewDelegate, UITableViewD
} }
} else { } else {
if self.viewModel.mainModel?.commonFile.count != 0 { if self.viewModel.mainModel?.commonFile.count != 0 {
let url = URL(string: self.viewModel.mainModel?.commonFile) ?? URL(fileURLWithPath: "") self.viewModel.getPublicImageUrl(self.viewModel.mainModel?.commonFile ?? "") { success, error in
let safariViewController = SFSafariViewController(url: url) if let success = success {
safariViewController.dismissButtonStyle = .close self.previewFileTool.openXLSXRemoteFile(urlString: success, fileName: "")
safariViewController.delegate = self }
safariViewController.modalPresentationStyle = .fullScreen }
present(safariViewController, animated: true, completion: nil)
} else { } else {
} }
......
...@@ -162,7 +162,7 @@ class YHGCDocListCell: UITableViewCell { ...@@ -162,7 +162,7 @@ class YHGCDocListCell: UITableViewCell {
statusTxt = "待补充" statusTxt = "待补充"
color = UIColor.brandMainColor color = UIColor.brandMainColor
} else if status == 1003 { } else if status == 1003 {
statusTxt = "待签" statusTxt = "待签"
color = UIColor.brandMainColor color = UIColor.brandMainColor
} else if status == 1004 || status == 1005 || status == 1006 { } else if status == 1004 || status == 1005 || status == 1006 {
statusTxt = "审核中" statusTxt = "审核中"
......
...@@ -285,14 +285,19 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell { ...@@ -285,14 +285,19 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell {
} }
flagLabel.text = "待补充" flagLabel.text = "待补充"
flagLabel.backgroundColor = UIColor(hex: 0xebf0f9) flagLabel.backgroundColor = UIColor(hex: 0xebf0f9)
} else if dataSource.docStatus == 1003 { } else if dataSource.docStatus == 1003 || dataSource.docStatus == 1006 {
bottomLeftLineView.isHidden = true bottomLeftLineView.isHidden = true
editButton.isHidden = false editButton.isHidden = false
submitButton.isHidden = true submitButton.isHidden = true
lookButton.isHidden = true lookButton.isHidden = true
flagLabel.textColor = UIColor.brandMainColor flagLabel.textColor = UIColor.brandMainColor
if dataSource.docType == 1001 {
flagLabel.text = "待签章"
} else {
flagLabel.text = "待签署" flagLabel.text = "待签署"
}
flagLabel.backgroundColor = UIColor(hex: 0xebf0f9) flagLabel.backgroundColor = UIColor(hex: 0xebf0f9)
editButton.setTitle("查看", for: .normal)
} else if dataSource.docStatus == 1004 { } else if dataSource.docStatus == 1004 {
bottomLeftLineView.isHidden = true bottomLeftLineView.isHidden = true
editButton.isHidden = true editButton.isHidden = true
...@@ -316,14 +321,6 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell { ...@@ -316,14 +321,6 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell {
flagLabel.textColor = UIColor(hex: 0xff8000) flagLabel.textColor = UIColor(hex: 0xff8000)
flagLabel.text = "审核中" flagLabel.text = "审核中"
flagLabel.backgroundColor = UIColor(hex: 0xfff5eb) flagLabel.backgroundColor = UIColor(hex: 0xfff5eb)
} else if dataSource.docStatus == 1006 {
bottomLeftLineView.isHidden = true
editButton.isHidden = false
submitButton.isHidden = true
lookButton.isHidden = true
flagLabel.textColor = UIColor.failColor
flagLabel.text = "已驳回"
flagLabel.backgroundColor = UIColor.failColor.withAlphaComponent(0.3)
} else if dataSource.docStatus == 1007 { } else if dataSource.docStatus == 1007 {
bottomLeftLineView.isHidden = false bottomLeftLineView.isHidden = false
editButton.isHidden = true editButton.isHidden = true
...@@ -348,12 +345,18 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell { ...@@ -348,12 +345,18 @@ class YHGCSignatureToActionTableViewCell: UITableViewCell {
if let block = block { if let block = block {
block(.add) block(.add)
} }
} else {
if dataSource?.docType == 1001 {
if let block = block {
block(.look)
}
} else { } else {
if let block = block { if let block = block {
block(.sign) block(.sign)
} }
} }
} }
}
@objc func lookButtonClick() { @objc func lookButtonClick() {
if let block = block { if let block = block {
......
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