96 lines
3.9 KiB
Plaintext
96 lines
3.9 KiB
Plaintext
@{
|
|
ViewBag.Title = "有害因素选择";
|
|
}
|
|
<div style="width:100%">
|
|
<table class="t1" style="width:100%">
|
|
<tr>
|
|
<td class="ltd" style="width:100px">类别简码:</td>
|
|
<td class="rtd" style="width:120px"><input id="yhlbpy" class="l-text" ,name="yhlbpy" /></td>
|
|
<td class="ltd" style="width:100px">因素简码:</td>
|
|
<td class="rtd" style="width:120px"><input id="yhyspy" class="l-text" name="yhyspy" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="ltd" style="width:100px">有害类别:</td>
|
|
<td class="rtd" style="width:120px" colspan="3">@Html.DropDownList("yhlb", ViewData["yhlb"] as SelectList, "全部", new { @id = "yhlb",@style="width:250px;" })</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="rtd" colspan="4"><div id="search" align="center" >查询</div> </td>
|
|
</tr>
|
|
</table>
|
|
</div>
|
|
<div id="chargeProjectList">
|
|
</div>
|
|
<div align="center"><input type="button" class="l-button" value="添加" onclick="returnS()" /></div>
|
|
@section scripts{
|
|
<script type="text/javascript">
|
|
function returnS() {
|
|
var ids = liger.get("chargeProjectList").getSelectedRows();
|
|
var idss = "";
|
|
var lbss = "";
|
|
var ysss = "";
|
|
var lbssid = "";
|
|
for (var i = 0; i < ids.length;i++) {
|
|
idss += ids[i].id + ",";
|
|
ysss += ids[i].harmful_factor_name + ",";
|
|
lbss += ids[i].harmful_factor_type_name + ",";
|
|
lbssid += ids[i].harmful_factor_type + ",";
|
|
}
|
|
window.parent.init(idss,lbss,ysss,lbssid);
|
|
}
|
|
|
|
|
|
function GetQueryString(name)
|
|
{
|
|
var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)");
|
|
var r = window.location.search.substr(1).match(reg);
|
|
if(r!=null)return unescape(r[2]); return null;
|
|
}
|
|
|
|
var ids;
|
|
//查询有害因素
|
|
function cxyhys() {
|
|
//$("#yhlb option:selected").val() 对应表harmful_factors_type_maintain中的code字段
|
|
liger.get("chargeProjectList").set("parms", { hylbpy: $("#yhlbpy").val(), hyyspy: $("#yhyspy").val(), hylb: $("#yhlb option:selected").val() });
|
|
liger.get("chargeProjectList").changePage("first");
|
|
liger.get("chargeProjectList").reload();
|
|
}
|
|
$(function () {
|
|
$("#search").ligerButton({
|
|
click: cxyhys
|
|
});
|
|
ids = GetQueryString("ids");
|
|
$("#chargeProjectList").ligerGrid({
|
|
url: "@Url.Action("GetyhysList")",
|
|
title: "有害因素列表",
|
|
parms: { hylbpy: $("#yhlbpy").val(), hyyspy: $("#yhyspy").val(), hylb: $("#yhlb option:selected").val()},
|
|
columns: [
|
|
{ name: "id", display: "编码", width: 30, align: "left" },
|
|
{ name: "harmful_factor_type", display: "类别编码", width: 60, align: "left" },
|
|
{ name: "harmful_factor_name", display: "有害因素", width: 100, align: "left" },
|
|
{ name: "harmful_factor_type_name", display: "有害类别", width: 250, align: "left" }
|
|
], width: "98%",
|
|
height: "100%",
|
|
rownumbers: false,
|
|
fixedCellHeight: false,
|
|
usePager: false,
|
|
onAfterShowData: function (currrow) {
|
|
for (var i = 0; i < currrow.Rows.length; i++) {
|
|
var idl = ids.split(',');
|
|
for (var j = 0; j < idl.length; j++) {
|
|
if (idl[j] == currrow.Rows[i].id) {
|
|
liger.get("chargeProjectList").select(currrow.Rows[i]);
|
|
}
|
|
}
|
|
}
|
|
},
|
|
heightDiff: -20
|
|
, checkbox: true
|
|
});
|
|
});
|
|
</script>
|
|
}
|
|
|
|
|
|
|
|
|