clerkorder.vue 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. <template>
  2. <view class="order-datail">
  3. <!--详情状态-->
  4. <view class="order-state d-s-c">
  5. <view class="icon-box"><span class="icon iconfont icon-gantanhao"></span></view>
  6. <view class="state-cont flex-1">
  7. <view class="state-txt d-b-c">
  8. <text class="desc f34">{{ detail.state_text }}</text>
  9. </view>
  10. </view>
  11. <view class="dot-bg"></view>
  12. </view>
  13. <!-- 上门自提:自提门店 -->
  14. <view class="order-express p30 d-s-c" v-if="detail.delivery_type.value == 20">
  15. <view class="flow-delivery__title m-top20">
  16. <span class="icon iconfont icon-dizhi1">自提门店</span>
  17. </view>
  18. <view class="cont-text ml20">
  19. <view class="express-text">
  20. {{extractStore.store_name }} {{extractStore.phone }}
  21. <view class="f24 gray9 pt10">
  22. {{ extractStore.region.province }} {{ extractStore.region.city}}
  23. {{ extractStore.region.region }}
  24. {{ extractStore.address }}
  25. </view>
  26. </view>
  27. </view>
  28. </view>
  29. <!--购物列表-->
  30. <view class="shops group bg-white">
  31. <view class="group-hd border-b-e">
  32. <view class="left">
  33. <text class="min-name">商品</text>
  34. </view>
  35. </view>
  36. <view class="list">
  37. <view class="one-product p-20-0" v-for="(item, index) in detail.product" :key="index">
  38. <view class="d-s-c">
  39. <view class="cover">
  40. <image :src="item.image.file_path" mode="aspectFit"></image>
  41. </view>
  42. <view class="flex-1">
  43. <view class="pro-info">{{ item.product_name }}</view>
  44. <view class="pt10 p-0-30 d-b-c">
  45. <view class="price f22">
  46. ¥
  47. <text class="f40">{{ item.product_price }}</text>
  48. </view>
  49. <view class="f24 gray9">x{{ item.total_num }}</view>
  50. </view>
  51. </view>
  52. </view>
  53. </view>
  54. </view>
  55. </view>
  56. <!--订单信息-->
  57. <view class="group bg-white f28">
  58. <view class="p-20-0">
  59. <text class="gray9">订单编号:</text>
  60. <text>{{ detail.order_no }}</text>
  61. </view>
  62. <view class="p-20-0">
  63. <text class="gray9">下单时间:</text>
  64. <text>{{ detail.create_time }}</text>
  65. </view>
  66. <view class="p-20-0">
  67. <text class="gray9">支付方式:</text>
  68. <text>{{ detail.pay_type.text }}</text>
  69. </view>
  70. <view class="p-20-0">
  71. <text class="gray9">配送方式:</text>
  72. <text>{{ detail.delivery_type.text }}</text>
  73. </view>
  74. <view class="p-20-0 d-b-c">
  75. <text class="gray9">商品金额</text>
  76. <text>¥ {{ detail.order_price }}</text>
  77. </view>
  78. <view class="p-20-0 d-b-c">
  79. <text class="gray9">运费</text>
  80. <text>+ ¥ {{ detail.express_price }}</text>
  81. </view>
  82. <view class="p-20-0 d-e-c fb f34">
  83. 应付金额:
  84. <text class="red">¥ {{ detail.order_price }}</text>
  85. </view>
  86. </view>
  87. <!-- 操作栏 -->
  88. <view v-if="detail.order_status.value != 20 " class="flow-fixed-footer b-f">
  89. <!-- 订单核销 -->
  90. <view v-if="detail.pay_status.value==20 && detail.delivery_type.value ==20 && detail.delivery_status.value == 10 ">
  91. <button class="btn-red" @click="onSubmitExtract(detail.order_id)">确认核销</button>
  92. </view>
  93. </view>
  94. </view>
  95. </template>
  96. <script>
  97. import Popup from '@/components/uni-popup.vue'
  98. import utils from '@/common/utils.js'
  99. export default {
  100. data() {
  101. return {
  102. indicatorDots: true,
  103. autoplay: true,
  104. interval: 2000,
  105. duration: 500,
  106. /*是否显示支付类别弹窗*/
  107. isPayPopup: false,
  108. /*订单id*/
  109. order_no: 0,
  110. /*订单详情*/
  111. detail: {
  112. order_status: [],
  113. address: {
  114. region: []
  115. },
  116. product: [],
  117. pay_type: [],
  118. delivery_type: [],
  119. pay_status: []
  120. },
  121. extractStore: {},
  122. };
  123. },
  124. components: {},
  125. onLoad(e) {
  126. this.order_no = e.order_no;
  127. },
  128. onShow() {
  129. /*获取订单详情*/
  130. this.getData();
  131. },
  132. methods: {
  133. /*获取数据*/
  134. getData() {
  135. let self = this;
  136. uni.showLoading({
  137. title: '加载中'
  138. });
  139. self._get(
  140. 'store.order/detail', {
  141. order_no: self.order_no
  142. },
  143. function(res) {
  144. self.detail = res.data.order;
  145. self.extractStore = res.data.order.extractStore;
  146. uni.hideLoading();
  147. }
  148. );
  149. },
  150. /*核销*/
  151. onSubmitExtract(order_id) {
  152. let self = this;
  153. wx.showModal({
  154. title: "提示",
  155. content: "您确定要核销吗?",
  156. success: function(o) {
  157. o.confirm && self._post(
  158. 'store.order/extract', {
  159. order_id: order_id
  160. },
  161. function(res) {
  162. uni.showToast({
  163. title: res.msg,
  164. duration: 2000,
  165. icon: 'success',
  166. });
  167. setTimeout(function () {
  168. self.getData();
  169. }, 2000);
  170. }
  171. );
  172. }
  173. });
  174. },
  175. }
  176. };
  177. </script>
  178. <style scoped>
  179. .order-express {
  180. background: #ffffff;
  181. }
  182. .order-express .icon-box .iconfont {
  183. font-size: 50rpx;
  184. }
  185. .order-datail {
  186. padding-bottom: 90 rpx;
  187. }
  188. </style>