Commit 501732c5 by 前端

fixed

1 parent 5bf09933
<wxs src="../../index.wxs" module="fn"></wxs>
<scroll-view scroll-y class="content" refresher-triggered="{{triggered}}" refresher-enabled bindrefresherrefresh="activityRefresh" style="{{'height: calc(100% - 22rpx);'}}">
<view class="output-box">
<view class="output-title">产值总览</view>
<view class="output-value">
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType == 2?'outputValue':'boutiqueOutputValue']}}">
<view class="output-num"><text class="_unit">{{item._unit}}</text> {{outputData[item.name] * (item.multiple || 1)||0}}<text class="unit_">{{item.unit_}}</text></view>
<view class="output-num"><text class="_unit">{{item._unit}}</text> {{fn.accMul(outputData[item.name], (item.multiple || 1))||0}}<text class="unit_">{{item.unit_}}</text></view>
<view class="output-label">{{item.label}}</view>
</view>
</view>
......
......@@ -8,6 +8,22 @@
}
return flag
}
var accMul = function(arg1, arg2){
if (isNaN(arg1)) {
arg1 = 0;
}
if (isNaN(arg2)) {
arg2 = 0;
}
var m=0, s1 = arg1.toString(),
s2 = arg2.toString();
m += (s1.split(".")[1] && s1.split(".")[1].length) || 0;
m += (s2.split(".")[1] && s2.split(".")[1].length) || 0;
var s = s1.replace(".", "") * s2.replace(".", ""),
p = Math.pow(10,m)
return s/p
};
module.exports = {
arrInclues: arrInclues
arrInclues: arrInclues,
accMul:accMul
}
\ No newline at end of file
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!