| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265 |
- <view class="setup">
-
- <view style="width: 100%;height:60rpx"></view>
- <view class="user">
- <image bind:tap="onuser" class="user_to" src="{{user.operationPicture||'https://thirdwx.qlogo.cn/mmopen/vi_32/POgEwh4mIHO4nibH0KlMECNjjGxQUq24ZEaGT4poC6icRiccVGKSyXwibcPq4BWmiaIGuG1icwxaQX6grC9VemZoJ8rg/132'}}" mode=""/>
- <view class="user_name">
- <view class="user_name1">{{user.operationName||'微信用户'}}
- <view class="user_role" wx:if="{{user.operationRole==4}}">司机</view>
- <view class="user_role" wx:if="{{user.operationRole==5}}">绿电业主</view>
- <view class="user_role" wx:if="{{user.operationRole==6}}">用电业主</view>
- </view>
- <view class="user_name2">{{user.operationPhone}}</view>
- </view>
- </view>
- <view style="width: 100%;height:40rpx"></view>
- <view class="allocation_box">
- <view class="allocation">
- <view class="allocation_3_password">我的账户<image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_1.png" wx:if="{{passwordtype}}" bind:tap="onpassword" mode=""/>
- <image class="login_imgae" src="https://esos-iot.bjdexn.cn/wx_images/password_2.png" wx:else bind:tap="onpassword" mode=""/></view>
- <view class="allocation_1" data-name="balance" bind:tap="toconfigure">
- <view class="allocation_2"></view>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- </view>
- <view class="allocation" data-name="balance" bind:tap="toconfigure">
- <view>
- <text wx:if="{{!passwordtype}}">¥</text>
- <text style="font-size: 26px;" wx:if="{{passwordtype}}">∗∗∗∗</text>
- <text style="font-size: 26px;" wx:else>{{ js.toFixed2(accountdata.balance) }}</text>
- <!-- <text style="font-size: 26px;" wx:else>{{accountdata.balance}}</text> -->
- </view>
- </view>
- <view class="allocation_money">
- <view class="allocation_3_money">日/<text wx:if="{{user.operationRole==5}}">收入</text><text wx:if="{{user.operationRole==6}}">支出</text></view>
- <view class="allocation_3_money">月/<text wx:if="{{user.operationRole==5}}">收入</text><text wx:if="{{user.operationRole==6}}">支出</text></view>
-
- <view class="allocation_3_money" style="color: #222;">年/<text wx:if="{{user.operationRole==5}}">收入</text><text wx:if="{{user.operationRole==6}}">支出</text></view>
-
- </view>
- <view class="allocation_money" style="margin-bottom: 10rpx;">
- <view class="allocation_3_money">
- <text wx:if="{{passwordtype}}">∗∗∗∗</text>
- <text wx:else>¥{{accountdata.zhouspent}}</text>
- </view>
- <view class="allocation_3_money">
- <text wx:if="{{passwordtype}}">∗∗∗∗</text>
- <text wx:else>¥{{accountdata.weeklyconsumption}}</text>
- </view>
- <view class="allocation_1">
- <view class="allocation_3_money" style="color: #222;">
- <text wx:if="{{passwordtype}}">∗∗∗∗</text>
- <text wx:else>¥{{accountdata.annualconsumption}}</text>
- </view>
- </view>
- </view>
- </view>
- <view class="project" bind:tap="onCardClick" wx:if="{{user.operationRole!=4}}">
- <!-- <view></view> -->
- <view class="project_box" wx:for="{{projectList}}" wx:if="{{index<1}}" wx:key="index" bind:tap="onCardClick">
- <view class="project_top1">
- <t-steps theme="dot" current="{{item.projectType}}" bind:change="onThirdChange">
- <t-step-item wx:for="{{statedata}}" wx:for-item="items" wx:key="indexs" content="{{items.title}}" />
- </t-steps>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- <view class="project_top">
- <view class="project_title">北方油田项目</view>
- </view>
- <view class="project_name">项目地址:{{item.electricName}}</view>
- <view class="project_name">项目时间:{{item.createTime}}</view>
- </view>
- </view>
-
- <view class="allocation_box_more">
- <view class="allocation_box_allocate" wx:if="{{user.operationRole==5||user.operationRole==6}}">
- <view class="allocation_allocate" data-name="userlist" bind:tap="toconfigure">
- <view class="allocation_allocateimg">
- <t-icon name="assignment" size="50rpx" data-name="assignment" color="#07c160"/>
-
- </view>
- <view class="allocation_name">分配工单</view>
- </view>
- <!-- <view class="allocation_allocate" data-name="order" bind:tap="toconfigure">
- <view class="allocation_allocateimg">
- <t-icon name="file-code-1" size="50rpx" data-name="file-code-1" color="#07c160"/>
-
- </view>
- <view class="allocation_name">历史工单</view>
- </view> -->
- <view class="allocation_allocate" data-name="driver" bind:tap="toconfigure">
- <view class="allocation_allocateimg">
- <t-icon name="bill" size="50rpx" data-name="bill" color="#07c160"/>
-
- </view>
- <view class="allocation_name">工单发票</view>
- </view>
- <view class="allocation_allocate" data-name="address" bind:tap="toconfigure">
- <view class="allocation_allocateimg">
- <t-icon name="task-location" size="50rpx" data-name="task-location" color="#07c160"/>
-
- </view>
- <view class="allocation_name">地址</view>
- </view>
- <view class="allocation_allocate">
- <view class="allocation_allocateimg">
- <t-icon name="file-setting" size="50rpx" data-name="file-setting" color="#07c160"/>
-
- </view>
- <view class="allocation_name">版本</view>
- </view>
-
- </view>
- <view class="allocation_box_allocate" wx:if="{{user.operationRole==5||user.operationRole==6}}">
- <view class="allocation_allocate" bind:tap="onelectricity">
- <view class="allocation_allocateimg">
- <t-icon name="file-setting" size="50rpx" data-name="file-setting" color="#07c160"/>
-
- </view>
- <view class="allocation_name" wx:if="{{user.operationRole==5}}">充电统计</view>
- <view class="allocation_name" wx:if="{{user.operationRole==6}}">放电统计</view>
- </view>
- <view class="allocation_allocate">
- <view class="allocation_allocateimg">
- <t-icon name="service" size="50rpx" data-name="service" color="#07c160"/>
-
- </view>
- <!-- <view class="allocation_name">联系客服</view> -->
- <button class="contact-button" open-type="contact" plain>
- <view style="font-size: 26rpx;">联系客服</view>
- </button>
- </view>
- <view class="allocation_allocate" bind:tap="onsetup">
- <view class="allocation_allocateimg">
- <t-icon name="setting-1" size="50rpx" data-name="setting-1" color="#07c160"/>
-
- </view>
- <view class="allocation_name">设置</view>
- </view>
- <!-- <view class="allocation_allocate"> -->
- <!-- <view class="allocation_allocateimg">
- <t-icon name="task-location" size="50rpx" data-name="task-location" color="#07c160"/>
-
- </view>
- <view class="allocation_name"></view> -->
- <!-- </view> -->
- <view class="allocation_allocate">
-
- </view>
- </view>
- <view class="allocation_box_allocate" wx:if="{{user.operationRole==4}}">
- <view class="allocation_allocate" data-name="address" bind:tap="toconfigure">
- <view class="allocation_allocateimg">
- <t-icon name="task-location" size="50rpx" data-name="task-location" color="#07c160"/>
-
- </view>
- <view class="allocation_name">地址</view>
- </view>
- <view class="allocation_allocate">
- <view class="allocation_allocateimg">
- <t-icon name="file-setting" size="50rpx" data-name="file-setting" color="#07c160"/>
-
- </view>
- <view class="allocation_name">版本</view>
- </view>
- <view class="allocation_allocate">
- <view class="allocation_allocateimg">
- <t-icon name="service" size="50rpx" data-name="service" color="#07c160"/>
-
- </view>
- <!-- <view class="allocation_name">联系客服</view> -->
- <button class="contact-button" open-type="contact" plain>
- <view style="font-size: 26rpx;">联系客服</view>
- </button>
- </view>
- <view class="allocation_allocate" bind:tap="onsetup">
- <view class="allocation_allocateimg">
- <t-icon name="setting-1" size="50rpx" data-name="setting-1" color="#07c160"/>
-
- </view>
- <view class="allocation_name">设置</view>
- </view>
- </view>
- </view>
-
- <!-- <view class="allocation_box">
-
- <view class="allocation" data-name="userlist" bind:tap="toconfigure">
- <view class="allocation_3">分配工单</view>
- <view class="allocation_1">
- <view class="allocation_2"></view>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- </view>
- <view class="allocation" data-name="order" bind:tap="toconfigure">
- <view class="allocation_3">我的工单</view>
- <view class="allocation_1">
- <view class="allocation_2"></view>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- </view>
- <view class="allocation" data-name="driver" bind:tap="toconfigure">
- <view class="allocation_3">工单发票</view>
- <view class="allocation_1">
- <view class="allocation_2"></view>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- </view>
- <view wx:if="{{user.operationRole==5||user.operationRole==6}}" class="allocation" data-name="address" bind:tap="toconfigure">
- <view class="allocation_3">地址</view>
- <view class="allocation_1">
- <view class="allocation_2"></view>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- </view>
- </view> -->
-
- <!-- <view class="allocation_box">
-
- <view class="allocation">
- <view class="allocation_3">小程序版本</view>
- <view class="allocation_1">
- <view class="allocation_2" wx:if="{{accountInfo!=''}}">V {{accountInfo}}</view>
- <view class="allocation_2" wx:else>V 1.0.0</view>
-
- </view>
- </view>
- <view class="allocation">
- <view class="allocation_31">
- <button class="contact-button" open-type="contact" plain>
- <view>联系客服</view>
- </button>
- </view>
- <view class="allocation_1">
- <view class="allocation_2"></view>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- </view>
- <view class="allocation" bind:tap="onsetup">
- <view class="allocation_3">设置</view>
- <view class="allocation_1">
- <view class="allocation_2"></view>
- <t-icon name="chevron-right-s" size="40rpx" data-name="chevron-right-s"/>
- </view>
- </view>
- </view> -->
- </view>
- <wxs module="js">
- // 金额省略小数点后两位(直接取整数,丢掉小数)
- function formatIntMoney(num) {
- if (!num || isNaN(num)) return "0";
- return parseInt(num); // 直接截取整数部分
- }
-
- // 可选:保留两位小数(标准金额)
- function toFixed2(num) {
- if (!num || isNaN(num)) return "0.00";
- return parseFloat(num).toFixed(2);
- }
-
- module.exports = {
- formatIntMoney: formatIntMoney,
- toFixed2: toFixed2
- };
- </wxs>
- <!-- -->
|