diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_PurchaseApplyController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_PurchaseApplyController.cs index b2a429882..afd5a2de6 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_PurchaseApplyController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/Ass_PurchaseApplyController.cs @@ -4,6 +4,7 @@ using Learun.Application.TwoDevelopment.AssetManagementSystem; using System.Web.Mvc; using System.Collections.Generic; using System; +using System.Text; namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers { @@ -156,6 +157,15 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers entity.PStatus = 0; entity.PACreateTime = DateTime.Now; List ass_PurchaseItemApplyList = strass_PurchaseItemApplyList.ToObject>(); + StringBuilder nameOfCollection=new StringBuilder(); + //将所有名字的名字集中到一个字段中, 方便查询 + foreach (var item in ass_PurchaseItemApplyList) + { + nameOfCollection.Append(item.PAIName); + } + + + entity.NameOfCollection = nameOfCollection.ToString(); ass_PurchaseApplyIBLL.SaveEntity(keyValue, entity, ass_PurchaseItemApplyList); return Success("保存成功!"); } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.cshtml index 333677174..c13b8d15e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.cshtml @@ -24,7 +24,7 @@
-
总金额
+
总预算
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.js index c93d7f368..b6e5f7b89 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Form.js @@ -96,14 +96,14 @@ var bootstrap = function ($, learun) { $('#Ass_PurchaseItemApply').jfGrid({ headData: [ { - label: '资产名称', name: 'PAIName', width:100, align: 'left' - }, - { - label: '英文名称', name: 'PAIEName', width:100, align: 'left' - }, - { - label: '资产型号', name: 'PAIModel', width:100, align: 'left' + label: '资产名称', name: 'PAIName', width: 100, align: 'left' }, + //{ + // label: '英文名称', name: 'PAIEName', width:100, align: 'left' + //}, + //{ + // label: '资产型号', name: 'PAIModel', width:100, align: 'left' + //}, { label: '资产类别', name: 'PAITId', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { @@ -117,31 +117,44 @@ var bootstrap = function ($, learun) { }); } }, + //{ + // label: '供应商', name: 'PAISId', width: 100, align: 'left', + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', + // key: value, + // keyId: 'sid', + // callback: function (_data) { + // callback(_data['sname']); + // } + // }); + // } + //}, { - label: '供应商', name: 'PAISId', width: 100, align: 'left', - formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', - key: value, - keyId: 'sid', - callback: function (_data) { - callback(_data['sname']); - } - }); - } + label: '预算单价', name: 'PAIPrice', width: 100, align: 'left' }, { - label: '单价', name: 'PAIPrice', width: 100, align: 'left' + label: '数量', name: 'PAIAmount', width: 100, align: 'left' }, { - label: '数量', name: 'PAIAmount', width: 100, align: 'left' + label: '总价', name: 'PAIAmount', width: 100, align: 'left', formatter: function (val, row) { + console.log(val); + console.log(row); + + } + }, + { + label: '要求', name: 'PAIRequest', width: 100, align: 'left' }, { - label: '生产厂家', name: 'PAIManufacturer', width:100, align: 'left' + label: '用途', name: 'PAIUse', width: 150, align: 'left' }, + //{ + // label: '生产厂家', name: 'PAIManufacturer', width:100, align: 'left' + //}, ], height: 270, - mainId:'PAIId' + mainId: 'PAIId' }); }, initData: function () { @@ -190,18 +203,18 @@ var bootstrap = function ($, learun) { $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_PurchaseApply/GetFormDataByProcessId?processId=' + processId, function (data) { for (var id in data) { if (!!data[id] && data[id].length > 0) { - $('#' + id ).jfGridSet('refreshdata', data[id]); - } - else { - if(id == 'Ass_PurchaseApply'){ + $('#' + id).jfGridSet('refreshdata', data[id]); + } + else { + if (id == 'Ass_PurchaseApply') { keyValue = data[id].PAId; } - $('[data-table="' + id + '"]').lrSetFormData(data[id]); - } + $('[data-table="' + id + '"]').lrSetFormData(data[id]); } - }); - } + } + }); } + } // 验证数据是否填写完整 validForm = function () { if (!$('.lr-form-wrap').lrValidform()) { @@ -218,8 +231,8 @@ var bootstrap = function ($, learun) { save = function (processId, callBack, i) { var postData = {}; var formData = $('[data-table="Ass_PurchaseApply"]').lrGetFormData(); - if(!!processId){ - formData.PAProcessId =processId; + if (!!processId) { + formData.PAProcessId = processId; } postData.strEntity = JSON.stringify(formData); postData.strass_PurchaseItemApplyList = JSON.stringify($('#Ass_PurchaseItemApply').jfGridGet('rowdatas')); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.cshtml index 5d97e7cc0..9a5d029ec 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.cshtml @@ -24,7 +24,7 @@
-
总金额
+
总预算
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.js index 0ef8ed5a7..1692feaf1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/FormView.js @@ -93,12 +93,12 @@ var bootstrap = function ($, learun) { { label: '资产名称', name: 'PAIName', width: 100, align: 'left' }, - { - label: '英文名称', name: 'PAIEName', width: 100, align: 'left' - }, - { - label: '资产型号', name: 'PAIModel', width: 100, align: 'left' - }, + //{ + // label: '英文名称', name: 'PAIEName', width:100, align: 'left' + //}, + //{ + // label: '资产型号', name: 'PAIModel', width:100, align: 'left' + //}, { label: '资产类别', name: 'PAITId', width: 100, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { @@ -112,24 +112,41 @@ var bootstrap = function ($, learun) { }); } }, + //{ + // label: '供应商', name: 'PAISId', width: 100, align: 'left', + // formatterAsync: function (callback, value, row, op, $cell) { + // learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', + // key: value, + // keyId: 'sid', + // callback: function (_data) { + // callback(_data['sname']); + // } + // }); + // } + //}, { - label: '单价', name: 'PAIPrice', width: 100, align: 'left' + label: '预算', name: 'PAIPrice', width: 100, align: 'left' }, { label: '数量', name: 'PAIAmount', width: 100, align: 'left' }, { - label: '生产厂家', name: 'PAIManufacturer', width: 100, align: 'left' - }, - { - label: '资产要求', name: 'PAIRequest', width: 100, align: 'left' + label: '总价', name: 'PAIAmount', width: 100, align: 'left', formatter: function (val, row) { + return row.PAIPrice * row.PAIAmount; + + } }, + { - label: '用途', name: 'PAIUse', width: 100, align: 'left' + label: '要求', name: 'PAIRequest', width: 100, align: 'left' }, { - label: '资产描述', name: 'PAIContent', width: 100, align: 'left' + label: '用途', name: 'PAIUse', width: 150, align: 'left' }, + //{ + // label: '生产厂家', name: 'PAIManufacturer', width:100, align: 'left' + //}, ], height: 270, mainId: 'PAIId' diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.cshtml index a54c4f3c5..8363e72cd 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseApply/Index.cshtml @@ -25,6 +25,10 @@
申请单号
+
+
申请物品
+ +
@@ -41,6 +45,7 @@ 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 99e1dd6a8..1547eb91f 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 @@ -151,7 +151,7 @@ var bootstrap = function ($, learun) { learun.layerConfirm('是否确认提交该项!', function (res) { if (res) { processId = learun.newGuid(); - learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_PurchaseApply/ModifyPAStatus', { keyValue: keyValue, pastatus: 1 ,processId:processId}, function (res) { + learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_PurchaseApply/ModifyPAStatus', { keyValue: keyValue, pastatus: 1, processId: processId }, function (res) { selectedRow.PAProcessId = processId; refreshGirdData(res, selectedRow); }); @@ -178,6 +178,19 @@ var bootstrap = function ($, learun) { }); } }); + + + $('#lr_print').on('click', + function () { + var processId = $('#gridtable').jfGridValue('PAProcessId'); + learun.httpSync( + 'get', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/GetFirstTaskByProcessId', + { processId: processId }, function (data) { + var taskId = data.taskId; + learun.frameTab.open({ F_ModuleId: processId + taskId, F_Icon: 'fa magic', F_FullName: '查看流程进度', F_UrlAddress: '/LR_NewWorkFlow/NWFProcess/NWFContainerForm?tabIframeId=' + processId + taskId + '&type=look' + "&processId=" + processId + "&taskId=" + taskId }); + + }) + }); }, // 初始化列表 initGird: function () { @@ -221,7 +234,7 @@ var bootstrap = function ($, learun) { } }); } - }, + }, { label: "所需总金额", name: "PAPrice", width: 100, align: "left" }, { label: "期望采购时间", name: "PAName", width: 130, align: "left" }, { label: "申请时间", name: "PACreateTime", width: 130, align: "left" }, @@ -232,7 +245,7 @@ var bootstrap = function ($, learun) { return '审批中'; } else if (cellvalue == 2) { return '审批通过'; - } else { + } else { return '草稿'; } } @@ -255,7 +268,7 @@ var bootstrap = function ($, learun) { mainId: 'PAId', isPage: true, sidx: 'PACreateTime', - sord:'DESC' + sord: 'DESC' }); }, search: function (param) { 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 1a0961496..affd8a87e 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 @@ -3,6 +3,11 @@ Layout = "~/Views/Shared/_Form.cshtml"; }
+
+
选择已登记资产*
+
+
+
资产名称*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.js index 1138cad3c..67c879f94 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/Ass_PurchaseItemApply/Form.js @@ -27,6 +27,65 @@ var bootstrap = function ($, learun) { // 访问数据接口地址 url: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree' }); + + + $("#AAOldCode").lrlayerselect({ + treeUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsType/GetAllTree', + treeParentId: 'atptid', + treeValueId: 'atid', + treeTextId: 'aname', + dataUrl: top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetList', + dataTreeId: 'ATId', + dataValueId: 'AId', + dataTextId: 'AName', + + grid: [ + { label: '资产编号', name: 'ACode', width: 200, align: 'left' }, + { label: '资产名称', name: 'AName', width: 200, align: 'left' }, + { label: "英文名称", name: "AEName", width: 200, align: "left" }, + { label: "资产型号", name: "AModel", width: 200, align: "left" }, + { label: "生产厂家", name: "AManufacturer", width: 200, align: "left" }, + { + label: "供应商", name: "ASupplierId", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_SupplierData', + key: value, + keyId: 'sid', + callback: function (_data) { + callback(_data['sname']); + } + }); + } + } + ], + select: function (values, texts) { + if (values && values.length > 0) { + $.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_AssetsInfo/GetFormData?keyValue=' + values[0], function (data) { + data = data.Ass_AssetsInfo; + console.log(data); + //$('#AAITId').lrselectSet(data.ATId); + //$('#AAICode').val(data.ACode); + $('#PAIName').val(data.AName);//资产名称 + //$('#AAIUnit').lrselectSet(data.AUnit); + $('#PAIEName').val(data.AEName);//英文名称 + $('#PAIModel').val(data.AModel);//资产型号 + $('#PAITId').val(data.AAssType);//资产类别 + $('#PAIManufacturer').val(data.AManufacturer);//生产厂家 + //$('#AAISpecification').val(data.ASpecification);//说明 + }); + } + }, + unknowselect: function () { + $('#PAIName').val(""); + $('#PAIEName').val(""); + $('#PAITId').lrselectSet(""); + $('#PAIModel').val(""); + $('#PAIManufacturer').val(""); + }, + isMultiple: false + }); + + $('#PAIPhoto').lrUploader(); $('#PAISId').lrDataSourceSelect({ code: 'Ass_SupplierData', value: 'sid', text: 'sname' }); }, diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs index 544387f89..d6d2ba915 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Controllers/NWFProcessController.cs @@ -290,6 +290,13 @@ namespace Learun.Application.Web.Areas.LR_NewWorkFlow.Controllers }; return Success(jsonData); } + + + public ActionResult GetFirstTaskByProcessId(string processId) + { + var taskId= nWFProcessIBLL.GetFirstTaskByProcessId(processId); + return Success(new {taskId}); + } /// /// 获取我的流程信息列表 /// diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js index 97f12ff6a..e8cd3a6aa 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_NewWorkFlow/Views/NWFProcess/Index.js @@ -421,12 +421,14 @@ var bootstrap = function ($, learun) { } }, eye: function () { + var processId = $('#gridtable').jfGridValue('F_Id') || ''; var taskId = $('#gridtable').jfGridValue('F_TaskId') || ''; var title = $('#gridtable').jfGridValue('F_Title'); var schemeName = $('#gridtable').jfGridValue('F_SchemeName'); var taskType = $('#gridtable').jfGridValue('F_TaskType'); + console.log(taskId); if (schemeName != title && title) { title = schemeName + "(" + title + ")"; } 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 fac5675fd..9186befeb 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 @@ -1223,6 +1223,7 @@ var bootstrap = function ($, learun) { // 加载表单 loadForm: function (formList, isLoadData, isLook) { + console.log() var $ul = $('#form_list_tabs'); var $iframes = $('#form_list_iframes'); if (formList.length > 1) { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config index 489b3b61f..98052c85f 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/database.config @@ -9,16 +9,16 @@ --> - + - +