diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs index 39a8dd978..f8019b80c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_AssetsOutApplyController.cs @@ -5,6 +5,7 @@ using System.Web.Mvc; using System.Collections.Generic; using System; using System.Linq; +using Learun.Application.WorkFlow; namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { @@ -18,6 +19,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers public class Ass_AssetsOutApplyController : MvcControllerBase { private Ass_AssetsOutApplyIBLL ass_AssetsOutApplyIBLL = new Ass_AssetsOutApplyBLL(); + private NWFTaskIBLL nWFTaskIBLL = new NWFTaskBLL(); #region 视图功能 @@ -164,6 +166,18 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers }; return Success(jsonData); } + /// + /// + /// + /// + /// + [HttpGet] + [AjaxOnly] + public ActionResult GetNWFTaskLogData(string processId) + { + var TaskLogList = (List)nWFTaskIBLL.GetLogList(processId); + return Success(TaskLogList); + } #endregion #region 提交数据 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js index a86f109d8..11f0c47bf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/FormView.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var ProcessId = request('ProcessId'); // 设置权限 var setAuthorize; // 设置表单数据 @@ -255,10 +256,11 @@ var bootstrap = function ($, learun) { //打印 $('#detailprint').on('click', function () { + console.log(ProcessId); learun.layerForm({ id: 'print', title: '北京金隅科技学校固定资产验收单', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/Print?keyValue=' + keyValue, + url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/Print?keyValue=' + keyValue + '&ProcessId=' + ProcessId, width: 1100, height: 800, btn: null @@ -274,12 +276,14 @@ var bootstrap = function ($, learun) { if (!!data[id].length && data[id].length > 0) { $('#' + id).jfGridSet('refreshdata', data[id]); tempdatra = data[id]; + } else { $('[data-table="' + id + '"]').lrSetFormData(data[id]); if (data[id].TotalPrice) { pricecount = data[id].TotalPrice; } } + } }); } else { @@ -299,6 +303,7 @@ var bootstrap = function ($, learun) { } else { if (id == 'Ass_AcceptanceMain' && data[id]) { keyValue = data[id].Id; + ProcessId = data[id].ProcessId; } $('[data-table="' + id + '"]').lrSetFormData(data[id]); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js index 440a8047d..7f931cd8c 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js @@ -79,11 +79,12 @@ var bootstrap = function ($, learun) { // 查看 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('Id'); + var ProcessId = $('#gridtable').jfGridValue('ProcessId'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'formAss_Acceptance', title: '查看', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/FormView?keyValue=' + keyValue, + url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/FormView?keyValue=' + keyValue + '&ProcessId=' + ProcessId, width: 1000, height: 700, btn: null diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Print.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Print.cshtml index f5fc41418..7f67e8273 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Print.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_Acceptance/Print.cshtml @@ -36,20 +36,23 @@ - + - - - + + @* + *@ - + - + + + + - +
部门资产管理员(签字): 部门负责人(签字): 财务负责人(签字): 财务负责人(签字):
设备管理员(签字): 设备管理负责人(签字):
校领导审核(签字):
@@ -65,6 +68,7 @@ $(function () { var tempdatra = ''; + var TaskLogData = {}; if (top["layer_formAss_Acceptance"]) { tempdatra = top["layer_formAss_Acceptance"].tempdatra; @@ -79,6 +83,12 @@ } } + var ProcessId = getQueryString('ProcessId'); + if (ProcessId) { + TaskLogData = top.learun.httpGet( + top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetNWFTaskLogData?processId=' + ProcessId, ''); + + } if (tempdatra) { var html = ''; @@ -197,8 +207,82 @@ //$('.table tbody').empty().append(html); $('#t_tbody').html(html); + + if (TaskLogData && TaskLogData.data) { + var bmgl = "", bmuser = '', cwuser = '', sbgl = '', sbgluser = '', xld = ''; + for (var i = 0; i < TaskLogData.data.length; i++) { + var item = TaskLogData.data[i]; + if (item && item.F_NodeId) { + //部门资产管理员 + if (item.F_NodeId == '7d6318b6-b5aa-a6c0-0d1d-ee47fd9aaf18') { + bmgl = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //部门负责人1 + if (item.F_NodeId == '400c0918-cd01-45b7-7d1b-94211516c3cd') { + bmuser = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + ////财务负责人 + //if (item.F_NodeId == '1627782c-9244-f5ff-0da8-c36d348f032a') { + // cwuser = getUser(item.F_CreateUserId, item.F_CreateUserName); + //} + //设备管理员2 + if (item.F_NodeId == 'a2b32308-ce97-219d-01e8-3088946faf74') { + sbgl = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //设备管理负责人3 + if (item.F_NodeId == '35e03210-12b3-10a5-de59-0daeeaedd7d0') { + sbgluser = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //校领导审核4 + if (item.F_NodeId == '199c2bd4-46d7-2142-2429-a9bb429181bf') { + xld = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + } + } + + $('#bmgl').html(bmgl); + $('#bmuser').html(bmuser); + $('#cwuser').html(cwuser); + $('#sbgl').html(sbgl); + $('#sbgluser').html(sbgluser); + $('#xld').html(xld); + } + } }); + + function getUser(uid, name) { + var deptid = ''; + var deptname = ''; + + var result = ''; + top.learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: uid, + keyId: 'f_userid', + callback: function (_data) { + deptid = _data['f_departmentid']; + } + }); + top.learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: deptid, + keyId: 'id', + callback: function (_data) { + if (_data['name'] && _data['name'] != 'undefined') { + deptname = _data['name']; + } + } + }); + if (deptname && deptname != 'undefined') { + return '【' + deptname + '】' + name; + } else { + return name; + } + } + function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", 'i'); // 匹配目标参数 var result = window.location.search.substr(1).match(reg); // 对querystring匹配目标参数 diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js index 93bba97e1..01a442d59 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsFormView.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var AOProcessId = request('AOProcessId'); // 设置权限 var setAuthorize; // 设置表单数据 @@ -118,7 +119,7 @@ var bootstrap = function ($, learun) { learun.layerForm({ id: 'print', title: '固定资产调拨单', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/Print', + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/Print?keyValue=' + keyValue + '&AOProcessId=' + AOProcessId, width: 1100, height: 800, btn: null diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js index 23a9bfd39..91f5d93cf 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/AssetsIndex.js @@ -107,11 +107,12 @@ var bootstrap = function ($, learun) { // 查看申请 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('AOId'); + var AOProcessId = $('#gridtable').jfGridValue('AOProcessId'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'formAss_AssetsOutApply', title: '查看调拨申请', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/AssetsFormView?keyValue=' + keyValue, + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/AssetsFormView?keyValue=' + keyValue + '&AOProcessId=' + AOProcessId, width: 1000, height: 600, btn: null diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml index 26c8a22cb..fe63256c0 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.cshtml @@ -7,14 +7,14 @@
调拨单流水号
-
-
调拨总价
- -
- @*
-
出库原因
-
-
*@ + @*
+
调拨总价
+ +
+
+
出库原因
+
+
*@ @*
部门
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js index 64717dc5d..0a299a5f4 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/FormView.js @@ -6,6 +6,7 @@ */ var acceptClick; var keyValue = request('keyValue'); +var AOProcessId = request('AOProcessId'); // 设置权限 var setAuthorize; // 设置表单数据 @@ -32,7 +33,7 @@ var bootstrap = function ($, learun) { }, bind: function () { $('#AOReasonType').lrDataItemSelect({ code: 'ReasonType' }); - $('#AOCreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); + // $('#AOCreateTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')); $('#AOCreateUserId')[0].lrvalue = learun.clientdata.get(['userinfo']).userId; $('#AODepartment').lrselect({ type: 'tree', @@ -40,14 +41,14 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', param: {} }); - $('#AOCreateUserId').val(learun.clientdata.get(['userinfo']).realName); + //$('#AOCreateUserId').val(learun.clientdata.get(['userinfo']).realName); //打印 $('#detailprint').on('click', function () { learun.layerForm({ id: 'print', title: '固定资产调拨单', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/Print?keyValue=' + keyValue, + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/Print?keyValue=' + keyValue + '&AOProcessId=' + AOProcessId, width: 1100, height: 800, btn: null @@ -277,6 +278,7 @@ var bootstrap = function ($, learun) { else { if (id == 'Ass_AssetsOutApply') { keyValue = data[id].AOId; + AOProcessId = data[id].AOProcessId; } $('[data-table="' + id + '"]').lrSetFormData(data[id]); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js index 01c804d9f..5d2eede67 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Index.js @@ -107,11 +107,12 @@ var bootstrap = function ($, learun) { // 查看申请 $('#lr_view').on('click', function () { var keyValue = $('#gridtable').jfGridValue('AOId'); + var AOProcessId = $('#gridtable').jfGridValue('AOProcessId'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'formAss_AssetsOutApply', title: '查看调拨申请', - url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/FormView?keyValue=' + keyValue, + url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/FormView?keyValue=' + keyValue + '&AOProcessId=' + AOProcessId, width: 1000, height: 700, btn: null diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Print.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Print.cshtml index 88099a1c8..9542e085f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Print.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_AssetsOutApply/Print.cshtml @@ -35,22 +35,22 @@ - + - + - + - + - + - +
调出部门设备管理人(签字): 调入部门设备管理人(签字):
调出部门负责人(签字): 调入部门负责人(签字):
设备部门负责人(签字): 财务部门负责人(签字):
@@ -66,6 +66,7 @@ $(function () { var tempdatra = ''; + var TaskLogData = {}; if (top["layer_formAss_AssetsOutApply"]) { tempdatra = top["layer_formAss_AssetsOutApply"].tempdatra; } @@ -79,6 +80,13 @@ } } + + var AOProcessId = getQueryString('AOProcessId'); + if (AOProcessId) { + TaskLogData = top.learun.httpGet( + top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsOutApply/GetNWFTaskLogData?processId=' + AOProcessId, ''); + + } //console.log('tempdatra', tempdatra); if (tempdatra) { var html = ''; @@ -198,23 +206,83 @@ html += ''; } - //html += ''; - //html += ''; - //html += '合计'; - //html += ''; - //html += ''; - //html += '' + num + ''; - //html += ''; - //html += ''; - //html += ''; - //html += ''; - //html += ''; - //html += ''; - - //$('.table tbody').empty().append(html); $('#t_tbody').html(html); + + if (TaskLogData && TaskLogData.data) { + var dcbmsb = "", drbmsb = '', dcbm = '', drbm = '', sbbm = '', cwbm = ''; + for (var i = 0; i < TaskLogData.data.length; i++) { + var item = TaskLogData.data[i]; + if (item && item.F_NodeId) { + //设备部门负责人--申请人 + if (item.F_NodeId == 'c275693f-cac9-03c6-1798-290e490f4803') { + sbbm = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //主任--调出部门负责人 + if (item.F_NodeId == '49887601-2ffd-0201-b994-3cbb3370c8f1') { + dcbm = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //主任--调出部门设备管理人 + if (item.F_NodeId == '1627782c-9244-f5ff-0da8-c36d348f032a') { + dcbmsb = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //调入部门设备管理人 + if (item.F_NodeId == '6b600403-29b3-c620-2ce1-ec6863f0c084') { + drbmsb = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //调入部门负责人 + if (item.F_NodeId == 'f20c9630-38d0-95f9-6431-c3094bcf5af5') { + drbm = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + //财务部门负责人 + if (item.F_NodeId == 'd40789b6-4ec8-cef6-3689-17bc40bccb0a') { + cwbm = getUser(item.F_CreateUserId, item.F_CreateUserName); + } + } + } + + $('#sbbm').html(sbbm); + $('#dcbm').html(dcbm); + $('#dcbmsb').html(dcbmsb); + $('#drbmsb').html(drbmsb); + $('#drbm').html(drbm); + $('#cwbm').html(cwbm); + } } }); + + function getUser(uid, name) { + var deptid = ''; + var deptname = ''; + + var result = ''; + top.learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', + key: uid, + keyId: 'f_userid', + callback: function (_data) { + deptid = _data['f_departmentid']; + } + }); + top.learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', + key: deptid, + keyId: 'id', + callback: function (_data) { + if (_data['name'] && _data['name'] != 'undefined') { + deptname = _data['name']; + } + } + }); + if (deptname && deptname != 'undefined') { + return '【' + deptname + '】' + name; + } else { + return name; + } + } + + function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", 'i'); // 匹配目标参数 var result = window.location.search.substr(1).match(reg); // 对querystring匹配目标参数 @@ -224,6 +292,7 @@ return null; } } +