최초커밋
This commit is contained in:
43
barobill/convImg/createTaxImg.asp
Normal file
43
barobill/convImg/createTaxImg.asp
Normal file
@@ -0,0 +1,43 @@
|
||||
<% @Language="VBScript" CODEPAGE="65001" %>
|
||||
<%
|
||||
ntsUrl = Request("ntsurl")
|
||||
ntsNum = Request("ntsnum")
|
||||
%>
|
||||
<link rel="stylesheet" href="/barobill/convImg/barobill.css">
|
||||
<link rel="stylesheet" href="/barobill/convImg/dti.css">
|
||||
<link rel="stylesheet" href="/barobill/convImg/layout.css">
|
||||
<script src="/js/jquery.min.js"></script>
|
||||
<script src="/js/html2canvas.js"></script>
|
||||
<script>
|
||||
$.ajax({
|
||||
url : "/barobill/proxy.asp?ntsurl=" + encodeURIComponent("<%=ntsUrl%>"),
|
||||
success:function(response) {
|
||||
$("#resultDiv").html(response);
|
||||
html2canvas($("#toImgDiv")[0]).then(function(canvas){
|
||||
var imgData = canvas.toDataURL("image/png");
|
||||
imgData = imgData.replace('data:image/png;base64,','');
|
||||
|
||||
$.ajax({
|
||||
url: "./createTaxFile.asp",
|
||||
type: "POST",
|
||||
data: {"imgdata" : imgData, "ntsnum" : "<%= ntsNum%>" },
|
||||
success: function(filePath){
|
||||
//console.log(filePath);
|
||||
var tmpHtml = "";
|
||||
tmpHtml += "<input type='hidden' name='doc_attach_file' value='" + filePath + "' />";
|
||||
tmpHtml += "<div class='attach_preview'>";
|
||||
tmpHtml += " <img src='" + filePath + "' />";
|
||||
tmpHtml += "</div>";
|
||||
$(top.document).find(".attach_div").append(tmpHtml);
|
||||
|
||||
//self.close();
|
||||
}
|
||||
})
|
||||
});
|
||||
}
|
||||
});
|
||||
</script>
|
||||
<div style="display:inline-block; width:auto; padding:20px;" id="toImgDiv">
|
||||
<div class="invoice-view invoice-view-blue" id="resultDiv" style="width:830px;">
|
||||
</div>
|
||||
</div>
|
||||
Reference in New Issue
Block a user