From f02e0d088e1dc41918cd110cc6331943a5b6b64b Mon Sep 17 00:00:00 2001 From: wangyufei <2267742828@qq.com> Date: Tue, 30 Jul 2024 19:02:26 +0800 Subject: [PATCH] =?UTF-8?q?loading=E6=B7=BB=E5=8A=A0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customerDeliveryForecast/index.vue | 19 +++++++++++++------ .../relegate/relegateRequest/index.vue | 2 +- .../customerreceiptRequestMain/index.vue | 1 + .../customerreturnRequestMain/index.vue | 2 +- .../deliver/deliverRequestMain/index.vue | 3 +-- .../deliverplan/deliverPlanMain/index.vue | 2 +- .../saleShipmentMainRequest/index.vue | 3 ++- .../stockup/stockupMainRequest/index.vue | 3 +-- .../preparetoissueMain/index.vue | 2 ++ .../productionreturnRequestMain/index.vue | 1 + .../productionreturnRequestMainNo/index.vue | 1 + .../repleinsh/repleinshRequestMain/index.vue | 2 +- .../productionplan/productionMain/index.vue | 2 +- .../productionMainAssemble/index.vue | 2 +- .../productionMainAssembleSparePart/index.vue | 2 +- .../productputawayRequestMain/index.vue | 1 + .../index.vue | 1 + .../productreceiptRequestMain/index.vue | 1 + .../index.vue | 1 + .../productreceiptscrapRequestMain/index.vue | 2 +- .../productredressRequestMain/index.vue | 1 + .../productscrapRequestMain/index.vue | 2 +- .../purchasereceiptRequestMain/index.vue | 1 + .../purchasereturnRequestSpareMain/index.vue | 1 + .../putaway/putawayRequestMain/index.vue | 1 + .../sparereceiptRequestMain/index.vue | 1 + 26 files changed, 40 insertions(+), 20 deletions(-) diff --git a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue index a018a70e7..8753a492e 100644 --- a/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue +++ b/src/views/wms/basicDataManage/customerManage/customerDeliveryForecast/index.vue @@ -165,12 +165,19 @@ const formsSuccess = async (formType,data) => { } if(data.activeTime==0)data.activeTime = null; if(data.expireTime==0)data.expireTime = null; - if (formType === 'create') { - await CustomerDeliveryForecastApi.createCustomerDeliveryForecast(data) - message.success(t('common.createSuccess')) - } else { - await CustomerDeliveryForecastApi.updateCustomerDeliveryForecast(data) - message.success(t('common.updateSuccess')) + + basicFormRef.value.formLoading = true + try { + if (formType === 'create') { + await CustomerDeliveryForecastApi.createCustomerDeliveryForecast(data) + message.success(t('common.createSuccess')) + } else { + await CustomerDeliveryForecastApi.updateCustomerDeliveryForecast(data) + message.success(t('common.updateSuccess')) + } + } finally { + basicFormRef.value.formLoading = false + } basicFormRef.value.dialogVisible = false getList() diff --git a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue index b519046d1..7d4ca92ef 100644 --- a/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue +++ b/src/views/wms/basicDataManage/itemManage/relegate/relegateRequest/index.vue @@ -614,9 +614,9 @@ const submitForm = async (formType, data) => { } }) if (flag.value) { - basicFormRef.value.formLoading = false return } + basicFormRef.value.formLoading = true try { if (formType === 'create') { if (tableData.value.length <= 0) { diff --git a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue index 69c9681f5..2cd3757d9 100644 --- a/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreceipt/customerreceiptRequestMain/index.vue @@ -363,6 +363,7 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 + formRef.value.formLoading = true try { if (formType === 'create') { await CustomerreceiptRequestMainApi.createCustomerreceiptRequestMain(data) diff --git a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue index ee05590b4..8d19bc9ea 100644 --- a/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/customerreturn/customerreturnRequestMain/index.vue @@ -724,9 +724,9 @@ const submitForm = async (formType, submitData) => { } }) if(flag.value){ - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { await CustomerreturnRequestMainApi.createCustomerreturnRequestMain(data) diff --git a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue index f8e1430c4..eab590c56 100644 --- a/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliver/deliverRequestMain/index.vue @@ -532,7 +532,6 @@ const submitForm = async (formType, submitData) => { data.businessType = businessType.value console.log(data); if (isExist) { - formRef.value.formLoading = false return message.warning('物料代码重复') } data.subList.forEach(obj => { @@ -543,9 +542,9 @@ const submitForm = async (formType, submitData) => { } }) if(flag.value){ - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { if(tableData.value.length <= 0){ diff --git a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue index 47f96799d..72507bad8 100644 --- a/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue +++ b/src/views/wms/deliversettlementManage/deliverplan/deliverPlanMain/index.vue @@ -501,7 +501,6 @@ const submitForm = async (formType, submitData) => { } }) if(flag.value){ - formRef.value.formLoading = false return } var isHave =DeliverPlanMain.allSchemas.formSchema.some(function (item) { @@ -517,6 +516,7 @@ const submitForm = async (formType, submitData) => { if(!data.beginTime)data.beginTime = null; if(!data.planDate)data.planDate = null; if(!data.endTime)data.endTime = null; + formRef.value.formLoading = true try { if (formType === 'create') { await DeliverPlanMainApi.createDeliverPlanMain(data) diff --git a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue index 9fd7dda33..81b5664b5 100644 --- a/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/saleShipmentMainRequest/index.vue @@ -354,9 +354,10 @@ const submitForm = async (formType, submitData) => { if(rs.length > 1) isExist = true }) if (isExist) { - basicFormRef.value.formLoading = false + // basicFormRef.value.formLoading = false return message.warning('物料代码重复') } + basicFormRef.value.formLoading = true try { if (formType === 'create') { if(tableData.value.length <= 0){ diff --git a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue index 3edbc9158..ef987afd1 100644 --- a/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue +++ b/src/views/wms/deliversettlementManage/stockup/stockupMainRequest/index.vue @@ -457,7 +457,6 @@ const submitForm = async (formType, submitData) => { if(rs.length > 1) isExist = true }) if (isExist) { - formRef.value.formLoading = false return message.warning('物料代码重复') } data.subList.forEach(obj => { @@ -468,9 +467,9 @@ const submitForm = async (formType, submitData) => { } }) if(flag.value){ - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { if(tableData.value.length <= 0){ diff --git a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue index 2600494c4..f9634c32c 100644 --- a/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue +++ b/src/views/wms/issueManage/preparetoissueplan/preparetoissueMain/index.vue @@ -499,6 +499,8 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 + formRef.value.formLoading = true + try { if (formType === 'create') { await PreparetoissueMainApi.createPreparetoissueMain(data).then(async (res) => { diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue index 82d8d0dfa..62d1cd711 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMain/index.vue @@ -661,6 +661,7 @@ const submitForm = async (formType, submitData) => { } // 合格退料 添加参数 isOK data.isOK = true + formRef.value.formLoading = true try { if (formType === 'create') { // 子表不能为空 diff --git a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue index 529e57f8a..e64cc1fc0 100644 --- a/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue +++ b/src/views/wms/issueManage/productionreturn/productionreturnRequestMainNo/index.vue @@ -591,6 +591,7 @@ const submitForm = async (formType, submitData) => { data.subList.forEach(item => { item.productionLineCode = data.productionLineCode }) + formRef.value.formLoading = true try { if (formType === 'create') { // 子表不能为空 diff --git a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue index b01025176..578d0b2ed 100644 --- a/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue +++ b/src/views/wms/issueManage/repleinsh/repleinshRequestMain/index.vue @@ -391,9 +391,9 @@ const submitForm = async (formType, submitData) => { // } if(tableData.value.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { await RepleinshRequestMainApi.createRepleinshRequestMain(data) diff --git a/src/views/wms/productionManage/productionplan/productionMain/index.vue b/src/views/wms/productionManage/productionplan/productionMain/index.vue index e44583cff..ca254fd72 100644 --- a/src/views/wms/productionManage/productionplan/productionMain/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMain/index.vue @@ -597,9 +597,9 @@ const submitForm = async (formType, submitData) => { } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { data.subList = tableData.value // 拼接子表数据参数 diff --git a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue index c27dcfade..c1c214df9 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssemble/index.vue @@ -595,9 +595,9 @@ const submitForm = async (formType, submitData) => { } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { data.subList = tableData.value // 拼接子表数据参数 diff --git a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue index 4ab269ab6..b0e9ce7a9 100644 --- a/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue +++ b/src/views/wms/productionManage/productionplan/productionMainAssembleSparePart/index.vue @@ -588,9 +588,9 @@ const submitForm = async (formType, submitData) => { } if(tableData.value.find(item => (item.planQty <= 0))) { message.warning('数量必须大于0') - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { data.subList = tableData.value // 拼接子表数据参数 diff --git a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue index c82d51f25..5e3567de0 100644 --- a/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue +++ b/src/views/wms/productionManage/productputaway/productputawayRequestMain/index.vue @@ -386,6 +386,7 @@ const submitForm = async (formType, submitData) => { formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { await ProductputawayRequestMainApi.createProductputawayRequestMain(data) diff --git a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue index 84d9e6d53..d3082f024 100644 --- a/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productputawayAssemble/productputawayAssembleRequestMain/index.vue @@ -387,6 +387,7 @@ const submitForm = async (formType, submitData) => { formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { await ProductputawayRequestMainApi.createProductputawayRequestMain(data) diff --git a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue index 5006d4d04..61f4c5984 100644 --- a/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceipt/productreceiptRequestMain/index.vue @@ -615,6 +615,7 @@ const submitForm = async (formType, submitData) => { formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { await ProductreceiptRequestMainApi.createProductreceiptRequestMain(data) diff --git a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue index 0ce049b13..4864d6187 100644 --- a/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptAssemble/productreceiptAssembleRequestMain/index.vue @@ -616,6 +616,7 @@ const submitForm = async (formType, submitData) => { formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { await ProductreceiptRequestMainApi.createProductreceiptRequestMain(data) diff --git a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue index 664b1d5f9..1b92ac602 100644 --- a/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productreceiptscrap/productreceiptscrapRequestMain/index.vue @@ -596,9 +596,9 @@ const submitForm = async (formType, submitData) => { data.subList = tableData.value // 拼接子表数据参数 if(data.subList.find(item => (item.qty <= 0))) { message.warning('数量必须大于0') - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { data.productionLineCode = data.subList[0].productionLineCode; diff --git a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue index 85d9c1a37..a58f08d13 100644 --- a/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue +++ b/src/views/wms/productionManage/productredress/productredressRequestMain/index.vue @@ -421,6 +421,7 @@ const submitForm = async (formType, submitData) => { formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { await ProductredressRequestMainApi.createProductredressRequestMain(data) diff --git a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue index 2bef4ef89..6f4d808c1 100644 --- a/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue +++ b/src/views/wms/productionManage/productscrap/productscrapRequestMain/index.vue @@ -711,9 +711,9 @@ const submitForm = async (formType, submitData) => { }) if (!childListRs) { message.warning('请填写Bom信息!') - formRef.value.formLoading = false return } + formRef.value.formLoading = true try { if (formType === 'create') { if(data.subList.length == 0){ diff --git a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue index f53ba96fa..c9f2ac125 100644 --- a/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereceipt/purchasereceiptRequestMain/index.vue @@ -758,6 +758,7 @@ const submitForm = async (formType, submitData) => { row['expireDate'] = row['expireTime']?addDay(row['produceDate'],row['expireTime']).valueOf():dayjs('2099-12-31').valueOf() }) data.subList = tableData.value // 拼接子表数据参数 + formRef.value.formLoading = true try { if (formType === 'create') { data.orderTypeM='1'; diff --git a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue index 7ca3471c4..34084e7eb 100644 --- a/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue +++ b/src/views/wms/purchasereceiptManage/purchasereturnspare/purchasereturnRequestSpareMain/index.vue @@ -876,6 +876,7 @@ const submitForm = async (formType, submitData) => { return } data.subList = tableData.value // 拼接子表数据参数 + formRef.value.formLoading = true try { if (formType === 'create') { let flag = false diff --git a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue index 7ef2eaf06..97f1b1c63 100644 --- a/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/putaway/putawayRequestMain/index.vue @@ -445,6 +445,7 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 + formRef.value.formLoading = true try { if (formType === 'create') { await PutawayRequestMainApi.createPutawayRequestMain(data) diff --git a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue index 79b6e7f5e..622c5196f 100644 --- a/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue +++ b/src/views/wms/purchasereceiptManage/sparereceipt/sparereceiptRequestMain/index.vue @@ -600,6 +600,7 @@ const submitForm = async (formType, submitData) => { data.id = data.masterId } data.subList = tableData.value // 拼接子表数据参数 + formRef.value.formLoading = true try { if (formType === 'create') { data.orderTypeM='1';