123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <template>
- <view>
- <view class="tabs-view">
- <view class="keyword-view clearfix">
- <u-search :clearabled="true" @custom="searchData" @search="searchData" @clear="searchData" placeholder="客户名称" v-model="keyword"></u-search>
- </view>
- <u-tabs-swiper ref="tabs" font-size="28" :current="tabs_current" :list="status_list" @change="statusChange" :is-scroll="false"></u-tabs-swiper>
- </view>
- <view class="list-ul">
- <view
- class="list-li"
- v-for="(item, index) in receipt_list"
- :key="index"
- @click="goPage('/pagesT/Finance/ApplyReceiptDetail?id=' + item.id + '&time=' + item.createTime)"
- >
- <view class="title clearfix">
- <view class="float_left">{{ item.customerName }}</view>
- <view class="float_right">
- <text class="success-status" v-if="item.auditStatus === 2">已审核</text>
- <text class="warning-status" v-else>待审核</text>
- <text class="custom-icon custom-icon-jinru"></text>
- </view>
- </view>
- <view class="list-cont">
- <view class="list-cont-li" @click.stop="copy(item.no)">
- <text style="margin-right: 20rpx;">{{ item.no }}</text>
- <u-icon name="copy" custom-prefix="custom-icon" size="22"></u-icon>
- </view>
- <view class="list-cont-li clearfix">
- <view class="float_left">{{ $u.timeFormat(item.createTime, 'yyyy-mm-dd') }}</view>
- <view class="float_right price">{{ $utils.formattedNumber(item.totalActualAmount) }}</view>
- </view>
- </view>
- </view>
- <view v-if="!receipt_list.length" class="empty-view"><u-empty text="暂无数据" mode="list"></u-empty></view>
- <u-loadmore v-if="receipt_list.length" :status="load_status" />
- </view>
- <addBtn v-if="$accessCheck($Access.addApplyReceipt)" url="/pagesT/Finance/AddApplyReceipt"></addBtn>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- receipt_list: [],
- load_status: 'nomore',
- page: 1,
- pageSize: 10,
- total: 0,
- tabs_current: 0,
- keyword: '',
- search_show: false,
- status_list: [
- {
- value: '',
- name: '全部'
- },
- {
- value: 1,
- name: '待审核'
- },
- {
- value: 2,
- name: '已审核'
- }
- ],
- billStatus: '',
- customerName: '',
- customerId: '',
- customerData: ''
- };
- },
- onShow() {
- this.page = 1;
- this.getAllReceiptRequisition();
- },
- onReachBottom() {
- if (this.tab_current === 0) {
- if (this.total / this.pageSize > this.page) {
- this.page += 1;
- this.getAllReceiptRequisition();
- }
- }
- },
- onPullDownRefresh() {
- this.getAllReceiptRequisition();
- },
- methods: {
- getAllReceiptRequisition() {
- this.load_status = 'loading';
- this.$u.api
- .getAllReceiptRequisition({
- page: this.page,
- pageSize: this.pageSize,
- operatorName: '',
- custormerName: this.keyword,
- auditStatus: this.billStatus
- })
- .then(res => {
- uni.stopPullDownRefresh();
- if (this.page === 1) {
- this.receipt_list = res.data;
- } else {
- this.receipt_list = this.receipt_list.concat(res.data);
- }
- this.total = res.pageTotal;
- this.load_status = this.$utils.loadStatus(this.page, this.pageSize, this.total);
- })
- .catch(err => {
- uni.stopPullDownRefresh();
- });
- },
- statusChange(index) {
- this.tabs_current = index;
- this.billStatus = this.status_list[index].value;
- this.searchData();
- },
- searchData() {
- this.page = 1;
- this.getAllReceiptRequisition();
- }
- }
- };
- </script>
- <style lang="scss" scoped>
- .tabs-view {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- background-color: #ffffff;
- z-index: 99;
- .keyword-view {
- padding: 20rpx 24rpx 0;
- .float_left {
- width: 640rpx;
- }
- .float_right {
- line-height: 64rpx;
- width: 50rpx;
- text-align: center;
- color: #666666;
- }
- }
- }
- .list-ul {
- padding-top: 160rpx;
- .list-li {
- width: 710rpx;
- border-radius: 20rpx;
- margin: 20rpx auto;
- padding: 10rpx 24rpx 30rpx;
- margin-top: 20rpx;
- background-color: #ffffff;
- .title {
- line-height: 80rpx;
- border-bottom: 1px solid #eeeeee;
- .float_left {
- font-weight: bold;
- }
- .float_rigth {
- .custom-icon-jinru {
- margin-left: 10rpx;
- font-size: 28rpx;
- }
- }
- }
- .list-cont {
- margin-top: 10rpx;
- .list-cont-li {
- color: #6c6c6c;
- line-height: 40rpx;
- font-size: 24rpx;
- .price {
- font-weight: bold;
- font-size: 26rpx;
- color: $uni-color-error;
- }
- }
- }
- }
- }
- </style>
|