Browse Source

YT-1202WMS 生产线物料关系管理。新增时弹出提示后一直加载

intex
zhang_li 1 week ago
parent
commit
8a0f2cd3af
  1. 52
      src/views/wms/basicDataManage/itemManage/productionlineitem/index.vue

52
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
}
}
//

Loading…
Cancel
Save