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

314 lines
13 KiB
Plaintext

@{
ViewBag.Title = "总结报告";
}
@section scripts{
<script type="text/javascript">
var openf;
$(function () {
$("#layout1").ligerLayout({ topHeight: 86 });
$("#start").ligerDateEditor();
$("#end").ligerDateEditor();
$("#start").ligerGetDateEditorManager().setValue(fun_date(-30));
$("#end").ligerGetDateEditorManager().setValue(fun_date(0));
$("#grid1").ligerGrid({
height: '100%',
columns: [
{ display: '报告编码', name: 'report_num', align: 'left', width: 70 },
{ display: '受检单位', name: 'subject_company', align: 'left', width: 200 },
{ display: '开始日期', name: 'check_start_time', align: 'left', width: 100 },
{ display: '结束日期', name: 'check_start_time', align: 'left', width: 100 },
{ display: '编制人', name: 'report_person', align: 'left', width: 70 },
{ display: '编制日期', name: 'report_date', align: 'left', width: 100 },
{ display: '审核退详信息', name: 'approve_back_desc', align: 'left', width: 150 },
{ display: '签发退详信息', name: 'issue_back_desc', align: 'left', width: 150 }
],
url: "@Url.Action("getData")",
pageSize: 30,
rownumbers: true,
usePager: false,
isSingleCheck: true,
fixedCellHeight: false
});
$("#bt1").click(function () {
openf = $.ligerDialog.open({
url: "@Url.Action("Add")",
title: "添加",
width: 900,
height: 650
});
});
$("#bt2").click(function () {
var selectRow = liger.get("grid1").getSelectedRow();
if (selectRow == null) {
$.ligerDialog.error("先选择编号!")
return;
}
openf = $.ligerDialog.open({
url: "@Url.Action("Add")?id=" + selectRow.id,
title: "修改",
width: 900,
height: 650
});
});
$("#bt3").click(function () {
var selectRow = liger.get("grid1").getSelectedRow();
if (selectRow == null) {
$.ligerDialog.error("先选择编号!")
return;
}
//获取统计
$.ajax(
{
url: "@Url.Action("Del")", type: "post", dataType: "json", data: { id: selectRow.id },
success: function (d) {
$.ligerDialog.closeWaitting();
alert(d.Message);
select();
},
beforeSend: function () {
$.ligerDialog.waitting("正在保存请稍后……");
}
});
});
$("#bt4").click(function () {
changeStatus("4","");
})
$("#bt5").click(function () {
changeStatus("5","");
})
$("#bt51").click(function () {
$.ligerDialog.prompt('撤回描述', '', true, function (yes, value) {
if (yes) changeStatus("51",value);
});
})
$("#bt6").click(function () {
changeStatus("6","");
})
$("#bt61").click(function () {
$.ligerDialog.prompt('撤回描述', '', true, function (yes, value) {
if (yes) changeStatus("61", value);
});
})
/* $("#bt7").click(function () {
print();
})*/
$("#bt5").hide(); $("#bt51").hide(); $("#bt6").hide(); $("#bt61").hide(); $("#bt7").hide();
$(":radio").click(function () {
var sort = $(this).val();
$("#bt1").show(); $("#bt2").show(); $("#bt3").show(); $("#bt4").show(); $("#bt5").show(); $("#bt51").show(); $("#bt6").show(); $("#bt61").show(); $("#bt7").show(); $("#bt8").show();
switch (sort) {
case "1":
$("#bt5").hide(); $("#bt51").hide(); $("#bt6").hide(); $("#bt61").hide(); $("#bt7").hide();
break;
case "2":
$("#bt1").hide(); $("#bt3").hide(); $("#bt4").hide(); $("#bt6").hide(); $("#bt61").hide(); $("#bt7").hide();
break;
case "3":
$("#bt1").hide(); $("#bt3").hide(); $("#bt4").hide(); $("#bt5").hide(); $("#bt51").hide(); $("#bt7").hide();
break;
case "4":
$("#bt1").hide(); $("#bt3").hide(); $("#bt4").hide(); $("#bt5").hide(); $("#bt51").hide(); $("#bt6").hide(); $("#bt61").hide();
break;
}
select();
});
$("#btSelect").click(function () {
select();
});
select();
});
function select() {
var sort = $('input[name="report"]:checked').val();
var start = $('#start').val();
var end = $('#end').val();
var where = $('#where').val();
liger.get("grid1").set("parms", { start: start, end: end, where: where, sort: sort });
liger.get("grid1").reload();
}
function changeStatus(sort, descript) {
var selectRow = liger.get("grid1").getSelectedRow();
if (selectRow == null) {
$.ligerDialog.error("先选择编号!")
return;
}
$.ajax(
{
url: "@Url.Action("changeStatus")", type: "post", dataType: "json", data: { id: selectRow.id, sort: sort, descript: descript },
success: function (d) {
$.ligerDialog.closeWaitting();
alert(d.Message);
select();
},
beforeSend: function () {
$.ligerDialog.waitting("正在保存请稍后……");
}
});
}
function print() {
//alert("打印");
}
function fun_date(days) {
var date1 = new Date(),
time1 = date1.getFullYear() + "-" + (date1.getMonth() + 1) + "-" + date1.getDate();//time1表示当前时间
var date2 = new Date(date1);
date2.setDate(date1.getDate() + days);
var y = date2.getFullYear();
var m = date2.getMonth() + 1;
m = m < 10 ? '0' + m : m;
var d = date2.getDate();
d = d < 10 ? ('0' + d) : d;
var time2 = y + "-" + m + "-" + d;
return time2;
}
$("#bt7").click(function () {
hzbg('打印');
});
$("#bt8").click(function () {
hzbg('预览');
});
$("#bt9").click(function () {
//2023-12-13 xulu 添加加载弹窗
var wait = $.ligerDialog.waitting("正在分析打印内容,请稍后……");
setTimeout(function () {
var report_num = liger.get("grid1").getSelectedRow().report_num;
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
if (window.top.Formium.external.Print.finit("cghzbg.frx")) {
window.top.Formium.external.Print.PrintHZBG(report_num, '预览');
wait.close()
}
}, 500);
});
$("#bt10").click(function () {
//2023-12-13 xulu 添加加载弹窗
var wait = $.ligerDialog.waitting("正在分析打印内容,请稍后……");
setTimeout(function () {
var report_num = liger.get("grid1").getSelectedRow().report_num;
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
if (window.top.Formium.external.Print.finit("cghzbg.frx")) {
window.top.Formium.external.Print.PrintHZBG(report_num, '下载');
wait.close()
}
}, 500);
});
$("#bt11").click(function () {
//2023-12-13 xulu 添加加载弹窗
var wait = $.ligerDialog.waitting("正在分析打印内容,请稍后……");
setTimeout(function () {
var report_num = liger.get("grid1").getSelectedRow().report_num;
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
if (window.top.Formium.external.Print.finit("hzbg.frx")) {
window.top.Formium.external.Print.PrintHZBG(report_num, '下载');
wait.close()
}
}, 500);
});
function hzbg(lx) {
//2023-12-13 xulu 添加加载弹窗
var wait = $.ligerDialog.waitting("正在分析打印内容,请稍后……");
setTimeout(function () {
var report_num = liger.get("grid1").getSelectedRow().report_num;
var url = "@(Request.Url.Scheme + "://" + Request.Url.Authority + Url.Content("~/"))";
if (window.top.Formium.external.Print.finit("hzbg.frx")) {
window.top.Formium.external.Print.PrintHZBG(report_num, lx);
wait.close()
}
}, 500);
}
</script>
}
<div class="l-clear"></div>
<div id="layout1">
<div position="center" title="个人信息">
<table class="t1" style="width: 100%">
<tr>
<td class="ltd" width="100px">开始时间:</td>
<td class="rtd">
<input type="text" id="start" />
</td>
<td class="ltd" width="100px">结束时间:</td>
<td class="rtd">
<input type="text" id="end" />
</td>
<td class="ltd" width="100px">编号或公司:</td>
<td class="rtd">
<input type="text" id="where" class="l-text" />
</td>
<td class="rtd">
<input type="button" id="btSelect" value="查询" class="l-button" />
</td>
</tr>
</table>
<div id="grid1"></div>
</div>
<div position="top">
<table class="t1" style="width: 100%;">
<tr>
<td class="rtd" style="text-align:center">
<input type="radio" value="1" name="report" checked="checked" />报告编制
<input type="radio" value="2" name="report" />报告审核
<input type="radio" value="3" name="report" />报告签发
<input type="radio" value="4" name="report" />报告打印
</td>
</tr>
<tr>
<td class="rtd" style="text-align:center">
<input type="button" id="bt1" value="添加" class="l-button" style="height:40px" />
<input type="button" id="bt2" value="修改" class="l-button" style="height:40px" />
<input type="button" id="bt3" value="删除" class="l-button" style="height:40px" />
<input type="button" id="bt4" value="提交" class="l-button" style="height:40px" />
<input type="button" id="bt5" value="审核" class="l-button" style="height:40px" />
<input type="button" id="bt51" value="审核撤回" class="l-button" style="height:40px" />
<input type="button" id="bt6" value="签发" class="l-button" style="height:40px" />
<input type="button" id="bt61" value="签发撤回" class="l-button" style="height:40px" />
<input type="button" id="bt7" value="打印" class="l-button" style="height:40px;display:none" />
<input type="button" id="bt8" value="预览" class="l-button" style="height:40px" />
<input type="button" id="bt11" value="下载" class="l-button" style="height:40px" />
<input type="button" id="bt9" value="预览常规报告" class="l-button" style="height:40px" />
<input type="button" id="bt10" value="下载常规报告" class="l-button" style="height:40px" />
</td>
</tr>
</table>
</div>
</div>
<div class="dispReport">
<object classid="clsid:F6A015E2-092A-4006-93DA-4CBDE3AFF4B8" id="window.top.Formium.external.Print" width="300" height="50"></object>
</div>
<div style="display:none;"></div>