orderDetails.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369
  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" v-if="orderList.status != 3">
  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">
  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. console.log(event, 98)
  149. this.overlayURL = event
  150. this.overlayShow = true
  151. },
  152. // 分配订单
  153. coolingRelease() {
  154. uni.navigateTo({
  155. url: '/pages/order/distributionOrder?waybillNo=' + this.orderList.waybillNo
  156. });
  157. },
  158. // 物流详情
  159. logistics() {
  160. uni.navigateTo({
  161. url: '/pages/order/logisticsDetails'
  162. });
  163. },
  164. // 温湿度记录
  165. goHumiture() {
  166. uni.navigateTo({
  167. url: '/pages/order/humiture'
  168. });
  169. },
  170. // 运单状态
  171. orderStatus(value) {
  172. if (value == 3) {
  173. return '待配送'
  174. } else if (value == 4) {
  175. return '配送中'
  176. } else if (value == 5) {
  177. return '已送达'
  178. } else if (value == 6) {
  179. return '已拒收'
  180. }
  181. },
  182. // 运单文字颜色
  183. getState(value) {
  184. if (value == 3) {
  185. return '#9ddd54'
  186. } else if (value == 4) {
  187. return '#4bc7fc'
  188. } else if (value == 5) {
  189. return '#1cc723'
  190. } else if (value == 6) {
  191. return '#fe880e'
  192. }
  193. },
  194. getimagetamper(value) {
  195. let arr = value.tamperProofLabelImg.split(',')
  196. return arr
  197. },
  198. }
  199. }
  200. </script>
  201. <style lang="scss" scoped>
  202. .card_order_detail {
  203. margin: 20rpx;
  204. }
  205. .orderNumber {
  206. display: flex;
  207. justify-content: space-between;
  208. align-items: center;
  209. background-color: #fff;
  210. border-radius: 10rpx;
  211. padding: 15rpx;
  212. }
  213. .card_order_title {
  214. span {
  215. font-size: 28rpx;
  216. color: #909399;
  217. margin-right: 10rpx;
  218. }
  219. }
  220. .card_state {
  221. color: #606266;
  222. font-size: 30rpx;
  223. }
  224. .title_delivery {
  225. font-size: 30rpx;
  226. font-weight: 600;
  227. margin: 10rpx 0rpx 10rpx 10rpx;
  228. }
  229. .card_prescription {
  230. margin-top: 20rpx;
  231. padding: 20rpx;
  232. border-radius: 10rpx;
  233. background-color: #fff;
  234. span {
  235. font-size: 28rpx;
  236. color: #909399;
  237. margin-bottom: 10rpx;
  238. }
  239. }
  240. .card_humiture {
  241. margin-top: 30rpx;
  242. // border-radius: 20rpx;
  243. padding: 1rpx 20rpx;
  244. background-color: #fff;
  245. border-top-right-radius: 10rpx;
  246. border-top-left-radius: 10rpx;
  247. }
  248. .card_humiture1 {
  249. display: flex;
  250. justify-content: space-around;
  251. align-items: center;
  252. flex-wrap: wrap;
  253. margin-top: 10rpx;
  254. border-radius: 10rpx;
  255. padding: 20rpx;
  256. background-color: #fff;
  257. }
  258. .order_iamge_item {
  259. display: flex;
  260. flex-direction: column;
  261. align-items: center;
  262. }
  263. .order_item_title {
  264. font-weight: 600;
  265. margin-top: 10rpx;
  266. font-size: 26rpx;
  267. }
  268. .title_claim {
  269. display: flex;
  270. margin: 20rpx 0rpx 6rpx 0rpx;
  271. span {
  272. display: flex;
  273. align-items: center;
  274. font-size: 28rpx;
  275. color: #909399;
  276. margin-right: 10rpx;
  277. }
  278. }
  279. .line_back {
  280. font-size: 30rpx;
  281. margin: 20rpx 0rpx;
  282. color: #3c9cff;
  283. }
  284. .card_anti_dismantle {
  285. display: flex;
  286. flex-direction: column;
  287. span {
  288. font-size: 28rpx;
  289. color: #909399;
  290. margin-bottom: 10rpx;
  291. }
  292. }
  293. .card_ice_list {
  294. display: flex;
  295. flex-direction: row;
  296. flex-wrap: wrap;
  297. }
  298. .card_ice_item {
  299. margin-right: 10rpx;
  300. margin-bottom: 10rpx;
  301. padding: 6rpx 10rpx;
  302. border-radius: 6rpx;
  303. border: 1rpx solid #e7e6e4;
  304. }
  305. .ice_title {
  306. font-size: 28rpx;
  307. }
  308. .icon_ice {
  309. font-size: 34rpx;
  310. color: #19be6b;
  311. margin-right: 5rpx;
  312. }
  313. .ice_code {
  314. font-size: 24rpx;
  315. }
  316. .card_examine {
  317. display: flex;
  318. align-items: center;
  319. border-top: 1rpx solid #e7e6e4;
  320. background-color: #fff;
  321. border-bottom-left-radius: 10rpx;
  322. border-bottom-right-radius: 10rpx;
  323. }
  324. .examine_title {
  325. flex: 1;
  326. height: 80rpx;
  327. }
  328. .examine_title:nth-child(1) {
  329. border-right: 1rpx solid #e7e6e4;
  330. }
  331. .btn_distribute {
  332. position: fixed;
  333. z-index: 2;
  334. bottom: 0;
  335. left: 0;
  336. right: 0;
  337. padding: 20rpx 30rpx 20rpx 30rpx;
  338. background-color: #fff;
  339. padding-bottom: constant(safe-area-inset-bottom); //兼容 IOS<11.2
  340. padding-bottom: env(safe-area-inset-bottom); //兼容 IOS>11.2
  341. border-top: 1rpx solid #E4E7ED;
  342. }
  343. </style>