Commit 7c8deeda authored by lujunye's avatar lujunye

修复采购列表时间显示,修正采购列表顶栏按钮大小

parent 85266fcb
......@@ -294,18 +294,17 @@ class XinCaiGouViewController: BaseViewController,UITableViewDelegate,UITableVie
let cell = tableView.dequeueReusableCell(withIdentifier: "TitleAndLblCell") as! TitleAndLblCell
cell.nameLbl.text = titleArr[indexPath.row]
cell.btmLine.isHidden = true
cell.contentLbl.text = holderArr[indexPath.row]
cell.btmW.constant = 0
cell.contentRight.constant = 0
cell.imgRight.constant = 15
cell.contentLbl.textColor = UIColor(named: "#999999")
if contentStr.count != 0 {
cell.contentLbl.text = contentStr
cell.btmW.constant = 15
cell.contentRight.constant = 5
cell.imgRight.constant = 22
cell.contentLbl.textColor = UIColor(named: "标题字颜色")
}else{
cell.contentLbl.text = holderArr[indexPath.row]
cell.btmW.constant = 0
cell.contentRight.constant = 0
cell.imgRight.constant = 15
cell.contentLbl.textColor = UIColor(named: "#999999")
}
return cell
}
......
......@@ -117,7 +117,7 @@ class CGDListVC: BaseViewController , UITableViewDelegate, UITableViewDataSource
})
cell.countLbl.text = "\(count)"
cell.priceLbl.text = "\(amount)"
cell.timeLbl.text = dayAndTimeByDouble(sender:Double(model.purchase_time!))
var btnStr:Array<String> = []
switch model.order_status {
......
......@@ -42,6 +42,9 @@ class CGDListViewController: BaseViewController ,UISearchBarDelegate, SearchBar
var searchV : SearchBarView? = nil
func rightBtnClick() {
removeBlackBtnView()
let vc = XinCaiGouViewController()
vc.delegate = self
self.navigationController?.pushViewController(vc, animated: true)
......@@ -142,16 +145,17 @@ extension CGDListViewController: PagingViewControllerSizeDelegate {
func pagingViewController(_ pagingViewController: PagingViewController, widthForPagingItem pagingItem: PagingItem, isSelected: Bool) -> CGFloat {
guard let item = pagingItem as? PagingIndexItem else { return 0 }
let insets = UIEdgeInsets(top: 0, left: 20, bottom: 0, right: 20)
let size = CGSize(width: CGFloat.greatestFiniteMagnitude, height: pagingViewController.options.menuItemSize.height)
let attributes = [NSAttributedString.Key.font: pagingViewController.options.font]
let rect = item.title.boundingRect(with: size,
options: .usesLineFragmentOrigin,
attributes: attributes,
context: nil)
// let insets = UIEdgeInsets(top: 0, left: 25, bottom: 0, right: 25)
// let size = CGSize(width: CGFloat.greatestFiniteMagnitude, height: pagingViewController.options.menuItemSize.height)
// let attributes = [NSAttributedString.Key.font: pagingViewController.options.font]
//
// let rect = item.title.boundingRect(with: size,
// options: .usesLineFragmentOrigin,
// attributes: attributes,
// context: nil)
// let width = ceil(rect.width) + insets.left + insets.right
let width = ceil(rect.width) + insets.left + insets.right
let width = fullScreenWidth / 4 * 0.9
if isSelected {
return width * 1.5
......
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