orderDetails.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323
  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">
  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_ice_list" v-if="orderList.iceRaftCode">
  33. <view class="card_ice_item" v-for="(item1,index1) in orderList.iceRaftCode">
  34. <view style="display: flex;align-items: center;">
  35. <span class="iconfont icon-bingpaiguanli icon_ice"></span>
  36. <view class="ice_title">冰排12</view>
  37. </view>
  38. <view class="ice_code">{{item1}}</view>
  39. </view>
  40. </view> -->
  41. <view class="card_anti_dismantle" v-if="orderList.tamperProofLabelImg">
  42. <span>防拆标签图片:</span>
  43. <view style="display: flex;">
  44. <view style="margin-right: 20rpx;" v-for="(item,index) in getimagetamper(orderList)"
  45. :key="index">
  46. <u-image radius="4" :showLoading="true" :src="item" width="80px" height="80px"></u-image>
  47. </view>
  48. </view>
  49. </view>
  50. <view class="title_claim" v-if="orderList.tamperProofLabel">
  51. <span>防拆标签码:</span>
  52. <view style="width: auto;font-size: 28rpx;">
  53. {{orderList.tamperProofLabel}}
  54. </view>
  55. </view>
  56. <view class="title_claim"><span>备注:</span>{{orderList.remark}}</view>
  57. </view>
  58. <view class="card_examine" v-if="orderList.status != 1">
  59. <view class="examine_title center_in">
  60. <view class="line_back" @click="logistics">查看物流详情</view>
  61. </view>
  62. <view class="examine_title center_in">
  63. <view class="line_back" @click="goHumiture">查看温湿度</view>
  64. </view>
  65. </view>
  66. <view class="card_humiture1" v-if="orderList.status == 8">
  67. <view class="order_iamge_item" v-for="(item,index) in srcList" :key="index">
  68. <u-image :showLoading="true" :src="item.url" width="80px" height="80px" radius="2"></u-image>
  69. <view class="order_item_title">{{item.title}}</view>
  70. </view>
  71. </view>
  72. <!-- <view v-if="orderList.status != 1">
  73. <view class="line_back" style="margin-top: 40rpx;" @click="logistics">查看物流详情</view>
  74. <view class="line_back" @click="goHumiture">查看温湿度</view>
  75. </view> -->
  76. <view style="width: 100%;height: 80rpx;"></view>
  77. </view>
  78. <!-- <view class="btn_print" v-if="type == 'details' && orderList.status == 2 || orderList.status == 3">
  79. <u-button type="primary" text="打印条码"></u-button>
  80. </view> -->
  81. </view>
  82. </template>
  83. <script>
  84. export default {
  85. data() {
  86. return {
  87. type: 'details',
  88. delivererList: {
  89. name: '',
  90. phone: '',
  91. },
  92. senderList: {
  93. name: '',
  94. phone: '',
  95. },
  96. consigneeList: {
  97. name: '',
  98. phone: '',
  99. address: '',
  100. },
  101. orderList: {},
  102. srcList: [{
  103. title: '运单签收图片',
  104. url: '',
  105. }, {
  106. title: '随货通行单图片',
  107. url: '',
  108. }, {
  109. title: '冷链交接单图片',
  110. url: '',
  111. }],
  112. userInfo: {},
  113. }
  114. },
  115. onLoad(value) {
  116. var userInfo = this.$cache.getCache('userInfo')
  117. this.userInfo = userInfo
  118. this.type = value.type
  119. },
  120. onShow() {
  121. var orderList = this.$cache.getCache('orderDetails')
  122. this.orderList = orderList
  123. this.senderList.name = orderList.reCheck.nickName
  124. this.senderList.phone = orderList.reCheck.phone
  125. this.consigneeList.name = orderList.consigneeAddressName
  126. this.consigneeList.phone = orderList.consigneeAddressPhone
  127. this.consigneeList.address = orderList.consigneeAddressDetails
  128. this.delivererList.name = orderList.delivery.nickName
  129. this.delivererList.phone = orderList.delivery.phone
  130. if (orderList.status == 8) {
  131. const arr = orderList.ReceiptImg.split(',')
  132. this.srcList[0].url = arr[0]
  133. this.srcList[1].url = arr[1]
  134. this.srcList[2].url = arr[2]
  135. }
  136. },
  137. methods: {
  138. // 物流详情
  139. logistics() {
  140. uni.navigateTo({
  141. url: '/pages/order/logisticsDetails'
  142. });
  143. },
  144. // 温湿度记录
  145. goHumiture() {
  146. uni.navigateTo({
  147. url: '/pages/order/humiture'
  148. });
  149. },
  150. // 运单状态
  151. orderStatus(value) {
  152. if (value == 3) {
  153. return '待配送'
  154. } else if (value == 4) {
  155. return '配送中'
  156. } else if (value == 5) {
  157. return '已送达'
  158. } else if (value == 6) {
  159. return '已拒收'
  160. }
  161. },
  162. // 运单文字颜色
  163. getState(value) {
  164. if (value == 3) {
  165. return '#9ddd54'
  166. } else if (value == 4) {
  167. return '#4bc7fc'
  168. } else if (value == 5) {
  169. return '#1cc723'
  170. } else if (value == 6) {
  171. return '#fe880e'
  172. }
  173. },
  174. getimagetamper(value) {
  175. let arr = value.tamperProofLabelImg.split(',')
  176. return arr
  177. }
  178. }
  179. }
  180. </script>
  181. <style lang="scss" scoped>
  182. .card_order_detail {
  183. margin: 20rpx;
  184. }
  185. .orderNumber {
  186. display: flex;
  187. justify-content: space-between;
  188. align-items: center;
  189. background-color: #fff;
  190. border-radius: 10rpx;
  191. padding: 15rpx;
  192. }
  193. .card_order_title {
  194. span {
  195. font-size: 28rpx;
  196. color: #909399;
  197. margin-right: 10rpx;
  198. }
  199. }
  200. .card_state {
  201. color: #606266;
  202. font-size: 30rpx;
  203. }
  204. .title_delivery {
  205. font-size: 30rpx;
  206. font-weight: 600;
  207. margin: 10rpx 0rpx 10rpx 10rpx;
  208. }
  209. .card_humiture {
  210. margin-top: 30rpx;
  211. // border-radius: 20rpx;
  212. padding: 1rpx 20rpx;
  213. background-color: #fff;
  214. border-top-right-radius: 10rpx;
  215. border-top-left-radius: 10rpx;
  216. }
  217. .card_humiture1 {
  218. display: flex;
  219. justify-content: space-around;
  220. align-items: center;
  221. flex-wrap: wrap;
  222. margin-top: 10rpx;
  223. border-radius: 10rpx;
  224. padding: 20rpx;
  225. background-color: #fff;
  226. }
  227. .order_iamge_item {
  228. display: flex;
  229. flex-direction: column;
  230. align-items: center;
  231. }
  232. .order_item_title {
  233. font-weight: 600;
  234. margin-top: 10rpx;
  235. font-size: 26rpx;
  236. }
  237. .title_claim {
  238. display: flex;
  239. margin: 20rpx 0rpx 6rpx 0rpx;
  240. span {
  241. display: flex;
  242. align-items: center;
  243. font-size: 28rpx;
  244. color: #909399;
  245. margin-right: 10rpx;
  246. }
  247. }
  248. .line_back {
  249. font-size: 30rpx;
  250. margin: 20rpx 0rpx;
  251. color: #3c9cff;
  252. }
  253. .card_anti_dismantle {
  254. display: flex;
  255. flex-direction: column;
  256. span {
  257. font-size: 28rpx;
  258. color: #909399;
  259. margin-bottom: 10rpx;
  260. }
  261. }
  262. .card_ice_list {
  263. display: flex;
  264. flex-direction: row;
  265. flex-wrap: wrap;
  266. }
  267. .card_ice_item {
  268. margin-right: 10rpx;
  269. margin-bottom: 10rpx;
  270. padding: 6rpx 10rpx;
  271. border-radius: 6rpx;
  272. border: 1rpx solid #e7e6e4;
  273. }
  274. .ice_title {
  275. font-size: 28rpx;
  276. }
  277. .icon_ice {
  278. font-size: 34rpx;
  279. color: #19be6b;
  280. margin-right: 5rpx;
  281. }
  282. .ice_code {
  283. font-size: 24rpx;
  284. }
  285. .card_examine {
  286. display: flex;
  287. align-items: center;
  288. border-top: 1rpx solid #e7e6e4;
  289. background-color: #fff;
  290. border-bottom-left-radius: 10rpx;
  291. border-bottom-right-radius: 10rpx;
  292. }
  293. .examine_title {
  294. flex: 1;
  295. height: 80rpx;
  296. }
  297. .examine_title:nth-child(1) {
  298. border-right: 1rpx solid #e7e6e4;
  299. }
  300. </style>