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. 140
      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;
};

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

@ -4,78 +4,76 @@
<el-form :inline="true" :model="Topquery" class="el-fr-d"> </el-form>
</el-row>
<!-- 头部右侧按钮模块 -->
<div>
<el-tabs type="border-card" class="top-el-tabs" v-model="tabName" @tab-change="tabchange">
<el-tab-pane label="全部" :name="1">全部</el-tab-pane>
<el-tab-pane label="临期" :name="2">临期</el-tab-pane>
<el-tab-pane label="到期" :name="3">到期</el-tab-pane>
</el-tabs>
<div>
<div class="el_top_btn">
<div>
<el-button type="primary" @click="newlyadd" icon="el-icon-plus"> </el-button>
<el-button type="primary" icon="el-icon-delete" @click="DeleteInformationAll"
>批量删除</el-button
>
</div>
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChangeS" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button>
<el-button icon="Search" @click="searchHide" circle></el-button>
<el-tabs type="border-card" class="top-el-tabs" v-model="tabName" @tab-change="tabchange">
<el-tab-pane label="全部" :name="1">全部</el-tab-pane>
<el-tab-pane label="临期" :name="2">临期</el-tab-pane>
<el-tab-pane label="到期" :name="3">到期</el-tab-pane>
</el-tabs>
<div>
<div class="el_top_btn">
<div>
<el-button type="primary" @click="newlyadd" icon="el-icon-plus"> </el-button>
<el-button type="primary" icon="el-icon-delete" @click="DeleteInformationAll"
>批量删除</el-button
>
</div>
<div class="avue-crud__right">
<el-button icon="el-icon-refresh" @click="searchChangeS" circle></el-button>
<el-button icon="Operation" @click="showdrawer(true)" circle></el-button>
<el-button icon="Search" @click="searchHide" circle></el-button>
</div>
</div>
</div>
<el-row>
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="details.columnList"
:tableData="data"
:checkselect="selectList"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
<el-text
v-if="userInfo == 'admin'"
@click="Expandconfiguration(slotProps.scope.row)"
>扩展配置</el-text
>
<el-text @click="view(slotProps.scope)">查看</el-text>
<el-text @click="edit(slotProps.scope)">编辑</el-text>
<el-text @click="DeleteInformation(slotProps.scope)">删除</el-text>
</div>
</template>
</template>
</tablecmt>
</el-row>
<!-- 分页模块 -->
<el-row class="el-fy">
<div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<div></div>
<el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
<el-row>
<!-- 列表模块 -->
<tablecmt
class="tableNode"
:columnList="details.columnList"
:tableData="data"
:checkselect="selectList"
@inputTxt="inputsc"
@timeCheck="timesc"
@btnCheck="btnsc"
@selectCheck="selectsc"
@selection="selectionChange"
>
</el-pagination>
</div>
</el-row>
</div>
<template #default="slotProps">
<template v-if="slotProps.scope.column.label === '操作'">
<div class="ElBtnClass">
<el-text
v-if="userInfo == 'admin'"
@click="Expandconfiguration(slotProps.scope.row)"
>扩展配置</el-text
>
<el-text @click="view(slotProps.scope)">查看</el-text>
<el-text @click="edit(slotProps.scope)">编辑</el-text>
<el-text @click="DeleteInformation(slotProps.scope)">删除</el-text>
</div>
</template>
</template>
</tablecmt>
</el-row>
<!-- 分页模块 -->
<el-row class="el-fy">
<div class="avue-crud__pagination flex-c-sb" style="width: 100%">
<div></div>
<el-pagination
align="right"
background
@size-change="sizeChange"
@current-change="currentChange"
:current-page="page.currentPage"
:page-sizes="[30, 50, 80, 120]"
:page-size="page.pageSize"
layout="total, sizes, prev, pager, next, jumper"
:total="page.total"
>
</el-pagination>
</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