diff --git a/src/views/distribution/artery/VehicleArrivalManagement.vue b/src/views/distribution/artery/VehicleArrivalManagement.vue index 5238874c..32395052 100644 --- a/src/views/distribution/artery/VehicleArrivalManagement.vue +++ b/src/views/distribution/artery/VehicleArrivalManagement.vue @@ -578,6 +578,7 @@ import { handleTranslationDataSeclect, computeNumber, getObjType, + ChecksWhetherTheWarehouseIsSelected, } from '@/utils/util'; import { columnList } from '@/option/distribution/VehicleArrivalManagement'; import { packageColumnList } from '@/option/distribution/VehicleStowage'; @@ -970,6 +971,9 @@ const handleShowComparativeStatement = () => { /** 到车 */ const handleArrive = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length == 0) return ElMessage.warning('请选择需要到车的数据'); ElMessageBox.confirm('确认到车?', '提示', { @@ -1005,6 +1009,9 @@ const handleArrive = async () => { /** 取消到车 */ const handleCloseArrive = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + ElMessageBox.confirm('确认取消到车?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', @@ -1038,6 +1045,9 @@ const handleCloseArrive = async () => { /** 编辑配载信息 */ const handleEditStowage = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + $store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage'); $router.push({ @@ -1103,6 +1113,9 @@ const init = async item => { /** 发车 */ const handleStartCar = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length === 0) { return ElMessage({ message: '请选择发车数据', @@ -1179,6 +1192,9 @@ const handleStartCar = async () => { /** 取消发车 */ const handleEndCar = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length === 0) { return ElMessage({ message: '请选择发车数据', @@ -1316,6 +1332,9 @@ const packageInputsc = (value, row) => { /** 卸车确认 */ const handleUnloadByLoadId = (type: 1 | 2) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length === 0) return ElMessage.warning('请选择需要卸车的数据'); if (details.selectionList.length > 1) return ElMessage.warning('只支持单条数据操作'); @@ -1374,6 +1393,9 @@ const handleShowListOfLoadedWagons = async () => { /** 手动装车 */ const handleManualLoading = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + console.log('row :>> ', row); ElMessageBox.confirm(`是否进行手动装车?`) .then(async () => { @@ -1419,6 +1441,9 @@ const handleShowUnloadReport = async () => { /** 节点费用 */ const handleNodeCost = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + $store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage'); $router.push({ @@ -1429,6 +1454,9 @@ const handleNodeCost = ({ row }) => { /** 配置直发商家弹窗显示 */ const handleDirectGoMarketVesited = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + $router.push({ path: '/distribution/artery/directGoMarket', query: { diff --git a/src/views/distribution/artery/VehicleStowage.vue b/src/views/distribution/artery/VehicleStowage.vue index d0aa4dfc..45f64236 100644 --- a/src/views/distribution/artery/VehicleStowage.vue +++ b/src/views/distribution/artery/VehicleStowage.vue @@ -549,6 +549,7 @@ import { handleTranslationDataSeclect, computeNumber, getObjType, + ChecksWhetherTheWarehouseIsSelected, } from '@/utils/util'; import { columnList, packageColumnList } from '@/option/distribution/VehicleStowage'; import { @@ -985,6 +986,9 @@ const handleShowTruckLoadingDetails = ({ row }) => { /** 显示零担补录 */ const handleShowzeroAdditionalRecording = ({ row }, type = false) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + const _obj = { name: '零担补录', loadId: row.id, @@ -1028,6 +1032,9 @@ const handleFullScrean = (_type: 'open' | 'close', _name: string) => { /** 新增配载 */ const handleAdd = () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + $store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage'); $router.push({ @@ -1038,6 +1045,9 @@ const handleAdd = () => { /** 编辑配载信息 */ const handleEditStowage = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + $store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage'); $router.push({ @@ -1048,6 +1058,9 @@ const handleEditStowage = ({ row }) => { /** 节点费用 */ const handleNodeCost = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + $store.commit('DEL_ONCE_TAG', '/distribution/artery/AddVehicleStowage'); $router.push({ @@ -1058,6 +1071,9 @@ const handleNodeCost = ({ row }) => { /** 配置直发商家弹窗显示 */ const handleDirectGoMarketVesited = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + $router.push({ path: '/distribution/artery/directGoMarket', query: { @@ -1094,6 +1110,8 @@ const handleGoWaybill = ({ row }) => { /** 发车 */ const handleStartCar = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); let message = ''; if (details.selectionList.length === 0) message = '请选择发车数据'; else if (details.selectionList.length !== 1) message = '仅支持单条数据操作'; @@ -1252,6 +1270,8 @@ const packageInputsc = (value, row) => { /** 取消发车 */ const handleCancelStartCar = () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); if (details.selectionList.length === 0) { return ElMessage({ message: '请选择发车数据', @@ -1296,6 +1316,9 @@ const handleCancelStartCar = () => { /** 取消装车 */ const handleCancelCarsLoad = () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length === 0) { return ElMessage({ message: '请选择发车数据', @@ -1353,6 +1376,9 @@ const handleCancelCarsLoad = () => { /** 手动装车 */ const handleManualLoading = ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + console.log('row :>> ', row); ElMessageBox.confirm(`是否进行手动装车?`) .then(async () => { diff --git a/src/views/distribution/artery/directGoMarketDetails.vue b/src/views/distribution/artery/directGoMarketDetails.vue index 56327cc7..196fa1a5 100644 --- a/src/views/distribution/artery/directGoMarketDetails.vue +++ b/src/views/distribution/artery/directGoMarketDetails.vue @@ -350,6 +350,7 @@ import { debounce, setNodeHeight, handleClearTableQuery, + ChecksWhetherTheWarehouseIsSelected, } from '@/utils/util'; import { columnList, detailsColumnList } from '@/option/distribution/directGoMarketDetails'; import { useRouter, useRoute } from 'vue-router'; @@ -787,6 +788,9 @@ const handleShowDetails = ({ row }) => { /** 签收 -- 订单 */ const handleOrderSigin = async ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + ElMessageBox.confirm('确认签收', '', { confirmButtonText: '签收', cancelButtonText: '取消', @@ -818,6 +822,9 @@ const handleOrderSigin = async ({ row }) => { /** 签收 -- 零担 */ const handleZeroSigin = async ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + details.zeroItem = { ...row }; details.zeroItem.enterNum = row.num; details.popUpShow.transferVisited = true; @@ -850,6 +857,9 @@ const handleZeroUnLoadSubmit = async () => { /** 批量签收 */ const handleBatchSigin = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.detailsInfo.selectionList.length === 0) return ElMessage.warning('最少选择一条数据!!!'); @@ -884,6 +894,9 @@ const handleBatchSigin = async () => { /** 开启修改归属仓库弹窗 */ const handleEditWarehouse = () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length === 0) return ElMessage.warning('最少选择一条数据!!!'); details.popUpShow.editWarehouseVisited = true; @@ -960,6 +973,9 @@ const handleShowSignImg = async row => { /** 显示签收图片 */ const handleShowSiginImg = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length > 1 || details.selectionList.length === 0) return ElMessage.warning('请选择一条数据进行上传'); details.viewImgList = []; diff --git a/src/views/distribution/artery/truckLoadingDetails.vue b/src/views/distribution/artery/truckLoadingDetails.vue index 28087c63..60010107 100644 --- a/src/views/distribution/artery/truckLoadingDetails.vue +++ b/src/views/distribution/artery/truckLoadingDetails.vue @@ -796,6 +796,9 @@ const handleShowTransfer = async (_type: string) => { /** 批量卸车 */ const handleBatchUnLoad = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + try { details.loadingObj.pageLoading = true; @@ -1003,6 +1006,9 @@ const handleBatchUnLoad = async () => { /** 卸车 -- 订单 */ const handleOrderUnLoad = async ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.pageInfo.type !== 'TripartiteTransfer') { if (!details.myWarehouseData) { const res = await getMyCurrentWarehouse(); @@ -1114,6 +1120,9 @@ const handleOrderUnLoad = async ({ row }) => { /** 卸车 -- 零担 */ const handleZeroUnLoad = async ({ row }) => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.pageInfo.type !== 'TripartiteTransfer') { if (!details.myWarehouseData) { const res = await getMyCurrentWarehouse(); @@ -1347,6 +1356,9 @@ const handleBatchRemove = async () => { /** 三方批量签收 */ const handleBatchSigin = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length === 0) return ElMessage.warning('请选择需要签收的数据'); const loadScanIds = []; @@ -1407,6 +1419,9 @@ const handleExport = async () => { /** 选择包件进行更改计划仓 */ const handleChooseWarehouse = async () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (details.selectionList.length === 0) return ElMessage.warning('请选择需要更改的数据'); const _arr = []; diff --git a/src/views/distribution/inventory/BookingNote.vue b/src/views/distribution/inventory/BookingNote.vue index c09584e7..dddb4b28 100644 --- a/src/views/distribution/inventory/BookingNote.vue +++ b/src/views/distribution/inventory/BookingNote.vue @@ -1055,6 +1055,8 @@ import { getObjType, handleInputQuery, handleSelectQuery, + deepClone, + ChecksWhetherTheWarehouseIsSelected, } from '@/utils/util'; import { columnList } from '@/option/distribution/VehicleStowage'; import { @@ -1076,7 +1078,6 @@ import { } from '@/api/distribution/BookingNote.js'; import { useStore } from 'vuex'; import { ElMessageBox, ElMessage } from 'element-plus'; -import { deepClone } from 'avue-plugin-ueditor/packages/ueditor/src/upload/util'; const WaybillStowage = defineAsyncComponent( () => import('@/views/distribution/inventory/BookingNoteComponent/WaybillStowage.vue') @@ -1728,6 +1729,9 @@ const back = () => { /** 前往修改页面 */ const handleEdit = () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + if (Number(details.query.waybillType) === 1 || details.query.orderCode) { // 暂存单转运单的数据 @@ -1761,6 +1765,9 @@ const handleEdit = () => { /** 审核 */ const handleAudit = () => { + if (!ChecksWhetherTheWarehouseIsSelected()) + return ElMessage.warning('多仓权限无法操作,请选择仓库'); + ElMessageBox.confirm('确认审核?', '提示', { confirmButtonText: '确认', cancelButtonText: '取消', diff --git a/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue b/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue index 974a3918..c2e845fd 100644 --- a/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue +++ b/src/views/distribution/inventory/arteryDistrilbutionBillLadingList.vue @@ -350,6 +350,7 @@ import { handleClearTableQuery, deepClone, handleTranslationDataSeclect, + ChecksWhetherTheWarehouseIsSelected, } from '@/utils/util'; import { dateNow } from '@/utils/date'; import { detail } from '@/api/flow/flow'; @@ -652,6 +653,9 @@ export default { }, /** 新增 */ handleAdd() { + if (!ChecksWhetherTheWarehouseIsSelected()) + return this.$message.warning('多仓权限无法操作,请选择仓库'); + this.$router.push({ path: '/distribution/inventory/addArteryDistrilbutionBillLadingList', query: { @@ -675,6 +679,9 @@ export default { }, /** 修改 */ handleEdit() { + if (!ChecksWhetherTheWarehouseIsSelected()) + return this.$message.warning('多仓权限无法操作,请选择仓库'); + if (this.selectionList.length === 0) return this.$message.error('请选择一条数据'); if (this.selectionList.length > 1) return this.$message.error('暂时只支持单条数据操作'); @@ -695,6 +702,8 @@ export default { }, /** 编辑提货数据的状态 */ handleEditBillladingStatus(type: number) { + if (!ChecksWhetherTheWarehouseIsSelected()) + return this.$message.warning('多仓权限无法操作,请选择仓库'); if (this.selectionList.length === 0) return this.$message.error('最少选择一条数据'); if (this.selectionList.length > 1) return this.$message.error('暂时只支持单条数据操作'); @@ -743,6 +752,8 @@ export default { }, /** 开启添加提货数据弹窗 */ handleAddDistrilbution() { + if (!ChecksWhetherTheWarehouseIsSelected()) + return this.$message.warning('多仓权限无法操作,请选择仓库'); if (this.selectionList.length === 0) return this.$message.error('最少选择一条数据'); if (this.selectionList.length > 1) return this.$message.error('暂时只支持单条数据操作'); this.title = '添加提货数据'; diff --git a/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue b/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue index 68f1ade1..5fcb8a42 100644 --- a/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue +++ b/src/views/distribution/inventory/arteryDistrilbutionBillLadingListDetails.vue @@ -294,7 +294,7 @@ import { postFindBillladingLogList, postBillladingDetailExport, } from '@/api/distribution/arteryDistrilbutionBillLadingList'; -import { isNumber, downloadXls } from '@/utils/util'; +import { isNumber, downloadXls, ChecksWhetherTheWarehouseIsSelected } from '@/utils/util'; import { ElMessage } from 'element-plus'; import { dateNow } from '@/utils/date'; import { getToken } from '@/utils/auth'; @@ -767,6 +767,8 @@ export default { /** 开启编辑弹窗 */ handleEdit({ row }) { + if (!ChecksWhetherTheWarehouseIsSelected()) + return this.$message.warning('多仓权限无法操作,请选择仓库'); console.log('row :>> ', row); this.box = true; @@ -799,6 +801,8 @@ export default { /** 修改提交 */ async handleEditSubmit(item) { + if (!ChecksWhetherTheWarehouseIsSelected()) + return this.$message.warning('多仓权限无法操作,请选择仓库'); try { this.loadingObj.pageLoading = true;