edy 3 лет назад
Родитель
Сommit
78276cfdce
19 измененных файлов: 555 добавлений и 47 удалений
  1. +66
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs
  2. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js
  3. +6
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.js
  4. +12
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.cshtml
  5. +105
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.js
  6. +9
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml
  7. +16
    -16
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js
  8. +38
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml
  9. +152
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js
  10. +5
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js
  11. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js
  12. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js
  13. +11
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js
  14. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj
  15. +21
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildBLL.cs
  16. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildIBLL.cs
  17. +75
    -10
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildService.cs
  18. +20
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainEntity.cs
  19. +3
    -6
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs

+ 66
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs Просмотреть файл

@@ -39,10 +39,51 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
{
return View();
}
/// <summary>
/// 上报数据管理
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult IndexReport()
{
return View();
}

/// <summary>
/// 上报数据管理
/// <summary>
/// <returns></returns>
[HttpGet]
public ActionResult FormView()
{
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 = fualityReportMainIBLL.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">项目Id</param>
@@ -92,6 +133,31 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers

return Success("保存成功!");
}
/// <summary>
/// 提交
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult UpdateState(string keyValue, int Status)
{
fualityReportChildIBLL.UpdateState(keyValue, Status);

return Success("操作成功!");
}
/// <summary>
/// 删除
/// </summary>
/// <returns></returns>
[HttpPost]
[AjaxOnly]
public ActionResult DeleteForm(string keyValue)
{
fualityReportChildIBLL.DeleteEntity(keyValue);

return Success("删除成功!");
}
#endregion

}


+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js Просмотреть файл

@@ -89,11 +89,11 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 150, align: "left" },
{ label: "公式", name: "Result", width: 250, align: "left" },
{ label: "公式", name: "Result", width: 350, align: "left" },
{ label: "排序", name: "Sort", width: 100, align: "left" },
{ label: "描述", name: "Desc", width: 200, align: "left" },
{
label: "状态", name: "IsEnable", width: 100, align: "left",
label: "启用", name: "IsEnable", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}


+ 6
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.js Просмотреть файл

@@ -35,11 +35,11 @@ var bootstrap = function ($, learun) {
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/QualityReport/GetFormData?keyValue=' + keyValue, function (data) {
console.log(data);
$('#content').html('');
for (var i = 0; i < data.length; i++) {
var id = data[i].Id;
arr.push({ Id: id, Value: data[i].Value, Sort: data[i].Sort });
arr.push({ Id: id, Value: data[i].Value, Sort: data[i].Sort, ProjectId: data[i].ProjectId });
var html = '';
html += '<div class="col-xs-6 lr-form-item">';
html += '<div class="lr-form-item-title">计算项<font face="宋体">*</font></div>';
@@ -87,8 +87,10 @@ var bootstrap = function ($, learun) {
if (!$('body').lrValidform()) {
return false;
}
console.log('save', arr);
//return;
if (arr.count <= 0) {
return learun.alert.warning('请设置上报数据!');
}

var postData = {
list: arr //JSON.stringify($('body').lrGetFormData())
};


+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.cshtml Просмотреть файл

@@ -0,0 +1,12 @@
@{
ViewBag.Title = "数据上报";
Layout = "~/Views/Shared/_Form.cshtml";
}
<div class="lr-form-wrap" id="form">
<div id="content"></div>
<div class="col-xs-12 lr-form-item" style="color: red; margin-top: 20px;">
<div class="lr-form-item-title">公式:</div>
<div id="result" style="margin-top: 5px;"></div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/FormView.js")

+ 105
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/FormView.js Просмотреть файл

@@ -0,0 +1,105 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:07
* 描 述:数据上报
*/
var acceptClick;
var keyValue = request('keyValue');
var ProjectName = request('ProjectName');
var arr = [];
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
$('.lr-form-wrap').lrscroll();
page.bind();
page.initData();
},
bind: function () {
//文本框失去焦点,计算结果
$('#form').on('blur',
'.value',
function () {
var id = $(this)[0].id;
arr.forEach(m => {
if (m.Id == id) {
return m.Value = $('#' + id).val();
}
});

page.refreshRes();

});
},
initData: function () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LR_Desktop/QualityReport/GetFormData?keyValue=' + keyValue, function (data) {
$('#content').html('');
for (var i = 0; i < data.length; i++) {
var id = data[i].Id;
arr.push({ Id: id, Value: data[i].Value, Sort: data[i].Sort, ProjectId: data[i].ProjectId });
var html = '';
html += '<div class="col-xs-6 lr-form-item">';
html += '<div class="lr-form-item-title">计算项<font face="宋体">*</font></div>';
html += '<div id="pro' + id + '" readonly="readonly"></div>';
html += '</div>';
html += '<div class="col-xs-6 lr-form-item">';
html += '<div class="lr-form-item-title">值<font face="宋体">*</font></div>';
html +=
'<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>';
//if (data[i].CalName.indexOf('文字描述') != -1) {
// html +=
// '<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>';
//} else if (data[i].CalType != '变量') {
// html +=
// '<input id="' + id + '" type="text" class="form-control value" isvalid="yes" checkexpession="NotNull" readonly="readonly"/>';
//} else {
// html +=
// '<input id="' + id + '" type="number" class="form-control value" isvalid="yes" checkexpession="NotNull" />';
//}
html += '</div>';

$('#content').append(html);
$('#' + id).val(data[i].Value);
//CalType CalName
$('#pro' + id).lrDataSourceSelect({
code: 'CalculateProject',
value: 'id',
text: 'name'
});
$('#pro' + id).lrselectSet(data[i].ProjectId);
}
page.refreshRes();
});
}
},
refreshRes: function () {
//页面显示计算结果
var text = '';
arr.forEach(m => {
text += m.Value;
});
$('#result').html(text);
}
};
// 保存数据
acceptClick = function (callBack) {
if (!$('body').lrValidform()) {
return false;
}
console.log('save', arr);
//return;
var postData = {
list: arr //JSON.stringify($('body').lrGetFormData())
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/QualityReport/SaveList?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();
}
});
};
page.init();
}

+ 9
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.cshtml Просмотреть файл

@@ -1,5 +1,5 @@
@{
ViewBag.Title = "公式管理";
ViewBag.Title = "数据上报";
Layout = "~/Views/Shared/_Index.cshtml";
}
<div class="lr-layout " >
@@ -11,8 +11,12 @@
<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 class="lr-form-item-title">核心工作模块</div>
<input id="WorderModule" type="text" class="form-control" />
</div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">项目名称</div>
<input id="ProjectName" type="text" class="form-control" />
</div>
</div>
</div>
@@ -24,8 +28,8 @@
</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>&nbsp;填报</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看上报信息</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-trash-o"></i>&nbsp;提交</a>
@*<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></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>


+ 16
- 16
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js Просмотреть файл

@@ -2,7 +2,7 @@
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-22 11:07
* 描 述:公式管理
* 描 述:数据上报
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
@@ -119,20 +119,20 @@ var bootstrap = function ($, learun) {
});
}
},
{
label: "状态", name: "State", width: 150, align: "center",
formatter: function (cellvalue) {
if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">待设置填报人</span>';
} else if (cellvalue === 2) {
return '<span class=\"label label-success\">待设置公式</span>';
} else {
return '<span class=\"label label-default\">已完成</span>';
}
}
},
//{
// label: "状态", name: "State", width: 150, align: "center",
// formatter: function (cellvalue) {
// if (cellvalue === 0) {
// return '<span class=\"label label-warning\">草稿</span>';
// } else if (cellvalue === 1) {
// return '<span class=\"label label-success\">待设置填报人</span>';
// } else if (cellvalue === 2) {
// return '<span class=\"label label-success\">待设置公式</span>';
// } else {
// return '<span class=\"label label-default\">已完成</span>';
// }
// }
//},
{ label: "备注", name: "Demo", width: 300, align: "center" },
],
mainId: 'Id',
@@ -142,7 +142,7 @@ var bootstrap = function ($, learun) {
},
search: function (param) {
param = param || {};
//param.State = 3;
param.State = 3;
//param.FillingPeople = learun.clientdata.get(['userinfo']).userId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}


+ 38
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml Просмотреть файл

@@ -0,0 +1,38 @@
@{
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>
</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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_view" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;查看</a>
<a id="lr_submit" class="btn btn-default"><i class="fa fa-plus"></i>&nbsp;提交</a>
<a id="lr_delete" 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>
</div>
<div class="lr-layout-body" id="gridtable"></div>
</div>
</div>
</div>
@Html.AppendJsFile("/Areas/LR_Desktop/Views/QualityReport/IndexReport.js")

+ 152
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js Просмотреть файл

@@ -0,0 +1,152 @@
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn)
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司
* 创建人:超级管理员
* 日 期:2021-06-25 11:07
* 描 述:上报数据管理
*/
var refreshGirdData;
var bootstrap = function ($, learun) {
"use strict";
var page = {
init: function () {
page.initGird();
page.bind();
},
bind: function () {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 220, 400);
// 刷新
$('#lr_refresh').on('click', function () {
location.reload();
});
// 编辑
$('#lr_edit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('fid');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
url: top.$.rootUrl + '/LR_Desktop/QualityReport/Form?keyValue=' + keyValue,
width: 600,
height: 400,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
});
}
});
// 查看
$('#lr_view').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('fid');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '查看',
url: top.$.rootUrl + '/LR_Desktop/QualityReport/FormView?keyValue=' + keyValue,
width: 600,
height: 400,
btn: null
});
}
});

//提交
$('#lr_submit').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
return learun.alert.warning('该项已提交!');
}
learun.layerConfirm('是否确认提交该项!', function (res) {
if (res) {
learun.postForm(top.$.rootUrl + '/LR_Desktop/QualityReport/UpdateState', { keyValue: keyValue, Status: 1 }, function () {
refreshGirdData();
});
}
});
}
});

//删除
$('#lr_delete').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
var Status = $('#gridtable').jfGridValue('Status');
if (Status == 1) {
return learun.alert.warning('该项已提交,不可删除!');
}
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/LR_Desktop/QualityReport/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
});
}
});
// 打印
$('#lr_print').on('click', function () {
$('#gridtable').jqprintTable();
});
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_Desktop/QualityReport/GetPageList',
headData: [
{ label: "核心工作模块", name: "WorderModule", width: 300, align: "center" },
{ label: "项目名称", name: "ProjectName", width: 300, align: "center" },
{
label: "填报部门", name: "FillingDept", width: 100, align: "center",
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: "CreateUserName", width: 150, align: "center"
},
{
label: "公式计算结果", name: "Result", width: 150, align: "center"
},
{
label: "填报时间", name: "ReportTime", width: 150, align: "center"
},
{
label: "状态", name: "Status", width: 150, align: "center",
formatter: function (cellvalue) {
if (cellvalue === 0) {
return '<span class=\"label label-warning\">草稿</span>';
} else if (cellvalue === 1) {
return '<span class=\"label label-success\">完成</span>';
}
}
},
],
mainId: 'Id',
isPage: true
});
page.search();
},
search: function (param) {
param = param || {};
param.State = 3;
//param.FillingPeople = learun.clientdata.get(['userinfo']).userId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {
$('#gridtable').jfGridSet('reload');
};
page.init();
}

+ 5
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Form.js Просмотреть файл

@@ -6,7 +6,8 @@
*/
var acceptClick;
var keyValue = request('keyValue');
var PPId = request("PPId");
var PPId = request("PPId");//项目阶段id
var PId = request("PId");//项目Id
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -26,6 +27,9 @@ var bootstrap = function ($, learun) {
value: "Id",
text: "Name",
});
if (!!PId) {
$('#PId').lrselectSet(PId);
}
$('#PPId').lrselect({
type: 'tree',
// 展开最大高度
@@ -43,7 +47,6 @@ var bootstrap = function ($, learun) {
if (!!PPId) {
$('#PPId').lrselectSet(PPId);
}

$('#Files').lrUploader();
$('#DepartmentId').lrDepartmentSelect();
$('#ManagerId').lrUserSelect(0);


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectDataManage/Index.js Просмотреть файл

@@ -6,6 +6,7 @@
*/
var refreshGirdData;
var PPId;
var PId = request("PId");//项目Id
var bootstrap = function ($, learun) {
"use strict";
var page = {
@@ -33,7 +34,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({
id: 'ProjectDataManageform',
title: '新增',
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?PPId=' + PPId,
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Form?PPId=' + PPId + '&PId=' + PId,
width: 800,
height: 600,
callBack: function (id) {
@@ -125,6 +126,7 @@ var bootstrap = function ($, learun) {
search: function (param) {
param = param || {};
param.PPId = PPId;
param.PId = PId;
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Form.js Просмотреть файл

@@ -6,7 +6,7 @@
*/
var acceptClick;
var keyValue = request('keyValue');
var PTId = request("PTId");
var PTId = request("PTId");//项目类型id
var bootstrap = function ($, learun) {
"use strict";
var page = {


+ 11
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/ProjectManage/Index.js Просмотреть файл

@@ -72,6 +72,17 @@ var bootstrap = function ($, learun) {
});
//  上传项目资料
$('#lr_data').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'ProjectDataManageIndex',
title: '项目资料管理',
url: top.$.rootUrl + '/LogisticsManagement/ProjectDataManage/Index?PId=' + keyValue,
width: 1000,
height: 800,
btn: null
});
}
});
},
inittree: function () {


+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Learun.Application.Web.csproj Просмотреть файл

@@ -1295,7 +1295,9 @@
<Content Include="Areas\LR_Desktop\Views\DTSetting\PC\PcIndex.js" />
<Content Include="Areas\LR_Desktop\Views\FormulaMain\FormChild.js" />
<Content Include="Areas\LR_Desktop\Views\MessageRind\Form.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Form.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.js" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Index.js" />
<Content Include="Areas\LR_Desktop\Views\WeChatDevelop\Form.js" />
<Content Include="Areas\LR_Desktop\Views\WeChatDevelop\Index.js" />
@@ -7353,6 +7355,8 @@
<Content Include="Areas\LR_Desktop\Views\FormulaMain\FormChild.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Index.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\Form.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\IndexReport.cshtml" />
<Content Include="Areas\LR_Desktop\Views\QualityReport\FormView.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" />
<Content Include="Views\Login\Default-beifen.cshtml" />
<None Include="Properties\PublishProfiles\FolderProfile1.pubxml" />


+ 21
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildBLL.cs Просмотреть файл

@@ -189,6 +189,27 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}


public void UpdateState(string keyValue, int Status)
{
try
{
qualityReportChildService.UpdateState(keyValue, 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/LR_Desktop/QualityReportChild/QualityReportChildIBLL.cs Просмотреть файл

@@ -60,6 +60,12 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
/// <param name="keyValue"></param>
/// <param name="list"></param>
void SaveList(string keyValue, List<QualityReportChildEntity> list);
/// <summary>
/// 提交
/// </summary>
/// <param name="keyValue"></param>
/// <param name="Status"></param>
void UpdateState(string keyValue, int Status);

#endregion



+ 75
- 10
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildService.cs Просмотреть файл

@@ -164,6 +164,11 @@ where a.Id='{keyValue}' order by b.Sort";

int mouth = DateTime.Now.Month - 1;
var entity = this.BaseRepository("CollegeMIS").FindEntity<FillinFromEntity>(x => x.Id == keyValue);
if (string.IsNullOrEmpty(entity.Formula))
{
return "请先设置公式!";
}

if (entity.FillingCycle == "1")
{
//填报周期--月(每月)
@@ -220,12 +225,18 @@ where a.Id='{keyValue}' order by b.Sort";
        /// <param name="keyValue">主键</param>
public void DeleteEntity(string keyValue)
{
var db = this.BaseRepository("CollegeMIS").BeginTrans();
try
{
this.BaseRepository("CollegeMIS").Delete<QualityReportChildEntity>(t => t.Id == keyValue);
db.Delete<QualityReportMainEntity>(t => t.Id == keyValue);
var sql = $"delete from QualityReportChild where MainId='{keyValue}'";
db.ExecuteBySql(sql);

db.Commit();
}
catch (Exception ex)
{
db.Rollback();
if (ex is ExceptionEx)
{
throw;
@@ -282,9 +293,11 @@ where a.Id='{keyValue}' order by b.Sort";
{
if (!string.IsNullOrEmpty(keyValue))
{
var mainId = "";
list = list.OrderBy(x => x.Sort).ToList();
var projectIds = list.Select(x => x.ProjectId).ToList();
var gs = "";
var result = "";
var calculateProjectList = db.FindList<CalculateProjectEntity>(x => projectIds.Contains(x.Id));
foreach (var entity in list)
{
@@ -292,15 +305,14 @@ where a.Id='{keyValue}' order by b.Sort";
model = db.FindEntity<QualityReportChildEntity>(x => x.Id == entity.Id);
model.Value = entity.Value;
db.Update(model);
mainId = model.MainId;

//保存运算结果
//计算项目
var calculateProject = calculateProjectList.Where(x => x.Id == entity.ProjectId).FirstOrDefault();
if (calculateProject.Name.Contains("文字描述"))
{
gs += entity.Value;
}else if (calculateProject.Type == "变量")
if (calculateProject.Type == "变量")
{
var value=ToDecimal(entity.Value);
var value = ToDecimal(entity.Value);
if (value == 0)
{
gs += entity.Value;
@@ -309,12 +321,42 @@ where a.Id='{keyValue}' order by b.Sort";
{
gs += value;
}
//select convert(varchar,convert(decimal(18,0),(1/5)*100))+'%' as LT5
}
else
{
gs += entity.Value;
}


}

if (!string.IsNullOrEmpty(mainId))
{

//公式运算结果
if (list.Count == 1)
{
result = list.FirstOrDefault().Value;
}
else
{
gs = gs.Replace("(", "(").Replace(")", ")");
if (gs.Contains("%"))
{
gs = gs.Replace("%", "");
var dt = db.FindTable($"select convert(varchar,convert(decimal(18,0),{gs}))+'%' as num ");
result = dt.Rows[0][0].ToString();
}
else
{
var dt = db.FindTable($"select convert(varchar,convert(decimal(18,0),{gs})) as num ");
result = dt.Rows[0][0].ToString();
}
}
QualityReportMainEntity main = db.FindEntity<QualityReportMainEntity>(x => x.Id == mainId);
main.Result = result;
db.Update(main);
}
//公式运算结果
}
db.Commit();
}
@@ -332,6 +374,29 @@ where a.Id='{keyValue}' order by b.Sort";
}
}


public void UpdateState(string keyValue, int Status)
{
try
{
string sql = $"update QualityReportMain set [Status]='{Status}' where Id='{keyValue}'";
this.BaseRepository("CollegeMIS").ExecuteBySql(sql);

}
catch (Exception ex)
{
if (ex is ExceptionEx)
{
throw;
}
else
{
throw ExceptionEx.ThrowServiceException(ex);
}
}
}


#endregion
/// <summary>
///
@@ -341,7 +406,7 @@ where a.Id='{keyValue}' order by b.Sort";
{
try
{
return decimal.Round(Convert.ToDecimal(value),2);
return Convert.ToDecimal(Convert.ToDecimal(value).ToString("f2"));
}
catch
{


+ 20
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainEntity.cs Просмотреть файл

@@ -79,6 +79,26 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
#endregion
#region 扩展字段
/// <summary>
/// 核心模块
/// </summary>
[NotMapped]
public string WorderModule { get; set; }
/// <summary>
/// 项目名称
/// </summary>
[NotMapped]
public string ProjectName { get; set; }
/// <summary>
/// 部门
/// </summary>
[NotMapped]
public string FillingDept { get; set; }
/// <summary>
/// 项目表Id
/// </summary>
[NotMapped]
public string fid { get; set; }
#endregion
}
}

+ 3
- 6
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportMain/QualityReportMainService.cs Просмотреть файл

@@ -30,12 +30,9 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
try
{
var strSql = new StringBuilder();
strSql.Append("SELECT ");
strSql.Append(@"
                t.Id,
                t.FillinFromId
                ");
strSql.Append("  FROM QualityReportMain t ");
strSql.Append(@"select b.WorderModule,b.ProjectName,b.FillingDept,b.Id as fid,a.Id,a.ReportTime,a.Status,a.Result,a.CreateUserName from QualityReportMain a join FillinFrom b on a.FillinFromId=b.Id
");
strSql.Append("  WHERE 1=1 ");
var queryParam = queryJson.ToJObject();
// 虚拟参数


Загрузка…
Отмена
Сохранить