123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437 |
- <template>
- <view>
- <view class="wrap">
- <view class="u-tabs-box" style="width:100%">
- <u-tabs :list="list" :is-scroll="false" :current="current" @change="handleFilterBrand"></u-tabs>
- </view>
- <view class="page-box" v-if="pages!=0">
- <view class="order" v-for="(res,index) in orderList" :key="index">
- <view class="order-one">
- </view>
- <text class="order-one-text">核销金额:¥{{res.amount}}</text>
- <view class="order-one-view">
- {{b2bStatus}}
- </view>
- <view class="order-one-xian">
- </view>
- <view class="order-two">
- <view class="">
- 创建时间
- </view>
- <view class="">
- {{res.createTime}}
- </view>
- </view>
- <view class="order-two" v-if="res.agentAuditTime != null">
- <view class="">
- 审核时间
- </view>
- <view class="">
- {{res.agentAuditTime}}
- </view>
- </view>
- <view class="order-two">
- <view class="">
- {{res.brandName}}轮胎
- </view>
- <view class="">
- ¥{{res.amount}}
- </view>
- </view>
- <view class="order-two">
- <view class="">
- 当前状态
- </view>
- <view v-if="res.status == 0">
- 待审核
- </view>
- <view v-else-if="res.status == 1">
- 审核未通过
- </view>
- <view v-else-if="res.status == 2">
- 审核通过
- </view>
- <view v-else-if="res.status == 3">
- 已过期
- </view>
- <view v-else-if="res.status == 4">
- 已审核
- </view>
- </view>
- </view>
- <u-loadmore :status="status" />
- </view>
- <view v-else style="margin-top: 100rpx;">
- <u-empty text="暂无数据" mode="list"></u-empty>
- </view>
- </view>
- </view>
- </template>
- <script>
- import {
- request
- } from '../../../common/request/request'
- require("promise.prototype.finally").shim()
- export default {
- data() {
- return {
- orderList: [
- ],
- length: '',
- status: '没',
- pages: '',
- b2bStatus: '',
- list: [{
- name: "待审核"
- }, {
- name: "已审核"
- }, {
- name: "已失效"
- }],
- current: 0,
- current3: 0,
- current2: 1
- };
- },
- onLoad() {},
- created() {
- this.getDate()
- },
- methods: {
- // 获取列表数据
- getDate() {
- uni.showLoading({
- title: '加载中...'
- });
- request({
- url: '/myapp/storeSelectCoupon',
- method: 'post',
- data: {
- storeId: this.$store.state.storeInfo.storeId,
- "size": 10, //门店0
- "current": this.current2,
- "status": this.current3,
- 'userId': this.$store.state.storeInfo.userId
- }
- }).then(res => {
- this.orderList = this.orderList.concat(res.data.data.records)
- // 页数
- this.pages = res.data.data.pages
-
- this.orderList = this.orderList.concat(res.data.data.records)
- for (let i = 0; i < res.data.data.records.length; i++) {
- if (res.data.data.records[i].status == 0) {
- this.b2bStatus = "待审核"
- } else if (res.data.data.records[i].status == 2) {
- this.b2bStatus = "已审核"
- } else {
- this.b2bStatus = "已失效"
- }
- }
- }).catch(err => {
-
- })
- .finally(() => {
- setTimeout(() => {
- uni.hideLoading();
- this.loading = false;
- }, 300)
- })
- },
-
- handleFilterBrand: function(v2) {
- this.current = v2
- if (v2 == 0) {
- this.current1 = 0
- this.current3 = 0
- } else if (v2 == 1) {
- this.current1 = 4
- this.current3 = 4
- } else {
- this.current1 = 3
- this.current3 = 3
- }
- this.current2 = 1
- request({
- url: '/myapp/storeSelectCoupon',
- method: 'post',
- data: {
- storeId: this.$store.state.storeInfo.storeId,
- "size": 10, //门店0
- "current": this.current2,
- "status": this.current1,
- 'userId': this.$store.state.storeInfo.userId
- }
- }).then(res => {
- this.orderList = res.data.data.records
- // 页数
- this.pages = res.data.data.pages
- // this.orderList = this.orderList.concat(res.data.data.records)
- for (let i = 0; i < res.data.data.records.length; i++) {
-
- if (res.data.data.records[i].status == 0) {
- this.b2bStatus = "待审核"
- } else if (res.data.data.records[i].status == 2) {
- this.b2bStatus = "已审核"
- } else {
- this.b2bStatus = "已失效"
- }
- }
- }).catch(err => {
-
- })
- .finally(() => {
- setTimeout(() => {
- uni.hideLoading();
- this.loading = false;
- }, 300)
- })
- }
- },
- onReachBottom() {
- setTimeout(() => {
- if (this.current2 > this.pages) {
- this.status = 'nomore'
- } else {
- this.current2 = ++this.current2;
- this.status = 'loading';
- this.getDate()
- }
- }, 2000)
- }
- }
- </script>
- <style>
- /* #ifndef H5 */
- page {
- height: 100%;
- background-color: #f2f2f2;
- }
- /* #endif */
- </style>
- <style lang="scss" scoped>
- .u-tabs-box {
- width: 100%;
- // padding-left:30rpx;
- }
- .order-one-view {
- width: 120rpx;
- line-height: 40rpx;
- background-color: #0094FE;
- position: relative;
- left: 575rpx;
- top: -35rpx;
- border-top-left-radius: 50rpx;
- border-bottom-left-radius: 50rpx;
- font-size: 24rpx;
- color: #fff;
- text-align: center;
- }
- // 插件代码
- .order {
- width: 710rpx;
- background-color: #ffffff;
- margin: 20rpx auto;
- border-radius: 20rpx;
- box-sizing: border-box;
- padding: 20rpx;
- font-size: 28rpx;
- .top {
- display: flex;
- justify-content: space-between;
- .left {
- display: flex;
- align-items: center;
- .store {
- margin: 0 10rpx;
- font-size: 32rpx;
- font-weight: bold;
- }
- }
- .right {
- color: $u-type-warning-dark;
- }
- }
- .item {
- display: flex;
- margin: 20rpx 0 0;
- .left {
- margin-right: 20rpx;
- image {
- width: 200rpx;
- height: 200rpx;
- border-radius: 10rpx;
- }
- }
- .content {
- .title {
- font-size: 28rpx;
- line-height: 50rpx;
- }
- .type {
- margin: 10rpx 0;
- font-size: 24rpx;
- color: $u-tips-color;
- }
- .delivery-time {
- color: #e5d001;
- font-size: 24rpx;
- }
- }
- .right {
- margin-left: 10rpx;
- padding-top: 20rpx;
- text-align: right;
- .decimal {
- font-size: 24rpx;
- margin-top: 4rpx;
- }
- .number {
- color: $u-tips-color;
- font-size: 24rpx;
- }
- }
- }
- .total {
- margin-top: 20rpx;
- text-align: right;
- font-size: 24rpx;
- .total-price {
- font-size: 32rpx;
- }
- }
- .bottom {
- display: flex;
- margin-top: 40rpx;
- padding: 0 10rpx;
- justify-content: space-between;
- align-items: center;
- .btn {
- line-height: 52rpx;
- width: 160rpx;
- border-radius: 26rpx;
- border: 2rpx solid $u-border-color;
- font-size: 26rpx;
- text-align: center;
- color: $u-type-info-dark;
- }
- .evaluate {
- color: $u-type-warning-dark;
- border-color: $u-type-warning-dark;
- }
- }
- }
- .centre {
- text-align: center;
- margin: 200rpx auto;
- font-size: 32rpx;
- image {
- width: 164rpx;
- height: 164rpx;
- border-radius: 50%;
- margin-bottom: 20rpx;
- }
- .tips {
- font-size: 24rpx;
- color: #999999;
- margin-top: 20rpx;
- }
- .btn {
- margin: 80rpx auto;
- width: 200rpx;
- border-radius: 32rpx;
- line-height: 64rpx;
- color: #ffffff;
- font-size: 26rpx;
- background: linear-gradient(270deg, rgba(249, 116, 90, 1) 0%, rgba(255, 158, 1, 1) 100%);
- }
- }
- .wrap {
- display: flex;
- flex-direction: column;
- height: calc(100vh - var(--window-top));
- width: 100%;
- }
- .swiper-box {
- flex: 1;
- }
- .swiper-item {
- height: 100%;
- }
- // 手敲代码
- .order-one {
- width: 6rpx;
- height: 30rpx;
- margin-top: 5rpx;
- margin-right: 30rpx;
- background-color: #0292FD;
- float: left;
- }
- .order-two {
- display: flex;
- justify-content: space-between;
- margin-top: 15rpx;
- font-size: 24rpx;
- color: #6A6A6A;
- }
- // 线
- .order-one-xian {
- width: 642rpx;
- height: 1rpx;
- border-bottom: 1rpx solid #E7E8EA;
- margin: 0 auto;
- margin-top: -20rpx;
- margin-bottom: 30rpx;
- }
- .order-one-text {
- font-size: 28rpx;
- font-weight: bold;
- color: #000;
- }
- </style>
|