Переглянути джерело

学生宿舍

临城职教中职
ndbs 2 роки тому
джерело
коміт
4d0be0621e
1 змінених файлів з 187 додано та 137 видалено
  1. +187
    -137
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js

+ 187
- 137
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js Переглянути файл

@@ -14,7 +14,7 @@ var bootstrap = function ($, learun) {
page.initGird();
page.search({ ParentID: '' });
page.bind();
},
bind: function () {

@@ -165,10 +165,10 @@ var bootstrap = function ($, learun) {
}
});
}

});
//分类管理
$("#lr_Classify").on("click", function () {
learun.layerForm({
@@ -177,7 +177,7 @@ var bootstrap = function ($, learun) {
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/IndexClassify',
width: 1200,
height: 780,
btn:null,
btn: null,
callBack: function (id) {
return top[id].acceptClick(refreshGirdData);
}
@@ -213,143 +213,193 @@ var bootstrap = function ($, learun) {
},
// 初始化列表
initGird: function () {
$('#gridtable').jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 100, align: "left" },
{
label: "宿舍楼", name: "ApartmentName", width: 100, align: "left"
},
{
label: "单元", name: "UnitName", width: 100, align: "left" },
{
label: "楼层", name: "FloorName", width: 100, align: "left" },
//{
// label: "学生", name: "StudentID", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
console.log('selectedParent.ChildType', selectedParent.ChildType);
if (selectedParent.ChildType == undefined || selectedParent.ChildType === "5") {
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 100, align: "left" },
{
label: "宿舍楼", name: "ApartmentName", width: 100, align: "left"
},
{
label: "单元", name: "UnitName", width: 100, align: "left"
},
{
label: "楼层", name: "FloorName", width: 100, align: "left"
},
//{
// label: "学生", name: "StudentID", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {

// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
// key: value,
// keyId: 'stuid',
// callback: function (_data) {
// callback(_data['stuname']);
// }
// });
// }
//},
{ label: "位置", name: "Address", width: 100, align: "left" },
{
label: "校区", name: "Campus", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
// key: value,
// keyId: 'stuid',
// callback: function (_data) {
// callback(_data['stuname']);
// }
// });
// }
//},
{ label: "位置", name: "Address", width: 100, align: "left" },
{
label: "校区", name: "Campus", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {

learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
{
label: "系", name: "Dept", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "Major", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{ label: "班级", name: "Class", width: 100, align: "left" },
{
label: "性别", name: "Sex", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'usersex',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "负责人", name: "Functionary", width: 100, align: "left" },
{ label: "负责人电话", name: "Phone", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true,
isMultiselect: true,
sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ',
//sord: 'ASC',
});
//if (selectedParent.ChildType == "5") {
// $('#gridtable').lrAuthorizeJfGridLei({
// url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList',
// headData: [
// { label: "名称", name: "Name", width: 100, align: "left" },
// { label: "学生名字", name: "StuName", width: 100, align: "left" },
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
{
label: "系", name: "Dept", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
key: value,
keyId: 'deptno',
callback: function (_data) {
callback(_data['deptname']);
}
});
}
},
{
label: "专业", name: "Major", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
key: value,
keyId: 'id',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{ label: "班级", name: "Class", width: 100, align: "left" },
{
label: "性别", name: "Sex", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('dataItem', {
key: value,
code: 'usersex',
callback: function (_data) {
callback(_data.text);
}
});
}
},
{ label: "负责人", name: "Functionary", width: 100, align: "left" },
{ label: "负责人电话", name: "Phone", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true,
isMultiselect: true,
sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ',
//sord: 'ASC',
});
} else {
console.log('其余');
$('#gridtable').lrAuthorizeJfGridLei({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetPageList',
headData: [
{ label: "名称", name: "Name", width: 100, align: "left" },
{
label: "宿舍楼", name: "ApartmentName", width: 100, align: "left"
},
{
label: "单元", name: "UnitName", width: 100, align: "left"
},
{
label: "楼层", name: "FloorName", width: 100, align: "left"
},
//{
// label: "学生", name: "StudentID", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {

// { label: "班级", name: "Class", width: 100, align: "left" },
// {
// label: "性别", name: "Sex", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('dataItem', {
// key: value,
// code: 'usersex',
// callback: function (_data) {
// callback(_data.text);
// }
// });
// }
// },
// { label: "负责人", name: "Functionary", width: 100, align: "left" },
// { label: "负责人电话", name: "Phone", width: 100, align: "left" },
// { label: "价格", name: "Price", width: 100, align: "left" },
// { label: "星级", name: "Starred", width: 100, align: "left" },
// {
// label: "是否独卫", name: "HasToilet", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('dataItem', {
// key: value,
// code: 'HasToilet',
// callback: function (_data) {
// callback(_data.text);
// }
// });
// }
// },
// { label: "舍长", name: "Leader", width: 100, align: "left" },
// { label: "备注", name: "Remark", width: 100, align: "left" },
// ],
// mainId: 'ID',
// isPage: true,
// isMultiselect:true
// });
//} else {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'StuInfoBasic',
// key: value,
// keyId: 'stuid',
// callback: function (_data) {
// callback(_data['stuname']);
// }
// });
// }
//},
{ label: "位置", name: "Address", width: 100, align: "left" },
{
label: "校区", name: "Campus", width: 100, align: "left",
formatterAsync: function (callback, value, row, op, $cell) {

//}
//page.search();
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'company',
key: value,
keyId: 'f_companyid',
callback: function (_data) {
callback(_data['f_fullname']);
}
});
}
},
//{
// label: "系", name: "Dept", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdDeptInfo',
// key: value,
// keyId: 'deptno',
// callback: function (_data) {
// callback(_data['deptname']);
// }
// });
// }
//},
//{
// label: "专业", name: "Major", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('custmerData', {
// url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'CdMajorInfo',
// key: value,
// keyId: 'id',
// callback: function (_data) {
// callback(_data['majorname']);
// }
// });
// }
//},
//{ label: "班级", name: "Class", width: 100, align: "left" },
//{
// label: "性别", name: "Sex", width: 100, align: "left",
// formatterAsync: function (callback, value, row, op, $cell) {
// learun.clientdata.getAsync('dataItem', {
// key: value,
// code: 'usersex',
// callback: function (_data) {
// callback(_data.text);
// }
// });
// }
//},
{ label: "负责人", name: "Functionary", width: 100, align: "left" },
{ label: "负责人电话", name: "Phone", width: 100, align: "left" },
{ label: "备注", name: "Remark", width: 100, align: "left" },
],
mainId: 'ID',
isPage: true,
isMultiselect: true,
//sidx: 'ApartmentId asc,UnitId asc ,FloorId asc ',
//sord: 'ASC',
});
}
},
search: function (param) {
param = param || {};


Завантаження…
Відмінити
Зберегти