From 8a0f2cd3af3cf15a732f671a81ef057f0815759e Mon Sep 17 00:00:00 2001 From: zhang_li <2235006734@qqq.com> Date: Mon, 25 Nov 2024 14:51:54 +0800 Subject: [PATCH] =?UTF-8?q?YT-1202WMS=20=E7=94=9F=E4=BA=A7=E7=BA=BF?= =?UTF-8?q?=E7=89=A9=E6=96=99=E5=85=B3=E7=B3=BB=E7=AE=A1=E7=90=86=E3=80=82?= =?UTF-8?q?=E6=96=B0=E5=A2=9E=E6=97=B6=E5=BC=B9=E5=87=BA=E6=8F=90=E7=A4=BA?= =?UTF-8?q?=E5=90=8E=E4=B8=80=E7=9B=B4=E5=8A=A0=E8=BD=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../itemManage/productionlineitem/index.vue | 52 ++++++++++--------- 1 file changed, 28 insertions(+), 24 deletions(-) diff --git a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue index 3badcc8e2..5314a421e 100644 --- a/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue +++ b/src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue @@ -220,32 +220,36 @@ const openForm = (type: string, row?: any) => { // form表单提交 const formsSuccess = async (formType,data) => { + try{ var isHave =Productionlineitem.allSchemas.formSchema.some(function (item) { - return item.field === 'activeTime' || item.field === 'expireTime'; - }); - if(isHave){ - if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ - message.error('失效时间要大于生效时间') - return; - } - } - 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')) - } else { - await ProductionlineitemApi.updateProductionlineitem(data) - message.success(t('common.updateSuccess')) - } - basicFormRef.value.formLoading = false - basicFormRef.value.dialogVisible = false - if (formType === 'create') { - getList() - }else{ - buttonBaseClick('refresh',null) + return item.field === 'activeTime' || item.field === 'expireTime'; + }); + if(isHave){ + if(data.activeTime && data.expireTime && data.activeTime >=data.expireTime){ + message.error('失效时间要大于生效时间') + return; } + } + 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')) + } else { + await ProductionlineitemApi.updateProductionlineitem(data) + message.success(t('common.updateSuccess')) + } + basicFormRef.value.formLoading = false + basicFormRef.value.dialogVisible = false + if (formType === 'create') { + getList() + }else{ + buttonBaseClick('refresh',null) + } + } catch { + basicFormRef.value.formLoading = false + } } // 查询页面返回