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

150 lines
5.9 KiB
Plaintext

@{
ViewBag.Title = "通用体检方案维护";
}
<div style="width:100%">
</div>
<div id="ExamGroupList">
</div>
@section scripts{
<script type="text/javascript">
$(function () {
$("#search").ligerButton({
click: function () {
liger.get("ExamGroupList").set("parms", { key: $("#s_teamName").val() });
liger.get("ExamGroupList").changePage("first");
liger.get("ExamGroupList").reload();
}
});
init();
});
function Tjfnmx(item) {
var r = liger.get("ExamGroupList").getSelectedRow();
if (!r) {
$.ligerDialog.alert("请选择要查询的数据!");
return;
}
$.ligerDialog.open({
url: "@Url.Action("TjfnMxResult")?id=" + r.id,
title: item.text,
width: 600,
height: 500
});
}
function init() {
$("#ExamGroupList").ligerGrid({
url: "@Url.Action("GetTjfnList")",
toolbar: {
items: [
{
text: '查看明细', click: Tjfnmx, icon: 'view'
},
{
text: '添加通用体检方案', click: itemclick, icon: 'add'
},
{ line: true },
{ text: '修改通用体检方案', click: itemclick, icon: "edit" },
{ line: true },
{ text: '删除通用体检方案', click: itemclick, icon: "delete" },
{ text: '更新已登记打印项目', click: itemclick, icon: "clone" }
]
},
title: "通用体检方案",
parms: { key: $("#s_teamName").val() },
columns: [
{ name: "id", display: "编号", width: 30, align: "left" },
{ name: "scheme_name", display: "方案名称", width: 300, align: "left" },
{ name: "exam_type", display: "体检类型", width: 150, align: "left" },
{ name: "station_status", display: "在岗状态", width: 100, align: "left" },
{ name: "hazards", display: "有害因素", width: 320, align: "left" },
{ name: "expense_name", display: "费用名称", width: 80, align: "left" },
{ name: "recievable_amount", display: "应收费用", width: 80, align: "left" },
{ name: "agreement_amount", display: "协议金额", width: 80, align: "left" }
], width: "98%",
height: "100%",
rownumbers: true,
fixedCellHeight: false,
heightDiff: -20
});
if (openf)
openf.close();
}
var openf;
function itemclick(item) {
var id;
if (item.text === "删除通用体检方案") {
var r1 = liger.get("ExamGroupList").getSelectedRow();
if (!r1) {
$.ligerDialog.alert("请选择要删除的数据!");
return;
} else {
$.ajax({
url: "@Url.Action("TyTjdel")", 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("正在保存请稍后……");
}
});
}
}
if (item.text === "添加通用体检方案") {
id = "0";
openf = $.ligerDialog.open({
url: "@Url.Action("EditTyTjmx")?id=" + id,
width: 1300,//2023-10-20 xulu 修改950->1300
height: 650, title: item.text
});
}
else if (item.text === "修改通用体检方案") {
var r = liger.get("ExamGroupList").getSelectedRow();
if (!r) {
$.ligerDialog.alert("请选择要修改的数据!");
return;
}
id = r.id;
openf = $.ligerDialog.open({
url: "@Url.Action("EditTyTjmx")?id=" + id,
width: 1300,//2023-10-20 xulu 修改950->1300
height: 650, title: item.text
});
}
//2023-11-22 xulu 更新已登记打印项目
else if (item.text === "更新已登记打印项目") {
var r = liger.get("ExamGroupList").getSelectedRow();
if (!r) {
$.ligerDialog.alert("请选择要更新的方案!");
return;
} else {
$.ajax({
url: "@Url.Action("UpdatePrintIds")", type: "post", dataType: "json", data: { id: r.id, iType: 1 },
success: function (d) {
$.ligerDialog.closeWaitting();
$.ligerDialog.alert(d.Message);
},
beforeSend: function () {
$.ligerDialog.waitting("正在更新请稍后……");
}
});
}
}
}
</script>
}