orderDetails.vue 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257
  1. <template>
  2. <!-- 运单详情 -->
  3. <view>
  4. <u-navbar title="" autoBack placeholder></u-navbar>
  5. <view class="card_order_detail">
  6. <view class="orderNumber">
  7. <view class="card_order_title">
  8. <span>运单号:</span>{{orderList.waybillNo}}
  9. </view>
  10. <span class="card_state"
  11. :style="{color:getState(orderList.status)}">{{orderStatus(orderList.status)}}</span>
  12. </view>
  13. <view class="title_delivery">收件人:</view>
  14. <x-orderCard :list="consigneeList"></x-orderCard>
  15. <view class="title_delivery">配送人:</view>
  16. <x-orderCard :list="delivererList" :deliverer="false"></x-orderCard>
  17. <view class="title_delivery">复核人:</view>
  18. <x-orderCard :list="senderList" :deliverer="false"></x-orderCard>
  19. <view class="card_humiture">
  20. <view class="title_claim" v-if="orderList.coolerBox.id">
  21. <span>保温箱:</span>
  22. <view style="width: auto;">
  23. <u-tag :text="orderList.coolerBox.name" plain size="mini" type="success"></u-tag>
  24. </view>
  25. </view>
  26. <view class="title_claim" v-if="orderList.iceRaftCode">
  27. <span>冰排:</span>
  28. <view style="width: auto;margin-left: 10rpx;" v-for="(item1,index1) in orderList.iceRaftCode">
  29. <u-tag :text="item1" plain size="mini"></u-tag>
  30. </view>
  31. </view>
  32. <view class="card_anti_dismantle" v-if="orderList.tamperProofLabelImg">
  33. <span>防拆标签图片:</span>
  34. <view style="display: flex;">
  35. <view style="margin-right: 20rpx;" v-for="(item,index) in getimagetamper(orderList)"
  36. :key="index">
  37. <u-image radius="4" :showLoading="true" :src="item" width="80px" height="80px"></u-image>
  38. </view>
  39. </view>
  40. </view>
  41. <view class="title_claim" v-if="orderList.tamperProofLabel">
  42. <span>防拆标签码:</span>
  43. <view style="width: auto;font-size: 28rpx;">
  44. {{orderList.tamperProofLabel}}
  45. </view>
  46. </view>
  47. <view class="title_claim"><span>备注:</span>{{orderList.remark}}</view>
  48. </view>
  49. <view class="card_humiture1" v-if="orderList.status == 8">
  50. <view class="order_iamge_item" v-for="(item,index) in srcList" :key="index">
  51. <u-image :showLoading="true" :src="item.url" width="80px" height="80px" radius="2"></u-image>
  52. <view class="order_item_title">{{item.title}}</view>
  53. </view>
  54. </view>
  55. <view v-if="orderList.status != 1">
  56. <view class="line_back" style="margin-top: 40rpx;" @click="logistics">查看物流详情</view>
  57. <view class="line_back" @click="goHumiture">查看温湿度</view>
  58. </view>
  59. <view style="width: 100%;height: 80rpx;"></view>
  60. </view>
  61. <!-- <view class="btn_print" v-if="type == 'details' && orderList.status == 2 || orderList.status == 3">
  62. <u-button type="primary" text="打印条码"></u-button>
  63. </view> -->
  64. </view>
  65. </template>
  66. <script>
  67. export default {
  68. data() {
  69. return {
  70. type: 'details',
  71. delivererList: {
  72. name: '',
  73. phone: '',
  74. },
  75. senderList: {
  76. name: '',
  77. phone: '',
  78. },
  79. consigneeList: {
  80. name: '',
  81. phone: '',
  82. address: '',
  83. },
  84. orderList: {},
  85. srcList: [{
  86. title: '运单签收图片',
  87. url: '',
  88. }, {
  89. title: '随货通行单图片',
  90. url: '',
  91. }, {
  92. title: '冷链交接单图片',
  93. url: '',
  94. }],
  95. userInfo: {},
  96. }
  97. },
  98. onLoad(value) {
  99. var userInfo = this.$cache.getCache('userInfo')
  100. this.userInfo = userInfo
  101. this.type = value.type
  102. },
  103. onShow() {
  104. var orderList = this.$cache.getCache('orderDetails')
  105. this.orderList = orderList
  106. this.senderList.name = orderList.reCheck.nickName
  107. this.senderList.phone = orderList.reCheck.phone
  108. this.consigneeList.name = orderList.consigneeAddressName
  109. this.consigneeList.phone = orderList.consigneeAddressPhone
  110. this.consigneeList.address = orderList.consigneeAddressDetails
  111. this.delivererList.name = orderList.delivery.nickName
  112. this.delivererList.phone = orderList.delivery.phone
  113. if (orderList.status == 8) {
  114. const arr = orderList.ReceiptImg.split(',')
  115. this.srcList[0].url = arr[0]
  116. this.srcList[1].url = arr[1]
  117. this.srcList[2].url = arr[2]
  118. }
  119. },
  120. methods: {
  121. // 物流详情
  122. logistics() {
  123. uni.navigateTo({
  124. url: '/pages/order/logisticsDetails'
  125. });
  126. },
  127. // 温湿度记录
  128. goHumiture() {
  129. uni.navigateTo({
  130. url: '/pages/order/humiture'
  131. });
  132. },
  133. // 运单状态
  134. orderStatus(value) {
  135. if (value == 1) {
  136. return '已下单'
  137. } else if (value == 2) {
  138. return '配送中'
  139. } else if (value == 3) {
  140. return '已送达'
  141. } else if (value == 4) {
  142. return '已拒收'
  143. }
  144. },
  145. // 运单文字颜色
  146. getState(value) {
  147. if (value == 1) {
  148. return '#9ddd54'
  149. } else if (value == 2) {
  150. return '#4bc7fc'
  151. } else if (value == 3) {
  152. return '#1cc723'
  153. } else if (value == 4) {
  154. return '#fe880e'
  155. }
  156. },
  157. getimagetamper(value) {
  158. let arr = value.tamperProofLabelImg.split(',')
  159. return arr
  160. }
  161. }
  162. }
  163. </script>
  164. <style lang="scss" scoped>
  165. .card_order_detail {
  166. margin: 20rpx;
  167. }
  168. .orderNumber {
  169. display: flex;
  170. justify-content: space-between;
  171. align-items: center;
  172. background-color: #fff;
  173. border-radius: 20rpx;
  174. padding: 15rpx;
  175. }
  176. .card_order_title {
  177. span {
  178. font-size: 28rpx;
  179. color: #909399;
  180. margin-right: 10rpx;
  181. }
  182. }
  183. .card_state {
  184. color: #606266;
  185. font-size: 30rpx;
  186. }
  187. .title_delivery {
  188. font-size: 30rpx;
  189. font-weight: 600;
  190. margin: 20rpx 0rpx 10rpx 10rpx;
  191. }
  192. .card_humiture {
  193. margin-top: 30rpx;
  194. border-radius: 20rpx;
  195. padding: 1rpx 20rpx;
  196. background-color: #fff;
  197. }
  198. .card_humiture1 {
  199. display: flex;
  200. justify-content: space-around;
  201. align-items: center;
  202. flex-wrap: wrap;
  203. margin-top: 10rpx;
  204. border-radius: 20rpx;
  205. padding: 20rpx;
  206. background-color: #fff;
  207. }
  208. .order_iamge_item {
  209. display: flex;
  210. flex-direction: column;
  211. align-items: center;
  212. }
  213. .order_item_title {
  214. font-weight: 600;
  215. margin-top: 10rpx;
  216. font-size: 26rpx;
  217. }
  218. .title_claim {
  219. display: flex;
  220. margin: 20rpx 0rpx;
  221. span {
  222. font-size: 28rpx;
  223. color: #909399;
  224. margin-right: 10rpx;
  225. }
  226. }
  227. .line_back {
  228. font-size: 30rpx;
  229. margin: 20rpx 0rpx;
  230. color: #3c9cff;
  231. }
  232. .card_anti_dismantle {
  233. display: flex;
  234. flex-direction: column;
  235. span {
  236. font-size: 28rpx;
  237. color: #909399;
  238. margin-bottom: 10rpx;
  239. margin-top: 10rpx;
  240. }
  241. }
  242. </style>