Commit 4ab3e84a authored by lujunye's avatar lujunye

详情样式修改

parent cb170a49
...@@ -49,7 +49,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne ...@@ -49,7 +49,8 @@ class NewRKVc: BaseViewController ,UITableViewDelegate,UITableViewDataSource, Ne
}) })
var goods_bannerStr:String = "" var goods_bannerStr:String = ""
if lastGoodsBanner.count > 0 { if lastGoodsBanner.count > 0 {
goods_bannerStr = dataChangeString(sender: lastGoodsBanner) // goods_bannerStr = dataChangeString(sender: lastGoodsBanner)
goods_bannerStr = lastGoodsBanner.joined(separator: ",")
} }
report_sn = view.report_sn_tf.text! report_sn = view.report_sn_tf.text!
......
...@@ -13,6 +13,8 @@ protocol DaiKeXiaDanGouWuCellDelegate { ...@@ -13,6 +13,8 @@ protocol DaiKeXiaDanGouWuCellDelegate {
func DaiKeXiaDanGouWuCell_check(cell:DaiKeXiaDanGouWuCell) func DaiKeXiaDanGouWuCell_check(cell:DaiKeXiaDanGouWuCell)
} }
class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate { class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
@IBOutlet weak var dj_wk_view: UIView!
@IBOutlet weak var dj_wk_top: NSLayoutConstraint!
@IBOutlet weak var btm_line: UIView! @IBOutlet weak var btm_line: UIView!
@IBOutlet weak var arrow_img: UIImageView! @IBOutlet weak var arrow_img: UIImageView!
@IBOutlet weak var check_button: UIButton! @IBOutlet weak var check_button: UIButton!
...@@ -23,14 +25,19 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate { ...@@ -23,14 +25,19 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
@IBOutlet weak var changeBtn: UIButton! @IBOutlet weak var changeBtn: UIButton!
@IBOutlet weak var count_lbl: UILabel! @IBOutlet weak var count_lbl: UILabel!
@IBOutlet weak var btmLIneWidth: NSLayoutConstraint! @IBOutlet weak var btmLIneWidth: NSLayoutConstraint!
@IBOutlet weak var detailLbl2: UILabel!
@IBOutlet weak var delBtn: UIButton! @IBOutlet weak var delBtn: UIButton!
@IBOutlet weak var delImg: UIImageView! @IBOutlet weak var delImg: UIImageView!
@IBOutlet weak var totalPriceLbl: UILabel!
@IBOutlet weak var priceLbl: UILabel! @IBOutlet weak var yong_jin_lbl: UILabel!
@IBOutlet weak var xiao_ji_lbl: UILabel!
@IBOutlet weak var detailLbl: UILabel! @IBOutlet weak var detailLbl: UILabel!
@IBOutlet weak var titleLbl: UILabel! @IBOutlet weak var titleLbl: UILabel!
@IBOutlet weak var diLbl: UILabel! @IBOutlet weak var dan_jia_lbl: UILabel!
@IBOutlet weak var dj_wk_height: NSLayoutConstraint!
@IBOutlet weak var ding_jin_lbl: UILabel!
@IBOutlet weak var wei_kuan_lbl: UILabel!
override func layoutSubviews() { override func layoutSubviews() {
super.layoutSubviews() super.layoutSubviews()
if isFx{ if isFx{
...@@ -42,8 +49,11 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate { ...@@ -42,8 +49,11 @@ class DaiKeXiaDanGouWuCell: UITableViewCell,UITextViewDelegate {
edit_img.isHidden = true edit_img.isHidden = true
delImg.isHidden = true delImg.isHidden = true
delBtn.isHidden = true delBtn.isHidden = true
diLbl.isHidden = false dan_jia_lbl.isHidden = false
priceLbl.isHidden = false xiao_ji_lbl.isHidden = false
dj_wk_top.constant = 0
dj_wk_height.constant = 0
dj_wk_view.isHidden = true
} }
} }
@IBOutlet weak var yu_shou_img: UIImageView! @IBOutlet weak var yu_shou_img: UIImageView!
......
...@@ -189,22 +189,27 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U ...@@ -189,22 +189,27 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
cell.detailLbl.text = "\(cellData.spec_str!)/\(cellData.unit!)" cell.detailLbl.text = "\(cellData.spec_str!)/\(cellData.unit!)"
let pStr = cellData.target_Price as! NSString let pStr = cellData.target_Price as! NSString
let p = pStr.floatValue * Float(cellData.target_Count!) let p = pStr.floatValue * Float(cellData.target_Count!)
cell.detailLbl2.text = "小计:¥" + String(format: "%.2f", p) cell.xiao_ji_lbl.text = "小计:¥" + String(format: "%.2f", p)
let priceStr = cellData.target_Price?.replacingOccurrences(of: "", with: ",") as! NSString let priceStr = cellData.target_Price?.replacingOccurrences(of: "", with: ",") as! NSString
let totalP = priceStr.floatValue * Float(cellData.target_Count!) let totalP = priceStr.floatValue * Float(cellData.target_Count!)
cell.totalPriceLbl.text = "\(totalP)" cell.xiao_ji_lbl.text = "\(totalP)"
if orderType == 1 { if orderType == 1 {
cell.dj_wk_top.constant = 10
cell.dj_wk_height.constant = 40
cell.dj_wk_view.isHidden = false
cell.yu_shou_img.isHidden = false cell.yu_shou_img.isHidden = false
cell.diLbl.isHidden = false cell.dan_jia_lbl.isHidden = false
cell.priceLbl.isHidden = false cell.xiao_ji_lbl.isHidden = false
cell.diLbl.text = "定金:¥" + djTFstr cell.ding_jin_lbl.text = "定金:¥" + djTFstr
cell.priceLbl.text = "尾款:¥" + wkTFstr cell.wei_kuan_lbl.text = "尾款:¥" + wkTFstr
}else { }else {
// cell.totalPriceLbl.text = "¥\(priceStr.floatValue * countStr.floatValue)" // cell.totalPriceLbl.text = "¥\(priceStr.floatValue * countStr.floatValue)"
cell.diLbl.isHidden = true cell.xiao_ji_lbl.isHidden = true
cell.dj_wk_top.constant = 0
cell.dj_wk_height.constant = 0
cell.dj_wk_view.isHidden = true
} }
return cell return cell
...@@ -689,7 +694,10 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U ...@@ -689,7 +694,10 @@ class DaiKeXiaDanGouWuViewController: BaseViewController,UITableViewDataSource,U
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 1 { if indexPath.section == 1 {
return 250 if orderType == 1 {
return 340
}
return 300
} }
if indexPath.section == 2 {//新增预售 if indexPath.section == 2 {//新增预售
if orderType == 1 { if orderType == 1 {
......
...@@ -86,7 +86,6 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate, ...@@ -86,7 +86,6 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
let dataM = data as! OrderDetailModel let dataM = data as! OrderDetailModel
self.dataMdoel = dataM.data self.dataMdoel = dataM.data
self.listView.reloadData() self.listView.reloadData()
}) { (error) in }) { (error) in
self.listView.isHidden = true self.listView.isHidden = true
} }
...@@ -96,7 +95,6 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate, ...@@ -96,7 +95,6 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
let dataM = data as! OrderDetailModel let dataM = data as! OrderDetailModel
self.dataMdoel = dataM.data self.dataMdoel = dataM.data
self.listView.reloadData() self.listView.reloadData()
}) { (error) in }) { (error) in
self.listView.isHidden = true self.listView.isHidden = true
} }
...@@ -152,12 +150,12 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate, ...@@ -152,12 +150,12 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
}else{ }else{
cell.detailLbl.text = "规格:-" cell.detailLbl.text = "规格:-"
} }
cell.count_lbl.text = "单价:" + (rowModel?.goods_price)! cell.dan_jia_lbl.text = "单价:" + (rowModel?.goods_price)!
cell.priceLbl.text = "数量:" + StringByInt(number: (rowModel?.cart_number!)!) cell.count_lbl.text = "数量:" + StringByInt(number: (rowModel?.cart_number!)!)
cell.diLbl.text = "佣金:¥" + (rowModel?.commission_val)! cell.yong_jin_lbl.text = "佣金:¥" + (rowModel?.commission_val)!
let s_p = rowModel?.goods_price as! NSString let s_p = rowModel?.goods_price as! NSString
let p_count = Float((rowModel?.cart_number)!) * s_p.floatValue let p_count = Float((rowModel?.cart_number)!) * s_p.floatValue
cell.detailLbl2.text = "小计:" + String(format: "%.2f", p_count) cell.xiao_ji_lbl.text = "小计:" + String(format: "%.2f", p_count)
cell.delegate = self cell.delegate = self
cell.tag = indexPath.row cell.tag = indexPath.row
...@@ -256,7 +254,7 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate, ...@@ -256,7 +254,7 @@ class RetailManageDetailViewController: BaseViewController ,UITableViewDelegate,
} }
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
if indexPath.section == 1 { if indexPath.section == 1 {
return 210 return 300
} }
return 49 return 49
} }
......
...@@ -511,15 +511,22 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -511,15 +511,22 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
cell.detailLbl.text = "规格:-" cell.detailLbl.text = "规格:-"
} }
if isYuShou { if isYuShou {
cell.diLbl.isHidden = false cell.dj_wk_top.constant = 10
cell.priceLbl.isHidden = false cell.dj_wk_height.constant = 40
cell.dj_wk_view.isHidden = false
cell.dan_jia_lbl.isHidden = false
cell.xiao_ji_lbl.isHidden = false
cell.yu_shou_img.isHidden = false cell.yu_shou_img.isHidden = false
cell.diLbl.text = "定金:¥" + (self.dataMdoel?.order_res?.sale_res?.dj_amount)! cell.ding_jin_lbl.text = "定金:¥" + (self.dataMdoel?.order_res?.sale_res?.dj_amount)!
cell.priceLbl.text = "尾款:¥" + (self.dataMdoel?.order_res?.sale_res?.wk_amount)! cell.wei_kuan_lbl.text = "尾款:¥" + (self.dataMdoel?.order_res?.sale_res?.wk_amount)!
}else{
cell.dj_wk_top.constant = 0
cell.dj_wk_height.constant = 0
cell.dj_wk_view.isHidden = true
} }
cell.count_lbl.text = "数量:" + StringByInt(number: (rowModel?.cart_number!)!) cell.count_lbl.text = "数量:" + StringByInt(number: (rowModel?.cart_number!)!)
cell.detailLbl2.text = "小计:¥" + (self.dataMdoel?.order_res?.goods_amount)! cell.xiao_ji_lbl.text = "小计:¥" + (self.dataMdoel?.order_res?.goods_amount)!
return cell return cell
case 2: case 2:
...@@ -1216,7 +1223,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa ...@@ -1216,7 +1223,10 @@ class OrderDViewController: BaseViewController,UITableViewDelegate,UITableViewDa
func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat { func tableView(_ tableView: UITableView, heightForRowAt indexPath: IndexPath) -> CGFloat {
switch indexPath.section { switch indexPath.section {
case 1://商品展示heightrow case 1://商品展示heightrow
return 250 if isYuShou {
return 340
}
return 300
case 4://发票信息heightrow case 4://发票信息heightrow
if segmentIndex == 0 { if segmentIndex == 0 {
return 180 return 180
......
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