| | |
| | | <block slot="content">我的审批</block> |
| | | </cu-custom> |
| | | </view> |
| | | <view class=""> |
| | | <view class="tabBox"> |
| | | <view class=""> |
| | | <u-subsection |
| | | :list="curlist" |
| | |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class=""> |
| | | <view class="cu-list menu-avatar"> |
| | | <view class="cu-item" v-for="(item,index) in assetsList" :key="index" @click="navTo(item.id)"> |
| | | <view class="cu-avatar radius lg bg-white" |
| | | style="background-image:url(../../static/device.png);"> |
| | | </view> |
| | | <view class="content"> |
| | | <view> |
| | | <view class="text-cut text-bold text-xl">{{item.approvalAssets[0].assets.name}}</view> |
| | | <view class="cu-tag radius bg-orange sm">数量:{{item.approvalAssets[0].quantity}}</view> |
| | | <view class="contentBox"> |
| | | |
| | | <mescroll-body ref="mescrollRef" @init="mescrollInit" @down="downCallback" @up="upCallback"> |
| | | <view class="cu-list menu-avatar"> |
| | | <view class="cu-item" v-for="(item,index) in assetsList" :key="index" @click="navTo(item.id)"> |
| | | <view class="cu-avatar radius lg bg-white" |
| | | style="background-image:url(../../static/device.png);"> |
| | | </view> |
| | | <view class="text-gray text-sm flex"> |
| | | <view class="text-cut">申请时间:{{item.createTime}}</view> |
| | | <view class="content"> |
| | | <view> |
| | | <view class="text-cut text-bold text-xl">{{item.approvalAssets[0].assets.name}}</view> |
| | | <view class="cu-tag radius bg-orange sm">数量:{{item.approvalAssets[0].quantity}}</view> |
| | | </view> |
| | | <view class="text-gray text-sm flex"> |
| | | <view class="text-cut">申请时间:{{item.createTime}}</view> |
| | | </view> |
| | | |
| | | </view> |
| | | |
| | | </view> |
| | | <view class="action"> |
| | | <view class="text-grey text-xs">申请状态</view> |
| | | <view class="cu-tag round bg-red sm">{{current+1===1?'待审批':current+1===2?'通过':"未通过"}}</view> |
| | | <view class="action"> |
| | | <view class="text-grey text-xs">申请状态</view> |
| | | <view class="cu-tag round bg-red sm">{{item.statusName}}</view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | </view> |
| | | |
| | | <view class="" v-if="assetsList.length===0"> |
| | | <u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"> |
| | | </u-empty> |
| | | </view> |
| | | |
| | | <!-- <view class="" v-if="assetsList.length===0"> |
| | | <u-empty mode="list" icon="http://cdn.uviewui.com/uview/empty/list.png"> |
| | | </u-empty> |
| | | </view> --> |
| | | </mescroll-body> |
| | | </view> |
| | | |
| | | |
| | | |
| | | |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import MescrollMixin from "@/uni_modules/mescroll-uni/components/mescroll-uni/mescroll-mixins.js"; |
| | | export default { |
| | | mixins: [MescrollMixin], // 使用mixin |
| | | data() { |
| | | return { |
| | | current: 0, |
| | | curlist: ['待处理', '已完成'], |
| | | curlist: ['已完成', '未通过'], |
| | | assetsList:[], |
| | | } |
| | | }, |
| | | onShow() { |
| | | this.getAssetList(); |
| | | // this.getAssetList(); |
| | | this.page = 1; |
| | | let page ={}; |
| | | page.num =1; |
| | | this.upCallback(page); |
| | | }, |
| | | methods: { |
| | | changeCurrent(index) { |
| | | this.current = index |
| | | this.getAssetList(); |
| | | // this.getAssetList(); |
| | | this.page = 1; |
| | | let page ={}; |
| | | page.num =1; |
| | | this.upCallback(page); |
| | | }, |
| | | |
| | | upCallback(page) { |
| | | |
| | | let pageNum = page.num; //页码,默认从1开始 |
| | | let pageSize = 10; //页长,默认每页10条 |
| | | |
| | | console.log('this.current',this.current) |
| | | this.$http.get('/assets/approval/myApproval',{params:{ |
| | | "pageNum":1, |
| | | "pageSize":100, |
| | | "type":this.current+1 |
| | | }}) |
| | | .then(res => { |
| | | // debugger; |
| | | if (res.data.code === 0) { |
| | | let data = res.data.data; |
| | | console.log('总资产'+ data.length) |
| | | if (page.num == 1) this.assetsList = []; //如果是第一页,需手动置空列表 |
| | | this.assetsList = this.assetsList.concat(data); //追加新数据 |
| | | |
| | | this.assetsList = this.assetsList.reverse(); |
| | | console.log(this.assetsList.length) |
| | | this.mescroll.endBySize(this.assetsList.length, res.data.total); |
| | | } |
| | | else{ |
| | | this.mescroll.endBySize(0, 0); |
| | | } |
| | | |
| | | }) |
| | | .catch(err => { |
| | | this.mescroll.endErr(); |
| | | console.log('异常', err); |
| | | }); |
| | | }, |
| | | |
| | | //请求 |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style> |
| | | <style lang="scss"> |
| | | .tabBox{ |
| | | z-index: 100; |
| | | position: fixed; |
| | | width: 100%; |
| | | top:90rpx; |
| | | |
| | | |
| | | } |
| | | .contentBox{ |
| | | z-index: 99; |
| | | position: fixed; |
| | | width: 100%; |
| | | top:165rpx; |
| | | } |
| | | </style> |