orderDetail.vue 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template> 
  2. <div class="detail-container">
  3. <div>
  4. <el-steps :active="1" finish-status="success" align-center>
  5. <el-step title="提交订单" :description="formatTime(order.createTime)"></el-step>
  6. <el-step title="支付订单" :description="formatTime(order.paymentTime)"></el-step>
  7. <el-step title="平台发货" :description="formatTime(order.deliveryTime)"></el-step>
  8. <el-step title="确认收货" :description="formatTime(order.receiveTime)"></el-step>
  9. <el-step title="完成评价" :description="formatTime(order.commentTime)"></el-step>
  10. </el-steps>
  11. </div>
  12. <el-card shadow="never" style="margin-top: 15px">
  13. <div class="operate-container">
  14. <i class="el-icon-warning color-danger" style="margin-left: 20px"></i>
  15. <span class="color-danger">当前订单状态:待付款</span>
  16. <div class="operate-button-container">
  17. <el-button size="mini">修改收货人信息</el-button>
  18. <el-button size="mini">修改商品信息</el-button>
  19. <el-button size="mini">修改费用信息</el-button>
  20. <el-button size="mini">发送站内信</el-button>
  21. <el-button size="mini">关闭订单</el-button>
  22. <el-button size="mini">备注订单</el-button>
  23. </div>
  24. </div>
  25. <div style="margin-top: 20px">
  26. <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
  27. <span class="font-small">基本信息</span>
  28. </div>
  29. <div class="table-layout">
  30. <el-row>
  31. <el-col :span="4" class="table-cell-title">订单编号</el-col>
  32. <el-col :span="4" class="table-cell-title">发货单流水号</el-col>
  33. <el-col :span="4" class="table-cell-title">用户账号</el-col>
  34. <el-col :span="4" class="table-cell-title">支付方式</el-col>
  35. <el-col :span="4" class="table-cell-title">订单来源</el-col>
  36. <el-col :span="4" class="table-cell-title">订单类型</el-col>
  37. </el-row>
  38. <el-row>
  39. <el-col :span="4" class="table-cell">{{order.orderSn}}</el-col>
  40. <el-col :span="4" class="table-cell">暂无</el-col>
  41. <el-col :span="4" class="table-cell">{{order.memberUsername}}</el-col>
  42. <el-col :span="4" class="table-cell">{{order.payType | formatPayType}}</el-col>
  43. <el-col :span="4" class="table-cell">{{order.sourceType | formatSourceType}}</el-col>
  44. <el-col :span="4" class="table-cell">{{order.orderType | formatOrderType}}</el-col>
  45. </el-row>
  46. <el-row>
  47. <el-col :span="4" class="table-cell-title">配送方式</el-col>
  48. <el-col :span="4" class="table-cell-title">物流单号</el-col>
  49. <el-col :span="4" class="table-cell-title">自动确认收货时间</el-col>
  50. <el-col :span="4" class="table-cell-title">订单可得优币</el-col>
  51. <el-col :span="4" class="table-cell-title">订单可得成长值</el-col>
  52. <el-col :span="4" class="table-cell-title">活动信息</el-col>
  53. </el-row>
  54. <el-row style="display: table">
  55. <el-col :span="4" class="table-cell">{{order.deliveryCompany}}</el-col>
  56. <el-col :span="4" class="table-cell">{{order.deliverySn}}</el-col>
  57. <el-col :span="4" class="table-cell">{{order.autoConfirmDay}}天</el-col>
  58. <el-col :span="4" class="table-cell">{{order.integration}}</el-col>
  59. <el-col :span="4" class="table-cell">{{order.growth}}</el-col>
  60. <el-col :span="4" class="table-cell">{{order.promotionInfo}}</el-col>
  61. </el-row>
  62. </div>
  63. <div style="margin-top: 20px">
  64. <svg-icon icon-class="marker" style="color: #606266"></svg-icon>
  65. <span class="font-small">收货人信息</span>
  66. </div>
  67. <div class="table-layout">
  68. <el-row>
  69. <el-col :span="6" class="table-cell-title">收货人</el-col>
  70. <el-col :span="6" class="table-cell-title">手机号码</el-col>
  71. <el-col :span="6" class="table-cell-title">邮政编码</el-col>
  72. <el-col :span="6" class="table-cell-title">收货地址</el-col>
  73. </el-row>
  74. <el-row>
  75. <el-col :span="6" class="table-cell">{{order.receiverName}}</el-col>
  76. <el-col :span="6" class="table-cell">{{order.receiverPhone}}</el-col>
  77. <el-col :span="6" class="table-cell">{{order.receiverPostCode}}</el-col>
  78. <el-col :span="6" class="table-cell">{{order | formatAddress}}</el-col>
  79. </el-row>
  80. </div>
  81. </el-card>
  82. </div>
  83. </template>
  84. <script>
  85. import {getOrderDetail} from '@/api/order';
  86. import {formatDate} from '@/utils/date';
  87. export default {
  88. name: 'orderDetail',
  89. data() {
  90. return {
  91. id: null,
  92. order: {}
  93. }
  94. },
  95. created() {
  96. this.id = this.list = this.$route.query.id;
  97. getOrderDetail(this.id).then(response => {
  98. this.order = response.data;
  99. });
  100. },
  101. filters: {
  102. formatPayType(value) {
  103. if (value === 1) {
  104. return '支付宝';
  105. } else if (value === 2) {
  106. return '微信';
  107. } else {
  108. return '未支付';
  109. }
  110. },
  111. formatSourceType(value) {
  112. if (value === 1) {
  113. return 'APP订单';
  114. } else {
  115. return 'PC订单';
  116. }
  117. },
  118. formatOrderType(value) {
  119. if (value === 1) {
  120. return '秒杀订单';
  121. } else {
  122. return '正常订单';
  123. }
  124. },
  125. formatAddress(order) {
  126. let str = order.receiverProvince;
  127. if (order.receiverCity != null) {
  128. str += " " + order.receiverCity;
  129. }
  130. str += " " + order.receiverRegion;
  131. str += " " + order.receiverDetailAddress;
  132. return str;
  133. }
  134. },
  135. methods: {
  136. formatTime(time) {
  137. if (time == null || time === '') {
  138. return '';
  139. }
  140. let date = new Date(time);
  141. return formatDate(date, 'yyyy-MM-dd hh:mm:ss')
  142. }
  143. }
  144. }
  145. </script>
  146. <style scoped>
  147. .detail-container {
  148. width: 80%;
  149. padding: 20px 20px 20px 20px;
  150. margin: 20px auto;
  151. }
  152. .operate-container {
  153. background: #F2F6FC;
  154. height: 80px;
  155. margin: -20px -20px 0;
  156. line-height: 80px;
  157. }
  158. .operate-button-container {
  159. float: right;
  160. margin-right: 20px
  161. }
  162. .table-layout {
  163. margin-top: 20px;
  164. border-left: 1px solid #DCDFE6;
  165. border-top: 1px solid #DCDFE6;
  166. }
  167. .table-cell {
  168. height: 60px;
  169. line-height: 40px;
  170. border-right: 1px solid #DCDFE6;
  171. border-bottom: 1px solid #DCDFE6;
  172. padding: 10px;
  173. font-size: 14px;
  174. color: #606266;
  175. text-align: center;
  176. overflow: hidden;
  177. }
  178. .table-cell-title {
  179. border-right: 1px solid #DCDFE6;
  180. border-bottom: 1px solid #DCDFE6;
  181. padding: 10px;
  182. background: #F2F6FC;
  183. text-align: center;
  184. font-size: 14px;
  185. color: #303133;
  186. }
  187. </style>