From dffa8ca378ab760b7a950d488b693de038ea4000 Mon Sep 17 00:00:00 2001 From: liangkun Date: Fri, 25 Mar 2022 16:50:17 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E7=AC=AC=E4=B8=80=E6=AC=A1?= =?UTF-8?q?=E4=BF=9D=E5=AD=98=E5=A4=B1=E8=B4=A5=E6=8A=A5=E9=94=99=E5=90=8E?= =?UTF-8?q?=E7=AC=AC=E4=BA=8C=E6=AC=A1=E7=9B=B4=E6=8E=A5=E4=BC=9Aupdate?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/CustmerformController.cs | 19 +++++++++++----- .../Views/NWFProcess/NWFContainerForm.js | 22 +++++++++++-------- 2 files changed, 27 insertions(+), 14 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs index 50cb98846..da1527d9a 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Controllers/CustmerformController.cs @@ -1,4 +1,5 @@ -using Learun.Application.Form; +using System; +using Learun.Application.Form; using Learun.Util; using System.Collections.Generic; using System.Web.Mvc; @@ -331,12 +332,20 @@ namespace Learun.Application.Web.Areas.LR_FormModule.Controllers [ValidateInput(false)] public ActionResult SaveInstanceForms(string data) { - List list = data.ToObject>(); - foreach (var item in list) + try { - formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); + List list = data.ToObject>(); + foreach (var item in list) + { + formSchemeIBLL.SaveInstanceForm(item.schemeInfoId, item.processIdName, item.keyValue, item.formData); + } + return Success("保存成功!"); } - return Success("保存成功!"); + catch (Exception e) + { + return Fail("sql执行错误,数据溢出"); + } + } /// /// 删除自定义表单数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js index 090db1c3a..a66d6452e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/NWFContainerForm.js @@ -711,13 +711,13 @@ var bootstrap = function ($, learun) { signUrl: signUrl, stamp: stamp }; - learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { - learun.loading(false); - if (_data) { - learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); - learun.frameTab.close(tabIframeId); - } - }); + learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/AuditFlow', postData, function (_data) { + learun.loading(false); + if (_data) { + learun.frameTab.parentIframe().refreshGirdData && learun.frameTab.parentIframe().refreshGirdData(); + learun.frameTab.close(tabIframeId); + } + }); }); }); } @@ -1721,14 +1721,18 @@ var bootstrap = function ($, learun) { formData[_item.field] = processId; point.formData = JSON.stringify(formData); formDataList.push(point); - - _item.isUpdate = true; + //liangkun 修复第一次保存失败报错后第二次直接会update + //_item.isUpdate = true; } }); if (formDataList.length > 0) { $.lrSaveForm(top.$.rootUrl + '/LR_FormModule/Custmerform/SaveInstanceForms', { data: JSON.stringify(formDataList) }, function (res) { if (res.code == 200) { + //liangkun 修复第一次保存失败报错后第二次直接会update + $.each(nwfForms, function (_index, _item) { + _item.isUpdate = true; + }); monitorSave(); } else {