From 487ef37ec34860b255986d8716d193369024e000 Mon Sep 17 00:00:00 2001
From: zhangback <zhangback@163.com>
Date: 星期二, 13 一月 2026 13:29:43 +0800
Subject: [PATCH] 修改为下单类型

---
 ui/car_wx_app/pages/transportation/index.vue |   30 +++++++++++++++++++++++++-----
 1 files changed, 25 insertions(+), 5 deletions(-)

diff --git a/ui/car_wx_app/pages/transportation/index.vue b/ui/car_wx_app/pages/transportation/index.vue
index 106c2c6..08325a0 100644
--- a/ui/car_wx_app/pages/transportation/index.vue
+++ b/ui/car_wx_app/pages/transportation/index.vue
@@ -206,7 +206,7 @@
                 <u-button class="btn-list" @click="goTravelItinerary" text="琛岀▼鍘嗗彶"></u-button>
 
                 <!-- <u-button class="btn-budget" @click="goToAdvanceBudget" type="success" text="鍨粯棰勭畻"></u-button> -->
-                <u-button class="btn-submit" @click="submitForm" type="primary" text="鎻愪氦"></u-button>
+                <u-button :loading="loading" class="btn-submit"  @click="submitForm" type="primary" text="鎻愪氦"></u-button>
             </view>
 
 
@@ -266,6 +266,7 @@
                 voucher: [{ required: true, message: '璇蜂笂浼犲嚟璇�', trigger: 'blur' }]
             },
             isHk: false,
+			loading: false
         };
     },
     onLoad(options) {
@@ -449,12 +450,15 @@
         },
 
         submitForm() {
-
+			if(this.loading){
+				return;
+			}
             if (this.fileList.length == 0) {
                 uni.$u.toast('鍥剧墖涓婁紶涓嶈兘涓虹┖')
                 return
             }
-
+			console.log(this.loading);
+			this.loading = true;
             this.$refs.uForm.validate().then(res => {
                 if (res) {
 
@@ -467,6 +471,8 @@
 
 
                         carSubmitDropHoo(this.form).then((res) => {
+						
+							
                             this.form = {
                                 address: '',
                                 tripTime: '',
@@ -476,7 +482,11 @@
                             if (res == 1) {
                                 uni.$u.toast('鎿嶄綔鎴愬姛')
                             }
-                        })
+                        }).catch(()=>{
+						setTimeout(()=>{
+							this.loading = false
+						},2000)
+						})
 
 
                     } else if (this.newForm.statusStr == '寰呮帴鎸�') {
@@ -489,6 +499,9 @@
 
                         this.cleanedForm = this.cleanFormData({ ...this.form })
                         carSubmitPickHook(this.cleanedForm).then((res) => {
+						setTimeout(()=>{
+							this.loading = false
+						},2000)
                             this.form = {
                                 address: '',
                                 tripTime: '',
@@ -499,7 +512,11 @@
                             if (res == 1) {
                                 uni.$u.toast('鎿嶄綔鎴愬姛')
                             }
-                        })
+                        }).catch(()=>{
+						setTimeout(()=>{
+							this.loading = false
+						},2000)
+						})
 
                     }
 
@@ -508,6 +525,9 @@
 
             }).catch(errors => {
                 uni.$u.toast('鏍¢獙澶辫触')
+				setTimeout(()=>{
+					this.loading = false
+				},2000)
             })
             this.$forceUpdate();
         },

--
Gitblit v1.8.0