Commit 4ad7d60a by zhangxw

修改

1 parent 514e301f
...@@ -49,6 +49,6 @@ Component({ ...@@ -49,6 +49,6 @@ Component({
methods: { methods: {
hidePopup() { hidePopup() {
this.triggerEvent('hidePopup') this.triggerEvent('hidePopup')
}, }
} }
}) })
...@@ -3,10 +3,11 @@ ...@@ -3,10 +3,11 @@
<popup <popup
show="{{popShow}}" show="{{popShow}}"
bind:hidePopup="hidePopup" bind:hidePopup="hidePopup"
bindconfirm="confirm" bindconfirm="hidePopup"
height="60%" height="60%"
title="员工提成" title="员工提成"
customIsTab="{{true}}" customIsTab="{{true}}"
only="{{false}}"
customPopupSlotStyle="height: calc(100% - 200rpx)"> customPopupSlotStyle="height: calc(100% - 200rpx)">
<!-- 服务多家门店不显示门店名称 --> <!-- 服务多家门店不显示门店名称 -->
<view class="title_tips"> <view class="title_tips">
......
...@@ -68,6 +68,7 @@ Component({ ...@@ -68,6 +68,7 @@ Component({
}, },
actionOperationResult(val1, val2, rate = false){ actionOperationResult(val1, val2, rate = false){
if (!val2) return flag ? 0 : '0.00'
const p = this.actionOperation(val1, val2) const p = this.actionOperation(val1, val2)
let flag = Number.isInteger(((val1 * p) / (val2 * p)) * 100) // 是否是整数 let flag = Number.isInteger(((val1 * p) / (val2 * p)) * 100) // 是否是整数
return rate ? (flag ? ((val1 * p) / (val2 * p)) * 100 : (((val1 * p) / (val2 * p)) * 100).toFixed(2)) : ((val1 * p) / (val2 * p)).toFixed(2) return rate ? (flag ? ((val1 * p) / (val2 * p)) * 100 : (((val1 * p) / (val2 * p)) * 100).toFixed(2)) : ((val1 * p) / (val2 * p)).toFixed(2)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!