Quellcode durchsuchen

调整设置公式功能

金隅分支
zhangli vor 3 Jahren
Ursprung
Commit
b977a9377c
3 geänderte Dateien mit 5357 neuen und 3844 gelöschten Zeilen
  1. +26
    -32
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js
  2. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js
  3. +5328
    -3811
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM

+ 26
- 32
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/FormChild.js Datei anzeigen

@@ -37,9 +37,15 @@ var bootstrap = function ($, learun) {
var id = $(this).attr("id");
//删除当前行
$('#' + id).remove();
//从数组删除
//如果存在删除
removeByValue(arr, 'iid', id);
arr.forEach(item => {
if (item.iid == id) {
//如果存在删除
removeByValue(arr, 'iid', id);
}
});
////从数组删除
////如果存在删除
//removeByValue(arr, 'iid', id);

//重新排序并显示
arr.sort(sortBy("Sort"));
@@ -93,10 +99,13 @@ var bootstrap = function ($, learun) {
if (item) {
var id = $(this).attr('id');
var parId = id.replace('pro', '');
if (arr.indexOf(parId) != -1) {
//如果存在删除
removeByValue(arr, 'iid', parId);
}

arr.forEach(item => {
if (item.iid == parId) {
//如果存在删除
removeByValue(arr, 'iid', parId);
}
});
arr.push({ iid: parId, ProjectId: item.id, ProjectName: item.name, Sort: $('#Sort' + parId).val() });

arr.sort(sortBy("Sort"));
@@ -141,10 +150,12 @@ var bootstrap = function ($, learun) {
if (item) {
var id = $(this).attr('id');
var parId = id.replace('pro', '');
if (arr.indexOf(parId) != -1) {
//如果存在删除
removeByValue(arr, 'iid', parId);
}
arr.forEach(item => {
if (item.iid == parId) {
//如果存在删除
removeByValue(arr, 'iid', parId);
}
});
arr.push({ iid: parId, ProjectId: item.id, ProjectName: item.name, Sort: $('#Sort' + parId).val() });

arr.sort(sortBy("Sort"));
@@ -153,26 +164,6 @@ var bootstrap = function ($, learun) {
}
});

//$('#pro' + id).lrDataSourceSelect({
// code: 'CalculateProject',
// value: 'id',
// text: 'name',
// select:
// function (item) {
// if (item) {
// var id = $(this).attr('id');
// var parId = id.replace('pro', '');
// if (arr.indexOf(parId) != -1) {
// //如果存在删除
// removeByValue(arr, 'iid', parId);
// }
// arr.push({ iid: parId, ProjectId: item.id, ProjectName: item.name, Sort: $('#Sort' + parId).val() });

// arr.sort(sortBy("Sort"));
// page.refreshRes();
// }
// }
//});
},
refreshRes: function () {
//页面显示公式结果
@@ -189,7 +180,10 @@ var bootstrap = function ($, learun) {
return false;
}
var strEntity = JSON.stringify($('body').lrGetFormData());

if (arr.length == 0) {
return learun.alert.warning('请选择计算项目!');
}
var postData = {
//mainEntity: strEntity,
strEntity: arr


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_Desktop/Views/FormulaMain/Index.js Datei anzeigen

@@ -100,7 +100,9 @@ var bootstrap = function ($, learun) {
}
],
mainId: 'Id',
isPage: true
isPage: true,
sidx: 'Sort',
sord: 'ASC',
});
page.search();
},


+ 5328
- 3811
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/DBModel/资产系统.PDM
Datei-Diff unterdrückt, da er zu groß ist
Datei anzeigen


Laden…
Abbrechen
Speichern