|
@@ -66,13 +66,13 @@
|
|
|
</view>
|
|
</view>
|
|
|
<view class="content dis a-c f-c">
|
|
<view class="content dis a-c f-c">
|
|
|
<view class=" totalCount dis a-c ">
|
|
<view class=" totalCount dis a-c ">
|
|
|
- <text class="sum">{{distributionInfo.totalPremium / 10000 || 0}}</text>
|
|
|
|
|
|
|
+ <text class="sum">{{formatPremium(distributionInfo.totalPremium)}}</text>
|
|
|
<text class="unit">万</text>
|
|
<text class="unit">万</text>
|
|
|
</view>
|
|
</view>
|
|
|
<view class="today dis a-c mt-1 ">
|
|
<view class="today dis a-c mt-1 ">
|
|
|
<text>今日新增</text>
|
|
<text>今日新增</text>
|
|
|
<image src="/static/image/income.png" mode=""></image>
|
|
<image src="/static/image/income.png" mode=""></image>
|
|
|
- <text class="sum">{{distributionInfo.todayPremium / 10000 || 0}}</text>
|
|
|
|
|
|
|
+ <text class="sum">{{formatPremium(distributionInfo.todayPremium)}}</text>
|
|
|
<text class="unit">万</text>
|
|
<text class="unit">万</text>
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
@@ -172,10 +172,12 @@
|
|
|
</view>
|
|
</view>
|
|
|
</view>
|
|
</view>
|
|
|
</u-overlay>
|
|
</u-overlay>
|
|
|
|
|
+ <global-loading :show="loadingShow" :text="loadingText"></global-loading>
|
|
|
</view>
|
|
</view>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<script>
|
|
|
|
|
+ import Decimal from 'decimal.js';
|
|
|
import QR from "@/common/wxqrcode.js"
|
|
import QR from "@/common/wxqrcode.js"
|
|
|
import {
|
|
import {
|
|
|
pathToBase64,
|
|
pathToBase64,
|
|
@@ -191,6 +193,8 @@
|
|
|
export default {
|
|
export default {
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
|
|
+ loadingShow: false, //加载
|
|
|
|
|
+ loadingText: '加载中', //加载提示文字
|
|
|
showLargeImageShow: false, //大图预览弹窗
|
|
showLargeImageShow: false, //大图预览弹窗
|
|
|
sctiveimg: "", // 放大显示的图片
|
|
sctiveimg: "", // 放大显示的图片
|
|
|
shareImage: "", //分享图片
|
|
shareImage: "", //分享图片
|
|
@@ -203,20 +207,26 @@
|
|
|
onShow() {
|
|
onShow() {
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
- onLoad() {
|
|
|
|
|
- this.getUserInfo() //获取用户信息
|
|
|
|
|
-
|
|
|
|
|
- this.getDistribution();
|
|
|
|
|
- this.qrcodeImg = QR.createQrCodeImg(this.$base.h5BaseUrl + `/#/pages/registr/h5Registr?systemCode=${this
|
|
|
|
|
- .system_code}&page=分销员注册&info=${JSON.stringify({
|
|
|
|
|
- name: this.Info.name,
|
|
|
|
|
- infoId: this.Info.infoId,
|
|
|
|
|
- id: this.Info.id,
|
|
|
|
|
- headSculpture: this.Info.headSculpture,
|
|
|
|
|
- deptName: this.Info.deptName,
|
|
|
|
|
- })}`, {
|
|
|
|
|
- size: parseInt(300), //二维码大小
|
|
|
|
|
- })
|
|
|
|
|
|
|
+ async onLoad() {
|
|
|
|
|
+ this.loadingShow = true;
|
|
|
|
|
+ try {
|
|
|
|
|
+ await this.getUserInfo() //获取用户信息
|
|
|
|
|
+ await this.getDistribution();
|
|
|
|
|
+ this.qrcodeImg = QR.createQrCodeImg(this.$base.h5BaseUrl + `/#/pages/registr/h5Registr?systemCode=${this
|
|
|
|
|
+ .system_code}&page=分销员注册&info=${JSON.stringify({
|
|
|
|
|
+ name: this.Info.name,
|
|
|
|
|
+ infoId: this.Info.infoId,
|
|
|
|
|
+ id: this.Info.id,
|
|
|
|
|
+ headSculpture: this.Info.headSculpture,
|
|
|
|
|
+ deptName: this.Info.deptName,
|
|
|
|
|
+ })}`, {
|
|
|
|
|
+ size: parseInt(300), //二维码大小
|
|
|
|
|
+ })
|
|
|
|
|
+ this.loadingShow = false;
|
|
|
|
|
+ } catch (error) {
|
|
|
|
|
+ this.loadingShow = false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
},
|
|
},
|
|
|
computed: {
|
|
computed: {
|
|
@@ -243,6 +253,13 @@
|
|
|
numberFormat(value) {
|
|
numberFormat(value) {
|
|
|
return (value).toLocaleString('en-US');
|
|
return (value).toLocaleString('en-US');
|
|
|
},
|
|
},
|
|
|
|
|
+ //保费(元)转万元,Decimal 高精度计算
|
|
|
|
|
+ formatPremium(value) {
|
|
|
|
|
+ if (value === undefined || value === null || value === '') {
|
|
|
|
|
+ return '0';
|
|
|
|
|
+ }
|
|
|
|
|
+ return new Decimal(value).dividedBy(10000).toString();
|
|
|
|
|
+ },
|
|
|
async getDistribution() {
|
|
async getDistribution() {
|
|
|
let res = await this.$http.post('/sysDistributionSetting/distributionCenter');
|
|
let res = await this.$http.post('/sysDistributionSetting/distributionCenter');
|
|
|
if (res.code == 200) {
|
|
if (res.code == 200) {
|