From 8b8febb6ba81101ed0159ad4ed788c9cdec3154b Mon Sep 17 00:00:00 2001
From: zhangli <1109134334@qq.com>
Date: Mon, 21 Feb 2022 17:42:40 +0800
Subject: [PATCH] =?UTF-8?q?=E5=88=86=E9=85=8D=E5=AE=BF=E8=88=8D=E6=A0=B9?=
=?UTF-8?q?=E6=8D=AE=E6=80=A7=E5=88=AB=E7=AD=9B=E9=80=89=E5=AD=A6=E7=94=9F?=
=?UTF-8?q?=EF=BC=9B=E5=88=97=E8=A1=A8=E6=9F=A5=E8=AF=A2=E5=8F=AA=E6=9F=A5?=
=?UTF-8?q?=E8=AF=A2=E5=AF=9D=E5=AE=A4?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../Views/Accommodation/FormRoom.js | 11 +-
.../Views/Accommodation/Index.js | 464 ++++++++--------
.../Views/Accommodation/IndexDistribution.js | 501 +++++++++---------
.../Accommodation/AccommodationService.cs | 14 +-
4 files changed, 515 insertions(+), 475 deletions(-)
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js
index a0bf149da..692230d71 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormRoom.js
@@ -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 += '
';
@@ -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 = '';
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
index 97304ee77..0837a154c 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Index.js
@@ -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) });
}
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js
index c926eb781..3ddb84289 100644
--- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js
+++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/IndexDistribution.js
@@ -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) });
}
};
diff --git a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs
index fbeb67e83..106eadc10 100644
--- a/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs
+++ b/Learun.Framework.Ultimate V7/Learun.Framework.Module/Learun.Application.Module/Learun.Application.TwoDevelopment/LogisticsManagement/Accommodation/AccommodationService.cs
@@ -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
(strSql.ToString(), dp, pagination).OrderBy(a => a.Name).ThenBy(a => a.Name).ToList();
}
catch (Exception ex)