Explorar el Código

已上报数据调整

金隅分支
zhangli hace 3 años
padre
commit
7a639fbe8d
Se han modificado 8 ficheros con 85 adiciones y 21 borrados
  1. +12
    -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. +5
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.js
  4. +14
    -14
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js
  5. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml
  6. +36
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js
  7. +1
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildBLL.cs
  8. +12
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildService.cs

+ 12
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/QualityReportController.cs Ver fichero

@@ -145,6 +145,18 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers

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 Ver fichero

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


+ 5
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Form.js Ver fichero

@@ -35,7 +35,7 @@ var bootstrap = function ($, learun) {
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;
@@ -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())
};


+ 14
- 14
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/Index.js Ver fichero

@@ -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',


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.cshtml Ver fichero

@@ -23,8 +23,10 @@
<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-trash-o"></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>


+ 36
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/QualityReport/IndexReport.js Ver fichero

@@ -20,6 +20,23 @@ var bootstrap = function ($, learun) {
$('#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');
@@ -52,6 +69,25 @@ var bootstrap = function ($, learun) {
});
}
});

//删除
$('#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();


+ 1
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildBLL.cs Ver fichero

@@ -209,6 +209,7 @@ namespace Learun.Application.TwoDevelopment.LR_Desktop
}
}

#endregion

}

+ 12
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LR_Desktop/QualityReportChild/QualityReportChildService.cs Ver fichero

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


Cargando…
Cancelar
Guardar