Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
saas_plus
/
store-assistant-assemble
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 501732c5
authored
May 09, 2023
by
前端
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
fixed
1 parent
5bf09933
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
19 additions
and
3 deletions
packagesList/outDetail/components/OutputWork/index.wxml
packagesList/outDetail/index.wxs
packagesList/outDetail/components/OutputWork/index.wxml
View file @
501732c
<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);'}}">
<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-box">
<view class="output-title">产值总览</view>
<view class="output-title">产值总览</view>
<view class="output-value">
<view class="output-value">
<view class="output-item" wx:key="index" wx:for="{{outputView[entranceType == 2?'outputValue':'boutiqueOutputValue']}}">
<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 class="output-label">{{item.label}}</view>
</view>
</view>
</view>
</view>
...
...
packagesList/outDetail/index.wxs
View file @
501732c
...
@@ -8,6 +8,22 @@
...
@@ -8,6 +8,22 @@
}
}
return flag
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 = {
module.exports = {
arrInclues: arrInclues
arrInclues: arrInclues,
accMul:accMul
}
}
\ No newline at end of file
\ No newline at end of file
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment