123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862 |
- <template>
- <view class="container">
- <navbar :config="config" backColor="#666"></navbar>
- <view class="topview" :style="{top:tabTop+'px'}">
- <!--订单类型选择-->
- <scroll-view scroll-x="true" class="scrollbox ">
- <view class="order-type u-flex-center">
- <view class="type-name u-font26 u-181818" :class="{'active': isChange == index}"
- v-for="(item,index) in orderType" :key="index" @click="clickBtn(index)">
- {{item}}
- </view>
- </view>
- </scroll-view>
- </view>
- <view class="plrbottom">
- <!--订单列表-->
- <view class="order-list" v-if="isChange==0||isChange==1">
- <view class="order-item u-font24 u-1A1A1A" v-for="(item,index) in orderList" :key="item.id">
- <view class="listtwo" v-if="item.payment_status==5">
- <view class="childBox" v-for="ordersList in item.orders" :key="ordersList.id">
- <view class="u-plr30 pt15-pb24">
- <view class="u-flex-center-sb">
- <view class="u-text1 viewWidthTitle">
- <text class="iconfont2 u-font34 u-bold " style="color: #057D53;"></text>
- <text class="u-1A1A1A u-font30 u-ml15">{{ordersList.shop_name}}</text>
- <text class="u-CCC right-icon iconfont"></text>
- </view>
- <view v-if="ordersList.end==true">
- <text class="u-FF0000 u-font28">交易完成</text>
- </view>
- <view v-if="ordersList.end==false">
- <text class="u-FF0000 u-font28" v-if="ordersList.comment_status==2">交易完成</text>
- <text class="u-FF0000 u-font28"
- v-if="(ordersList.comment_status==0||ordersList.comment_status==1)&&ordersList.rights_type==0">{{ordersList.transaction_status | payStatus}}</text>
- <text class="u-FF0000 u-font28" v-if="ordersList.rights_type >0">维权中</text>
- </view>
- </view>
- </view>
- <view class="u-border-one-one"></view>
- <view v-for="childItem in ordersList.child_order_list" :key="childItem.id"
- @click="goProductDetails(childItem.goods_id,childItem.source_shop_id)">
- <ldgoods :value="childItem" :position="list"></ldgoods>
- </view>
- <view class="u-mt20 u-text-right u-plr30">
- <view class="u-flex-center" style="justify-content: flex-end;">
- <text>共{{ordersList.goods_number}}件商品,总金额</text>
- <view class="u-FF0000 u-font32">
- <rich-text :nodes="$mUtil.priceBigSmall(ordersList.total_amount)"></rich-text>
- </view>
- </view>
- <view class="u-mt10" v-if="ordersList.should_freight*1 > 0">含运费¥{{ordersList.should_freight}}</view>
- <view class="u-flex-column-end u-mt30">
- <view class="btn-type u-flex">
- <!--待付款-->
- <view v-if="ordersList.transaction_status==0&&item.close_mode==0">
- <view class="pay-time"> <text class="iconfont time-icon"></text> 支付剩余
- ({{item | dateFilter}})</view>
- <view class="btn-item u-text-center u-FF0000 br-FF0000">去付款</view>
- </view>
- <!--等待使用-->
- <view class="u-flex-center" style="justify-content: flex-end;"
- v-if="ordersList.transaction_status==1&&ordersList.rights_type==0">
- <view class="btn-item u-text-center u-999 br-999" v-if="!ordersList.end"
- @click="goRefundType(1,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,ordersList.id)">
- 申请售后</view>
- <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
- @click="changeAddress(ordersList.id)">修改地址</view>
- </view>
- <!--等待使用-->
- <view class="u-flex-center" style="justify-content: flex-end;"
- v-if="ordersList.transaction_status==3">
- <view class="btn-item u-text-center u-999 br-999" v-if="ordersList.shipment_mode==0"
- @click="lookLoginsList(ordersList.id,ordersList.goods_number,ordersList.child_order_list[0].goods_img,1)">
- 查看物流</view>
- <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
- @click="sureGetOrder(ordersList.id,1)">确认收货</view>
- </view>
- <!--待评价-->
- <view v-if="ordersList.transaction_status==5&&ordersList.comment_status==0&&!ordersList.end"
- @click="goRefundType(2,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,item.id,ordersList.id)"
- class="btn-item u-text-center u-999 br-999">申请售后</view>
- <view class="u-flex-center" style="justify-content: flex-end;"
- v-if="ordersList.transaction_status==5&&!ordersList.end">
- </view>
- <view class="btn-item u-text-center u-999 br-999" @click="goOrderDetails(ordersList.id)">查看详情</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <view class="listone childBox" v-else>
- <view class="u-plr30 u-border-one h90">
- <view class="u-flex-center-sb">
- <view>
- <text class="iconfont2 u-font34 u-bold " style="color: #057D53;"></text>
- <text class="u-1A1A1A u-font30 u-ml15">松河生活平台</text>
- <text class="u-CCC right-icon iconfont"></text>
- </view>
- <text class="u-FF0000 u-font28" v-if="item.close_mode==0">待付款</text>
- <text class="u-FF0000 u-font28" v-if="item.close_mode==1">已关闭</text>
- <text class="u-FF0000 u-font28" v-if="item.close_mode==2">商家关闭</text>
- <text class="u-FF0000 u-font28" v-if="item.close_mode==3">支付过期</text>
- </view>
- </view>
- <view class="u-border-one-one"></view>
- <view class="listImg u-border-one" @click="goOrderDetailsPay(item.id)">
- <image class="listimgGroup" :src="url" mode="" v-for="(url,index) in item.goods_images" :key="index">
- </image>
- </view>
- <view class="u-mt20 u-text-right u-plr30">
- <view class="u-flex-center" style="justify-content: flex-end;"> <text>总金额</text>
- <view class="u-FF0000 u-font32">
- <rich-text :nodes="$mUtil.priceBigSmall(item.total_amount)"></rich-text>
- </view>
- </view>
- <!-- <view class="u-mt10">含运费¥10.00</view> -->
- <view class="u-flex-column-end u-mt30">
- <view class="btn-type u-flex">
- <!--待付款-->
- <view class="u-flex-center" style="justify-content: flex-end;" v-if="item.close_mode==0">
- <!-- <view class="pay-time"> <text class="iconfont"></text> 支付剩余11({{$mUtil.patTime(item.expired_pay_time)}})</view> -->
- <view class="pay-time"> <text class="iconfont time-icon"></text> 支付剩余
- ({{item | dateFilter}})</view>
- <view class="btn-item u-text-center u-FF0000 br-FF0000"
- @click="waitpayOrder(item.id,item.total_amount,item.expired_pay_time)">去付款</view>
- </view>
- <view v-if="item.close_mode==1" class="btn-item u-text-center u-999 br-999"
- @click="goOrderDetailsPay(item.id)">查看详情</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <nodata v-if="noData" :config="{top:20,content:'暂无数据~'}"></nodata>
- <loadMore v-if="orderList.length>0" :status="status"></loadMore>
- </view>
- <!-- 待使用,待使用,待评价 -->
- <view class="order-list" v-if="isChange==2||isChange==3">
- <view class="order-item u-font24 u-1A1A1A" v-for="(ordersList,index) in orderListOther" :key="ordersList.id">
- <view class="listtwo">
- <view class="childBox">
- <view class="u-plr30 pt15-pb24">
- <view class="u-flex-center-sb">
- <view class="u-text1 viewWidthTitle">
- <text class="iconfont2 u-font34 u-bold " style="color: #057D53;"></text>
- <text class="u-1A1A1A u-font30 u-ml15">{{ordersList.shop_name}}</text>
- </view>
- <view v-if="ordersList.end==true">
- <text class="u-FF0000 u-font28">交易完成</text>
- </view>
- <view v-if="ordersList.end==false">
- <text class="u-FF0000 u-font28" v-if="ordersList.comment_status==2">交易完成</text>
- <text class="u-FF0000 u-font28"
- v-if="(ordersList.comment_status==0||ordersList.comment_status==1)&&ordersList.rights_type==0">{{ordersList.transaction_status | payStatus}}</text>
- <text class="u-FF0000 u-font28" v-if="ordersList.rights_type >0">维权中</text>
- </view>
- </view>
- </view>
- <view class="u-border-one-one"></view>
- <view v-for="childItem in ordersList.child_order_list" :key="childItem.id"
- @click="goProductDetails(childItem.goods_id,childItem.source_shop_id)">
- <ldgoods :value="childItem" :position="list"></ldgoods>
- </view>
- <view class="u-mt20 u-text-right u-plr30">
- <view class="u-flex-center" style="justify-content: flex-end;">
- <text>共{{ordersList.goods_number}}件商品,总金额</text>
- <view class="u-FF0000 u-font32">
- <rich-text :nodes="$mUtil.priceBigSmall(ordersList.total_amount)"></rich-text>
- </view>
- </view>
- <view class="u-mt10" v-if="ordersList.should_freight*1 > 0">含运费¥{{ordersList.should_freight}}</view>
- <view class="u-flex-column-end u-mt30">
- <view class="btn-type u-flex">
- <!--等待使用-->
- <view class="u-flex-center" style="justify-content: flex-end;"
- v-if="ordersList.transaction_status==1&&ordersList.rights_type==0">
- <view class="btn-item u-text-center u-999 br-999" v-if="!ordersList.end"
- @click="goRefundType(1,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,ordersList.id)">
- 申请售后</view>
- <!-- <view class="btn-item u-text-center u-999 br-999" @click="goPhone(ordersList.mobile)">联系客服</view> -->
- <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
- @click="changeAddress(ordersList.id)">修改地址</view>
- </view>
- <!--等待使用-->
- <view class="u-flex-center" style="justify-content: flex-end;"
- v-if="ordersList.transaction_status==3&&ordersList.shipment_mode==0">
- <!-- <view class="btn-item u-text-center u-999 br-999">申请退货</view> -->
- <view class="btn-item u-text-center u-999 br-999"
- @click="lookLoginsList(ordersList.id,ordersList.goods_number,ordersList.child_order_list[0].goods_img,1)">
- 查看物流</view>
- <view class="btn-item u-text-center u-FF0000 br-FF0000" v-if="ordersList.shipment_mode==0"
- @click="sureGetOrder(ordersList.id,2)">确认收货</view>
- </view>
- <!--待评价-->
- <view v-if="ordersList.transaction_status==5&&!ordersList.end"
- class="btn-item u-text-center u-999 br-999"
- @click="goRefundType(2,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,orderListOther.id,ordersList.id)">
- 申请售后</view>
- <!--待提货-->
- <!-- <view v-if="ordersList.transaction_status==3 &&ordersList.shipment_mode==1" class="btn-item u-text-center u-999 br-999">确认提货</view> -->
- <!--申请退款中-->
- <view class="btn-item u-text-center u-999 br-999" @click="goOrderDetails(ordersList.id)">查看详情</view>
- <view class="btn-item u-text-center u-999 br-999"
- v-if="ordersList.use_status==0&&ordersList.rights_type == 0 && ordersList.rights_status == 0"
- @click="goRefundType(1,ordersList.order_code,ordersList.format_order_time,ordersList.child_order_list,ordersList.id)">
- 申请售后</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <nodata v-if="noData" :config="{top:20,content:'暂无数据~'}"></nodata>
- <loadMore v-if="orderListOther.length>0" :status="status"></loadMore>
- </view>
- <!-- 退款退货 -->
- <view class="order-list" v-if="isChange==4">
- <view class="order-item u-font24 u-1A1A1A" v-for="(ordersList) in orderListblack" :key="ordersList.id">
- <view class="listtwo">
- <view class="childBox">
- <view class="u-plr30 pt15-pb24 u-border-one">
- <view class="u-flex-center-sb">
- <view class="u-text1 viewWidthTitle">
- <text class="iconfont2 u-font34 u-bold " style="color: #057D53;"></text>
- <text class="u-1A1A1A u-font30 u-ml15">{{ordersList.shop_name}}</text>
- </view>
- <text class="u-FF0000 u-font28"
- v-if="ordersList.rights_type==1">{{ordersList.rights_operate_status | payStatusRight}}</text>
- <text class="u-FF0000 u-font28"
- v-if="ordersList.rights_type==2">{{ordersList.rights_operate_status | payStatusRights}}</text>
- </view>
- </view>
- <view class="u-border-one-one"></view>
- <view v-for="childItem in ordersList.rights_child_orders" :key="childItem.id"
- @click="goProductDetails(childItem.goods_id,childItem.shop_id)">
- <ldgoodsbalck :value="childItem" :position="list"></ldgoodsbalck>
- </view>
- <view class="u-mt20 u-text-right u-plr30">
- <view class="u-flex-center" style="justify-content: flex-end;">
- <text>共{{ordersList.refund_num}}件商品,退款金额</text>
- <view class="u-FF0000 u-font32">
- <rich-text :nodes="$mUtil.priceBigSmall(ordersList.refund_money)"></rich-text>
- </view>
- </view>
- <view class="u-flex-column-end u-mt30">
- <view class="btn-type u-flex">
- <view class="u-flex-center" style="justify-content: flex-end;">
- <view class="btn-item u-text-center u-999 br-999"
- @click="gotoBalckDetail(ordersList.id,ordersList.shop_id,ordersList.rights_type,ordersList.rights_operate_status)">
- 查看详情</view>
- <view class="btn-item u-text-center u-999 br-999"
- @click="lookLoginsList(ordersList.id,ordersList.refund_num,ordersList.rights_child_orders[0].goods_img,2)"
- v-if="ordersList.rights_type==2&&ordersList.rights_operate_status==2">查看物流</view>
- <view class="btn-item u-text-center u-FF0000 br-FF0000"
- @click="gotoBalckDetail(ordersList.id,ordersList.shop_id,ordersList.rights_type,ordersList.rights_operate_status)"
- v-if="ordersList.rights_type==2&&ordersList.rights_operate_status==1">去发货</view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- </view>
- <nodata v-if="noData" :config="{top:20,content:'暂无数据~'}"></nodata>
- <loadMore v-if="orderListblack.length>0" :status="status"></loadMore>
- </view>
- </view>
- <!--页面加载动画-->
- <ldLoading isFullScreen :active="loading"></ldLoading>
- </view>
- </template>
- <script>
- import ldgoodsbalck from "../../../components/ld-goods/ld-goods-black.vue"
- import ldgoods from "../../../components/ld-goods/ld-goods.vue"
- var app = getApp()
- let vObj
- export default {
- components: {
- ldgoodsbalck,
- ldgoods
- },
- beforeCreate() {
- vObj = this
- },
- data() {
- return {
- timer: null,
- timeCount: 0,
- list: 1,
- config: {
- back: true, //false是tolbar页面 是则不写
- title: '全部订单',
- color: '#1A1A1A',
- //背景颜色;参数一:透明度(0-1);参数二:背景颜色(array则为线性渐变,string为单色背景)
- backgroundColor: [1, "#FFFFFF"],
- statusBarFontColor: '#1A1A1A',
- backPage: '/pages/index/personal'
- // backTabPage: '/pages/index/personal'
- },
- isChange: 0,
- orderType: ["全部订单", "待付款", "待使用", "待评价", "退款"],
- shopStatus: true, //发货状态
- loading: true,
- orderList: [], //全部订单,待支付
- orderListOther: [], //待使用,待使用,待评价
- orderListblack: [],
- status: 'more', //more|loading|noMore
- noData: false,
- parmas: {
- page: 1,
- limit: 10,
- order_type: 2
- },
- parmasother: {
- page: 1,
- limit: 10,
- order_type: 2
- },
- parmasblack: {
- page: 1,
- limit: 10,
- order_type: 2
- },
- orderid: null,
- currentKey: null,
- tabTop: 0
- }
- },
- beforeDestroy() {
- clearInterval(this.timer)
- },
- onBackPress() {
- uni.redirectTo({
- url: "../../index/personal"
- })
- return true
- },
- onReachBottom(e) {
- this.status = 'loading'
- if (this.isChange == 0) {
- this.parmas.page++
- this.getOrderList()
- } else if (this.isChange == 1) {
- this.parmas.page++
- this.waitPay()
- } else if (this.isChange == 4) {
- this.parmasblack.page++
- this.blackPay()
- } else {
- this.parmasother.page++
- let key = 1
- if (this.isChange == 2) {
- key = 3
- } else if (this.isChange == 3) {
- key = 5
- }
- this.otherPay(key)
- }
- },
- onPullDownRefresh() {
- this.rest()
- if (this.isChange == 0) {
- this.getOrderList()
- } else if (this.isChange == 1) {
- this.waitPay()
- } else if (this.isChange == 4) {
- this.blackPay()
- } else {
- let key = 1
- if (this.isChange == 2) {
- key = 3
- } else if (this.isChange == 3) {
- key = 5
- }
- this.otherPay(key)
- }
- },
- onLoad(options) {
- let that = this
- this.timer = setInterval(() => {
- that.timeCount++
- }, 1000)
- this.tabTop = app.globalData.barHeight + 44;
- if (options.keys) {
- if (options.keys == -1) {
- this.isChange = 0
- this.getOrderList()
- } else if (options.keys == 0) {
- this.isChange = 1
- this.waitPay()
- } else if (options.keys == 6) {
- this.isChange = 4
- this.blackPay()
- } else {
- if (options.keys == 3) {
- this.isChange = 2
- } else if (options.keys == 5) {
- this.isChange = 3
- }
- this.currentKey = options.keys
- this.otherPay(options.keys)
- }
- } else {
- this.getOrderList()
- }
- },
- filters: {
- dateFilter(item) {
- // console.log(item,'item')
- // item.expired_pay_time
- // endTime - nowTime
- let time = item.expired_pay_time - item.now_millis - vObj.timeCount * 1000;
- console.log(time)
- let str = vObj.$mUtil.countDownClock(time)
- return str
- },
- payStatus(val) {
- switch (val) {
- case 0:
- return "待支付"
- break;
- case 1:
- return "待使用"
- break;
- case 2:
- return "部分发货"
- break;
- case 3:
- return "待使用"
- break;
- case 4:
- return "部分已使用"
- break;
- case 5:
- return "待评价"
- break;
- case 6:
- return "关闭"
- break;
- default:
- break;
- }
- },
- payStatusRight(val) { //退款
- //维权订单操作状态(0申请,1同意,2买家已发货,3商家已收到退货商品,4商家发起退款支付,5已支付退款,6拒绝,7自动关闭,8主动撤消
- switch (val) {
- case 0:
- return "申请退款中"
- break;
- case 1:
- return "商家同意"
- break;
- case 4:
- return "商家发起退款支付"
- break;
- case 5:
- return "退款成功"
- break;
- case 6:
- return "商家拒绝"
- break;
- default:
- break;
- }
- },
- payStatusRights(val) { //退款退货
- //维权订单操作状态(0申请,1同意,2买家已发货,3商家已收到退货商品,4商家发起退款支付,5已支付退款,6拒绝,7自动关闭,8主动撤消
- switch (val) {
- case 0:
- return "申请退款/退货中"
- break;
- case 1:
- return "等待买家发货"
- break;
- case 2:
- return "待商家收货"
- break;
- case 3:
- return "商家已收货"
- break;
- case 4:
- return "商家待打款"
- break;
- case 5:
- return "退款/退货成功"
- break;
- case 6:
- return "商家拒绝"
- break;
- case 7:
- return "自动关闭"
- break;
- case 8:
- return "撤销"
- break;
- default:
- break;
- }
- }
- },
- methods: {
- goProductDetails(id, shopid) {
- uni.navigateTo({
- url: "/pages/product/goods/serviceGood?id=" + id + "&shopid=" + shopid
- })
- },
- goPhone(phone) {
- if (phone) {
- uni.makePhoneCall({
- phoneNumber: phone //仅为示例
- });
- }
- },
- // 物流//type:1普通订单,2维权订单
- lookLoginsList(orderid, num, img, type) {
- uni.navigateTo({
- url: "../logistics?id=" + orderid + "&num=" + num + "&img=" + img + "&type=" + type,
- })
- },
- //申请售后
- goRefundType(i, code, time, list, orderid, childid) {
- //i:1未发货,退款,2收到货退款/退货
- uni.setStorageSync('blackgoodsList', list)
- if (i == 1) {
- uni.navigateTo({
- url: "applicationDrawback?keystatus=" + i + "&title=申请退款" + "&orderid=" + orderid + "&type=service"
- })
- } else {
- uni.navigateTo({
- url: "refundType?order_code=" + code + '&format_order_time=' + time + '&keystatus=' + i + "&orderid=" +
- orderid + "&childid=" + childid
- })
- }
- },
- //确认收货
- sureGetOrder(id, k) {
- uni.showModal({
- title: '提示',
- content: '确定已经收到了该商品?',
- success: (res) => {
- if (res.confirm) {
- this.$http.post('/order/receipt', {
- order_id: id
- })
- .then(res => {
- if (res && res.code == 200) {
- this.$mUtil.toast('收货成功')
- this.rest()
- if (k == 1) {
- this.getOrderList()
- } else if (k == 2) {
- this.otherPay(this.currentKey)
- }
- }
- })
- } else if (res.cancel) {
- }
- }
- });
- },
- //选完地址回选
- otherFun(object) {
- if (!!object) {
- console.log(object.addressid)
- this.$http.put('/order/update-receipt/' + this.orderid + '/' + object.addressid)
- .then(res => {
- if (res && res.code == 200) {
- this.$mUtil.toast('修改成功')
- }
- })
- }
- },
- //修改地址
- changeAddress(id) {
- this.orderid = id
- uni.navigateTo({
- url: '/pages/user/address/addressList'
- })
- },
- rest() {
- this.parmas.page = 1
- this.parmasother.page = 1
- this.parmasblack.page = 1
- this.orderList = []
- this.orderListOther = []
- this.orderListblack = []
- },
- getOrderList() {
- this.$http.get('/pay/order/all/page', this.parmas)
- .then(res => {
- this.loading = false;
- if (res && res.code == 200) {
- uni.stopPullDownRefresh()
- this.orderList = this.orderList.concat(res.page.list)
- if (this.orderList.length == 0) {
- this.noData = true
- } else {
- this.noData = false
- }
- if (res.page.totalPage <= res.page.currPage) {
- this.status = 'noMore'
- } else {
- this.status = 'more'
- }
- }
- })
- },
- waitPay() {
- this.$http.get('/pay/order/wait/page', this.parmas)
- .then(res => {
- this.loading = false;
- if (res && res.code == 200) {
- uni.stopPullDownRefresh()
- this.orderList = this.orderList.concat(res.page.list)
- if (this.orderList.length == 0) {
- this.noData = true
- } else {
- this.noData = false
- }
- if (res.page.totalPage <= res.page.currPage) {
- this.status = 'noMore'
- } else {
- this.status = 'more'
- }
- }
- })
- },
- otherPay(k) {
- this.parmasother.transaction_status = k //0已下单,待支付,1待使用(待备货) 3,"待使用(待自提)",5交易完成
- this.$http.get('/order/page', this.parmasother)
- .then(res => {
- this.loading = false;
- if (res && res.code == 200) {
- uni.stopPullDownRefresh()
- this.orderListOther = this.orderListOther.concat(res.page.list)
- if (this.orderListOther.length == 0) {
- this.noData = true
- } else {
- this.noData = false
- }
- if (res.page.totalPage <= res.page.currPage) {
- this.status = 'noMore'
- } else {
- this.status = 'more'
- }
- }
- })
- },
- blackPay() {
- this.$http.get('/rights/page', this.parmasblack)
- .then(res => {
- this.loading = false;
- if (res && res.code == 200) {
- uni.stopPullDownRefresh()
- this.orderListblack = this.orderListblack.concat(res.page.list)
- if (this.orderListblack.length == 0) {
- this.noData = true
- } else {
- this.noData = false
- }
- if (res.page.totalPage <= res.page.currPage) {
- this.status = 'noMore'
- } else {
- this.status = 'more'
- }
- }
- })
- },
- clickBtn(index) {
- this.rest()
- this.isChange = index
- if (index == 0) {
- this.getOrderList()
- } else if (index == 1) {
- this.waitPay()
- } else if (index == 2 || index == 3) {
- let key = 1
- if (index == 2) {
- key = 3
- } else if (index == 3) {
- key = 5
- }
- this.currentKey = key
- this.otherPay(key)
- } else { //退货/退款
- this.blackPay()
- }
- },
- //支付
- waitpayOrder(id, total_amount, expired_pay_time) {
- uni.navigateTo({
- url: '../../order/pay?id=' + id + '&total_amount=' + total_amount + '&expired_pay_time=' +
- expired_pay_time + '&type=service'
- })
- },
- //详情页
- goOrderDetails(id) {
- uni.navigateTo({
- url: "serviceOrderDetail?id=" + id + '&status=pay'
- })
- },
- gotoBalckDetail(id, shopid, type, status) {
- uni.navigateTo({
- url: "orderblackDetails?id=" + id + "&shopid=" + shopid + "&type=" + type + "&status=" + status
- })
- },
- //支付订单
- goOrderDetailsPay(id) {
- uni.navigateTo({
- url: "serviceOrderDetail?id=" + id + '&status=waitpay'
- })
- },
- }
- }
- </script>
- <style lang="scss">
- page {
- background-color: #F5F5F5;
- }
- .right-icon {
- font-size: 25rpx
- }
- .plrbottom {
- padding: 110rpx 30rpx 0;
- }
- .h90 {
- height: 90rpx;
- line-height: 90rpx;
- }
- .topview {
- background-color: #F5F5F5;
- height: 110rpx;
- width: 100%;
- position: fixed;
- left: 0;
- box-sizing: border-box;
- padding: 0 30rpx;
- z-index: 66;
- }
- .scrollbox {
- white-space: nowrap;
- }
- .pt-pb {
- padding: 30rpx;
- }
- .pt15-pb24 {
- padding-top: 24rpx;
- padding-bottom: 24rpx;
- }
- .br-FF0000 {
- border: 1px solid #FF0000;
- }
- .br-999 {
- border: 1px solid #999999;
- }
- .order-type {
- margin-top: 30rpx;
- margin-bottom: 26rpx;
- display: inline-block;
- .active {
- background: #0B844A;
- color: #FFFFFF;
- }
- .type-name {
- border-radius: 30px;
- padding: 12rpx 18rpx;
- display: inline-block;
- }
- }
- .listImg {
- padding: 20rpx 0 0 16rpx;
- }
- .listimgGroup {
- width: 200rpx;
- height: 200rpx;
- margin: 0 25rpx 25rpx 0;
- border-radius: 15rpx;
- }
- .order-item {
- .btn-type {
- padding-bottom: 25rpx;
- .pay-time {
- line-height: 70rpx;
- margin-left: auto;
- .time-icon {
- color: #999999;
- }
- }
- .btn-item {
- width: 200rpx;
- height: 70rpx;
- line-height: 68rpx;
- border-radius: 35px;
- margin-left: 22rpx;
- }
- }
- }
- .childBox {
- background-color: #FFFFFF;
- border-radius: 20rpx;
- margin-bottom: 30rpx;
- }
- </style>
|