123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387 |
- <!-- OrderDetailBody.vue -->
- <template><page-meta :root-font-size="fontSize+'px'"></page-meta>
- <seller-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>
- <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 containers"
- v-for="item in order_info.goods_list"
- v-bind:key="item.goods_id"
- >
- <image
- class="img photo"
- v-bind:src="item.image_240_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">
- <label class="price"
- >¥ {{ item.goods_price }}</label
- >
- <label class="count">x{{ item.goods_num }}</label>
- </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>
- </view>
- </seller-base>
- </template>
- <script>
- import {getFontSize} from '@/util/common'
- import TitleHeader from '../../TitleHeader'
- import SellerBase from '../SellerBase'
- import { getOrderInfo } from '../../../api/sellerOrder'
- export default {
- name: 'SellerOrderDetail',
- computed:{
- fontSize(){
- return getFontSize()
- },
- },
- data(){
- return {
- navHeight: 0,
- order_info: {}
- }
- },
- components:{TitleHeader,SellerBase,},
- 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().height
- // #endif
- },
- methods:{
- goBack(){uni.navigateBack({delta:1})},
- }
- }
- </script>
- <style lang="scss" scoped>
- .common-header-wrap .common-header{box-shadow: unset}
- .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: 1.05rem;
- }
- .price {
- color: $primaryColor;
- font-size:$mainFontSize;
- margin-left:0;
- }
- .count {
- color: #7c7f88;
- font-size:$h2;
- margin-right: 0.5rem;
- }
- .address {
- height: 4.35rem;
- 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: 1.05rem;
- }
- }
- .p {
- margin:0.25rem 0.9rem 0.55rem 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.25rem;
- line-height: 2.25rem;
- .span {
- font-size:$h2;
- color: $primaryColor;
- }
- }
- }
- .ship {
- margin-bottom:0;
- }
- </style>
|