Browse Source

表单管理添加where条件

新疆影视学院高职
ndbs 2 years ago
parent
commit
b2b2aa8e95
6 changed files with 48 additions and 37 deletions
  1. +4
    -0
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.cshtml
  2. +34
    -33
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.js
  3. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Index.js
  4. +0
    -1
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/PreviewIndex.js
  5. +6
    -0
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Relation/FormRelationEntity.cs
  6. +2
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Relation/FormRelationService.cs

+ 4
- 0
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.cshtml View File

@@ -63,6 +63,10 @@
<div class="lr-form-item-title">表单框高</div> <div class="lr-form-item-title">表单框高</div>
<input id="fromHeight" type="text" class="form-control" placeholder="请输入高" value="400" /> <input id="fromHeight" type="text" class="form-control" placeholder="请输入高" value="400" />
</div> </div>
<div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">请填写Sql语句<font face="宋体">*</font></div>
<textarea id="F_CloseDoSql" class="form-control" style="height: 60px" placeholder="请填写Sql语句" isvalid="yes" checkexpession="NotNull"></textarea>
</div>
<div class="col-xs-12 lr-form-item"> <div class="col-xs-12 lr-form-item">
<div class="lr-form-item-title">功能描述</div> <div class="lr-form-item-title">功能描述</div>
<textarea id="F_Description" class="form-control" style="height: 140px;"></textarea> <textarea id="F_Description" class="form-control" style="height: 140px;"></textarea>


+ 34
- 33
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Form.js View File

@@ -10,7 +10,7 @@ var tableFields = {}; // 用来缓存数据表字段
var formscheme; var formscheme;
var setFormId = ""; var setFormId = "";
var formFields = []; var formFields = [];
var F_CloseDoSql = "";
var queryData = []; var queryData = [];
var colData = []; var colData = [];


@@ -89,7 +89,7 @@ var bootstrap = function ($, learun) {


} }




} else if (data.step == 2) { } else if (data.step == 2) {
$finish.removeAttr('disabled'); $finish.removeAttr('disabled');
@@ -421,47 +421,48 @@ var bootstrap = function ($, learun) {
var relation = { var relation = {
F_ModuleId: formdata.F_ModuleId, F_ModuleId: formdata.F_ModuleId,
F_FormId: formdata.F_FormId, F_FormId: formdata.F_FormId,
F_CloseDoSql: formdata.F_CloseDoSql,
F_SettingJson: JSON.stringify(settingJson) F_SettingJson: JSON.stringify(settingJson)
} }
var tableIndex = 0; var tableIndex = 0;
var tableMap = {}; var tableMap = {};
var compontsMap = {}; var compontsMap = {};
for (var i = 0, l = formscheme.data.length; i < l; i++) {
var componts = formscheme.data[i].componts;
for (var j = 0, jl = componts.length; j < jl; j++) {
var item = componts[j];
compontsMap[item.id] = item;
if (!!item.table && tableMap[item.table] == undefined) {
tableMap[item.table] = tableIndex;
tableIndex++;
for (var i = 0, l = formscheme.data.length; i < l; i++) {
var componts = formscheme.data[i].componts;
for (var j = 0, jl = componts.length; j < jl; j++) {
var item = componts[j];
compontsMap[item.id] = item;
if (!!item.table && tableMap[item.table] == undefined) {
tableMap[item.table] = tableIndex;
tableIndex++;
}
} }
} }
}


// 列表设置
var moduleColumn = [];
for (var i = 0, l = colData.length; i < l; i++) {
var code = colData[i].fieldId + tableMap[compontsMap[colData[i].compontId].table];
var point = { F_ModuleColumnId: learun.newGuid(), F_FullName: colData[i].fieldName, F_EnCode: code.toLowerCase() };
moduleColumn.push(point);
}
// 列表设置
var moduleColumn = [];
for (var i = 0, l = colData.length; i < l; i++) {
var code = colData[i].fieldId + tableMap[compontsMap[colData[i].compontId].table];
var point = { F_ModuleColumnId: learun.newGuid(), F_FullName: colData[i].fieldName, F_EnCode: code.toLowerCase() };
moduleColumn.push(point);
}




// 提交数据
var postData = {
relationJson:JSON.stringify(relation),
moduleJson: JSON.stringify(formdata),
moduleColumnJson: JSON.stringify(moduleColumn),
moduleFormJson: JSON.stringify(moduleForm)
// 提交数据
var postData = {
relationJson:JSON.stringify(relation),
moduleJson: JSON.stringify(formdata),
moduleColumnJson: JSON.stringify(moduleColumn),
moduleFormJson: JSON.stringify(moduleForm)
}; };


$.lrSaveForm(top.$.rootUrl + '/LR_FormModule/FormRelation/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
learun.frameTab.currentIframe().refreshGirdData();
});
}
};


page.init();
}
$.lrSaveForm(top.$.rootUrl + '/LR_FormModule/FormRelation/SaveForm?keyValue=' + keyValue, postData, function (res) {
// 保存成功后才回调
learun.frameTab.currentIframe().refreshGirdData();
});
}
};

page.init();
}

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/Index.js View File

@@ -30,7 +30,7 @@ var bootstrap = function ($, learun) {
title: '发布表单功能', title: '发布表单功能',
url: top.$.rootUrl + '/LR_FormModule/FormRelation/Form', url: top.$.rootUrl + '/LR_FormModule/FormRelation/Form',
width: 700, width: 700,
height: 500,
height: 700,
btn: null btn: null
}); });
}); });
@@ -45,7 +45,7 @@ var bootstrap = function ($, learun) {
title: '编辑表单功能', title: '编辑表单功能',
url: top.$.rootUrl + '/LR_FormModule/FormRelation/Form?keyValue=' + keyValue, url: top.$.rootUrl + '/LR_FormModule/FormRelation/Form?keyValue=' + keyValue,
width: 700, width: 700,
height: 500,
height: 700,
btn: null btn: null
}); });
} }


+ 0
- 1
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LR_FormModule/Views/FormRelation/PreviewIndex.js View File

@@ -12,7 +12,6 @@ var refreshGirdData; // 更新数据
var formScheme; var formScheme;
var settingJson; var settingJson;
var relation; var relation;

var mainTablePk = ""; var mainTablePk = "";
var mainTable = ""; var mainTable = "";
var mainCompontId = ""; var mainCompontId = "";


+ 6
- 0
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Relation/FormRelationEntity.cs View File

@@ -70,6 +70,12 @@ namespace Learun.Application.Form
/// </summary> /// </summary>
[Column("F_SETTINGJSON")] [Column("F_SETTINGJSON")]
public string F_SettingJson { get; set; } public string F_SettingJson { get; set; }
/// <summary>
/// 执行sql
/// </summary>
[Column("F_CLOSEDOSQL")]
public string F_CloseDoSql { get; set; }

#endregion #endregion


#region 扩展操作 #region 扩展操作


+ 2
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.Form/Relation/FormRelationService.cs View File

@@ -26,7 +26,8 @@ namespace Learun.Application.Form
t.F_CreateUserName, t.F_CreateUserName,
t.F_ModifyDate, t.F_ModifyDate,
t.F_ModifyUserId, t.F_ModifyUserId,
t.F_ModifyUserName
t.F_ModifyUserName,
t.F_CloseDoSql
"; ";
} }
#endregion #endregion


Loading…
Cancel
Save