diff --git a/src/views/aftersales/aftersalesWorkOrderAdd.vue b/src/views/aftersales/aftersalesWorkOrderAdd.vue index f81cb350..606f8e86 100644 --- a/src/views/aftersales/aftersalesWorkOrderAdd.vue +++ b/src/views/aftersales/aftersalesWorkOrderAdd.vue @@ -1204,6 +1204,9 @@ const beforeAvatarUpload = async rawFile => { if (rawFile.type !== 'image/png' && rawFile.type !== 'image/jpeg') { ElMessage.error('只能上传格式为PNG/JPG的图片!'); return false; + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); + return false; } const res = await compressImageBlob(rawFile); return res; diff --git a/src/views/aftersales/aftersalesWorkOrderAddCopy.vue b/src/views/aftersales/aftersalesWorkOrderAddCopy.vue index e95c8877..54a9ff2f 100644 --- a/src/views/aftersales/aftersalesWorkOrderAddCopy.vue +++ b/src/views/aftersales/aftersalesWorkOrderAddCopy.vue @@ -751,8 +751,8 @@ const beforeAvatarUpload = async rawFile => { if (rawFile.type !== 'image/png' && rawFile.type !== 'image/jpeg') { ElMessage.error('图片格式只能为 png/jpg!'); return false; - } else if (rawFile.size / 1024 / 1024 > 10) { - ElMessage.error('图片大小不能大于10MB!'); + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); return false; } const res = await compressImageBlob(rawFile); @@ -2261,5 +2261,4 @@ const isShowFormItem4 = computed(() => { .page_loading { height: 100%; } - diff --git a/src/views/aftersales/aftersalesWorkOrderAddTemp.vue b/src/views/aftersales/aftersalesWorkOrderAddTemp.vue index 3f91ba8e..df205a6b 100644 --- a/src/views/aftersales/aftersalesWorkOrderAddTemp.vue +++ b/src/views/aftersales/aftersalesWorkOrderAddTemp.vue @@ -1998,8 +1998,6 @@ const isShowFormItem4 = computed(() => { } } .ResponsibilityBox { - - width: 100%; display: flex; flex-direction: column; diff --git a/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue b/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue index 5fcbefa0..ef5facd4 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue @@ -931,6 +931,9 @@ const beforeAvatarUpload = async rawFile => { if (!_whiteArr.includes(_name.toLocaleLowerCase())) { ElMessage.warning('请上传png、jpg、jpeg的类型图片'); return false; + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); + return false; } const res = await compressImageBlob(rawFile); return res; diff --git a/src/views/aftersales/aftersalesWorkOrderInfoTemp.vue b/src/views/aftersales/aftersalesWorkOrderInfoTemp.vue index fb93ac76..bcb95692 100644 --- a/src/views/aftersales/aftersalesWorkOrderInfoTemp.vue +++ b/src/views/aftersales/aftersalesWorkOrderInfoTemp.vue @@ -906,6 +906,9 @@ const beforeAvatarUpload = async rawFile => { if (!_whiteArr.includes(_name.toLocaleLowerCase())) { ElMessage.warning('请上传png、jpg、jpeg的类型图片'); return false; + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); + return false; } const res = await compressImageBlob(rawFile); return res; diff --git a/src/views/aftersales/aftersalesWorkOrdermodify.vue b/src/views/aftersales/aftersalesWorkOrdermodify.vue index 5e780db8..937a741e 100644 --- a/src/views/aftersales/aftersalesWorkOrdermodify.vue +++ b/src/views/aftersales/aftersalesWorkOrdermodify.vue @@ -1544,7 +1544,7 @@ const Responsemoval = index => { }; const calculateMaxValues = () => { - return + return; // 计算每个输入框剩余最大值 let data = form.value.responsibilitiesList; let totalUsed = data.reduce((acc, item) => acc + item.responsibilityRatio, 0); @@ -1611,8 +1611,8 @@ const beforeAvatarUpload = async rawFile => { if (rawFile.type !== 'image/png' && rawFile.type !== 'image/jpeg') { ElMessage.error('只能上传格式为PNG/JPG的图片!'); return false; - } else if (rawFile.size / 1024 / 1024 > 3) { - ElMessage.error('图片大小不能大于3MB!'); + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); return false; } const res = await compressImageBlob(rawFile); diff --git a/src/views/aftersales/aftersalesWorkOrdermodifyTemp.vue b/src/views/aftersales/aftersalesWorkOrdermodifyTemp.vue index 2a9490a5..efe33ad9 100644 --- a/src/views/aftersales/aftersalesWorkOrdermodifyTemp.vue +++ b/src/views/aftersales/aftersalesWorkOrdermodifyTemp.vue @@ -1017,6 +1017,9 @@ const beforeAvatarUpload = async rawFile => { if (_nameArr.length === 0) { ElMessage.warning('异常类型文件'); return false; + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); + return false; } const _name = _nameArr[_nameArr.length - 1]; diff --git a/src/views/basic/forklift/basicForklift.vue b/src/views/basic/forklift/basicForklift.vue index 07e8b0cd..71178b28 100644 --- a/src/views/basic/forklift/basicForklift.vue +++ b/src/views/basic/forklift/basicForklift.vue @@ -998,8 +998,8 @@ export default { if (rawFile.type !== 'image/png') { ElMessage.error('图片格式只能为image/png!'); return false; - } else if (rawFile.size / 1024 / 1024 > 2) { - ElMessage.error('图片大小不能大于2MB!'); + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); return false; } const res = await compressImageBlob(rawFile); diff --git a/src/views/basic/forklift/basicForklift2.vue b/src/views/basic/forklift/basicForklift2.vue index 2f8d904b..8829144e 100644 --- a/src/views/basic/forklift/basicForklift2.vue +++ b/src/views/basic/forklift/basicForklift2.vue @@ -696,8 +696,8 @@ export default { if (rawFile.type !== 'image/png') { ElMessage.error('图片格式只能为image/png!'); return false; - } else if (rawFile.size / 1024 / 1024 > 2) { - ElMessage.error('图片大小不能大于2MB!'); + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); return false; } const res = await compressImageBlob(rawFile); diff --git a/src/views/basic/pda/basicPda2.vue b/src/views/basic/pda/basicPda2.vue index 93dcd62d..1a1a8d48 100644 --- a/src/views/basic/pda/basicPda2.vue +++ b/src/views/basic/pda/basicPda2.vue @@ -571,8 +571,8 @@ export default { if (rawFile.type !== 'image/png') { ElMessage.error('图片格式只能为image/png!'); return false; - } else if (rawFile.size / 1024 / 1024 > 2) { - ElMessage.error('图片大小不能大于2MB!'); + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); return false; } const res = await compressImageBlob(rawFile); diff --git a/src/views/basic/pda/basicPdatt.vue b/src/views/basic/pda/basicPdatt.vue index 5896711c..368d13bd 100644 --- a/src/views/basic/pda/basicPdatt.vue +++ b/src/views/basic/pda/basicPdatt.vue @@ -803,6 +803,9 @@ const beforeAvatarUpload: UploadProps['beforeUpload'] = async rawFile => { if (!_whiteArr.includes(_name.toLocaleLowerCase())) { ElMessage.warning('请上传png、jpg、jpeg的类型图片'); return false; + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); + return false; } const res = await compressImageBlob(rawFile); return res; diff --git a/src/views/basicdata/brand/basicBrand.vue b/src/views/basicdata/brand/basicBrand.vue index f827542c..089af12b 100644 --- a/src/views/basicdata/brand/basicBrand.vue +++ b/src/views/basicdata/brand/basicBrand.vue @@ -376,13 +376,13 @@ export default { const isJPEG = file.type === 'image/jpeg'; const isJPG = file.type === 'image/jpg'; const isPNG = file.type === 'image/png'; - const isLt2M = file.size / 1024 / 1024 < 2; + const isLt2M = file.size / 1024 / 1024 < 4; if (!isJPEG && !isJPG && !isPNG) { this.$message.error('上传头像图片是 JPG | JPEG | PNG 格式!'); } - if (!isLt2M) { - this.$message.error('上传头像图片大小不能超过 2MB!'); + if (!isLt4M) { + this.$message.error('上传头像图片大小不能超过 4MB!'); } return (isJPG || isJPEG || isPNG) && isLt2M; }, diff --git a/src/views/basicdata/brand/basicClientFrom.vue b/src/views/basicdata/brand/basicClientFrom.vue index 1ea2c936..1d85ece2 100644 --- a/src/views/basicdata/brand/basicClientFrom.vue +++ b/src/views/basicdata/brand/basicClientFrom.vue @@ -677,8 +677,8 @@ export default { if (rawFile.type !== 'image/png') { ElMessage.error('图片格式只能为image/png!'); return false; - } else if (rawFile.size / 1024 / 1024 > 2) { - ElMessage.error('图片大小不能大于2MB!'); + } else if (rawFile.size / 1024 / 1024 > 4) { + ElMessage.error('图片大小不能大于4MB!'); return false; } const res = await compressImageBlob(rawFile); diff --git a/src/views/basicdata/driverArtery/basicdataDriverArteryAdd.vue b/src/views/basicdata/driverArtery/basicdataDriverArteryAdd.vue index 884efb06..b3642f2b 100644 --- a/src/views/basicdata/driverArtery/basicdataDriverArteryAdd.vue +++ b/src/views/basicdata/driverArtery/basicdataDriverArteryAdd.vue @@ -611,14 +611,14 @@ export default { try { const isJPG = file.type === 'image/jpeg'; const isPNG = file.type === 'image/png'; - const isLt2M = file.size / 1024 / 1024 < 2; + const isLt4M = file.size / 1024 / 1024 < 4; if (!isJPG && !isPNG) { this.$message.error('上传图片只能是 JPG 或 PNG 格式!'); return false; } - if (!isLt2M) { - this.$message.error('上传图片大小不能超过 2MB!'); + if (!isLt4M) { + this.$message.error('上传图片大小不能超过 4MB!'); return false; } item.loading = true; diff --git a/src/views/cost/storagecost/Transferwarehousestatistics.vue b/src/views/cost/storagecost/Transferwarehousestatistics.vue index 4a821b64..f2bfab85 100644 --- a/src/views/cost/storagecost/Transferwarehousestatistics.vue +++ b/src/views/cost/storagecost/Transferwarehousestatistics.vue @@ -179,7 +179,11 @@ class="el_Abnormalsettlement" >