index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688
  1. <script setup lang="ts">
  2. import type { MapMarker, MapPolyline } from '@uni-helper/uni-types'
  3. import { StaticUrl } from '@/config'
  4. import router from '@/router'
  5. // #ifdef MP-WEIXIN
  6. const plugins = requirePlugin('logisticsPlugin')
  7. // #endif
  8. const { statusBarHeight, MenuButtonHeight } = storeToRefs(useSysStore())
  9. const { userInfo } = storeToRefs(useUserStore())
  10. definePage({
  11. name: 'xsb-orderDetaile',
  12. islogin: true,
  13. style: {
  14. navigationBarTitleText: '订单详情',
  15. navigationStyle: 'custom',
  16. },
  17. })
  18. const collapse = ref(true)
  19. const orderInfo = ref<Api.xsbOrderList>()
  20. const orderNum = ref()
  21. const mapInfo = ref<Api.RiderInfo>()
  22. const mapMarkers = ref<MapMarker[]>([])
  23. const mapPolyLine = ref<MapPolyline[]>([])
  24. const showNode = ref(false)
  25. const NodeList = ref<Api.DeliveryNode[]>([])
  26. const refundStatus = ['进行中', '已完成', '退款成功', '已取消', '已驳回']
  27. const viewDevyBtn = computed(() => { // 2026.3.31,后端说这个字段返回的10是最新的快递,需要兼容1,所以1和10都需要显示
  28. return orderInfo.value?.actualTotal && [1, 10].includes(Number(orderInfo.value.dvyType))
  29. })
  30. const showMapStatus = [OrderStatus.OrderAccepted, OrderStatus.OrderWaitDelivery, OrderStatus.OrderDelivering, OrderStatus.OrderArrived]
  31. const mapStaticShopImg = {
  32. [OrderStatus.OrderAccepted]: `${StaticUrl}/order-map-jian.png`,
  33. [OrderStatus.OrderWaitDelivery]: `${StaticUrl}/order-map-wait.png`,
  34. [OrderStatus.OrderDelivering]: `${StaticUrl}/order-map-qishou.png`,
  35. [OrderStatus.OrderArrived]: `${StaticUrl}/order-map-qishou.png`,
  36. }
  37. const mapTextShop = {
  38. [OrderStatus.OrderAccepted]: '商家拣货中',
  39. [OrderStatus.OrderWaitDelivery]: orderInfo.value?.dvyType === 3 ? '等待骑手配送' : '待发货',
  40. [OrderStatus.OrderDelivering]: orderInfo.value?.dvyType === 3 ? '骑手配送中' : '待收货',
  41. [OrderStatus.OrderArrived]: '已送达',
  42. }
  43. const mapLation = computed(() => {
  44. const lation = {
  45. latitude: mapInfo.value?.shopLatitude,
  46. longitude: mapInfo.value?.shopLongitude,
  47. scale: 16,
  48. }
  49. if (orderInfo.value && mapInfo.value) {
  50. const lations = calculateCenterPointSpherical({ lat: orderInfo.value.latitude, lng: orderInfo.value.longitude }, { lat: mapInfo.value.shopLatitude as number, lng: mapInfo.value.shopLongitude as number })
  51. lation.latitude = lations.lat
  52. lation.longitude = lations.lng
  53. lation.scale = 6
  54. }
  55. return lation
  56. })
  57. onLoad((options: any) => {
  58. orderNum.value = options.id
  59. getDetail(options.id)
  60. })
  61. async function getDetail(id: string) {
  62. const { data } = await Apis.xsb.orderInfo({
  63. data: {
  64. orderNo: id,
  65. },
  66. })
  67. orderInfo.value = data
  68. if (showMapStatus.includes(data.hbOrderStatus)) {
  69. getOrderMapInf()
  70. }
  71. }
  72. function handleCollapse() {
  73. collapse.value = !collapse.value
  74. }
  75. async function handleCancel() {
  76. await useUserStore().handleCommonCancelOrder(orderInfo.value as Api.xsbOrderList)
  77. getDetail(String(unref(orderInfo)?.orderNumber))
  78. }
  79. async function handlePay() {
  80. const payMent = await useUserStore().getPayMent(String(unref(orderInfo)?.orderNumber))
  81. if (payMent.payType !== 'point') {
  82. // #ifdef MP-WEIXIN
  83. const res = await useUserStore().handleCommonPayMent(String(unref(orderInfo)?.orderNumber))
  84. await useUserStore().getWxCommonPayment(res)
  85. getDetail(String(unref(orderInfo)?.orderNumber))
  86. // #endif
  87. // #ifdef H5
  88. useUserStore().handleCommonWechatPay(String(unref(orderInfo)?.orderNumber))
  89. // #endif
  90. }
  91. else {
  92. await useUserStore().handleCommonPayMent(String(unref(orderInfo)?.orderNumber))
  93. getDetail(String(unref(orderInfo)?.orderNumber))
  94. }
  95. }
  96. async function handelDel() {
  97. await useUserStore().handleCommonDeleteOrder(unref(orderInfo) as Api.xsbOrderList)
  98. router.back()
  99. }
  100. async function handleFinish() {
  101. uni.showLoading({ mask: true })
  102. setTimeout(async () => {
  103. await getDetail(String(unref(orderInfo)?.orderNumber))
  104. uni.hideLoading()
  105. }, 2000)
  106. }
  107. function handleCopy() {
  108. uni.setClipboardData({
  109. data: String(orderInfo.value?.orderNumber),
  110. showToast: true,
  111. })
  112. }
  113. async function handleAfterSale() {
  114. if (!orderInfo.value?.orderItemList) {
  115. useGlobalToast().show('商品异常!')
  116. return
  117. }
  118. await useSysStore().getRefunOrder(orderInfo.value.orderNumber as string)
  119. }
  120. async function getOrderMapInf() {
  121. const res = await Apis.xsb.riderInfo({ data: { orderNumber: orderNum.value } })
  122. mapInfo.value = res.data
  123. mapMarkers.value.push({
  124. id: 1,
  125. latitude: Number(mapInfo.value?.shopLatitude),
  126. longitude: Number(mapInfo.value?.shopLongitude),
  127. iconPath: mapStaticShopImg[orderInfo.value?.hbOrderStatus as keyof typeof mapStaticShopImg],
  128. width: 70,
  129. height: 80,
  130. label: {
  131. content: mapTextShop[orderInfo.value?.hbOrderStatus as keyof typeof mapTextShop],
  132. color: '#333',
  133. fontSize: 14,
  134. x: 0,
  135. y: 0,
  136. anchorX: 40,
  137. anchorY: -120,
  138. borderRadius: 8,
  139. borderWidth: 0,
  140. borderColor: '',
  141. bgColor: '#fff',
  142. padding: 5,
  143. display: 'BYCLICK',
  144. textAlign: 'left',
  145. customCallout: {
  146. display: 'BYCLICK',
  147. anchorX: 0,
  148. anchorY: 0,
  149. },
  150. ariaLabel: '',
  151. joinCluster: false,
  152. },
  153. }, {
  154. id: 2,
  155. longitude: Number(orderInfo.value?.longitude),
  156. latitude: Number(orderInfo.value?.latitude),
  157. iconPath: userInfo.value.avatarUrl || `${StaticUrl}/9.png`,
  158. width: 50,
  159. height: 50,
  160. })
  161. if (mapInfo.value?.riderLatitude && mapInfo.value?.riderLongitude) {
  162. mapMarkers.value.push({
  163. id: 3,
  164. longitude: Number(mapInfo.value?.riderLongitude),
  165. latitude: Number(mapInfo.value?.riderLatitude),
  166. iconPath: `${StaticUrl}/order-map-qishou.png`,
  167. width: 70,
  168. height: 80,
  169. label: {
  170. content: '骑手正在送货',
  171. color: '#333',
  172. fontSize: 14,
  173. x: 0,
  174. y: 0,
  175. anchorX: 40,
  176. anchorY: -120,
  177. borderRadius: 8,
  178. borderWidth: 0,
  179. borderColor: '',
  180. bgColor: '#fff',
  181. padding: 5,
  182. display: 'BYCLICK',
  183. textAlign: 'left',
  184. customCallout: {
  185. display: 'BYCLICK',
  186. anchorX: 0,
  187. anchorY: 0,
  188. },
  189. ariaLabel: '',
  190. joinCluster: false,
  191. },
  192. })
  193. mapPolyLine.value.push({
  194. points: [
  195. {
  196. longitude: Number(mapInfo.value?.riderLongitude),
  197. latitude: Number(mapInfo.value?.riderLatitude),
  198. },
  199. {
  200. longitude: Number(orderInfo.value?.longitude),
  201. latitude: Number(orderInfo.value?.latitude),
  202. },
  203. ],
  204. color: '#9ED605',
  205. width: 3,
  206. })
  207. // 绘制路径骑手和店家只能存在一个
  208. return
  209. }
  210. else {
  211. mapPolyLine.value.push({
  212. points: [
  213. {
  214. longitude: Number(orderInfo.value?.longitude),
  215. latitude: Number(orderInfo.value?.latitude),
  216. },
  217. {
  218. longitude: Number(mapInfo.value?.shopLongitude),
  219. latitude: Number(mapInfo.value?.shopLatitude),
  220. },
  221. ],
  222. color: '#9ED605',
  223. width: 3,
  224. })
  225. }
  226. console.log(mapPolyLine.value, 'mapPolyLine')
  227. }
  228. async function handleMarkerTap(e: UniHelper.MapOnMarkertapEvent) {
  229. console.log(e, 'sadada')
  230. if (orderInfo.value?.dvyType === 3) {
  231. const res = await useUserStore().getOrderNode(String(orderInfo.value?.orderNumber))
  232. NodeList.value = res as Api.DeliveryNode[]
  233. showNode.value = true
  234. }
  235. if (viewDevyBtn.value) {
  236. uni.showLoading({ mask: true })
  237. try {
  238. const res = await Apis.xsb.getWaybillToken({ data: { orderNumber: String(orderInfo.value?.orderNumber) } })
  239. uni.hideLoading()
  240. const jsData = JSON.parse(res.data)
  241. if (jsData.errmsg === 'ok') {
  242. plugins.openWaybillTracking({
  243. waybillToken: jsData.waybill_token,
  244. })
  245. }
  246. }
  247. catch {
  248. uni.hideLoading()
  249. }
  250. }
  251. }
  252. function openShopLocation() {
  253. uni.openLocation({
  254. latitude: orderInfo.value?.latitude || 0,
  255. longitude: orderInfo.value?.longitude || 0,
  256. name: orderInfo.value?.shopName,
  257. address: orderInfo.value?.consigneeAddress,
  258. })
  259. }
  260. async function handleReceive() {
  261. await useUserStore().handleCommonOrderReceive(orderInfo.value as Api.xsbOrderList)
  262. getDetail(String(unref(orderInfo)?.orderNumber))
  263. }
  264. function handleRefundDetail(item: any) {
  265. router.push({ name: 'common-afterSalesDetail', params: { refundNumber: String(item.refundNumber) } })
  266. }
  267. </script>
  268. <template>
  269. <page-meta :page-style="showNode ? 'overflow: hidden;' : ''" />
  270. <view
  271. v-if="orderInfo" class="page-xsb"
  272. :style="{ paddingTop: `${showMapStatus.includes(orderInfo?.hbOrderStatus) ? '850rpx' : (`${Number(statusBarHeight) + Number(MenuButtonHeight) + 10}px`)}` }"
  273. >
  274. <wd-navbar
  275. title="订单详情" :bordered="false" :z-index="99" safe-area-inset-top left-arrow fixed
  276. @click-left="router.back()"
  277. />
  278. <view v-if="showMapStatus.includes(orderInfo?.hbOrderStatus)">
  279. <map
  280. id="orderMap" :polyline="mapPolyLine" :scale="mapLation.scale" :markers="mapMarkers"
  281. :latitude="mapLation.latitude" :longitude="mapLation.longitude" class="fixed top-0 z80 h-900rpx w-screen"
  282. @markertap="handleMarkerTap"
  283. />
  284. </view>
  285. <view class="relative z-90 box-border bg-[#f6f6f6] px-24rpx">
  286. <view class="pt-20rpx">
  287. <view class="text-36rpx font-semibold">
  288. <view v-if="orderInfo.hbOrderStatus === OrderStatus.PaddingPay">
  289. <view class="flex items-center">
  290. 请在
  291. <wd-count-down format="mm:ss" :time="useUserStore().handleXSBCommonOrderStatusText(orderInfo)" @finish="handleFinish">
  292. <template #default="{ current }">
  293. <view class="flex items-center">
  294. <view> {{ current.minutes }} 分</view>
  295. <view> {{ current.seconds }} 秒</view>
  296. </view>
  297. </template>
  298. </wd-count-down>
  299. 内支付
  300. </view>
  301. <!-- <view class="mt-20rpx text-28rpx text-[#AAAAAA]">
  302. 现在支付:预计10:40-10:55送达
  303. </view> -->
  304. <view class="btn mt-20rpx flex items-center justify-between">
  305. <view class="info-btn mr-20rpx w-226rpx">
  306. <wd-button type="info" @click="handleCancel">
  307. 取消订单
  308. </wd-button>
  309. </view>
  310. <view class="ml-20rpx flex-1">
  311. <wd-button @click="handlePay">
  312. 立即支付¥{{ orderInfo.actualTotal }}
  313. </wd-button>
  314. </view>
  315. </view>
  316. </view>
  317. <view
  318. v-if="orderInfo.hbOrderStatus !== OrderStatus.PaddingPay" class="flex items-center"
  319. @click="handleCollapse"
  320. >
  321. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderAccepted" class="mr-10rpx">
  322. 商家拣货中
  323. </view>
  324. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderWaitDelivery" class="mr-10rpx">
  325. {{ orderInfo.dvyType === 2 ? '订单待自提' : '订单待配送' }}
  326. </view>
  327. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderDelivering" class="mr-10rpx">
  328. 订单配送中
  329. </view>
  330. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancelAudit" class="mr-10rpx">
  331. 订单取消审核
  332. </view>
  333. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancel" class="mr-10rpx">
  334. 订单取消
  335. </view>
  336. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderArrived" class="mr-10rpx">
  337. 订单已送达
  338. </view>
  339. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCompleted" class="mr-10rpx">
  340. 订单已完成
  341. </view>
  342. <view :class="[collapse ? 'rotate-90' : '']">
  343. <wd-icon name="arrow-right" size="22px" />
  344. </view>
  345. </view>
  346. <view v-if="orderInfo.hbOrderStatus === OrderStatus.OrderCancel" class="mt-20rpx text-28rpx text-[#AAAAAA]">
  347. 取消原因:{{ orderInfo.cancelReason }}
  348. </view>
  349. </view>
  350. </view>
  351. <view class="mt-20rpx rounded-16rpx bg-white p-24rpx">
  352. <view v-if="orderInfo.dvyFlowId" class="mb-24rpx text-24rpx">
  353. <view class="mb-20rpx">
  354. {{ orderInfo.dvyName }}
  355. </view>
  356. <view class="text-48rpx font-semibold">
  357. {{ orderInfo.dvyFlowId }}
  358. </view>
  359. </view>
  360. <view class="grid grid-cols-5 text-28rpx text-[#222]">
  361. <view
  362. v-if="orderInfo.hbOrderStatus === OrderStatus.OrderArrived" class="flex flex-col items-center"
  363. @click="handleReceive"
  364. >
  365. <image :src="`${StaticUrl}/orderDetaile-submit-order.png`" class="h-40rpx w-40rpx" />
  366. <view class="mt-40rpx">
  367. 确认收货
  368. </view>
  369. </view>
  370. <view
  371. v-if="[OrderStatus.OrderCancel, OrderStatus.OrderCompleted].includes(Number(orderInfo.hbOrderStatus))"
  372. class="flex flex-col items-center" @click="handelDel"
  373. >
  374. <image :src="`${StaticUrl}/orderDetaile-del.png`" class="h-40rpx w-40rpx" />
  375. <view class="mt-40rpx">
  376. 删除订单
  377. </view>
  378. </view>
  379. <view class="contact relative flex flex-col items-center">
  380. <image :src="`${StaticUrl}/orderDetaile-wx.png`" class="h-40rpx w-40rpx" />
  381. <Zcontact>
  382. <view class="mt-40rpx text-28rpx">
  383. 联系商家
  384. </view>
  385. </Zcontact>
  386. </view>
  387. <view
  388. v-if="!orderInfo?.giftOrder && orderInfo.refundStatus != 2 && [OrderStatus.OrderWaitDelivery, OrderStatus.OrderAccepted].includes(orderInfo.hbOrderStatus)"
  389. class="flex flex-col items-center" @click="handleAfterSale"
  390. >
  391. <image :src="`${StaticUrl}/orderDetaile-shou.png`" class="h-40rpx w-40rpx" />
  392. <view class="mt-40rpx">
  393. 申请售后
  394. </view>
  395. </view>
  396. <!-- <view class="flex flex-col items-center " @click="router.push({ name: 'common-revalue' })">
  397. <image
  398. :src="`${StaticUrl}/orderDetaile-pj.png`"
  399. class="h40rpx w40rpx"
  400. />
  401. <view class="mt40rpx">
  402. 评价晒单
  403. </view>
  404. </view> -->
  405. <!-- <view class="flex flex-col items-center">
  406. <image
  407. :src="`${StaticUrl}/orderDetaile-bao.png`"
  408. class="h40rpx w40rpx"
  409. />
  410. <view class="mt40rpx">
  411. 再次购买
  412. </view>
  413. </view> -->
  414. </view>
  415. </view>
  416. <view v-if="orderInfo?.dvyType === 2" class="mt-20rpx flex flex-col items-center rounded-16rpx bg-white p-24rpx text-center">
  417. <QCode class="mb-20rpx rounded-16rpx" :text="orderInfo?.selfPickCode" :qwidth="80" qr-key="0" />
  418. <view class="text-28rpx font-semibold">
  419. {{ orderInfo?.selfPickCode }}
  420. </view>
  421. <view class="text-28rpx" :class="orderInfo?.isWriteOff === 1 ? '' : 'line-through'">
  422. {{ orderInfo?.isWriteOff === 1 ? '(未核销)' : '(已核销)' }}
  423. </view>
  424. <view class="mt-20rpx text-24rpx text-#AAA">
  425. {{ orderInfo?.completeTime ? `核销时间:${orderInfo?.completeTime}` : '出示该二维码进行核销确认' }}
  426. </view>
  427. </view>
  428. <view v-if="orderInfo?.dvyType === 3" class="mt-20rpx rounded-16rpx bg-white p-24rpx">
  429. <view class="flex items-center">
  430. <i class="iconfont text-40rpx text-[var(--them-color)]">&#xe654;</i>
  431. <!-- <image :src="`${StaticUrl}/orderDetaile-user.png`" class="mr-20rpx h-40rpx w-40rpx" /> -->
  432. <view class="text-32rpx text-[#222] font-semibold">
  433. {{ orderInfo?.consigneeName }} {{ orderInfo?.consigneeMobile }}
  434. </view>
  435. </view>
  436. <view class="mt-20rpx text-28rpx text-[#AAAAAA]">
  437. {{ orderInfo?.consigneeAddress }}
  438. </view>
  439. </view>
  440. <view v-if="orderInfo?.dvyType === 2" class="mt-20rpx rounded-16rpx bg-white p-24rpx">
  441. <view class="flex items-center gap-50rpx">
  442. <view class="flex-1">
  443. <view class="text-28rpx font-semibold">
  444. 自提点:{{ orderInfo?.shopName }}
  445. </view>
  446. <view class="mt-20rpx text-24rpx text-#AAAAAA">
  447. {{ orderInfo?.consigneeAddress }}
  448. </view>
  449. </view>
  450. <view class="flex-shrink-0" @click="openShopLocation">
  451. <wd-icon name="location" size="24px" color="#9ED605" />
  452. </view>
  453. </view>
  454. <view class="mt-20rpx text-26rpx text-#AAA">
  455. <view>联系人:{{ orderInfo?.consigneeName }}</view>
  456. <view class="mt-20rpx">
  457. 预留电话:{{ orderInfo?.consigneeMobile }}
  458. </view>
  459. </view>
  460. </view>
  461. <view class="mt-20rpx rounded-16rpx bg-white p-24rpx">
  462. <view class="flex items-center">
  463. <image :src="`${StaticUrl}/order-icon.png`" class="h-36rpx w-36rpx" />
  464. <view class="ml-20rpx text-32rpx font-semibold">
  465. {{ orderInfo?.shopName }}
  466. </view>
  467. </view>
  468. <view class="my-24rpx h-2rpx w-full bg-[#F0F0F0]" />
  469. <CollapsePanel :line-height="150">
  470. <view v-for="item in orderInfo?.orderItemList" :key="item.skuId" class="mb-20rpx w-full flex items-center">
  471. <view class="mr-20rpx w-120rpx flex-shrink-0">
  472. <image :src="item.pic" class="h-120rpx w-120rpx" />
  473. </view>
  474. <view class="flex-1">
  475. <view class="w-full flex items-center justify-between font-semibold">
  476. <view class="text-28rpx">
  477. <text v-if="orderInfo?.giftOrder" class="mr-8rpx rounded-8rpx bg-#FF4D3A px-12rpx py-4rpx text-22rpx text-#FFF">
  478. 赠品
  479. </text>
  480. {{ item.skuName }}
  481. </view>
  482. <view class="text-32rpx text-[#FF4D3A]">
  483. ¥{{ item.price }}
  484. </view>
  485. </view>
  486. <view class="text-24rpx text-[#AAAAAA]">
  487. 规格:{{ item.spec }}
  488. </view>
  489. <view class="text-24rpx text-[#AAAAAA]">
  490. ×{{ item.prodCount }}
  491. </view>
  492. </view>
  493. </view>
  494. </CollapsePanel>
  495. <view class="mt-24rpx h-2rpx w-full bg-[#F0F0F0]" />
  496. <view class="mt-24rpx flex items-center justify-between">
  497. <view class="text-28rpx">
  498. 商品金额
  499. </view>
  500. <view class="text-[#FF4A39] font-semibold">
  501. ¥{{ orderInfo?.total }}
  502. </view>
  503. </view>
  504. <view v-if="orderInfo.dvyType != 2" class="mt-24rpx flex items-center justify-between">
  505. <view v-if="orderInfo.dvyType == 3" class="text-28rpx">
  506. 配送费(即时配送)
  507. </view>
  508. <view v-if="orderInfo.dvyType == 1" class="text-28rpx">
  509. 快递
  510. </view>
  511. <view class="text-[#FF4A39] font-semibold">
  512. ¥{{ orderInfo?.freightAmount }}
  513. </view>
  514. </view>
  515. <template v-if="!orderInfo?.giftOrder">
  516. <view v-if="orderInfo?.memberDiscountDesc && orderInfo?.memberDiscountAmount" class="mt-24rpx flex items-center justify-between">
  517. <view class="text-28rpx">
  518. {{ orderInfo?.memberDiscountDesc || '-' }}
  519. </view>
  520. <view class="text-[#FF4A39] font-semibold">
  521. -¥{{ orderInfo?.memberDiscountAmount }}
  522. </view>
  523. </view>
  524. <view class="mt-24rpx flex items-center justify-between">
  525. <view class="text-28rpx">
  526. 优惠券
  527. </view>
  528. <view class="text-[#FF4A39] font-semibold">
  529. -¥{{ Number(orderInfo?.couponBaseInfoDTO?.discountMoney) || 0 }}
  530. </view>
  531. </view>
  532. <view v-if="orderInfo.refundOrderList && orderInfo.refundOrderList.some((it) => it.refundOrderStatus == 1) " class="mt10rpx rounded-16rpx bg-#ccc p24rpx text-24rpx">
  533. <view v-if="orderInfo?.isAll">
  534. 已退还优惠券:{{ orderInfo.couponBaseInfoDTO?.activityName }}
  535. <view>优惠券已退回您的账户,可在“我的-优惠券”中查看</view>
  536. </view>
  537. <view v-else>
  538. 注:部分退款不退还优惠券
  539. </view>
  540. </view>
  541. <view class="mt-24rpx flex items-center justify-between">
  542. <view class="text-28rpx">
  543. 积分
  544. </view>
  545. <view class="text-[#FF4A39] font-semibold">
  546. -¥{{ Number(orderInfo?.offsetPoints) / 100 }}
  547. </view>
  548. </view>
  549. </template>
  550. <view class="my-24rpx h-2rpx w-full bg-[#F0F0F0]" />
  551. <view class="flex items-center justify-end">
  552. <view class="text-28rpx">
  553. 总计{{ orderInfo.orderMoney }} 共减 {{ Number(orderInfo.offsetPoints) / 100 + (Number(orderInfo.couponBaseInfoDTO?.discountMoney) || 0) }}
  554. </view>
  555. <view class="ml-20rpx text-28rpx text-[#FF4D3A] font-semibold">
  556. {{ [OrderStatus.PaddingPay, OrderStatus.OrderCancel].includes(Number(orderInfo.hbOrderStatus)) ? '需' : '实'
  557. }}付款¥{{
  558. orderInfo.actualTotal }}
  559. </view>
  560. </view>
  561. </view>
  562. <view v-if="orderInfo.refundOrderList" class="mt-20rpx rounded-16rpx bg-white p-24rpx">
  563. <view v-for="item in orderInfo.refundOrderList" :key="item.createTime" class="mb10rpx" @click="handleRefundDetail(item)">
  564. <view class="flex items-center justify-between">
  565. <view>{{ item.refundName }} </view>
  566. <view class="flex items-center">
  567. <view>查看详情</view>
  568. <wd-icon name="arrow-right" size="22px" />
  569. </view>
  570. </view>
  571. <view class="mt10rpx flex items-center text-24rpx text-#AAA">
  572. <view>
  573. {{ refundStatus[Number(item.refundOrderStatus)] }}
  574. </view>
  575. <view v-if="[1, 2].includes(Number(item.refundOrderStatus))" class="ml-10rpx">
  576. 退款金额: {{ item.refundMoney }} 元
  577. </view>
  578. </view>
  579. </view>
  580. </view>
  581. <view v-if="orderInfo?.giftOrder" class="mt20rpx flex items-center gap-20rpx rounded-16rpx bg-white p24rpx">
  582. <wd-icon name="warning" size="16px" color="#FF4D3A" />
  583. <text class="text-24rpx">
  584. 本商品为会员权益赠品,购买后不支持售后
  585. </text>
  586. </view>
  587. <view class="mt-20rpx rounded-16rpx bg-white p-24rpx">
  588. <view class="mb-24rpx text-28rpx font-semibold">
  589. 订单信息
  590. </view>
  591. <view class="pb-20rpx">
  592. <view class="mb-28rpx flex items-center justify-between">
  593. <view class="text-28rpx text-[#AAAAAA]">
  594. 订单编号
  595. </view>
  596. <view class="flex items-center">
  597. <text class="text-[#222]">
  598. {{ orderInfo?.orderNumber }}
  599. </text>
  600. <view class="ml-10rpx" @click="handleCopy">
  601. <wd-icon name="file-copy" size="22px" />
  602. </view>
  603. </view>
  604. </view>
  605. <view class="mb-28rpx flex items-center justify-between">
  606. <view class="text-28rpx text-[#AAAAAA]">
  607. 支付方式
  608. </view>
  609. <view class="text-[#222]">
  610. 微信支付
  611. </view>
  612. </view>
  613. <view class="mb-28rpx flex items-center justify-between">
  614. <view class="text-28rpx text-[#AAAAAA]">
  615. 下单时间
  616. </view>
  617. <view class="text-[#222]">
  618. {{ orderInfo?.createTime }}
  619. </view>
  620. </view>
  621. <view class="mb-28rpx flex items-center justify-between">
  622. <view class="text-28rpx text-[#AAAAAA]">
  623. 备注信息
  624. </view>
  625. <view class="text-[#222]">
  626. {{ orderInfo?.remarks || '无' }}
  627. </view>
  628. </view>
  629. </view>
  630. </view>
  631. <view class="h-80rpx" />
  632. </view>
  633. <Zpopup v-model="showNode" :showfooter="false">
  634. <view class="p-24rpx">
  635. <view class="text-center text-32rpx font-semibold">
  636. 订单追踪
  637. </view>
  638. <wd-steps :active="0" vertical dot>
  639. <wd-step v-for="item in NodeList" :key="item.id">
  640. <template #title>
  641. {{ item.content }}
  642. </template>
  643. <template #description>
  644. {{ item.createTime }}
  645. </template>
  646. </wd-step>
  647. </wd-steps>
  648. </view>
  649. </Zpopup>
  650. </view>
  651. </template>
  652. <style scoped lang="scss">
  653. .page-xsb {
  654. :deep() {
  655. .info-btn .wd-button {
  656. background: #fff !important;
  657. color: #aaa !important;
  658. }
  659. .btn .wd-button {
  660. width: 100% !important;
  661. }
  662. .wd-count-down {
  663. color: #FF4D3A !important;
  664. font-size: 36rpx !important;
  665. }
  666. .contact .wd-button {
  667. font-size: 28rpx !important;
  668. height: 40rpx !important;
  669. padding: 0 !important;
  670. margin-top: 40rpx !important;
  671. }
  672. }
  673. }
  674. </style>