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

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