tijian_tieying/web/dccdc/Views/Dictionaries/EnterpriceInfoMaintain.cshtml
2025-02-20 12:14:39 +08:00

144 lines
5.8 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="s_teamName" class="l-text" /></td>
<td class="rtd"><div id="search">查询</div></td>
</tr>
</table>
</div>
<div id="ExamGroupList">
</div>
<div id="ExamGroupMaintainModify" style="display:none">
</div>
@section scripts{
<script type="text/javascript">
function init() {
liger.get("ExamGroupList").reload();
openf.close();
}
$(function () {
$("#search").ligerButton({
click: function () {
liger.get("ExamGroupList").set("parms", { key: $("#s_teamName").val() });
liger.get("ExamGroupList").changePage("first");
liger.get("ExamGroupList").reload();
}
});
$("#ExamGroupList").ligerGrid({
url: "@Url.Action("GetEnterpriceInfoMaintainList")",
toolbar: {
items: [
{
text: '添加', click: itemclick, icon: 'add'
},
{ line: true },
{ text: '修改', click: itemclick, icon: "edit" },
{ line: true },
{ text: '删除', click: itemclick, icon: 'delete' },
{ line: true },
{ text: '维护负责人账号', click: whzh, icon: "edit" }
]
},
title: "体检类型列表",
parms: { key: $("#s_teamName").val() },
columns: [
{ name: "id", display: "id", width: 50, align: "left" },
{ name: "enterprise_name", display: "企业名称", width: 200, align: "left"},
{ name: "abbreviation", display: "缩写", width: 60, align: "left" },
{ name: "enterprise_pinyincode", display: "拼音", width: 100, align: "left" },
{ name: "post_id", display: "邮编", width: 60, align: "left" },
{ name: "address", display: "地址", width: 200, align: "left" },
{ name: "belong_area", display: "所属区域", width: 60, align: "left" },
{ name: "belong_trade", display: "分类", width: 60, align: "left" },
{ name: "org_code", display: "组织机构代码", width: 60, align: "left" },
{ name: "city_rural_type", display: "城乡类型", width: 60, align: "left" },
{ name: "school_type", display: "学校类型", width: 60, align: "left" },
{ name: "contacts", display: "联系人", width: 60, align: "left" },
{ name: "telephone", display: "联系电话", width: 120, align: "left" },
{ name: "email", display: "邮箱", width: 60, align: "left" },
{ name: "portraiture", display: "传真", width: 60, align: "left" },
{ name: "introduction", display: "简介", width: 60, align: "left"},
{ name: "status", display: "状态", width: 60, align: "left" },
{ name: "attribution", display: "归属", width: 60, align: "left" }
], width: "98%",
height: "100%",
rownumbers: true,
fixedCellHeight: false,
usePager: true,
heightDiff: -20
});
});
var id;
var openf;
function itemclick(item) {
if (item.text === "删除") {
var r1 = liger.get("ExamGroupList").getSelectedRow();
if (!r1) {
$.ligerDialog.alert("请选择要删除的数据!");
return;
} else {
$.ajax({
url: "@Url.Action("delEnterprise")", type: "post", dataType: "json", data: { id: r1.id },
success: function (d) {
$.ligerDialog.closeWaitting();
$.ligerDialog.alert(d.Message, function () {
if (d.State == 1) {
liger.get("ExamGroupList").reload();
return;
}
});
},
beforeSend: function () {
$.ligerDialog.waitting("正在保存请稍后……");
}
});
}
}
else {
if (item.text == "添加") {
id = "";
}
else if (item.text == "修改") {
var r = liger.get("ExamGroupList").getSelectedRow();
if (!r) {
$.ligerDialog.alert("请选择要修改的数据!");
return;
}
id = r.id;
}
openf= $.ligerDialog.open({
url: "@Url.Action("EditEnterpriceInfo")?id=" +id,
title: item.text,
width: 800,
height: 500
});
}
}
function whzh(item) {
var r = liger.get("ExamGroupList").getSelectedRow();
if (!r || r.attribution!="职业") {
$.ligerDialog.alert("请选择要维护的职业数据!");
return;
}
openf= $.ligerDialog.open({
url: "@Url.Action("weihuzhanghao")?id=" +r.id,
title: item.text,
width: 800,
height: 500
});
}
</script>
}