diff --git a/src/views/mes/abilityInfo/index.vue b/src/views/mes/abilityInfo/index.vue index 6c6a81d4d..de88e008a 100644 --- a/src/views/mes/abilityInfo/index.vue +++ b/src/views/mes/abilityInfo/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'AbilityInfo' }) const message = useMessage() // 消息弹窗 @@ -206,18 +207,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await AbilityInfoApi.exportAbilityInfo(tableObject.params) download.excel(data, '能力矩阵信息.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/hrPersonAbility/index.vue b/src/views/mes/hrPersonAbility/index.vue index a4bc513f0..108dad806 100644 --- a/src/views/mes/hrPersonAbility/index.vue +++ b/src/views/mes/hrPersonAbility/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'HrPersonAbility' }) const message = useMessage() // 消息弹窗 @@ -218,18 +219,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await HrPersonAbilityApi.exportHrPersonAbility(tableObject.params) download.excel(data, '人员能力矩阵配置.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/item/index.vue b/src/views/mes/item/index.vue index b274a01cc..dea550e7e 100644 --- a/src/views/mes/item/index.vue +++ b/src/views/mes/item/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QmsItem' }) const message = useMessage() // 消息弹窗 @@ -259,18 +260,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ItemApi.exportItem(tableObject.params) download.excel(data, '质检项目定义.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/itemRequestMain/index.vue b/src/views/mes/itemRequestMain/index.vue index 291647ef1..31a5d01c7 100644 --- a/src/views/mes/itemRequestMain/index.vue +++ b/src/views/mes/itemRequestMain/index.vue @@ -82,7 +82,8 @@ import * as ItemRequestDetailApi from '@/api/mes/itemRequestDetail' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesItemRequestMain' }) const message = useMessage() // 消息弹窗 @@ -213,18 +214,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ItemRequestMainApi.exportItemRequestMain(tableObject.params) download.excel(data, '叫料申请单主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/opersteps/index.vue b/src/views/mes/opersteps/index.vue index 48bb42dd9..8ac58c897 100644 --- a/src/views/mes/opersteps/index.vue +++ b/src/views/mes/opersteps/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Opersteps' }) const message = useMessage() // 消息弹窗 @@ -205,18 +206,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await OperstepsApi.exportOpersteps(tableObject.params) download.excel(data, 'MES操作步骤信息.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/operstepsType/index.vue b/src/views/mes/operstepsType/index.vue index 761b74318..43e9d441b 100644 --- a/src/views/mes/operstepsType/index.vue +++ b/src/views/mes/operstepsType/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'OperstepsType' }) const message = useMessage() // 消息弹窗 @@ -205,18 +206,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await OperstepsTypeApi.exportOperstepsType(tableObject.params) download.excel(data, '操作步骤类型配置.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/orderDay/index.vue b/src/views/mes/orderDay/index.vue index 72992349e..32da7ddee 100644 --- a/src/views/mes/orderDay/index.vue +++ b/src/views/mes/orderDay/index.vue @@ -84,7 +84,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import orderDetail from './components/orderDetail.vue' import scheduleDetail from './components/schedule.vue' import scheduleDetailR from './components/scheduleDetail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesOrderDay' }) @@ -323,18 +324,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await OrderDayApi.exportOrderDay(tableObject.params) download.excel(data, '生产日计划.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } const stopPlan = async (id) => { diff --git a/src/views/mes/ordermonthplan/index.vue b/src/views/mes/ordermonthplan/index.vue index d525dfc0f..687bfa0c2 100644 --- a/src/views/mes/ordermonthplan/index.vue +++ b/src/views/mes/ordermonthplan/index.vue @@ -110,7 +110,8 @@ import { MesOrderMonthMainVO, MesOrderMonthSubVO } from "@/api/mes/ordermonthplan"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesOrderMonthMain' }) const message = useMessage() // 消息弹窗 @@ -243,18 +244,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await MesOrderMonthApi.exportMesOrderMonthMain(tableObject.params) download.excel(data, '订单计划月主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/pattern/index.vue b/src/views/mes/pattern/index.vue index 459f4190f..85788116e 100644 --- a/src/views/mes/pattern/index.vue +++ b/src/views/mes/pattern/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Pattern' }) const message = useMessage() // 消息弹窗 @@ -205,18 +206,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PatternApi.exportPattern(tableObject.params) download.excel(data, '模具基本信息.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/patternType/index.vue b/src/views/mes/patternType/index.vue index e0cc50b14..14844ad61 100644 --- a/src/views/mes/patternType/index.vue +++ b/src/views/mes/patternType/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'PatternType' }) const message = useMessage() // 消息弹窗 @@ -205,18 +206,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PatternTypeApi.exportPatternType(tableObject.params) download.excel(data, '模具类型.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/process/index.vue b/src/views/mes/process/index.vue index 8e49c9816..15c7b0057 100644 --- a/src/views/mes/process/index.vue +++ b/src/views/mes/process/index.vue @@ -95,7 +95,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from './components/Detail.vue' import {goalParams} from "@/api/mes/process"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Process' }) const message = useMessage() // 消息弹窗 @@ -315,18 +316,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ProcessApi.exportProcess(tableObject.params) download.excel(data, '工序.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/processroute/index.vue b/src/views/mes/processroute/index.vue index c7a0a30ff..897f1ec56 100644 --- a/src/views/mes/processroute/index.vue +++ b/src/views/mes/processroute/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' import ProcessRouteConfig from './components/configDialog.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Processroute' }) @@ -233,18 +234,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ProcessrouteApi.exportProcessroute(tableObject.params) download.excel(data, '工艺路线定义.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } /** 路线配置操作 */ diff --git a/src/views/mes/productBackline/index.vue b/src/views/mes/productBackline/index.vue index 11c9eb1d5..a8944c3e7 100644 --- a/src/views/mes/productBackline/index.vue +++ b/src/views/mes/productBackline/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesProductBackline' }) const message = useMessage() // 消息弹窗 @@ -212,18 +213,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ProductBacklineApi.exportProductBackline(tableObject.params) download.excel(data, '产品返线登记.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/productOffline/index.vue b/src/views/mes/productOffline/index.vue index 2165b6415..b949bfbf2 100644 --- a/src/views/mes/productOffline/index.vue +++ b/src/views/mes/productOffline/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesProductOffline' }) const message = useMessage() // 消息弹窗 @@ -212,18 +213,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ProductOfflineApi.exportProductOffline(tableObject.params) download.excel(data, '产品离线登记记录.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/productionPlan/index.vue b/src/views/mes/productionPlan/index.vue index 1c9271bea..c78f50814 100644 --- a/src/views/mes/productionPlan/index.vue +++ b/src/views/mes/productionPlan/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesProductionPlan' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ProductionPlanApi.exportProductionPlan(tableObject.params) download.excel(data, '生产排产计划.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/qualityclass/index.vue b/src/views/mes/qualityclass/index.vue index aa7018cab..90ac3c852 100644 --- a/src/views/mes/qualityclass/index.vue +++ b/src/views/mes/qualityclass/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QmsQualityclass' }) const message = useMessage() // 消息弹窗 @@ -205,18 +206,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await QualityclassApi.exportQualityclass(tableObject.params) download.excel(data, '质检类别.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/qualityform/index.vue b/src/views/mes/qualityform/index.vue index d48931b53..d184ffa0f 100644 --- a/src/views/mes/qualityform/index.vue +++ b/src/views/mes/qualityform/index.vue @@ -79,7 +79,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as QualityformDetailApi from '@/api/mes/qualityformdetail' import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QmsQualityform' }) const message = useMessage() // 消息弹窗 @@ -242,18 +243,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await QualityformApi.exportQualityform(tableObject.params) download.excel(data, '质检表单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/qualityformlog/index.vue b/src/views/mes/qualityformlog/index.vue index 9404ddf09..6a8cd784f 100644 --- a/src/views/mes/qualityformlog/index.vue +++ b/src/views/mes/qualityformlog/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QmsQualityformlog' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await QualityformlogApi.exportQualityformlog(tableObject.params) download.excel(data, '质检表单日志.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/qualitygroup/index.vue b/src/views/mes/qualitygroup/index.vue index 04d6a8e6b..c5444d4b4 100644 --- a/src/views/mes/qualitygroup/index.vue +++ b/src/views/mes/qualitygroup/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QmsQualitygroup' }) const message = useMessage() // 消息弹窗 @@ -205,18 +206,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await QualitygroupApi.exportQualitygroup(tableObject.params) download.excel(data, '质检分组.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/reportpStore/index.vue b/src/views/mes/reportpStore/index.vue index 4dc9f9542..057175541 100644 --- a/src/views/mes/reportpStore/index.vue +++ b/src/views/mes/reportpStore/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesReportpStore' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ReportpStoreApi.exportReportpStore(tableObject.params) download.excel(data, '工序报工物料明细.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/reworkBatch/index.vue b/src/views/mes/reworkBatch/index.vue index 252ba6c8f..a1c44881b 100644 --- a/src/views/mes/reworkBatch/index.vue +++ b/src/views/mes/reworkBatch/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesReworkBatch' }) const message = useMessage() // 消息弹窗 @@ -271,18 +272,17 @@ const handleFinish = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ReworkBatchApi.exportReworkBatch(tableObject.params) download.excel(data, '返工返修登记(批量).xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/reworkSingle/index.vue b/src/views/mes/reworkSingle/index.vue index d8e8eb2b8..04029b40b 100644 --- a/src/views/mes/reworkSingle/index.vue +++ b/src/views/mes/reworkSingle/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '../components/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesReworkSingle' }) const message = useMessage() // 消息弹窗 @@ -271,18 +272,17 @@ const handleFinish = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ReworkSingleApi.exportReworkSingle(tableObject.params) download.excel(data, '返工返修登记(单件)数据.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/teamSetting/index.vue b/src/views/mes/teamSetting/index.vue index 135bba85f..5fe13a3e7 100644 --- a/src/views/mes/teamSetting/index.vue +++ b/src/views/mes/teamSetting/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesTeamSetting' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await TeamSettingApi.exportTeamSetting(tableObject.params) download.excel(data, '班组人员管理.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/workScheduling/index.vue b/src/views/mes/workScheduling/index.vue index 8ca2069cd..d69a1b926 100644 --- a/src/views/mes/workScheduling/index.vue +++ b/src/views/mes/workScheduling/index.vue @@ -87,7 +87,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from './components/Detail.vue' import ReportAll from './components/reportAll.vue' import Finish from './components/finish.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesWorkScheduling' }) @@ -290,18 +291,17 @@ const changeBillStatus=async(row,status)=>{ } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await WorkSchedulingApi.exportWorkScheduling(tableObject.params) download.excel(data, '生产任务排产.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/mes/workSchedulingQaform/index.vue b/src/views/mes/workSchedulingQaform/index.vue index b40dddee2..b7053e5a0 100644 --- a/src/views/mes/workSchedulingQaform/index.vue +++ b/src/views/mes/workSchedulingQaform/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesWorkSchedulingQaform' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await WorkSchedulingQaformApi.exportWorkSchedulingQaform(tableObject.params) download.excel(data, '任务质检单.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/aql/index.vue b/src/views/qms/aql/index.vue index e3ccacf2b..46edb659b 100644 --- a/src/views/qms/aql/index.vue +++ b/src/views/qms/aql/index.vue @@ -80,7 +80,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Aql' }) const message = useMessage() // 消息弹窗 @@ -261,19 +262,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await AqlApi.exportAql(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/counter/index.vue b/src/views/qms/counter/index.vue index 6a02cd889..37a422350 100644 --- a/src/views/qms/counter/index.vue +++ b/src/views/qms/counter/index.vue @@ -76,7 +76,8 @@ import { formatDate } from '@/utils/formatTime' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Counter' }) const message = useMessage() // 消息弹窗 @@ -229,19 +230,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CounterApi.exportCounter(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/dynamicRule/index.vue b/src/views/qms/dynamicRule/index.vue index 9643b42a5..c10632a51 100644 --- a/src/views/qms/dynamicRule/index.vue +++ b/src/views/qms/dynamicRule/index.vue @@ -113,7 +113,8 @@ import { formatDate } from '@/utils/formatTime' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'DynamicRule' }) const message = useMessage() // 消息弹窗 @@ -307,19 +308,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await DynamicRuleApi.exportDynamicRule(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionJob/index.vue b/src/views/qms/inspectionJob/index.vue index 16c5c260d..e41beb82b 100644 --- a/src/views/qms/inspectionJob/index.vue +++ b/src/views/qms/inspectionJob/index.vue @@ -124,7 +124,8 @@ import Detail from './detail.vue' import { getReportUrl } from '@/utils/systemParam' import { useUserStore } from '@/store/modules/user' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -414,19 +415,18 @@ const handleAbandon = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectionJobMainApi.exportInspectionJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionMethod/index.vue b/src/views/qms/inspectionMethod/index.vue index 4e3bb66ab..dc1dca735 100644 --- a/src/views/qms/inspectionMethod/index.vue +++ b/src/views/qms/inspectionMethod/index.vue @@ -90,7 +90,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'InspectionMethod' }) const message = useMessage() // 消息弹窗 @@ -294,19 +295,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectionMethodApi.exportInspectionMethod(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionQ1/index.vue b/src/views/qms/inspectionQ1/index.vue index 6092df882..e1f70ab80 100644 --- a/src/views/qms/inspectionQ1/index.vue +++ b/src/views/qms/inspectionQ1/index.vue @@ -85,6 +85,8 @@ import * as CustomeritemApi from '@/api/wms/customeritem' import * as CustomerApi from '@/api/wms/customer' import { useUserStore } from '@/store/modules/user' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const userStore = useUserStore() defineOptions({ name: 'InspectionQ1' }) @@ -364,19 +366,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await Q1Api.exportQ1(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionQ2/index.vue b/src/views/qms/inspectionQ2/index.vue index 9adee6bbb..7557b4633 100644 --- a/src/views/qms/inspectionQ2/index.vue +++ b/src/views/qms/inspectionQ2/index.vue @@ -85,6 +85,8 @@ import * as SupplierApi from '@/api/wms/supplier' import * as ItembasicApi from '@/api/wms/itembasic' import { useUserStore } from '@/store/modules/user' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const userStore = useUserStore() defineOptions({ name: 'InspectionQ2' }) @@ -466,19 +468,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await Q2Api.exportQ2(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionQ3/index.vue b/src/views/qms/inspectionQ3/index.vue index e175ddfcc..a061d7ab9 100644 --- a/src/views/qms/inspectionQ3/index.vue +++ b/src/views/qms/inspectionQ3/index.vue @@ -110,6 +110,8 @@ import * as StdcostpriceApi from '@/api/wms/stdcostprice' import { formatDate } from '@/utils/formatTime' import { async } from '@antv/x6/lib/registry/marker/async' import { useUserStore } from '@/store/modules/user' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const userStore = useUserStore() // 发料申请 @@ -358,19 +360,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectionQ3MainApi.exportInspectionQ3Main(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionRecord/index.vue b/src/views/qms/inspectionRecord/index.vue index a7863738e..02199fe88 100644 --- a/src/views/qms/inspectionRecord/index.vue +++ b/src/views/qms/inspectionRecord/index.vue @@ -138,7 +138,8 @@ import { } from '../inspectionJob/inspectionJobMain.data' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'inspectionRecordMain' }) @@ -393,19 +394,18 @@ const execute = async (type: string, row?: number) => { basicFormRef.value.open(type, row) } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionRecordFirst/index.vue b/src/views/qms/inspectionRecordFirst/index.vue index 75180396d..c8a82be69 100644 --- a/src/views/qms/inspectionRecordFirst/index.vue +++ b/src/views/qms/inspectionRecordFirst/index.vue @@ -80,7 +80,8 @@ import { InspectionTemplateMain,InspectionTemplateProcess,InspectionTemplateFeat import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购订单 defineOptions({ name: 'InspectionRecordMain' }) @@ -224,19 +225,18 @@ const checkQualityReport = async (row) => { /** 列表导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleMainExport = async (row: any) => { try { await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() tableObject.params.number = row.number const excelTitle = ref(route.meta.title) const data = await InspectionRecordMainApi.exportInspectionRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } @@ -247,13 +247,13 @@ const handleMainExport = async (row: any) => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true - const excelTitle = ref(route.meta.title) + loadStart() + const excelTitle = ref(route.meta.title) const data = await InspectionRecordMainApi.exportFirstInspectionRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionRequest/index.vue b/src/views/qms/inspectionRequest/index.vue index b863a1a02..8e04131cb 100644 --- a/src/views/qms/inspectionRequest/index.vue +++ b/src/views/qms/inspectionRequest/index.vue @@ -116,7 +116,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import { formatDate } from '@/utils/formatTime' import { getReportUrl } from '@/utils/systemParam' // import { InspectionJobPackage} from '../inspectionJob/inspectionJobMain.data' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'inspectionMain' }) const message = useMessage() // 消息弹窗 @@ -435,19 +436,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectionMainApi.exportInspectionMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionScheme/index.vue b/src/views/qms/inspectionScheme/index.vue index fec4ebfd9..bd233e050 100644 --- a/src/views/qms/inspectionScheme/index.vue +++ b/src/views/qms/inspectionScheme/index.vue @@ -84,7 +84,8 @@ import * as InspectionSchemeApi from '@/api/qms/inspectionScheme' import ImportForm from '../../../components/ImportForm/src/ImportForm.vue' import * as SampleCodeApi from '@/api/qms/sampleCode' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'InspectionScheme' }) const message = useMessage() // 消息弹窗 @@ -280,19 +281,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectionSchemeApi.exportInspectionScheme(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionStage/index.vue b/src/views/qms/inspectionStage/index.vue index ac7db008e..d5aa0b097 100644 --- a/src/views/qms/inspectionStage/index.vue +++ b/src/views/qms/inspectionStage/index.vue @@ -75,7 +75,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'InspectionStage' }) const message = useMessage() // 消息弹窗 @@ -220,18 +221,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await InspectionStageApi.exportInspectionStage(tableObject.params) download.excel(data, '检验阶段.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/inspectionTemplate/index.vue b/src/views/qms/inspectionTemplate/index.vue index 38d59b1bf..708961e85 100644 --- a/src/views/qms/inspectionTemplate/index.vue +++ b/src/views/qms/inspectionTemplate/index.vue @@ -86,7 +86,8 @@ import Detail from '@/components/Detail/src/Detail.vue' import AddForm from './addForm.vue' import * as InspectionProcessPageApi from '@/api/qms/inspectionTemplate' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'AgvLocationrelation' }) const message = useMessage() // 消息弹窗 @@ -150,19 +151,18 @@ const buttonBaseClick = (val, item) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectionProcessPageApi.exportInspectionTemplate(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/sampleCode/index.vue b/src/views/qms/sampleCode/index.vue index 29e986fb4..18204295e 100644 --- a/src/views/qms/sampleCode/index.vue +++ b/src/views/qms/sampleCode/index.vue @@ -80,7 +80,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SampleCode' }) const message = useMessage() // 消息弹窗 @@ -273,19 +274,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SampleCodeApi.exportSampleCode(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/samplingProcess/index.vue b/src/views/qms/samplingProcess/index.vue index fa87e3649..930106834 100644 --- a/src/views/qms/samplingProcess/index.vue +++ b/src/views/qms/samplingProcess/index.vue @@ -84,7 +84,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { validatePercent, validateInteger, validateTwoNum } from '@/utils/validator' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SamplingProcess' }) const message = useMessage() // 消息弹窗 @@ -264,19 +265,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SamplingProcessApi.exportSamplingProcess(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/samplingScheme/index.vue b/src/views/qms/samplingScheme/index.vue index bc6adb003..41b030803 100644 --- a/src/views/qms/samplingScheme/index.vue +++ b/src/views/qms/samplingScheme/index.vue @@ -79,7 +79,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SamplingScheme' }) const message = useMessage() // 消息弹窗 @@ -262,19 +263,18 @@ const handleDisable = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SamplingSchemeApi.exportSamplingScheme(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/selectedProject/index.vue b/src/views/qms/selectedProject/index.vue index 1e5442f4d..4b9b793bd 100644 --- a/src/views/qms/selectedProject/index.vue +++ b/src/views/qms/selectedProject/index.vue @@ -74,7 +74,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SelectedProject' }) const message = useMessage() // 消息弹窗 @@ -219,18 +220,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SelectedProjectApi.exportSelectedProject(tableObject.params) download.excel(data, '选定集项目.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/qms/selectedSet/index.vue b/src/views/qms/selectedSet/index.vue index d4ca5e698..632e19234 100644 --- a/src/views/qms/selectedSet/index.vue +++ b/src/views/qms/selectedSet/index.vue @@ -116,7 +116,8 @@ import { formatDate } from '@/utils/formatTime' // import TableHead from '@/components/TableHead/src/TableHead.vue' // import ImportForm from '@/components/ImportForm/src/ImportForm.vue' // import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SelectedSet' }) const message = useMessage() // 消息弹窗 @@ -310,19 +311,18 @@ const handleDisable = async (id: number) => { } catch {} } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SelectedSetApi.exportSelectedSet(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/report/printBusinesstypeTemplate/index.vue b/src/views/report/printBusinesstypeTemplate/index.vue index 45b3b13ce..cb75c4f75 100644 --- a/src/views/report/printBusinesstypeTemplate/index.vue +++ b/src/views/report/printBusinesstypeTemplate/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'PrintBusinesstypeTemplate' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PrintBusinesstypeTemplateApi.exportPrintBusinesstypeTemplate(tableObject.params) download.excel(data, '打印服务业务类型和打印模板关系.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/report/printClientPrinter/index.vue b/src/views/report/printClientPrinter/index.vue index 59c64000d..83e43bad8 100644 --- a/src/views/report/printClientPrinter/index.vue +++ b/src/views/report/printClientPrinter/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'PrintClientPrinter' }) const message = useMessage() // 消息弹窗 @@ -198,18 +199,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PrintClientPrinterApi.exportPrintClientPrinter(tableObject.params) download.excel(data, '打印服务客户端与打印机名称关系.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/dict/data/index.vue b/src/views/system/dict/data/index.vue index f07f1ae6a..ba691061a 100644 --- a/src/views/system/dict/data/index.vue +++ b/src/views/system/dict/data/index.vue @@ -122,7 +122,8 @@ import download from '@/utils/download' import * as DictDataApi from '@/api/system/dict/dict.data' import * as DictTypeApi from '@/api/system/dict/dict.type' import DictDataForm from './DictDataForm.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemDictData' }) const message = useMessage() // 消息弹窗 @@ -192,12 +193,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await DictDataApi.exportDictData(queryParams) download.excel(data, '字典数据.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/dict/index.vue b/src/views/system/dict/index.vue index 72255bf61..ec6f925a4 100644 --- a/src/views/system/dict/index.vue +++ b/src/views/system/dict/index.vue @@ -101,7 +101,8 @@ import { dateFormatter } from '@/utils/formatTime' import * as DictTypeApi from '@/api/system/dict/dict.type' import DictTypeForm from './DictTypeForm.vue' import download from '@/utils/download' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemDictType' }) const message = useMessage() // 消息弹窗 @@ -170,12 +171,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await DictTypeApi.exportDictType(queryParams) download.excel(data, '字典类型.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/errorCode/index.vue b/src/views/system/errorCode/index.vue index dac5240a0..5252159e2 100644 --- a/src/views/system/errorCode/index.vue +++ b/src/views/system/errorCode/index.vue @@ -86,7 +86,8 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as ErrorCodeApi from '@/api/system/errorCode' import ErrorCodeForm from './ErrorCodeForm.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemErrorCode' }) const message = useMessage() // 消息弹窗 @@ -155,12 +156,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ErrorCodeApi.excelErrorCode(queryParams) download.excel(data, '错误码.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/loginlog/index.vue b/src/views/system/loginlog/index.vue index 997fcef9d..4abaf895a 100644 --- a/src/views/system/loginlog/index.vue +++ b/src/views/system/loginlog/index.vue @@ -70,7 +70,8 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as LoginLogApi from '@/api/system/loginLog' import LoginLogDetail from './LoginLogDetail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemLoginLog' }) const message = useMessage() // 消息弹窗 @@ -124,12 +125,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await LoginLogApi.exportLoginLog(queryParams) download.excel(data, '登录日志.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/messageSet/index.vue b/src/views/system/messageSet/index.vue index 94ea11c87..a949cd91d 100644 --- a/src/views/system/messageSet/index.vue +++ b/src/views/system/messageSet/index.vue @@ -68,7 +68,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as TableActionRelApi from '@/api/system/tableActionRel' import { validateCode } from '@/utils/validator' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MessageSet' }) const message = useMessage() // 消息弹窗 @@ -212,12 +213,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await MessageSetApi.exportMessageSet(tableObject.params) download.excel(data, '消息设置.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/operatelog/index.vue b/src/views/system/operatelog/index.vue index 3bfd3d20e..41e7f41dc 100644 --- a/src/views/system/operatelog/index.vue +++ b/src/views/system/operatelog/index.vue @@ -87,7 +87,8 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as OperateLogApi from '@/api/system/operatelog' import OperateLogDetail from './OperateLogDetail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemOperateLog' }) const message = useMessage() // 消息弹窗 @@ -143,12 +144,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await OperateLogApi.exportOperateLog(queryParams) download.excel(data, '操作日志.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/post/index.vue b/src/views/system/post/index.vue index 6c2ae14ce..a53b5ac4e 100644 --- a/src/views/system/post/index.vue +++ b/src/views/system/post/index.vue @@ -73,7 +73,8 @@ import { dateFormatter } from '@/utils/formatTime' import download from '@/utils/download' import * as PostApi from '@/api/system/post' import PostForm from './PostForm.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemPost' }) const message = useMessage() // 消息弹窗 @@ -141,12 +142,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PostApi.exportPost(queryParams) download.excel(data, '岗位列表.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/role/index.vue b/src/views/system/role/index.vue index 22bc8f76a..d67333373 100644 --- a/src/views/system/role/index.vue +++ b/src/views/system/role/index.vue @@ -167,7 +167,8 @@ import * as RoleApi from '@/api/system/role' import RoleForm from './RoleForm.vue' import RoleAssignMenuForm from './RoleAssignMenuForm.vue' import RoleDataPermissionForm from './RoleDataPermissionForm.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemRole' }) const message = useMessage() // 消息弹窗 @@ -248,12 +249,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await RoleApi.exportRole(queryParams) download.excel(data, '角色列表.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/sensitiveWord/index.vue b/src/views/system/sensitiveWord/index.vue index e01a3be2a..c2c083388 100644 --- a/src/views/system/sensitiveWord/index.vue +++ b/src/views/system/sensitiveWord/index.vue @@ -97,7 +97,8 @@ import download from '@/utils/download' import * as SensitiveWordApi from '@/api/system/sensitiveWord' import SensitiveWordForm from './SensitiveWordForm.vue' import SensitiveWordTestForm from './SensitiveWordTestForm.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemSensitiveWord' }) const message = useMessage() // 消息弹窗 @@ -173,12 +174,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SensitiveWordApi.exportSensitiveWord(queryParams) download.excel(data, '敏感词.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/serialNumber/index.vue b/src/views/system/serialNumber/index.vue index 6eb5122c0..315469092 100644 --- a/src/views/system/serialNumber/index.vue +++ b/src/views/system/serialNumber/index.vue @@ -100,7 +100,8 @@ import download from '@/utils/download' import * as SerialNumberApi from '@/api/system/serialNumber' import SerialNumberForm from './SerialNumberForm.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const route = useRoute() //路由信息 defineOptions({ name: 'SerialNumber' }) @@ -169,13 +170,13 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SerialNumberApi.exportSerialNumber(queryParams) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/sms/log/index.vue b/src/views/system/sms/log/index.vue index bc7c3ff60..4d9c0504e 100644 --- a/src/views/system/sms/log/index.vue +++ b/src/views/system/sms/log/index.vue @@ -116,7 +116,8 @@ import download from '@/utils/download' import * as SmsChannelApi from '@/api/system/sms/smsChannel' import * as SmsLogApi from '@/api/system/sms/smsLog' import SmsLogDetail from './SmsLogDetail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemSmsLog' }) const message = useMessage() // 消息弹窗 @@ -169,12 +170,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SmsLogApi.exportSmsLog(queryParams) download.excel(data, '短信日志.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/sms/template/index.vue b/src/views/system/sms/template/index.vue index b9e478c60..99198b0ba 100644 --- a/src/views/system/sms/template/index.vue +++ b/src/views/system/sms/template/index.vue @@ -116,7 +116,8 @@ import * as SmsChannelApi from '@/api/system/sms/smsChannel' import download from '@/utils/download' import SmsTemplateForm from './SmsTemplateForm.vue' import SmsTemplateSendForm from './SmsTemplateSendForm.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemSmsTemplate' }) const message = useMessage() // 消息弹窗 @@ -195,12 +196,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SmsTemplateApi.exportSmsTemplate(queryParams) download.excel(data, '短信模板.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/tableActionRel/index.vue b/src/views/system/tableActionRel/index.vue index 10f7d8370..916265e22 100644 --- a/src/views/system/tableActionRel/index.vue +++ b/src/views/system/tableActionRel/index.vue @@ -67,6 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { getStrDictOptions } from '@/utils/dict' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'TableActionRel' }) const message = useMessage() // 消息弹窗 @@ -202,18 +204,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await TableActionRelApi.exportTableActionRel(tableObject.params) download.excel(data, '表名动作关系.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/tenant/index.vue b/src/views/system/tenant/index.vue index 7e61bb6da..8cba27a37 100644 --- a/src/views/system/tenant/index.vue +++ b/src/views/system/tenant/index.vue @@ -105,6 +105,8 @@ import * as TenantApi from '@/api/system/tenant' import * as TenantPackageApi from '@/api/system/tenantPackage' import TenantForm from './TenantForm.vue' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const route = useRoute() //路由信息 defineOptions({ name: 'SystemTenant' }) @@ -177,13 +179,13 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TenantApi.exportTenant(queryParams) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index 541a7f3ef..bba0aa3e6 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -113,7 +113,8 @@ import UserImportForm from './UserImportForm.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import UserAssignRoleForm from './UserAssignRoleForm.vue' import DeptTree from './DeptTree.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SystemUser' }) const message = useMessage() // 消息弹窗 @@ -204,12 +205,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await UserApi.exportUser(queryParams) download.excel(data, '用户数据.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/agvManage/agvLocationrelation/index.vue b/src/views/wms/agvManage/agvLocationrelation/index.vue index db76421b9..e10115293 100644 --- a/src/views/wms/agvManage/agvLocationrelation/index.vue +++ b/src/views/wms/agvManage/agvLocationrelation/index.vue @@ -70,7 +70,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'AgvLocationrelation' }) const message = useMessage() // 消息弹窗 @@ -236,19 +237,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await AgvLocationrelationApi.exportAgvLocationrelation(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/agvManage/interfaceInfo/index.vue b/src/views/wms/agvManage/interfaceInfo/index.vue index 5839696e8..0e89c5afb 100644 --- a/src/views/wms/agvManage/interfaceInfo/index.vue +++ b/src/views/wms/agvManage/interfaceInfo/index.vue @@ -76,7 +76,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 接口调用信息 defineOptions({ name: 'InterfaceInfo' }) @@ -208,18 +209,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await InterfaceInfoApi.exportInterfaceInfo(tableObject.params) download.excel(data, '接口调用信息.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/customerManage/customer/index.vue b/src/views/wms/basicDataManage/customerManage/customer/index.vue index 23fcf495a..ee7cccf37 100644 --- a/src/views/wms/basicDataManage/customerManage/customer/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customer/index.vue @@ -68,7 +68,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Customer' }) const message = useMessage() // 消息弹窗 @@ -225,20 +226,19 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerApi.exportCustomer(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue index 20d29e3fc..dfa288246 100644 --- a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'CustomerDeliveryForecast' }) const message = useMessage() // 消息弹窗 @@ -214,19 +215,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerDeliveryForecastApi.exportCustomerDeliveryForecast(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue index 3bdbcf2ff..eed1bd1e9 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Customerdock' }) const message = useMessage() // 消息弹窗 @@ -240,19 +241,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerdockApi.exportCustomerdock(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/customerManage/customeritem/index.vue b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue index a59fa6b00..40ea29d56 100644 --- a/src/views/wms/basicDataManage/customerManage/customeritem/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue @@ -72,7 +72,8 @@ import Detail from '@/components/Detail/src/Detail.vue' import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from '../../itemManage/itembasic/itembasic.data' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Customeritem' }) const message = useMessage() // 消息弹窗 @@ -264,19 +265,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomeritemApi.exportCustomeritem(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/customerManage/project/index.vue b/src/views/wms/basicDataManage/customerManage/project/index.vue index b60be4717..5983cbefe 100644 --- a/src/views/wms/basicDataManage/customerManage/project/index.vue +++ b/src/views/wms/basicDataManage/customerManage/project/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Project' }) const message = useMessage() // 消息弹窗 @@ -234,19 +235,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProjectApi.exportProject(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/customerManage/saleprice/index.vue b/src/views/wms/basicDataManage/customerManage/saleprice/index.vue index a45e1a2cd..824a050df 100644 --- a/src/views/wms/basicDataManage/customerManage/saleprice/index.vue +++ b/src/views/wms/basicDataManage/customerManage/saleprice/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Saleprice' }) const message = useMessage() // 消息弹窗 @@ -238,19 +239,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SalepriceApi.exportSaleprice(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue index 75fd03e19..96f40f06c 100644 --- a/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/businesstype/index.vue @@ -79,7 +79,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 业务类型 defineOptions({ name: 'Businesstype' }) @@ -358,19 +359,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BusinesstypeApi.exportBusinesstype(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue index 2876ac673..f432ede15 100644 --- a/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/documentsetting/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Documentsetting' }) const message = useMessage() // 消息弹窗 @@ -206,19 +207,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await DocumentsettingApi.exportDocumentsetting(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue index da5b90f47..91ddc0cc9 100644 --- a/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/jobsetting/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Jobsetting' }) const message = useMessage() // 消息弹窗 @@ -206,19 +207,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await JobsettingApi.exportJobsetting(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/plansetting/index.vue b/src/views/wms/basicDataManage/documentSetting/plansetting/index.vue index 38e3d53d6..a26a12524 100644 --- a/src/views/wms/basicDataManage/documentSetting/plansetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/plansetting/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Plansetting' }) const message = useMessage() // 消息弹窗 @@ -207,19 +208,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PlansettingApi.exportPlansetting(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue index 9c0b89c99..7a9e2dca6 100644 --- a/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/recordsetting/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Recordsetting' }) const message = useMessage() // 消息弹窗 @@ -207,19 +208,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RecordsettingApi.exportRecordsetting(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue b/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue index 152e404c0..5680677f4 100644 --- a/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/requestsetting/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Requestsetting' }) const message = useMessage() // 消息弹窗 @@ -207,19 +208,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RequestsettingApi.exportRequestsetting(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/switch/index.vue b/src/views/wms/basicDataManage/documentSetting/switch/index.vue index e0d9f75d9..7816788d9 100644 --- a/src/views/wms/basicDataManage/documentSetting/switch/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/switch/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Switch' }) const message = useMessage() // 消息弹窗 @@ -182,19 +183,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SwitchApi.exportSwitch(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue index fc266b8c5..9f289a462 100644 --- a/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue +++ b/src/views/wms/basicDataManage/documentSetting/transactiontype/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Transactiontype' }) const message = useMessage() // 消息弹窗 @@ -208,19 +209,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransactiontypeApi.exportTransactiontype(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue b/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue index 590d01593..ee896d96d 100644 --- a/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue @@ -69,7 +69,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Area' }) const message = useMessage() // 消息弹窗 @@ -240,19 +241,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await AreaApi.exportArea(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/dock/index.vue b/src/views/wms/basicDataManage/factoryModeling/dock/index.vue index 19a6e4f6f..23d8210c4 100644 --- a/src/views/wms/basicDataManage/factoryModeling/dock/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/dock/index.vue @@ -71,7 +71,8 @@ import Detail from '@/components/Detail/src/Detail.vue' import * as LocationApi from '@/api/wms/location' import { Location } from '@/views/wms/basicDataManage/factoryModeling/location/location.data' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Dock' }) const message = useMessage() // 消息弹窗 @@ -254,19 +255,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await DockApi.exportDock(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue b/src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue index c9a0f1bd6..057d48313 100644 --- a/src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/enterprise/index.vue @@ -60,7 +60,8 @@ import { Enterprise,EnterpriseRules } from './enterprise.data' import * as EnterpriseApi from '@/api/wms/enterprise' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Enterprise' }) const message = useMessage() // 消息弹窗 @@ -222,19 +223,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await EnterpriseApi.exportEnterprise(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/location/index.vue b/src/views/wms/basicDataManage/factoryModeling/location/index.vue index bb66c4f51..67ad98430 100644 --- a/src/views/wms/basicDataManage/factoryModeling/location/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/location/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 基础信息——库位 defineOptions({ name: 'Location' }) @@ -258,19 +259,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await LocationApi.exportLocation(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue b/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue index e67899ff0..a68c87e05 100644 --- a/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库位组管理 defineOptions({ name: 'Locationgroup' }) @@ -239,19 +240,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await LocationgroupApi.exportLocationgroup(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/process/index.vue b/src/views/wms/basicDataManage/factoryModeling/process/index.vue index aa303e210..aabae0d63 100644 --- a/src/views/wms/basicDataManage/factoryModeling/process/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/process/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Process' }) const message = useMessage() // 消息弹窗 @@ -246,19 +247,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProcessApi.exportProcess(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue b/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue index e64470322..5880c4db2 100644 --- a/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产线管理 defineOptions({ name: 'Productionline' }) @@ -239,19 +240,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionlineApi.exportProductionline(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue b/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue index b5906b5e9..308b558b2 100644 --- a/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Warehouse' }) const message = useMessage() // 消息弹窗 @@ -219,19 +220,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await WarehouseApi.exportWarehouse(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue b/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue index a69cc1591..2be522be7 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Workshop' }) const message = useMessage() // 消息弹窗 @@ -221,19 +222,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await WorkshopApi.exportWorkshop(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue index 3fb62c9fe..74b7ce79e 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 工位管理 defineOptions({ name: 'Workstation' }) @@ -248,19 +249,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await WorkstationApi.exportWorkstation(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/bom/index.vue b/src/views/wms/basicDataManage/itemManage/bom/index.vue index ba444db7b..97e7a07b0 100644 --- a/src/views/wms/basicDataManage/itemManage/bom/index.vue +++ b/src/views/wms/basicDataManage/itemManage/bom/index.vue @@ -69,7 +69,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as ProcessApi from "@/api/wms/process"; import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 物料清单bom defineOptions({ name: 'Bom' }) @@ -251,19 +252,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BomApi.exportBom(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue index 0b154fe13..83d40f81c 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue @@ -98,7 +98,8 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache'   import ImportForm from '@/components/ImportForm/src/ImportForm.vue'   import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 发货申请 // 物料库区配置管理 defineOptions({ name: 'Itemarea' }) @@ -328,19 +329,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ItemareaApi.exportItemarea(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue index 63bf41417..4ec41f541 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue @@ -89,7 +89,8 @@ import * as ExpectinApi from '@/api/wms/expectin' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() //物料基础信息 defineOptions({ name: 'Itembasic' }) @@ -285,13 +286,13 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ItembasicApi.exportItembasic(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue index b02b605e8..e85e8834b 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue @@ -82,7 +82,8 @@ import { Itembasic } from '../itembasic/itembasic.data' import * as PackageunitApi from '@/api/wms/packageunit' import { Packageunit } from '../packageunit/packageunit.data' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Itempackaging' }) const message = useMessage() // 消息弹窗 @@ -318,19 +319,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ItempackagingApi.exportItempackaging(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue b/src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue index 29bb8bc92..608621e1d 100644 --- a/src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemwarehouse/index.vue @@ -68,7 +68,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as WarehouseApi from "@/api/wms/warehouse"; import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Itemwarehouse' }) const message = useMessage() // 消息弹窗 @@ -222,19 +223,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ItemwarehouseApi.exportItemwarehouse(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue index 851be23b8..ac659b85d 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue +++ b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Packageunit' }) const message = useMessage() // 消息弹窗 @@ -263,19 +264,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackageunitApi.exportPackageunit(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue index ba6958905..7063d47a2 100644 --- a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue +++ b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ProductionitemcodeSpareitemcode' }) const message = useMessage() // 消息弹窗 @@ -232,19 +233,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionitemcodeSpareitemcodeApi.exportProductionitemcodeSpareitemcode(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue index 95378bdd7..7c0bfd7df 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() //生产线物料关系管理 defineOptions({ name: 'Productionlineitem' }) @@ -244,13 +245,13 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionlineitemApi.exportProductionlineitem(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue b/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue index e506add43..3e8be445c 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRecord/index.vue @@ -82,7 +82,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'RelegateRecordMain' }) const message = useMessage() // 消息弹窗 @@ -227,19 +228,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RelegateRecordMainApi.exportRelegateRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue index c3ecd7337..09bdbd0ae 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue @@ -100,7 +100,8 @@ import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'RelegateRequestMain' }) const message = useMessage() // 消息弹窗 @@ -708,19 +709,18 @@ const handleDeleteTable = (item, index) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RelegateRequestMainApi.exportRelegateRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue b/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue index 91f036856..0fc1f8cb6 100644 --- a/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue +++ b/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue @@ -68,7 +68,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 标准成本价格单 defineOptions({ name: 'Stdcostprice' }) @@ -231,19 +232,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await StdcostpriceApi.exportStdcostprice(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/barbasic/index.vue b/src/views/wms/basicDataManage/labelManage/barbasic/index.vue index def5b33c9..b49f9fbbe 100644 --- a/src/views/wms/basicDataManage/labelManage/barbasic/index.vue +++ b/src/views/wms/basicDataManage/labelManage/barbasic/index.vue @@ -66,7 +66,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Barbasic' }) const message = useMessage() // 消息弹窗 @@ -191,18 +192,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await BarbasicApi.exportBarbasic(tableObject.params) download.excel(data, '条码实体基类.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/barcode/index.vue b/src/views/wms/basicDataManage/labelManage/barcode/index.vue index 8f9768c8e..dd93d9161 100644 --- a/src/views/wms/basicDataManage/labelManage/barcode/index.vue +++ b/src/views/wms/basicDataManage/labelManage/barcode/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Barcode' }) const message = useMessage() // 消息弹窗 @@ -211,19 +212,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BarcodeApi.exportBarcode(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue index 48d4fb5c1..93bd23c40 100644 --- a/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue +++ b/src/views/wms/basicDataManage/labelManage/callmaterials/index.vue @@ -80,6 +80,8 @@ import * as ItembasicApi from '@/api/wms/itembasic' import { Itembasic } from '@/views/wms/basicDataManage/itemManage/itembasic/itembasic.data' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 叫料标签 defineOptions({ name: 'Callmaterials' }) @@ -283,19 +285,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CallmaterialsApi.exportCallmaterials(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/labeltype/index.vue b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue index 458599ffc..9f3467bb7 100644 --- a/src/views/wms/basicDataManage/labelManage/labeltype/index.vue +++ b/src/views/wms/basicDataManage/labelManage/labeltype/index.vue @@ -63,7 +63,8 @@ import * as LabeltypeApi from '@/api/wms/labeltype' import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Labeltype' }) const message = useMessage() // 消息弹窗 @@ -221,18 +222,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await LabeltypeApi.exportLabeltype(tableObject.params) download.excel(data, '标签定义.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue b/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue index 5a1acb4e2..e15d3f207 100644 --- a/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue +++ b/src/views/wms/basicDataManage/labelManage/locationLabel/index.vue @@ -55,7 +55,8 @@ import { formatTime } from '@/utils/index' import * as Itempackaging from '@/api/wms/itempackaging' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库位标签 defineOptions({ name: 'LocationLabel' }) @@ -170,19 +171,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BarbasicApi.exportBarbasic(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue index 17cb43b00..0247f00e0 100644 --- a/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/manufacturePackage/index.vue @@ -68,7 +68,8 @@ import { formatTime } from '@/utils/index' import * as Itempackaging from '@/api/wms/itempackage' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购标签 defineOptions({ name: 'PurchasePackage' }) @@ -239,19 +240,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BarbasicApi.exportBarbasic(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue index 15c3d7362..4d90e8bbf 100644 --- a/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/purchasePackage/index.vue @@ -69,7 +69,8 @@ import { formatTime } from '@/utils/index' import * as Itempackaging from '@/api/wms/itempackage' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购标签 defineOptions({ name: 'PurchasePackage' }) @@ -240,19 +241,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BarbasicApi.exportBarbasic(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue b/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue index 5384a4054..8fc6390f6 100644 --- a/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue +++ b/src/views/wms/basicDataManage/labelManage/utensilPackage/index.vue @@ -65,7 +65,8 @@ import { Package,PackageRules } from './utensilPackage.data' import * as BarbasicApi from '@/api/wms/barbasic' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 器具标签 defineOptions({ name: 'UtensilPackage' }) @@ -222,19 +223,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BarbasicApi.exportBarbasic(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/orderManage/carrier/index.vue b/src/views/wms/basicDataManage/orderManage/carrier/index.vue index 79d96bdb5..d5948afae 100644 --- a/src/views/wms/basicDataManage/orderManage/carrier/index.vue +++ b/src/views/wms/basicDataManage/orderManage/carrier/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Carrier' }) const message = useMessage() // 消息弹窗 @@ -226,19 +227,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CarrierApi.exportCarrier(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/orderManage/owner/index.vue b/src/views/wms/basicDataManage/orderManage/owner/index.vue index f20387be5..7d9e7ab4c 100644 --- a/src/views/wms/basicDataManage/orderManage/owner/index.vue +++ b/src/views/wms/basicDataManage/orderManage/owner/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Owner' }) const message = useMessage() // 消息弹窗 @@ -227,19 +228,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await OwnerApi.exportOwner(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/orderManage/shift/index.vue b/src/views/wms/basicDataManage/orderManage/shift/index.vue index 22878a2e9..3980d5577 100644 --- a/src/views/wms/basicDataManage/orderManage/shift/index.vue +++ b/src/views/wms/basicDataManage/orderManage/shift/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Shift' }) const message = useMessage() // 消息弹窗 @@ -233,19 +234,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ShiftApi.exportShift(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/orderManage/team/index.vue b/src/views/wms/basicDataManage/orderManage/team/index.vue index cc08b49d7..102177447 100644 --- a/src/views/wms/basicDataManage/orderManage/team/index.vue +++ b/src/views/wms/basicDataManage/orderManage/team/index.vue @@ -69,7 +69,8 @@ import Detail from '@/components/Detail/src/Detail.vue' import TeamForm from "@/views/wms/basicDataManage/orderManage/team/teamForm.vue"; import {sync} from "rimraf"; import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Team' }) const message = useMessage() // 消息弹窗 @@ -221,19 +222,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TeamApi.exportTeam(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/strategySetting/condition/index.vue b/src/views/wms/basicDataManage/strategySetting/condition/index.vue index a6baf7f12..fe01c9e46 100644 --- a/src/views/wms/basicDataManage/strategySetting/condition/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/condition/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Condition' }) const message = useMessage() // 消息弹窗 @@ -172,18 +173,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ConditionApi.exportCondition(tableObject.params) download.excel(data, '条件.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/strategySetting/configuration/index.vue b/src/views/wms/basicDataManage/strategySetting/configuration/index.vue index 5abe735fd..c705793e1 100644 --- a/src/views/wms/basicDataManage/strategySetting/configuration/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/configuration/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Configuration' }) const message = useMessage() // 消息弹窗 @@ -172,18 +173,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ConfigurationApi.exportConfiguration(tableObject.params) download.excel(data, '配置.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue b/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue index c6ac47b7b..71167ca55 100644 --- a/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/configurationsetting/index.vue @@ -76,7 +76,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Configurationsetting' }) const message = useMessage() // 消息弹窗 @@ -203,19 +204,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ConfigurationsettingApi.exportConfigurationsetting(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue b/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue index fe73a5e78..21acd2581 100644 --- a/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/paramsetting/index.vue @@ -67,7 +67,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Paramsetting' }) const message = useMessage() // 消息弹窗 @@ -174,19 +175,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ParamsettingApi.exportParamsetting(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/strategySetting/rule/index.vue b/src/views/wms/basicDataManage/strategySetting/rule/index.vue index 60e3f76b3..bdbfd4a7b 100644 --- a/src/views/wms/basicDataManage/strategySetting/rule/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/rule/index.vue @@ -75,7 +75,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Rule' }) const message = useMessage() // 消息弹窗 @@ -206,19 +207,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RuleApi.exportRule(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue index f3ac86752..571814a5b 100644 --- a/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue +++ b/src/views/wms/basicDataManage/strategySetting/strategy/upShelfStrategy/index.vue @@ -66,7 +66,8 @@ import * as RuleApi from '@/api/wms/rule' import AddForm from './AddForm.vue' import download from '@/utils/download' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplieDeliveryStrategy' }) const queryFormRef = ref() // 搜索的表单 @@ -152,14 +153,13 @@ const isShowMainButton = (row,val) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { console.log('queryParams',queryParams) try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain( queryParams @@ -167,7 +167,7 @@ const handleExport = async () => { download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } /** 导入 */ diff --git a/src/views/wms/basicDataManage/subject/mstr/index.vue b/src/views/wms/basicDataManage/subject/mstr/index.vue index 21ef6c458..616377da4 100644 --- a/src/views/wms/basicDataManage/subject/mstr/index.vue +++ b/src/views/wms/basicDataManage/subject/mstr/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Mstr' }) const message = useMessage() // 消息弹窗 @@ -205,19 +206,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await MstrApi.exportMstr(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/subject/qadCostcentre/index.vue b/src/views/wms/basicDataManage/subject/qadCostcentre/index.vue index 793648000..2a5af579d 100644 --- a/src/views/wms/basicDataManage/subject/qadCostcentre/index.vue +++ b/src/views/wms/basicDataManage/subject/qadCostcentre/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QadCostcentre' }) const message = useMessage() // 消息弹窗 @@ -214,19 +215,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await QadCostcentreApi.exportQadCostcentre(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/subject/qadProject/index.vue b/src/views/wms/basicDataManage/subject/qadProject/index.vue index b8d2103cb..32539d6a4 100644 --- a/src/views/wms/basicDataManage/subject/qadProject/index.vue +++ b/src/views/wms/basicDataManage/subject/qadProject/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QadProject' }) const message = useMessage() // 消息弹窗 @@ -214,19 +215,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await QadProjectApi.exportQadProject(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/subject/subjectAccount/index.vue b/src/views/wms/basicDataManage/subject/subjectAccount/index.vue index 73739b5ad..659efc5b8 100644 --- a/src/views/wms/basicDataManage/subject/subjectAccount/index.vue +++ b/src/views/wms/basicDataManage/subject/subjectAccount/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SubjectAccount' }) const message = useMessage() // 消息弹窗 @@ -223,19 +224,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SubjectAccountApi.exportSubjectAccount(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue index e0b869549..1aaccbe82 100644 --- a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue @@ -68,7 +68,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Purchaseprice' }) const message = useMessage() // 消息弹窗 @@ -238,13 +239,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value.includes('SCP')){ const data = await PurchasepriceApi.exportPurchasepriceSCP(tableObject.params) @@ -255,7 +255,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue index a599ee3f0..0edf1afcd 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Supplier' }) const message = useMessage() // 消息弹窗 @@ -220,13 +221,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() if(routeName.value.includes('SCP')){ const data = await SupplierApi.exportSupplierSCP(tableObject.params) download.excel(data, `【${route.meta.title}】【${formatDate(new Date())}】.xlsx`) @@ -236,7 +236,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/supplierManage/supplierCycle/index.vue b/src/views/wms/basicDataManage/supplierManage/supplierCycle/index.vue index e4db35496..506c82209 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplierCycle/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplierCycle/index.vue @@ -81,6 +81,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 要货预测周期管理 defineOptions({ name: 'SupplierCycle' }) @@ -229,19 +231,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierCycleApi.exportSupplierCycle(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue index 486c73b79..38854bac7 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue @@ -67,7 +67,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Supplieritem' }) const message = useMessage() // 消息弹窗 @@ -253,13 +254,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value.includes('SCP')){ const data = await SupplieritemApi.exportSupplieritemSCP(tableObject.params) @@ -270,7 +270,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue b/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue index dd8b5506a..2343429a6 100644 --- a/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue +++ b/src/views/wms/basicDataManage/systemSetting/accountcalendar/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Accountcalendar' }) const message = useMessage() // 消息弹窗 @@ -207,19 +208,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await AccountcalendarApi.exportAccountcalendar(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue b/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue index 2d14a2eed..5feaff41b 100644 --- a/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue +++ b/src/views/wms/basicDataManage/systemSetting/currencyexchange/index.vue @@ -67,7 +67,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Currencyexchange' }) const message = useMessage() // 消息弹窗 @@ -208,19 +209,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CurrencyexchangeApi.exportCurrencyexchange(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue b/src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue index c54af273d..862db6be2 100644 --- a/src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue +++ b/src/views/wms/basicDataManage/systemSetting/supplierUser/index.vue @@ -75,6 +75,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 供应商用户关联管理 defineOptions({ name: 'SupplierUser' }) @@ -214,21 +216,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true - tableObject.loading = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierUserApi.exportSupplierUser(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false - tableObject.loading = false + loadDone() } } diff --git a/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue b/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue index e0444e796..e41a66b38 100644 --- a/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue +++ b/src/views/wms/basicDataManage/systemSetting/systemcalendar/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Systemcalendar' }) const message = useMessage() // 消息弹窗 @@ -207,19 +208,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SystemcalendarApi.exportSystemcalendar(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/buttMesManage/mesBarCode/index.vue b/src/views/wms/buttMesManage/mesBarCode/index.vue index b2fdfcccf..35f970327 100644 --- a/src/views/wms/buttMesManage/mesBarCode/index.vue +++ b/src/views/wms/buttMesManage/mesBarCode/index.vue @@ -74,7 +74,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { getTenantId }from '@/utils/auth' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'MesBarCode' }) @@ -216,19 +217,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await MesBarCodeApi.exportMesBarCode(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/countManage/count/countJobMain/index.vue b/src/views/wms/countManage/count/countJobMain/index.vue index 7a6bcf25a..3ec2dc207 100644 --- a/src/views/wms/countManage/count/countJobMain/index.vue +++ b/src/views/wms/countManage/count/countJobMain/index.vue @@ -100,6 +100,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import * as PackageunitApi from '@/api/wms/packageunit' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 盘点任务主 defineOptions({ name: 'CountJobMain' }) @@ -341,19 +343,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CountJobMainApi.exportCountJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } @@ -361,14 +362,14 @@ const handleExport = async () => { const handleExportCountJob = async (id: number, number: string) => { try { await message.exportConfirm() - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CountJobMainApi.handleExportCountJob(id) // download.excel(data, '盘点任务主'+number+'.xlsx') download.excel(data, `【${excelTitle.value}${number}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/countManage/count/countPlanMain/index.vue b/src/views/wms/countManage/count/countPlanMain/index.vue index cf020b296..f4457805e 100644 --- a/src/views/wms/countManage/count/countPlanMain/index.vue +++ b/src/views/wms/countManage/count/countPlanMain/index.vue @@ -145,7 +145,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import BasicFormWmsCount from '@/components/BasicForm/src/BasicFormWmsCount.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 盘点计划主 defineOptions({ name: 'CountPlanMain' }) @@ -637,19 +638,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CountPlanMainApi.exportCountPlanMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/countManage/count/countRecordMain/index.vue b/src/views/wms/countManage/count/countRecordMain/index.vue index 88ae6448c..a3a7ae8f5 100644 --- a/src/views/wms/countManage/count/countRecordMain/index.vue +++ b/src/views/wms/countManage/count/countRecordMain/index.vue @@ -68,6 +68,8 @@ import * as CountRecordDetailApi from '@/api/wms/countRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 盘点记录主 defineOptions({ name: 'CountRecordMain' }) @@ -159,19 +161,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CountRecordMainApi.exportCountRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/countManage/count/countRequestMain/index.vue b/src/views/wms/countManage/count/countRequestMain/index.vue index 4a90f6378..9c4a60078 100644 --- a/src/views/wms/countManage/count/countRequestMain/index.vue +++ b/src/views/wms/countManage/count/countRequestMain/index.vue @@ -115,7 +115,8 @@ import * as CountRequestDetailApi from '@/api/wms/countRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { SearchTableCount } from '@/components/SearchTableCount' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 盘点申请 defineOptions({ name: 'CountRequestMain' }) @@ -494,19 +495,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CountRequestMainApi.exportCountRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue b/src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue index 1d3ed4146..0dae8fcac 100644 --- a/src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue +++ b/src/views/wms/countManage/countadjust/countadjustRecordMain/index.vue @@ -68,6 +68,8 @@ import * as CountadjustRecordDetailApi from '@/api/wms/countadjustRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 盘点调整记录主 defineOptions({ name: 'CountadjustRecordMain' }) @@ -145,19 +147,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CountadjustRecordMainApi.exportCountadjustRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue index dd89dd566..3fc7452a7 100644 --- a/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue +++ b/src/views/wms/countManage/countadjust/countadjustRequestMain/index.vue @@ -88,7 +88,8 @@ import * as CountadjustRequestMainApi from '@/api/wms/countadjustRequestMain' import * as CountadjustRequestDetailApi from '@/api/wms/countadjustRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 盘点调整申请 defineOptions({ name: 'CountadjustRequestMain' }) @@ -314,19 +315,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CountadjustRequestMainApi.exportCountadjustRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue index 32c468e96..e0315a3ec 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRecordMain/index.vue @@ -69,6 +69,8 @@ import * as CustomerreceiptRecordDetailApi from '@/api/wms/customerreceiptRecord import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 客户收货记录主 defineOptions({ name: 'CustomerreceiptRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerreceiptRecordMainApi.exportCustomerreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue index cb112ac36..17a6c169c 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue @@ -89,7 +89,8 @@ import * as CustomerreceiptRequestMainApi from '@/api/wms/customerreceiptRequest import * as CustomerreceiptRequestDetailApi from '@/api/wms/customerreceiptRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 客户收货申请 defineOptions({ name: 'CustomerreceiptRequestMain' }) @@ -319,19 +320,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerreceiptRequestMainApi.exportCustomerreceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue index 10cff8f27..2bebcf828 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnJobMain/index.vue @@ -74,6 +74,8 @@ import * as CustomerreturnJobDetailApi from '@/api/wms/customerreturnJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 客户退货任务主 defineOptions({ name: 'CustomerreturnJobMain' }) @@ -358,19 +360,18 @@ const handleHandle = async (data) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerreturnJobMainApi.exportCustomerreturnJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue index 400ca9f5b..0543f330c 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRecordMain/index.vue @@ -71,6 +71,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 客户退货记录主 defineOptions({ name: 'CustomerreturnRecordMain' }) @@ -155,19 +157,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerreturnRecordMainApi.exportCustomerreturnRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index 376ff1484..b2c49ad62 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -117,6 +117,8 @@ import * as PackageApi from '@/api/wms/package' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 客户退货申请 defineOptions({ name: 'CustomerreturnRequestMain' }) @@ -646,19 +648,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomerreturnRequestMainApi.exportCustomerreturnRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue index 18d8288dc..284cdd51f 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRecordMain/index.vue @@ -69,6 +69,8 @@ import * as CustomersettleRecordDetailApi from '@/api/wms/customersettleRecordDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 客户结算记录主 defineOptions({ name: 'CustomersettleRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomersettleRecordMainApi.exportCustomersettleRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue index 748d49b20..c79426859 100644 --- a/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customersettle/customersettleRequestMain/index.vue @@ -90,7 +90,8 @@ import * as CustomersettleRequestMainApi from '@/api/wms/customersettleRequestMa import * as CustomersettleRequestDetailApi from '@/api/wms/customersettleRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 客户结算申请 defineOptions({ name: 'CustomersettleRequestMain' }) @@ -330,19 +331,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await CustomersettleRequestMainApi.exportCustomersettleRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue index 39845108a..42ceaed89 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverJobMain/index.vue @@ -74,6 +74,8 @@ import * as DeliverJobDetailApi from '@/api/wms/deliverJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 发货任务主 defineOptions({ name: 'DeliverJobMain' }) @@ -343,19 +345,18 @@ const handleHandle = async (data) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await DeliverJobMainApi.exportDeliverJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue index 368a74cbc..9621df6bb 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRecordMain/index.vue @@ -71,6 +71,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 发货记录主 defineOptions({ name: 'DeliverRecordMain' }) @@ -177,19 +179,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await DeliverRecordMainApi.exportDeliverRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index 822e0610a..026f47b5e 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -96,7 +96,8 @@ import * as DeliverRequestDetailApi from '@/api/wms/deliverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as AreabasicApi from '@/api/wms/areabasic' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 发货申请 defineOptions({ name: 'DeliverRequestMain' }) @@ -467,13 +468,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value == 'DeliverRequestMain'){ const data = await DeliverRequestMainApi.exportDeliverRequestMain(tableObject.params) @@ -484,7 +484,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index 65deef6fc..02d7c6911 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -88,7 +88,8 @@ import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as AreabasicApi from '@/api/wms/areabasic' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 发货计划 defineOptions({ name: 'DeliverPlanMain' }) @@ -426,13 +427,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value == 'DeliverRequestMain'){ const data = await DeliverPlanMainApi.exportDeliverPlanMain(tableObject.params) @@ -443,7 +443,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue index b24e9156f..de7788fe2 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/saleMain/index.vue @@ -85,7 +85,8 @@ import * as SaleMainApi from '@/api/wms/saleMain' import * as SaleDetailApi from '@/api/wms/saleDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 销售订单主 defineOptions({ name: 'SaleMain' }) @@ -246,19 +247,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SaleMainApi.exportSaleMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue index 4f7a51435..b6a025405 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRecord/index.vue @@ -73,7 +73,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SaleShipmentMainRecord' }) const message = useMessage() // 消息弹窗 @@ -199,19 +200,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SaleShipmentMainRecordApi.exportSaleShipmentMainRecord(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index e76389f6a..6f25d3091 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -94,6 +94,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SaleShipmentMain' }) const message = useMessage() // 消息弹窗 @@ -440,19 +442,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SaleShipmentMainApi.exportSaleShipmentMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue index 1551887fb..4f718f9ea 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainJob/index.vue @@ -77,7 +77,8 @@ import * as StockupJobDetailApi from '@/api/wms/stockupDetailJob' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备货任务主 defineOptions({ name: 'StockupJobMain' }) @@ -232,19 +233,18 @@ const handleHandle = async (data) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await StockupJobMainApi.exportStockupMainJob(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue index e5891e437..080c75524 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRecord/index.vue @@ -69,7 +69,8 @@ import * as StockupDetailRecordApi from '@/api/wms/stockupDetailRecord' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备货记录主 defineOptions({ name: 'StockupMainRecord' }) @@ -150,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await StockupMainRecordApi.exportStockupMainRecord(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index 50a98f219..b0bed2578 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -96,7 +96,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import * as DeliverPlanDetailApi from '@/api/wms/deliverPlanDetail' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备货申请 defineOptions({ name: 'StockupMainRequest' }) @@ -404,19 +405,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await StockupMainRequestApi.exportStockupMainRequest(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/balance/index.vue b/src/views/wms/inventoryManage/balance/index.vue index 9a27a95b8..efafd2ed7 100644 --- a/src/views/wms/inventoryManage/balance/index.vue +++ b/src/views/wms/inventoryManage/balance/index.vue @@ -72,7 +72,8 @@ import Detail from '@/components/Detail/src/Detail.vue' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存余额 defineOptions({ name: 'Balance' }) @@ -291,19 +292,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await BalanceApi.exportBalance(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/container/index.vue b/src/views/wms/inventoryManage/container/index.vue index bd7f7de6d..6102a66ba 100644 --- a/src/views/wms/inventoryManage/container/index.vue +++ b/src/views/wms/inventoryManage/container/index.vue @@ -66,7 +66,8 @@ import { ContainerMain,ContainerMainRules,ContainerDetail,ContainerDetailRules } import * as ContainerMainApi from '@/api/wms/containerMain' import * as ContainerDetailApi from '@/api/wms/containerDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 供应商发票记录主 defineOptions({ name: 'ContainerMain' }) @@ -140,18 +141,17 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await ContainerMainApi.exportContainerMain(tableObject.params) download.excel(data, '器具主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue b/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue index 67cc9d1f6..2507d33b4 100644 --- a/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerBindRecord/index.vue @@ -88,7 +88,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ContainerBindRecordMain' }) @@ -214,19 +215,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerBindRecordMainApi.exportContainerBindRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue b/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue index a459eca51..2a7826b0a 100644 --- a/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerRepair/index.vue @@ -87,7 +87,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ContainerRepairRecordMain' }) @@ -213,19 +214,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerRepairRecordMainApi.exportContainerRepairRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue b/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue index 649bb0b99..f30ebbdff 100644 --- a/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerUnbindRecord/index.vue @@ -87,7 +87,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ContainerUnbindRecordMain' }) @@ -213,19 +214,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerUnbindRecordMainApi.exportContainerUnbindRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue b/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue index 7f48d2a10..ed4fca50d 100644 --- a/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerinitadd/index.vue @@ -76,7 +76,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ContainerMain' }) const message = useMessage() // 消息弹窗 @@ -265,19 +266,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerMainApi.exportContainerMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue b/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue index 86f5017c6..b7e583095 100644 --- a/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue +++ b/src/views/wms/inventoryManage/containerinit/containerinitrecord/index.vue @@ -85,7 +85,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ContainerInitRecordMain' }) @@ -211,19 +212,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerInitRecordMainApi.exportContainerInitRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/expectin/index.vue b/src/views/wms/inventoryManage/expectin/index.vue index 3ee7909ab..a751cfc09 100644 --- a/src/views/wms/inventoryManage/expectin/index.vue +++ b/src/views/wms/inventoryManage/expectin/index.vue @@ -69,7 +69,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Expectin' }) const message = useMessage() // 消息弹窗 @@ -219,19 +220,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ExpectinApi.exportExpectin(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/expectout/index.vue b/src/views/wms/inventoryManage/expectout/index.vue index 6e4828a26..98a2b5a09 100644 --- a/src/views/wms/inventoryManage/expectout/index.vue +++ b/src/views/wms/inventoryManage/expectout/index.vue @@ -70,7 +70,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Expectout' }) const message = useMessage() // 消息弹窗 @@ -218,19 +219,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ExpectoutApi.exportExpectout(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/locationcapacity/index.vue b/src/views/wms/inventoryManage/locationcapacity/index.vue index 911166dc2..f0ed80d0f 100644 --- a/src/views/wms/inventoryManage/locationcapacity/index.vue +++ b/src/views/wms/inventoryManage/locationcapacity/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Locationcapacity' }) const message = useMessage() // 消息弹窗 @@ -173,19 +174,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await LocationcapacityApi.exportLocationcapacity(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/package/index.vue b/src/views/wms/inventoryManage/package/index.vue index 6746eb1e1..d0bc30b50 100644 --- a/src/views/wms/inventoryManage/package/index.vue +++ b/src/views/wms/inventoryManage/package/index.vue @@ -71,6 +71,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { getJmreportBaseUrl } from '@/utils/systemParam' import * as EquipmentInspectionRecordMainApi from "@/api/eam/equipmentInspectionRecordMain"; import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 包装信息 defineOptions({ name: 'package' }) @@ -297,19 +299,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackageApi.exportPackage(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/transaction/index.vue b/src/views/wms/inventoryManage/transaction/index.vue index 49ba1f62a..976861aa4 100644 --- a/src/views/wms/inventoryManage/transaction/index.vue +++ b/src/views/wms/inventoryManage/transaction/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存事务 defineOptions({ name: 'Transaction' }) @@ -174,19 +175,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransactionApi.exportTransaction(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryManage/transferlog/index.vue b/src/views/wms/inventoryManage/transferlog/index.vue index 9dfbee8a8..091fb784d 100644 --- a/src/views/wms/inventoryManage/transferlog/index.vue +++ b/src/views/wms/inventoryManage/transferlog/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Transferlog' }) const message = useMessage() // 消息弹窗 @@ -173,19 +174,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ExpectinApi.exportTransferlog(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue index f029c541a..e808da637 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/containerMainRequest/index.vue @@ -94,7 +94,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ContainerManageRequest' }) const message = useMessage() // 消息弹窗 @@ -514,14 +515,13 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() const excelTitle = ref(route.meta.title) // 发起导出 - exportLoading.value = true + loadStart() if(routeName.value == 'ReturnContainerManageRequest'){ const data = await ContainerMainRequestApi.exportReturnContainerMainRequest(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) @@ -537,7 +537,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue index 6d8a06bb9..c6c7e41c5 100644 --- a/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/containerRecordMain/index.vue @@ -75,7 +75,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ContainerRecordMain' }) const message = useMessage() // 消息弹窗 const { t } = useI18n() // 国际化 @@ -227,19 +228,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerRecordMainApi.exportContainerRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue index 00eaa5e01..f00f72416 100644 --- a/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/initialContainerMainRequest/index.vue @@ -94,7 +94,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'InitialContainerManageRequest' }) const message = useMessage() // 消息弹窗 @@ -469,19 +470,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerMainRequestApi.exportInitialContainerMainRequest(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue index 8889a0601..5320ad0ae 100644 --- a/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue +++ b/src/views/wms/inventoryjobManage/containermanage/scrapContainerMainRequest/index.vue @@ -94,7 +94,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ScrapContainerManageRequest' }) const message = useMessage() // 消息弹窗 @@ -494,19 +495,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ContainerMainRequestApi.exportScrapContainerMainRequest(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue index 8c5fdde93..21de35179 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRecordMain/index.vue @@ -73,7 +73,8 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存初始化记录主 defineOptions({ name: 'InventoryinitRecordMain' }) @@ -157,19 +158,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InventoryinitRecordMainApi.exportInventoryinitRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue index 8dea8e088..2b762986c 100644 --- a/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/inventoryinitial/inventoryinitRequestMain/index.vue @@ -92,7 +92,8 @@ import * as InventoryinitRequestMainApi from '@/api/wms/inventoryinitRequestMain import * as InventoryinitRequestDetailApi from '@/api/wms/inventoryinitRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存初始化申请 defineOptions({ name: 'InventoryinitRequestMain' }) @@ -398,19 +399,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { // } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InventoryinitRequestMainApi.exportInventoryinitRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/index.vue index c257c159b..95bc2f273 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packagemergeMain/index.vue @@ -67,7 +67,8 @@ import * as PackagemergeMainApi from '@/api/wms/packagemergeMain' import * as PackagemergeDetailApi from '@/api/wms/packagemergeDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 合包记录 defineOptions({ name: 'PackagemergeMain' }) @@ -133,19 +134,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackagemergeMainApi.exportPackagemergeMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue index 6ada64194..0555b4524 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverJobMain/index.vue @@ -75,6 +75,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'PackageoverJobMain' }) const message = useMessage() // 消息弹窗 @@ -245,19 +247,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackageoverJobMainApi.exportPackageoverJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue index 26fa917f0..2d7de80bd 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRecordMain/index.vue @@ -72,7 +72,8 @@ import * as PackageApi from '@/api/wms/package' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 翻包记录 defineOptions({ name: 'PackageoverMain' }) @@ -179,19 +180,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackageoverRecordMainApi.exportPackageoverMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue index ef44e8787..9ca9c6a6a 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRequestMain/index.vue @@ -86,7 +86,8 @@ import * as PackageoverRequestMainApi from '@/api/wms/packageoverRequestMain' import * as PackageoverRequestDetailApi from '@/api/wms/packageoverRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'PackageoverRequestMain' }) const message = useMessage() // 消息弹窗 @@ -360,19 +361,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackageoverRequestMainApi.exportPackageoverRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue index 4010fc996..33a638fb0 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packageoverMain/packageoverRetrospect/index.vue @@ -52,7 +52,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as PackageApi from '@/api/wms/package' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'PackageoverRetrospect' }) const message = useMessage() // 消息弹窗 @@ -147,19 +148,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackageoverRetrospectApi.exportPackageoverRetrospect(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/index.vue b/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/index.vue index 0bde40094..cb9b89898 100644 --- a/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/index.vue +++ b/src/views/wms/inventoryjobManage/packageManage/packagesplitMain/index.vue @@ -67,7 +67,8 @@ import * as PackagesplitMainApi from '@/api/wms/packagesplitMain' import * as PackagesplitDetailApi from '@/api/wms/packagesplitDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 拆包记录 defineOptions({ name: 'PackagesplitMain' }) @@ -133,19 +134,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PackagesplitMainApi.exportPackagesplitMainApi(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue index 7a36cd35c..86ab889fa 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapJobMain/index.vue @@ -74,6 +74,8 @@ import * as ScrapJobDetailApi from '@/api/wms/scrapJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 报废出库任务主 defineOptions({ name: 'ScrapJobMain' }) @@ -222,19 +224,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ScrapJobMainApi.exportScrapJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue index c964cf14d..ac521af8a 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRecordMain/index.vue @@ -69,6 +69,8 @@ import * as ScrapRecordDetailApi from '@/api/wms/scrapRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 报废出库记录主 defineOptions({ name: 'ScrapRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ScrapRecordMainApi.exportScrapRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue index 2b82cc1b2..b09097359 100644 --- a/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/scrap/scrapRequestMain/index.vue @@ -119,7 +119,8 @@ import * as ScrapRequestDetailApi from '@/api/wms/scrapRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as StdcostpriceApi from '@/api/wms/stdcostprice' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 报废出库申请 defineOptions({ name: 'ScrapRequestMain' }) @@ -595,19 +596,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ScrapRequestMainApi.exportScrapRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue index a818b90dd..5f42c89bb 100644 --- a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRecordMain/index.vue @@ -69,6 +69,8 @@ import * as UnplannedreceiptRecordDetailApi from '@/api/wms/unplannedreceiptReco import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨入库记录主 defineOptions({ name: 'UnplannedreceiptRecordMain' }) @@ -149,20 +151,19 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) tableObject.params.detailDataType = 2 const data = await UnplannedreceiptRecordMainApi.exportUnplannedreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue index e91ab26aa..751e2f82a 100644 --- a/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartReturn/sparepartReturnRequestMain/index.vue @@ -112,7 +112,8 @@ import * as ItembasicApi from "@/api/wms/itembasic"; import { formatTime } from '@/utils/index' import { formatDate } from '@/utils/formatTime' import {handleSparepartReturnRequestMain} from "@/api/wms/unplannedreceiptRequestMain"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外入库申请 defineOptions({ name: 'UnplannedreceiptRequestMain' }) @@ -498,20 +499,19 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) tableObject.params.detailDataType = 2 const data = await UnplannedreceiptRequestMainApi.exportUnplannedreceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue index b066d50f2..401b48728 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionJobMain/index.vue @@ -74,6 +74,8 @@ import * as UnplannedissueJobDetailApi from '@/api/wms/unplannedissueJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外出库任务主 defineOptions({ name: 'UnplannedissueJobMainSpare' }) @@ -222,19 +224,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await UnplannedissueJobMainApi.exportUnplannedissueJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue index 87c2eb2d8..a1fb6bb8a 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRecordMain/index.vue @@ -69,6 +69,8 @@ import * as UnplannedissueRecordDetailApi from '@/api/wms/unplannedissueRecordDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外出库记录主 defineOptions({ name: 'UnplannedissueRecordMainSpare' }) @@ -149,20 +151,19 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() tableObject.params.detailDataType = 2 const excelTitle = ref(route.meta.title) const data = await UnplannedissueRecordMainApi.exportUnplannedissueRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue index 3676c92d0..8e8b29650 100644 --- a/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/sparepartsrequisition/sparepartsrequisitionRequestMain/index.vue @@ -92,7 +92,8 @@ import * as UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMa import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外出库申请 defineOptions({ name: 'UnplannedissueRequestMainSpare' }) @@ -394,20 +395,19 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) tableObject.params.detailDataType = 2 const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue index 5c16481de..cb0876240 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueJobMain/index.vue @@ -76,7 +76,8 @@ import * as PurchasereceiptJobMainApi from "@/api/wms/purchasereceiptJobMain"; import {acceptTransferissueJobMain} from "@/api/wms/transferissueJobMain"; import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨出库任务主 defineOptions({ name: 'TransferissueJobMain' }) @@ -262,19 +263,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransferissueJobMainApi.exportTransferissueJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/index.vue index 986d92fc5..db4a3e3d7 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRecordMain/index.vue @@ -69,6 +69,8 @@ import * as TransferissueRecordDetailApi from '@/api/wms/transferissueRecordDeta import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨出库记录主 defineOptions({ name: 'TransferissueRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransferissueRecordMainApi.exportTransferissueRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue index a409a3ff4..5e5e6debe 100644 --- a/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferissue/transferissueRequestMain/index.vue @@ -92,7 +92,8 @@ import * as TransferissueRequestMainApi from '@/api/wms/transferissueRequestMain import * as TransferissueRequestDetailApi from '@/api/wms/transferissueRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨出库申请 defineOptions({ name: 'TransferissueRequestMain' }) @@ -387,19 +388,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransferissueRequestMainApi.exportTransferissueRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue index 6e2efbd83..924ce6e1c 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptJobMain/index.vue @@ -74,6 +74,8 @@ import * as TransferreceiptJobDetailApi from '@/api/wms/transferreceiptJobDetail import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨入库任务主 defineOptions({ name: 'TransferreceiptJobMain' }) @@ -222,19 +224,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransferreceiptJobMainApi.exportTransferreceiptJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/index.vue index 33bb3a901..ee7aee182 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRecordMain/index.vue @@ -69,6 +69,8 @@ import * as TransferreceiptRecordDetailApi from '@/api/wms/transferreceiptRecord import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨入库记录主 defineOptions({ name: 'TransferreceiptRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransferreceiptRecordMainApi.exportTransferreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue index ace5ed623..baffa33d7 100644 --- a/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/transferreceipt/transferreceiptRequestMain/index.vue @@ -90,7 +90,8 @@ import * as TransferreceiptRequestMainApi from '@/api/wms/transferreceiptRequest import * as TransferreceiptRequestDetailApi from '@/api/wms/transferreceiptRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨入库申请 defineOptions({ name: 'TransferreceiptRequestMain' }) @@ -350,19 +351,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await TransferreceiptRequestMainApi.exportTransferreceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue index 837dba3dc..475bcadb2 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueJobMain/index.vue @@ -74,6 +74,8 @@ import * as UnplannedissueJobDetailApi from '@/api/wms/unplannedissueJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外出库任务主 defineOptions({ name: 'UnplannedissueJobMain' }) @@ -228,7 +230,7 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await UnplannedissueJobMainApi.exportUnplannedissueJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue index 5576ccab7..342ad3be9 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRecordMain/index.vue @@ -69,6 +69,8 @@ import * as UnplannedissueRecordDetailApi from '@/api/wms/unplannedissueRecordDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外出库记录主 defineOptions({ name: 'UnplannedissueRecordMain' }) @@ -149,20 +151,19 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) tableObject.params.detailDataType = 1 const data = await UnplannedissueRecordMainApi.exportUnplannedissueRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue index 5f140eb93..f19d3f9b6 100644 --- a/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedissue/unplannedissueRequestMain/index.vue @@ -92,7 +92,8 @@ import * as UnplannedissueRequestMainApi from '@/api/wms/unplannedissueRequestMa import * as UnplannedissueRequestDetailApi from '@/api/wms/unplannedissueRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外出库申请 defineOptions({ name: 'UnplannedissueRequestMain' }) @@ -431,20 +432,19 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) tableObject.params.detailDataType = 1 const data = await UnplannedissueRequestMainApi.exportUnplannedissueRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue index 77d639ded..3eeb8277c 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptJobMain/index.vue @@ -74,6 +74,8 @@ import * as UnplannedreceiptJobDetailApi from '@/api/wms/unplannedreceiptJobDeta import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外入库任务主 defineOptions({ name: 'UnplannedreceiptJobMain' }) @@ -222,19 +224,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await UnplannedreceiptJobMainApi.exportUnplannedreceiptJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue index 7972ac52c..f0e8b1661 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRecordMain/index.vue @@ -69,6 +69,8 @@ import * as UnplannedreceiptRecordDetailApi from '@/api/wms/unplannedreceiptReco import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 调拨入库记录主 defineOptions({ name: 'UnplannedreceiptRecordMain' }) @@ -149,20 +151,19 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) tableObject.params.detailDataType = 1 const data = await UnplannedreceiptRecordMainApi.exportUnplannedreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue index a6e26c386..0cae01ffb 100644 --- a/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue +++ b/src/views/wms/inventoryjobManage/unplannedreceipt/unplannedreceiptRequestMain/index.vue @@ -132,7 +132,8 @@ import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 计划外入库申请 defineOptions({ name: 'UnplannedreceiptRequestMain' }) @@ -660,20 +661,19 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) tableObject.params.detailDataType = 1 const data = await UnplannedreceiptRequestMainApi.exportUnplannedreceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/issue/issueJobMain/index.vue b/src/views/wms/issueManage/issue/issueJobMain/index.vue index 0900ccb6a..722dce117 100644 --- a/src/views/wms/issueManage/issue/issueJobMain/index.vue +++ b/src/views/wms/issueManage/issue/issueJobMain/index.vue @@ -75,6 +75,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { getDictLabel, DICT_TYPE } from '@/utils/dict' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 发料任务主 defineOptions({ name: 'IssueJobMain' }) @@ -293,19 +295,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await IssueJobMainApi.exportIssueJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/issue/issueRecordMain/index.vue b/src/views/wms/issueManage/issue/issueRecordMain/index.vue index 09be4ea36..31130ca53 100644 --- a/src/views/wms/issueManage/issue/issueRecordMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRecordMain/index.vue @@ -69,6 +69,8 @@ import * as IssueRecordDetailApi from '@/api/wms/issueRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 发料记录主 defineOptions({ name: 'IssueRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await IssueRecordMainApi.exportIssueRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/issue/issueRequestMain/index.vue b/src/views/wms/issueManage/issue/issueRequestMain/index.vue index 8b0a7ec37..2c8c6f650 100644 --- a/src/views/wms/issueManage/issue/issueRequestMain/index.vue +++ b/src/views/wms/issueManage/issue/issueRequestMain/index.vue @@ -104,7 +104,8 @@ import * as IssueRequestDetailApi from '@/api/wms/issueRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as WorkstationApi from '@/api/wms/workstation' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 发料申请 defineOptions({ name: 'IssueRequestMain' }) @@ -436,19 +437,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await IssueRequestMainApi.exportIssueRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue index 0b252d410..54e593df5 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRecordMain/index.vue @@ -68,6 +68,8 @@ import * as OnlinesettlementRecordDetailApi from '@/api/wms/onlinesettlementReco import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 上线结算记录主 defineOptions({ name: 'OnlinesettlementRecordMain' }) @@ -144,19 +146,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await OnlinesettlementRecordMainApi.exportOnlinesettlementRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue index fdb65cb33..1c93ba061 100644 --- a/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue +++ b/src/views/wms/issueManage/onlinesettlement/onlinesettlementRequestMain/index.vue @@ -87,7 +87,8 @@ import * as OnlinesettlementRequestDetailApi from '@/api/wms/onlinesettlementReq import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as SupplieritemApi from '@/api/wms/supplieritem' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 上线结算申请 defineOptions({ name: 'OnlinesettlementRequestMain' }) @@ -260,19 +261,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await OnlinesettlementRequestMainApi.exportOnlinesettlementRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/pick/pickJobMain/index.vue b/src/views/wms/issueManage/pick/pickJobMain/index.vue index f15a0df81..fd8cf9dae 100644 --- a/src/views/wms/issueManage/pick/pickJobMain/index.vue +++ b/src/views/wms/issueManage/pick/pickJobMain/index.vue @@ -71,7 +71,8 @@ import { PickJobMain,PickJobMainRules,PickJobDetail,PickJobDetailRules } from '. import * as PickJobMainApi from '@/api/wms/pickJobMain' import * as PickJobDetailApi from '@/api/wms/pickJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备货任务主 defineOptions({ name: 'PickJobMain' }) @@ -207,18 +208,17 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PickJobMainApi.exportPickJobMain(tableObject.params) download.excel(data, '备货任务主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/pick/pickRecordMain/index.vue b/src/views/wms/issueManage/pick/pickRecordMain/index.vue index 452cf87da..ec7419e5e 100644 --- a/src/views/wms/issueManage/pick/pickRecordMain/index.vue +++ b/src/views/wms/issueManage/pick/pickRecordMain/index.vue @@ -66,7 +66,8 @@ import { PickRecordMain,PickRecordMainRules,PickRecordDetail,PickRecordDetailRul import * as PickRecordMainApi from '@/api/wms/pickRecordMain' import * as PickRecordDetailApi from '@/api/wms/pickRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备货记录主 defineOptions({ name: 'PickRecordMain' }) @@ -140,18 +141,17 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PickRecordMainApi.exportPickRecordMain(tableObject.params) download.excel(data, '备货记录主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/pick/pickRequestMain/index.vue b/src/views/wms/issueManage/pick/pickRequestMain/index.vue index f33209171..2c5a0197e 100644 --- a/src/views/wms/issueManage/pick/pickRequestMain/index.vue +++ b/src/views/wms/issueManage/pick/pickRequestMain/index.vue @@ -85,7 +85,8 @@ import { PickRequestMain,PickRequestMainRules,PickRequestDetail,PickRequestDetai import * as PickRequestMainApi from '@/api/wms/pickRequestMain' import * as PickRequestDetailApi from '@/api/wms/pickRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备货申请 defineOptions({ name: 'PickRequestMain' }) @@ -264,18 +265,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PickRequestMainApi.exportPickRequestMain(tableObject.params) download.excel(data, '备货申请主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index a45482301..f74e4883a 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -89,7 +89,8 @@ import * as PreparetoissueDetailApi from '@/api/wms/preparetoissueDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as ProductionlineitemApi from '@/api/wms/productionlineitem' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备料计划 defineOptions({ name: 'PreparetoissueMain' }) @@ -451,19 +452,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PreparetoissueMainApi.exportPreparetoissueMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue index 25664257a..d505694c4 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptJobMain/index.vue @@ -74,6 +74,8 @@ import * as ProductionreceiptJobDetailApi from '@/api/wms/productionreceiptJobDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产收料任务主 defineOptions({ name: 'ProductionreceiptJobMain' }) @@ -293,19 +295,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionreceiptJobMainApi.exportProductionreceiptJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue index 7a755dd15..6abc52371 100644 --- a/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue +++ b/src/views/wms/issueManage/productionreceipt/productionreceiptRecordMain/index.vue @@ -69,6 +69,8 @@ import * as ProductionreceiptRecordDetailApi from '@/api/wms/productionreceiptRe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产收料记录主 defineOptions({ name: 'ProductionreceiptRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionreceiptRecordMainApi.exportProductionreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue index 829fa8cd5..20e67efd2 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnJobMain/index.vue @@ -74,6 +74,8 @@ import * as ProductionreturnJobDetailApi from '@/api/wms/productionreturnJobDeta import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产退料任务主 defineOptions({ name: 'ProductionreturnJobMain' }) @@ -265,19 +267,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionreturnJobMainApi.exportProductionreturnJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue index 1ac79535e..0cc61c972 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRecordMain/index.vue @@ -69,6 +69,8 @@ import * as ProductionreturnRecordDetailApi from '@/api/wms/productionreturnReco import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产退料记录主 and 隔离退料记录 defineOptions({ name: 'ProductionreturnRecordMain' }) @@ -150,19 +152,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionreturnRecordMainApi.exportProductionreturnRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index b4fff91b6..1b110156f 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -111,7 +111,8 @@ import * as PackageApi from '@/api/wms/package' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产退料申请 defineOptions({ name: 'ProductionreturnRequestMain' }) @@ -602,19 +603,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionreturnRequestMainApi.exportProductionreturnRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 817725eb9..f9abbabe4 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -113,7 +113,8 @@ import { formatTime } from '@/utils/index' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 隔离退料申请 defineOptions({ name: 'ProductionreturnRequestMainNo' }) @@ -556,19 +557,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionreturnRequestMainNoApi.exportProductionreturnRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue index 2ab729794..3acd9e58d 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRecordMain/index.vue @@ -69,6 +69,8 @@ import * as ProductionscrapRecordDetailApi from '@/api/wms/productionscrapRecord import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产退料记录主 defineOptions({ name: 'ProductionscrapRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionscrapRecordMainApi.exportProductionscrapRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue index d82c2e427..14824eb07 100644 --- a/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue +++ b/src/views/wms/issueManage/productionscrap/productionscrapRequestMain/index.vue @@ -111,7 +111,8 @@ import * as PackageApi from '@/api/wms/package' import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 线标原料报废申请 defineOptions({ name: 'ProductionscrapRequestMain' }) @@ -600,19 +601,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionscrapRequestMainApi.exportProductionscrapRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue index 0a6cdf28c..021c4b9f2 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshJobMain/index.vue @@ -74,7 +74,8 @@ import * as RepleinshJobMainApi from '@/api/wms/repleinshJobMain' import * as RepleinshJobDetailApi from '@/api/wms/repleinshJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 补料任务主 defineOptions({ name: 'RepleinshJobMain' }) @@ -321,19 +322,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RepleinshJobMainApi.exportRepleinshJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue index aaabc13e8..014fc6f0c 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRecordMain/index.vue @@ -68,7 +68,8 @@ import * as RepleinshRecordMainApi from '@/api/wms/repleinshRecordMain' import * as RepleinshRecordDetailApi from '@/api/wms/repleinshRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 补料记录主 defineOptions({ name: 'RepleinshRecordMain' }) @@ -146,19 +147,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RepleinshRecordMainApi.exportRepleinshRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index 4e7d268d9..27e0800f1 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -88,7 +88,8 @@ import * as RepleinshRequestMainApi from '@/api/wms/repleinshRequestMain' import * as RepleinshRequestDetailApi from '@/api/wms/repleinshRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 补料申请 defineOptions({ name: 'RepleinshRequestMain' }) @@ -337,19 +338,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await RepleinshRequestMainApi.exportRepleinshRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue index 97a9fc005..767925dd8 100644 --- a/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue +++ b/src/views/wms/moveManage/inventorychange/inventorychangeRecordMain/index.vue @@ -69,6 +69,8 @@ import * as InventorychangeRecordDetailApi from '@/api/wms/inventorychangeRecord import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存修改记录主 defineOptions({ name: 'InventorychangeRecordMain' }) @@ -195,19 +197,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InventorychangeRecordMainApi.exportInventorychangeRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue index cd055e2fa..6a7998ed7 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveJobMain/index.vue @@ -74,6 +74,8 @@ import * as InventorymoveJobDetailApi from '@/api/wms/inventorymoveJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存转移任务主 defineOptions({ name: 'InventorymoveJobMain' }) @@ -296,14 +298,13 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdJobMain'){ const data = await InventorymoveJobMainApi.exportOkToHoldJobMain(tableObject.params) @@ -329,7 +330,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue index b8f62ebf4..841240367 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMain/index.vue @@ -72,6 +72,8 @@ import * as InventorymoveRecordDetailApi from '@/api/wms/inventorymoveRecordDeta import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存转移记录主 defineOptions({ name: 'InventorymoveRecordMain' }) @@ -232,14 +234,13 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdRecordMain'){ const data = await InventorymoveRecordMainApi.exportOkToHoldRecordMain(tableObject.params) @@ -265,7 +266,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue index 508315b44..d85f2fb2b 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRecordMainNew/index.vue @@ -98,6 +98,8 @@ import * as InventorymoveRecordDetailApi from '@/api/wms/inventorymoveRecordDeta import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存转移记录主 defineOptions({ name: 'InventorymoveRecordMainNew' }) @@ -284,19 +286,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InventorymoveRecordMainApi.exportInventorymoveRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue index e238a8a53..b82d9d005 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMain/index.vue @@ -89,7 +89,8 @@ import * as InventorymoveRequestMainApi from '@/api/wms/inventorymoveRequestMain import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存转移申请 defineOptions({ name: 'InventorymoveRequestMain' }) @@ -653,13 +654,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdRequestMain'){ const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params) @@ -684,7 +684,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue index 8def5a68b..1203bba91 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainMOVE/index.vue @@ -90,7 +90,8 @@ import * as InventorymoveRequestDetailApi from '@/api/wms/inventorymoveRequestDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as LocationApi from '@/api/wms/location' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存转移申请 defineOptions({ name: 'InventorymoveRequestMain' }) @@ -669,13 +670,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdRequestMain'){ const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params) @@ -700,7 +700,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue index edda6cdf3..045d10869 100644 --- a/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue +++ b/src/views/wms/moveManage/inventorymove/inventorymoveRequestMainOKHOLD/index.vue @@ -92,7 +92,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as LocationApi from '@/api/wms/location' import { formatDate } from '@/utils/formatTime' import dayjs from 'dayjs' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 库存转移申请 defineOptions({ name: 'InventorymoveRequestMain' }) @@ -687,13 +688,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value == 'OktoholdRequestMain'){ const data = await InventorymoveRequestMainApi.exportOkToHoldRequestMain(tableObject.params) @@ -718,7 +718,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/moveManage/itemChange/index.vue b/src/views/wms/moveManage/itemChange/index.vue index aeee4dfea..33be9148c 100644 --- a/src/views/wms/moveManage/itemChange/index.vue +++ b/src/views/wms/moveManage/itemChange/index.vue @@ -47,7 +47,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 物料调整 defineOptions({ name: 'ItemChange' }) @@ -167,18 +168,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await BalanceApi.exportBalance(tableObject.params) download.excel(data, '库存余额.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue index ae74a1187..f3fe085ca 100644 --- a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue +++ b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRecordMain/index.vue @@ -69,6 +69,8 @@ import * as OfflinesettlementRecordDetailApi from '@/api/wms/offlinesettlementRe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 下线结算记录主 defineOptions({ name: 'OfflinesettlementRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await OfflinesettlementRecordMainApi.exportOfflinesettlementRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue index 1321d24d0..03ac87af2 100644 --- a/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue +++ b/src/views/wms/productionManage/offlinesettlement/offlinesettlementRequestMain/index.vue @@ -87,7 +87,8 @@ import { OfflinesettlementRequestMain,OfflinesettlementRequestMainRules,Offlines import * as OfflinesettlementRequestMainApi from '@/api/wms/offlinesettlementRequestMain' import * as OfflinesettlementRequestDetailApi from '@/api/wms/offlinesettlementRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 下线结算申请 defineOptions({ name: 'OfflinesettlementRequestMain' }) @@ -272,18 +273,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await OfflinesettlementRequestMainApi.exportOfflinesettlementRequestMain(tableObject.params) download.excel(data, '下线结算申请主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue b/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue index b10e3b131..97e3e2fbd 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRecord/index.vue @@ -83,7 +83,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ProcessproductionRequestMain' }) const message = useMessage() // 消息弹窗 @@ -230,19 +231,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProcessproductionRecordMainApi.exportProcessproductionRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue index b82380c90..fa72f2dc1 100644 --- a/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue +++ b/src/views/wms/productionManage/processproduction/processproductionRequest/index.vue @@ -99,7 +99,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ProcessproductionRequestMain' }) @@ -401,19 +402,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProcessproductionRequestMainApi.exportProcessproductionRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue index 8fe50a0c2..33ead0133 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleJobMain/index.vue @@ -74,6 +74,8 @@ import * as ProductdismantleJobDetailApi from '@/api/wms/productdismantleJobDeta import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品拆解任务主 defineOptions({ name: 'ProductdismantleJobMain' }) @@ -216,19 +218,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductdismantleJobMainApi.exportProductdismantleJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue index eeece57a8..c3c647c65 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRecordMain/index.vue @@ -94,6 +94,8 @@ import * as DismantleRecordDetailbApi from '@/api/wms/dismantleRecordDetailb' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品拆解记录主 defineOptions({ name: 'ProductdismantleRecordMain' }) @@ -219,19 +221,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductdismantleRecordMainApi.exportProductdismantleRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue index 09524c463..e79df3706 100644 --- a/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue +++ b/src/views/wms/productionManage/productdismantle/productdismantleRequestMain/index.vue @@ -113,7 +113,8 @@ import * as BomDismantleApi from '@/api/wms/bomDismantle' import * as dismantleRequestDetailbApi from '@/api/wms/dismantleRequestDetailb' import * as BomApi from "@/api/wms/bom"; import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品拆解申请 defineOptions({ name: 'ProductdismantleRequestMain' }) @@ -534,19 +535,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductdismantleRequestMainApi.exportProductdismantleRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index 0714b74d0..7abcdd087 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -90,6 +90,8 @@ import * as ItemBasicApi from '@/api/wms/itembasic' import * as BomApi from "@/api/wms/bom"; import * as SwitchApi from '@/api/wms/switch' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产计划主 // 预生产计划 defineOptions({ name: 'ProductionMain' }) @@ -132,6 +134,7 @@ const searchTableSuccess = (formField, searchField, val, formRef, type, row ) => if(tableData.value.find(item1=>item1['id'] == item['id'])) return const newRow = JSON.parse(JSON.stringify({...tableFormKeys,...item})) newRow['id'] = item['id'] + newRow['itemName'] = item['itemName'] // 查看BOM版本 console.log(22,item) const param1 = { @@ -542,19 +545,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductionMainApi.exportProductionMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue index bc983a4be..bc1b9c881 100644 --- a/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue +++ b/src/views/wms/productionManage/productionplan/qadproductionplan/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'QadProductionPlanMain' }) const message = useMessage() // 消息弹窗 @@ -207,19 +208,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await QadProductionPlanMainApi.exportQadProductionPlanMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productionplan/workMain/index.vue b/src/views/wms/productionManage/productionplan/workMain/index.vue index 1935f4027..bdab44141 100644 --- a/src/views/wms/productionManage/productionplan/workMain/index.vue +++ b/src/views/wms/productionManage/productionplan/workMain/index.vue @@ -82,7 +82,8 @@ import { WorkMain,WorkMainRules,WorkDetail,WorkDetailRules } from './workMain.da import * as WorkMainApi from '@/api/wms/workMain' import * as WorkDetailApi from '@/api/wms/workDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 生产订单 defineOptions({ name: 'WorkMain' }) @@ -232,18 +233,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await WorkMainApi.exportWorkMain(tableObject.params) download.excel(data, '生产订单主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue index 1dae7a485..0fc3c3863 100644 --- a/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayJobMain/index.vue @@ -77,7 +77,8 @@ import {getAccessToken} from "@/utils/auth"; import { getJmreportBaseUrl } from '@/utils/systemParam' import * as SwitchApi from '@/api/wms/switch' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品上架任务主 defineOptions({ name: 'ProductputawayJobMain' }) @@ -239,19 +240,18 @@ const handleDocumentPrintAll = async () => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductputawayJobMainApi.exportProductputawayJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue index 00476fc84..7065658c1 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRecordMain/index.vue @@ -69,6 +69,8 @@ import * as ProductputawayRecordDetailApi from '@/api/wms/productputawayRecordDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品上架记录主 defineOptions({ name: 'ProductputawayRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductputawayRecordMainApi.exportProductputawayRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index f8f85ce64..986342a1a 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -89,7 +89,8 @@ import * as ProductputawayRequestMainApi from '@/api/wms/productputawayRequestMa import * as ProductputawayRequestDetailApi from '@/api/wms/productputawayRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品上架申请 defineOptions({ name: 'ProductputawayRequestMain' }) @@ -335,19 +336,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductputawayRequestMainApi.exportProductputawayRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue index 48580ecad..41ebf2409 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleJobMain/index.vue @@ -77,6 +77,8 @@ import * as SwitchApi from '@/api/wms/switch' import {getAccessToken} from "@/utils/auth"; import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配制品上架任务主 defineOptions({ name: 'ProductputawayJobMain' }) @@ -242,19 +244,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductputawayJobMainApi.exportProductputawayJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue index 537b8df2d..65067e86d 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRecordMain/index.vue @@ -69,6 +69,8 @@ import * as ProductputawayRecordDetailApi from '@/api/wms/productputawayRecordDe import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品上架记录主 defineOptions({ name: 'ProductputawayRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductputawayRecordMainApi.exportProductputawayRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue index 2d134ead9..60558202e 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue @@ -89,7 +89,8 @@ import * as ProductputawayRequestMainApi from '@/api/wms/productputawayRequestMa import * as ProductputawayRequestDetailApi from '@/api/wms/productputawayRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品上架申请 装配上架申请 装配制品上架申请 defineOptions({ name: 'ProductputawayRequestMain' }) @@ -337,19 +338,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductputawayRequestMainApi.exportProductputawayRequestMainAssemble(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue index 518556f93..9f076b485 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptJobMain/index.vue @@ -105,6 +105,8 @@ import { } from "@/views/wms/productionManage/productreceipt/productreceiptRecordMain/productreceiptRecordMain.data"; import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品收货任务主 // 预生产收货任务主 defineOptions({ name: 'ProductreceiptJobMain' }) @@ -343,19 +345,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue index fa7d5c65c..aea579ff8 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRecordMain/index.vue @@ -103,6 +103,8 @@ import { getAccessToken } from '@/utils/auth' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品收货记录主 // 预生产收货记录主 defineOptions({ name: 'ProductreceiptRecordMain' }) @@ -303,19 +305,18 @@ const handleCreateInspectRequest = async (number:string) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index a5be22d72..1c7c3e5ee 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -186,7 +186,8 @@ import * as BomApi from '@/api/wms/bom' import { formatDate } from '@/utils/formatTime' import * as WorkshopApi from '@/api/wms/workshop' import * as ConfigApi from '@/api/infra/config' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品收货申请 // 预生产收货申请 defineOptions({ name: 'ProductreceiptRequestMain' }) @@ -659,13 +660,12 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain( tableObject.params @@ -673,7 +673,7 @@ const handleExport = async () => { download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue b/src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue index d3116835b..a41ef3d2e 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/mesRawMaterialConsumptionInfo/index.vue @@ -44,7 +44,8 @@ import { MesRawMaterialConsumptionInfo } from './mesRawMaterialConsumptionInfo.data' import { getJmreportBaseUrl } from '@/utils/systemParam' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配收货记录主 defineOptions({ name: 'RawMaterialConsumptionInfo' }) @@ -102,12 +103,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await MesRawMaterialConsumptionInfoApi.exportAssemblyMaterialUsageMes(tableObject.params) download.excel(data, '装配完工原料信息.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue index 02a099ecf..e6bd21d79 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleJobMain/index.vue @@ -74,7 +74,8 @@ import * as ProductreceiptJobDetailApi from '@/api/wms/productreceiptJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配收货任务主 defineOptions({ name: 'ProductreceiptJobMainA' }) @@ -283,19 +284,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptJobMainApi.exportProductreceiptJobMainAssemble(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue index d827f1408..26eead039 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRecordMain/index.vue @@ -123,7 +123,8 @@ import { } from '../../../purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/supplierdeliverRequestMain.data.ts' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配收货记录主 defineOptions({ name: 'ProductreceiptRecordMainA' }) @@ -364,19 +365,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordAssembleMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index dd7b5f91a..eee881675 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -153,7 +153,8 @@ import * as BomApi from "@/api/wms/bom"; import { formatDate } from '@/utils/formatTime' import * as WorkshopApi from '@/api/wms/workshop' import * as ConfigApi from '@/api/infra/config' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配收货申请 defineOptions({ name: 'ProductreceiptRequestMainA' }) @@ -573,19 +574,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMainAssemble(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue b/src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue index c938e8da9..7839573f2 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/rawMaterialConsumptionInfo/index.vue @@ -44,7 +44,8 @@ import { RawMaterialConsumptionInfo } from './rawMaterialConsumptionInfo.data' import { getJmreportBaseUrl } from '@/utils/systemParam' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 装配收货记录主 defineOptions({ name: 'RawMaterialConsumptionInfo' }) @@ -111,12 +112,12 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await RawMaterialConsumptionInfoApi.exportAssemblyMaterialUsage(tableObject.params) download.excel(data, '装配完工原料信息.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue index a46e9350c..a738a7da0 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapJobMain/index.vue @@ -75,6 +75,8 @@ import * as ProductreceiptJobDetailApi from '@/api/wms/productreceiptJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品收货任务主 defineOptions({ name: 'ProductreceiptJobMain' }) @@ -280,19 +282,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptJobMainApi.exportProductreceiptJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue index d7d4a729d..be0ca8bfa 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRecordMain/index.vue @@ -93,6 +93,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import * as BackflushRecordDetailbApi from '@/api/wms/backflushRecordDetailb' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品收货记录主 defineOptions({ name: 'ProductreceiptRecordMain' }) @@ -192,19 +194,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptRecordMainApi.exportProductreceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index 45fd2b9d4..e57b2268b 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -158,7 +158,8 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' import dayjs from 'dayjs' import { addDay } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品收货申请 // 隔离报工申请 // 隔离收货申请 @@ -570,19 +571,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductreceiptRequestMainApi.exportProductreceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue index b11c354cf..e44e29c50 100644 --- a/src/views/wms/productionManage/productredress/productredressJobMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressJobMain/index.vue @@ -61,7 +61,8 @@ import * as ProductredressJobMainApi from '@/api/wms/productredressJobMain' import * as ProductredressJobDetailApi from '@/api/wms/productredressJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ProductredressJobMain' }) const message = useMessage() // 消息弹窗 @@ -188,19 +189,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductredressJobMainApi.exportProductredressJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue b/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue index da2fc8db2..1964bdc01 100644 --- a/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRecordMain/index.vue @@ -59,7 +59,8 @@ import * as ProductredressRecordMainApi from '@/api/wms/productredressRecordMain import * as ProductredressRecordDetailApi from '@/api/wms/productredressRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ProductredressRecordMain' }) const message = useMessage() // 消息弹窗 @@ -132,19 +133,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductredressRecordMainApi.exportProductredressRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index c73a1a9a4..eeb5c77e8 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -114,7 +114,8 @@ import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'ProductredressRequestMain' }) const message = useMessage() // 消息弹窗 @@ -375,19 +376,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductredressRequestMainApi.exportProductredressRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue index 6ba640900..24d2d73ff 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRecordMain/index.vue @@ -97,6 +97,8 @@ import * as BomDismantleApi from "@/api/wms/bomDismantle"; import {getBomDismantleRecordPage} from "@/api/wms/bomDismantle"; import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品返修记录主 defineOptions({ name: 'ProductrepairRecordMain' }) @@ -258,19 +260,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductrepairRecordMainApi.exportProductrepairRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue index 14037bb28..dd3aa3841 100644 --- a/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue +++ b/src/views/wms/productionManage/productrepair/productrepairRequestMain/index.vue @@ -118,7 +118,8 @@ import * as dismantleRequestDetailbApi from "@/api/wms/dismantleRequestDetailb"; import {updateProductscrapDetailRequestBom} from "@/api/wms/productrepairRequestMain"; import * as BomApi from "@/api/wms/bom"; import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品返修申请 defineOptions({ name: 'ProductrepairRequestMain' }) @@ -568,19 +569,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductrepairRequestMainApi.exportProductrepairRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue index f6be26c1b..f62224f93 100644 --- a/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapJobMain/index.vue @@ -74,6 +74,8 @@ import * as ProductscrapJobDetailApi from '@/api/wms/productscrapJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品报废任务主 defineOptions({ name: 'ProductscrapJobMain' }) @@ -216,19 +218,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductscrapJobMainApi.exportProductscrapJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue index 4babb15c9..f880d248e 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRecordMain/index.vue @@ -96,6 +96,8 @@ import * as BomDismantleApi from "@/api/wms/bomDismantle"; import {getProductscrapBomDismantleRecordPage} from "@/api/wms/bomDismantle"; import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品报废记录主 defineOptions({ name: 'ProductscrapRecordMain' }) @@ -259,19 +261,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductscrapRecordMainApi.exportProductscrapRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 3772e2435..9e93edc0e 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -125,7 +125,8 @@ import * as BomDismantleApi from "@/api/wms/bomDismantle" import * as BomApi from "@/api/wms/bom"; import * as BalanceApi from "@/api/wms/balance"; import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 制品报废申请 defineOptions({ name: 'ProductscrapRequestMain' }) @@ -721,19 +722,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await ProductscrapRequestMainApi.exportProductscrapRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue index 651ccf6bc..ee421794c 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectJobMain/index.vue @@ -74,6 +74,8 @@ import * as InspectJobDetailApi from '@/api/wms/inspectJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 检验任务主 defineOptions({ name: 'InspectJobMain' }) @@ -226,19 +228,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectJobMainApi.exportInspectJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue index 30d9c98c6..a353967d2 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRecordMain/index.vue @@ -73,6 +73,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import Preview from '@/components/UploadFile/src/Preview.vue' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 检验记录主 defineOptions({ name: 'InspectRecordMain' }) @@ -172,19 +174,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectRecordMainApi.exportInspectRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue index d634e8b7e..0403f1f3e 100644 --- a/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/inspect/inspectRequestMain/index.vue @@ -54,7 +54,8 @@ import * as InspectRequestDetailApi from '@/api/wms/inspectRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 到货检验申请 defineOptions({ name: 'InspectRequestMain' }) @@ -315,19 +316,18 @@ } /** 导出按钮操作 */ - const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InspectRequestMainApi.exportInspectRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue index 74a76de16..82a8384bd 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptJobMain/index.vue @@ -105,6 +105,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getReportUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购收货任务主 defineOptions({ name: 'PurchasereceiptJobMain' }) @@ -356,19 +358,18 @@ const tableFormButton = async (val , row) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereceiptJobMainApi.exportPurchasereceiptJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue index d2431c211..26461e987 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordMain/index.vue @@ -117,6 +117,8 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getReportUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购收货记录主 defineOptions({ name: 'PurchasereceiptRecordMain' }) const message = useMessage() // 消息弹窗 @@ -296,13 +298,12 @@ const tableFormButton = async (val , row) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value.includes('SCP')){ const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params) @@ -313,7 +314,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue index f4d5f3823..9e8c619ed 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRecordRefuseMain/index.vue @@ -116,6 +116,8 @@ import { PurchasereceiptRefuseRequestTabsList } from '@/utils/disposition/tabsLi import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getReportUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购收货记录主 defineOptions({ name: 'PurchasereceiptRecordRefuseMain' }) const message = useMessage() // 消息弹窗 @@ -284,14 +286,13 @@ const tableFormButton = async (val , row) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true - const excelTitle = ref(route.meta.title) + loadStart() + const excelTitle = ref(route.meta.title) if(routeName.value.includes('SCP')){ const data = await PurchasereceiptRecordMainApi.exportPurchasereceiptRecordMainSCP(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) @@ -301,7 +302,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index dc4670e67..abc99b0a1 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -186,7 +186,8 @@ import * as ItembasicApi from '@/api/wms/itembasic' import { getJmreportBaseUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam' import { dateFormatter2 } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购收货申请 defineOptions({ name: 'PurchasereceiptRequestMain' }) @@ -755,19 +756,18 @@ const handleSubmit = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue index b59b95f10..ba42051be 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestOrderMTypeMain/index.vue @@ -168,7 +168,8 @@ import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import * as ItembasicApi from '@/api/wms/itembasic' import { getJmreportBaseUrl } from '@/utils/systemParam' import { getReportUrl } from '@/utils/systemParam' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购收货申请-M类型收货 defineOptions({ name: 'PurchasereceiptRequestOrderMTypeMain' }) @@ -693,19 +694,18 @@ const handleSubmit = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereceiptRequestMainApi.exportPurchasereceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue index 740fa9daa..8facc3d1b 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnJobMain/index.vue @@ -74,7 +74,8 @@ import * as PurchasereturnJobDetailApi from '@/api/wms/purchasereturnJobDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购退货任务主 defineOptions({ name: 'PurchasereturnJobMain' }) @@ -231,19 +232,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereturnJobMainApi.exportPurchasereturnJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue index c43899e89..e6c4d78ae 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRecordMain/index.vue @@ -71,6 +71,8 @@ import { getAccessToken } from '@/utils/auth' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购退货记录主 defineOptions({ name: 'PurchasereturnRecordMain' }) @@ -162,13 +164,12 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value.includes('SCP')){ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params) @@ -179,7 +180,7 @@ const handleExport = async () => { } } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue index 8512c8b4c..4441297a9 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMain/index.vue @@ -140,6 +140,8 @@ import * as BalanceApi from '@/api/wms/balance' import { async } from '@antv/x6/lib/registry/marker/async' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购退货申请 defineOptions({ name: 'PurchasereturnRequestMain' }) @@ -749,13 +751,12 @@ const handleSubmit = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain( tableObject.params @@ -763,7 +764,7 @@ const handleExport = async () => { download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue index 4e6d0f9e3..0a32f2981 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturn/purchasereturnRequestMainNew/index.vue @@ -169,6 +169,8 @@ import * as BalanceApi from '@/api/wms/balance' import { async } from '@antv/x6/lib/registry/marker/async' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购退货申请 defineOptions({ name: 'PurchasereturnRequestMainNew' }) @@ -665,13 +667,12 @@ const handleSubmit = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMain( tableObject.params @@ -679,7 +680,7 @@ const handleExport = async () => { download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue index f3f07b615..1e60303e7 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRecordSpareMain/index.vue @@ -71,6 +71,8 @@ import { getAccessToken } from '@/utils/auth' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购退货记录主 defineOptions({ name: 'PurchasereturnRecordSpareMain' }) @@ -162,13 +164,12 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) if(routeName.value.includes('SCP')){ const data = await PurchasereturnRecordMainApi.exportPurchasereturnRecordMainSCP(tableObject.params) @@ -180,7 +181,7 @@ const handleExport = async () => { } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue index 8469b9ea0..da30f3178 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue @@ -142,6 +142,8 @@ import * as BalanceApi from '@/api/wms/balance' import { async } from '@antv/x6/lib/registry/marker/async' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购退货申请 defineOptions({ name: 'PurchasereturnRequestSpareMain' }) @@ -699,13 +701,12 @@ const handleSubmit = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereturnRequestMainApi.exportPurchasereturnRequestMainSpare( tableObject.params @@ -713,7 +714,7 @@ const handleExport = async () => { download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue index 9990aa9ee..bfaaf2038 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayJobMain/index.vue @@ -102,6 +102,8 @@ import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {getAccessToken} from "@/utils/auth"; import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 上架任务主 defineOptions({ name: 'PutawayJobMain' }) @@ -341,19 +343,18 @@ const handleClose = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PutawayJobMainApi.exportPutawayJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue index c8257f4de..333dc6252 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRecordMain/index.vue @@ -92,6 +92,8 @@ import * as PutawayRecordDetailApi from '@/api/wms/putawayRecordDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 上架记录主 defineOptions({ name: 'PutawayRecordMain' }) @@ -204,19 +206,18 @@ const tableFormButton = async (val , row) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PutawayRecordMainApi.exportPutawayRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue index 504cdafcf..761f37e8f 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue @@ -111,7 +111,8 @@ import * as PutawayRequestMainApi from '@/api/wms/putawayRequestMain' import * as PutawayRequestDetailApi from '@/api/wms/putawayRequestDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 上架申请 defineOptions({ name: 'PutawayRequestMain' }) @@ -399,19 +400,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PutawayRequestMainApi.exportPutawayRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue index 86414352e..ae96d00d7 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptJobMain/index.vue @@ -75,6 +75,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {exportSparereceiptJobMain} from "@/api/wms/purchasereceiptJobMain"; import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备件收货任务主 defineOptions({ name: 'PurchasereceiptJobMain' }) @@ -252,19 +254,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereceiptJobMainApi.exportSparereceiptJobMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue index 072018567..45110c5d3 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRecordMain/index.vue @@ -72,6 +72,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import { PurchasereceiptRequestTabsList } from '@/utils/disposition/tabsList' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import {exportSparereceiptRecordMain} from "@/api/wms/purchasereceiptRecordMain"; +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购收货记录主 defineOptions({ name: 'PurchasereceiptRecordMain' }) @@ -153,19 +155,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereceiptRecordMainApi.exportSparereceiptRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue index e464f8937..62eba8b5a 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue @@ -134,7 +134,8 @@ import * as PurchaseDetailApi from '@/api/wms/purchaseDetail' import { PurchaseDetail } from '../../supplierdeliver/purchaseMain/purchaseMain.data' import * as ItembasicApi from '@/api/wms/itembasic' import { getJmreportBaseUrl } from '@/utils/systemParam' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 备件收货申请 defineOptions({ name: 'PurchasereceiptRequestMain' }) @@ -554,20 +555,18 @@ const handleSubmit = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasereceiptRequestMainApi.exportSparereceiptRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false - } + loadDone() } } /** diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue index 92ef839d7..094a5d307 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingMain/index.vue @@ -43,7 +43,8 @@ import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 要货预测 defineOptions({ name: 'DemandforecastingMain' }) @@ -176,19 +177,18 @@ const searchClick = async (data)=>{ setSearchParams(data) } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await DemandforecastingMainApi.exportDemandforecastingMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue index b324e3ed3..e2a1bf390 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/demandforecastingSupplierMain/index.vue @@ -50,7 +50,8 @@ import * as DemandforecastingMainApi from '@/api/wms/demandforecastingMain' import * as DemandforecastingDetailApi from '@/api/wms/demandforecastingDetail' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 要货预测 defineOptions({ name: 'DemandforecastingMain' }) @@ -182,19 +183,18 @@ const searchClick = async (data)=>{ setSearchParams(data) } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await DemandforecastingMainApi.exportDemandforecastingMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue index d70b0a6ff..b36c4f3c3 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/purchasePlanMain/index.vue @@ -122,6 +122,8 @@ import { PurchaseMain } from '../purchaseMain/purchaseMain.data' import { DICT_TYPE, getStrDictOptions } from '@/utils/dict' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() const { wsCache } = useCache() const language = wsCache.get('lang') const announcements = ref([]) @@ -710,19 +712,18 @@ const handleSelectionPublish = async ()=>{ } /** 导出按钮操作 */ - const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasePlanMainApi.exportPurchasePlanMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } @@ -732,13 +733,13 @@ const handleSelectionPublish = async ()=>{ // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasePlanMainApi.exportDetailsPurchasePlanMain(tableObject.params) download.excel(data, `【${excelTitle.value}明细】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } @@ -747,13 +748,13 @@ const handleSelectionPublish = async ()=>{ // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchasePlanMainApi.exportTablePurchasePlanMain(tableObject.params) download.excel(data, `【${excelTitle.value}二维表】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } /** diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/index.vue index d5aaf02c0..2b9337f28 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierPackage/index.vue @@ -65,7 +65,8 @@ import { Package,PackageRules } from './supplierPackage.data' import * as PackageApi from '@/api/wms/package' import * as defaultButtons from '@/utils/disposition/defaultButtons' import { getJmreportBaseUrl } from '@/utils/systemParam' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'PurchasePackage' }) const message = useMessage() // 消息弹窗 @@ -223,18 +224,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await PackageApi.exportPackage(tableObject.params) download.excel(data, '包装.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/index.vue index 522f05e2b..eb4e66c30 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverInspectionDetail/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplierdeliverInspectionDetail' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SupplierdeliverInspectionDetailApi.exportSupplierdeliverInspectionDetail(tableObject.params) download.excel(data, '供应商发货申请质检信息子.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue index c856afd3d..80fba0473 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRecordMain/index.vue @@ -119,6 +119,8 @@ import { getAccessToken } from '@/utils/auth' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 供应商发货记录主 defineOptions({ name: 'SupplierdeliverRecordMain' }) @@ -273,19 +275,18 @@ const tableFormButton = async (val , row) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierdeliverRecordMainApi.exportSupplierdeliverRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue index 5b43afa71..b14333648 100644 --- a/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/supplierdeliver/supplierdeliverRequestMain/index.vue @@ -225,6 +225,8 @@ import { Supplier } from '@/views/wms/basicDataManage/supplierManage/supplier/su import supplierdeliverBasicForm from './supplierdeliverBasicForm.vue' import labelForm from './labelForm.vue' import { getJmreportBaseUrl } from '@/utils/systemParam' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 供应商发货申请 defineOptions({ name: 'SupplierdeliverRequestMain' }) @@ -1036,13 +1038,12 @@ const genRecords = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierdeliverRequestMainApi.exportSupplierdeliverRequestMain( tableObject.params @@ -1050,7 +1051,7 @@ const handleExport = async () => { download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/invoicingcalendar/index.vue b/src/views/wms/supplierManage/invoicingcalendar/index.vue index a5e636af5..700eeb1b5 100644 --- a/src/views/wms/supplierManage/invoicingcalendar/index.vue +++ b/src/views/wms/supplierManage/invoicingcalendar/index.vue @@ -66,7 +66,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'Invoicingcalendar' }) const message = useMessage() // 消息弹窗 @@ -205,19 +206,18 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await InvoicingcalendarApi.exportInvoicingcalendar(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue index 07ce15882..b40d4913e 100644 --- a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue +++ b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRecordMain/index.vue @@ -69,6 +69,8 @@ import * as PurchaseclaimRecordDetailApi from '@/api/wms/purchaseclaimRecordDeta import * as defaultButtons from '@/utils/disposition/defaultButtons' import { CACHE_KEY, useCache } from '@/hooks/web/useCache' import { formatDate } from '@/utils/formatTime' + import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 采购索赔记录主 defineOptions({ name: 'PurchaseclaimRecordMain' }) @@ -149,19 +151,18 @@ const openDetail = (row: any, titleName: any, titleValue: any) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchaseclaimRecordMainApi.exportPurchaseclaimRecordMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue index 9456dc032..7e1ca9c8d 100644 --- a/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue +++ b/src/views/wms/supplierManage/purchaseclaim/purchaseclaimRequestMain/index.vue @@ -78,7 +78,8 @@ import TableHead from '@/components/TableHead/src/TableHead.vue' import { getJmreportBaseUrl } from '@/utils/systemParam' import { formatDate } from '@/utils/formatTime' - + import { usePageLoading } from '@/hooks/web/usePageLoading' + const { loadStart, loadDone } = usePageLoading() // 供应商索赔申请 defineOptions({ name: 'PurchaseclaimRequestMain' }) @@ -413,13 +414,13 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await PurchaseclaimRequestMainApi.exportPurchaseclaimRequestMain(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/index.vue b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/index.vue index bcc776831..4a3a8dd45 100644 --- a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/index.vue +++ b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceDetail/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import ImportForm from '@/components/ImportForm/src/ImportForm.vue' import Detail from '@/components/Detail/src/Detail.vue' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplierApbalanceDetail' }) const message = useMessage() // 消息弹窗 @@ -196,18 +197,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SupplierApbalanceDetailApi.exportSupplierApbalanceDetail(tableObject.params) download.excel(data, '供应商余额明细子.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue index 21da66053..4ad371e69 100644 --- a/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue +++ b/src/views/wms/supplierManage/supplierApbalance/supplierApbalanceMain/index.vue @@ -95,7 +95,8 @@ import AdjustmentDialog from '@/components/TableFormAdjustment/src/AdjustmentDia import {getJmreportBaseUrl} from "@/utils/systemParam"; import {getAccessToken} from "@/utils/auth"; - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplierApbalanceMain' }) const message = useMessage() // 消息弹窗 @@ -256,18 +257,17 @@ const handleDelete = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const data = await SupplierApbalanceMainApi.exportSupplierApbalanceMain(tableObject.params) download.excel(data, '供应商余额明细主.xlsx') } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue index e3b10dcb3..db9995306 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRecordMain/index.vue @@ -153,7 +153,8 @@ import * as PackageApi from "@/api/wms/package"; import {getAccessToken} from "@/utils/auth"; import {getJmreportBaseUrl} from "@/utils/systemParam"; import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() // 供应商发票记录主 defineOptions({ name: 'SupplierinvoiceRecordMain' }) @@ -302,7 +303,6 @@ const getSelectionRows = (currentPage,currentPageSelectionRows) => { } } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { let rows:any = [] selectionRows.value.forEach(item=>{ @@ -315,13 +315,13 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierinvoiceRecordMainApi.exportSupplierinvoiceRecordMain({...tableObject.params,checkNums:rows}) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue index 28d821725..db04d29ab 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMain/index.vue @@ -351,6 +351,8 @@ import { getJmreportBaseUrl } from '@/utils/systemParam' import { accountantFormart } from '@/utils/formatter' import { formatDate } from '@/utils/formatTime' +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplierinvoiceRequestMain' }) const message = useMessage() // 消息弹窗 @@ -1162,7 +1164,6 @@ const genRecords = async (id: number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { console.log(111) let rows: any = [] @@ -1187,13 +1188,13 @@ const handleExport = async () => { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestMain(paramsData) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue index 9dec5c5cd..35170828b 100644 --- a/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue +++ b/src/views/wms/supplierManage/supplierinvoice/supplierinvoiceRequestMainDifference/index.vue @@ -152,7 +152,8 @@ import dayjs from 'dayjs' import { getJmreportBaseUrl } from '@/utils/systemParam' import { accountantFormart } from '@/utils/formatter' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplierinvoiceRequestMain' }) const message = useMessage() // 消息弹窗 @@ -312,7 +313,6 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea } /** 导出按钮操作 */ - const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { let rows:any = [] selectionRows.value.forEach(item=>{ @@ -337,13 +337,13 @@ const searchTableSuccessDetail = async (formField, searchField, val, formRef,sea // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierinvoiceRequestMainApi.exportSupplierinvoiceRequestMain(paramsData) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } } diff --git a/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue b/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue index 7d376edd1..44040a846 100644 --- a/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue +++ b/src/views/wms/supplierManage/supplierinvoiceInvoiced/index.vue @@ -65,7 +65,8 @@ import * as defaultButtons from '@/utils/disposition/defaultButtons' import TableHead from '@/components/TableHead/src/TableHead.vue' import Detail from '@/components/Detail/src/Detail.vue' import { formatDate } from '@/utils/formatTime' - +import { usePageLoading } from '@/hooks/web/usePageLoading' +const { loadStart, loadDone } = usePageLoading() defineOptions({ name: 'SupplierinvoiceInvoiced' }) const message = useMessage() // 消息弹窗 @@ -265,19 +266,18 @@ const handleRefuse = async (id : number) => { } /** 导出按钮操作 */ -const exportLoading = ref(false) // 导出的加载中 const handleExport = async () => { try { // 导出的二次确认 await message.exportConfirm() // 发起导出 - exportLoading.value = true + loadStart() const excelTitle = ref(route.meta.title) const data = await SupplierinvoiceInvoicedApi.exportSupplierinvoiceInvoiced(tableObject.params) download.excel(data, `【${excelTitle.value}】【${formatDate(new Date())}】.xlsx`) } catch { } finally { - exportLoading.value = false + loadDone() } }