diff --git a/app.js b/app.js index 76ed0a8..33b1b5b 100644 --- a/app.js +++ b/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', diff --git a/pages/formate.wxs b/pages/formate.wxs index 0e8ab90..4845ff2 100644 --- a/pages/formate.wxs +++ b/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) { diff --git a/xtends/statics/index/index.wxml b/xtends/statics/index/index.wxml index 6871845..d3425ef 100644 --- a/xtends/statics/index/index.wxml +++ b/xtends/statics/index/index.wxml @@ -65,21 +65,21 @@ 收货合计(吨) - {{formate.numberFormat(reportInfo.totalSettleWeight || 0)}} + {{formate.formateWeight(reportInfo.totalSettleWeight || 0)}} 场外收货(吨) - {{formate.numberFormat(reportInfo.totalOffsiteSettleWeight || 0)}} + {{formate.formateWeight(reportInfo.totalOffsiteSettleWeight || 0)}} 收货总金额(元) - {{formate.numberFormat(reportInfo.totalSettlePrice || 0)}} + {{formate.formateAmount(reportInfo.totalSettlePrice || 0)}} 场内收货(吨) - {{formate.numberFormat(reportInfo.totalOnsideSettleWeight || 0)}} + {{formate.formateWeight(reportInfo.totalOnsideSettleWeight || 0)}}