| | |
| | | <view class="c-p-b-16"> |
| | | {{identity=='enterprise'?"企业余额(元)":'收入余额(元)'}} |
| | | </view> |
| | | <text class="chuany-font50 fs-weight__500">12.88</text> |
| | | <text class="chuany-font50 fs-weight__500">{{balance}}</text> |
| | | </view> |
| | | <view class="right"> |
| | | <up-button type="warning" size="small" shape="circle" :text="identity=='enterprise'?'充值':'提现'"></up-button> |
| | | <up-button type="warning" size="small" shape="circle" @click="goMoney" |
| | | :text="identity=='enterprise'?'充值':'提现'"></up-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="money_bag"> |
| | | <view class="money_bag" v-if="identity=='worker'"> |
| | | <view class="tool_wrap"> |
| | | <view class="tool_title chuany-flex chuany-justify-between"> |
| | | <view class="title"> |
| | | <text>收入明细</text> |
| | | </view> |
| | | <view class="chuany-flex title_right"> |
| | | <view class="chuany-flex title_right" @click="toIncome"> |
| | | <text class="c-m-r-10">全部</text> |
| | | <up-icon name="arrow-right"></up-icon> |
| | | </view> |
| | | </view> |
| | | <view class="tool_content"> |
| | | <view class="" v-if="imcomeInfo&&imcomeInfo.length>0"> |
| | | <up-cell :value="`${item.yiTiXianJine} 元`" :title="item.zhiChuShouRuName" :label="item.remark" |
| | | :key="index" v-for="(item,index) in imcomeInfo"></up-cell> |
| | | </view> |
| | | |
| | | <view class="tool_content" v-else> |
| | | <up-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"> |
| | | </up-empty> |
| | | </view> |
| | |
| | | }, |
| | | data() { |
| | | return { |
| | | identity: '' |
| | | identity: '', |
| | | imcomeInfo: null, |
| | | pageIndex: 1, |
| | | pageSize: 20, |
| | | balance: '0.00' |
| | | } |
| | | }, |
| | | onLoad() { |
| | | let that = this |
| | | this.userInfo = this.$db.get('userInfo') ? JSON.parse(this.$db.get('userInfo')) : {} |
| | | uni.getStorage({ |
| | | key: 'identity', |
| | | success: function(res) { |
| | | that.identity = res.data |
| | | if (res.data == 'worker') { |
| | | that.balance = that.$common.moneySub(that.userInfo.userWorker.tiXianZonge, that |
| | | .userInfo.userWorker.yiTiXianJine) |
| | | } else { |
| | | console.log(that.identity, that.userInfo.userWorker.tiXianZonge, |
| | | 'userInfo.userWorker.tiXianZonge'); |
| | | that.balance = that.userInfo.userCompany.chongZhiYue ? that.userInfo.userCompany |
| | | .chongZhiYue : '0.00' |
| | | } |
| | | } |
| | | }); |
| | | this.PostMyTiXianDetailListPage() |
| | | }, |
| | | methods: { |
| | | |
| | | PostMyTiXianDetailListPage() { |
| | | let obj = { |
| | | pageIndex: this.pageIndex, |
| | | pageSize: this.pageSize |
| | | } |
| | | this.$api.PostMyTiXianDetailListPage(obj).then(res => { |
| | | this.imcomeInfo = res.data.items |
| | | console.log(res, this.imcomeInfo, '=============='); |
| | | }) |
| | | }, |
| | | toIncome() { |
| | | uni.navigateTo({ |
| | | url: '/pages/income/income' |
| | | }) |
| | | }, |
| | | goMoney() { |
| | | if (this.identity == 'enterprise') { |
| | | uni.navigateTo({ |
| | | url: '/pages/wallet/withdrawal' |
| | | }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/pages/wallet/recharge' |
| | | }) |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | |
| | | .tool_title { |
| | | padding: 30rpx; |
| | | border-bottom: 2rpx solid #eee; |
| | | |
| | | .title { |
| | | color: #333; |
| | | font-size: 32rpx; |
| | | font-weight: 700; |
| | | } |
| | | .title_right{ |
| | | color:#939499; |
| | | |
| | | .title_right { |
| | | color: #939499; |
| | | } |
| | | } |
| | | |