|
|
@@ -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 () { |
|
|
|