| | |
| | | </view> |
| | | </view> |
| | | |
| | | <scroll-view scroll-y class="page-scroll"> |
| | | <scroll-view scroll-y class="page-scroll" @scrolltolower="handleScrollTolower"> |
| | | <view v-if="currentTab === 'apply'" class="card-list"> |
| | | <view v-for="item in applyList" :key="item.id" class="invoice-card apply-card"> |
| | | <view class="order-no"> |
| | | <text>订单编号:{{ item.code }}</text> |
| | | <view class="mode-tag city-tag" v-if="item.type === 1">异地存取</view> |
| | | <view class="mode-tag local-tag" v-else>就地存取</view> |
| | | <view class="mode-tag city-tag" v-if="item.type === 1">同城寄送</view> |
| | | <view class="mode-tag local-tag" v-else>就地寄存</view> |
| | | </view> |
| | | <view class="address-group"> |
| | | <view class="address-row"> |
| | |
| | | <text class="price-label">实付款:</text> |
| | | <text class="price-value">¥{{((item.estimatedAmount || 0)/100).toFixed(2) }}</text> |
| | | </view> |
| | | <view class="action-btn primary-btn" @tap="goInvoiceRequest(item)">申请开票</view> |
| | | <!-- <view class="action-btn primary-btn" @tap="goInvoiceRequest(item)">申请开票</view> --> |
| | | </view> |
| | | </view> |
| | | </view> |
| | |
| | | onLoad() { |
| | | this.getApplyList() |
| | | }, |
| | | onReachBottom() { |
| | | if (this.currentTab === 'apply') { |
| | | this.getApplyList() |
| | | } else if (this.currentTab === 'history') { |
| | | this.getHistoryList() |
| | | } |
| | | }, |
| | | methods: { |
| | | handleScrollTolower() { |
| | | if (this.currentTab === 'apply') { |
| | | this.getApplyList() |
| | | } else if (this.currentTab === 'history') { |
| | | this.getHistoryList() |
| | | } |
| | | }, |
| | | async getApplyList() { |
| | | if (!this.isRequest) return |
| | | const res = await this.$u.api.myOrderPage({ |
| | |
| | | }) |
| | | this.applyList = [...this.applyList, ...list] |
| | | this.page++ |
| | | if (res.data.total <= this.applyList.length) { |
| | | console.log(res.data.total, this.applyList.length) |
| | | if (this.applyList.length >= res.data.total) { |
| | | this.isRequest = false |
| | | } |
| | | } |
| | |
| | | }) |
| | | this.historyList = [...this.historyList, ...list] |
| | | this.historyPage++ |
| | | if (res.data.total <= this.historyList.length) { |
| | | if (this.historyList.length >= res.data.total) { |
| | | this.historyIsRequest = false |
| | | } |
| | | } |
| | | }, |
| | | handleSearch() { |
| | | this.historyPage = 1 |
| | | this.historyList = [] |
| | | this.historyIsRequest = true |
| | | this.getHistoryList() |
| | | if (this.currentTab === 'apply') { |
| | | this.page = 1 |
| | | this.applyList = [] |
| | | this.isRequest = true |
| | | this.getApplyList() |
| | | } else if (this.currentTab === 'history') { |
| | | this.historyPage = 1 |
| | | this.historyList = [] |
| | | this.historyIsRequest = true |
| | | this.getHistoryList() |
| | | } |
| | | }, |
| | | getTabIcon(tab) { |
| | | return this.currentTab === tab.value ? tab.activeIcon : tab.icon; |
| | |
| | | .mode-tag { |
| | | width: 112rpx; |
| | | height: 38rpx; |
| | | line-height: 38rpx; |
| | | border-radius: 8rpx; |
| | | display: flex; |
| | | align-items: baseline; |