123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665 |
- <template>
- <block>
- <scroll-view class="scrollView" :scroll-x="true" style="width: 100%">
- <view class="navs">
- <text :class="'nav ' + (nowIndex == index ? 'bold' : '')" @tap="navChange" :data-index="index" :data-id="item.id" v-for="(item, index) in navs" :key="index">
- {{ item.name }}
- </text>
- <text class="borderLine" :style="'width: ' + (width + 'rpx') + ';left: ' + (45 + nowIndex * 150 + 'rpx')"></text>
- </view>
- </scroll-view>
- <view class="content" v-if="list.length > 0">
- <view
- class="lists"
- @tap="toPage"
- :data-order_id="item.id"
- data-url="/pages/operate/order_detail/order_detail"
- :data-index="index"
- v-for="(item, index) in list"
- :key="index"
- >
- <!-- <view class="iflexC">
- <text style="letter-spacing: 0px">订单编号: {{item.order_no}}</text>
- <text class="lists-time">下单时间: {{item.create_time}}</text>
-
- </view> -->
- <text class="lists-status" v-if="item.order_status == 0 && item.receive_type == 2">待发货</text>
- <text class="lists-status" v-if="item.order_status == 0 && item.receive_type == 1">待核销</text>
- <text class="lists-status" v-else-if="item.order_status == 1">审核通过</text>
- <text class="lists-status" v-else-if="item.order_status == 2">已退款</text>
- <text class="lists-status" v-else-if="item.order_status == 3">拒绝退款</text>
- <text class="lists-status" v-else-if="item.order_status == 4">已核销</text>
- <text class="lists-status" v-else-if="item.order_status == 5">已发货</text>
- <text class="lists-status" v-else-if="item.order_status == 6">已完成</text>
- <text class="lists-status" v-else-if="item.order_status == 7">退款待审</text>
- <view :class="'iflexC lists-content ' + (item.order_status == 6 ? 'borderNone' : '')">
- <image class="lists-img" :src="item.goods_pic" mode="aspectFill"></image>
- <text class="lists-title over_2">{{ item.goods_name }}</text>
- <!-- <view class="lists-num">
- <view class="lists-num1">数量: 1</view>
- <view class="goDetail" catchtap="goMovie" wx:if="{{item.order_status== 6&&item.is_film==1}}">查看电影票</view>
- <view class="goDetail" wx:else>查看详情</view>
- </view> -->
- <text class="lists-money">
- 价格:
- <text class="red" v-if="item.pay_money != '0.00'">¥{{ item.pay_money }}+</text>
- <text class="red">{{ item.integral }}</text>
- {{ unit }} {{ item.sku ? '(' + item.sku + ')' : '' }}
- </text>
- <text class="lists-time">下单时间:{{ item.create_time }}</text>
- </view>
- <!-- <view class="iflexC" style="border-bottom:1px solid #eee;" wx:if="{{item.deliver_no}}">
- <text class="lists-time1" style="padding-bottom:0">快递名称:{{item.send_comp}}</text>
- <text class="lists-time1">物流单号:{{item.deliver_no}} </text>
- </view> -->
- <view class="iflex l-btns" style="flex-direction: row-reverse">
- <button
- class="lists-btn btn2"
- @tap.stop.prevent="hexiao"
- :data-index="index"
- v-if="(item.order_status == 3 && item.receive_type == 1 && !item.is_film == 1) || (item.order_status == 0 && item.receive_type == 1 && !item.is_film == 1)"
- >
- 核销码
- </button>
- <button class="lists-btn btn2" @tap.stop.prevent="getMovie" :data-id="id" v-if="item.order_status == 0 && item.is_film == 1">点击领取</button>
- <!-- <button class="lists-btn btn2" catchtap="confirm" data-order_id="{{item.id}}" wx:if="{{item.order_status==4}}">确认已核销</button> -->
- <button class="lists-btn btn2" @tap.stop.prevent="confirm" :data-order_id="item.id" v-if="item.order_status == 5">确认收货</button>
- <button
- class="lists-btn btn1"
- @tap.stop.prevent="refundConfirm"
- :data-id="item.id"
- :data-area_code="item.ssq_code"
- data-type="99"
- v-if="item.order_status == 0"
- >
- 申请退款
- </button>
- <button
- class="lists-btn btn2"
- v-if="item.receive_type == 2 && item.order_status == 5"
- :data-phone="item.receiver_mobile"
- :data-no="item.deliver_no"
- @tap.stop.prevent="lookOrder"
- >
- 查看物流
- </button>
- </view>
- </view>
- </view>
- <view style="margin-top: 100rpx" v-if="!list.length && loaded">
- <msg status="1" icon="https://ms-oss.intelgice.com/yidu_tc/public/upload/12/8/c828dbb65be243c65117fa425e4937b6.png"></msg>
- </view>
- <!-- <msg status="2" v-if="list.length && loaded"></msg> -->
- <!-- 去掉跳转同城运营中心的tabbar -->
- <!-- <tabbar active='1'></tabbar> -->
- <!-- <view class="mask" v-if="flag">
- <view class="qrcode">
- <image mode="widthFix" :src="qr_img"></image>
- <view class="close" @tap="close">关闭</view>
- \
- </view>
- </view> -->
- </block>
- </template>
- <script>
- var app = getApp();
- export default {
- data() {
- return {
- list: [
- {
- create_time: "2022-03-26 15:45:59",
- deliver_no: "",
- goods_id: 1520,
- goods_name: "寒铁10件套美容工具IRON-0100 IRON-0100",
- goods_pic: "https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/2487/f04456f1d7360742a070f36b0901e0a7.png",
- id: 1182,
- integral: "0.00",
- is_deliver: 0,
- is_film: 0,
- order_no: "31038957705405027625933",
- order_status: 0,
- pay_money: "0.00",
- pay_time: "2022-03-26 15:45:59",
- receive_type: 2,
- receiver_mobile: "18779615160",
- send_comp: "",
- sku: "中号型",
- ssq_code: "360702",
- },
- {
- create_time: "2022-03-26 15:45:41",
- deliver_no: "",
- goods_id: 1520,
- goods_name: "寒铁10件套美容工具IRON-0100 IRON-0100",
- goods_pic: "https://ymyun-oss.oss-cn-hangzhou.aliyuncs.com/yidu_tc/public/upload/12/2487/f04456f1d7360742a070f36b0901e0a7.png",
- id: 1181,
- integral: "0.00",
- is_deliver: 0,
- is_film: 0,
- order_no: "31038957690909207348985",
- order_status: 0,
- pay_money: "0.00",
- pay_time: "2022-03-26 15:45:42",
- receive_type: 1,
- receiver_mobile: "18779615160",
- send_comp: "",
- sku: "中号型",
- ssq_code: "360702",
- }
-
-
- ],
- page: 1,
- loaded: false,
- nowIndex: 0,
- width: 60,
- navs: [
- {
- id: '4',
- name: '全部'
- },
- {
- id: 0,
- name: '待发货'
- },
- {
- id: 1,
- name: '待收货'
- },
- {
- id: '3',
- name: '已完成'
- }
- ],
- is_deliver: 4,
- unit: '积分',
- flag: false,
- qr_img: '',
- show: false,
- id: ''
- };
- },
- onLoad: function () {
- var that = this;
- // that.getlist();
- },
- onPullDownRefresh: function () {
- this.setData({
- list: [],
- page: 1,
- loaded: false
- });
- this.getlist();
- },
- onReachBottom: function () {
- this.loaded || this.getlist();
- },
- methods: {
- lookOrder(e) {
- var phone = e.currentTarget.dataset.phone;
- var no = e.currentTarget.dataset.no;
- uni.navigateTo({
- url: `/pages/other/logistics/logistics?phone=${phone}&no=${no}`
- });
- },
- refundConfirm(e) {
- let ta = this;
- a.jump('/yidu_tc/pages/order/order_refund/order_refund?area_code=' + a.pdata(e).area_code + '&id=' + a.pdata(e).id + '&type=' + a.pdata(e).type, 1); // wx.showToast({
- // title: '这是申请退款',
- // })
- // const that = this
- // const order_id = e.currentTarget.dataset.order_id
- // a.get('regionintegral/refund',
- // { uid: app.getCache('userinfo').uid, order_id: order_id },
- // function (res) {
- // const res1 = res ? JSON.parse(res.info) : ''
- // console.log(res1)
- // if (res1.code == 0) {
- // a.toast(res1.info, 'none')
- // setTimeout(function(){
- // that.initData()
- // that.getlist()
- // }, 1000)
- // }else{
- // a.toast(res1.info, 'none')
- // }
- // }
- // )
- },
- getMovie(e) {
- var id = e.currentTarget.dataset.id;
- uni.navigateTo({
- url: `/pages/movie/pages/receive/index?id=${id}&channel=integral`
- });
- },
- hexiao(e) {
- //点击核销弹出
- var index = e.currentTarget.dataset.index;
- var order_id = this.list[index].id;
- uni.navigateTo({
- url: '/pages/other/orderCode/orderCode?id=' + order_id + '&type=2'
- }); // var that = this;
- // wx.showLoading({
- // title: '加载中',
- // })
- // a.get('regionintegral/qrcode',
- // { uid: app.getCache('userinfo').uid, order_id: order_id},
- // function (res) {
- // if (res.code == 0) {
- // that.setData({
- // qr_img:res.info,
- // flag:true
- // })
- // wx.hideLoading({
- // complete: (res) => {},
- // })
- // }else{
- // a.toast(res.msg)
- // }
- // }
- // )
- },
- close() {
- this.setData({
- flag: false
- });
- },
- confirm(e) {
- // 确认收货
- const that = this;
- const order_id = e.currentTarget.dataset.order_id;
- a.get(
- 'regionintegral/confirm',
- {
- uid: app.globalData.getCache('userinfo').uid,
- order_id: order_id
- },
- function (res) {
- // const res1 = res ? JSON.parse(res.info) : ''
- console.log(res);
- if (res.code == 0) {
- a.toast(res.msg, 'none');
- setTimeout(function () {
- that.initData();
- that.getlist();
- }, 1000);
- } else {
- a.toast(res.msg, 'none');
- }
- }
- );
- },
- navChange(e) {
- if (this.nowIndex != e.currentTarget.dataset.index) {
- this.setData({
- nowIndex: e.currentTarget.dataset.index,
- is_deliver: e.currentTarget.dataset.id
- });
- this.initData();
- this.getlist();
- }
- },
- initData() {
- this.setData({
- page: 1,
- list: [],
- loaded: false
- });
- },
- getlist: function () {
- var that = this;
- var page = that.page; // Integral / exchangelog
- a.get(
- 'regionintegral/exchange',
- {
- page: page,
- uid: app.globalData.getCache('userinfo').uid,
- is_deliver: that.is_deliver
- },
- function (t) {
- uni.stopPullDownRefresh();
- if (t.code == 0) {
- if (t.info.length > 0) {
- // t.info[0].order_status = 6
- // t.info[0].is_film = 1
- that.setData({
- list: that.list.concat(t.info),
- page: page + 1,
- show: true
- });
- if (t.info.length < 10) {
- that.setData({
- loaded: true
- });
- }
- } else {
- that.setData({
- loaded: true
- });
- }
- } else {
- a.alert(t.msg);
- }
- },
- !that.show
- );
- },
- toPage(e) {
- let index = e.currentTarget.dataset.index;
- if (this.list[index].order_status == 6 && this.list[index].is_film == 1) {
- e.currentTarget.dataset.url = '/pages/movie/pages/myMovie/index';
- }
- app.globalData.toPage(e);
- }
- }
- };
- </script>
- <style>
- page {
- background: #f2f2f2;
- padding-bottom: 140rpx;
- }
- .scrollView {
- position: fixed;
- top: 0;
- left: 0;
- width: 100%;
- z-index: 100;
- }
- .navs {
- display: flex;
- width: 100%;
- position: relative;
- border-top: 1px solid #e4e4e4;
- background: white;
- }
- .lists-time1 {
- font-size: 24rpx;
- color: #666;
- padding: 10rpx 0 16rpx;
- }
- .navs .nav {
- flex: 1;
- flex-shrink: 0;
- text-align: center;
- padding: 26rpx 0;
- font-size: 28rpx;
- color: #333;
- }
- .borderNone {
- border-bottom: none !important;
- }
- .bold {
- font-weight: bold;
- color: #FB4C6F !important;
- }
- .borderLine {
- width: 60rpx;
- height: 4rpx;
- background: rgba(234, 63, 51, 1);
- opacity: 1;
- display: block;
- position: absolute;
- bottom: 0;
- transition: left 0.3s;
- opacity: 0;
- }
- .content {
- margin-top: 116rpx;
- }
- .lists {
- background: white;
- margin: 0 20rpx 20rpx;
- padding: 22rpx;
- border-radius: 15rpx;
- font-size: 28rpx;
- position: relative;
- }
- .lists-status {
- position: absolute;
- top: 22rpx;
- right: 22rpx;
- font-size: 26rpx;
- color: #8E8E8E;
- }
- .lists-content {
- padding: 0 0 0 156rpx;
- position: relative;
- min-height: 132rpx;
- }
- .lists-img {
- height: 132rpx;
- width: 132rpx;
- position: absolute;
- top: 0;
- left: 0;
- border-radius: 6rpx;
- }
- .lists-time {
- font-size: 22rpx;
- color: #666;
- }
- .lists-title {
- font-size: 32rpx;
- width: 410rpx;
- line-height: 1.2;
- }
- .lists-num {
- padding: 12rpx 0 24rpx;
- display: flex;
- align-items: center;
- justify-content: space-between;
- }
- .lists-num1 {
- color: #666;
- }
- .goDetail {
- width: 150rpx;
- height: 65rpx;
- color: #f62e2e;
- border: 1px solid #f62e2e;
- border-radius: 40rpx;
- font-size: 24rpx;
- display: flex;
- justify-content: center;
- align-items: center;
- }
- .lists-money {
- font-size: 26rpx;
- padding: 6rpx 0 26rpx;
- }
- .lists-btn,
- .btn1 {
- position: relative;
- z-index: 1;
- width: 140rpx;
- height: 50rpx;
- line-height: 50rpx;
- opacity: 1;
- border-radius: 24rpx;
- margin: 12rpx 0 0 14rpx;
- border: none;
- font-size: 24rpx;
- font-weight: 400;
- padding: 0;
- background: #FB4C6F;
- color: white;
- /* */
- overflow: inherit;
- }
- /* .lists-btn::before{
- position: absolute;
- content: '';
- height: 1rpx;
- width: 666rpx;
- background-color: RGBA(220, 220, 220, 0.6);
- display: block;
- top: -12rpx;
- z-index: 21;
- left: -360rpx;
- } */
- .l-btns {
- border-top: 1rpx solid RGBA(220, 220, 220, 0.6);
- margin-top: 18rpx;
- }
- .btn1 {
- line-height: 46rpx;
- border: 1rpx solid #999999;
- color: #333;
- background: white;
- }
- /* .btn1::after{
- border: none
- } */
- .integral {
- background: #fff;
- padding: 30rpx;
- box-sizing: border-box;
- width: 100%;
- font-family: 微软雅黑;
- margin: 0 auto 0;
- font-size: 30rpx;
- color: #333;
- border-bottom: 1rpx solid #e5e5e5;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- }
- .integral-left {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- }
- .integral-left1 {
- display: flex;
- flex-direction: column;
- justify-content: center;
- }
- .integral-left image {
- width: 180rpx;
- height: 120rpx;
- margin-right: 30rpx;
- }
- .integral-left view:nth-child(1) {
- color: #333;
- }
- .integral-left view:nth-child(2) {
- margin-top: 5rpx;
- color: #999;
- font-size: 25rpx;
- }
- .integral-right {
- font-weight: bold;
- font-size: 40rpx;
- }
- .integral-right1 {
- font-weight: 100;
- font-size: 26rpx;
- margin-left: 5rpx;
- }
- .vice {
- color: #999;
- font-size: 25rpx;
- }
- .mask {
- width: 100%;
- height: 100vh;
- position: fixed;
- top: 0;
- left: 0;
- background: rgba(0, 0, 0, 0.5);
- z-index: 999;
- }
- .qrcode {
- width: 80%;
- height: auto;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .close {
- margin: 30rpx auto;
- width: 200rpx;
- height: 70rpx;
- background: #fff;
- border-radius: 20rpx;
- text-align: center;
- line-height: 70rpx;
- }
- .qrcode image {
- width: 100%;
- height: auto;
- border-radius: 10rpx;
- }
- .over_2{
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }
- .iflex{display: flex;}
- .iflexC{display: flex;flex-direction: column}
- </style>
|