| | |
| | | <text class="chuany-font50 fs-weight__500">{{balance}}</text> |
| | | </view> |
| | | <view class="right"> |
| | | <up-button type="warning" size="small" shape="circle" @click="goMoney" |
| | | :text="identity=='enterprise'?'充值':'提现'"></up-button> |
| | | <up-button type="warning" size="small" shape="circle" @click="goMoney" v-if="identity!=='enterprise'" |
| | | text="提现"></up-button> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | <view class="tool_wrap"> |
| | | <view class="tool_title chuany-flex chuany-justify-between"> |
| | | <view class="title"> |
| | | <text>收入明细</text> |
| | | <text>工资明细</text> |
| | | </view> |
| | | <view class="chuany-flex title_right" @click="toIncome"> |
| | | <text class="c-m-r-10">全部</text> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | mapActions, |
| | | mapGetters, |
| | | mapMutations |
| | | } from 'vuex' |
| | | export default { |
| | | onLoad() { |
| | | let that = this |
| | | that.identity = this.$db.get('identity') |
| | | }, |
| | | data() { |
| | | return { |
| | | identity: '', |
| | | // identity: '', |
| | | imcomeInfo: null, |
| | | pageIndex: 1, |
| | | pageSize: 20, |
| | | balance: '0.00' |
| | | // 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) |
| | | // that.identity = this.$db.get('identity') |
| | | // this.userInfo = this.$db.get('userInfo') || {} |
| | | // uni.getStorage({ |
| | | // key: 'identity', |
| | | // success: function(res) { |
| | | // that.identity = res.data |
| | | // if (res.data == 'worker') { |
| | | // if (that.userInfo.userWorker) { |
| | | // that.balance = that.$common.moneySub(that.userInfo.userWorker.tiXianZonge, that.userInfo.userWorker.yiTiXianJine) |
| | | // } |
| | | // } else { |
| | | // if (that.userInfo.userCompany) { |
| | | // that.balance = that.userInfo.userCompany.chongZhiYue ? that.userInfo.userCompany.chongZhiYue : '0.00' |
| | | // } |
| | | // } |
| | | // } |
| | | // }); |
| | | }, |
| | | onShow(){ |
| | | this.PostMyTiXianDetailListPage() |
| | | }, |
| | | computed:{ |
| | | ...mapGetters(['userInfo', 'identity']), |
| | | |
| | | balance() { |
| | | if (this.identity == 'worker') { |
| | | if (this.userInfo.userWorker) { |
| | | return this.$common.moneySub(this.userInfo.userWorker.tiXianZonge, this.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' |
| | | return '0.00' |
| | | } |
| | | } else { |
| | | if (this.userInfo.userCompany) { |
| | | return this.userInfo.userCompany.chongZhiYue ? this.userInfo.userCompany |
| | | .chongZhiYue : |
| | | '0.00' |
| | | } else { |
| | | return '0.00' |
| | | } |
| | | } |
| | | }); |
| | | this.PostMyTiXianDetailListPage() |
| | | } |
| | | }, |
| | | methods: { |
| | | PostMyTiXianDetailListPage() { |
| | |
| | | }, |
| | | goMoney() { |
| | | if (this.identity == 'enterprise') { |
| | | uni.navigateTo({ |
| | | url: '/pages/wallet/withdrawal' |
| | | }) |
| | | // uni.navigateTo({ |
| | | // url: '/pages/wallet/withdrawal' |
| | | // }) |
| | | } else { |
| | | uni.navigateTo({ |
| | | url: '/pages/wallet/recharge' |
| | |
| | | } |
| | | } |
| | | |
| | | @import './mine.scss'; |
| | | // @import './mine.scss'; |
| | | |
| | | .money_bag { |
| | | background: #fff; |