123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196 |
- <template>
- <view style="background-color: #f2f2f6;padding-bottom: 0.01rpx;">
- <view style="background-color: #fff;position: fixed;top: 0;width: 100%;z-index: 8;"><u-tabs :list="list"
- :current="current" lineColor="#FD4B09" @click="sectionChange"></u-tabs>
- <view
- style="background-color: #fff;padding: 8rpx 0rpx;display: flex;justify-content: space-between;align-items: center;">
- <u-search placeholder="请输入订单号" v-model="form.sysNo" @custom="custom" @search="custom"></u-search>
- </view>
- </view>
- <view class="content" style="margin-top: 95px;">
- <view class="contentBox" v-for="(item,index) in dataList" :key="index" @click="choice(item,index)">
- <view style="width: 100%;margin: 0 auto;">
- <u-cell-group :border="false">
- <u-cell :border="false" center :title="`${item.salesCompanyName || ''}`" arrow-direction="down">
- <view slot="icon" style="width: 10rpx;height: 35rpx;background-color: #fd4b09;"></view>
- <view slot="value">
- <view
- style="padding: 0rpx 20rpx;border:1rpx solid #FD4B09;border-radius: 100rpx;color: #FD4B09;">
- {{item.xcxStatus || ''}}
- </view>
- </view>
- </u-cell>
- </u-cell-group>
- <view class="textBox">
- <view
- style="overflow:hidden;white-space: nowrap;text-overflow: ellipsis;-o-text-overflow:ellipsis;">
- {{item.goodsNameJoin || ''}}
- </view>
- </view>
- <view class="textBox">
- <view>订单数量:</view>
- <view>{{~~item.goodsTotalNum || ''}}</view>
- </view>
- <view class="textBox">
- <view>订单金额:</view>
- <view>¥{{item.totalMoney || ''}}</view>
- </view>
- <view class="textBox">
- <view>订单日期:</view>
- <view>{{item.createTime || ''}}</view>
- </view>
- </view>
- </view>
- </view>
- <u-empty v-if="page.total == 0" style="position: absolute;top: 45%;left: 50%;transform:translate(-50%,-50%)"
- mode="data" icon="http://cdn.uviewui.com/uview/empty/data.png" />
- <u-loadmore v-if="page.total !== 0 && dataList.length != 0" :status="status" />
- </view>
- </template>
- <script>
- import {
- appStatusList
- } from '@/api/views/salesSlip/index.js'
- export default {
- data() {
- return {
- current: 0,
- list: [{
- name: '全部',
- status: '',
- badge: {
- value: 0
- }
- }
- // , {
- // name: '未付款',
- // status: '未付款',
- // badge: {
- // value: 0
- // }
- // }
- , {
- name: '待发货',
- status: '待发货',
- badge: {
- value: 0
- }
- }, {
- name: '待收货',
- status: '待收货',
- badge: {
- value: 0
- }
- }, {
- name: '已完成',
- status: '已完成',
- badge: {
- value: 0
- }
- }, {
- name: '退款售后',
- status: '退款售后',
- badge: {
- value: 0
- }
- }],
- dataList: [],
- search: {},
- page: {
- total: 0,
- size: 10,
- current: 1
- },
- status: 'loadmore',
- }
- },
- onLoad(onLoad) {
- for (let i in this.list) {
- if (onLoad.text == this.list[i].name) {
- this.current = i
- }
- }
- this.page = {
- total: 0,
- size: 10,
- current: 1
- }
- this.search = {
- xcxStatus: this.list[this.current].status
- }
- this.dataList = []
- this.onSearch()
- },
- onReachBottom() {
- this.status = 'loading'
- if (this.dataList.length < this.page.total) {
- this.page.current++
- this.onSearch()
- } else {
- this.status = 'nomore'
- }
- },
- methods: {
- sectionChange(item) {
- this.current = item.index;
- this.search = {
- xcxStatus: this.list[item.index].name == "全部" ? "" : this.list[item.index].name
- }
- this.page = {
- total: 0,
- size: 10,
- current: 1
- }
- this.dataList = []
- this.onSearch()
- },
- onSearch() {
- uni.showLoading({
- title: '加载中',
- mask: true
- });
- appStatusList({
- size: this.page.size,
- current: this.page.current,
- ...this.search
- }).then(res => {
- this.dataList = this.dataList.concat(res.data.records)
- this.page.total = res.data.total
- if (this.dataList.length == res.data.total) {
- this.status = 'nomore'
- }
- uni.hideLoading();
- }).catch(err => {
- uni.hideLoading();
- })
- },
- choice(item, index) {
- uni.$u.route('/pages/views/salesSlip/orderDetails', {
- id: item.id
- });
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .contentBox {
- width: 96%;
- margin: 20rpx auto;
- background-color: #FFFFFF;
- border-radius: 20rpx;
- /* box-shadow: 0 5rpx 14rpx 0 rgba(101, 176, 249, 0.42); */
- padding-top: 15rpx;
- padding-bottom: 10rpx;
- }
- .textBox {
- padding: 0 15px;
- display: flex;
- justify-content: space-between;
- font-size: 24rpx;
- margin-bottom: 10rpx;
- align-items: flex-end;
- }
- </style>
|