Browse Source

修复上传图片bug

dev-xx
qb 6 months ago
parent
commit
0cfe5d8e62
  1. 6
      src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue
  2. 6
      src/views/aftersales/aftersalesWorkOrderInfoTemp.vue
  3. 6
      src/views/aftersales/aftersalesWorkOrdermodifyTemp.vue
  4. 6
      src/views/aftersales/customerService.vue
  5. 6
      src/views/basic/pda/basicPdatt.vue
  6. 8
      src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue
  7. 6
      src/views/datadetail/ToolUpdate.vue
  8. 6
      src/views/distribution/artery/TripartiteTransfer.vue
  9. 6
      src/views/distribution/artery/VehicleArrivalManagement.vue
  10. 8
      src/views/distribution/artery/VehicleStowageDetails.vue
  11. 6
      src/views/distribution/artery/directGoMarketDetails.vue

6
src/views/aftersales/aftersalesWorkOrderInfoEnxt.vue

@ -928,8 +928,10 @@ const beforeAvatarUpload = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

6
src/views/aftersales/aftersalesWorkOrderInfoTemp.vue

@ -903,8 +903,10 @@ const beforeAvatarUpload = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

6
src/views/aftersales/aftersalesWorkOrdermodifyTemp.vue

@ -1023,8 +1023,10 @@ const beforeAvatarUpload = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

6
src/views/aftersales/customerService.vue

@ -227,8 +227,10 @@ const beforeAvatarUpload = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

6
src/views/basic/pda/basicPdatt.vue

@ -800,8 +800,10 @@ const beforeAvatarUpload: UploadProps['beforeUpload'] = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

8
src/views/basicdata/warehouse/warehouse/basicdataWarehouse.vue

@ -74,8 +74,6 @@
</div>
</el-row>
</div>
</div>
<!-- 新增弹窗 -->
@ -1082,8 +1080,10 @@ const beforeAvatarUpload = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

6
src/views/datadetail/ToolUpdate.vue

@ -312,8 +312,10 @@ const beforeAvatarUpload: UploadProps['beforeUpload'] = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

6
src/views/distribution/artery/TripartiteTransfer.vue

@ -1393,8 +1393,10 @@ const handleBeforeUpload = async (rawFile: UploadRawFile) => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;

6
src/views/distribution/artery/VehicleArrivalManagement.vue

@ -1359,13 +1359,15 @@ const handleUnloadByLoadId = async (type: 1 | 2) => {
details.loadingObj.pageLoading = true;
const item = details.selectionList[0];
const res = await postUnloadByLoadIdBefore({ loadId: item.id });
const res = await postUnloadByLoadIdBefore({ loadId: item.id, unloadType: type });
const { code, data } = res.data;
if (code !== 200) return;
ElMessageBox.confirm(
'请确认卸车数据是否完成,未卸车数据将进入异常列表。',
`${
data && Number(data.status) === 0 ? '存在直发商家数据还未卸车,' : ''
}请确认卸车数据是否完成未卸车数据将进入异常列表`,
type === 1 ? '中途卸车确认' : '终点卸车确认',
{
confirmButtonText: '确认',

8
src/views/distribution/artery/VehicleStowageDetails.vue

@ -731,7 +731,7 @@ const initOriginWarehouseOrder = async () => {
};
/** 上传前类型检测 */
const handleBeforeUpload = async (rawFile: UploadRawFile) => {
const handleBeforeUpload = async rawFile => {
console.log('rawFile :>> ', rawFile);
const _nameArr = rawFile.name.split('.');
@ -744,8 +744,10 @@ const handleBeforeUpload = async (rawFile: UploadRawFile) => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;

6
src/views/distribution/artery/directGoMarketDetails.vue

@ -1115,8 +1115,10 @@ const beforeAvatarUpload: UploadProps['beforeUpload'] = async rawFile => {
const _whiteArr = ['png', 'jpg', 'jpeg'];
if (!_whiteArr.includes(_name.toLocaleLowerCase()))
return ElMessage.warning('请上传png、jpg、jpeg的类型图片');
if (!_whiteArr.includes(_name.toLocaleLowerCase())) {
ElMessage.warning('请上传png、jpg、jpeg的类型图片');
return false;
}
const res = await compressImageBlob(rawFile);
return res;
};

Loading…
Cancel
Save