From 16b37fa24394118e40bf9f32a0fefbb7f71483f5 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期一, 09 三月 2026 11:17:33 +0800
Subject: [PATCH] 修改本地配置
---
ui/car_wx_app/pages/examine/index.vue | 132 +++++++++++++++++++++++++++++++++-----------
1 files changed, 99 insertions(+), 33 deletions(-)
diff --git a/ui/car_wx_app/pages/examine/index.vue b/ui/car_wx_app/pages/examine/index.vue
index bf2ece5..d282e89 100644
--- a/ui/car_wx_app/pages/examine/index.vue
+++ b/ui/car_wx_app/pages/examine/index.vue
@@ -124,7 +124,7 @@
</u-form-item> -->
- <u-form-item ref="item1" borderBottom label=" " labelWidth="0" prop="" :borderBottom="false">
+ <u-form-item ref="item1" borderBottom label=" " labelWidth="0" prop="" :borderBottom="false" v-if="uploadAreas.length > 0">
<view style="display: flex;align-items: center;"><u--image :showLoading="true" src="/static/bt.png"
width="20px" height="20px"></u--image>鍑瘉<span
style="color: #c6c0ba;margin-left: 10px;display: inline-block;"></span></view>
@@ -162,7 +162,7 @@
<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>
@@ -255,7 +255,7 @@
<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>
@@ -303,6 +303,25 @@
</u-number-box>
+
+ </view>
+
+ <view v-if="form.tripType == '5'" style="display: flex; align-items: center; width: 100%; margin-top: 15px">
+ <view style="display: flex; align-items: center; flex-shrink: 0; margin-right: 10px;">
+ <u--image :showLoading="true" src="/static/bt.png" width="20px" height="20px"></u--image>
+ <text>鏄惁鏌ヨ溅:</text>
+
+ </view>
+
+ <u-radio-group
+ v-model="form.iscc" iconPlacement="right"
+ placement="row">
+ <u-radio label="鏄�" name="0" style="margin-right: 20px"></u-radio>
+ <u-radio label="鍚�" name="1"></u-radio>
+ </u-radio-group>
+
+
+
</view>
@@ -315,7 +334,7 @@
<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>
@@ -433,7 +452,7 @@
mapList: {},
activeActive: {},
isHk:false,
-
+ loading: false
};
},
onLoad(options) {
@@ -661,6 +680,8 @@
success: (res) => {
const latitude = res.latitude;
const longitude = res.longitude;
+ this.form.longitude =longitude;
+ this.form.latitude =latitude;
this.getAddress(latitude, longitude);
},
fail: (err) => {
@@ -747,8 +768,8 @@
else if (type == '2'||type == '6'){ // 鍒拌揪瑁呰揣鐐� 鍒拌揪鍗歌揣鐐�
this.uploadAreas = [
{ name: '杞﹀ご', imageUrl: '',required: true },
- { name: '杞﹀熬(闈炲繀濉�)', imageUrl: '',required: false },
- { name: '浠〃鐩�(闈炲繀濉�)', imageUrl: '',required: false },
+ // { name: '杞﹀熬(闈炲繀濉�)', imageUrl: '',required: false },
+ // { name: '浠〃鐩�(闈炲繀濉�)', imageUrl: '',required: false },
]
@@ -757,13 +778,21 @@
this.uploadAreas = [
{ name: '杞﹀ご', imageUrl: '',required: true },
{ name: '杞﹀熬', imageUrl: '',required: true },
- { name: '浠〃鐩�(闈炲繀濉�)', imageUrl: '',required: false },
+ // { name: '浠〃鐩�(闈炲繀濉�)', imageUrl: '',required: false },
]
}else if (type == '4'||type == '5'){// 鍒拌揪娓呭叧鍦哄湴 绂诲紑娓呭叧鍦哄湴
this.uploadAreas = [
- { name: '浠〃鐩�(闈炲繀濉�)', imageUrl: '',required: false },
- { name: '杞﹀ご(闈炲繀濉�)', imageUrl: '',required: false },
- { name: '杞﹀熬(闈炲繀濉�)', imageUrl: '',required: false },
+ // { name: '浠〃鐩�(闈炲繀濉�)', imageUrl: '',required: false },
+ // { name: '杞﹀ご(闈炲繀濉�)', imageUrl: '',required: false },
+ // { name: '杞﹀熬(闈炲繀濉�)', imageUrl: '',required: false },
+ ]
+ }else if (type == '8'){
+ this.uploadAreas = [
+ { name: '杞﹀ご', imageUrl: '',required: true },
+ { name: '浠〃鐩�', imageUrl: '',required: true },
+
+ { name: '杞﹀熬', imageUrl: '',required: true },
+ { name: '鎵胯繍鍗�', imageUrl: '',required: false },
]
}else{
this.uploadAreas = [
@@ -780,6 +809,7 @@
if (['3','5','7'].includes(type)){
let item = this.tmsTripTables[0] || {};
this.form.odometer = item.odometer;
+ this.form.iscc = "1";
}else{
this.form.odometer = 0
}
@@ -800,26 +830,31 @@
// 鏂板鍥剧墖
async afterRead(event) {
// 褰撹缃� multiple 涓� true 鏃�, file 涓烘暟缁勬牸寮忥紝鍚﹀垯涓哄璞℃牸寮�
- let lists = [].concat(event.file)
- let fileListLen = this.fileList.length
- lists.map((item) => {
- this.fileList.push({
- ...item,
- status: 'success',
- message: '涓婁紶涓�'
- })
+ uploadImage(event.file[0].url,this.isHk).then(res=>{
+ console.log(res)
+ this.fileList.push(res);
})
- for (let i = 0; i < lists.length; i++) {
- const result = await this.uploadFilePromise(lists[i].url)
- let item = this.fileList[fileListLen]
- this.fileList.splice(fileListLen, 1, Object.assign(item, {
- status: result.status,
- message: result.status == 'success' ? '涓婁紶鎴愬姛' : '涓婁紶澶辫触',
- urls: result.url
- }))
- fileListLen++
- }
+ // let lists = [].concat(event.file)
+ // let fileListLen = this.fileList.length
+ // lists.map((item) => {
+ // this.fileList.push({
+ // ...item,
+ // status: 'success',
+ // message: '涓婁紶涓�'
+ // })
+ // })
+ // for (let i = 0; i < lists.length; i++) {
+ //
+ // const result = await this.uploadFilePromise(lists[i].url)
+ // let item = this.fileList[fileListLen]
+ // this.fileList.splice(fileListLen, 1, Object.assign(item, {
+ // status: result.status,
+ // message: result.status == 'success' ? '涓婁紶鎴愬姛' : '涓婁紶澶辫触',
+ // urls: result.url
+ // }))
+ // fileListLen++
+ // }
},
uploadFilePromise(url) {
@@ -949,7 +984,9 @@
// 琛ㄥ崟鎻愪氦鏃堕獙璇佸浘鐗囨槸鍚﹀畬鏁达紙鏍规嵁闇�姹傝皟鏁村繀濉」锛�
submitForm() {
-
+ if(this.loading){
+ return;
+ }
// 鏍规嵁褰撳墠婵�娲荤殑鏍囩椤垫墽琛屼笉鍚岀殑鎻愪氦閫昏緫
if (this.activeTab == 'upload') {
@@ -973,7 +1010,7 @@
} else {
// 楠岃瘉鏄惁鑷冲皯涓婁紶浜嗕竴寮犲浘鐗�
// 鏀堕泦鎵�鏈変笂浼犵殑鍥剧墖鍦板潃锛堢敤閫楀彿鍒嗛殧锛�
-
+ this.loading = true;
const voucherUrls = this.uploadAreas.filter(item => item.imageUrl!=='').map(item => item.imageUrl).join(',');
this.form.voucherUrl = voucherUrls;
@@ -985,7 +1022,9 @@
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');
@@ -994,6 +1033,9 @@
/* 涓婁紶琛岀▼鍙戣溅 */
carUploadTrip(this.form).then((res) => {
if (res == 1) {
+ setTimeout(()=>{
+ this.loading = false
+ },2000)
uni.$u.toast('鎿嶄綔鎴愬姛')
// 閲嶇疆琛ㄥ崟
this.form = {
@@ -1012,12 +1054,18 @@
}
}).catch(err => {
uni.$u.toast('鎻愪氦澶辫触')
+ setTimeout(()=>{
+ this.loading = false
+ },2000)
})
}
}
}).catch(errors => {
uni.$u.toast('鏍¢獙澶辫触')
+ setTimeout(()=>{
+ this.loading = false
+ },2000)
})
@@ -1037,7 +1085,7 @@
this.$refs.uForm.validate().then(res => {
if (res) {
- var urls = this.fileList.map(item => item.urls).join(',');
+ var urls = this.fileList.map(item => item.url).join(',');
this.form.feeVoucherUrl = urls
this.form.dispatchOrderId = this.newForm.dispatchId
this.form.driverId = this.newForm.driverId
@@ -1049,6 +1097,9 @@
this.cleanedForm = this.cleanFormData({ ...this.form })
carUploadFinance(this.cleanedForm).then((res) => {
if (res == 1) {
+ setTimeout(()=>{
+ this.loading = false
+ },2000)
uni.$u.toast('鎿嶄綔鎴愬姛')
// 閲嶇疆琛ㄥ崟
this.form = {
@@ -1063,10 +1114,16 @@
}
}).catch(err => {
uni.$u.toast('鎻愪氦澶辫触')
+ setTimeout(()=>{
+ this.loading = false
+ },2000)
})
}
}).catch(errors => {
uni.$u.toast('鏍¢獙澶辫触')
+ setTimeout(()=>{
+ this.loading = false
+ },2000)
})
}
@@ -1547,4 +1604,13 @@
padding: 2px;
z-index: 999;
}
+
+</style>
+<style lang="scss" scoped>
+::v-deep .u-radio{
+ margin-right: 20px;
+}
+::v-deep .u-radio__icon-wrap{
+ margin-left: 10px;
+}
</style>
\ No newline at end of file
--
Gitblit v1.8.0