From f526a4cbc1138da5160619b212ecffcfa9b8bcc5 Mon Sep 17 00:00:00 2001 From: qb <1191961160@qq.com> Date: Tue, 17 Dec 2024 13:51:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E9=83=A8=E5=88=86bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/basic/pda/basicPda2.vue | 4 +- src/views/basicdata/brand/basicBrand.vue | 6 +- src/views/basicdata/brand/basicClientFrom.vue | 4 +- .../driverArtery/basicdataDriverArteryAdd.vue | 6 +- src/views/reportforms/ConsigneeReport.vue | 64 +++++++++++++++++-- .../SalesDepartmentIncomeReport.vue | 59 +++++++++++++++-- 6 files changed, 121 insertions(+), 22 deletions(-) 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/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/reportforms/ConsigneeReport.vue b/src/views/reportforms/ConsigneeReport.vue index 79a56ab9..b9ffc700 100644 --- a/src/views/reportforms/ConsigneeReport.vue +++ b/src/views/reportforms/ConsigneeReport.vue @@ -3,15 +3,17 @@
+ - + - - + + + + - + + + + + + + @@ -192,6 +229,7 @@ import { } from '@/utils/util'; import { useRouter } from 'vue-router'; import { ElMessage, ElMessageBox } from 'element-plus'; +import { getListName } from '@/api/basicdata/basicdataVehicle'; import { columnList } from '@/option/reportforms/ConsigneeReport'; // 获取路由实例 @@ -262,6 +300,8 @@ const details = reactive({ brandOptions: [], /** 事业线 */ businessLineOption: [], + /** 仓库 */ + warehouseOption: [], /** 弹出层显示 */ popUpShow: {}, /** 全屏 */ @@ -356,6 +396,18 @@ const handleFindBrand = async () => { } }; +/** 初始化请求仓库数据 */ +getListName({ name: '' }).then(res => { + const { code, data } = res.data; + if (code !== 200 || getObjType(data) !== 'array') return; + details.warehouseOption = data.map(val => { + return { + dictKey: val.id, + dictValue: val.name, + }; + }); +}); + /** 查询事业线 */ const handleFindbusinessLine = async () => { try { diff --git a/src/views/reportforms/SalesDepartmentIncomeReport.vue b/src/views/reportforms/SalesDepartmentIncomeReport.vue index 2a133555..7d4b5532 100644 --- a/src/views/reportforms/SalesDepartmentIncomeReport.vue +++ b/src/views/reportforms/SalesDepartmentIncomeReport.vue @@ -5,13 +5,14 @@
- + - - + + + + - + + + @@ -192,6 +224,7 @@ import { } from '@/utils/util'; import { useRouter } from 'vue-router'; import { ElMessage, ElMessageBox } from 'element-plus'; +import { getListName } from '@/api/basicdata/basicdataVehicle'; import { columnList } from '@/option/reportforms/SalesDepartmentIncomeReport'; // 获取路由实例 @@ -262,6 +295,8 @@ const details = reactive({ brandOptions: [], /** 事业线 */ businessLineOption: [], + /** 仓库 */ + warehouseOption: [], /** 弹出层显示 */ popUpShow: {}, /** 全屏 */ @@ -356,6 +391,18 @@ const handleFindBrand = async () => { } }; +/** 初始化请求仓库数据 */ +getListName({ name: '' }).then(res => { + const { code, data } = res.data; + if (code !== 200 || getObjType(data) !== 'array') return; + details.warehouseOption = data.map(val => { + return { + dictKey: val.id, + dictValue: val.name, + }; + }); +}); + /** 查询事业线 */ const handleFindbusinessLine = async () => { try {