Commit 8b2eaf81 authored by jiacheng.mao's avatar jiacheng.mao

融租合同创建 部分计算逻辑调整

parent de241d44
...@@ -71,10 +71,15 @@ export default { ...@@ -71,10 +71,15 @@ export default {
}, },
onInput (value) { onInput (value) {
// if (this.disable) return // if (this.disable) return
this.newVal = this.value if(this.value === '0' || this.value === '0.00') {
if (this.newVal.includes('.') && value === '.') { this.newVal = ''
} else {
this.newVal += ('' + value) this.newVal += ('' + value)
}else{
this.newVal = this.value
if (this.newVal.includes('.') && value === '.') {
} else {
this.newVal += ('' + value)
}
} }
this.$emit('input', this.newVal) this.$emit('input', this.newVal)
}, },
......
...@@ -916,7 +916,18 @@ export default { ...@@ -916,7 +916,18 @@ export default {
this.saveInfo.deposit_ratio_n = `${(this.saveInfo.deposit / this.saveInfo.equip_price).toFixed(2) * 100}` this.saveInfo.deposit_ratio_n = `${(this.saveInfo.deposit / this.saveInfo.equip_price).toFixed(2) * 100}`
}, },
changeLeaseCharge () { changeLeaseCharge () {
this.saveInfo.lease_charge_ratio_n = `${((this.saveInfo.lease_charge / (this.saveInfo.equip_price - this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100)) * 100).toFixed(6)}` let vm = this
if(!this.saveInfo.equip_price || this.saveInfo.equip_price === '' || this.saveInfo.equip_price === 0 || this.saveInfo.equip_price === 0.00){
hlsPopup.showPopup({
title: "提示",
content: '请先输入设备单价',
onConfirm: function () {
vm.saveInfo.lease_charge = 0
}
})
}else{
this.saveInfo.lease_charge_ratio_n = `${((this.saveInfo.lease_charge / (this.saveInfo.equip_price - this.saveInfo.equip_price * this.saveInfo.down_payment_ratio_n.replace('%', '') / 100)) * 100).toFixed(6)}`
}
}, },
// 租赁物列表 // 租赁物列表
rentList () { rentList () {
......
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