index.vue 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. <template>
  2. <view class="success-container">
  3. <erp-nav-bar title="下单成功" />
  4. <view class="success-card">
  5. <icon type="success" size="80" color="#C1001C" class="success-icon"></icon>
  6. <text class="status-title">提交成功</text>
  7. <text class="status-desc">您的订单已提交,正在等待业务员审核</text>
  8. <view class="btn-group">
  9. <button class="primary-btn" @click="viewOrder">查看订单</button>
  10. <button class="outline-btn" @click="handleReorder">再来一单</button>
  11. </view>
  12. </view>
  13. </view>
  14. </template>
  15. <script>
  16. import ErpNavBar from '@/components/erp-nav-bar.vue';
  17. export default {
  18. components: { ErpNavBar },
  19. data() {
  20. return {
  21. orderId: '',
  22. clientId: '',
  23. clientName: ''
  24. }
  25. },
  26. onLoad(options) {
  27. if (options.orderId) {
  28. this.orderId = options.orderId;
  29. }
  30. if (options.clientId) {
  31. this.clientId = decodeURIComponent(options.clientId);
  32. }
  33. if (options.clientName) {
  34. this.clientName = decodeURIComponent(options.clientName);
  35. }
  36. },
  37. methods: {
  38. handleReorder() {
  39. let url = '/pages/order/index';
  40. if (this.clientId) {
  41. url += `?clientId=${this.clientId}&clientName=${encodeURIComponent(this.clientName)}`;
  42. }
  43. uni.reLaunch({ url });
  44. },
  45. viewOrder() {
  46. if (!this.orderId) {
  47. uni.switchTab({
  48. url: '/pages/index/index'
  49. });
  50. return;
  51. }
  52. uni.navigateTo({
  53. url: '/pages/order/detail/index?rowId=' + this.orderId
  54. });
  55. }
  56. }
  57. }
  58. </script>
  59. <style scoped>
  60. .success-container {
  61. width: 100%;
  62. min-height: 100vh;
  63. background: #f7f8fa;
  64. display: flex;
  65. flex-direction: column;
  66. align-items: center;
  67. padding-top: 15vh;
  68. }
  69. .success-card {
  70. width: 90%;
  71. background: #fff;
  72. border-radius: 32rpx;
  73. padding: 80rpx 40rpx;
  74. display: flex;
  75. flex-direction: column;
  76. align-items: center;
  77. box-shadow: 0 4rpx 30rpx rgba(0, 0, 0, 0.03);
  78. }
  79. .success-icon {
  80. margin-bottom: 40rpx;
  81. }
  82. .status-title {
  83. font-size: 40rpx;
  84. font-weight: bold;
  85. color: #333;
  86. margin-bottom: 16rpx;
  87. }
  88. .status-desc {
  89. font-size: 28rpx;
  90. color: #999;
  91. margin-bottom: 80rpx;
  92. }
  93. .btn-group {
  94. width: 100%;
  95. display: flex;
  96. flex-direction: column;
  97. gap: 24rpx;
  98. }
  99. .primary-btn {
  100. width: 100%;
  101. height: 96rpx;
  102. background: #C1001C;
  103. color: #fff;
  104. border-radius: 48rpx;
  105. font-size: 32rpx;
  106. font-weight: bold;
  107. display: flex;
  108. align-items: center;
  109. justify-content: center;
  110. border: none;
  111. box-shadow: 0 10rpx 20rpx rgba(193, 0, 28, 0.15);
  112. }
  113. .outline-btn {
  114. width: 100%;
  115. height: 96rpx;
  116. background: #fff;
  117. color: #C1001C;
  118. border-radius: 48rpx;
  119. font-size: 32rpx;
  120. font-weight: bold;
  121. display: flex;
  122. align-items: center;
  123. justify-content: center;
  124. border: 2rpx solid #C1001C;
  125. }
  126. </style>