建材商城系统20241014
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

569 lines
14 KiB

7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
7 months ago
  1. <template>
  2. <view>
  3. <navbar title="订单详情" bgColor="#DC2828" color="#fff" leftClick @leftClick="$utils.navigateBack" />
  4. <!-- 水洗店 -->
  5. <view class="">
  6. <view class="controls">
  7. <view class="title">
  8. <image src="../static/order/icon.png" mode=""></image>
  9. 服务完成
  10. </view>
  11. <view class="tips">
  12. {{ tabs[order.status].name }}
  13. </view>
  14. <view class="steps" v-if="order.status != 3">
  15. <uv-steps activeColor="#FD5100" :current="stepsCurrent" dot>
  16. <uv-steps-item :title="item" :key="index" v-for="(item, index) in steps"></uv-steps-item>
  17. </uv-steps>
  18. </view>
  19. <view class="btns">
  20. <view class="btn2" v-if="order.status == 0"
  21. @click.stop="toPayOrder(order)"
  22. >
  23. 立即支付
  24. </view>
  25. <view class="btn2" v-if="order.status == 1"
  26. @click.stop="confirmOrder(order)"
  27. >
  28. 确认收货
  29. </view>
  30. <view class="btn1" v-if="order.status == 0"
  31. @click.stop="cancelOrder(order)"
  32. >
  33. 取消订单
  34. </view>
  35. </view>
  36. </view>
  37. </view>
  38. <!-- 酒店和水洗店 -->
  39. <view class="info">
  40. <view class="flex" style="display: flex;">
  41. <view style="width: 8rpx;height: 30rpx;
  42. background: #FD5100;border-radius: 6rpx;" />
  43. <view class="head-title">产品</view>
  44. </view>
  45. <view class="flex">
  46. <view class="server-item"
  47. v-for="(shop, i) in order.children"
  48. :key="i">
  49. <view class="img-box">
  50. <image :src="shop.image && shop.image.split(',')[0]" mode="aspectFill"></image>
  51. </view>
  52. <view class="server-info">
  53. <view class="server-title">
  54. {{ shop.title }}
  55. <!-- <view class="coupon">领券立减</view> -->
  56. </view>
  57. <view class="current-price">
  58. 价格<text class="unit"></text>{{ shop.price }}
  59. </view>
  60. <view class="sales-volume" style="margin-top: 5px;">
  61. <view class="desc">产品材质{{ shop.material }}</view>
  62. </view>
  63. <view class="sales-volume" style="margin-top: 5px;">
  64. <view class="desc">产品数量{{ shop.num }}</view>
  65. </view>
  66. </view>
  67. </view>
  68. </view>
  69. <view class="line address">
  70. <view class="address-top">
  71. <view class="">
  72. 地址信息
  73. </view>
  74. <view class="copy">
  75. <image @click="$utils.copyText('1')" src="../static/order/copy.png"></image>
  76. </view>
  77. </view>
  78. <view class="addressDetail">
  79. <view class="">{{ order.name }} {{ order.phone }}</view>
  80. <view class="">{{ order.address }}</view>
  81. </view>
  82. </view>
  83. <!-- <view class="line">
  84. <view class="t min_tips">
  85. <view class="">
  86. 实付款
  87. </view>
  88. <view class="current-price">
  89. {{ order.money }}
  90. </view>
  91. </view>
  92. <view class="min_tips">
  93. <view class="">
  94. 租赁费用
  95. </view>
  96. <view class="">
  97. {{ order.price }}
  98. </view>
  99. </view>
  100. <view class="min_tips">
  101. <view class="">
  102. 水洗费用
  103. </view>
  104. <view class="">
  105. {{ order.price}}
  106. </view>
  107. </view>
  108. <view class="min_tips">
  109. <view class="">
  110. 押金
  111. </view>
  112. <view class="">
  113. {{ order.price }}
  114. </view>
  115. </view>
  116. </view> -->
  117. <!-- 订单信息 -->
  118. <view class="line">
  119. <view class="t min_tips">
  120. <view class="">
  121. 订单信息
  122. </view>
  123. </view>
  124. <view class="min_tips">
  125. <view class="">
  126. 总金额
  127. </view>
  128. <view class="">
  129. {{ order.price }}
  130. </view>
  131. </view>
  132. <view class="min_tips">
  133. <view class="">
  134. 订单编号
  135. </view>
  136. <view class="">
  137. {{ order.id }}
  138. </view>
  139. </view>
  140. <view class="min_tips">
  141. <view class="">
  142. 下单时间
  143. </view>
  144. <view class="">
  145. {{ order.createTime }}
  146. </view>
  147. </view>
  148. </view>
  149. <!-- 下单须知 -->
  150. <view class="line">
  151. <!-- <view class="t min_tips">
  152. <view class="">
  153. 下单须知
  154. </view>
  155. </view>
  156. <view class="min_tips" style="line-height: 40rpx;">
  157. {{ order.projectExplain }}
  158. </view> -->
  159. <!-- <view class="btns">
  160. <view @click="clickService" class="btn">
  161. 联系客服
  162. </view>
  163. </view> -->
  164. </view>
  165. </view>
  166. <kefu></kefu>
  167. <!-- 联系客服弹框 -->
  168. <customerServicePopup ref="customerServicePopup" />
  169. </view>
  170. </template>
  171. <script>
  172. import customerServicePopup from "@/components/config/customerServicePopup.vue";
  173. import { mapGetters } from 'vuex'
  174. import orderMixin from '@/mixins/order.js'
  175. export default {
  176. mixins: [orderMixin],
  177. computed: {
  178. ...mapGetters(['userShop']),
  179. },
  180. components: {
  181. customerServicePopup
  182. },
  183. data() {
  184. return {
  185. stepsCurrent: 0,
  186. steps: [
  187. '付款',
  188. '配送',
  189. '完成',
  190. ],
  191. tabs: [
  192. {
  193. name: '待付款'
  194. },
  195. {
  196. name: '配送中'
  197. },
  198. {
  199. name: '已完成'
  200. },
  201. {
  202. name: '已取消'
  203. }
  204. ],
  205. order: {},
  206. id: '',
  207. }
  208. },
  209. onLoad(options) {
  210. this.id = options.id
  211. this.getData()
  212. },
  213. methods: {
  214. getData() {
  215. this.$api('getOrderInfoById', {
  216. orderId : this.id
  217. }, res => {
  218. this.order = res.result;
  219. this.stepsCurrent = this.order.status;
  220. })
  221. },
  222. // 联系客服
  223. clickService() {
  224. this.$refs.customerServicePopup.open();
  225. },
  226. }
  227. }
  228. </script>
  229. <style scoped lang="scss">
  230. .order {
  231. background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
  232. padding-bottom: 10px;
  233. }
  234. .controls {
  235. margin: 20rpx;
  236. background-color: #fff;
  237. // height: 400rpx;
  238. display: flex;
  239. flex-direction: column;
  240. // width: 710rpx;
  241. border-radius: 20rpx;
  242. justify-content: center;
  243. align-items: center;
  244. padding: 20rpx;
  245. .title {
  246. display: flex;
  247. justify-content: center;
  248. align-items: center;
  249. font-size: 32rpx;
  250. image {
  251. width: 80rpx;
  252. height: 80rpx;
  253. margin-right: 20rpx;
  254. }
  255. }
  256. .tips {
  257. font-size: 26rpx;
  258. color: #FD5100;
  259. margin-top: 10rpx;
  260. }
  261. .steps {
  262. height: 60rpx;
  263. }
  264. .btns {
  265. // margin-top: 50rpx;
  266. display: flex;
  267. view {
  268. font-size: 26rpx;
  269. margin: 0 20rpx;
  270. display: flex;
  271. justify-content: center;
  272. align-items: center;
  273. color: #fff;
  274. background-color: $uni-color;
  275. padding: 15rpx 40rpx;
  276. border-radius: 40rpx;
  277. }
  278. .btn1 {
  279. background-color: rgba($color: $uni-color, $alpha: 0.2);
  280. border: 1px solid $uni-color;
  281. color: $uni-color;
  282. }
  283. }
  284. }
  285. .steps {
  286. margin: 20rpx;
  287. background-color: #fff;
  288. display: flex;
  289. flex-direction: column;
  290. width: 710rpx;
  291. border-radius: 20rpx;
  292. padding: 70rpx 0;
  293. /deep/ .uv-text__value {
  294. font-size: 22rpx !important;
  295. }
  296. }
  297. .box {
  298. padding: 20px;
  299. .btns {
  300. display: flex;
  301. justify-content: center;
  302. align-items: center;
  303. margin-top: 10px;
  304. .btn {
  305. color: #fff;
  306. padding: 10rpx 50rpx;
  307. background-color: #ffb300;
  308. border-radius: 30rpx;
  309. font-size: 25rpx;
  310. margin-right: 10rpx;
  311. }
  312. .btc {
  313. background: #ccc;
  314. }
  315. }
  316. }
  317. .info {
  318. margin: 10px;
  319. padding: 20rpx;
  320. background-color: #fff;
  321. width: calc(100% - 40px);
  322. border-radius: 10px;
  323. .head-title {
  324. font-family: PingFang SC, PingFang SC-Bold;
  325. color: #2f2e2e;
  326. line-height: 30rpx;
  327. margin-left: 10rpx;
  328. }
  329. .server-item {
  330. display: flex;
  331. flex-wrap: wrap;
  332. align-items: center;
  333. justify-content: space-between;
  334. background: white;
  335. border-radius: 15rpx;
  336. box-sizing: border-box;
  337. margin: 20rpx 0rpx;
  338. width: 100%;
  339. .img-box {
  340. width: 150rpx;
  341. height: 150rpx;
  342. border-radius: 10rpx;
  343. overflow: hidden;
  344. image {
  345. width: 100%;
  346. height: 100%;
  347. }
  348. }
  349. .server-info {
  350. display: flex;
  351. flex-direction: column;
  352. justify-content: space-around;
  353. width: calc(100% - 180rpx);
  354. box-sizing: border-box;
  355. padding: 10rpx 15rpx;
  356. .server-title {
  357. display: flex;
  358. margin-bottom: 10rpx;
  359. }
  360. .coupon {
  361. display: flex;
  362. justify-content: center;
  363. align-items: center;
  364. background: #F29E45;
  365. color: white;
  366. width: 120rpx;
  367. height: 40rpx;
  368. border-radius: 10rpx;
  369. margin-left: 10rpx;
  370. font-size: 22rpx;
  371. }
  372. .time-coupon,
  373. .price {
  374. display: flex;
  375. flex-wrap: wrap;
  376. align-items: center;
  377. }
  378. .time-coupon {
  379. margin: 10rpx 0rpx;
  380. font-size: 26rpx;
  381. justify-content: space-between;
  382. width: 100%;
  383. .flex {
  384. justify-content: center;
  385. align-items: center;
  386. }
  387. image {
  388. width: 25rpx;
  389. height: 25rpx;
  390. }
  391. .time {
  392. color: #B8B8B8;
  393. margin-left: 6rpx;
  394. }
  395. }
  396. .sales-volume {
  397. display: flex;
  398. align-items: center;
  399. color: #B8B8B8;
  400. font-size: 24rpx;
  401. image {
  402. width: 25rpx;
  403. height: 25rpx;
  404. }
  405. }
  406. }
  407. }
  408. .address {
  409. .address-top {
  410. display: flex;
  411. justify-content: space-between;
  412. align-items: center;
  413. image {
  414. width: 30rpx;
  415. height: 30rpx;
  416. }
  417. }
  418. .addressDetail {
  419. color: #777;
  420. font-size: 28rpx;
  421. padding: 5px 0;
  422. }
  423. text {
  424. background-color: #F29E45;
  425. padding: 8rpx 10rpx;
  426. color: #fff;
  427. font-size: 20rpx;
  428. margin-left: 10px;
  429. border-radius: 5px;
  430. }
  431. }
  432. .min_tips {
  433. font-size: 22rpx;
  434. color: #777;
  435. display: flex;
  436. justify-content: space-between;
  437. padding: 5px 0;
  438. align-items: center;
  439. }
  440. .current-price {
  441. font-size: 27rpx;
  442. color: #FD5100;
  443. }
  444. .line {
  445. border-top: 2px dotted #00000011;
  446. padding: 20rpx 0;
  447. .t {
  448. padding: 5px 0;
  449. color: #000;
  450. font-size: 26rpx;
  451. }
  452. }
  453. .head-div {
  454. .nickname {
  455. font-size: 30rpx;
  456. font-weight: 600;
  457. text-align: left;
  458. line-height: 42rpx;
  459. display: flex;
  460. align-items: center;
  461. .tag {
  462. position: relative;
  463. display: flex;
  464. align-items: center;
  465. image {
  466. height: 45rpx;
  467. width: 90rpx;
  468. vertical-align: middle;
  469. }
  470. .auth {
  471. position: absolute;
  472. white-space: nowrap;
  473. color: #FF6200;
  474. left: 23rpx;
  475. font-size: 17rpx;
  476. }
  477. }
  478. }
  479. .days {
  480. font-size: 20rpx;
  481. font-weight: 400;
  482. text-align: left;
  483. line-height: 56rpx;
  484. display: flex;
  485. align-items: center;
  486. view {
  487. padding-left: 5px;
  488. }
  489. }
  490. }
  491. .btns {
  492. display: flex;
  493. justify-content: center;
  494. .btn {
  495. color: $uni-color;
  496. border: 1px solid $uni-color;
  497. padding: 10rpx 20rpx;
  498. border-radius: 30rpx;
  499. }
  500. }
  501. }
  502. </style>