Sfoglia il codice sorgente

公式管理

金隅分支
zhangli 3 anni fa
parent
commit
a637aebce4
5 ha cambiato i file con 15 aggiunte e 19 eliminazioni
  1. +2
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaChildController.cs
  2. +2
    -3
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Index.js
  3. +3
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js
  4. +1
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.cshtml
  5. +7
    -8
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js

+ 2
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Controllers/FormulaChildController.cs Vedi File

@@ -113,10 +113,9 @@ namespace Learun.Application.Web.Areas.LR_Desktop.Controllers
[HttpPost]
[ValidateAntiForgeryToken]
[AjaxOnly]
public ActionResult SaveList(string mainEntity, List<FormulaChildEntity> strEntity)
public ActionResult SaveList(string MainId, List<FormulaChildEntity> strEntity)
{
FormulaChildEntity model = mainEntity.ToObject<FormulaChildEntity>();
formulaChildIBLL.SaveList(model.MainId, strEntity);
formulaChildIBLL.SaveList(MainId, strEntity);
return Success("保存成功!");
}
#endregion


+ 2
- 3
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/CalculateProject/Index.js Vedi File

@@ -86,10 +86,9 @@ var bootstrap = function ($, learun) {
}},
{ label: "值", name: "Value", width: 100, align: "left"},
{ label: "排序", name: "Sort", width: 100, align: "left"},
{ label: "状态", name: "IsEnable", width: 100, align: "left",
{ label: "是否启用", name: "IsEnable", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 0 ? "<span class=\"label label-danger\">禁用</span>" : "<span class=\"label label-success\">启用</span>";

return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}},
],
mainId:'Id',


+ 3
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js Vedi File

@@ -19,7 +19,7 @@ var bootstrap = function ($, learun) {
bind: function () {
$('#MainId').lrDataSourceSelect({ code: 'FormulaMain', value: 'id', text: 'name' });
$('#ProjectId').lrDataSourceSelect({ code: 'CalculateProject', value: 'id', text: 'name' });
$('#MainId').lrselectSet(keyValue);
// 新增
$('#lr_add').on('click', function () {
page.addcontent();
@@ -61,7 +61,6 @@ var bootstrap = function ($, learun) {
$('#content1').html('');
var html = '';
if (data) {
$('#MainId').lrselectSet(data[0].MainId);
for (var i = 0; i < data.length; i++) {
var id = learun.newGuid();
var html = '';
@@ -161,10 +160,10 @@ var bootstrap = function ($, learun) {
var strEntity = JSON.stringify($('body').lrGetFormData());

var postData = {
mainEntity: strEntity,
//mainEntity: strEntity,
strEntity: arr
};
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/FormulaChild/SaveList', postData, function (res) {
$.lrSaveForm(top.$.rootUrl + '/LR_Desktop/FormulaChild/SaveList?MainId=' + keyValue, postData, function (res) {
// 保存成功后才回调
if (!!callBack) {
callBack();


+ 1
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.cshtml Vedi File

@@ -25,7 +25,7 @@
<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_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑</a>
<a id="lr_editgs" class="btn btn-default"><i class="fa fa-pencil-square-o"></i>&nbsp;编辑公式</a>
<a id="lr_editgs" 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_print" class="btn btn-default"><i class="fa fa-print"></i>&nbsp;打印</a>
</div>


+ 7
- 8
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js Vedi File

@@ -49,13 +49,13 @@ var bootstrap = function ($, learun) {
});
}
});
// 编辑公式
// 设置公式
$('#lr_editgs').on('click', function () {
var keyValue = $('#gridtable').jfGridValue('Id');
if (learun.checkrow(keyValue)) {
learun.layerForm({
id: 'form',
title: '编辑',
title: '设置公式',
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/FormChild?keyValue=' + keyValue,
width: 600,
height: 500,
@@ -88,17 +88,16 @@ var bootstrap = function ($, learun) {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LR_Desktop/FormulaMain/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 100, align: "left" },
{ label: "名称", name: "Name", width: 150, align: "left" },
{ label: "公式", name: "Result", width: 250, align: "left" },
{ label: "排序", name: "Sort", width: 100, align: "left" },
{ label: "描述", name: "Desc", width: 200, align: "left" },
{
label: "状态", name: "IsEnable", width: 100, align: "left",
formatter: function (cellvalue) {
return cellvalue == 0 ? "<span class=\"label label-danger\">禁用</span>" : "<span class=\"label label-success\">启用</span>";

return cellvalue == 1 ? "<i class=\"fa fa-toggle-on\"></i>" : "<i class=\"fa fa-toggle-off\"></i>";
}
},
{ label: "公式", name: "Result", width: 250, align: "left" },
{ label: "描述", name: "Desc", width: 100, align: "left" }
}
],
mainId: 'Id',
isPage: true


Caricamento…
Annulla
Salva