zhangback
2026-01-26 3e3cd7ad6d3787dac450deef5d5173de11abab94
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();
        },