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

576 lines
14 KiB

8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 months ago
8 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 == 2"
  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. <quick-order-entry
  168. ref="quickOrderEntry"
  169. />
  170. <!-- 联系客服弹框 -->
  171. <customerServicePopup ref="customerServicePopup" />
  172. </view>
  173. </template>
  174. <script>
  175. import customerServicePopup from "@/components/config/customerServicePopup.vue";
  176. import { mapGetters } from 'vuex'
  177. import orderMixin from '@/mixins/order.js'
  178. export default {
  179. mixins: [orderMixin],
  180. computed: {
  181. ...mapGetters(['userShop']),
  182. },
  183. components: {
  184. customerServicePopup
  185. },
  186. data() {
  187. return {
  188. stepsCurrent: 0,
  189. steps: [
  190. '付款',
  191. '配送',
  192. '完成',
  193. ],
  194. tabs: [
  195. {
  196. name: '待付款'
  197. },
  198. {
  199. name: '已付款'
  200. },
  201. {
  202. name: '配送中'
  203. },
  204. {
  205. name: '已完成'
  206. },
  207. {
  208. name: '已取消'
  209. }
  210. ],
  211. order: {},
  212. id: '',
  213. }
  214. },
  215. onLoad(options) {
  216. this.id = options.id
  217. this.getData()
  218. },
  219. methods: {
  220. getData() {
  221. this.$api('getOrderInfoById', {
  222. orderId : this.id
  223. }, res => {
  224. this.order = res.result;
  225. this.stepsCurrent = this.order.status;
  226. })
  227. },
  228. // 联系客服
  229. clickService() {
  230. this.$refs.customerServicePopup.open();
  231. },
  232. }
  233. }
  234. </script>
  235. <style scoped lang="scss">
  236. .order {
  237. background: linear-gradient(#4899a6, #6fc6ad, #6fc6ad);
  238. padding-bottom: 10px;
  239. }
  240. .controls {
  241. margin: 20rpx;
  242. background-color: #fff;
  243. // height: 400rpx;
  244. display: flex;
  245. flex-direction: column;
  246. // width: 710rpx;
  247. border-radius: 20rpx;
  248. justify-content: center;
  249. align-items: center;
  250. padding: 20rpx;
  251. .title {
  252. display: flex;
  253. justify-content: center;
  254. align-items: center;
  255. font-size: 32rpx;
  256. image {
  257. width: 80rpx;
  258. height: 80rpx;
  259. margin-right: 20rpx;
  260. }
  261. }
  262. .tips {
  263. font-size: 26rpx;
  264. color: #FD5100;
  265. margin-top: 10rpx;
  266. }
  267. .steps {
  268. height: 60rpx;
  269. }
  270. .btns {
  271. // margin-top: 50rpx;
  272. display: flex;
  273. view {
  274. font-size: 26rpx;
  275. margin: 0 20rpx;
  276. display: flex;
  277. justify-content: center;
  278. align-items: center;
  279. color: #fff;
  280. background-color: $uni-color;
  281. padding: 15rpx 40rpx;
  282. border-radius: 40rpx;
  283. }
  284. .btn1 {
  285. background-color: rgba($color: $uni-color, $alpha: 0.2);
  286. border: 1px solid $uni-color;
  287. color: $uni-color;
  288. }
  289. }
  290. }
  291. .steps {
  292. margin: 20rpx;
  293. background-color: #fff;
  294. display: flex;
  295. flex-direction: column;
  296. width: 710rpx;
  297. border-radius: 20rpx;
  298. padding: 70rpx 0;
  299. /deep/ .uv-text__value {
  300. font-size: 22rpx !important;
  301. }
  302. }
  303. .box {
  304. padding: 20px;
  305. .btns {
  306. display: flex;
  307. justify-content: center;
  308. align-items: center;
  309. margin-top: 10px;
  310. .btn {
  311. color: #fff;
  312. padding: 10rpx 50rpx;
  313. background-color: #ffb300;
  314. border-radius: 30rpx;
  315. font-size: 25rpx;
  316. margin-right: 10rpx;
  317. }
  318. .btc {
  319. background: #ccc;
  320. }
  321. }
  322. }
  323. .info {
  324. margin: 10px;
  325. padding: 20rpx;
  326. background-color: #fff;
  327. width: calc(100% - 40px);
  328. border-radius: 10px;
  329. .head-title {
  330. font-family: PingFang SC, PingFang SC-Bold;
  331. color: #2f2e2e;
  332. line-height: 30rpx;
  333. margin-left: 10rpx;
  334. }
  335. .server-item {
  336. display: flex;
  337. flex-wrap: wrap;
  338. align-items: center;
  339. justify-content: space-between;
  340. background: white;
  341. border-radius: 15rpx;
  342. box-sizing: border-box;
  343. margin: 20rpx 0rpx;
  344. width: 100%;
  345. .img-box {
  346. width: 150rpx;
  347. height: 150rpx;
  348. border-radius: 10rpx;
  349. overflow: hidden;
  350. image {
  351. width: 100%;
  352. height: 100%;
  353. }
  354. }
  355. .server-info {
  356. display: flex;
  357. flex-direction: column;
  358. justify-content: space-around;
  359. width: calc(100% - 180rpx);
  360. box-sizing: border-box;
  361. padding: 10rpx 15rpx;
  362. .server-title {
  363. display: flex;
  364. margin-bottom: 10rpx;
  365. }
  366. .coupon {
  367. display: flex;
  368. justify-content: center;
  369. align-items: center;
  370. background: #F29E45;
  371. color: white;
  372. width: 120rpx;
  373. height: 40rpx;
  374. border-radius: 10rpx;
  375. margin-left: 10rpx;
  376. font-size: 22rpx;
  377. }
  378. .time-coupon,
  379. .price {
  380. display: flex;
  381. flex-wrap: wrap;
  382. align-items: center;
  383. }
  384. .time-coupon {
  385. margin: 10rpx 0rpx;
  386. font-size: 26rpx;
  387. justify-content: space-between;
  388. width: 100%;
  389. .flex {
  390. justify-content: center;
  391. align-items: center;
  392. }
  393. image {
  394. width: 25rpx;
  395. height: 25rpx;
  396. }
  397. .time {
  398. color: #B8B8B8;
  399. margin-left: 6rpx;
  400. }
  401. }
  402. .sales-volume {
  403. display: flex;
  404. align-items: center;
  405. color: #B8B8B8;
  406. font-size: 24rpx;
  407. image {
  408. width: 25rpx;
  409. height: 25rpx;
  410. }
  411. }
  412. }
  413. }
  414. .address {
  415. .address-top {
  416. display: flex;
  417. justify-content: space-between;
  418. align-items: center;
  419. image {
  420. width: 30rpx;
  421. height: 30rpx;
  422. }
  423. }
  424. .addressDetail {
  425. color: #777;
  426. font-size: 28rpx;
  427. padding: 5px 0;
  428. }
  429. text {
  430. background-color: #F29E45;
  431. padding: 8rpx 10rpx;
  432. color: #fff;
  433. font-size: 20rpx;
  434. margin-left: 10px;
  435. border-radius: 5px;
  436. }
  437. }
  438. .min_tips {
  439. font-size: 22rpx;
  440. color: #777;
  441. display: flex;
  442. justify-content: space-between;
  443. padding: 5px 0;
  444. align-items: center;
  445. }
  446. .current-price {
  447. font-size: 27rpx;
  448. color: #FD5100;
  449. }
  450. .line {
  451. border-top: 2px dotted #00000011;
  452. padding: 20rpx 0;
  453. .t {
  454. padding: 5px 0;
  455. color: #000;
  456. font-size: 26rpx;
  457. }
  458. }
  459. .head-div {
  460. .nickname {
  461. font-size: 30rpx;
  462. font-weight: 600;
  463. text-align: left;
  464. line-height: 42rpx;
  465. display: flex;
  466. align-items: center;
  467. .tag {
  468. position: relative;
  469. display: flex;
  470. align-items: center;
  471. image {
  472. height: 45rpx;
  473. width: 90rpx;
  474. vertical-align: middle;
  475. }
  476. .auth {
  477. position: absolute;
  478. white-space: nowrap;
  479. color: #FF6200;
  480. left: 23rpx;
  481. font-size: 17rpx;
  482. }
  483. }
  484. }
  485. .days {
  486. font-size: 20rpx;
  487. font-weight: 400;
  488. text-align: left;
  489. line-height: 56rpx;
  490. display: flex;
  491. align-items: center;
  492. view {
  493. padding-left: 5px;
  494. }
  495. }
  496. }
  497. .btns {
  498. display: flex;
  499. justify-content: center;
  500. .btn {
  501. color: $uni-color;
  502. border: 1px solid $uni-color;
  503. padding: 10rpx 20rpx;
  504. border-radius: 30rpx;
  505. }
  506. }
  507. }
  508. </style>