diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js index 11a458380..9d09f98ad 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Form.js @@ -20,7 +20,23 @@ var bootstrap = function ($, learun) { $('#Files').lrUploader(); var ContentsUE = UE.getEditor('Contents'); $('#Coachs').lrUserSelect(1); - $('#Peoples').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: '' }); diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js index 7f6f86b13..c5f096309 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Sum/Index.js @@ -222,29 +222,72 @@ var bootstrap = function ($, learun) { { label: '教练员', name: 'Coachs', width: 200, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', { - key: value, - callback: function (_data) { - callback(_data.name); + + if (value.indexOf(',') != -1) { + var content = ''; + var timearr = value.split(','); + for (var i = 0; i < timearr.length; i++) { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: timearr[i], + keyId: 'f_userid', + callback: function (_data) { + content += _data['f_realname'] + ","; + } + }); } - }); + content = content.substring(0, content.length - 1); + callback(content); + } else { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } } }, { label: '运动员', name: 'Peoples', width: 200, align: 'left', formatterAsync: function (callback, value, row, op, $cell) { - learun.clientdata.getAsync('user', { - key: value, - keyId: 'id', - textId: 'name', - callback: function (text) { - var str = ""; - for (var i = 0; i < text.length; i++) { - str+=text[i].name+"," - } - callback(str); + if (value.indexOf(',') != -1) { + var content = ''; + var timearr = value.split(','); + for (var i = 0; i < timearr.length; i++) { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: timearr[i], + keyId: 'stuno', + callback: function (_data) { + content += _data['stuname'] + ","; + } + }); } - }); + content = content.substring(0, content.length - 1); + callback(content); + } else { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + key: value, + keyId: 'stuno', + callback: function (_data) { + callback(_data['stuname']); + } + }); + } + //learun.clientdata.getAsync('custmerData', { + // url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic', + // key: value, + // keyId: 'stuno', + // callback: function (_data) { + // callback(_data['stuname']); + // } + //}); } }, { label: '时间', name: 'Createtime', width: 150, align: 'left' } diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml index e1678b4f2..1059e94ca 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.cshtml @@ -8,7 +8,7 @@
-
下拉框*
+
人员*
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js index 2ad6c5b00..4aed920a1 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Form.js @@ -15,7 +15,7 @@ var bootstrap = function ($, learun) { page.initData(); }, bind: function () { - $('#Teamusers').lrUserSelect(1); + $('#Teamusers').lrUserSelect({ type: '1' }); //$('#Teamusers').lrDataSourceSelect({ code: 'teacheruserdata',value: 'f_userid',text: 'f_userid' }); }, initData: function () { diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js index b893826ad..9e4c5869b 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/Ask/Views/Notice_Train_Teams/Index.js @@ -32,7 +32,7 @@ var bootstrap = function ($, learun) { }); // 编辑 $('#lr_edit').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('BelongId'); + var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { learun.layerForm({ id: 'form', @@ -48,7 +48,7 @@ var bootstrap = function ($, learun) { }); // 删除 $('#lr_delete').on('click', function () { - var keyValue = $('#gridtable').jfGridValue('BelongId'); + var keyValue = $('#gridtable').jfGridValue('Id'); if (learun.checkrow(keyValue)) { learun.layerConfirm('是否确认删除该项!', function (res) { if (res) { @@ -66,19 +66,37 @@ var bootstrap = function ($, learun) { url: top.$.rootUrl + '/Ask/Notice_Train_Teams/GetPageList', headData: [ { label: "队伍名称", name: "Name", width: 100, align: "left"}, - { label: "下拉框", name: "Teamusers", width: 100, align: "left", + { label: "人员", name: "Teamusers", width: 100, align: "left", formatterAsync: function (callback, value, row, op,$cell) { - learun.clientdata.getAsync('custmerData', { - url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', - key: value, - keyId: 'f_userid', - callback: function (_data) { - callback(_data['f_userid']); - } - }); + if (value.indexOf(',') != -1) { + var content = ''; + var timearr = value.split(','); + for (var i = 0; i < timearr.length; i++) { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: timearr[i], + keyId: 'f_userid', + callback: function (_data) { + content += _data['f_realname'] + ","; + } + }); + } + content = content.substring(0, content.length - 1); + callback(content); + } else { + learun.clientdata.getAsync('custmerData', { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'teacheruserdata', + key: value, + keyId: 'f_userid', + callback: function (_data) { + callback(_data['f_realname']); + } + }); + } }}, ], - mainId:'BelongId', + mainId:'Id', isPage: true }); page.search(); diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sports/Notice_Train_SportsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sports/Notice_Train_SportsService.cs index bef570336..85ee00e2e 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sports/Notice_Train_SportsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Sports/Notice_Train_SportsService.cs @@ -239,17 +239,19 @@ namespace Learun.Application.TwoDevelopment.Ask var postIds = userinfo.postIds; var strSql = new StringBuilder(); + var misdbname = BaseRepository("CollegeMIS").getDbConnection().Database; + var basedbname = BaseRepository().getDbConnection().Database; //SELECT t.*,r.RNewsId,r.RTime,d.F_FullName FROM Notice_Train_Sports t //left join NoticeLog_Train_Sports r on t.T_id = r.NewsId and r.RUserId = 'system' - // left join adms7ultimate2_新疆体育.dbo.lr_base_user u on u.F_UserId = 'system' - // left join adms7ultimate2_新疆体育.dbo.LR_BASE_DEPARTMENT d on d.F_DepartmentId = t.Noticedept + // left join "+ basedbname + ".dbo.lr_base_user u on u.F_UserId = 'system' + // left join "+ basedbname + ".dbo.LR_BASE_DEPARTMENT d on d.F_DepartmentId = t.Noticedept // WHERE // t.Noticedept like '%7781c7a8-0db2-492b-bebb-fa7d45af5406%' or t.noticepeople like '%%' ORDER BY t.createtime DESC strSql.Append("SELECT t.*,r.RNewsId,r.RTime,d.F_FullName FROM Notice_Train_Sports t "); strSql.Append(" left join NoticeLog_Train_Sports r on t.T_id = r.NewsId and r.RUserId =@userId "); - strSql.Append(" left join adms7ultimate2_新疆体育.dbo.lr_base_user u on u.F_UserId =@userId "); - strSql.Append(" left join adms7ultimate2_新疆体育.dbo.LR_BASE_DEPARTMENT d on d.F_DepartmentId = t.Noticedept "); + strSql.Append(" left join "+ basedbname + ".dbo.lr_base_user u on u.F_UserId =@userId "); + strSql.Append(" left join " + basedbname + ".dbo.LR_BASE_DEPARTMENT d on d.F_DepartmentId = t.Noticedept "); strSql.Append(" WHERE 1=1 "); //去掉用户入职时间条件 //if (userinfo.account.Contains("20")) diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs index 4417d11ac..1b8a41b41 100644 --- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs +++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/Ask/Notice_Train_Teams/Notice_Train_TeamsService.cs @@ -62,7 +62,7 @@ namespace Learun.Application.TwoDevelopment.Ask { try { - return this.BaseRepository("CollegeMIS").FindEntity(keyValue.ToInt()); + return this.BaseRepository("CollegeMIS").FindEntity(keyValue); } catch (Exception ex) {