修改时 行驶证副页 不重新上传无法通过校验

This commit is contained in:
2024-06-06 11:27:24 +08:00
parent 0a65f7c641
commit beff1bb6f9

View File

@ -151,6 +151,7 @@ export default {
vehicleLicenseBack: '', // 行驶证副页
vehicleFrontPhoto: '', // 车头照
vehicleLicenseInfo: {},
vehicleLicenseBackOcrFlag: false, // 行驶证副页 修改时默认不需要 ocr识别
}
},
async mounted() {
@ -174,6 +175,7 @@ export default {
await this.vehicleOcrHandler();
},
async vehicleLicenseBackHandler(file) { // 上传 行驶证副页
this.vehicleLicenseBackOcrFlag = true;
const formData = new FormData();
formData.append("file" , file.file);
let res = await uploadImage(formData);
@ -309,7 +311,7 @@ export default {
this.$toast('行驶证主页识别失败')
return
}
if( !this.vehicleLicenseInfo.backPlateNo ) {
if(this.vehicleLicenseBackOcrFlag && !this.vehicleLicenseInfo.backPlateNo ) {
this.$toast('行驶证副页识别失败')
return
}