Commit 7c8deeda authored by lujunye's avatar lujunye

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

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