| | |
| | | <view class="status_bar"> |
| | | <!-- 这里是状态栏 --> |
| | | </view> |
| | | <uni-nav-bar left-icon="left" title="报销申请" @clickLeft="back" @clickRight="scan" :fixed="true" :border="false" |
| | | rightWidth="160rpx" leftWidth="160rpx"> |
| | | </uni-nav-bar> |
| | | |
| | | <uni-nav-bar left-icon="left" title="报销申请" @clickLeft="back" @clickRight="scan" :fixed="true" |
| | | :border="false" rightWidth="160rpx" leftWidth="160rpx" |
| | | > |
| | | <block slot="right"> |
| | | <view class="city"> |
| | | <view> |
| | | <text class="uni-nav-bar-text">{{user.username}}</text> |
| | | </view> |
| | | <uni-icons type="arrowdown" color="#333333" size="20" /> |
| | | </view> |
| | | </block> |
| | | </uni-nav-bar> |
| | | <!-- todo:搜索 --> |
| | | <view class="main-box"> |
| | | <view class="box" v-for="item in list" @click="goDetl(item)"> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import user from '@/pages/api/user/user.js' |
| | | export default { |
| | | data() { |
| | | return { |
| | | user: { |
| | | username: '', |
| | | id: 0, |
| | | type: '' |
| | | }, |
| | | falg: true, |
| | | list: [] |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.getReimburseOnline() |
| | | let that = this |
| | | uni.$on('isRefresh',function(data){ |
| | | console.log(data); |
| | | that.user.username = data.title |
| | | that.user.id = data.id |
| | | that.user.type = data.key |
| | | that.falg = false |
| | | }) |
| | | setTimeout(()=> { |
| | | this.getReimburseOnline() |
| | | },50) |
| | | if (this.falg) { |
| | | this.getDetail() |
| | | } |
| | | }, |
| | | methods: { |
| | | async getDetail() { |
| | | let res = await user.getDetail() |
| | | console.log(res); |
| | | if (res.code === 200) { |
| | | this.user.username = res.data.username |
| | | this.user.id = res.data.id |
| | | } else if (res.code === 403) { |
| | | this.backLogin(res) |
| | | } |
| | | }, |
| | | add() { |
| | | uni.navigateTo({ |
| | | url: '/pages/business/goBusiness/modiReimburseOnlineDetl', |
| | |
| | | }, |
| | | getReimburseOnline() { |
| | | let _this = this |
| | | let param = {curr:1,limit:16,dept_id: 0,user_id: 67} |
| | | if (_this.user.type == 'user_id') { |
| | | param = {curr:1,limit:16,user_id: _this.user.id} |
| | | } else if(_this.user.type == 'dept_id') { |
| | | param = {curr:1,limit:16,dept_id: _this.user.id} |
| | | } else { |
| | | param = {curr:1,limit:16} |
| | | } |
| | | uni.request({ |
| | | url: `${_this.baseUrl}/reimburseOnline/list/auth`, |
| | | header: { 'token': uni.getStorageSync('token') }, |
| | | data: param, |
| | | success(res) { |
| | | res = res.data |
| | | if (res.code === 200) { |