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

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

parent de241d44
...@@ -71,11 +71,16 @@ export default { ...@@ -71,11 +71,16 @@ export default {
}, },
onInput (value) { onInput (value) {
// if (this.disable) return // if (this.disable) return
if(this.value === '0' || this.value === '0.00') {
this.newVal = ''
this.newVal += ('' + value)
}else{
this.newVal = this.value this.newVal = this.value
if (this.newVal.includes('.') && value === '.') { if (this.newVal.includes('.') && value === '.') {
} else { } else {
this.newVal += ('' + value) this.newVal += ('' + value)
} }
}
this.$emit('input', this.newVal) this.$emit('input', this.newVal)
}, },
onDelete () { onDelete () {
......
...@@ -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 () {
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)}` 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