From 6a2b0ab6894b34c83bbd29e8315387cd833e0148 Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Tue, 30 Jul 2024 16:58:51 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerManage/customer/index.vue | 2 ++ .../customerManage/customerdock/index.vue | 2 ++ .../customerManage/customeritem/index.vue | 2 ++ .../customerManage/project/index.vue | 2 ++ .../customerManage/saleprice/index.vue | 2 ++ .../factoryModeling/areabasic/index.vue | 17 +++++++++++------ .../factoryModeling/dock/index.vue | 17 +++++++++++------ .../factoryModeling/location/index.vue | 17 +++++++++++------ .../factoryModeling/locationgroup/index.vue | 17 +++++++++++------ .../factoryModeling/process/index.vue | 17 +++++++++++------ .../factoryModeling/productionline/index.vue | 17 +++++++++++------ .../factoryModeling/warehouse/index.vue | 17 +++++++++++------ .../factoryModeling/workshop/index.vue | 18 ++++++++++++------ .../factoryModeling/workstation/index.vue | 18 ++++++++++++------ .../basicDataManage/itemManage/bom/index.vue | 2 ++ .../itemManage/itemarea/index.vue | 1 + .../itemManage/itembasic/index.vue | 3 +++ .../itemManage/itempackage/index.vue | 19 +++++++++++++------ .../itemManage/packageunit/index.vue | 2 ++ .../productionitemcodeSpareitemcode/index.vue | 2 ++ .../itemManage/productionlineitem/index.vue | 2 ++ .../itemManage/stdcostprice/index.vue | 3 +++ .../supplierManage/purchaseprice/index.vue | 2 ++ .../supplierManage/supplier/index.vue | 2 ++ .../supplierManage/supplieritem/index.vue | 2 ++ 25 files changed, 145 insertions(+), 60 deletions(-) diff --git a/src/views/wms/basicDataManage/customerManage/customer/index.vue b/src/views/wms/basicDataManage/customerManage/customer/index.vue index 8b8572c04..a2a85341c 100644 --- a/src/views/wms/basicDataManage/customerManage/customer/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customer/index.vue @@ -185,6 +185,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await CustomerApi.createCustomer(data) message.success(t('common.createSuccess')) @@ -192,6 +193,7 @@ const formsSuccess = async (formType,data) => { await CustomerApi.updateCustomer(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue index 76c7d12aa..bff35210f 100644 --- a/src/views/wms/basicDataManage/customerManage/customerdock/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerdock/index.vue @@ -188,6 +188,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await CustomerdockApi.createCustomerdock(data) message.success(t('common.createSuccess')) @@ -195,6 +196,7 @@ const formsSuccess = async (formType,data) => { await CustomerdockApi.updateCustomerdock(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/customerManage/customeritem/index.vue b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue index da2ad21d2..1888b081a 100644 --- a/src/views/wms/basicDataManage/customerManage/customeritem/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customeritem/index.vue @@ -194,6 +194,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await CustomeritemApi.createCustomeritem(data) message.success(t('common.createSuccess')) @@ -201,6 +202,7 @@ const formsSuccess = async (formType,data) => { await CustomeritemApi.updateCustomeritem(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/customerManage/project/index.vue b/src/views/wms/basicDataManage/customerManage/project/index.vue index fe8faefac..1f7f8010a 100644 --- a/src/views/wms/basicDataManage/customerManage/project/index.vue +++ b/src/views/wms/basicDataManage/customerManage/project/index.vue @@ -185,6 +185,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await ProjectApi.createProject(data) message.success(t('common.createSuccess')) @@ -192,6 +193,7 @@ const formsSuccess = async (formType,data) => { await ProjectApi.updateProject(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/customerManage/saleprice/index.vue b/src/views/wms/basicDataManage/customerManage/saleprice/index.vue index c9df169b4..29b1ac834 100644 --- a/src/views/wms/basicDataManage/customerManage/saleprice/index.vue +++ b/src/views/wms/basicDataManage/customerManage/saleprice/index.vue @@ -189,6 +189,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await SalepriceApi.createSaleprice(data) message.success(t('common.createSuccess')) @@ -196,6 +197,7 @@ const formsSuccess = async (formType,data) => { await SalepriceApi.updateSaleprice(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue b/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue index 15046fcca..2e2135bc6 100644 --- a/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/areabasic/index.vue @@ -188,12 +188,17 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await AreaApi.createArea(data) - message.success(t('common.createSuccess')) - } else { - await AreaApi.updateArea(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await AreaApi.createArea(data) + message.success(t('common.createSuccess')) + } else { + await AreaApi.updateArea(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/dock/index.vue b/src/views/wms/basicDataManage/factoryModeling/dock/index.vue index 838e8a9d0..25e09d46c 100644 --- a/src/views/wms/basicDataManage/factoryModeling/dock/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/dock/index.vue @@ -217,12 +217,17 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await DockApi.createDock(data) - message.success(t('common.createSuccess')) - } else { - await DockApi.updateDock(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await DockApi.createDock(data) + message.success(t('common.createSuccess')) + } else { + await DockApi.updateDock(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/location/index.vue b/src/views/wms/basicDataManage/factoryModeling/location/index.vue index c410d2acc..195c1bbee 100644 --- a/src/views/wms/basicDataManage/factoryModeling/location/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/location/index.vue @@ -206,12 +206,17 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await LocationApi.createLocation(data) - message.success(t('common.createSuccess')) - } else { - await LocationApi.updateLocation(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await LocationApi.createLocation(data) + message.success(t('common.createSuccess')) + } else { + await LocationApi.updateLocation(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue b/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue index 06a03cb5d..7af3ab2f0 100644 --- a/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/locationgroup/index.vue @@ -187,12 +187,17 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await LocationgroupApi.createLocationgroup(data) - message.success(t('common.createSuccess')) - } else { - await LocationgroupApi.updateLocationgroup(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await LocationgroupApi.createLocationgroup(data) + message.success(t('common.createSuccess')) + } else { + await LocationgroupApi.updateLocationgroup(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/process/index.vue b/src/views/wms/basicDataManage/factoryModeling/process/index.vue index f521b5621..a076365ef 100644 --- a/src/views/wms/basicDataManage/factoryModeling/process/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/process/index.vue @@ -194,12 +194,17 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await ProcessApi.createProcess(data) - message.success(t('common.createSuccess')) - } else { - await ProcessApi.updateProcess(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await ProcessApi.createProcess(data) + message.success(t('common.createSuccess')) + } else { + await ProcessApi.updateProcess(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue b/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue index 7c32a3771..1da242abe 100644 --- a/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/productionline/index.vue @@ -187,12 +187,17 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await ProductionlineApi.createProductionline(data) - message.success(t('common.createSuccess')) - } else { - await ProductionlineApi.updateProductionline(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await ProductionlineApi.createProductionline(data) + message.success(t('common.createSuccess')) + } else { + await ProductionlineApi.updateProductionline(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue b/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue index 71d81d5a0..c176cd9f1 100644 --- a/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/warehouse/index.vue @@ -176,12 +176,17 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await WarehouseApi.createWarehouse(data) - message.success(t('common.createSuccess')) - } else { - await WarehouseApi.updateWarehouse(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await WarehouseApi.createWarehouse(data) + message.success(t('common.createSuccess')) + } else { + await WarehouseApi.updateWarehouse(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue b/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue index 97509070d..10a23c941 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/workshop/index.vue @@ -177,12 +177,18 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await WorkshopApi.createWorkshop(data) - message.success(t('common.createSuccess')) - } else { - await WorkshopApi.updateWorkshop(data) - message.success(t('common.updateSuccess')) + + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await WorkshopApi.createWorkshop(data) + message.success(t('common.createSuccess')) + } else { + await WorkshopApi.updateWorkshop(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue index e2a969250..0415294f6 100644 --- a/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue +++ b/src/views/wms/basicDataManage/factoryModeling/workstation/index.vue @@ -195,12 +195,18 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await WorkstationApi.createWorkstation(data) - message.success(t('common.createSuccess')) - } else { - await WorkstationApi.updateWorkstation(data) - message.success(t('common.updateSuccess')) + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await WorkstationApi.createWorkstation(data) + message.success(t('common.createSuccess')) + } else { + await WorkstationApi.updateWorkstation(data) + message.success(t('common.updateSuccess')) + } + + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/itemManage/bom/index.vue b/src/views/wms/basicDataManage/itemManage/bom/index.vue index e6becb72c..37400681d 100644 --- a/src/views/wms/basicDataManage/itemManage/bom/index.vue +++ b/src/views/wms/basicDataManage/itemManage/bom/index.vue @@ -196,6 +196,7 @@ const formsSuccess = async (formType,data) => { message.error('父物料代码和子物料代码不能相同!') return } + basicFormRef.value.formLoading = true if (formType === 'create') { await BomApi.createBom(data) message.success(t('common.createSuccess')) @@ -203,6 +204,7 @@ const formsSuccess = async (formType,data) => { await BomApi.updateBom(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue index ffb5fdd0a..a34c37ef4 100644 --- a/src/views/wms/basicDataManage/itemManage/itemarea/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itemarea/index.vue @@ -367,6 +367,7 @@ const tableSelectionDelete = (selection) => { // 主子数据 提交 const submitForm = async (formType, data) => { data.subList = tableData.value // 拼接子表数据参数 + formRef.value.formLoading = true try { if (formType === 'create') { await ItemareaApi.createItemarea(data) diff --git a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue index 927538edd..31a154a5c 100644 --- a/src/views/wms/basicDataManage/itemManage/itembasic/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itembasic/index.vue @@ -237,6 +237,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await ItembasicApi.createItembasic(data) message.success(t('common.createSuccess')) @@ -244,6 +245,8 @@ const formsSuccess = async (formType,data) => { await ItembasicApi.updateItembasic(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false + basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue index a5239d1a6..41db7ca3e 100644 --- a/src/views/wms/basicDataManage/itemManage/itempackage/index.vue +++ b/src/views/wms/basicDataManage/itemManage/itempackage/index.vue @@ -220,12 +220,19 @@ const formsSuccess = async (formType, data) => { } if (data.activeTime == 0) data.activeTime = null if (data.expireTime == 0) data.expireTime = null - if (formType === 'create') { - await ItempackagingApi.createItempackaging(data) - message.success(t('common.createSuccess')) - } else { - await ItempackagingApi.updateItempackaging(data) - message.success(t('common.updateSuccess')) + + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await ItempackagingApi.createItempackaging(data) + message.success(t('common.createSuccess')) + } else { + await ItempackagingApi.updateItempackaging(data) + message.success(t('common.updateSuccess')) + } + + } finally { + basicFormRef.value.formLoading = false } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue index cafde36a8..d3f58ad70 100644 --- a/src/views/wms/basicDataManage/itemManage/packageunit/index.vue +++ b/src/views/wms/basicDataManage/itemManage/packageunit/index.vue @@ -213,6 +213,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await PackageunitApi.createPackageunit(data) message.success(t('common.createSuccess')) @@ -220,6 +221,7 @@ const formsSuccess = async (formType,data) => { await PackageunitApi.updatePackageunit(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue index 54107cf0d..ca030de9f 100644 --- a/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue +++ b/src/views/wms/basicDataManage/itemManage/productionitemcodeSpareitemcode/index.vue @@ -188,6 +188,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await ProductionitemcodeSpareitemcodeApi.createProductionitemcodeSpareitemcode(data) message.success(t('common.createSuccess')) @@ -195,6 +196,7 @@ const formsSuccess = async (formType,data) => { await ProductionitemcodeSpareitemcodeApi.updateProductionitemcodeSpareitemcode(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue index 4599b7d87..a04119f7e 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue @@ -189,6 +189,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await ProductionlineitemApi.createProductionlineitem(data) message.success(t('common.createSuccess')) @@ -196,6 +197,7 @@ const formsSuccess = async (formType,data) => { await ProductionlineitemApi.updateProductionlineitem(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue b/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue index c4cf85020..48e5c9bae 100644 --- a/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue +++ b/src/views/wms/basicDataManage/itemManage/stdcostprice/index.vue @@ -182,6 +182,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await StdcostpriceApi.createStdcostprice(data) message.success(t('common.createSuccess')) @@ -190,6 +191,8 @@ const formsSuccess = async (formType,data) => { message.success(t('common.updateSuccess')) } basicFormRef.value.dialogVisible = false + basicFormRef.value.formLoading = false + getList() } diff --git a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue index 1f9694b7c..aebe21773 100644 --- a/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/purchaseprice/index.vue @@ -189,6 +189,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { await PurchasepriceApi.createPurchaseprice(data) message.success(t('common.createSuccess')) @@ -196,6 +197,7 @@ const formsSuccess = async (formType,data) => { await PurchasepriceApi.updatePurchaseprice(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue index b79d5b41a..410f5ab11 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplier/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplier/index.vue @@ -180,6 +180,7 @@ const formsSuccess = async (formType, data) => { } if (data.activeTime == 0) data.activeTime = null if (data.expireTime == 0) data.expireTime = null + basicFormRef.value.formLoading = true if (formType === 'create') { await SupplierApi.createSupplier(data) message.success(t('common.createSuccess')) @@ -188,6 +189,7 @@ const formsSuccess = async (formType, data) => { await SupplierApi.updateSupplier(data) message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() } diff --git a/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue index b9692daa0..a439b6bbf 100644 --- a/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue +++ b/src/views/wms/basicDataManage/supplierManage/supplieritem/index.vue @@ -192,6 +192,7 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; + basicFormRef.value.formLoading = true if (formType === 'create') { if(routeName.value.includes('SCP')){ await SupplieritemApi.createSupplieritemSCP(data) @@ -207,6 +208,7 @@ const formsSuccess = async (formType,data) => { } message.success(t('common.updateSuccess')) } + basicFormRef.value.formLoading = false basicFormRef.value.dialogVisible = false getList() }