Authored by lzhy

一件代发

  1 +export default [
  2 + {
  3 + path: '/detail.html',
  4 + name: 'detail',
  5 + component: () => import(/* webpackChunkName: "order.detail" */ './views/detail'),
  6 + meta: {
  7 + pageName: '退货申请详情',
  8 + },
  9 + },
  10 + {
  11 + path: '/list.html',
  12 + name: 'list',
  13 + component: () => import(/* webpackChunkName: "order.detail" */ './views/list'),
  14 + meta: {
  15 + pageName: '退货申请详情',
  16 + },
  17 + },
  18 + {
  19 + path: '/operate.html',
  20 + name: 'operate',
  21 + component: () => import(/* webpackChunkName: "order.detail" */ './views/operate'),
  22 + meta: {
  23 + pageName: '退货申请详情',
  24 + },
  25 + },
  26 +];
  1 +<template>
  2 + <div class="ivu-row">
  3 + <div class="ivu-card">
  4 + <div class="ivu-card-head">
  5 + <p slot="title" style="height: 35px">
  6 + 当前订单状态:{{ orderStatus[orderInfo.orderStatus] }}
  7 + <template v-if="orderInfo.orderStatus >= 100 && orderInfo.orderStatus < 600">
  8 + <i-button size="large" type="success" style="margin-left: 50px;" @click="deliver(orderCode)">发货</i-button>
  9 + </template>
  10 + </p>
  11 + </div>
  12 + <div class="ivu-card-body">
  13 + 若订单一直未发货,买家会有投诉风险,建议您及时点击发货 查看未发货超时规则 <br />
  14 + 若买家存在恶意购买行为,您可以联系平台处理
  15 + </div>
  16 + </div>
  17 + <div class="ivu-card">
  18 + <div class="ivu-card-head">
  19 + <p slot="title">订单信息</p>
  20 + </div>
  21 + <div class="ivu-card-body">
  22 + <Row>
  23 + <i-col span="24">订购人:{{ orderInfo.mobile }}({{ orderInfo.adminName }})</i-col>
  24 + </Row>
  25 + <br />
  26 + <Row>
  27 + <i-col span="4">订单号:{{ orderInfo.orderCode }}</i-col>
  28 + <i-col span="4">下单时间:{{ orderInfo.createTime | timeFormat }}</i-col>
  29 + <i-col span="4">发货时间:{{ orderInfo.arriveTime | timeFormat }}</i-col>
  30 + </Row>
  31 + <br />
  32 + <Row>
  33 + <i-col span="4">订单状态:{{ orderStatus[orderInfo.orderStatus] }}</i-col>
  34 + <i-col span="4">提交时间:{{ orderInfo.checkTime | timeFormat }}</i-col>
  35 + <i-col span="4">成交时间:</i-col>
  36 + </Row>
  37 + </div>
  38 + </div>
  39 + <order-user-info :order-info="orderInfo"></order-user-info>
  40 + <div class="ivu-card">
  41 + <div class="ivu-card-head">
  42 + <p slot="title">商品信息</p>
  43 + </div>
  44 + <div class="ivu-card-body">
  45 + <order-goods-info
  46 + :table-data="tableData"
  47 + :coupons-data="couponsData"
  48 + :goods-promos="goodsPromos"
  49 + :order-info="orderInfo"
  50 + :order-promos="orderPromos"
  51 + >
  52 + </order-goods-info>
  53 + </div>
  54 + </div>
  55 + </div>
  56 +</template>
  57 +
  58 +<script>
  59 +import { orderGoodsInfo, orderUserInfo } from '../components';
  60 +import { OrderConfig } from '../../configs';
  61 +import OrderService from 'services/order/order-service';
  62 +import _ from 'lodash';
  63 +
  64 +export default {
  65 + components: { orderGoodsInfo, orderUserInfo },
  66 + data() {
  67 + return {
  68 + orderCode: this.$route.query.orderCode,
  69 + orderStatus: OrderConfig.orderStatus,
  70 + feeSharingType: OrderConfig.feeSharingType,
  71 + orderInfo: [],
  72 + couponsData: [],
  73 + tableData: [],
  74 + goodsPromos: [],
  75 + orderPromos: [],
  76 + };
  77 + },
  78 + created() {
  79 + this.orderService = new OrderService();
  80 + this.getOrderInfo();
  81 + this.getOrderGoods();
  82 + this.getGoodsPromos();
  83 + this.getOrderCoupons();
  84 + this.getOrderPromos();
  85 + },
  86 + methods: {
  87 + deliver(code) {
  88 + this.$router.push({
  89 + name: 'order.deliver.step1',
  90 + params: {},
  91 + query: {
  92 + orderCode: code,
  93 + },
  94 + });
  95 + },
  96 + //获取订单详情
  97 + getOrderInfo() {
  98 + this.orderService.orderDetail({ orderCode: +this.orderCode }).then(ret => {
  99 + this.orderInfo = _.get(ret, 'data', []);
  100 + });
  101 + },
  102 + //获取订单商品
  103 + getOrderGoods() {
  104 + this.orderService.queryOrderGoods({ orderCode: +this.orderCode }).then(ret => {
  105 + this.tableData = _.get(ret, 'data', []);
  106 + });
  107 + },
  108 + //获取订单商品促销信息
  109 + getGoodsPromos() {
  110 + this.orderService.queryOrderGoodsPromos({ orderCode: +this.orderCode }).then(ret => {
  111 + this.goodsPromos = _.get(ret, 'data', []);
  112 + });
  113 + },
  114 + //获取订单优惠券
  115 + getOrderCoupons() {
  116 + this.orderService.queryOrderCoupons({ orderCode: +this.orderCode }).then(ret => {
  117 + this.couponsData = _.get(ret, 'data', {});
  118 + _.each(this.couponsData, coupons => {
  119 + coupons['feeSharingTypeStr'] = this.feeSharingType[coupons.feeSharingType] || '无';
  120 + });
  121 + });
  122 + },
  123 + //获取订单促销信息
  124 + getOrderPromos() {
  125 + this.orderService.queryOrderPromos({ orderCode: +this.orderCode }).then(ret => {
  126 + this.orderPromos = _.get(ret, 'data', {});
  127 + });
  128 + },
  129 + },
  130 +};
  131 +</script>
  132 +
  133 +<style lang="scss"></style>