建材商城系统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.

556 lines
14 KiB

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