소스 검색

经费开支申报

新疆警官学校中职
zhangli 2 년 전
부모
커밋
9d7fa42f50
19개의 변경된 파일570개의 추가작업 그리고 26개의 파일을 삭제
  1. +33
    -7
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs
  2. +6
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml
  3. +9
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js
  4. +52
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.cshtml
  5. +242
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.js
  6. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml
  7. +41
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js
  8. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js
  9. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  10. +2
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config
  11. +39
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs
  12. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs
  13. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs
  14. +59
    -3
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs
  15. +18
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs
  16. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs
  17. +22
    -2
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs
  18. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj
  19. +27
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/FundsApplyMethod.cs

+ 33
- 7
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Controllers/FundsApplyController.cs 파일 보기

@@ -17,6 +17,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
public class FundsApplyController : MvcControllerBase
{
private FundsApplyIBLL fundsApplyIBLL = new FundsApplyBLL();
private FundsApplyDetailIBLL fundsApplyDetailIBLL = new FundsApplyDetailBLL();

#region 视图功能

@@ -27,7 +28,7 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
[HttpGet]
public ActionResult Index()
{
return View();
return View();
}
/// <summary>
/// 表单页
@@ -39,6 +40,12 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
ViewBag.EnCode = "JFKZ_" + CommonHelper.CreateNo();
return View();
}

[HttpGet]
public ActionResult FormView()
{
return View();
}
#endregion

#region 获取数据
@@ -73,9 +80,12 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
[AjaxOnly]
public ActionResult GetFormData(string keyValue)
{
var FundsApplyData = fundsApplyIBLL.GetFundsApplyEntity( keyValue );
var jsonData = new {
var FundsApplyData = fundsApplyIBLL.GetFundsApplyEntity(keyValue);
var FundsApplyDetailData = fundsApplyDetailIBLL.GetListByApplyId(keyValue);
var jsonData = new
{
FundsApply = FundsApplyData,
FundsApplyDetail = FundsApplyDetailData,
};
return Success(jsonData);
}
@@ -88,8 +98,9 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
[AjaxOnly]
public ActionResult GetFormDataByProcessId(string processId)
{
var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId( processId );
var jsonData = new {
var FundsApplyData = fundsApplyIBLL.GetEntityByProcessId(processId);
var jsonData = new
{
FundsApply = FundsApplyData,
};
return Success(jsonData);
@@ -119,15 +130,30 @@ namespace Learun.Application.Web.Areas.AssetManagementSystem.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveForm(string keyValue, string strEntity)
public ActionResult SaveForm(string keyValue, string strEntity, string fundsApplyDetailList)
{
FundsApplyEntity entity = strEntity.ToObject<FundsApplyEntity>();
fundsApplyIBLL.SaveEntity(keyValue,entity);
List<FundsApplyDetailEntity> detailList = fundsApplyDetailList.ToObject<List<FundsApplyDetailEntity>>();
fundsApplyIBLL.SaveEntity(keyValue, entity, detailList);
if (string.IsNullOrEmpty(keyValue))
{
}
return Success("保存成功!");
}

/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue">主键</param>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult ChangeStatusById(string keyValue, string processId)
{
fundsApplyIBLL.ChangeStatusById(keyValue, 1, processId);
return Success("操作成功!");
}

#endregion

}


+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml 파일 보기

@@ -7,7 +7,7 @@
</script>
<div class="lr-form-wrap" id="form">

<div class="col-xs-12 lr-form-item" data-table="FundsApply">
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">申报单号</div>
<input id="EnCode" type="text" readonly class="form-control" readonly="readonly" />
</div>
@@ -19,12 +19,16 @@
<div class="lr-form-item-title">填报时间</div>
<input id="ApplyTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">是否固定资产</div>
<div id="IsFixedAssets"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">填报人</div>
<input id="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
@*<div class="lr-form-item-title">备注</div>*@
<div class="lr-form-item-title">备注</div>
<input id="Remark" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">


+ 9
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.js 파일 보기

@@ -78,11 +78,12 @@ var bootstrap = function ($, learun) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (tempdatra[key].Id === keyValue) {
if (tempdatra[key] && tempdatra[key].Id === keyValue) {
pricecount -= tempdatra[key].Amount;
tempdatra.splice(key, 1);
}
});
pricecount = pricecount.toFixed(2);
$("#SumAmount").val(pricecount);
$("#UpperAmount").val(smalltoBIG(pricecount));
$('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
@@ -96,6 +97,7 @@ var bootstrap = function ($, learun) {
page.initData();
},
bind: function () {
$('#IsFixedAssets').lrDataItemSelect({ code: 'YesOrNoInt' });
$('#ApplyDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#ApplyDept').lrselectSet(learun.clientdata.get(['userinfo']).departmentId);
$('#ApplyTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
@@ -127,9 +129,13 @@ var bootstrap = function ($, learun) {
for (var id in data) {
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].SumAmount) {
pricecount = data[id].SumAmount;
}
}
}
});
@@ -154,7 +160,7 @@ var bootstrap = function ($, learun) {
for (var i = 0; i < tempdatra.length; i++) {
pricecount += parseFloat(tempdatra[i].Amount);
}
$("#SumAmount").val(pricecount);
$("#SumAmount").val(pricecount.toFixed(2));
$("#UpperAmount").val(smalltoBIG(pricecount));
$('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
};
@@ -195,7 +201,7 @@ var bootstrap = function ($, learun) {
formData.ProcessId = processId;
}
postData.strEntity = JSON.stringify(formData);
postData.FundsApplyDetailList = JSON.stringify($('#FundsApplyDetail').jfGridGet('rowdatas'));
postData.fundsApplyDetailList = JSON.stringify($('#FundsApplyDetail').jfGridGet('rowdatas'));

$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调


+ 52
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.cshtml 파일 보기

@@ -0,0 +1,52 @@
@{
ViewBag.Title = "经费开支申报";
Layout = "~/Views/Shared/_Form.cshtml";
}
<script>
var NewEnCode = "@ViewBag.EnCode";
</script>
<div class="lr-form-wrap" id="form">

<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">申报单号</div>
<input id="EnCode" type="text" readonly class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">申报部门</div>
<div id="ApplyDept" readonly></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">填报时间</div>
<input id="ApplyTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">是否固定资产</div>
<div id="IsFixedAssets"></div>
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">填报人</div>
<input id="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">备注</div>
<input id="Remark" type="text" class="form-control" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">总金额</div>
<input id="SumAmount" type="text" class="form-control" readonly="readonly" />
</div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply">
<div class="lr-form-item-title">人民币(大写)</div>
<input id="UpperAmount" type="text" class="form-control" readonly="readonly" />
</div>
@*<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">明细操作</div>
<input id="detailadd" type="button" class="btn btn-success" value="新增明细" />
<input id="detailedit" type="button" class="btn btn-warning" value="编辑明细" />
<input id="detaildel" type="button" class="btn btn-danger" value="移除明细" />
</div>*@
<div class="col-xs-12 lr-form-item lr-form-item-grid">
<div id="FundsApplyDetail"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/AssetManagementSystem/Views/FundsApply/FormView.js")

+ 242
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/FormView.js 파일 보기

@@ -0,0 +1,242 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2022-11-07 14:25
* 描 述:经费开支申报
*/
var keyValue = request('keyValue');
// 设置权限
var setAuthorize;
// 设置表单数据
var setFormData;
// 验证数据是否填写完整
var validForm;
// 保存数据
var save;
var refreshGirdData;
var acceptClick;
var selectedRow;
var tempdatra = new Array();
//总价计算
var pricecount = 0;
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();
$("#detailadd").on('click', function () {
selectedRow = null;
learun.layerForm({
id: 'formdetail',
title: '新增明细',
url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/Form',
width: 500,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
});
$("#detailedit").on('click', function () {
var keyValue = $('#FundsApplyDetail').jfGridValue('Id');
selectedRow = $('#FundsApplyDetail').jfGridGet('rowdata');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'formdetail',
title: '编辑明细',
url: top.$.rootUrl + '/AssetManagementSystem/FundsApplyDetail/Form?keyValue=' + keyValue,
width: 500,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
$("#detaildel").on('click', function () {
var keyValue = $('#FundsApplyDetail').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res, index) {
if (res) {
$.each(tempdatra, function (key, val) {
if (tempdatra[key] && tempdatra[key].Id === keyValue) {
pricecount -= tempdatra[key].Amount;
tempdatra.splice(key, 1);
}
});
pricecount = pricecount.toFixed(2);
$("#SumAmount").val(pricecount);
$("#UpperAmount").val(smalltoBIG(pricecount));
$('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
top.layer.close(index);
}
});
}
});

page.bind();
page.initData();
},
bind: function () {
$('#IsFixedAssets').lrDataItemSelect({ code: 'YesOrNoInt' });
$('#ApplyDept').lrDataSourceSelect({ code: 'classdata', value: 'id', text: 'name' });
$('#ApplyDept').lrselectSet(learun.clientdata.get(['userinfo']).departmentId);
$('#ApplyTime').val(learun.formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss'));
$('#ApplyUser')[0].lrvalue = learun.clientdata.get(['userinfo']).userId;
$('#ApplyUser').val(learun.clientdata.get(['userinfo']).realName);
$('#FundsApplyDetail').jfGrid({
headData: [
{
label: '项目内容', name: 'ProjectContent', width: 150, align: 'left'
},
{
label: '数量', name: 'Number', width: 150, align: 'left'
},
{
label: '单价(元)', name: 'Price', width: 150, align: 'left'
},
{
label: '金额(元)', name: 'Amount', width: 150, align: 'left'
},
],
height: 400,
mainId: 'AAIId',
reloadSelected: false,
});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
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].SumAmount) {
pricecount = data[id].SumAmount;
}
}
}
});
} else {
$("#EnCode").val(NewEnCode);
}
}
};
refreshGirdData = function (temprow) {
var ifnewrow = true;
$.each(tempdatra, function (key, val) {
if (tempdatra[key].Id === temprow.Id) {
tempdatra[key] = temprow;
ifnewrow = false;
}
});
if (ifnewrow) {
tempdatra.push(temprow);
}
//总价计算
pricecount = 0;
for (var i = 0; i < tempdatra.length; i++) {
pricecount += parseFloat(tempdatra[i].Amount);
}
$("#SumAmount").val(pricecount.toFixed(2));
$("#UpperAmount").val(smalltoBIG(pricecount));
$('#FundsApplyDetail').jfGridSet('refreshdata', tempdatra.sort(sortNumber));
};
function sortNumber(a, b) {
return a.AAIOrder - b.AAIOrder;
}
// 设置表单数据
setFormData = function (processId, param, callback) {
if (!!processId) {
$.lrSetForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/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 == 'FundsApply' && 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 postData = {};
var formData = $('[data-table="FundsApply"]').lrGetFormData();
if (!!processId) {
formData.ProcessId = processId;
}
postData.strEntity = JSON.stringify(formData);
postData.fundsApplyDetailList = JSON.stringify($('#FundsApplyDetail').jfGridGet('rowdatas'));

$.lrSaveForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack(res, i);
}
});
};
page.init();
function smalltoBIG(n) {
var fraction = ['角', '分'];
var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
var unit = [
['元', '万', '亿'],
['', '拾', '佰', '仟']
];
var head = n < 0 ? '欠' : '';
n = Math.abs(n);

var s = '';

for (var i = 0; i < fraction.length; i++) {
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
}
s = s || '整';
n = Math.floor(n);

for (var i = 0; i < unit[0].length && n > 0; i++) {
var p = '';
for (var j = 0; j < unit[1].length && n > 0; j++) {
p = digit[n % 10] + unit[1][j] + p;
n = Math.floor(n / 10);
}
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
}
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整');
}
}

+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.cshtml 파일 보기

@@ -16,6 +16,7 @@
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;申请</a>
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;提交</a>
<a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>
</div>


+ 41
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js 파일 보기

@@ -32,8 +32,11 @@ var bootstrap = function ($, learun) {
res = top[id].validForm();
// 保存数据
if (res) {
processId = learun.newGuid();
res = top[id].save(processId, refreshGirdData);
res = top[id].save('', function () {
page.search();
});
//processId = learun.newGuid();
//res = top[id].save(processId, refreshGirdData);
}
return res;
}
@@ -81,13 +84,33 @@ var bootstrap = function ($, learun) {
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
// 提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status !== 0) {
learun.alert.warning("当前项目已提交,请耐心等待审批!");
return;
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
processId = learun.newGuid();
learun.postForm(top.$.rootUrl + '/AssetManagementSystem/FundsApply/ChangeStatusById', { keyValue: keyValue, processId: processId }, function (res) {
refreshGirdData(res, {});
});
}
});
}
});

},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList',
headData: [
{ label: "申报单号", name: "EnCode", width: 100, align: "left" },
{ label: "申报单号", name: "EnCode", width: 200, align: "left" },
{ label: "申报部门", name: "ApplyDept", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('department', {
@@ -109,7 +132,20 @@ var bootstrap = function ($, learun) {
}},
{ label: "备注", name: "Remark", width: 100, align: "left"},
{ label: "总金额", name: "SumAmount", width: 100, align: "left"},
{ label: "人民币(大写)", name: "UpperAmount", width: 100, align: "left"},
{ label: "人民币(大写)", name: "UpperAmount", 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>';
}
}
}

],
mainId:'Id',
isPage: true
@@ -128,7 +164,7 @@ var bootstrap = function ($, learun) {
{
// 发起流程
var postData = {
schemeCode:'',// 填写流程对应模板编号
schemeCode:'LC_FundsApply',// 填写流程对应模板编号
processId:processId,
level:'1',
};


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js 파일 보기

@@ -21,7 +21,7 @@ var bootstrap = function ($, learun) {
var num = $('#Number').val();
var Price = $('#Price').val();
if (!!num && !!Price) {
$('#Amount').val(parseInt(num) * parseFloat(Price));
$('#Amount').val((parseInt(num) * parseFloat(Price)).toFixed(2));
}
});
},


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj 파일 보기

@@ -1003,6 +1003,7 @@
<Content Include="Areas\AssetManagementSystem\Views\Ass_UserChangeInfo\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Form.js" />
<Content Include="Areas\AssetManagementSystem\Views\Ass_Warning\Index.js" />
<Content Include="Areas\AssetManagementSystem\Views\FundsApply\FormView.js" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Form.js" />
<Content Include="Areas\EducationalAdministration\Views\ArrangeExamTermNew\Index.cshtml" />
@@ -1288,6 +1289,7 @@
<Content Include="Areas\EducationalAdministration\Views\StudentHonor\Form.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StudentHonor\FormScore.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StudentHonor\Index.cshtml" />
<Content Include="Areas\AssetManagementSystem\Views\FundsApply\FormView.cshtml" />
<None Include="Areas\EducationalAdministration\Views\StuInfoBasic\Printxjk.cshtml" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\AllocationClassDC.js" />
<Content Include="Areas\EducationalAdministration\Views\StuInfoFresh\StatisticClassIndex.js" />


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config 파일 보기

@@ -35,6 +35,7 @@
<typeAlias alias="StuDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuDisciplineManagementMethod,Learun.Application.WorkFlow" />
<typeAlias alias="StudentCertificateMethod" type="Learun.Application.WorkFlow.StudentCertificateMethod,Learun.Application.WorkFlow" />
<typeAlias alias="StudentHonorMethod" type="Learun.Application.WorkFlow.StudentHonorMethod,Learun.Application.WorkFlow" />
<typeAlias alias="FundsApplyMethod" type="Learun.Application.WorkFlow.StudentHonorMethod,Learun.Application.WorkFlow" />
<!--任务调度器-->
<typeAlias alias="ITSMethod" type="Learun.Application.Extention.TaskScheduling.ITsMethod,Learun.Application.Extention" />
@@ -80,6 +81,7 @@
<type type="IWorkFlowMethod" mapTo="StuDisciplineManagementMethod" name="StuDisciplineManagementMethod"></type>
<type type="IWorkFlowMethod" mapTo="StudentCertificateMethod" name="StudentCertificateMethod"></type>
<type type="IWorkFlowMethod" mapTo="StudentHonorMethod" name="StudentHonorMethod"></type>
<type type="IWorkFlowMethod" mapTo="FundsApplyMethod" name="FundsApplyMethod"></type>
</container>



+ 39
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs 파일 보기

@@ -123,11 +123,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
public void SaveEntity(string keyValue, FundsApplyEntity entity)
public void SaveEntity(string keyValue, FundsApplyEntity entity, List<FundsApplyDetailEntity> detailList)
{
try
{
fundsApplyService.SaveEntity(keyValue, entity);
fundsApplyService.SaveEntity(keyValue, entity, detailList);
}
catch (Exception ex)
{
@@ -142,6 +142,43 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
}
}

public void ChangeStatusById(string keyValue,int status, string processId)
{
try
{
fundsApplyService.ChangeStatusById(keyValue, status, processId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}

public void ChangeStatusByProcessId(string processId, int status)
{
try
{
fundsApplyService.ChangeStatusByProcessId(processId, status);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

}


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs 파일 보기

@@ -35,6 +35,11 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
[Column("APPLYDEPT")]
public string ApplyDept { get; set; }
/// <summary>
/// 是否固定资产
/// </summary>
[Column("ISFIXEDASSETS")]
public int? IsFixedAssets { get; set; }
/// <summary>
/// ApplyUser
/// </summary>
[Column("APPLYUSER")]
@@ -73,6 +78,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
public void Create()
{
this.Id = Guid.NewGuid().ToString();
this.Status = 0;
}
/// <summary>
/// 编辑调用


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs 파일 보기

@@ -48,7 +48,14 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// </summary>
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
void SaveEntity(string keyValue, FundsApplyEntity entity);
void SaveEntity(string keyValue, FundsApplyEntity entity, List<FundsApplyDetailEntity> detailList);
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <param name="processId"></param>
void ChangeStatusById(string keyValue,int status, string processId);
void ChangeStatusByProcessId(string processId, int status);
#endregion

}


+ 59
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs 파일 보기

@@ -135,20 +135,76 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// <param name="keyValue">主键</param>
/// <param name="entity">实体</param>
/// <returns></returns>
public void SaveEntity(string keyValue, FundsApplyEntity entity)
public void SaveEntity(string keyValue, FundsApplyEntity entity, List<FundsApplyDetailEntity> detailList)
{
var db = this.BaseRepository("CollegeMIS");
try
{
db.BeginTrans();
if (!string.IsNullOrEmpty(keyValue))
{
entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
db.Update(entity);
}
else
{
entity.Create();
this.BaseRepository("CollegeMIS").Insert(entity);
db.Insert(entity);
}
//子表
db.ExecuteBySql($"delete FundsApplyDetail where ApplyId='{entity.Id}'");
foreach (var detail in detailList)
{
detail.Create();
detail.ApplyId = entity.Id;
db.Insert(detail);
}
db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

/// <summary>
///
/// </summary>
/// <param name="keyValue"></param>
/// <param name="status"></param>
/// <param name="processId"></param>
public void ChangeStatusById(string keyValue, int status, string processId)
{
try
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update FundsApply set ProcessId='{processId}',status='{status}' where Id='{keyValue}'");
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}

public void ChangeStatusByProcessId(string processId, int status)
{
try
{
this.BaseRepository("CollegeMIS").ExecuteBySql($"update FundsApply set status='{status}' where ProcessId='{processId}'");
}
catch (Exception ex)
{


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs 파일 보기

@@ -67,6 +67,24 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
}
}

public List<FundsApplyDetailEntity> GetListByApplyId(string applyId)
{
try
{
return fundsApplyDetailService.GetListByApplyId(applyId);
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowBusinessException(ex);
}
}
}
#endregion

#region 提交数据


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs 파일 보기

@@ -27,6 +27,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// <param name="keyValue">主键</param>
/// <returns></returns>
FundsApplyDetailEntity GetFundsApplyDetailEntity(string keyValue);
List<FundsApplyDetailEntity> GetListByApplyId(string applyId);
#endregion

#region 提交数据


+ 22
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs 파일 보기

@@ -4,6 +4,7 @@ using Learun.Util;
using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;

namespace Learun.Application.TwoDevelopment.AssetManagementSystem
@@ -43,7 +44,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
var queryParam = queryJson.ToJObject();
// 虚拟参数
var dp = new DynamicParameters(new { });
return this.BaseRepository("CollegeMIS").FindList<FundsApplyDetailEntity>(strSql.ToString(),dp, pagination);
return this.BaseRepository("CollegeMIS").FindList<FundsApplyDetailEntity>(strSql.ToString(), dp, pagination);
}
catch (Exception ex)
{
@@ -82,6 +83,25 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
}
}


public List<FundsApplyDetailEntity> GetListByApplyId(string applyId)
{
try
{
return this.BaseRepository("CollegeMIS").FindList<FundsApplyDetailEntity>(x => x.ApplyId == applyId).ToList();
}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}
#endregion

#region 提交数据
@@ -94,7 +114,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
{
try
{
this.BaseRepository("CollegeMIS").Delete<FundsApplyDetailEntity>(t=>t.Id == keyValue);
this.BaseRepository("CollegeMIS").Delete<FundsApplyDetailEntity>(t => t.Id == keyValue);
}
catch (Exception ex)
{


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj 파일 보기

@@ -97,6 +97,7 @@
<Compile Include="NodeMethod\ArrangeLessonTermAttemperMethod.cs" />
<Compile Include="NodeMethod\ADR_AddApplyMethod.cs" />
<Compile Include="NodeMethod\Ass_AcceptanceMethod.cs" />
<Compile Include="NodeMethod\FundsApplyMethod.cs" />
<Compile Include="NodeMethod\StudentHonorMethod.cs" />
<Compile Include="NodeMethod\StudentCertificateMethod.cs" />
<Compile Include="NodeMethod\FD_PayManageMethod.cs" />


+ 27
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/NodeMethod/FundsApplyMethod.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 FundsApplyMethod : IWorkFlowMethod
{
FundsApplyIBLL fundsApply = new FundsApplyBLL();


public void Execute(WfMethodParameter parameter)
{
if (parameter.code == "agree")
{
fundsApply.ChangeStatusByProcessId(parameter.processId, 2);
}
else
{
fundsApply.ChangeStatusByProcessId(parameter.processId, 0);
}
}
}
}

불러오는 중...
취소
저장