Ver a proveniência

经费开支申报

新疆警官学校中职
zhangli há 2 anos
ascendente
cometimento
9d7fa42f50
19 ficheiros alterados com 570 adições e 26 eliminações
  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 Ver ficheiro

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


#region 视图功能 #region 视图功能


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

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


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


} }


+ 6
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Form.cshtml Ver ficheiro

@@ -7,7 +7,7 @@
</script> </script>
<div class="lr-form-wrap" id="form"> <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> <div class="lr-form-item-title">申报单号</div>
<input id="EnCode" type="text" readonly class="form-control" readonly="readonly" /> <input id="EnCode" type="text" readonly class="form-control" readonly="readonly" />
</div> </div>
@@ -19,12 +19,16 @@
<div class="lr-form-item-title">填报时间</div> <div class="lr-form-item-title">填报时间</div>
<input id="ApplyTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" /> <input id="ApplyTime" type="text" readonly class="form-control currentInfo lr-currentInfo-time" />
</div> </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="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="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" /> <input id="ApplyUser" type="text" readonly class="form-control currentInfo lr-currentInfo-user" />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply"> <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" /> <input id="Remark" type="text" class="form-control" />
</div> </div>
<div class="col-xs-6 lr-form-item" data-table="FundsApply"> <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 Ver ficheiro

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

@@ -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 Ver ficheiro

@@ -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 Ver ficheiro

@@ -16,6 +16,7 @@
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;申请</a> <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_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_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> <a id="lr_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div> </div>
</div> </div>


+ 41
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApply/Index.js Ver ficheiro

@@ -32,8 +32,11 @@ var bootstrap = function ($, learun) {
res = top[id].validForm(); res = top[id].validForm();
// 保存数据 // 保存数据
if (res) { 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; return res;
} }
@@ -81,13 +84,33 @@ var bootstrap = function ($, learun) {
$('#lr_print').on('click', function () { $('#lr_print').on('click', function () {
$('#gridtable').jqprintTable(); $('#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 () { initGird: function () {
$('#gridtable').jfGrid({ $('#gridtable').jfGrid({
url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList', url: top.$.rootUrl + '/AssetManagementSystem/FundsApply/GetPageList',
headData: [ headData: [
{ label: "申报单号", name: "EnCode", width: 100, align: "left" },
{ label: "申报单号", name: "EnCode", width: 200, align: "left" },
{ label: "申报部门", name: "ApplyDept", width: 100, align: "left", { label: "申报部门", name: "ApplyDept", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) { formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('department', { learun.clientdata.getAsync('department', {
@@ -109,7 +132,20 @@ var bootstrap = function ($, learun) {
}}, }},
{ label: "备注", name: "Remark", width: 100, align: "left"}, { label: "备注", name: "Remark", width: 100, align: "left"},
{ label: "总金额", name: "SumAmount", 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', mainId:'Id',
isPage: true isPage: true
@@ -128,7 +164,7 @@ var bootstrap = function ($, learun) {
{ {
// 发起流程 // 发起流程
var postData = { var postData = {
schemeCode:'',// 填写流程对应模板编号
schemeCode:'LC_FundsApply',// 填写流程对应模板编号
processId:processId, processId:processId,
level:'1', level:'1',
}; };


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/AssetManagementSystem/Views/FundsApplyDetail/Form.js Ver ficheiro

@@ -21,7 +21,7 @@ var bootstrap = function ($, learun) {
var num = $('#Number').val(); var num = $('#Number').val();
var Price = $('#Price').val(); var Price = $('#Price').val();
if (!!num && !!Price) { 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 Ver ficheiro

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


+ 2
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/XmlConfig/ioc.config Ver ficheiro

@@ -35,6 +35,7 @@
<typeAlias alias="StuDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuDisciplineManagementMethod,Learun.Application.WorkFlow" /> <typeAlias alias="StuDisciplineManagementMethod" type="Learun.Application.WorkFlow.StuDisciplineManagementMethod,Learun.Application.WorkFlow" />
<typeAlias alias="StudentCertificateMethod" type="Learun.Application.WorkFlow.StudentCertificateMethod,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="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" /> <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="StuDisciplineManagementMethod" name="StuDisciplineManagementMethod"></type>
<type type="IWorkFlowMethod" mapTo="StudentCertificateMethod" name="StudentCertificateMethod"></type> <type type="IWorkFlowMethod" mapTo="StudentCertificateMethod" name="StudentCertificateMethod"></type>
<type type="IWorkFlowMethod" mapTo="StudentHonorMethod" name="StudentHonorMethod"></type> <type type="IWorkFlowMethod" mapTo="StudentHonorMethod" name="StudentHonorMethod"></type>
<type type="IWorkFlowMethod" mapTo="FundsApplyMethod" name="FundsApplyMethod"></type>
</container> </container>




+ 39
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyBLL.cs Ver ficheiro

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


} }


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyEntity.cs Ver ficheiro

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


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyIBLL.cs Ver ficheiro

@@ -48,7 +48,14 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// </summary> /// </summary>
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>
/// <param name="entity">实体</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 #endregion


} }


+ 59
- 3
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApply/FundsApplyService.cs Ver ficheiro

@@ -135,20 +135,76 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
/// <param name="keyValue">主键</param> /// <param name="keyValue">主键</param>
/// <param name="entity">实体</param> /// <param name="entity">实体</param>
/// <returns></returns> /// <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 try
{ {
db.BeginTrans();
if (!string.IsNullOrEmpty(keyValue)) if (!string.IsNullOrEmpty(keyValue))
{ {
entity.Modify(keyValue); entity.Modify(keyValue);
this.BaseRepository("CollegeMIS").Update(entity);
db.Update(entity);
} }
else else
{ {
entity.Create(); 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) catch (Exception ex)
{ {


+ 18
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailBLL.cs Ver ficheiro

@@ -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 #endregion


#region 提交数据 #region 提交数据


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailIBLL.cs Ver ficheiro

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


#region 提交数据 #region 提交数据


+ 22
- 2
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/AssetManagementSystem/FundsApplyDetail/FundsApplyDetailService.cs Ver ficheiro

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


namespace Learun.Application.TwoDevelopment.AssetManagementSystem namespace Learun.Application.TwoDevelopment.AssetManagementSystem
@@ -43,7 +44,7 @@ namespace Learun.Application.TwoDevelopment.AssetManagementSystem
var queryParam = queryJson.ToJObject(); var queryParam = queryJson.ToJObject();
// 虚拟参数 // 虚拟参数
var dp = new DynamicParameters(new { }); 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) 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 #endregion


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


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.WorkFlow/Learun.Application.WorkFlow.csproj Ver ficheiro

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

@@ -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);
}
}
}
}

Carregando…
Cancelar
Guardar