Commit af29f083 authored by David黄金龙's avatar David黄金龙

文件清单 接口

parent 59c46a9b
......@@ -50,6 +50,7 @@ class YHFileListViewController: YHBaseViewController {
override func viewWillAppear(_ animated: Bool) {
super.viewWillAppear(animated)
loadData()
loadData2()
}
......@@ -85,6 +86,22 @@ extension YHFileListViewController {
}
}
func loadData2() {
if let orderID = UserDefaults.standard.value(forKey: "orderIdForPreview") {
let param = ["order_id":orderID,"node":"1","state":"1"]
certificateReqVM.getCertificateStatisticData(params: param) { success, error in
if success == true {
self.headView.dataModel = self.certificateReqVM.certificateEntryModel
} else {
YHHUD.flash(message: error?.errorMsg ?? "请求出错")
}
}
} else {
printLog("error : orderID 为空")
}
}
func setupUI() {
gk_navTitle = "文件清单"
gk_navBarAlpha = 1.0
......
......@@ -7,6 +7,7 @@
//
import UIKit
import AttributedString
class YHFileListHeaerView: UIView {
static let viewH : CGFloat = 312
......@@ -46,7 +47,7 @@ class YHFileListHeaerView: UIView {
//待提交
private lazy var waitSubmitLable : UILabel = {
let imagV = UILabel()
imagV.text = "您有 - 项待提交"
imagV.text = "您有 项待提交"
imagV.font = UIFont.PFSC_R(ofSize: 14)
imagV.textColor = UIColor.white
return imagV
......@@ -55,26 +56,17 @@ class YHFileListHeaerView: UIView {
//重传
private lazy var reuploadLable : UILabel = {
let imagV = UILabel()
imagV.text = "您有 - 项需重传"
imagV.text = "您有 项需重传"
imagV.font = UIFont.PFSC_R(ofSize: 14)
imagV.textColor = UIColor.white
return imagV
}()
var dataModel : YHCertificateEntryModel? {
didSet {
updateUI()
}
}
}
......@@ -171,4 +163,19 @@ private extension YHFileListHeaerView {
}
}
func updateUI() {
guard let dataModel = dataModel else { return }
let a: ASAttributedString = .init("您有 ", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white))
let aa: ASAttributedString = .init(NSAttributedString(string: String(dataModel.to_be_submit_num)), .font(UIFont.PFSC_B(ofSize: 15)),.foreground(UIColor.warnColor))
let aaa: ASAttributedString = .init(" 项待提交", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white))
waitSubmitLable.attributed.text = a + aa + aaa
let bb: ASAttributedString = .init(NSAttributedString(string: String(dataModel.reject_num)), .font(UIFont.PFSC_B(ofSize: 15)),.foreground(UIColor.warnColor))
let bbb: ASAttributedString = .init(" 项需重传", .font(UIFont.PFSC_R(ofSize: 14)),.foreground(UIColor.white))
reuploadLable.attributed.text = a + bb + bbb
}
}
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