Commit 17912795 authored by lujunye's avatar lujunye

禁止限制20%定金

parent f7cee49d
......@@ -86,12 +86,12 @@ class XiuGaiYuShouJiaViewController: BaseViewController, UITextFieldDelegate {
// print(dingJinTF.text)
let dingj = dingJinTF.text! as NSString
if isPurnNumber(str: dingJinTF.text!) {
if dingj.floatValue > (totalPrice! * 0.2) {
HUD.flash(.label("定金不得高于总价20%"),delay: 1.2)
dingJinTF.text = String(format: "%.2f", (totalPrice! * 0.2))
}else{
// if dingj.floatValue > (totalPrice! * 0.2) {
// HUD.flash(.label("定金不得高于总价20%"),delay: 1.2)
// dingJinTF.text = String(format: "%.2f", (totalPrice! * 0.2))
// }else{
dingJinTF.text = String(format: "%.2f", dingj.floatValue)
}
// }
// let lastDj = dingJinTF.text! as NSString
// let weiku = totalPrice! - lastDj.floatValue
// weiKuanTF.text = String(format: "%.2f",weiku)
......
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