| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147 |
- <template>
- <view class="success-container">
- <erp-nav-bar title="下单成功" />
- <view class="success-card">
- <icon type="success" size="80" color="#C1001C" class="success-icon"></icon>
- <text class="status-title">提交成功</text>
- <text class="status-desc">您的订单已提交,正在等待业务员审核</text>
- <view class="btn-group">
- <!-- 查看订单:主按钮 -->
- <button class="primary-btn" @click="viewOrder">查看订单</button>
- <!-- 再来一单:次按钮 -->
- <button class="outline-btn" @click="handleReorder">再来一单</button>
- <!-- 返回下单页面:文字/轻量化链接风格按钮 -->
- <button class="text-btn" @click="handleReorder">返回下单页面</button>
- </view>
- </view>
- </view>
- </template>
- <script>
- import ErpNavBar from '@/components/erp-nav-bar.vue';
- export default {
- components: { ErpNavBar },
- data() {
- return {
- orderId: ''
- }
- },
- onLoad(options) {
- if (options.orderId) {
- this.orderId = options.orderId;
- }
- },
- methods: {
- // 将再来一单和返回页面功能合并:通过 reLaunch 自动重置数据
- handleReorder() {
- // reLaunch 会重新加载页面,彻底清空原有表单数据
- uni.reLaunch({
- url: '/pages/order/index'
- });
- },
- viewOrder() {
- if (!this.orderId) {
- uni.switchTab({
- url: '/pages/index/index'
- });
- return;
- }
- uni.navigateTo({
- url: '/pages/order/detail/index?rowId=' + this.orderId
- });
- }
- }
- }
- </script>
- <style scoped>
- .success-container {
- width: 100%;
- min-height: 100vh;
- background: #f7f8fa;
- display: flex;
- flex-direction: column;
- align-items: center;
- padding-top: 15vh;
- }
- .success-card {
- width: 90%;
- background: #fff;
- border-radius: 32rpx;
- padding: 80rpx 40rpx;
- display: flex;
- flex-direction: column;
- align-items: center;
- box-shadow: 0 4rpx 30rpx rgba(0, 0, 0, 0.03);
- }
- .success-icon {
- margin-bottom: 40rpx;
- }
- .status-title {
- font-size: 40rpx;
- font-weight: bold;
- color: #333;
- margin-bottom: 16rpx;
- }
- .status-desc {
- font-size: 28rpx;
- color: #999;
- margin-bottom: 80rpx;
- }
- .btn-group {
- width: 100%;
- display: flex;
- flex-direction: column;
- gap: 24rpx;
- }
- .primary-btn {
- width: 100%;
- height: 96rpx;
- background: #C1001C;
- color: #fff;
- border-radius: 48rpx;
- font-size: 32rpx;
- font-weight: bold;
- display: flex;
- align-items: center;
- justify-content: center;
- border: none;
- box-shadow: 0 10rpx 20rpx rgba(193, 0, 28, 0.15);
- }
- .outline-btn {
- width: 100%;
- height: 96rpx;
- background: #fff;
- color: #C1001C;
- border-radius: 48rpx;
- font-size: 32rpx;
- font-weight: bold;
- display: flex;
- align-items: center;
- justify-content: center;
- border: 2rpx solid #C1001C;
- }
- .text-btn {
- margin-top: 20rpx;
- background: transparent;
- color: #666;
- font-size: 28rpx;
- border: none;
- text-decoration: underline;
- /* 增加下划线提示可点击 */
- }
- .text-btn:active {
- color: #333;
- opacity: 0.8;
- }
- </style>
|