Selaa lähdekoodia

分配宿舍根据性别筛选学生;列表查询只查询寝室

临城职教中职
zhangli 2 vuotta sitten
committed by ndbs
vanhempi
commit
8b8febb6ba
4 muutettua tiedostoa jossa 515 lisäystä ja 475 poistoa
  1. +9
    -2
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js
  2. +239
    -225
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
  3. +257
    -244
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js
  4. +10
    -4
      Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs

+ 9
- 2
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js Näytä tiedosto

@@ -7,6 +7,7 @@
var acceptClick;
var Class = request('Class');
var keyValue = request('keyValue');
var Sex = request('Sex');
var arr = [];
var bootstrap = function ($, learun) {
"use strict";
@@ -23,7 +24,13 @@ var bootstrap = function ($, learun) {
if (!!keyValue) {
$.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + keyValue, function (data) {
$('#content').html('');
var strWhere = " ClassNo='" + Class + "'";
if (Sex == '0') {
strWhere += " and GenderNo=0";
}
else if (Sex == '1') {
strWhere += " and GenderNo=1";
}
for (var i = 0; i < data.length; i++) {
var html = '';
html += '<div class="col-xs-12 lr-form-item div12">';
@@ -44,7 +51,7 @@ var bootstrap = function ($, learun) {
value: "stuid",
text: "stuname",
url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable',
param: { code: "StuInfoBasic", strWhere: "ClassNo='" + Class + "'" },
param: { code: "StuInfoBasic", strWhere: strWhere },
select: function (item) {
// console.log(item);
var stuid = '';


+ 239
- 225
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js Näytä tiedosto

@@ -288,246 +288,260 @@ var bootstrap = function ($, learun) {
if (item.text.indexOf("室") > -1) {
selectedParent.ChildType = "5";
}
page.initGird();
page.search({ ParentID: item.value });
var param = {};
if (item.title == '1')
param.ApartmentId = item.value;
else if (item.title == '2')
param.UnitId = item.value;
else if (item.title == '3')
param.FloorId = item.value;
//page.initGird();
//page.search({ ParentID: item.value });
page.search(param);
}
});
},
// 初始化列表
initGird: function () {
$("#gridtable").empty();
$("#gridtable")[0].dfop = undefined;
if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") {
//宿舍数据
$('#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) {
//宿舍数据
$('#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) {

// 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: "RoomType", width: 100, align: "left",
formatter: function (value, row) {
if (value) {
return value + '人寝';
} else {
return '';
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: "RoomType", width: 100, align: "left",
formatter: function (value, row) {
if (value) {
return value + '人寝';
} else {
return '';
}
},
{ label: "入住人数", name: "CheckInStu", width: 100, align: "left" },
{
label: "性别", name: "Sex", width: 100, align: "left",
formatter: function (callback, value, row, op, $cell) {
if (value == '0')
return '女';
else if (value == '1')
return '男';
else
return '';
}
},
{ 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',
isSubGrid: true, // 是否有子表
subGridExpanded: function (subContentId, rowItem) {
$('#' + subContentId).jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID,
headData: [
{ label: "名称", name: "Name", 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']);
}
});
}
},
],
mainId: 'ID',
isPage: false,
//sidx: 'DNo',
//sord: 'ASC',
});
//var param;
//param = param || {};
//param.ParentID = rowItem.Id;
$('#' + subContentId).jfGridSet('reload');
}
},
subGridHeight: 250,
});
} else {
//lrAuthorizeJfGridLei
$('#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) {
{ label: "入住人数", name: "CheckInStu", width: 100, align: "left" },
{
label: "性别", name: "Sex", width: 100, align: "left",
formatter: function (value, row) {
if (value == '0')
return '女';
else if (value == '1')
return '男';
else
return '';
}
},
{ 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',
isSubGrid: true, // 是否有子表
subGridExpanded: function (subContentId, rowItem) {
$('#' + subContentId).jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID,
headData: [
{ label: "名称", name: "Name", 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']);
}
});
}
},
],
mainId: 'ID',
isPage: false,
//sidx: 'DNo',
//sord: 'ASC',
});
//var param;
//param = param || {};
//param.ParentID = rowItem.Id;
$('#' + subContentId).jfGridSet('reload');
},
subGridHeight: 250,
});
//$("#gridtable").empty();
//$("#gridtable")[0].dfop = undefined;
//if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") {
//} else {
// //lrAuthorizeJfGridLei
// $('#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) {

// 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',
});
}
// 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 || {};
param.SqlParameter = " AND t.BuildType ='4' ";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 257
- 244
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js Näytä tiedosto

@@ -290,6 +290,7 @@ var bootstrap = function ($, learun) {
//分配宿舍
$("#lr_Bed").on("click", function () {
var keyValue = $('#gridtable').jfGridValue('ID');
var Sex = $('#gridtable').jfGridValue('Sex');
var BuildType = $('#gridtable').jfGridValue('BuildType');
var Name = $('#gridtable').jfGridValue('Name');
var Class = $('#gridtable').jfGridValue('Class');
@@ -306,7 +307,7 @@ var bootstrap = function ($, learun) {
learun.layerForm({
id: 'formRoom',
title: '分配宿舍--' + Name,
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormRoom?keyValue=' + keyValue + '&Class=' + Class,
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/FormRoom?keyValue=' + keyValue + '&Class=' + Class + '&Sex=' + Sex,
width: 600,
height: 400,
callBack: function (id) {
@@ -338,261 +339,273 @@ var bootstrap = function ($, learun) {
if (item.text.indexOf("室") > -1) {
selectedParent.ChildType = "5";
}
page.initGird();
page.search({ ParentID: item.value });
var param = {};

if (item.title == '1')
param.ApartmentId = item.value;
else if (item.title == '2')
param.UnitId = item.value;
else if (item.title == '3')
param.FloorId = item.value;

//page.initGird();
//page.search({ ParentID: item.value });
page.search(param);
}
});
},
// 初始化列表
initGird: function () {
$("#gridtable").empty();
$("#gridtable")[0].dfop = undefined;
if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") {
//宿舍数据
$('#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) {

// 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: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班级", name: "Class", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{
label: "寝室类型", name: "RoomType", width: 100, align: "left",
formatter: function (value, row) {
if (value) {
return value + '人寝';
} else {
return '';
//宿舍数据
$('#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) {

// 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: "CheckInStu", width: 100, align: "left" },
{
label: "性别", name: "Sex", width: 100, align: "left",
formatter: function (callback, value, row, op, $cell) {
if (value == '0')
return '女';
else if (value == '1')
return '男';
else
return '';
}
},
{ 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: 'CheckInStu asc,ApartmentId asc,UnitId asc ,FloorId asc ',
//sord: 'ASC',
isSubGrid: true, // 是否有子表
subGridExpanded: function (subContentId, rowItem) {
$('#' + subContentId).jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID,
headData: [
{ label: "名称", name: "Name", 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']);
}
});
}
},
],
mainId: 'ID',
isPage: false,
//sidx: 'DNo',
//sord: 'ASC',
});
//var param;
//param = param || {};
//param.ParentID = rowItem.Id;
$('#' + subContentId).jfGridSet('reload');
});
}
},
subGridHeight: 250,
});
} else {
//lrAuthorizeJfGridLei
$('#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) {

// 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: 'majorno',
callback: function (_data) {
callback(_data['majorname']);
}
});
}
},
{
label: "班级", name: "Class", width: 100, align: "left", formatterAsync: function (callback, value, row, op, $cell) {
learun.clientdata.getAsync('custmerData', {
url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj',
key: value,
keyId: 'classno',
callback: function (_data) {
callback(_data['classname']);
}
});
}
},
{
label: "寝室类型", name: "RoomType", width: 100, align: "left",
formatter: function (value, row) {
if (value) {
return value + '人寝';
} else {
return '';
}
},
//{
// 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',
});
}
}
},
{ label: "入住人数", name: "CheckInStu", width: 100, align: "left" },
{
label: "性别", name: "Sex", width: 100, align: "left",
formatter: function (value, row) {
if (value == '0')
return '女';
else if (value == '1')
return '男';
else
return '';
}
},
{ 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: 'CheckInStu asc,ApartmentId asc,UnitId asc ,FloorId asc ',
//sord: 'ASC',
isSubGrid: true, // 是否有子表
subGridExpanded: function (subContentId, rowItem) {
$('#' + subContentId).jfGrid({
url: top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + rowItem.ID,
headData: [
{ label: "名称", name: "Name", 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']);
}
});
}
},
],
mainId: 'ID',
isPage: false,
//sidx: 'DNo',
//sord: 'ASC',
});
//var param;
//param = param || {};
//param.ParentID = rowItem.Id;
$('#' + subContentId).jfGridSet('reload');
},
subGridHeight: 250,
});


//$("#gridtable").empty();
//$("#gridtable")[0].dfop = undefined;
//if (selectedParent.BuildType == undefined || selectedParent.BuildType === "3") {

//} else {
// //lrAuthorizeJfGridLei
// $('#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) {

// // 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',
// });
//}


//page.search();
},
search: function (param) {
//console.log(param);

param = param || {};
param.SqlParameter = " AND t.BuildType ='4' ";
$('#gridtable').jfGridSet('reload', { queryJson: JSON.stringify(param) });
}
};


+ 10
- 4
Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs Näytä tiedosto

@@ -68,10 +68,10 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName
dp.Add("ParentID", queryParam["ParentID"].ToString(), DbType.String);
strSql.Append(" AND t.ParentID =@ParentID ");
}
else
{
strSql.Append(" AND t.BuildType ='4' ");
}
//else
//{
// strSql.Append(" AND t.BuildType ='4' ");
//}

if (!queryParam["ApartmentId"].IsEmpty())
{
@@ -170,6 +170,12 @@ a.name as ApartmentName,b.name as UnitName,c.Name as FloorName
strSql.Append(" AND t.CheckInStu>0 ");
}
}
if (!queryParam["SqlParameter"].IsEmpty())
{
strSql.Append(queryParam["SqlParameter"].ToString());
}

return this.BaseRepository("CollegeMIS").FindList<Acc_DormitoryBuildEntity>(strSql.ToString(), dp, pagination).OrderBy(a => a.Name).ThenBy(a => a.Name).ToList();
}
catch (Exception ex)


Ladataan…
Peruuta
Tallenna