express.vue 5.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209
  1. <template>
  2. <app-layout>
  3. <view class="express">
  4. <image class="logo" src='./../image/express.png'></image>
  5. <view class="company-name">{{express_company}}</view>
  6. <view class="express-no">运单编号:{{express_no}}<image @click='copy' src="./../image/copy.png"></image></view>
  7. </view>
  8. <view class='logistics-box dir-top t-small-color t-medium'>
  9. <block v-if='express.list'>
  10. <view class='item-box'>
  11. <view :class="['dir-top-nowrap','item',`${index == 0 ? 'sign-text' : ''}`]" v-for='item in express.list' :key='item.id'>
  12. <image v-if='index == 0' class='sign-big' src='/static/image/icon/order/point-green.png'></image>
  13. <image v-else class='sign' src='/static/image/icon/order/point-gray.png'></image>
  14. <view>{{item.desc}}</view>
  15. <view>{{item.datetime}}</view>
  16. </view>
  17. </view>
  18. </block>
  19. <view v-else class='main-center'>
  20. <view>暂无物流信息</view>
  21. </view>
  22. </view>
  23. </app-layout>
  24. </template>
  25. <script>
  26. import { mapState } from "vuex";
  27. export default {
  28. data() {
  29. return {
  30. express: '',
  31. id: '',
  32. express_no: '',
  33. express_company: ''
  34. }
  35. },
  36. computed: {
  37. ...mapState({
  38. userInfo: state => state.user.info,
  39. adminImg: state => state.mallConfig.__wxapp_img.app_admin,
  40. })
  41. },
  42. methods: {
  43. copy() {
  44. uni.setClipboardData({
  45. data: this.express_no,
  46. success() {
  47. uni.getClipboardData({
  48. success() {
  49. uni.showToast({
  50. title: '复制成功',
  51. duration: 1000
  52. });
  53. }
  54. })
  55. }
  56. })
  57. },
  58. },
  59. onLoad(options) {
  60. let that = this;
  61. that.$showLoading({
  62. type: 'global',
  63. text: '加载中...'
  64. });
  65. that.$request({
  66. url: that.$api.app_admin.express_detail,
  67. data: {
  68. id: options.id,
  69. express: options.express,
  70. customer_name: options.customer_name,
  71. express_no: options.express_no
  72. }
  73. }).then(response => {
  74. that.$hideLoading();
  75. if (response.code == 0) {
  76. that.express = response.data.express;
  77. that.id = options.id;
  78. that.express_company = options.express;
  79. that.express_no = options.express_no;
  80. } else {
  81. uni.showToast({
  82. title: response.msg,
  83. icon: 'none',
  84. duration: 1000
  85. });
  86. }
  87. }).catch(response => {
  88. that.$hideLoading();
  89. uni.showToast({
  90. title: response,
  91. icon: 'none',
  92. duration: 1000
  93. });
  94. });
  95. }
  96. }
  97. </script>
  98. <style scoped lang="scss">
  99. .logo {
  100. height: #{100rpx};
  101. width: #{100rpx};
  102. float: left;
  103. margin-right: #{34rpx};
  104. }
  105. .express {
  106. margin: #{24rpx};
  107. display: block;
  108. margin-bottom: 0;
  109. padding: #{32rpx};
  110. padding-left: #{24rpx};
  111. position: relative;
  112. font-size: #{32rpx};
  113. background-color: #fff;
  114. color: #353535;
  115. border-radius: #{16rpx};
  116. height: #{160rpx};
  117. }
  118. .to-more {
  119. height: #{24rpx};
  120. width: #{12rpx};
  121. position: absolute;
  122. right: #{24rpx};
  123. top: 50%;
  124. margin-top: #{-6rpx};
  125. }
  126. .express-list {
  127. padding: #{40rpx} #{32rpx};
  128. background-color: #fff;
  129. color: #25ae5f;
  130. font-size: #{32rpx};
  131. margin: #{24rpx};
  132. border-radius: #{16rpx};
  133. }
  134. .express-box .top-box {
  135. background-color: #fff;
  136. padding: #{20rpx};
  137. }
  138. .express-box .label {
  139. margin-right: #{10rpx};
  140. }
  141. .express-box .goods-pic {
  142. width: #{130rpx};
  143. height: #{130rpx};
  144. margin-right: #{20rpx};
  145. }
  146. .logistics-box {
  147. padding: #{20rpx} #{25rpx};
  148. margin: 0 #{24rpx};
  149. border-radius: #{16rpx};
  150. background-color: #fff;
  151. margin-top: #{25rpx};
  152. }
  153. .logistics-box .item-box {
  154. border-left: #{1rpx} solid #e2e2e2;
  155. padding-left: #{45rpx};
  156. position: relative;
  157. }
  158. .logistics-box .item {
  159. margin-bottom: #{25rpx};
  160. padding-bottom: #{25rpx};
  161. border-bottom: #{1rpx} solid #e2e2e2;
  162. }
  163. .logistics-box .item .sign {
  164. width: #{16rpx};
  165. height: #{16rpx};
  166. position: absolute;
  167. left: #{-7rpx};
  168. }
  169. .logistics-box .item .sign-big {
  170. width: #{32rpx};
  171. height: #{32rpx};
  172. position: absolute;
  173. left: #{-16rpx};
  174. }
  175. .sign-text {
  176. color: #25ae5f;
  177. }
  178. .company-name {
  179. margin-top: #{6rpx};
  180. }
  181. .express-no {
  182. color:#666666;
  183. font-size: #{28rpx};
  184. margin-top: #{10rpx};
  185. }
  186. .express-no image {
  187. height: #{24rpx};
  188. width: #{24rpx};
  189. margin-left: #{16rpx};
  190. }
  191. </style>