Commit d6b1f678 authored by lujunye's avatar lujunye

完善修改价格界面逻辑

parent f8c7710e
......@@ -18,10 +18,13 @@ class TitleAndTfYuanCell: UITableViewCell,UITextFieldDelegate {
override func awakeFromNib() {
super.awakeFromNib()
self.selectionStyle = .none
textTF.delegate = self
// Initialization code
}
func textFieldDidEndEditing(_ textField: UITextField) {
if textField.text?.count == 0 {
textField.text = "0"
}
delegate?.TitleAndTfYuanCellGetData(price: textField.text!, idx: self.tag)
}
override func setSelected(_ selected: Bool, animated: Bool) {
......
......@@ -57,9 +57,6 @@
<real key="value" value="1"/>
</userDefinedRuntimeAttribute>
</userDefinedRuntimeAttributes>
<connections>
<outlet property="delegate" destination="-1" id="7h2-A8-F1h"/>
</connections>
</textField>
</subviews>
<constraints>
......
......@@ -23,6 +23,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
}else{
qtPrice = price
}
print("abc == ",wlPrice)
var total = Float(0)
dataArr?.forEach({ (item) in
let price = item.goods_subtotal as! NSString
......@@ -31,6 +32,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
let wl = wlPrice as NSString
let qt = qtPrice as NSString
btnTitle.text = "确定(合计¥\(total + wl.floatValue + qt.floatValue))"
tableV.reloadData()
}
var orderID:Int? = 0
......@@ -181,6 +183,7 @@ class ChangeGoodsPriceVC: BaseViewController , UITableViewDelegate, UITableView
func tableView(_ tableView: UITableView, viewForFooterInSection section: Int) -> UIView? {
let view = UIView(frame: CGRect(x: 0, y: 0, width: fullScreenWidth, height: 5))
view.backgroundColor = UIColor(named: "app底色")
return view
}
func tableView(_ tableView: UITableView, heightForFooterInSection section: Int) -> CGFloat {
......
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