@@ -83,6 +83,15 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -166,19 +175,19 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Notice_Train_SportsEntity entity = strEntity.ToObject<Notice_Train_SportsEntity>(); | |||
entity.Type = "4"; | |||
notice_Train_SportsIBLL.SaveEntity(keyValue,entity); | |||
if (keyValue != null) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
//[HttpPost] | |||
//[ValidateAntiForgeryToken] | |||
//[AjaxOnly] | |||
//public ActionResult SaveForm(string keyValue, string strEntity) | |||
//{ | |||
// Notice_Train_SportsEntity entity = strEntity.ToObject<Notice_Train_SportsEntity>(); | |||
// entity.Type = "4"; | |||
// notice_Train_SportsIBLL.SaveEntity(keyValue,entity); | |||
// if (keyValue != null) | |||
// { | |||
// } | |||
// return Success("保存成功!"); | |||
//} | |||
#endregion | |||
#region 扩展数据 | |||
@@ -244,11 +253,27 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
#region 消息推送处理 | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost, ValidateAntiForgeryToken, AjaxOnly, ValidateInput(false)] | |||
public ActionResult SaveFormAndSubmit(string keyValue, Notice_Train_SportsEntity entity) | |||
public ActionResult SaveForm(string keyValue, Notice_Train_SportsEntity entity) | |||
{ | |||
entity.Type = "4"; | |||
entity.Status = 0; | |||
notice_Train_SportsIBLL.SaveEntity(keyValue, entity); | |||
if (keyValue != null) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
public ActionResult SaveFormAndSubmit(string keyValue) | |||
{ | |||
entity.Type = "1"; | |||
entity.T_Content = WebHelper.HtmlEncode(entity.T_Content); | |||
Notice_Train_SportsEntity entity = notice_Train_SportsIBLL.GetNotice_Train_SportsEntity(keyValue); | |||
entity.Status = 1; | |||
notice_Train_SportsIBLL.SaveEntity(keyValue, entity); | |||
//推送通知 | |||
//读取信息推送管理-通知公告推送(01)的配置 | |||
@@ -52,6 +52,15 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -117,13 +126,11 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
[HttpPost, ValidateAntiForgeryToken, AjaxOnly, ValidateInput(false)] | |||
public ActionResult SaveForm(string keyValue, Notice_Train_SportsEntity entity) | |||
{ | |||
Notice_Train_SportsEntity entity = strEntity.ToObject<Notice_Train_SportsEntity>(); | |||
entity.Type = "2"; | |||
entity.Status = 0; | |||
notice_Train_CoachIBLL.SaveEntity(keyValue,entity); | |||
if (keyValue != null) | |||
{ | |||
@@ -132,11 +139,11 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
} | |||
#endregion | |||
[HttpPost, ValidateAntiForgeryToken, AjaxOnly, ValidateInput(false)] | |||
public ActionResult SaveFormAndSubmit(string keyValue, Notice_Train_SportsEntity entity) | |||
public ActionResult SaveFormAndSubmit(string keyValue) | |||
{ | |||
entity.Type = "2"; | |||
entity.T_Content = WebHelper.HtmlEncode(entity.T_Content); | |||
Notice_Train_SportsEntity entity = notice_Train_CoachIBLL.GetNotice_Train_SportsEntity(keyValue); | |||
entity.Status = 1; | |||
notice_Train_CoachIBLL.SaveEntity(keyValue, entity); | |||
//推送通知 | |||
//读取信息推送管理-通知公告推送(01)的配置 | |||
@@ -83,6 +83,15 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -166,19 +175,19 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
{ | |||
Notice_Train_SportsEntity entity = strEntity.ToObject<Notice_Train_SportsEntity>(); | |||
entity.Type = "1"; | |||
notice_Train_SportsIBLL.SaveEntity(keyValue,entity); | |||
if (keyValue != null) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
//[HttpPost] | |||
//[ValidateAntiForgeryToken] | |||
//[AjaxOnly] | |||
//public ActionResult SaveForm(string keyValue, string strEntity) | |||
//{ | |||
// Notice_Train_SportsEntity entity = strEntity.ToObject<Notice_Train_SportsEntity>(); | |||
// entity.Type = "1"; | |||
// notice_Train_SportsIBLL.SaveEntity(keyValue,entity); | |||
// if (keyValue != null) | |||
// { | |||
// } | |||
// return Success("保存成功!"); | |||
//} | |||
#endregion | |||
#region 扩展数据 | |||
@@ -244,11 +253,27 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
#region 消息推送处理 | |||
/// <summary> | |||
/// 保存实体数据(新增、修改) | |||
/// </summary> | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost, ValidateAntiForgeryToken, AjaxOnly, ValidateInput(false)] | |||
public ActionResult SaveFormAndSubmit(string keyValue, Notice_Train_SportsEntity entity) | |||
public ActionResult SaveForm(string keyValue, Notice_Train_SportsEntity entity) | |||
{ | |||
entity.Type = "1"; | |||
entity.T_Content = WebHelper.HtmlEncode(entity.T_Content); | |||
entity.Status = 0; | |||
notice_Train_SportsIBLL.SaveEntity(keyValue, entity); | |||
if (keyValue != null) | |||
{ | |||
} | |||
return Success("保存成功!"); | |||
} | |||
public ActionResult SaveFormAndSubmit(string keyValue) | |||
{ | |||
Notice_Train_SportsEntity entity = notice_Train_SportsIBLL.GetNotice_Train_SportsEntity(keyValue); | |||
entity.Status = 1; | |||
notice_Train_SportsIBLL.SaveEntity(keyValue, entity); | |||
//推送通知 | |||
//读取信息推送管理-通知公告推送(01)的配置 | |||
@@ -37,6 +37,15 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -52,6 +52,15 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
{ | |||
return View(); | |||
} | |||
/// <summary> | |||
/// 表单页 | |||
/// <summary> | |||
/// <returns></returns> | |||
[HttpGet] | |||
public ActionResult FormView() | |||
{ | |||
return View(); | |||
} | |||
#endregion | |||
#region 获取数据 | |||
@@ -117,13 +126,24 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
/// <param name="keyValue">主键</param> | |||
/// <param name="strEntity">实体</param> | |||
/// <returns></returns> | |||
[HttpPost] | |||
[ValidateAntiForgeryToken] | |||
[AjaxOnly] | |||
public ActionResult SaveForm(string keyValue, string strEntity) | |||
//[HttpPost] | |||
//[ValidateAntiForgeryToken] | |||
//[AjaxOnly] | |||
//public ActionResult SaveForm(string keyValue, string strEntity) | |||
//{ | |||
// Notice_Train_SportsEntity entity = strEntity.ToObject<Notice_Train_SportsEntity>(); | |||
// notice_compare_TeamsIBLL.SaveEntity(keyValue,entity); | |||
// if (keyValue != null) | |||
// { | |||
// } | |||
// return Success("保存成功!"); | |||
//} | |||
[HttpPost, ValidateAntiForgeryToken, AjaxOnly, ValidateInput(false)] | |||
public ActionResult SaveForm(string keyValue, Notice_Train_SportsEntity entity) | |||
{ | |||
Notice_Train_SportsEntity entity = strEntity.ToObject<Notice_Train_SportsEntity>(); | |||
notice_compare_TeamsIBLL.SaveEntity(keyValue,entity); | |||
entity.Type = "3"; | |||
entity.Status = 0; | |||
notice_compare_TeamsIBLL.SaveEntity(keyValue, entity); | |||
if (keyValue != null) | |||
{ | |||
} | |||
@@ -131,11 +151,10 @@ namespace Learun.Application.Web.Areas.Ask.Controllers | |||
} | |||
#endregion | |||
[HttpPost, ValidateAntiForgeryToken, AjaxOnly, ValidateInput(false)] | |||
public ActionResult SaveFormAndSubmit(string keyValue, Notice_Train_SportsEntity entity) | |||
public ActionResult SaveFormAndSubmit(string keyValue) | |||
{ | |||
entity.Type = "3"; | |||
entity.T_Content = WebHelper.HtmlEncode(entity.T_Content); | |||
Notice_Train_SportsEntity entity = notice_compare_TeamsIBLL.GetNotice_Train_SportsEntity(keyValue); | |||
entity.Status = 1; | |||
notice_compare_TeamsIBLL.SaveEntity(keyValue, entity); | |||
//推送通知 | |||
//读取信息推送管理-通知公告推送(01)的配置 | |||
@@ -50,4 +50,4 @@ | |||
</script>*@ | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Sports/Form.js") | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_TrainTeam/Form.js") |
@@ -18,7 +18,7 @@ | |||
// }, | |||
// initData: function () { | |||
// if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/GetFormData?keyValue=' + keyValue, function (data) { | |||
// $.lrSetForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
@@ -39,7 +39,7 @@ | |||
// var postData = { | |||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||
// }; | |||
// $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
@@ -62,7 +62,7 @@ var bootstrap = function ($, learun) { | |||
bind: function () { | |||
//公告类别 | |||
$('#T_typename').lrDataItemSelect({ | |||
code: 'Notice_Train_Sports', maxHeight: 230, select: function (item) { | |||
code: 'Notice_Train_Teams', maxHeight: 230, select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#T_type").val(item.text); | |||
} | |||
@@ -79,7 +79,7 @@ var bootstrap = function ($, learun) { | |||
if (!!keyValue) { | |||
//$('#form').lrSetFormData(selectedRow); | |||
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); | |||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/GetFormData?keyValue=' + keyValue, function (data) { | |||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/GetFormData?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
setTimeout(function () { | |||
ue.setContent(data.T_Content); | |||
@@ -94,7 +94,7 @@ var bootstrap = function ($, learun) { | |||
} | |||
learun.clientdata.getAsync('dataItem', { | |||
key: $("#T_typename").lrselectGet(), | |||
code: 'Notice_Train_Sports', | |||
code: 'Notice_Train_Teams', | |||
callback: function (_data) { | |||
$("#T_type").val(_data.text); | |||
@@ -103,7 +103,7 @@ var bootstrap = function ($, learun) { | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
@@ -0,0 +1,53 @@ | |||
@{ | |||
ViewBag.Title = "运动员集训安排"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sports" > | |||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div>*@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | |||
<div id="T_typename" isvalid="yes" checkexpession="NotNull" disabled></div> | |||
<input type="hidden" id="T_type" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div> | |||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" data-dateFmt="yyyy-MM-dd hh:mm:ss" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">信息来源</div> | |||
<input id="Source" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">来源地址</div> | |||
<input id="SourceUrl" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="Noticedept" disabled></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<div id="Noticepeople"></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Files" disabled></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告内容</div> | |||
<div id="editor" style="height:300px;" disabled></div> | |||
@*<script id="editor" type="text/plain" style="height:270px;"> | |||
</script>*@ | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_TrainTeam/FormView.js") |
@@ -0,0 +1,116 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-12 10:31 | |||
* 描 述:运动员集训安排 | |||
*/ | |||
//var acceptClick; | |||
//var keyValue = request('keyValue'); | |||
//var bootstrap = function ($, learun) { | |||
// "use strict"; | |||
// var page = { | |||
// init: function () { | |||
// $('.lr-form-wrap').lrscroll(); | |||
// page.bind(); | |||
// page.initData(); | |||
// }, | |||
// bind: function () { | |||
// }, | |||
// initData: function () { | |||
// if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
// } | |||
// else { | |||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
// } | |||
// } | |||
// }); | |||
// } | |||
// } | |||
// }; | |||
// // 保存数据 | |||
// acceptClick = function (callBack) { | |||
// if (!$('body').lrValidform()) { | |||
// return false; | |||
// } | |||
// var postData = { | |||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||
// }; | |||
// $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }); | |||
// }; | |||
// page.init(); | |||
//} | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var ue; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//公告类别 | |||
$('#T_typename').lrDataItemSelect({ | |||
code: 'Notice_Train_Teams', maxHeight: 230, select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#T_type").val(item.text); | |||
} | |||
} | |||
}); | |||
$('#Noticepeople').lrUserSelect(1); | |||
$('#Files').lrUploader({ isUpload: false }); | |||
$('#Noticedept').lrDepartmentSelect({ type: 'treemultiple' }); | |||
$('#Noticepeople').lrDataItemSelect({ code: '' }); | |||
//内容编辑器 | |||
ue = UE.getEditor('editor'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
//$('#form').lrSetFormData(selectedRow); | |||
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); | |||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/GetFormData?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
setTimeout(function () { | |||
ue.setContent(data.T_Content); | |||
}, 100); | |||
}); | |||
} | |||
} | |||
}; | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
learun.clientdata.getAsync('dataItem', { | |||
key: $("#T_typename").lrselectGet(), | |||
code: 'Notice_Train_Teams', | |||
callback: function (_data) { | |||
$("#T_type").val(_data.text); | |||
var postData = $('#form').lrGetFormData(keyValue); | |||
postData["T_Content"] = ue.getContent(null, null, true); | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
page.init(); | |||
} |
@@ -18,10 +18,12 @@ | |||
<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"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr-look" class="btn btn-default"><i class="fa fa-trash-o"></i> 查看</a> | |||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-trash-o"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -29,4 +31,4 @@ | |||
</div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Sports/Index.js") | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_TrainTeam/Index.js") |
@@ -5,6 +5,7 @@ | |||
* 描 述:运动员集训安排 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -27,7 +28,7 @@ var bootstrap = function ($, learun) { | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '新增', | |||
url: top.$.rootUrl + '/Ask/Notice_Train_Sports/Form', | |||
url: top.$.rootUrl + '/Ask/Notice_TrainTeam/Form', | |||
width: 1000, | |||
height: 650, | |||
callBack: function (id) { | |||
@@ -38,11 +39,16 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
url: top.$.rootUrl + '/Ask/Notice_Train_Sports/Form?keyValue=' + keyValue, | |||
url: top.$.rootUrl + '/Ask/Notice_TrainTeam/Form?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 650, | |||
callBack: function (id) { | |||
@@ -54,21 +60,65 @@ var bootstrap = function ($, learun) { | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/DeleteForm', { keyValue: keyValue}, function () { | |||
learun.deleteForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/DeleteForm', { keyValue: keyValue}, function () { | |||
refreshGirdData(); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr-sub').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status > 0) { | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/Ask/Notice_TrainTeam/SaveFormAndSubmit', { keyValue: keyValue, status: 1 }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr-look').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/Ask/Notice_TrainTeam/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
$('#gridtable').jfGrid({ | |||
url: top.$.rootUrl + '/Ask/Notice_Train_Sports/GetPageList', | |||
url: top.$.rootUrl + '/Ask/Notice_TrainTeam/GetPageList', | |||
headData: [ | |||
{ label: "标题", name: "T_title", width: 100, align: "left" }, | |||
{ label: "类别", name: "T_type", width: 100, align: "left" }, | |||
@@ -91,6 +141,16 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-danger\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
//{ label: "附件上传", name: "Files", width: 100, align: "left"}, | |||
//{ label: "内容", name: "T_Content", width: 100, align: "left" }, | |||
], | |||
@@ -102,7 +102,7 @@ var bootstrap = function ($, learun) { | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
@@ -0,0 +1,53 @@ | |||
@{ | |||
ViewBag.Title = "教练员培训"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Coach" > | |||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div>*@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | |||
<div id="T_typename" isvalid="yes" checkexpession="NotNull" disabled></div> | |||
<input type="hidden" id="T_type" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div> | |||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" data-dateFmt="yyyy-MM-dd hh:mm:ss" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">信息来源</div> | |||
<input id="Source" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">来源地址</div> | |||
<input id="SourceUrl" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="Noticedept" disabled></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<div id="Noticepeople" disabled></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Files" disabled></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告内容</div> | |||
<div id="editor" style="height:300px;" disabled></div> | |||
@*<script id="editor" type="text/plain" style="height:270px;"> | |||
</script>*@ | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Coach/FormView.js") |
@@ -0,0 +1,115 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-12 04:42 | |||
* 描 述:教练员培训 | |||
*/ | |||
//var acceptClick; | |||
//var keyValue = request('keyValue'); | |||
//var bootstrap = function ($, learun) { | |||
// "use strict"; | |||
// var page = { | |||
// init: function () { | |||
// $('.lr-form-wrap').lrscroll(); | |||
// page.bind(); | |||
// page.initData(); | |||
// }, | |||
// bind: function () { | |||
// }, | |||
// initData: function () { | |||
// if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
// } | |||
// else { | |||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
// } | |||
// } | |||
// }); | |||
// } | |||
// } | |||
// }; | |||
// // 保存数据 | |||
// acceptClick = function (callBack) { | |||
// if (!$('body').lrValidform()) { | |||
// return false; | |||
// } | |||
// var postData = { | |||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||
// }; | |||
// $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }); | |||
// }; | |||
// page.init(); | |||
//} | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var ue; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//公告类别 | |||
$('#T_typename').lrDataItemSelect({ | |||
code: 'Notice_Train_Coach', maxHeight: 230, select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#T_type").val(item.text); | |||
} | |||
} | |||
}); | |||
$('#Noticepeople').lrUserSelect(1); | |||
$('#Files').lrUploader({ isUpload: false }); | |||
$('#Noticedept').lrDepartmentSelect({ type: 'treemultiple' }); | |||
//内容编辑器jiushi | |||
ue = UE.getEditor('editor'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
//$('#form').lrSetFormData(selectedRow); | |||
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); | |||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/GetFormData?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
setTimeout(function () { | |||
ue.setContent(data.T_Content); | |||
}, 100); | |||
}); | |||
} | |||
} | |||
}; | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
learun.clientdata.getAsync('dataItem', { | |||
key: $("#T_typename").lrselectGet(), | |||
code: 'Notice_Train_Coach', | |||
callback: function (_data) { | |||
$("#T_type").val(_data.text); | |||
var postData = $('#form').lrGetFormData(keyValue); | |||
postData["T_Content"] = ue.getContent(null, null, true); | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
page.init(); | |||
} |
@@ -18,10 +18,12 @@ | |||
<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"> | |||
<div class=" btn-group btn-group-sm" > | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr-look" class="btn btn-default"><i class="fa fa-trash-o"></i> 查看</a> | |||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-trash-o"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -5,6 +5,7 @@ | |||
* 描 述:教练员培训 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -38,7 +39,12 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -54,7 +60,12 @@ var bootstrap = function ($, learun) { | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/DeleteForm', { keyValue: keyValue}, function () { | |||
@@ -64,6 +75,45 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr-sub').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status > 0) { | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/Ask/Notice_Train_Coach/SaveFormAndSubmit', { keyValue: keyValue, status: 1 }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr-look').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/Ask/Notice_Train_Coach/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -91,7 +141,16 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
//{ label: "附件上传", name: "Files", width: 100, align: "left"}, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-danger\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
//{ label: "内容", name: "T_Content", width: 100, align: "left" }, | |||
], | |||
mainId: 'T_id', | |||
@@ -103,7 +103,7 @@ var bootstrap = function ($, learun) { | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
@@ -0,0 +1,53 @@ | |||
@{ | |||
ViewBag.Title = "运动员集训安排"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sports" > | |||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div>*@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | |||
<div id="T_typename" isvalid="yes" checkexpession="NotNull" disabled></div> | |||
<input type="hidden" id="T_type" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div> | |||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy/MM/dd HH:mm' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy/MM/dd HH:mm")" data-dateFmt="yyyy-MM-dd hh:mm:ss" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">信息来源</div> | |||
<input id="Source" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">来源地址</div> | |||
<input id="SourceUrl" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="Noticedept" disabled></div> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">接收人</div> | |||
<div id="Noticepeople" disabled></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Files" disabled></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告内容</div> | |||
<div id="editor" style="height:300px;" disabled></div> | |||
@*<script id="editor" type="text/plain" style="height:270px;"> | |||
</script>*@ | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Sports/FormView.js") |
@@ -0,0 +1,116 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-12 10:31 | |||
* 描 述:运动员集训安排 | |||
*/ | |||
//var acceptClick; | |||
//var keyValue = request('keyValue'); | |||
//var bootstrap = function ($, learun) { | |||
// "use strict"; | |||
// var page = { | |||
// init: function () { | |||
// $('.lr-form-wrap').lrscroll(); | |||
// page.bind(); | |||
// page.initData(); | |||
// }, | |||
// bind: function () { | |||
// }, | |||
// initData: function () { | |||
// if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
// } | |||
// else { | |||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
// } | |||
// } | |||
// }); | |||
// } | |||
// } | |||
// }; | |||
// // 保存数据 | |||
// acceptClick = function (callBack) { | |||
// if (!$('body').lrValidform()) { | |||
// return false; | |||
// } | |||
// var postData = { | |||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||
// }; | |||
// $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }); | |||
// }; | |||
// page.init(); | |||
//} | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var ue; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//公告类别 | |||
$('#T_typename').lrDataItemSelect({ | |||
code: 'Notice_Train_Sports', maxHeight: 230, select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#T_type").val(item.text); | |||
} | |||
} | |||
}); | |||
$('#Noticepeople').lrUserSelect(1); | |||
$('#Files').lrUploader({ isUpload: false }); | |||
$('#Noticedept').lrDepartmentSelect({ type: 'treemultiple' }); | |||
$('#Noticepeople').lrDataItemSelect({ code: '' }); | |||
//内容编辑器 | |||
ue = UE.getEditor('editor'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
//$('#form').lrSetFormData(selectedRow); | |||
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); | |||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/GetFormData?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
setTimeout(function () { | |||
ue.setContent(data.T_Content); | |||
}, 100); | |||
}); | |||
} | |||
} | |||
}; | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
learun.clientdata.getAsync('dataItem', { | |||
key: $("#T_typename").lrselectGet(), | |||
code: 'Notice_Train_Sports', | |||
callback: function (_data) { | |||
$("#T_type").val(_data.text); | |||
var postData = $('#form').lrGetFormData(keyValue); | |||
postData["T_Content"] = ue.getContent(null, null, true); | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
page.init(); | |||
} |
@@ -18,10 +18,12 @@ | |||
<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"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr-look" class="btn btn-default"><i class="fa fa-trash-o"></i> 查看</a> | |||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-trash-o"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -5,6 +5,7 @@ | |||
* 描 述:运动员集训安排 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -38,7 +39,12 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -54,7 +60,12 @@ var bootstrap = function ($, learun) { | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/DeleteForm', { keyValue: keyValue}, function () { | |||
@@ -64,6 +75,45 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr-sub').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status > 0) { | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/Ask/Notice_Train_Sports/SaveFormAndSubmit', { keyValue: keyValue, status: 1 }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr-look').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/Ask/Notice_Train_Sports/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -91,6 +141,16 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-danger\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
//{ label: "附件上传", name: "Files", width: 100, align: "left"}, | |||
//{ label: "内容", name: "T_Content", width: 100, align: "left" }, | |||
], | |||
@@ -5,7 +5,7 @@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sum"> | |||
<div class="lr-form-item-title">队伍</div> | |||
<div id="Teamid"></div> | |||
<div id="Teamid" > </div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sum"> | |||
<div class="lr-form-item-title">教练</div> | |||
@@ -24,4 +24,4 @@ | |||
<div id="Contents" style="height:200px;"></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Sum/Form.js") | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Sum/FormView.js") |
@@ -0,0 +1,27 @@ | |||
@{ | |||
ViewBag.Title = "比赛成绩汇总"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sum"> | |||
<div class="lr-form-item-title">队伍</div> | |||
<div id="Teamid" disable></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sum"> | |||
<div class="lr-form-item-title">教练</div> | |||
<div id="Coachs" disable></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sum"> | |||
<div class="lr-form-item-title">运动员</div> | |||
<div id="Peoples" disable></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sum"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Files" disable></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_Train_Sum"> | |||
<div class="lr-form-item-title">简介</div> | |||
<div id="Contents" style="height:200px;" disable></div> | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_Train_Sum/Form.js") |
@@ -0,0 +1,75 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-17 16:18 | |||
* 描 述:比赛成绩汇总 | |||
*/ | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var itemCode = request('itemCode'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
init: function () { | |||
$('.lr-form-wrap').lrscroll(); | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//$('#Peoples').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_userid',text: 'f_realname' }); | |||
$('#Files').lrUploader({ isUpload: false }); | |||
var ContentsUE = UE.getEditor('Contents'); | |||
$('#Coachs').lrUserSelect(1); | |||
//$('#Peoples').lrselect({ | |||
// // 字段 | |||
// value: "F_AreaCode", | |||
// text: "F_AreaName", | |||
// title: "F_AreaName", | |||
// type: 'multiple', | |||
// // 展开最大高度 | |||
// maxHeight: 200, | |||
// // 是否允许搜索 | |||
// allowSearch: true, | |||
// // 访问数据接口地址 | |||
// url: top.$.rootUrl + '/LR_SystemModule/Area/Getlist', | |||
// // 访问数据接口参数 | |||
// param: { parentId: '' }, | |||
//}); | |||
$('#Peoples').lrDataSourceSelect({ code: 'StuInfoBasic', value: 'stuno', text: 'stuname', type: 'multiple' }); | |||
//$('#Teamid').lrUserSelect(1); | |||
$('#Teamid').lrDataSourceSelect({ code: 'Trainteam', value: 'name', text: 'name' }); | |||
//$('#Peoples').lrDataItemSelect({ code: '' }); | |||
$('#Contents')[0].ue = ContentsUE; }, | |||
initData: function () { | |||
if (!!keyValue) { | |||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_Train_Sum/GetFormData?keyValue=' + keyValue, function (data) { | |||
for (var id in data) { | |||
if (!!data[id].length && data[id].length > 0) { | |||
$('#' + id ).jfGridSet('refreshdata', data[id]); | |||
} | |||
else { | |||
$('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
} | |||
} | |||
}); | |||
} | |||
} | |||
}; | |||
// 保存数据 | |||
acceptClick = function (callBack) { | |||
if (!$('body').lrValidform()) { | |||
return false; | |||
} | |||
var postData = { | |||
strEntity: JSON.stringify($('body').lrGetFormData()) | |||
}; | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_Train_Sum/SaveForm?keyValue=' + keyValue +"&Typeid=" + itemCode, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
}; | |||
page.init(); | |||
} |
@@ -49,10 +49,11 @@ | |||
<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" > | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> <span class="lrlt">录入</span></a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> <span class="lrlt">修改</span></a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> <span class="lrlt">删除</span></a> | |||
<a id="lr-look" class="btn btn-default"><i class="fa fa-trash-o"></i> 查看</a> | |||
</div> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_category" class="btn btn-default"><i class="fa fa-tags"></i> <span class="lrlt">项目分类</span></a> | |||
@@ -102,6 +102,7 @@ | |||
* 描 述:数据字典管理 | |||
*/ | |||
var refreshGird; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var classify_itemCode = ''; | |||
@@ -174,6 +175,21 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr-look').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('Id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/Ask/Notice_Train_Sum/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
/*分类管理*/ | |||
$('#lr_category').on('click', function () { | |||
learun.layerForm({ | |||
@@ -101,7 +101,7 @@ var bootstrap = function ($, learun) { | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
@@ -0,0 +1,49 @@ | |||
@{ | |||
ViewBag.Title = "运动队比赛计划"; | |||
Layout = "~/Views/Shared/_Form.cshtml"; | |||
} | |||
@*<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item" data-table="Notice_compare_Teams" > | |||
<div class="lr-form-item-title">标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" /> | |||
</div> | |||
</div>*@ | |||
<div class="lr-form-wrap" id="form"> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告标题<font face="宋体">*</font></div> | |||
<input id="T_title" type="text" class="form-control" isvalid="yes" checkexpession="NotNull" placeholder="请输入标题" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">公告类别<font face="宋体">*</font></div> | |||
<div id="T_typename" isvalid="yes" checkexpession="NotNull" disabled></div> | |||
<input type="hidden" id="T_type" /> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">发布时间<font face="宋体">*</font></div> | |||
<input id="Createtime" type="text" class="form-control lr-input-wdatepicker" onfocus="WdatePicker({ dateFmt: 'yyyy-MM-dd HH:mm:ss' })" isvalid="yes" checkexpession="NotNull" value="@Learun.Util.Time.GetToday("yyyy-MM-dd HH:mm:ss")" data-dateFmt="yyyy-MM-dd hh:mm:ss" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">信息来源</div> | |||
<input id="Source" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">来源地址</div> | |||
<input id="SourceUrl" type="text" class="form-control" disabled/> | |||
</div> | |||
<div class="col-xs-6 lr-form-item"> | |||
<div class="lr-form-item-title">接收部门</div> | |||
<div id="Noticedept" disabled></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">附件上传</div> | |||
<div id="Files" disabled></div> | |||
</div> | |||
<div class="col-xs-12 lr-form-item"> | |||
<div class="lr-form-item-title">公告内容</div> | |||
<div id="editor" style="height:300px;" disabled></div> | |||
@*<script id="editor" type="text/plain" style="height:270px;"> | |||
</script>*@ | |||
</div> | |||
</div> | |||
@Html.AppendJsFile("/Areas/Ask/Views/Notice_compare_Teams/FormView.js") |
@@ -0,0 +1,114 @@ | |||
/* * 版 本 Learun-ADMS V7.0.6 力软敏捷开发框架(http://www.learun.cn) | |||
* Copyright (c) 2013-2020 力软信息技术(苏州)有限公司 | |||
* 创建人:超级管理员 | |||
* 日 期:2023-10-12 10:29 | |||
* 描 述:运动队比赛计划 | |||
*/ | |||
//var acceptClick; | |||
//var keyValue = request('keyValue'); | |||
//var bootstrap = function ($, learun) { | |||
// "use strict"; | |||
// var page = { | |||
// init: function () { | |||
// $('.lr-form-wrap').lrscroll(); | |||
// page.bind(); | |||
// page.initData(); | |||
// }, | |||
// bind: function () { | |||
// }, | |||
// initData: function () { | |||
// if (!!keyValue) { | |||
// $.lrSetForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/GetFormData?keyValue=' + keyValue, function (data) { | |||
// for (var id in data) { | |||
// if (!!data[id].length && data[id].length > 0) { | |||
// $('#' + id ).jfGridSet('refreshdata', data[id]); | |||
// } | |||
// else { | |||
// $('[data-table="' + id + '"]').lrSetFormData(data[id]); | |||
// } | |||
// } | |||
// }); | |||
// } | |||
// } | |||
// }; | |||
// // 保存数据 | |||
// acceptClick = function (callBack) { | |||
// if (!$('body').lrValidform()) { | |||
// return false; | |||
// } | |||
// var postData = { | |||
// strEntity: JSON.stringify($('body').lrGetFormData()) | |||
// }; | |||
// $.lrSaveForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/SaveForm?keyValue=' + keyValue, postData, function (res) { | |||
// // 保存成功后才回调 | |||
// if (!!callBack) { | |||
// callBack(); | |||
// } | |||
// }); | |||
// }; | |||
// page.init(); | |||
//} | |||
var acceptClick; | |||
var keyValue = request('keyValue'); | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var ue; | |||
var page = { | |||
init: function () { | |||
page.bind(); | |||
page.initData(); | |||
}, | |||
bind: function () { | |||
//公告类别 | |||
$('#T_typename').lrDataItemSelect({ | |||
code: 'Notice_compare_Teams', maxHeight: 230, select: function (item) { | |||
if (item != null && item != undefined) { | |||
$("#T_type").val(item.text); | |||
} | |||
} | |||
}); | |||
$('#Files').lrUploader({ isUpload: false }); | |||
$('#Noticedept').lrDepartmentSelect({ type: 'treemultiple' }); | |||
//内容编辑器 | |||
ue = UE.getEditor('editor'); | |||
}, | |||
initData: function () { | |||
if (!!keyValue) { | |||
//$('#form').lrSetFormData(selectedRow); | |||
//$("#F_ReleaseTime").val(learun.formatDate(selectedRow.F_ReleaseTime, 'yyyy/MM/dd hh:mm')); | |||
$.lrSetForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/GetFormData?keyValue=' + keyValue, function (data) { | |||
$('#form').lrSetFormData(data); | |||
setTimeout(function () { | |||
ue.setContent(data.T_Content); | |||
}, 100); | |||
}); | |||
} | |||
} | |||
}; | |||
acceptClick = function (callBack) { | |||
if (!$('#form').lrValidform()) { | |||
return false; | |||
} | |||
learun.clientdata.getAsync('dataItem', { | |||
key: $("#T_typename").lrselectGet(), | |||
code: 'Notice_compare_Teams', | |||
callback: function (_data) { | |||
$("#T_type").val(_data.text); | |||
var postData = $('#form').lrGetFormData(keyValue); | |||
postData["T_Content"] = ue.getContent(null, null, true); | |||
//var postData = {}; | |||
//postData.strEntity = $('#form').lrGetFormData(keyValue); | |||
$.lrSaveForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/SaveFormAndSubmit?keyValue=' + keyValue, postData, function (res) { | |||
// 保存成功后才回调 | |||
if (!!callBack) { | |||
callBack(); | |||
} | |||
}); | |||
} | |||
}); | |||
} | |||
page.init(); | |||
} |
@@ -18,10 +18,12 @@ | |||
<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"> | |||
<div class=" btn-group btn-group-sm"> | |||
<a id="lr_add" class="btn btn-default"><i class="fa fa-plus"></i> 新增</a> | |||
<a id="lr_edit" class="btn btn-default"><i class="fa fa-pencil-square-o"></i> 编辑</a> | |||
<a id="lr_delete" class="btn btn-default"><i class="fa fa-trash-o"></i> 删除</a> | |||
<a id="lr-look" class="btn btn-default"><i class="fa fa-trash-o"></i> 查看</a> | |||
<a id="lr-sub" class="btn btn-default"><i class="fa fa-trash-o"></i> 提交</a> | |||
</div> | |||
</div> | |||
</div> | |||
@@ -5,6 +5,7 @@ | |||
* 描 述:运动队比赛计划 | |||
*/ | |||
var refreshGirdData; | |||
var selectedRow; | |||
var bootstrap = function ($, learun) { | |||
"use strict"; | |||
var page = { | |||
@@ -38,7 +39,12 @@ var bootstrap = function ($, learun) { | |||
// 编辑 | |||
$('#lr_edit').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'form', | |||
title: '编辑', | |||
@@ -54,7 +60,12 @@ var bootstrap = function ($, learun) { | |||
// 删除 | |||
$('#lr_delete').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status != 0) {//提交 | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认删除该项!', function (res) { | |||
if (res) { | |||
learun.deleteForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/DeleteForm', { keyValue: keyValue}, function () { | |||
@@ -64,6 +75,45 @@ var bootstrap = function ($, learun) { | |||
}); | |||
} | |||
}); | |||
// 提交 | |||
$('#lr-sub').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status > 0) { | |||
learun.alert.warning("当前记录已提交!"); | |||
return false; | |||
} | |||
learun.layerConfirm('是否确认提交该项!', function (res) { | |||
if (res) { | |||
//processId = learun.newGuid(); | |||
learun.postForm(top.$.rootUrl + '/Ask/Notice_compare_Teams/SaveFormAndSubmit', { keyValue: keyValue, status: 1 }, function (res) { | |||
//selectedRow.ProcessId = processId; | |||
refreshGirdData(res, {}); | |||
}); | |||
} | |||
}); | |||
} | |||
}); | |||
// 查看 | |||
$('#lr-look').on('click', function () { | |||
var keyValue = $('#gridtable').jfGridValue('T_id'); | |||
selectedRow = $('#gridtable').jfGridGet('rowdata'); | |||
if (learun.checkrow(keyValue)) { | |||
if (selectedRow[0].Status == 0) { | |||
learun.alert.warning("当前记录未提交,请提交后再查看!"); | |||
return false; | |||
} | |||
learun.layerForm({ | |||
id: 'formview', | |||
title: '查看', | |||
url: top.$.rootUrl + '/Ask/Notice_compare_Teams/FormView?keyValue=' + keyValue, | |||
width: 1000, | |||
height: 600, | |||
btn: null | |||
}); | |||
} | |||
}); | |||
}, | |||
// 初始化列表 | |||
initGird: function () { | |||
@@ -91,6 +141,16 @@ var bootstrap = function ($, learun) { | |||
} | |||
} | |||
}, | |||
{ | |||
label: "状态", name: "Status", width: 100, align: "left", | |||
formatter: function (cellvalue, row) { | |||
if (cellvalue == 1) { | |||
return '<span class=\"label label-danger\" >已提交</span>'; | |||
} else { | |||
return '<span class=\"label label-default\" >草稿</span>'; | |||
} | |||
} | |||
}, | |||
//{ label: "附件上传", name: "Files", width: 100, align: "left"}, | |||
//{ label: "内容", name: "T_Content", width: 100, align: "left" }, | |||
], | |||
@@ -931,11 +931,16 @@ | |||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\PaperView.js" /> | |||
<Content Include="Areas\Ask\Views\Ask_MainOfTeacher\TeacherIndex.js" /> | |||
<Content Include="Areas\Ask\Views\Ask_Question\AnalysisIndex.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_compare_Teams\FormView.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_TrainTeam\FormView.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_TrainTeam\Form.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_TrainTeam\Index.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Coach\FormView.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sports\FormView.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sports\ListContentIndex.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sports\ViewForm.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sports\ViewIndex.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sum\FormView.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sum\Form.js" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sum\Index.js" /> | |||
<Content Include="Areas\AssetManagementSystem\Views\Allocation\Form.js" /> | |||
@@ -8358,6 +8363,11 @@ | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sum\Index.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Notice_TrainTeam\Form.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Notice_TrainTeam\Index.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Coach\FormView.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Notice_compare_Teams\FormView.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sports\FormView.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Notice_TrainTeam\FormView.cshtml" /> | |||
<Content Include="Areas\Ask\Views\Notice_Train_Sum\FormView.cshtml" /> | |||
<None Include="Properties\PublishProfiles\CustomProfile.pubxml" /> | |||
<None Include="Properties\PublishProfiles\FolderProfile.pubxml" /> | |||
<Content Include="Views\Login\Default-beifen.cshtml" /> | |||
@@ -86,6 +86,10 @@ namespace Learun.Application.TwoDevelopment.Ask | |||
public int? Status { get; set; } | |||
/// <summary> | |||
/// Type | |||
/// 1运动员集训安排 | |||
/// 2教练员集训 | |||
/// 3运动队比赛计划 | |||
/// 4于东对集训安排 | |||
/// </summary> | |||
[Column("TYPE")] | |||
public string Type { get; set; } | |||