| | |
| | | <u-button class="btn-list" @click="goThistory" text="行程历史"></u-button> |
| | | <u-button class="btn-list" @click="goToAdvanceList" 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> |
| | | |
| | | </view> |
| | |
| | | <u-button class="btn-list" @click="goThistory" text="行程历史"></u-button> |
| | | <u-button class="btn-list" @click="goToAdvanceList" 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> |
| | | |
| | | |
| | |
| | | <u-button class="cancel-btn" @click="showPopup = false" type="info" plain> |
| | | 取消 |
| | | </u-button> |
| | | <u-button class="submit-btn" @click="handleSubmit" type="primary"> |
| | | <u-button class="submit-btn" @click="handleSubmit" type="primary"> |
| | | 提交 |
| | | </u-button> |
| | | </view> |
| | |
| | | mapList: {}, |
| | | activeActive: {}, |
| | | isHk:false, |
| | | |
| | | loading: false |
| | | }; |
| | | }, |
| | | onLoad(options) { |
| | |
| | | |
| | | // 表单提交时验证图片是否完整(根据需求调整必填项) |
| | | submitForm() { |
| | | |
| | | if(this.loading){ |
| | | return; |
| | | } |
| | | |
| | | // 根据当前激活的标签页执行不同的提交逻辑 |
| | | if (this.activeTab == 'upload') { |
| | |
| | | } else { |
| | | // 验证是否至少上传了一张图片 |
| | | // 收集所有上传的图片地址(用逗号分隔) |
| | | |
| | | this.loading = true; |
| | | const voucherUrls = this.uploadAreas.filter(item => item.imageUrl!=='').map(item => item.imageUrl).join(','); |
| | | this.form.voucherUrl = voucherUrls; |
| | | |
| | |
| | | if (this.form.tripType == 1) { |
| | | /*设置 */ |
| | | // console.log(this.form); |
| | | |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },2000) |
| | | uni.setStorageSync("signContractForm", this.form); |
| | | setTimeout(() => { |
| | | uni.$u.route('/pages/signContract/index'); |
| | |
| | | /* 上传行程发车 */ |
| | | carUploadTrip(this.form).then((res) => { |
| | | if (res == 1) { |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },2000) |
| | | uni.$u.toast('操作成功') |
| | | // 重置表单 |
| | | this.form = { |
| | |
| | | } |
| | | }).catch(err => { |
| | | uni.$u.toast('提交失败') |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },2000) |
| | | }) |
| | | } |
| | | |
| | | } |
| | | }).catch(errors => { |
| | | uni.$u.toast('校验失败') |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },2000) |
| | | }) |
| | | |
| | | |
| | |
| | | this.cleanedForm = this.cleanFormData({ ...this.form }) |
| | | carUploadFinance(this.cleanedForm).then((res) => { |
| | | if (res == 1) { |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },2000) |
| | | uni.$u.toast('操作成功') |
| | | // 重置表单 |
| | | this.form = { |
| | |
| | | } |
| | | }).catch(err => { |
| | | uni.$u.toast('提交失败') |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },2000) |
| | | }) |
| | | } |
| | | }).catch(errors => { |
| | | uni.$u.toast('校验失败') |
| | | setTimeout(()=>{ |
| | | this.loading = false |
| | | },2000) |
| | | }) |
| | | } |
| | | |