@@ -0,0 +1,159 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using Learun.Application.TwoDevelopment.AssetManagementSystem; | |||
using System.Web.Mvc; | |||
using Learun.Application.TwoDevelopment.LR_CodeDemo; | |||
using System.Collections.Generic; | |||
using Learun.Application.Base.SystemModule; | |||
namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-11-18 10:46 | |||
/// 描 述:资产验收 | |||
/// </summary> | |||
public class Ass_AcceptanceController : MvcControllerBase | |||
{ | |||
private Ass_AcceptanceIBLL ass_AcceptanceIBLL = new Ass_AcceptanceBLL(); | |||
private CodeRuleIBLL codeRuleIBLL = new CodeRuleBLL(); | |||
#region 视图功能 | |||
/// <summary> | |||
/// 主页面 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Index() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult Form() | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult ViewForm() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetPageList(string pagination, string queryJson) | |||
{ | |||
Pagination paginationobj = pagination.ToObject<Pagination>(); | |||
var data = ass_AcceptanceIBLL.GetPageList(paginationobj, queryJson); | |||
var jsonData = new | |||
{ | |||
rows = data, | |||
total = paginationobj.total, | |||
page = paginationobj.page, | |||
records = paginationobj.records | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormData(string keyValue) | |||
{ | |||
var Ass_AcceptanceData = ass_AcceptanceIBLL.GetAss_AcceptanceEntity( keyValue ); | |||
var jsonData = new { | |||
Ass_Acceptance = Ass_AcceptanceData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
/// <summary> | |||
/// 获取表单数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例主键</param> | |||
/// <returns></returns> | |||
[HttpGet] | |||
[AjaxOnly] | |||
public ActionResult GetFormDataByProcessId(string processId) | |||
{ | |||
var Ass_AcceptanceData = ass_AcceptanceIBLL.GetEntityByProcessId( processId ); | |||
var jsonData = new { | |||
Ass_Acceptance = Ass_AcceptanceData, | |||
}; | |||
return Success(jsonData); | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 提交 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult ChangeStatusById(string keyValue, string processId) | |||
{ | |||
ass_AcceptanceIBLL.ChangeStatusById(keyValue, 1, processId); | |||
return Success("操作成功!"); | |||
} | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[AjaxOnly] | |||
public ActionResult DeleteForm(string keyValue) | |||
{ | |||
ass_AcceptanceIBLL.DeleteEntity(keyValue); | |||
return Success("删除成功!"); | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Ass_AcceptanceEntity entity = strEntity.ToObject<Ass_AcceptanceEntity>(); | |||
ass_AcceptanceIBLL.SaveEntity(keyValue,entity); | |||
if (string.IsNullOrEmpty(keyValue)) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,55 @@ | |||
@{ | |||
ViewBag.Title = "资产验收"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">选择已登记资产</div> | |||
<div id="AAOldCode"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">设备名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">品牌</div> | |||
<input id="Manufacturer" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">规格型号</div> | |||
<input id="Model" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">单位</div> | |||
<input id="Unit" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">数量</div> | |||
<input id="Stock" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">单价</div> | |||
<input id="Price" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">总价</div> | |||
<input id="TotalPrice" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">使用部门</div> | |||
<div id="DepartmentId" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">使用人</div> | |||
<div id="UserID" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">放置地点</div> | |||
<input id="Place" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js") |
@@ -0,0 +1,182 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-11-18 10:46 | |||
* 描 述:资产验收 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if (!!data) { | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DepartmentId').lrselect({ | |||
type: 'tree', | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
param: {}, | |||
select: function (val) { | |||
console.log(val.value); | |||
$('#UserID').lrselectRefresh({ url: '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + val.value }); | |||
} | |||
}); | |||
$('#UserID').lrselect({ text: 'F_RealName', value: 'F_UserId' }); | |||
$("#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; | |||
$('#Name').val(data.AName);//设备名称 | |||
$('#AAIUnit').lrselectSet(data.AUnit);//单位 | |||
$('#Model').val(data.AModel);//规格型号 | |||
$('#AAIManufacturer').val(data.AManufacturer);//品牌 | |||
$('#Price').val(data.APrice)//单价 | |||
}); | |||
} | |||
}, | |||
unknowselect: function () { | |||
$("#AAOldCode").find('span').text(""); | |||
$('#Name').val("");//设备名称 | |||
$('#Model').val("");//规格型号 | |||
$('#AAIManufacturer').val("");//品牌 | |||
}, | |||
isMultiple: false | |||
}); | |||
$('#Stock').bind('change', function () { | |||
var stock = $(this).val(); | |||
var price = $('#Price').val(); | |||
$('#TotalPrice').val(stock * price); | |||
}) | |||
$('#Price').bind('change', function () { | |||
var stock = $('#Stock').val(); | |||
var price = $(this).val(); | |||
$('#TotalPrice').val(stock * price); | |||
}) | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId, param, callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/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_Acceptance' && data[id]) { | |||
keyValue = data[id].ID; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); | |||
} | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if (!!processId) { | |||
formData.ProcessId = processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,54 @@ | |||
@{ | |||
ViewBag.Title = "资产验收"; | |||
Layout = "~/Views/Shared/_Index.cshtml"; | |||
} | |||
<div class="lr-layout "> | |||
<div class="lr-layout-center"> | |||
<div class="lr-layout-wrap lr-layout-wrap-notitle "> | |||
<div class="lr-layout-tool"> | |||
<div class="lr-layout-tool-left"> | |||
<div class="lr-layout-tool-item"> | |||
<div id="multiple_condition_query"> | |||
<div class="lr-query-formcontent"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">设备名称</div> | |||
<input id="Name" type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">使用部门</div> | |||
<div id="DepartmentId"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">使用人</div> | |||
<div id="User"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">放置地点</div> | |||
<input id="Place" type="text" class="form-control" /> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-tool-right"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_refresh" class="btn btn-default"><i class="fa fa-refresh"></i></a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm" learun-authorize="yes"> | |||
<a id="lr_submit" class="btn btn-default"><i class="fa fa-check"></i> 提交</a> | |||
<a id="lr_view" class="btn btn-default"><i class="fa fa-search-minus"></i> 查看</a> | |||
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i> 打印</a> | |||
</div> | |||
</div> | |||
</div> | |||
<div class="lr-layout-body" id="gridtable"></div> | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/Index.js") |
@@ -0,0 +1,211 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-11-18 10:46 | |||
* 描 述:资产验收 | |||
*/ | |||
var refreshGirdData; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var processId = ''; | |||
var page = { | |||
init: function () { | |||
page.initGird(); | |||
page.bind(); | |||
}, | |||
bind: function () { | |||
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { | |||
page.search(queryJson); | |||
}, 220, 400); | |||
$('#DepartmentId').lrDepartmentSelect(); | |||
$('#User').lrDataItemSelect({ code: '' }); | |||
// 刷新 | |||
$('#lr_refresh').on('click', function () { | |||
location.reload(); | |||
}); | |||
// 新增 | |||
$('#lr_add').on('click', function () { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/Form', | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function() { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
}); | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('Status'); | |||
if (SendFlag) { | |||
learun.alert.warning("当前项目已提交不能编辑!"); | |||
return; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/Form?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
callBack: function (id) { | |||
var res = false; | |||
// 验证数据 | |||
res = top[id].validForm(); | |||
// 保存数据 | |||
if (res) { | |||
res = top[id].save('', function () { | |||
page.search(); | |||
}); | |||
} | |||
return res; | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr_view').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '查看', | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/ViewForm?keyValue=' + keyValue, | |||
width: 600, | |||
height: 400, | |||
btn:null | |||
}); | |||
} | |||
}); | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('Status'); | |||
if (SendFlag) { | |||
learun.alert.warning("当前项目已提交不能不能删除!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 打印 | |||
$('#lr_print').on('click', function () { | |||
$('#gridtable').jqprintTable(); | |||
}); | |||
// 提交 | |||
$('#lr_submit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('ID'); | |||
if (learun.checkrow(keyValue)) { | |||
var SendFlag = $('#gridtable').jfGridValue('Status'); | |||
if (SendFlag) { | |||
learun.alert.warning("当前项目已提交,请耐心等待审批!"); | |||
return; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) { | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').lrAuthorizeJfGrid({ | |||
url: top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetPageList', | |||
headData: [ | |||
{ label: "设备名称", name: "Name", width: 100, align: "left"}, | |||
{ label: "品牌", name: "Manufacturer", width: 100, align: "left"}, | |||
{ label: "规格型号", name: "Model", width: 100, align: "left"}, | |||
{ label: "单位", name: "Unit", width: 100, align: "left"}, | |||
{ label: "数量", name: "Stock", width: 100, align: "left"}, | |||
{ label: "单价", name: "Price", width: 100, align: "left"}, | |||
{ label: "总价", name: "TotalPrice", width: 100, align: "left"}, | |||
{ label: "使用部门", name: "DepartmentId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsync('department', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
}}, | |||
{ label: "使用人", name: "UserID", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op,$cell) { | |||
learun.clientdata.getAsyncReal('user', { | |||
key: value, | |||
callback: function (_data) { | |||
callback(_data.name); | |||
} | |||
}); | |||
}}, | |||
{ label: "放置地点", name: "Place", width: 100, align: "left" }, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue === '1') { | |||
return '<span class=\"label label-warning\">审批中</span>'; | |||
} else if (cellvalue === '2') { | |||
return '<span class=\"label label-success\">已审核</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
{ label: "备注", name: "Remark", width: 100, align: "left"}, | |||
], | |||
mainId:'ID', | |||
isPage: true | |||
}); | |||
page.search(); | |||
}, | |||
search: function (param) { | |||
param = param || {}; | |||
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) }); | |||
} | |||
}; | |||
refreshGirdData = function (res, postData) { | |||
if (!!res) | |||
{ | |||
if (res.code == 200) | |||
{ | |||
// 发起流程 | |||
var postData = { | |||
schemeCode:'ASS_zcys',// 填写流程对应模板编号 | |||
processId:processId, | |||
level:'1', | |||
}; | |||
learun.httpAsync('Post', top.$.rootUrl + '/LR_NewWorkFlow/NWFProcess/CreateFlow', postData, function(data) { | |||
learun.loading(false); | |||
}); | |||
} | |||
page.search(); | |||
} | |||
}; | |||
page.init(); | |||
} |
@@ -0,0 +1,51 @@ | |||
@{ | |||
ViewBag.Title = "资产验收"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">设备名称</div> | |||
<input id="Name" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">品牌</div> | |||
<input id="Manufacturer" type="text" readonly="readonly"class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">规格型号</div> | |||
<input id="Model" type="text" readonly="readonly"class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">单位</div> | |||
<input id="Unit" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">数量</div> | |||
<input id="Stock" type="text" readonly="readonly" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">单价</div> | |||
<input id="Price" type="text" readonly="readonly"class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">总价</div> | |||
<input id="TotalPrice" type="text" readonly="readonly"class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">使用部门</div> | |||
<div id="DepartmentId" readonly="readonly" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">使用人</div> | |||
<div id="UserID" readonly="readonly" ></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">放置地点</div> | |||
<input id="Place" readonly="readonly"type="text" class="form-control" /> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Ass_Acceptance" > | |||
<div class="lr-form-item-title">备注</div> | |||
<textarea id="Remark" readonly="readonly"class="form-control" style="height:100px;" ></textarea> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/Ass_Acceptance/Form.js") |
@@ -0,0 +1,115 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2020-11-18 10:46 | |||
* 描 述:资产验收 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
// 设置权限 | |||
var setAuthorize; | |||
// 设置表单数据 | |||
var setFormData; | |||
// 验证数据是否填写完整 | |||
var validForm; | |||
// 保存数据 | |||
var save; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
// 设置权限 | |||
setAuthorize = function (data) { | |||
if(!!data) | |||
{ | |||
for (var field in data) { | |||
if (data[field].isLook != 1) {// 如果没有查看权限就直接移除 | |||
$('#' + data[field].fieldId).parent().remove(); | |||
} | |||
else { | |||
if (data[field].isEdit != 1) { | |||
$('#' + data[field].fieldId).attr('disabled', 'disabled'); | |||
if ($('#' + data[field].fieldId).hasClass('lrUploader-wrap')) { | |||
$('#' + data[field].fieldId).css({ 'padding-right': '58px' }); | |||
$('#' + data[field].fieldId).find('.btn-success').remove(); | |||
} | |||
} | |||
} | |||
} | |||
} | |||
}; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
$('#DepartmentId').lrselect({ | |||
type: 'tree', | |||
allowSearch: true, | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
param: {}, | |||
select:function(val) { | |||
console.log(val.value); | |||
$('#UserID').lrselectRefresh({ url: '/LR_OrganizationModule/User/GetListByDepartmentId?departmentId=' + val.value }); | |||
} | |||
}); | |||
$('#UserID').lrselect({ text: 'F_RealName', value:'F_UserId'}); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 设置表单数据 | |||
setFormData = function (processId,param,callback) { | |||
if (!!processId) { | |||
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/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_Acceptance' && data[id] ){ | |||
keyValue = data[id].ID; | |||
} | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
callback && callback(); } | |||
// 验证数据是否填写完整 | |||
validForm = function () { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
return true; | |||
}; | |||
// 保存数据 | |||
save = function (processId, callBack, i) { | |||
var formData = $('body').lrGetFormData(); | |||
if(!!processId){ | |||
formData.ProcessId =processId; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify(formData) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/Ass_Acceptance/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(res, i); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -78,6 +78,84 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "使用人", name: "AOIUserPeople", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原部门", name: "AOIOldDepartment", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "原库房", name: "AOIStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新使用人", name: "AOINewUsePeople", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BaseUser', | |||
key: value, | |||
keyId: 'f_userid', | |||
callback: function (_data) { | |||
callback(_data['f_realname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新部门", name: "AOINewDepartment", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'classdata', | |||
key: value, | |||
keyId: 'id', | |||
callback: function (_data) { | |||
callback(_data['name']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: "新库房", name: "AOINewStorageId", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'Ass_StorageData', | |||
key: value, | |||
keyId: 'sid', | |||
callback: function (_data) { | |||
callback(_data['sname']); | |||
} | |||
}); | |||
} | |||
}, | |||
{ | |||
label: '英文名称', name: 'AOIEName', width: 100, align: 'left' | |||
}, | |||
@@ -26,25 +26,25 @@ | |||
<div class="lr-form-item-title">系部</div> | |||
<div id="DeptNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">校区</div> | |||
<div id="F_CompanyId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">部门</div> | |||
<div id="F_DepartmentId"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">户籍省份</div> | |||
<div id="ProvinceNo"></div> | |||
<div class="lr-form-item-title">民族</div> | |||
<div id="NationalityNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">性别</div> | |||
<div id="GenderNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">户籍地市</div> | |||
<div id="CityNo"></div> | |||
<div class="lr-form-item-title">学位</div> | |||
<div id="DegreeNo"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">户籍县区</div> | |||
<div id="RegionNo"></div> | |||
<div class="lr-form-item-title">职称</div> | |||
<div id="ProfessionalTitle"></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">政治面貌</div> | |||
@@ -47,28 +47,20 @@ var bootstrap = function ($, learun) { | |||
} | |||
}); | |||
$('#RegionNo').lrselect(); | |||
//校区 | |||
$('#F_CompanyId').lrDataSourceSelect({ | |||
code: 'company', value: 'f_companyid', text: 'f_fullname', | |||
select: function (item) { | |||
if (!!item) { | |||
// 部门 | |||
$('#F_DepartmentId').lrselectRefresh({ | |||
type: 'tree', | |||
// 是否允许搜索 | |||
allowSearch: true, | |||
// 访问数据接口地址 | |||
url: top.$.rootUrl + '/LR_OrganizationModule/Department/GetTree', | |||
// 访问数据接口参数 | |||
param: { companyId: item.f_companyid, parentId: '0' } | |||
}); | |||
} | |||
} | |||
}); | |||
//政治面貌 | |||
$('#PartyFaceNo').lrDataSourceSelect({ code: 'BCdPartyFace', value: 'partyfaceno', text: 'partyface' }); | |||
//文化程度 | |||
$('#CultureDegreeNo').lrDataSourceSelect({ code: 'BCdCultureDegree', value: 'culturedegreeno', text: 'culturedegree' }); | |||
//民族 | |||
$('#NationalityNo').lrDataSourceSelect({ code: 'BCdNationality', value: 'nationalityno', text: 'nationality' }); | |||
//性别 | |||
$('#GenderNo').lrDataItemSelect({ code: 'usersexbit' }); | |||
//学位 | |||
$('#DegreeNo').lrDataSourceSelect({ code: 'BCdDegree', value: 'degreeno', text: 'degreename' }); | |||
//职称 | |||
$('#ProfessionalTitle').lrDataItemSelect({ code: 'jszc' }); | |||
// 部门选择 | |||
$('#F_DepartmentId').lrselect(); | |||
// 刷新 | |||
@@ -137,7 +129,7 @@ var bootstrap = function ($, learun) { | |||
learun.layerForm({ | |||
id: 'formView', | |||
title: '查看', | |||
url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/Form?keyValue=' + keyValue+'&isView='+true, | |||
url: top.$.rootUrl + '/EducationalAdministration/EmpInfo/Form?keyValue=' + keyValue + '&isView=' + true, | |||
width: 1162, | |||
height: 600, | |||
btn: null | |||
@@ -552,7 +544,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
}, | |||
{ | |||
label: "聘任职称", name: "TitleOfTechPostNo", width: 100, align: "left", | |||
label: "岗位名称", name: "TitleOfTechPostNo", width: 100, align: "left", | |||
formatterAsync: function (callback, value, row, op, $cell) { | |||
learun.clientdata.getAsync('custmerData', { | |||
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'BCdTitleOfTechPost', | |||
@@ -11,9 +11,9 @@ | |||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no"> | |||
<meta name="format-detection" content="telephone=no" /> | |||
<link rel="shortcut icon" href="" /> | |||
<title>数字化校园-宿舍</title> | |||
<meta name="keywords" content="数字化校园-宿舍" /> | |||
<meta name="description" content="数字化校园-宿舍" /> | |||
<title>数字化校园-教师注册</title> | |||
<meta name="keywords" content="数字化校园-教师注册" /> | |||
<meta name="description" content="数字化校园-教师注册" /> | |||
<link href="~/Content/css/font-awesome.css" rel="stylesheet" /> | |||
<link href="~/Content/css/common.css" rel="stylesheet" /> | |||
<link href="~/Content/layui/css/layui.css" rel="stylesheet" media="all" /> | |||
@@ -34,10 +34,10 @@ | |||
<form class="layui-form" action=""> | |||
<!-- / chickForm_sec1 --> | |||
<div class="chickForm_sec1"> | |||
@*<div class="chickInput"> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 职工编号</span> | |||
<input type="text" id="EmpNo" name="EmpNo" lay-verify="required" placeholder="请输入职工编号" class="layui-input"> | |||
</div>*@ | |||
</div> | |||
<div class="chickInput"> | |||
<span class="chickInputLable"><span>*</span> 姓名</span> | |||
@@ -197,8 +197,10 @@ | |||
cache: false, | |||
success: function (data) { | |||
console.log(data); | |||
//layer.msg("注册成功"); | |||
//alert("注册成功"); | |||
layer.msg("注册成功"); | |||
alert("注册成功"); | |||
//location.reload(); | |||
location.href = "/home/index"; | |||
}, | |||
error: function (XMLHttpRequest, textStatus, errorThrown) { | |||
}, | |||
@@ -209,7 +211,6 @@ | |||
}); | |||
return false; //阻止表单跳转。如果需要表单跳转,去掉这段即可。 | |||
//location.href = "/home/index"; | |||
}); | |||
var laydate = layui.laydate; | |||
@@ -260,7 +260,7 @@ var bootstrap = function ($, learun) { | |||
{ label: '综合', name: 'ComprehensiveScore', width: 100, align: "left" }, | |||
{ | |||
label: '出生日期', name: 'Birthday', width: 100, align: "left", formatter: function (val) { | |||
if (val.length > 0) { | |||
if (val!=undefined&&val.length > 0) { | |||
return val.substring(0, 10); | |||
} | |||
} | |||
@@ -787,6 +787,7 @@ | |||
<Compile Include="Areas\EducationalAdministration\Controllers\ADR_DeviceLogController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_RestrictionController.cs" /> | |||
<Compile Include="Areas\PersonnelManagement\Controllers\ADR_AddApplyController.cs" /> | |||
<Compile Include="Areas\AssetManagementSystem\Controllers\Ass_AcceptanceController.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Content Include="Areas\AdmissionsPlatform\Views\AP_OnlineUserInfo\DropOutIndex.js" /> | |||
@@ -812,6 +813,9 @@ | |||
<Content Include="Areas\AssetManagementSystem\Views\AssScrap\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\AssScrap\FormView.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\AssScrap\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\ViewForm.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsChangeItem\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsChangeItem\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AssetsChange\Form.js" /> | |||
@@ -6090,6 +6094,10 @@ | |||
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Index.js" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Form.cshtml" /> | |||
<Content Include="Areas\PersonnelManagement\Views\ADR_AddApply\Form.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Index.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Form.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\Form.js" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<Folder Include="Areas\LR_Desktop\Models\" /> | |||
@@ -6848,6 +6856,9 @@ | |||
<Content Include="Areas\LR_OAModule\Views\Notice\IndexFlow.cshtml" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlow.cshtml" /> | |||
<Content Include="Areas\LR_OAModule\Views\Notice\FormFlowView.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Form.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_AllocationItem\Index.cshtml" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Ass_Acceptance\ViewForm.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" /> | |||
@@ -8,7 +8,7 @@ | |||
<meta name="renderer" content="webkit"> | |||
<link rel="icon" href="~/favicon.ico"> | |||
<title>@ViewBag.Title|力软信息|快速开发平台|Learun敏捷开发框架</title> | |||
<title>@ViewBag.Title</title> | |||
<link href="~/Content/font/css/font-awesome.min.css" rel="stylesheet" /> | |||
<link href="~/Content/bootstrap/bootstrap.min.css" rel="stylesheet" /> | |||
@@ -26,6 +26,7 @@ | |||
<typeAlias alias="Ass_ReceiveMethod" type="Learun.Application.WorkFlow.Ass_ReceiveMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="ADR_AddApplyMethod" type="Learun.Application.WorkFlow.ADR_AddApplyMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="OA_NewsMethod" type="Learun.Application.WorkFlow.OA_NewsMethod,Learun.Application.WorkFlow" /> | |||
<typeAlias alias="Ass_AcceptanceMethod" type="Learun.Application.WorkFlow.Ass_AcceptanceMethod,Learun.Application.WorkFlow" /> | |||
<!--任务调度器--> | |||
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" /> | |||
@@ -62,6 +63,7 @@ | |||
<type type="IWorkFlowMethod" mapTo="ADR_AddApplyMethod" name="ADR_AddApplyMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="WFFileRelease" name="wfFileRelease"></type> | |||
<type type="IWorkFlowMethod" mapTo="OA_NewsMethod" name="OA_NewsMethod"></type> | |||
<type type="IWorkFlowMethod" mapTo="Ass_AcceptanceMethod" name="Ass_AcceptanceMethod"></type> | |||
</container> | |||
@@ -0,0 +1,29 @@ | |||
using Learun.Application.TwoDevelopment.AssetManagementSystem; | |||
using System.Data.Entity.ModelConfiguration; | |||
namespace Learun.Application.Mapping | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-11-18 10:46 | |||
/// 描 述:资产验收 | |||
/// </summary> | |||
public class Ass_AcceptanceMap : EntityTypeConfiguration<Ass_AcceptanceEntity> | |||
{ | |||
public Ass_AcceptanceMap() | |||
{ | |||
#region 表、主键 | |||
//表 | |||
this.ToTable("ASS_ACCEPTANCE"); | |||
//主键 | |||
this.HasKey(t => t.ID); | |||
#endregion | |||
#region 配置关系 | |||
#endregion | |||
} | |||
} | |||
} | |||
@@ -539,6 +539,7 @@ | |||
<Compile Include="EducationalAdministration\ADR_DeviceLogMap.cs" /> | |||
<Compile Include="PersonnelManagement\ADR_RestrictionMap.cs" /> | |||
<Compile Include="PersonnelManagement\ADR_AddApplyMap.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_AcceptanceMap.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -0,0 +1,186 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-11-18 10:46 | |||
/// 描 述:资产验收 | |||
/// </summary> | |||
public class Ass_AcceptanceBLL : Ass_AcceptanceIBLL | |||
{ | |||
private Ass_AcceptanceService ass_AcceptanceService = new Ass_AcceptanceService(); | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Ass_AcceptanceEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
return ass_AcceptanceService.GetPageList(pagination, queryJson); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Ass_Acceptance表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Ass_AcceptanceEntity GetAss_AcceptanceEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return ass_AcceptanceService.GetAss_AcceptanceEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
public Ass_AcceptanceEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return ass_AcceptanceService.GetEntityByProcessId(processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
ass_AcceptanceService.DeleteEntity(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
public void SaveEntity(string keyValue, Ass_AcceptanceEntity entity) | |||
{ | |||
try | |||
{ | |||
ass_AcceptanceService.SaveEntity(keyValue, entity); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void ChangeStatusById(string keyValue, int i, string processId) | |||
{ | |||
try | |||
{ | |||
ass_AcceptanceService.ChangeStatusById(keyValue, i, processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
public void ChangeStatusByProcessId(string parameterProcessId, int p1) | |||
{ | |||
try | |||
{ | |||
ass_AcceptanceService.ChangeStatusByProcessId(parameterProcessId, p1); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowBusinessException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
} | |||
} |
@@ -0,0 +1,110 @@ | |||
using Learun.Util; | |||
using System; | |||
using System.ComponentModel.DataAnnotations.Schema; | |||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-11-18 10:46 | |||
/// 描 述:资产验收 | |||
/// </summary> | |||
public class Ass_AcceptanceEntity | |||
{ | |||
#region 实体成员 | |||
/// <summary> | |||
/// 编号 | |||
/// </summary> | |||
[Column("ID")] | |||
public string ID { get; set; } | |||
/// <summary> | |||
/// 设备名称 | |||
/// </summary> | |||
[Column("NAME")] | |||
public string Name { get; set; } | |||
/// <summary> | |||
/// 品牌 | |||
/// </summary> | |||
[Column("MANUFACTURER")] | |||
public string Manufacturer { get; set; } | |||
/// <summary> | |||
/// 规格型号 | |||
/// </summary> | |||
[Column("MODEL")] | |||
public string Model { get; set; } | |||
/// <summary> | |||
/// 单位 | |||
/// </summary> | |||
[Column("UNIT")] | |||
public string Unit { get; set; } | |||
/// <summary> | |||
/// 数量 | |||
/// </summary> | |||
[Column("STOCK")] | |||
public int? Stock { get; set; } | |||
/// <summary> | |||
/// 单价 | |||
/// </summary> | |||
[Column("PRICE")] | |||
public decimal? Price { get; set; } | |||
/// <summary> | |||
/// 总价 | |||
/// </summary> | |||
[Column("TOTALPRICE")] | |||
public decimal? TotalPrice { get; set; } | |||
/// <summary> | |||
/// 使用部门 | |||
/// </summary> | |||
[Column("DEPARTMENTID")] | |||
public string DepartmentId { get; set; } | |||
/// <summary> | |||
/// 放置地点 | |||
/// </summary> | |||
[Column("PLACE")] | |||
public string Place { get; set; } | |||
/// <summary> | |||
/// 使用人 | |||
/// </summary> | |||
[Column("USERID")] | |||
public string UserID { get; set; } | |||
/// <summary> | |||
/// 备注 | |||
/// </summary> | |||
[Column("REMARK")] | |||
public string Remark { get; set; } | |||
/// <summary> | |||
/// 流程id | |||
/// </summary> | |||
[Column("PROCESSID")] | |||
public string ProcessId { get; set; } | |||
/// <summary> | |||
/// 审核状态 | |||
/// </summary> | |||
[Column("STATUS")] | |||
public string Status { get; set; } | |||
#endregion | |||
#region 扩展操作 | |||
/// <summary> | |||
/// 新增调用 | |||
/// </summary> | |||
public void Create() | |||
{ | |||
this.ID = Guid.NewGuid().ToString(); | |||
} | |||
/// <summary> | |||
/// 编辑调用 | |||
/// </summary> | |||
/// <param name="keyValue"></param> | |||
public void Modify(string keyValue) | |||
{ | |||
this.ID = keyValue; | |||
} | |||
#endregion | |||
#region 扩展字段 | |||
#endregion | |||
} | |||
} | |||
@@ -0,0 +1,57 @@ | |||
using Learun.Util; | |||
using System.Data; | |||
using System.Collections.Generic; | |||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-11-18 10:46 | |||
/// 描 述:资产验收 | |||
/// </summary> | |||
public interface Ass_AcceptanceIBLL | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
IEnumerable<Ass_AcceptanceEntity> GetPageList(Pagination pagination, string queryJson); | |||
/// <summary> | |||
/// 获取Ass_Acceptance表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
Ass_AcceptanceEntity GetAss_AcceptanceEntity(string keyValue); | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
Ass_AcceptanceEntity GetEntityByProcessId(string processId); | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
void DeleteEntity(string keyValue); | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
void SaveEntity(string keyValue, Ass_AcceptanceEntity entity); | |||
#endregion | |||
void ChangeStatusById(string keyValue, int i, string processId); | |||
void ChangeStatusByProcessId(string parameterProcessId, int p1); | |||
} | |||
} |
@@ -0,0 +1,234 @@ | |||
using Dapper; | |||
using Learun.DataBase.Repository; | |||
using Learun.Util; | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Data; | |||
using System.Text; | |||
namespace Learun.Application.TwoDevelopment.AssetManagementSystem | |||
{ | |||
/// <summary> | |||
/// 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架 | |||
/// Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
/// 创 建:超级管理员 | |||
/// 日 期:2020-11-18 10:46 | |||
/// 描 述:资产验收 | |||
/// </summary> | |||
public class Ass_AcceptanceService : RepositoryFactory | |||
{ | |||
#region 获取数据 | |||
/// <summary> | |||
/// 获取页面显示列表数据 | |||
/// </summary> | |||
/// <param name="pagination">分页参数</param> | |||
/// <param name="queryJson">查询参数</param> | |||
/// <returns></returns> | |||
public IEnumerable<Ass_AcceptanceEntity> GetPageList(Pagination pagination, string queryJson) | |||
{ | |||
try | |||
{ | |||
var strSql = new StringBuilder(); | |||
strSql.Append("SELECT "); | |||
strSql.Append(@" | |||
t.ID, | |||
t.Name, | |||
t.Manufacturer, | |||
t.Model, | |||
t.Unit, | |||
t.Stock, | |||
t.Price, | |||
t.TotalPrice, | |||
t.DepartmentId, | |||
t.Place, | |||
t.UserID, | |||
t.Status, | |||
t.Remark | |||
"); | |||
strSql.Append(" FROM Ass_Acceptance t "); | |||
strSql.Append(" WHERE 1=1 "); | |||
var queryParam = queryJson.ToJObject(); | |||
// 虚拟参数 | |||
var dp = new DynamicParameters(new { }); | |||
if (!queryParam["Name"].IsEmpty()) | |||
{ | |||
dp.Add("Name", "%" + queryParam["Name"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Name Like @Name "); | |||
} | |||
if (!queryParam["DepartmentId"].IsEmpty()) | |||
{ | |||
dp.Add("DepartmentId",queryParam["DepartmentId"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DepartmentId = @DepartmentId "); | |||
} | |||
if (!queryParam["UserID"].IsEmpty()) | |||
{ | |||
dp.Add("UserID", queryParam["UserID"].ToString(), DbType.String); | |||
strSql.Append(" AND t.UserID = @UserID "); | |||
} | |||
if (!queryParam["Place"].IsEmpty()) | |||
{ | |||
dp.Add("Place", "%" + queryParam["Place"].ToString() + "%", DbType.String); | |||
strSql.Append(" AND t.Place Like @Place "); | |||
} | |||
return this.BaseRepository().FindList<Ass_AcceptanceEntity>(strSql.ToString(),dp, pagination); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取Ass_Acceptance表实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <returns></returns> | |||
public Ass_AcceptanceEntity GetAss_AcceptanceEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<Ass_AcceptanceEntity>(keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 获取主表实体数据 | |||
/// </summary> | |||
/// <param name="processId">流程实例ID</param> | |||
/// <returns></returns> | |||
public Ass_AcceptanceEntity GetEntityByProcessId(string processId) | |||
{ | |||
try | |||
{ | |||
return this.BaseRepository().FindEntity<Ass_AcceptanceEntity>(t=>t.ProcessId == processId); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
#region 提交数据 | |||
/// <summary> | |||
/// 删除实体数据 | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
public void DeleteEntity(string keyValue) | |||
{ | |||
try | |||
{ | |||
this.BaseRepository().Delete<Ass_AcceptanceEntity>(t=>t.ID == keyValue); | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="entity">实体</param> | |||
/// <returns></returns> | |||
public void SaveEntity(string keyValue, Ass_AcceptanceEntity entity) | |||
{ | |||
try | |||
{ | |||
if (!string.IsNullOrEmpty(keyValue)) | |||
{ | |||
entity.Modify(keyValue); | |||
this.BaseRepository().Update(entity); | |||
} | |||
else | |||
{ | |||
entity.Create(); | |||
this.BaseRepository().Insert(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
if (ex is ExceptionEx) | |||
{ | |||
throw; | |||
} | |||
else | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
#endregion | |||
public void ChangeStatusById(string keyValue, int i, string processId) | |||
{ | |||
try | |||
{ | |||
BaseRepository().ExecuteBySql($"UPDATE dbo.Ass_Acceptance SET Status='{i}',ProcessId='{processId}' WHERE ID='{keyValue}'", null); | |||
} | |||
catch (Exception ex) | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
public void ChangeStatusByProcessId(string parameterProcessId, int p1) | |||
{ | |||
try | |||
{ | |||
if (p1 == 2) | |||
{ | |||
var entity = this.BaseRepository() | |||
.FindEntity<Ass_AcceptanceEntity>(a => a.ProcessId == parameterProcessId); | |||
if (null != entity) | |||
{ | |||
entity.Status = p1.ToString(); | |||
} | |||
this.BaseRepository().Update(entity); | |||
} | |||
} | |||
catch (Exception ex) | |||
{ | |||
throw ExceptionEx.ThrowServiceException(ex); | |||
} | |||
} | |||
} | |||
} |
@@ -92,6 +92,26 @@ namespace Learun.Application.TwoDevelopment.EducationalAdministration | |||
dp.Add("BCdPartyFace", queryParam["BCdPartyFace"].ToString(), DbType.String); | |||
strSql.Append(" AND t.BCdPartyFace = @BCdPartyFace "); | |||
} | |||
if (!queryParam["NationalityNo"].IsEmpty())//民族 | |||
{ | |||
dp.Add("NationalityNo", queryParam["NationalityNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.NationalityNo = @NationalityNo "); | |||
} | |||
if (!queryParam["GenderNo"].IsEmpty())//性别 | |||
{ | |||
dp.Add("GenderNo", queryParam["GenderNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.GenderNo = @GenderNo "); | |||
} | |||
if (!queryParam["DegreeNo"].IsEmpty())//学位 | |||
{ | |||
dp.Add("DegreeNo", queryParam["DegreeNo"].ToString(), DbType.String); | |||
strSql.Append(" AND t.DegreeNo = @DegreeNo "); | |||
} | |||
if (!queryParam["ProfessionalTitle"].IsEmpty())//职称 | |||
{ | |||
dp.Add("ProfessionalTitle", queryParam["ProfessionalTitle"].ToString(), DbType.String); | |||
strSql.Append(" AND t.ProfessionalTitle = @ProfessionalTitle "); | |||
} | |||
return this.BaseRepository("CollegeMIS").FindList<EmpInfoEntity>(strSql.ToString(), dp, pagination); | |||
} | |||
catch (Exception ex) | |||
@@ -1577,6 +1577,10 @@ | |||
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyService.cs" /> | |||
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyBLL.cs" /> | |||
<Compile Include="PersonnelManagement\ADR_AddApply\ADR_AddApplyIBLL.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceEntity.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceService.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceBLL.cs" /> | |||
<Compile Include="AssetManagementSystem\Ass_Acceptance\Ass_AcceptanceIBLL.cs" /> | |||
</ItemGroup> | |||
<ItemGroup> | |||
<ProjectReference Include="..\..\..\Learun.Application.Organization\Learun.Application.Organization.csproj"> | |||
@@ -95,6 +95,7 @@ | |||
<Compile Include="Delegate\NWFDelegateService.cs" /> | |||
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" /> | |||
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" /> | |||
<Compile Include="NodeMethod\Ass_AcceptanceMethod.cs" /> | |||
<Compile Include="NodeMethod\Ass_ReceiveMethod.cs" /> | |||
<Compile Include="NodeMethod\SW_Ask_StudentMainMethod.cs" /> | |||
<Compile Include="NodeMethod\SW_Ask_TypeMethod.cs" /> | |||
@@ -0,0 +1,27 @@ | |||
using System; | |||
using System.Collections.Generic; | |||
using System.Linq; | |||
using System.Text; | |||
using System.Threading.Tasks; | |||
using Learun.Application.TwoDevelopment.AssetManagementSystem; | |||
namespace Learun.Application.WorkFlow | |||
{ | |||
public class Ass_AcceptanceMethod : IWorkFlowMethod | |||
{ | |||
Ass_AcceptanceIBLL ass_AcceptanceIBLL = new Ass_AcceptanceBLL(); | |||
public void Execute(WfMethodParameter parameter) | |||
{ | |||
if (parameter.code == "agree") | |||
{ | |||
ass_AcceptanceIBLL.ChangeStatusByProcessId(parameter.processId, 2); | |||
} | |||
else | |||
{ | |||
ass_AcceptanceIBLL.ChangeStatusByProcessId(parameter.processId, 0); | |||
} | |||
} | |||
} | |||
} |