From 2f0be08231b7bf45fc90b1ddb2aecde434648a55 Mon Sep 17 00:00:00 2001 From: zhichao lei <442149704@qq.com> Date: Tue, 24 Nov 2020 10:03:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=84=E4=BA=A7=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Ass_AssetsInfo/Form.cshtml | 2 +- .../Views/Ass_AssetsInfo/Form.js | 31 +++-- .../Views/Ass_AssetsInfoItem/Index.js | 3 +- .../Views/Ass_AssetsInfoItem/QRPrint.cshtml | 3 +- .../Views/Ass_PurchaseApply/Index.js | 1 + .../Views/Ass_PurchaseItemApply/Form.cshtml | 2 +- .../Ass_AssetsInfo/Ass_AssetsInfoService.cs | 110 +++++++++--------- .../Ass_Purchase/Ass_PurchaseService.cs | 1 + .../Ass_PurchaseApply/Ass_PurchaseApplyBLL.cs | 4 +- .../Ass_PurchaseApplyEntity.cs | 5 + .../Ass_PurchaseApplyIBLL.cs | 2 +- .../Ass_PurchaseApplyService.cs | 5 +- .../NodeMethod/Ass_PurchaseApplyMethod.cs | 10 +- 13 files changed, 105 insertions(+), 74 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.cshtml index d68b95c30..439bd249c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.cshtml @@ -44,7 +44,7 @@
-
库存*
+
数量*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.js index 754a2453e..933121b7e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfo/Form.js @@ -52,15 +52,32 @@ var bootstrap = function ($, learun) { if (!$('body').lrValidform()) { return false; } + var formInfo = $('body').lrGetFormData(); var postData = { - strEntity: JSON.stringify($('body').lrGetFormData()) + strEntity: JSON.stringify(formInfo) }; - $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { - // 保存成功后才回调 - if (!!callBack) { - callBack(); - } - }); + if (formInfo.HasDetail == "true") { + learun.layerConfirm('此操作会重新生成明细,请确认!!', + function (res) { + if (res) { + + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } + }) + } else { + + $.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/SaveForm?keyValue=' + keyValue, postData, function (res) { + // 保存成功后才回调 + if (!!callBack) { + callBack(); + } + }); + } }; page.init(); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js index e9233bdeb..0d24bb350 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/Index.js @@ -60,6 +60,7 @@ var bootstrap = function ($, learun) { }); $("#lr_printBar").on('click', function () { var keyValue = $('#gridtable').jfGridValue('AICode'); + var AName = $('#gridtable').jfGridValue('AIASSName'); if (learun.checkrow(keyValue)) { //todo 打印标签 //$('.qrcodeTxt').html(keyValue); @@ -79,7 +80,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'formcardprint', title: '打印二维码', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/QRPrint?keyValue=' + keyValue, + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfoItem/QRPrint?keyValue=' + keyValue+'&aName='+escape(AName), width: 700, height: 300, btn: null, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/QRPrint.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/QRPrint.cshtml index 7c0b80dc7..5a39f0077 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/QRPrint.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsInfoItem/QRPrint.cshtml @@ -37,7 +37,8 @@ height: 80 }); var keyValue = request('keyValue');//二维码 - $('.qrcodeTxt').html(keyValue) + var aName = request('aName'); + $('.qrcodeTxt').html(unescape( aName)); $(function () { qrcode.makeCode(keyValue); $("#btnprint").on("click", function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.js index e8b8b5a38..de7782be3 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.js @@ -237,6 +237,7 @@ var bootstrap = function ($, learun) { } } }, + { label: "审核意见", name: "POpinion", width: 130, align: "left" }, { label: "采购状态", name: "PStatus", width: 100, align: "left", formatter: function (cellvalue, row) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.cshtml index 7607629e3..1a0961496 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.cshtml @@ -20,7 +20,7 @@
-
单价*
+
预算单价*
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs index 8d3af5c28..eb78cd936 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_AssetsInfo/Ass_AssetsInfoService.cs @@ -267,61 +267,61 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem entity.Modify(keyValue); db.Update(entity); //清空明细和出入明细 - //var Ass_AssetsInfoItemList = db.FindList(m => m.AId == keyValue); - //foreach (var Ass_AssetsInfoItem in Ass_AssetsInfoItemList) - //{ - // db.Delete(m => m.AIId == Ass_AssetsInfoItem.AId); - // db.Delete(Ass_AssetsInfoItem); - //} - ////新增明细 - //if (entity.HasDetail == true) - //{ - // if (entity.AStock > 0) - // { - // for (int i = 0; i < entity.AStock; i++) - // { - // var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); - // Ass_AssetsInfoItem.Create(); - // Ass_AssetsInfoItem.AId = entity.AId; - // Ass_AssetsInfoItem.AICodeNum = i + 1; - // Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; - // Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; - // Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; - // Ass_AssetsInfoItem.AIIsInStorage = true; - // Ass_AssetsInfoItem.AISpecification = entity.ASpecification; - // Ass_AssetsInfoItem.AIUse = entity.AUse; - // db.Insert(Ass_AssetsInfoItem); - // } - // } - // else - // { - // var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); - // Ass_AssetsInfoItem.Create(); - // Ass_AssetsInfoItem.AId = entity.AId; - // Ass_AssetsInfoItem.AICodeNum = 1; - // Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; - // Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; - // Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; - // Ass_AssetsInfoItem.AIIsInStorage = false; - // Ass_AssetsInfoItem.AISpecification = entity.ASpecification; - // Ass_AssetsInfoItem.AIUse = entity.AUse; - // db.Insert(Ass_AssetsInfoItem); - // } - //} - //else - //{ - // var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); - // Ass_AssetsInfoItem.Create(); - // Ass_AssetsInfoItem.AId = entity.AId; - // Ass_AssetsInfoItem.AICodeNum = 1; - // Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; - // Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; - // Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; - // Ass_AssetsInfoItem.AIIsInStorage = entity.AStock > 0; - // Ass_AssetsInfoItem.AISpecification = entity.ASpecification; - // Ass_AssetsInfoItem.AIUse = entity.AUse; - // db.Insert(Ass_AssetsInfoItem); - //} + var Ass_AssetsInfoItemList = db.FindList(m => m.AId == keyValue); + foreach (var Ass_AssetsInfoItem in Ass_AssetsInfoItemList) + { + db.Delete(m => m.AIId == Ass_AssetsInfoItem.AId); + db.Delete(Ass_AssetsInfoItem); + } + //新增明细 + if (entity.HasDetail == true) + { + if (entity.AStock > 0) + { + for (int i = 0; i < entity.AStock; i++) + { + var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); + Ass_AssetsInfoItem.Create(); + Ass_AssetsInfoItem.AId = entity.AId; + Ass_AssetsInfoItem.AICodeNum = i + 1; + Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; + Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; + Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; + Ass_AssetsInfoItem.AIIsInStorage = true; + Ass_AssetsInfoItem.AISpecification = entity.ASpecification; + Ass_AssetsInfoItem.AIUse = entity.AUse; + db.Insert(Ass_AssetsInfoItem); + } + } + else + { + var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); + Ass_AssetsInfoItem.Create(); + Ass_AssetsInfoItem.AId = entity.AId; + Ass_AssetsInfoItem.AICodeNum = 1; + Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; + Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; + Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; + Ass_AssetsInfoItem.AIIsInStorage = false; + Ass_AssetsInfoItem.AISpecification = entity.ASpecification; + Ass_AssetsInfoItem.AIUse = entity.AUse; + db.Insert(Ass_AssetsInfoItem); + } + } + else + { + var Ass_AssetsInfoItem = new Ass_AssetsInfoItemEntity(); + Ass_AssetsInfoItem.Create(); + Ass_AssetsInfoItem.AId = entity.AId; + Ass_AssetsInfoItem.AICodeNum = 1; + Ass_AssetsInfoItem.AICode = entity.ACode + "_" + Ass_AssetsInfoItem.AICodeNum; + Ass_AssetsInfoItem.AIIStorageId = entity.AIIStorageId; + Ass_AssetsInfoItem.AIIStoragePosition = entity.AIIStoragePosition; + Ass_AssetsInfoItem.AIIsInStorage = entity.AStock > 0; + Ass_AssetsInfoItem.AISpecification = entity.ASpecification; + Ass_AssetsInfoItem.AIUse = entity.AUse; + db.Insert(Ass_AssetsInfoItem); + } } else { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Purchase/Ass_PurchaseService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Purchase/Ass_PurchaseService.cs index dda94e006..efcaf8092 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Purchase/Ass_PurchaseService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_Purchase/Ass_PurchaseService.cs @@ -39,6 +39,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem t.PActualPrice, t.PStatus, t.PStoregeStatus, + t.POpinion, a.PACode "); strSql.Append(" FROM Ass_Purchase t join Ass_PurchaseApply a on t.PAId=a.PAId"); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyBLL.cs index 3262f27a7..ddd493534 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyBLL.cs @@ -245,11 +245,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// /// 审核状态 /// 流程Id - public void ModifyPAStatusByProcessId(int pastatus, string processId) + public void ModifyPAStatusByProcessId(int pastatus, string processId,string des) { try { - ass_PurchaseApplyService.ModifyPAStatusByProcessId(pastatus, processId); + ass_PurchaseApplyService.ModifyPAStatusByProcessId(pastatus, processId, des); } catch (Exception ex) { diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyEntity.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyEntity.cs index ebec154f8..0d5923de6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyEntity.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyEntity.cs @@ -79,6 +79,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// [Column("PASSTYPE")] public int? PAssType { get; set; } + /// + /// 审批意见 + /// + [Column("POPINION")] + public string POpinion { get; set; } #endregion #region 扩展操作 diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyIBLL.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyIBLL.cs index 701fd109e..829438c71 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyIBLL.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyIBLL.cs @@ -81,7 +81,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// /// 审核状态 /// 流程Id - void ModifyPAStatusByProcessId(int pastatus, string processId); + void ModifyPAStatusByProcessId(int pastatus, string processId,string des); #endregion diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyService.cs index 8a843cb96..e9e1258a0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/Ass_PurchaseApply/Ass_PurchaseApplyService.cs @@ -321,7 +321,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem /// /// 审核状态 /// 流程Id - public void ModifyPAStatusByProcessId(int pastatus, string processId) + public void ModifyPAStatusByProcessId(int pastatus, string processId,string des) { var db = this.BaseRepository().BeginTrans(); try @@ -354,10 +354,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem } //更新采购申请表的审核状态 var strsql = new StringBuilder(); - strsql.Append("update Ass_PurchaseApply set PAStatus=@PAStatus where PAProcessId=@PAProcessId"); + strsql.Append("update Ass_PurchaseApply set PAStatus=@PAStatus,POpinion=@POpinion where PAProcessId=@PAProcessId"); var dp = new DynamicParameters(); dp.Add("PAStatus", pastatus, DbType.Int32); dp.Add("PAProcessId", processId, DbType.String); + dp.Add("POpinion", des, DbType.String); this.BaseRepository("BaseDb").ExecuteBySql(strsql.ToString(), dp); db.Commit(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_PurchaseApplyMethod.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_PurchaseApplyMethod.cs index db16a9dfc..2344ad307 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_PurchaseApplyMethod.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/Ass_PurchaseApplyMethod.cs @@ -10,17 +10,21 @@ namespace Learun.Application.WorkFlow public class Ass_PurchaseApplyMethod: IWorkFlowMethod { Ass_PurchaseApplyIBLL ass_PurchaseApplyIBLL = new Ass_PurchaseApplyBLL(); - + NWFTaskIBLL nWFTaskIBLL=new NWFTaskBLL(); public void Execute(WfMethodParameter parameter) { if (parameter.code == "agree") { - ass_PurchaseApplyIBLL.ModifyPAStatusByProcessId(2, parameter.processId); + ass_PurchaseApplyIBLL.ModifyPAStatusByProcessId(2, parameter.processId,""); } else { - ass_PurchaseApplyIBLL.ModifyPAStatusByProcessId(0, parameter.processId); + //获取不同意的审批意见 + var logDes = nWFTaskIBLL.GetLogList(parameter.processId) + .FirstOrDefault(a => a.F_OperationCode == "disagree")?.F_Des; + + ass_PurchaseApplyIBLL.ModifyPAStatusByProcessId(0, parameter.processId,logDes); } }