From 8154009c5b4e56d41a37ffc4d932bc71e85c94c7 Mon Sep 17 00:00:00 2001 From: ndbs Date: Fri, 2 Sep 2022 11:20:49 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=BF=E8=88=8D=E5=88=86=E9=85=8D-=E5=88=86?= =?UTF-8?q?=E9=85=8D=E5=A4=9A=E4=B8=AA=E7=8F=AD=E7=BA=A7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Views/Accommodation/FormClass.js | 3 +- .../Views/Accommodation/FormRoom.js | 17 ++++++++- .../Views/Accommodation/IndexDistribution.js | 36 ++++++++++++++----- 3 files changed, 46 insertions(+), 10 deletions(-) diff --git a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClass.js b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClass.js index 4a3fd0578..d85d3145d 100644 --- a/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClass.js +++ b/Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/FormClass.js @@ -18,6 +18,7 @@ var bootstrap = function ($, learun) { bind: function () { $('#Class').lrselect({ + type: 'multiple',// default,tree,treemultiple,gird,multiple value: "classno", text: "classname" }); @@ -31,7 +32,7 @@ var bootstrap = function ($, learun) { if (item) { $('#Class').lrselectRefresh({ url: top.$.rootUrl + '/LR_SystemModule/DataSource/GetDataTable', - param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "'" } + param: { code: "bjsj", strWhere: "DeptNo='" + item.deptno + "' and majorno='" + item.majorno + "' order by classno desc" } }); } 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 be042398a..3c3061a1c 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 @@ -24,7 +24,22 @@ var bootstrap = function ($, learun) { if (!!keyValue) { $.lrSetForm(top.$.rootUrl + '/LogisticsManagement/Accommodation/GetBedListByRoomId?RoomId=' + keyValue, function (data) { $('#content').html(''); - var strWhere = " ClassNo='" + Class + "'"; + var strWhere = ""; + var cArray = Class.split(','); + if (cArray.length > 1) { + strWhere += '( ' + for (var j = 0; j < cArray.length; j++) { + if (j == 0) { + strWhere += ' ClassNo = ' + cArray[j] + ' '; + } else { + strWhere += ' or ClassNo = ' + cArray[j] + ' '; + } + } + strWhere += ') '; + } else { + strWhere += " ClassNo='" + Class + "'"; + } + //console.log(strWhere, "strWhere") if (Sex == '0') { strWhere += " and GenderNo=0"; } 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 ad35ac2ef..d656ca85b 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 @@ -426,15 +426,35 @@ var bootstrap = function ($, learun) { } }, { - 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: "Class", width: 100, align: "left", + formatterAsync: function (callback, value, row, op, $cell) { + if (value && value.indexOf(',') != -1) { + var content = ''; + var texts = value.split(','); + for (var i = 0; i < texts.length; i++) { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: texts[i], + keyId: 'classno', + callback: function (_data) { + content += _data['classname'] + ','; + } + }); } - }); + content = content.substring(0, content.length - 1); + callback(content); + } else { + learun.clientdata.getAsync('custmerData', + { + url: '/LR_SystemModule/DataSource/GetDataTable?code=' + 'bjsj', + key: value, + keyId: 'classno', + callback: function (_data) { + callback(_data['classname']); + } + }); + } } }, {