details.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572
  1. <template>
  2. <view class="check">
  3. <view class="top">
  4. </view>
  5. <view class="head">
  6. <span class="cuIcon-back" @click="back"></span>
  7. <view class="case">
  8. 订单详情
  9. </view>
  10. </view>
  11. <view class="content">
  12. <view class="status">
  13. <view class="status_title">
  14. {{product.state}} <span v-if="product.differenceMinutes>0 && product.state == '待支付'">, 剩余</span>
  15. <u-count-down :timestamp="product.differenceMinutes*60" :show-days="false" font-size="36rpx" @end="getDetail"
  16. v-if="product.differenceMinutes>0 && product.state == '待支付'"></u-count-down>
  17. <!-- <span>¥{{product.costPrice}}</span> -->
  18. </view>
  19. <view class="span" v-if="product.state == '待支付'">
  20. 订单已取消
  21. </view>
  22. <view class="span" v-if="product.state == '待使用'">
  23. 等待客户到店核销
  24. </view>
  25. <view class="span" v-if="product.state == '已完成'">
  26. 客户已到店核销
  27. </view>
  28. <view class="span" v-if="product.state == '已失效'">
  29. 该订单已失效
  30. </view>
  31. </view>
  32. <view class="refund" @click="cutPopup" v-if="product.refundType == 1">
  33. 退款去向详情
  34. </view>
  35. <view class="product" v-if="product.categoryId != 1945013773786701826">
  36. <view class="title">
  37. 商品信息
  38. </view>
  39. <view class="center">
  40. <view class="img">
  41. <image :src="product.productImage" mode=""></image>
  42. </view>
  43. <view class="name">
  44. {{product.productName}}
  45. <view class="price">
  46. ¥{{product.costPrice}}/份
  47. <span>实付款:¥ {{product.orderPrice}}</span>
  48. </view>
  49. </view>
  50. </view>
  51. </view>
  52. <view class="product" v-if="product.categoryId == 1945013773786701826">
  53. <view class="title" v-if="product.categoryId != 1945013773786701826">
  54. 商品信息
  55. </view>
  56. <view class="center"
  57. v-for="(specitem, specIndex) in product.productsLinkCategorySpecItems.slice(0,isShow ? product.productsLinkCategorySpecItems.length : 2)"
  58. :key="specIndex">
  59. <view class="img">
  60. <image :src="product.productImage" mode=""></image>
  61. </view>
  62. <view class="spec_item">
  63. <view class="top">
  64. {{product.productName}}
  65. </view>
  66. <view class="spec_content">
  67. <view class="left">
  68. <view class="cventer">
  69. {{specitem.partName}} {{specitem.positionName}}
  70. </view>
  71. <view class="foot">
  72. {{specitem.craftName}}
  73. </view>
  74. </view>
  75. <view class="right">
  76. <span style="font-size: 22rpx;color: #FD4912;">¥{{specitem.soldPrice}}</span>
  77. <span style="text-decoration: line-through;font-size: 18rpx;color: #999999;">¥{{specitem.price}}</span>
  78. </view>
  79. </view>
  80. </view>
  81. </view>
  82. <view class="is_show" @click.stop="unfold" v-if="product.productsLinkCategorySpecItems.length > 2">
  83. {{isShow?'收起查看':'展开查看'}}
  84. <image src="/static/order/hidden.png" mode="" v-if="isShow"></image>
  85. <image src="/static/order/show.png" mode="" v-else></image>
  86. </view>
  87. <view class="all_price" v-if="product.categoryId == 1945013773786701826">
  88. <span style="font-size: 22rpx;color: #FD4912;margin-right: 10rpx;">¥已优惠{{product.couponPrice}}</span>
  89. <span style="font-size: 26rpx;color: #FD4912;"><text
  90. style="font-size: 22rpx;">¥</text>{{product.orderPrice}}</span>
  91. </view>
  92. </view>
  93. <view class="product" v-if="product.orderType ==4">
  94. <view class="title">
  95. 订单信息
  96. </view>
  97. <view class="data">
  98. <span>订单号 :</span>
  99. {{product.orderId?product.orderId:'--'}}
  100. </view>
  101. <view class="data">
  102. <span>下单时间:</span>
  103. {{product.buyTime?product.buyTime:'--'}}
  104. </view>
  105. <view class="data">
  106. <span>联系方式:</span>
  107. {{product.phone?product.phone:'--'}}
  108. </view>
  109. <view class="data">
  110. <span >付款时间:</span>
  111. {{product.payTime?product.payTime:'--'}}
  112. </view>
  113. </view>
  114. <view class="product" v-else>
  115. <view class="title negotiate" v-if="product.auditType">
  116. 协商历史
  117. <view class="look" @click="goRecord">
  118. 查看详情
  119. </view>
  120. </view>
  121. <view class="title">
  122. 订单信息
  123. </view>
  124. <view class="data">
  125. <span>订单号:</span>
  126. {{product.orderId?product.orderId:'--'}}
  127. </view>
  128. <view class="data">
  129. <span>支付流水号:</span>
  130. {{product.tradeId?product.tradeId:'--'}}
  131. </view>
  132. <view class="data">
  133. <span>提交人:</span>
  134. {{product.linkName?product.linkName:'--'}}
  135. </view>
  136. <view class="data">
  137. <span>联系电话:</span>
  138. {{product.phone?product.phone:'--'}}
  139. </view>
  140. <view class="data">
  141. <span>下单时间:</span>
  142. {{product.buyTime?product.buyTime:'--'}}
  143. </view>
  144. <view class="data">
  145. <span>付款时间:</span>
  146. {{product.payTime?product.payTime:'--'}}
  147. </view>
  148. <view class="data">
  149. <span>使用时间:</span>
  150. {{product.useTime?product.useTime:'--'}}
  151. </view>
  152. </view>
  153. </view>
  154. <view class="popup" v-if="isDetail" @click.stop="isDetail = false">
  155. <view class="content">
  156. <view class="title">
  157. <span>退款去向详情</span>
  158. <image src="/static/index/cut.png" alt="" @click="cutPopup" />
  159. </view>
  160. <view class="detail">
  161. <view class="amount">
  162. 实退金额
  163. <view class="money">
  164. <span>¥</span>{{product.refundPrice}}
  165. </view>
  166. </view>
  167. <view class="text">
  168. 退款已成功到账
  169. </view>
  170. <view class="fund">
  171. 实退金额
  172. <span>¥{{product.refundPrice}}</span>
  173. </view>
  174. <view class="card">
  175. 原路返回,退款单号:{{product.refundNo}}
  176. </view>
  177. <view class="card">
  178. {{product.refundTime}}
  179. </view>
  180. </view>
  181. </view>
  182. </view>
  183. </view>
  184. </template>
  185. <script>
  186. export default {
  187. data() {
  188. return {
  189. orderId: '',
  190. product: {},
  191. isDetail: false,
  192. timestamp: 10000,
  193. isShow: false
  194. }
  195. },
  196. methods: {
  197. //返回
  198. back() {
  199. uni.navigateBack({
  200. delta: 1
  201. });
  202. },
  203. getDetail() {
  204. this.$http.get("/app/order/locaOrder/queryById?orderId=" + this.orderId, ).then(res => {
  205. if (res.data.code == 200) {
  206. console.log(res)
  207. this.product = res.data.result
  208. }
  209. })
  210. },
  211. //展开/收起查看钣金喷漆子选项
  212. unfold(index) {
  213. this.isShow = !this.isShow
  214. this.$forceUpdate();
  215. },
  216. goRecord() {
  217. uni.navigateTo({
  218. url: '/pages/order/record?orderId=' + this.product.orderId
  219. })
  220. },
  221. cutPopup() {
  222. this.isDetail = !this.isDetail
  223. },
  224. refundDetail() {
  225. this.isDetail = true
  226. },
  227. //获取退款去向
  228. getRefund() {
  229. this.$http.get("/app/order/locaOrder/refundDestination?reOrderId=" + this.orderNo).then(res => {
  230. if (res.data.code == 200) {
  231. console.log(res)
  232. // this.list = res.data.result
  233. }
  234. })
  235. }
  236. },
  237. onLoad(option) {
  238. this.orderId = option.orderId
  239. },
  240. mounted() {
  241. this.getDetail()
  242. }
  243. }
  244. </script>
  245. <style lang="scss" scoped>
  246. .check {
  247. width: 100vw;
  248. height: 100vh;
  249. background: #F7F8FC;
  250. display: flex;
  251. flex-direction: column;
  252. overflow: hidden;
  253. /*#ifdef APP-PLUS*/
  254. .top {
  255. width: 100%;
  256. height: var(--status-bar-height);
  257. background: linear-gradient(87deg, #E2F4F8 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
  258. }
  259. /*#endif*/
  260. .head {
  261. width: 100%;
  262. height: 112rpx;
  263. padding: 20rpx;
  264. display: flex;
  265. align-items: center;
  266. background: linear-gradient(87deg, #E2F4F8 0%, #A3CDFF 100%), linear-gradient(360deg, #FFFFFF 0%, rgba(255, 255, 255, 0) 100%);
  267. position: relative;
  268. .cuIcon-back {
  269. font-size: 40rpx;
  270. margin-right: 40rpx;
  271. }
  272. .case {
  273. position: absolute;
  274. left: 50%;
  275. transform: translateX(-50%);
  276. font-size: 36rpx;
  277. font-weight: 600;
  278. }
  279. }
  280. .content {
  281. padding: 24rpx;
  282. flex: 1;
  283. overflow-y: auto;
  284. .status {
  285. font-size: 44rpx;
  286. padding: 0px 20rpx;
  287. color: #333333;
  288. .status_title {
  289. display: flex;
  290. align-items: end;
  291. // justify-content: space-between;
  292. margin-bottom: 15rpx;
  293. font-size: 36rpx;
  294. font-weight: 600;
  295. }
  296. .span {
  297. font-size: 28rpx;
  298. color: #999999;
  299. line-height: 33rpx;
  300. font-size: 24rpx;
  301. color: #333333;
  302. font-weight: 500;
  303. }
  304. }
  305. .refund {
  306. width: 632rpx;
  307. height: 76rpx;
  308. border-radius: 12rpx;
  309. border: 1px solid #000000;
  310. display: flex;
  311. align-items: center;
  312. justify-content: center;
  313. margin: 24rpx auto;
  314. }
  315. .product {
  316. width: 100%;
  317. margin-top: 24rpx;
  318. background: #FFFFFF;
  319. box-shadow: 0px 2px 8px 0px rgba(214, 225, 237, 0.1);
  320. border-radius: 16px;
  321. padding: 20rpx;
  322. .title {
  323. font-size: 32rpx;
  324. color: #333333;
  325. }
  326. .negotiate {
  327. display: flex;
  328. justify-content: space-between;
  329. align-items: center;
  330. margin-bottom: 24rpx;
  331. .look {
  332. width: 152rpx;
  333. height: 50rpx;
  334. background: rgba(68, 154, 255, 0.05);
  335. border-radius: 8rpx;
  336. border: 1px solid #449AFF;
  337. display: flex;
  338. justify-content: center;
  339. align-items: center;
  340. font-size: 26rpx;
  341. color: #449AFF;
  342. }
  343. }
  344. .center {
  345. width: 100%;
  346. display: flex;
  347. border-radius: 16rpx;
  348. margin-bottom: 20rpx;
  349. .img {
  350. width: 132rpx;
  351. height: 132rpx;
  352. border-radius: 12rpx;
  353. overflow: hidden;
  354. margin-right: 16rpx;
  355. image {
  356. width: 132rpx;
  357. height: 132rpx;
  358. }
  359. }
  360. .name {
  361. flex: 1;
  362. display: flex;
  363. flex-direction: column;
  364. justify-content: space-between;
  365. font-size: 30rpx;
  366. color: #000000;
  367. line-height: 35rpx;
  368. font-weight: 600;
  369. .price {
  370. font-size: 24rpx;
  371. display: flex;
  372. align-items: center;
  373. justify-content: space-between;
  374. color: #FF6A42;
  375. span {
  376. color: #666666;
  377. }
  378. }
  379. }
  380. .spec_item {
  381. flex: 1;
  382. margin-left: 20rpx;
  383. display: flex;
  384. flex-direction: column;
  385. justify-content: space-between;
  386. .top {
  387. font-size: 26rpx;
  388. height: 38rpx;
  389. color: #000000;
  390. margin-bottom: 6rpx;
  391. }
  392. }
  393. .spec_content {
  394. width: 100%;
  395. flex: 1;
  396. display: flex;
  397. justify-content: space-between;
  398. padding-top: 15rpx;
  399. .left {
  400. display: flex;
  401. flex-direction: column;
  402. justify-content: space-between;
  403. font-size: 22rpx;
  404. color: #333333;
  405. }
  406. .right {
  407. text-align: right;
  408. display: flex;
  409. flex-direction: column;
  410. justify-content: space-between;
  411. }
  412. }
  413. }
  414. .data {
  415. width: 100%;
  416. height: 38rpx;
  417. display: flex;
  418. align-items: center;
  419. // justify-content: space-between;
  420. margin-top: 20rpx;
  421. margin-bottom: 12rpx;
  422. font-size: 26rpx;
  423. color: #333333;
  424. span {
  425. display: block;
  426. width: 156rpx;
  427. height: 38rpx;
  428. font-size: 26rpx;
  429. color: #666666;
  430. margin-right: 16rpx;
  431. }
  432. }
  433. }
  434. }
  435. .is_show {
  436. display: flex;
  437. align-items: center;
  438. justify-content: center;
  439. font-size: 24rpx;
  440. color: #2D88F4;
  441. image {
  442. width: 20rpx;
  443. height: 20rpx;
  444. margin-left: 10rpx;
  445. }
  446. }
  447. .all_price {
  448. display: flex;
  449. align-items: center;
  450. justify-content: end;
  451. padding-top: 20rpx;
  452. border-top: 1px solid #EEEEEE;
  453. margin-top: 20rpx;
  454. }
  455. .popup {
  456. width: 100vw;
  457. height: 100vh;
  458. position: fixed;
  459. top: 0;
  460. left: 0;
  461. background: rgba(0, 0, 0, 0.4);
  462. .content {
  463. width: 100%;
  464. background: #FFFFFF;
  465. border-radius: 20rpx 20rpx 0rpx 0px;
  466. padding: 20rpx 24rpx;
  467. padding-bottom: 16rpx;
  468. position: absolute;
  469. bottom: 0;
  470. left: 0;
  471. .title {
  472. display: flex;
  473. align-items: center;
  474. justify-content: center;
  475. position: relative;
  476. border-bottom: 1px solid #EEEEEE;
  477. padding-bottom: 20rpx;
  478. font-weight: 600;
  479. image {
  480. width: 37rpx;
  481. height: 37rpx;
  482. position: absolute;
  483. right: 0;
  484. }
  485. }
  486. .detail {
  487. padding: 20rpx;
  488. border-radius: 12rpx;
  489. background-color: #F7F8FC;
  490. margin-top: 24rpx;
  491. .amount {
  492. display: flex;
  493. align-items: center;
  494. justify-content: space-between;
  495. font-weight: 600;
  496. .money {
  497. font-size: 28rpx;
  498. color: #FD4912;
  499. span {
  500. font-size: 16rpx
  501. }
  502. }
  503. }
  504. .text {
  505. font-size: 26rpx;
  506. color: #666666;
  507. margin-top: 12rpx;
  508. border-bottom: 1px solid #EEEEEE;
  509. padding-bottom: 16rpx;
  510. }
  511. .fund {
  512. font-size: 28rpx;
  513. color: #333333;
  514. display: flex;
  515. align-items: center;
  516. justify-content: space-between;
  517. margin-top: 16rpx;
  518. }
  519. .card {
  520. font-size: 26rpx;
  521. color: #666666;
  522. margin-top: 12rpx;
  523. }
  524. }
  525. }
  526. }
  527. }
  528. </style>