Browse Source

项目人员管理

master
zhangli 3 years ago
parent
commit
751f93df90
5 changed files with 90 additions and 46 deletions
  1. +2
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectPeople/Form.cshtml
  2. +18
    -4
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectPeople/Form.js
  3. +59
    -38
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectPeople/Index.js
  4. +8
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectPeople/SRProjectPeopleEntity.cs
  5. +3
    -1
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectPeople/SRProjectPeopleService.cs

+ 2
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectPeople/Form.cshtml View File

@@ -8,8 +8,8 @@
<div id="SRProjectBasicId" isvalid="yes" checkexpession="NotNull" ></div> <div id="SRProjectBasicId" isvalid="yes" checkexpession="NotNull" ></div>
</div> </div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectPeople" > <div class="col-xs-12 lr-form-item" data-table="SRProjectPeople" >
<div class="lr-form-item-title">项目负责人</div>
<div id="ManageName" ></div>
<div class="lr-form-item-title">项目负责人<font face="宋体">*</font></div>
<div id="ManageName" isvalid="yes" checkexpession="NotNull" ></div>
</div> </div>
<div class="col-xs-12 lr-form-item" data-table="SRProjectPeople" > <div class="col-xs-12 lr-form-item" data-table="SRProjectPeople" >
<div class="lr-form-item-title">项目成员<font face="宋体">*</font></div> <div class="lr-form-item-title">项目成员<font face="宋体">*</font></div>


+ 18
- 4
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectPeople/Form.js View File

@@ -15,16 +15,30 @@ var bootstrap = function ($, learun) {
page.initData(); page.initData();
}, },
bind: function () { bind: function () {
$('#SRProjectBasicId').lrDataItemSelect({ code: 'NoticeCategory' });
$('#ManageName').lrDataSourceSelect({ code: 'EmpInfo',value: 'empid',text: 'empname' });
$('#Players').lrDataSourceSelect({ code: 'EmpInfo',value: 'empid',text: 'empname' });
$('#SRProjectBasicId').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/CustomFunction/SRProjectBasic/GetList',
value: "ID",
text: "EnCode"
});
$('#ManageName').lrDataSourceSelect({ code: 'EmpInfo', value: 'empid', text: 'empname' });
$('#Players').lrUserSelect({ type: '1' });

//$('#Players').lrselect({
// allowSearch: true,
// url: top.$.rootUrl + '/CustomFunction/SRProjectBasic/GetList',
// value: 'empid',
// text: 'empname',
// // 类型
// type: 'multiple'
//});
}, },
initData: function () { initData: function () {
if (!!keyValue) { if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/CustomFunction/SRProjectPeople/GetFormData?keyValue=' + keyValue, function (data) { $.lrSetForm(top.$.rootUrl + '/CustomFunction/SRProjectPeople/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) { for (var id in data) {
if (!!data[id].length && data[id].length > 0) { if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
} }
else { else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]); $('[data-table="' + id + '"]').lrSetFormData(data[id]);


+ 59
- 38
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectPeople/Index.js View File

@@ -16,8 +16,13 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) { $('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson); page.search(queryJson);
}, 220, 400); }, 220, 400);
$('#SRProjectBasicId').lrDataItemSelect({ code: 'NoticeCategory' });
$('#ManageName').lrDataSourceSelect({ code: 'EmpInfo',value: 'empid',text: 'empname' });
$('#SRProjectBasicId').lrselect({
allowSearch: true,
url: top.$.rootUrl + '/CustomFunction/SRProjectBasic/GetList',
value: "ID",
text: "EnCode"
});
$('#ManageName').lrDataSourceSelect({ code: 'EmpInfo', value: 'empid', text: 'empname' });
// 刷新 // 刷新
$('#lr_refresh').on('click', function () { $('#lr_refresh').on('click', function () {
location.reload(); location.reload();
@@ -57,7 +62,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) { if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) { learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) { if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectPeople/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectPeople/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData(); refreshGirdData();
}); });
} }
@@ -71,50 +76,66 @@ var bootstrap = function ($, learun) {
}, },
// 初始化列表 // 初始化列表
initGird: function () { initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/SRProjectPeople/GetPageList', url: top.$.rootUrl + '/CustomFunction/SRProjectPeople/GetPageList',
headData: [ headData: [
{ label: "项目编号", name: "SRProjectBasicId", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'NoticeCategory',
callback: function (_data) {
callback(_data.text);
}
});
}},
{ label: "项目负责人", name: "ManageName", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empid',
callback: function (_data) {
callback(_data['empname']);
}
});
}},
{ label: "项目成员", name: "Players", width: 100, align: "left",
formatterAsync: function (callback, value, row, op,$cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empid',
callback: function (_data) {
callback(_data['empname']);
}
});
}},
{ label: "项目编号", name: "EnCode", width: 100, align: "left" },
{
label: "项目负责人", name: "ManageName", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'EmpInfo',
key: value,
keyId: 'empid',
callback: function (_data) {
callback(_data['empname']);
}
});
}
},
{
label: "项目成员", name: "Players", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
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=' + 'BaseUser',
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=' + 'BaseUser',
key: value,
keyId: 'f_userid',
callback: function (_data) {
callback(_data['f_realname']);
}
});
}



}
},
], ],
mainId:'ID',
mainId: 'ID',
isPage: true isPage: true
}); });
page.search(); page.search();
}, },
search: function (param) { search: function (param) {
param = param || {}; param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
} }
}; };
refreshGirdData = function () { refreshGirdData = function () {


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectPeople/SRProjectPeopleEntity.cs View File

@@ -11,7 +11,7 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
/// 日 期:2021-09-15 17:10 /// 日 期:2021-09-15 17:10
/// 描 述:项目人员管理 /// 描 述:项目人员管理
/// </summary> /// </summary>
public class SRProjectPeopleEntity
public class SRProjectPeopleEntity
{ {
#region 实体成员 #region 实体成员
/// <summary> /// <summary>
@@ -58,6 +58,10 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
public void Create() public void Create()
{ {
this.ID = Guid.NewGuid().ToString(); this.ID = Guid.NewGuid().ToString();
this.CreateTime=DateTime.Now;
var userinfo = LoginUserInfo.Get();
this.CreateUserId = userinfo.userId;
this.CreateUserName = userinfo.realName;
} }
/// <summary> /// <summary>
/// 编辑调用 /// 编辑调用
@@ -69,6 +73,9 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
} }
#endregion #endregion
#region 扩展字段 #region 扩展字段
[NotMapped]
public string EnCode { get; set; }

#endregion #endregion
} }
} }


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectPeople/SRProjectPeopleService.cs View File

@@ -35,9 +35,11 @@ namespace Learun.Application.TwoDevelopment.CustomFunction
t.ID, t.ID,
t.SRProjectBasicId, t.SRProjectBasicId,
t.ManageName, t.ManageName,
t.Players
t.Players,
s.EnCode
"); ");
strSql.Append(" FROM SRProjectPeople t "); strSql.Append(" FROM SRProjectPeople t ");
strSql.Append(" join SRProjectBasic s on t.SRProjectBasicId=s.Id ");
strSql.Append(" WHERE 1=1 "); strSql.Append(" WHERE 1=1 ");
var queryParam = queryJson.ToJObject(); var queryParam = queryJson.ToJObject();
// 虚拟参数 // 虚拟参数


Loading…
Cancel
Save