Browse Source

no message

feature/v2.1
张山 4 years ago
parent
commit
64e594de5b
3 changed files with 11 additions and 8 deletions
  1. 2
      app.js
  2. 9
      pages/formate.wxs
  3. 8
      xtends/statics/index/index.wxml

2
app.js

@ -1,6 +1,6 @@
//app.js
App({
evn: 0, // 0: 开发版本;1:测试版本;2:生产版本
evn: 1, // 0: 开发版本;1:测试版本;2:生产版本
tmplIds: ['AFoM5TOfsgERsfcetNSB0UlmEixnLF1ySXr54Bqno2M', 'lOQ8Gvyy_dTk68bYGpRVnVA0M7DsYYrV81Gd39GUPBA'],
version: '2.1.0',
xAppId: '503258978847953926',

9
pages/formate.wxs

@ -57,13 +57,16 @@ function formateAmount(amount, fix) {
return ''
}
if(!fix){
fix = 3
fix = 2
}
return Number(amount).toFixed(fix)
}
function formateWeight(weight) {
return (parseFloat(weight) / 1000).toFixed(1)
function formateWeight(weight, fixed) {
if(!fixed){
fixed = 2
}
return (parseFloat(weight) / 1000).toFixed(fixed)
}
function formateWeight3 (value) {

8
xtends/statics/index/index.wxml

@ -65,21 +65,21 @@
<view class="flex" style="margin-left:24rpx;">
<view style="width:220rpx">
<view class="text-black text-sm">收货合计(吨)</view>
<view class="text-xxl" style="color:#278CC8;margin-top:8rpx">{{formate.numberFormat(reportInfo.totalSettleWeight || 0)}}</view>
<view class="text-xxl" style="color:#278CC8;margin-top:8rpx">{{formate.formateWeight(reportInfo.totalSettleWeight || 0)}}</view>
<view class="flex" style="margin-top:24rpx;align-items: center">
<text style="background-image: linear-gradient(270deg, #FF222C 0%, #FF691C 100%);border-radius:50%;height:16rpx;width:16rpx"></text>
<text class="text-black text-sm" style="margin-left:12rpx">场外收货(吨)</text>
</view>
<view class="text-black text-bold">{{formate.numberFormat(reportInfo.totalOffsiteSettleWeight || 0)}}</view>
<view class="text-black text-bold">{{formate.formateWeight(reportInfo.totalOffsiteSettleWeight || 0)}}</view>
</view>
<view style="width:220rpx">
<view class="text-black text-sm">收货总金额(元)</view>
<view class="text-xxl" style="color:#278CC8;margin-top:8rpx">{{formate.numberFormat(reportInfo.totalSettlePrice || 0)}}</view>
<view class="text-xxl" style="color:#278CC8;margin-top:8rpx">{{formate.formateAmount(reportInfo.totalSettlePrice || 0)}}</view>
<view class="flex" style="margin-top:24rpx;align-items: center">
<text style="background-image: linear-gradient(90deg, #007AFF 0%, #6BCDFF 100%);border-radius:50%;height:16rpx;width:16rpx"></text>
<text class="text-black text-sm" style="margin-left:12rpx">场内收货(吨)</text>
</view>
<view class="text-black text-bold">{{formate.numberFormat(reportInfo.totalOnsideSettleWeight || 0)}}</view>
<view class="text-black text-bold">{{formate.formateWeight(reportInfo.totalOnsideSettleWeight || 0)}}</view>
</view>
</view>
</view>

Loading…
Cancel
Save