Commit 01d80ebc by cen

fix:防抖

1 parent 2dce25e4
......@@ -122,6 +122,7 @@ import { uploadFile } from '@/utils/ossUploadFile/uploadFile.js'
import SelectCity from './components/SelectCity.vue'
import UploadMedia from './components/uploadMedia.vue'
import NoticePopup from '@/components/NoticePopup.vue'
import { debounce } from 'lodash'
export default {
name: 'AddEvaluationFrom',
components: {
......@@ -459,7 +460,7 @@ export default {
{ key: 'annualInspectionExpiry', label: '年审到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'annualInspectionExpiry', targetObj: 'carLicenseReqDTO' },
{ key: 'commercialInsuranceExpiry', label: '商业险到期', required: true, fullWidth: false, type: 'calendar', targetKey: 'commercialInsuranceExpiry', targetObj: 'carLicenseReqDTO' },
{ key: 'previousOwnerName', label: '原车主名称', required: true, fullWidth: false, targetKey: 'previousOwnerName', targetObj: 'carLicenseReqDTO', type: 'input' },
{ key: 'previousOwnerPhone', label: '原车主电话', required: true, fullWidth: true, targetKey: 'previousOwnerPhone', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', pattern: '^[0-9]{11}$' },
{ key: 'previousOwnerPhone', label: '原车主电话', required: true, fullWidth: true, targetKey: 'previousOwnerPhone', targetObj: 'carLicenseReqDTO', type: 'input', inputType: 'number', pattern: '^[0-9]{11}$', maxlength: 17 },
{
key: 'previousOwnerAddress',
label: '原车主住址',
......@@ -1070,7 +1071,7 @@ export default {
},
// 提交表单逻辑
async submitForm() {
submitForm: debounce(async function () {
// 表单提交验证
if (this.currentStep === 3) {
const leftFront45Image = this.formImagesData['11'] // key为11的是左前45度图片
......@@ -1145,7 +1146,7 @@ export default {
}
}
}
},
}, 500),
// 处理媒体数据的辅助方法
processMediaData(mediaData, fileType) {
......
......@@ -110,7 +110,7 @@ import GeneralPopup from './components/GeneralPopup.vue'
import OrderPopup from '@/components/OrderPopup/index.vue'
import dayjs from 'dayjs'
import NoticePopup from '@/components/NoticePopup.vue'
import { max } from 'lodash'
import { debounce } from 'lodash'
export default {
components: {
FormCell,
......@@ -293,7 +293,7 @@ export default {
this.$refs.openDate.open()
}
},
confirmDelivery() {
confirmDelivery: debounce(function (e) {
if (!this.formData.handoverTime) {
uni.showToast({ title: '请选择交车时间', icon: 'none' })
return
......@@ -321,7 +321,7 @@ export default {
}
}
this.$refs.tipsPopup.open()
},
}, 500),
async confirmTips() {
// this.uploadedImages
......
......@@ -443,7 +443,7 @@ export default {
this.requoteObj.evalOrderNo = e.evalOrderNo
this.$refs.requotePopup.open()
},
confirmRequote() {
async confirmRequote() {
const that = this
console.log('that.requoteObj:', that.requoteObj)
if (that.requoteObj.customerTargetPriceFeedback.length == 0) {
......@@ -460,7 +460,7 @@ export default {
})
return
}
const res = uni.$api.evaluationApi.evalOrderOwnerReQuote(this.requoteObj)
const res = await uni.$api.evaluationApi.evalOrderOwnerReQuote(this.requoteObj)
if (res.data.code == 0) {
uni.showToast({
title: '重新报价成功',
......
......@@ -264,7 +264,7 @@ import { uploadFile } from '@/utils/ossUploadFile/uploadFile.js'
import OrderPopup from '@/components/OrderPopup/index.vue'
import dayjs from 'dayjs'
import NoticePopup from '@/components/NoticePopup.vue'
import { max } from 'lodash'
import { debounce } from 'lodash'
export default {
components: {
FormCell,
......@@ -367,12 +367,12 @@ export default {
depositPrice: 0,
finalPrice: 0,
fullPrice: 0,
partAName: '岑成威',
idCard: '44538119960121041X',
partAName: '',
idCard: '',
idCardFrontUrl: '',
idCardBackUrl: '',
contactPersonName: '',
phone: '13059281290',
phone: '',
address: '',
payeeName: '',
bankCardNumber: '',
......@@ -932,7 +932,7 @@ export default {
}
this.comfirmPage = true
},
comfirm() {
comfirm: debounce(function (e) {
console.log('this.formData', this.formData)
if (this.formData.paymentType == 2) {
delete this.formData.depositPrice
......@@ -957,7 +957,7 @@ export default {
})
}
})
},
}, 500),
// 计算尾款:尾款 = 评估价 - 定金
calculateFinalPrice() {
console.log(' 计算尾款:尾款 = 评估价 - 定金', this.formData)
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!