$(function () {
var examinationRegistConfirmNo = $.SystemGeneral.getUrlParam("examinationRegistConfirmNo");
var projectList;
$.postWithLoading(CMS_SystemConfig.VirtualDirectoryPath + '/StudentFee/PrintSaveGDCX', { examinationRegistConfirmNo: examinationRegistConfirmNo }, function (ret) {
if (ret.IsSuccess && ret.Data != null) {
top.$.messager.alert("提示", "缴费成功。");
projectList = ret.Data.projectList;
setprojectList(projectList);
beginprint(ret.Data);
} else {
top.$.messager.alert("错误", ret.Message);
}
});
})
function setprojectList(projectList) {
var table = $("#projectList");
var appendtr = "
"+
"项目名称 | "+
"收费项目 | "+
"人数 | "+
"金额 | "+
"
";
$.each(projectList,function (index,value) {
appendtr += "";
appendtr += " ";
appendtr += " " + value.ExaminationProjectName;
appendtr += " | ";
appendtr += " ";
appendtr += " " + value.ExaminationProjectFeeName;
appendtr += " | ";
appendtr += " ";
appendtr += " " + value.StudentCount;
appendtr += " | ";
appendtr += " ";
appendtr += " " + value.Fee;
appendtr += " | ";
appendtr += "
";
});
appendtr += "" +
"合计人民币(大写) | " +
"" +
" 万 " +
" 仟 " +
" 佰 " +
" 拾 " +
" 圆 " +
" 角 " +
" 分 ¥" +
" | " +
"
";
appendtr += "" +
" 注意事项:1、本收据是缴费的有效凭证,请妥善保管好。 | " +
"
" +
"" +
" 2、如需要发票,可凭此收据到财务换取。 | " +
"
";
table.append(appendtr);
}
function beginprint(data) {
$("#receiptNo").html(data.ReceiptNo);
$("#collegeName").html(data.College);
$("#classmajorName").html(data.Classmajor);
$("#confirmNo").html(data.ConfirmNo);
$("#lblTenThousand").html(data.TenThousand);
$("#lblThousand").html(data.Thousand);
$("#lblHundred").html(data.Hundred);
$("#lblTen").html(data.Ten);
$("#lblYuan").html(data.Yuan);
$("#lblJiao").html(data.Jiao);
$("#lblFen").html(data.Fen);
$("#openUser").html(data.Operator);
$("#operator").html(data.Operator);
//$("#lblTotal1").html(data.Total);
//$("#lblOperator").html(data.Operator);
$("#lblYear").html(data.Year);
$("#lblMonth").html(data.Month);
$("#lblDay").html(data.Day);
if (!!window.ActiveXObject || "ActiveXObject" in window) {
PrintArea.Remove_IE_Header_And_Footer();
}
$("#content").printArea({ mode: "iframe" });
return false;
}