123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483 |
- <!-- OrderDetailBody.vue -->
- <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
- <member-base :show="false"><view class="div">
- <view class="div common-header-wrap">
- <view :style="'height:'+navHeight+'px'"></view>
- <view class="common-header-holder"></view>
- <view class="common-header-fixed">
- <title-header />
- <uni-nav-bar title="订单详情" class="common-header" left-icon="back" @clickLeft="goBack()">
- </uni-nav-bar>
- </view>
- </view>
- <view
- class="div order-body"
- v-if="order_info"
- >
- <view class="div order_state">
- <text class="i iconfont" v-if="order_info.order_state == '40'"></text>
- <text class="i iconfont" v-else></text>
- <text class="span">{{order_info.state_desc}}</text>
- <view class="div pickup-code" v-if="order_info.order_state == '35'">(取货码{{order_info.chain_order_pickup_code}})</view>
- </view>
- <view class="div address">
- <view class="div">
- <text class="span">{{ order_info.reciver_name }}</text>
- <text class="span mobile">{{ order_info.reciver_phone }}</text>
- </view>
- <view class="p" style="-webkit-box-orient: vertical; -webkit-line-clamp: 2;">
- {{ order_info.reciver_addr }}
- </view>
- </view>
- <view class="div order_store" v-if="order_info.extend_store" @click="goNavigate('/pages/home/storedetail/Storedetail',{ 'id': order_info.extend_store.store_id })">
- <text class="i store iconfont"></text><text class="span">{{order_info.extend_store.store_name}}</text><text class="i more iconfont"></text>
- </view>
- <view
- class="div containers"
- v-for="item in order_info.goods_list"
- v-bind:key="item.goods_id"
- @click="goNavigate('/pages/home/goodsdetail/Goodsdetail',{goods_id:item.goods_id})"
- >
- <image mode="aspectFit"
- class="img photo"
- v-bind:src="item.image_url"
- />
- <view class="div right-wrapper">
- <label class="title">{{ item.goods_name }}</label>
- <label class="property">{{ item.goods_spec }}</label>
- <view class="div desc-wrapper">
- <view class="div">
- <label class="price"
- >¥ {{ item.goods_price }}</label
- >
- <label class="count">x{{ item.goods_num }}</label>
- </view>
- <view class="div btn-list">
- <view v-if="order_info.if_complain" class="div common-btn ds-button-small default" @click.stop="complaint(order_info.order_id,item.rec_id)">投诉</view>
- <view v-if="item.refund=='1'" class="div common-btn ds-button-small default" @click.stop="showRefund(item.rec_id)">售后</view>
- <view v-if="item.extend_refund && !(item.extend_refund.refund_state==3 || item.extend_refund.refund_state==4)" class="div common-btn ds-button-small default" @click.stop="goRefund(item.extend_refund)">售后</view>
- </view>
- </view>
- </view>
- </view>
- <view
- v-if="order_info.zengpin_list"
- class="div containers"
- v-for="item in order_info.zengpin_list"
- v-bind:key="item.goods_id"
- >
- <image mode="aspectFit"
- class="img photo"
- v-bind:src="item.image_url"
- />
- <view class="div right-wrapper">
- <label class="title"><text class="span tag-icon">赠品</text>{{ item.goods_name }}</label>
- <label class="property">{{ item.goods_spec }}</label>
- <view class="div desc-wrapper">
- <view class="div">
- <label class="price"
- >¥ {{ item.goods_price }}</label
- >
- <label class="count">x{{ item.goods_num }}</label>
- </view>
- </view>
- </view>
- </view>
- <view class="div detail">
- <view class="div number">
- <label
- >订单编号:{{ order_info.order_sn }}
- </label>
- <view class="p">
- 下单时间:{{order_info.add_time}}
- </view>
- </view>
- <view class="div number">
- <view class="p" v-if="order_info.promotion && order_info.promotion.length">
- {{order_info.promotion}}
- </view>
- <view class="p" v-if="order_info.voucher_code">
- 使用了面额为 {{order_info.voucher_price}} 元的店铺代金券
- </view>
- <view class="p" v-if="order_info.extend_order_common.mallvoucher_price">
- 使用了面额为 {{order_info.extend_order_common.mallvoucher_price}} 元的平台代金券
- </view>
- </view>
- <view class="div pay" v-if="order_info.payment_name">
- <view class="p">支付方式:{{ order_info.payment_name }}</view>
- </view>
- </view>
- <view
- class="div desc section-header section-footer"
- >
- <view class="div container">
- <label class="title">商品总额</label>
- <label class="subtitle">¥{{ order_info.goods_amount }}</label>
- </view>
- <view class="div container">
- <label class="title">运费</label>
- <label class="subtitle">¥{{ order_info.shipping_fee }}</label>
- </view>
- <label class="amount"
- >实付款 : <text class="span"> ¥{{ order_info.order_amount }}</text>
- </label>
- </view>
- </view>
- <uni-popup background-color="#fff" ref="popupRefund" type="right" >
- <view :style="'width:'+screenWidth+'px'" class="common-popup-wrapper">
- <view class="div common-header-wrap">
- <view :style="'height:'+navHeight+'px'"></view>
- <view class="common-header-holder"></view>
- <view class="common-header-fixed">
- <title-header />
- <uni-nav-bar title="售后" class="common-header" left-icon="back" @clickLeft="hidePopup('popupRefund')">
- </uni-nav-bar>
- </view>
- </view>
- <view class="div common-popup-content ">
- <scroll-view class='main-content' style="position: absolute;top:0;right:0;left:0;bottom:0" scroll-y="true">
- <view class="div" @click='refund(1)'><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">退款</text></flex-line></view>
- <view class="div" @click='refund(2)'><flex-line class="menu-item" :is-link="true" :show-border="true"><text class="span line-name">退货</text></flex-line></view>
- </scroll-view>
- </view>
- </view>
- </uni-popup>
- </view></member-base>
- </template>
- <script>
- import {getFontSize} from '@/util/common'
- import TitleHeader from '../../TitleHeader'
- import { urlencode } from '@/util/common'
- import MemberBase from '../MemberBase'
- import { getOrderInfo } from '../../../api/memberOrder'
- import flexLine from '../../flexLine'
- export default {
- name:'MemberOrderDetail',
- computed:{
- fontSize(){
- return getFontSize()
- },
- },
- data(){
- return {
- navHeight: 0,
- screenWidth:0,
- order_info: {},
- rec_id: 0,
- }
- },
- components:{
- TitleHeader,
- MemberBase,
- flexLine
- },
- onLoad: function (option) {
- if (option.order_id) {
- getOrderInfo(option.order_id).then(res => {
- this.order_info = res.result.order_info
- }).catch(function (error) {
- uni.showToast({icon:'none',title: error.message})
- })
- }
- },
- mounted(){
- // #ifdef MP-WEIXIN
- this.navHeight = uni.getMenuButtonBoundingClientRect().top
- // #endif
- this.screenWidth=uni.getSystemInfoSync().screenWidth
- },
- methods:{
- goNavigate(path,query=false){
- uni.navigateTo({url:path+(query?('?'+urlencode(query)):'')})
- },
- showPopup(id){
- this.$refs[id].open()
- },
- hidePopup(id){
- this.$refs[id].close()
- },
- goBack(){uni.navigateBack({delta:1})},
- goRefund(refund){
- if(refund.return_type==1){
- uni.navigateTo({ url: '/pages/member/refund/RefundView'+'?'+urlencode( { refund_id: refund.refund_id } )})
- }else{
- uni.navigateTo({ url: '/pages/member/return/ReturnView'+'?'+urlencode( { refund_id: refund.refund_id } )})
- }
- },
- showRefund (rec_id) {
- this.rec_id = rec_id
- this.showPopup('popupRefund')
- },
- refund (type) {
- uni.navigateTo({ url: '/pages/member/return/ReturnForm'+'?'+urlencode( { type: type, order_id: this.order_info.order_id, order_goods_id: this.rec_id } )})
- },
- complaint (order_id, goods_id) {
- uni.navigateTo({ url: '/pages/member/complaint/ComplaintForm'+'?'+urlencode( { order_id: order_id, goods_id: goods_id } )})
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .common-header-wrap .common-header{box-shadow: unset}
- .common-popup-content .main-content{padding:0 $pageSpace;box-sizing: border-box}
- .order-body {
- overflow: auto;
- height: 100%;
- position: absolute;
- width: 100%;
- .desc{
- .container {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: center;
- background-color: #fff;
- }
- .title {
- width:5rem;
- font-size:$subFontSize;
- color: #333;
- margin-left:0.6rem;
- }
- .subtitle {
- flex: 1;
- margin-left:1rem;
- margin-right:0.6rem;
- color: $primaryColor;
- font-size:$subFontSize;
- text-align: right;
- }
- }
- }
- .order_state {
- background:$primaryColor;
- height:3.5rem;
- display: flex;
- justify-content: flex-start;
- align-items: center;
- .i {
- color:#fff;
- font-size:1.2rem;
- padding: 0 0.5rem;
- }
- .span {
- font-size:$h2;
- color: #fff;
- }
- }
- .containers {
- display: flex;
- flex-direction: row;
- justify-content: flex-start;
- align-items: stretch;
- background-color: #fff;
- border-bottom: 1px solid #e8eaed;
- }
- .photo {
- width:4rem;
- height:4rem;
- margin:0.75rem 0.5rem 0.75rem 0.75rem;
- border: 1px solid #e8eaed;
- flex-basis:4rem;
- flex-shrink: 0;
- }
- .right-wrapper {
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: stretch;
- padding: 0 0.75rem 0 0;
- width: 100%;
- overflow: hidden;
- }
- .title {
- margin-top:0.75rem;
- color: #333;
- font-size:$subFontSize;
- overflow: hidden;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- .property {
- font-size:$fontSize;
- color: #7c7f88;
- padding-top:0.5rem;
- }
- .count {
- margin-top:0.2rem;
- color: #7c7f88;
- font-size:$fontSize;
- margin-right:0.5rem;
- }
- .desc-wrapper {
- height:1rem;
- display: flex;
- flex-direction: row;
- justify-content: space-between;
- align-items: center;
- padding-top:1rem;
- }
- .price {
- color: $primaryColor;
- font-size:$h2;
- margin-left: 0;
- }
- .btn-list{
- display: flex;
- }
- .ds-button-small.default{
- margin: 0 .1rem;
- }
- .count {
- color: #7c7f88;
- font-size:$h2;
- margin-left:0.5rem;
- }
- .address {
- height:4.4rem;
- background-color: #fff;
- margin-bottom:0.5rem;
- .div {
- padding: 0.5rem 0.5rem 0;
- }
- .img {
- height:0.8rem;
- }
- .span {
- color: #333;
- font-size:$h2;
- &.mobile {
- padding-left:1rem;
- }
- }
- .p {
- margin:0.25rem 0.9rem 0.5rem 0.5rem;
- font-size:$subFontSize;
- color: #7c7f88;
- overflow: hidden;
- text-overflow: ellipsis;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- -webkit-line-clamp: 2;
- }
- }
- .contact {
- display: flex;
- justify-content: flex-end;
- align-items: center;
- height:2.3rem;
- background-color: #fff;
- margin-top:0.4rem;
- border-bottom: 1px solid #e8eaed;
- padding: 0 0.65rem;
- .span {
- font-size:$fontSize;
- color: #333;
- padding-right:0.3rem;
- }
- .img {
- width:0.6rem;
- height: 0.65rem;
- }
- }
- .detail {
- display: flex;
- flex-direction: column;
- font-size:$subFontSize;
- color: #7c7f88;
- background-color: #fff;
- margin:0.4rem 0;
- box-sizing: border-box;
- .number {
- padding:0.7rem 0.8rem;
- border-bottom: 1px solid #e8eaed;
- .p {
- padding-top:0.3rem;
- font-size:$subFontSize;
- }
- .button {
- color: #7c7f88;
- height:1rem;
- background-color: #fff;
- border: 1px solid #7c7f88;
- width:2.7rem;
- height:1rem;
- border-radius:0.1rem;
- font-size:$subFontSize;
- display:flex;align-items:center;justify-content:center;
- }
- }
- .pay {
- border-bottom: 1px solid #e8eaed;
- padding:0.7rem 0.8rem;
- }
- .givetime {
- padding:0.7rem 0.8rem;
- font-size:$subFontSize;
- }
- input {
- background-color: #fff;
- border: 1px solid #7c7f88;
- }
- }
- .desc {
- background-color: #fff;
- display: flex;
- flex-direction: column;
- justify-content: flex-start;
- align-items: stretch;
- padding-top:0.6rem;
- box-sizing: border-box;
- margin-bottom:4rem;
- .desc-item {
- flex: 1;
- margin-top:0.5rem;
- }
- .amount {
- display: flex;
- justify-content: flex-end;
- font-size:$subFontSize;
- color: #333;
- padding-right:0.75rem;
- border-top: 1px solid #e8eaed;
- margin-top:0.6rem;
- height:2.2rem;
- line-height:2.2rem;
- .span {
- font-size:$h2;
- color: $primaryColor;
- }
- }
- }
- .ship {
- margin-bottom: 0;
- }
- .order_store{background:#fff;height:1rem;line-height:1rem;padding:0.5rem 0.8rem;border-bottom:1px solid #f5f5f5}
- .order_store .span{color:#333;font-size:$subFontSize;font-weight:600;float:left;margin:0 0.4rem;}
- .order_store .i.store{float:left}
- .order_store .i.more{float:left;font-size:$subFontSize;}
- .pickup-code{font-size:$fontSize;color:#fff}
- </style>
|