Browse Source

【修改】学生宿舍查看:优化详细信息,null,undefined显示为空或0;

yanshi
dyy 2 years ago
parent
commit
0e4ce7b9c3
1 changed files with 8 additions and 5 deletions
  1. +8
    -5
      Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml

+ 8
- 5
Learun.Framework.Ultimate V7/Learun.Application.Web/Areas/LogisticsManagement/Views/Accommodation/Floor.cshtml View File

@@ -169,6 +169,9 @@
result = _data.f_fullname;
}
});
if (result == null || result == undefined) {
result = "";
}

return result;
},
@@ -234,7 +237,7 @@
var echarts1;
//圆形图
var i = 0;
var g = (floor.HasStudentNum / floor.BedNum) * 100 + "%";
var g = floor.BedNum == 0 ? 0 : ((floor.HasStudentNum / floor.BedNum) * 100).toFixed(2) + "%";
layer.open({
type: 1,
closeBtn: 2,
@@ -247,22 +250,22 @@
'</div>' +
'<div class="laySec1R">' +
'<div><div class="laySec1Txt"><span>负&nbsp;责&nbsp;人</span>' + floor.dormitory.Functionary + '</div> <div class="laySec1Txt"><span>负责人电话</span>' + floor.dormitory.Phone + '</div></div>' +
'<div class="laySec1Txt"><span>校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</span>' + this.filter_company(floor.dormitory.Campus) + '</div>' +
'<div class="laySec1Txt"><span>校&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;区</span>' + (floor.dormitory.Campus == "" || floor.dormitory.Campus == null || floor.dormitory.Campus==undefined ? "" : this.filter_company(floor.dormitory.Campus)) + '</div>' +
'<div class="laySec1Txt"><span>地&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;址</span>' + floor.dormitory.Address + '</div>' +
'</div>' +
'</div>' +
'<div class="layer_sec layer_sec2">' +
'<ul class="laySec2List">' +
'<li><span>编&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;号</span>' + floor.dormitory.Name + '</li>' +
'<li><span>价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格</span>' + floor.dormitory.Price + ' <i>元</i></li>' +
'<li><span>价&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;格</span>' + (floor.dormitory.Price == "" || floor.dormitory.Price == null || floor.dormitory.Price == undefined ? 0 : floor.dormitory.Price) + ' <i>元</i></li>' +
'<li><span>单&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;元</span>' + floor.UnitNum + ' <i>个</i></li>' +
'<li><span>入&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;住</span>' + floor.HasStudentNum + ' <i>人</i></li>' +
'<li><span>楼&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;层</span>' + floor.floorNum + ' <i>层</i></li>' +
'<li><span>空&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;床</span>' + floor.NoStudentNum + ' <i>床</i></li>' +
'<li><span>房&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;间</span>' + floor.RoomNum + ' <i>间</i></li>' +
'<li><span>涉及院系</span>' + this.filter_Dept(floor.dormitory.Dept) + '</li>' +
'<li><span>涉及院系</span>' + (floor.dormitory.Dept == "" || floor.dormitory.Dept == null || floor.dormitory.Dept == undefined ? "" : this.filter_Dept(floor.dormitory.Dept)) + '</li>' +
'<li><span>床&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;位</span>' + floor.UnitNum + ' <i>个</i></li>' +
'<li><span>涉及专业</span>' + this.filter_Major(floor.dormitory.Major) + '</li>' +
'<li><span>涉及专业</span>' + (floor.dormitory.Major == "" || floor.dormitory.Major == null || floor.dormitory.Major == undefined ? "" : this.filter_Major(floor.dormitory.Major)) + '</li>' +
'</ul>' +
'<div class="laySec2Btn">' +
//'<a href="#"><img @@click="update(floor.dormitory.ID)" src="/Content/images/floor/inSec1-1.png" alt="" /></a>' +


Loading…
Cancel
Save