Przeglądaj źródła

项目人员管理

master
zhangli 3 lat temu
rodzic
commit
751f93df90
5 zmienionych plików z 90 dodań i 46 usunięć
  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 Wyświetl plik

@@ -8,8 +8,8 @@
<div id="SRProjectBasicId" isvalid="yes" checkexpession="NotNull" ></div>
</div>
<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 class="col-xs-12 lr-form-item" data-table="SRProjectPeople" >
<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 Wyświetl plik

@@ -15,16 +15,30 @@ var bootstrap = function ($, learun) {
page.initData();
},
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 () {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/CustomFunction/SRProjectPeople/GetFormData?keyValue=' + keyValue, function (data) {
for (var id in data) {
if (!!data[id].length && data[id].length > 0) {
$('#' + id ).jfGridSet('refreshdata', data[id]);
$('#' + id).jfGridSet('refreshdata', data[id]);
}
else {
$('[data-table="' + id + '"]').lrSetFormData(data[id]);


+ 59
- 38
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/CustomFunction/Views/SRProjectPeople/Index.js Wyświetl plik

@@ -16,8 +16,13 @@ var bootstrap = function ($, learun) {
$('#multiple_condition_query').lrMultipleQuery(function (queryJson) {
page.search(queryJson);
}, 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 () {
location.reload();
@@ -57,7 +62,7 @@ var bootstrap = function ($, learun) {
if (learun.checkrow(keyValue)) {
learun.layerConfirm('是否确认删除该项!', function (res) {
if (res) {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectPeople/DeleteForm', { keyValue: keyValue}, function () {
learun.deleteForm(top.$.rootUrl + '/CustomFunction/SRProjectPeople/DeleteForm', { keyValue: keyValue }, function () {
refreshGirdData();
});
}
@@ -71,50 +76,66 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').lrAuthorizeJfGrid({
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/CustomFunction/SRProjectPeople/GetPageList',
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
});
page.search();
},
search: function (param) {
param = param || {};
$('#gridtable').jfGridSet('reload',{ queryJson: JSON.stringify(param) });
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};
refreshGirdData = function () {


+ 8
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectPeople/SRProjectPeopleEntity.cs Wyświetl plik

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

#endregion
}
}


+ 3
- 1
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/CustomFunction/SRProjectPeople/SRProjectPeopleService.cs Wyświetl plik

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


Ładowanie…
Anuluj
Zapisz