orderDetails.vue 8.9 KB

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