| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521 |
- <%@ include file="../common/header.jsp"%>
- <script type="text/javascript" src="./js/jquery/jquery-1.4.2.min.js"></script>
- <script type="text/javascript">
- var errorhandler = function(xhr, textStatus, error){
- // do something on error case
- };
-
- $(document).ready(function() {
-
- $("#queryKonven").attr("disabled", true);
- $("#rekon").attr("disabled", true);
-
- var errorhandler = function(xhr, textStatus, error){
- $("#alertContainer").html("error ocurredx");
- };
-
- $("#viewRekonData").click(function() {
- $("#viewRekonData").attr("disabled", true);
-
- $.post(
- "rekonPrima.do" ,
- {
- action: 'viewRekonInfo',
- fileDate: $('#fileDate').val(),
- folder: 'REKON/PRIMA',
- rekonAction: 'PRIMA_ACTION_FTP',
- rekonAction2: 'PRIMA_PRINT_ACTION',
- rekonAction3: 'PRIMA_LAPORAN_PRINT_ACTION'
- } ,
- function(data){
- var downloadedFiles = data["downloadedFiles"];
- $("#downloadedListTable > tbody").find("tr").remove();
- if (downloadedFiles != "NOT_EXISTS") {
- for (var i=0; i < downloadedFiles.length; i++) {
- var downloadedFile = downloadedFiles[i];
- var downloadLink = "?rekonPrima.do?action=download&file=";
- downloadLink = '<a href="rekonPrima.do?action=download&file='+ downloadedFile.fileName +'&folder=' + downloadedFile.directory + '">' + downloadedFile.fileName + '</a>';
- $("#downloadedListTable > tbody").append('<tr class="tr1"><td>' + downloadLink + '</td><td>' + downloadedFile.fileSize + '</td><td>' + downloadedFile.dateTime + '</td><td></td></tr>');
- }
-
- if(downloadedFile.fileSize > 0) {
- $("#download").attr("disabled", true);
- $("#queryKonven").attr("disabled", false);
- }
- else{
- $("#download").attr("disabled", false);
- $("#queryKonven").attr("disabled", false);
- }
-
- $("#downloadAlert").html("Success get download files");
- } else {
- $("#downloadAlert").html("Generate file not exist");
- }
-
- var rekonFiles = data["rekonFiles"];
- $("#rekonListTable > tbody").find("tr").remove();
- if (rekonFiles != "NOT_EXISTS") {
- for (var i=0; i < rekonFiles.length; i++) {
- var downloadedFile = rekonFiles[i];
- var downloadLink = "?rekonPrima.do?action=download&file=";
- downloadLink = '<a href="rekonPrima.do?action=download&file='+ downloadedFile.fileName +'&folder=' + downloadedFile.directory + '">' + downloadedFile.fileName + '</a>';
- $("#rekonListTable > tbody").append('<tr class="tr1"><td>' + downloadLink + '</td><td>' + downloadedFile.fileSize + '</td><td>' + downloadedFile.dateTime + '</td><td></td></tr>');
- }
- if(rekonFiles.fileSize > 0) {
- $("#rekon").attr("disabled", true);
- }
- else{
- $("#rekon").attr("disabled", false);
- }
-
- $("#rekonAlert").html("Success get rekon files");
- } else {
- $("#rekonAlert").html("Rekon files not exist");
- }
-
- $("#downloadAlert").fadeIn();
- $("#downloadAlert").delay(<bean:message key="rekon.jquery.delay"/>).fadeOut(<bean:message key="rekon.jquery.fadeout"/>);
-
- $("#queryKonvenAlert").fadeIn();
- $("#queryKonvenAlert").delay(<bean:message key="rekon.jquery.delay"/>).fadeOut(<bean:message key="rekon.jquery.fadeout"/>);
-
- $("#rekonAlert").fadeIn();
- $("#rekonAlert").delay(<bean:message key="rekon.jquery.delay"/>).fadeOut(<bean:message key="rekon.jquery.fadeout"/>);
-
- $("#viewRekonData").attr("disabled", false);
- }, "json"
- );
- });
-
- $("#download").click(function() {
-
- //DOWNLOAD CLICKED
- $("#download").attr("disabled", true);
- $('#step').val("PRIMA_PROC")
-
- $.ajax({
- url: 'rekonPrima.do',
- data: {
- action: 'downloadPrima',
- fileDate: $('#fileDate').val(),
- chanel: $('#biller').val(),
- step: 'PRIMA_PROC',
- rekonAction: 'PRIMA_ACTION_FTP'
- },
- type: 'post',
- success: function(response){
-
- if (response.length > 0) {
- $("#downloadedListTable > tbody").find("tr").remove();
- for (var i=0; i < response.length; i++) {
- var downloadedFile = response[i];
- var downloadLink = "?rekonPrima.do?action=download&file=";
- downloadLink = '<a href="rekonPrima.do?action=download&file='+ downloadedFile.fileName +'&folder=' + downloadedFile.directory + '">' + downloadedFile.fileName + '</a>';
- $("#downloadedListTable > tbody").append('<tr class="tr1"><td>' + downloadLink + '</td><td>' + downloadedFile.fileSize + '</td><td>' + downloadedFile.dateTime + '</td><td></td></tr>');
- }
-
- if(downloadedFile.fileSize == 0) {
- $("#download").attr("disabled", false);
- $("#queryKonven").attr("disabled", true);
- }else{
- $("#download").attr("disabled", true);
- $("#queryKonven").attr("disabled", false);
- }
-
- $("#downloadAlert").html("Success download files");
- $("#download").attr("disabled", true);
- $("#queryKonven").attr("disabled", false);
- } else {
- $("#downloadAlert").html("Download files not exist");
- $("#download").attr("disabled", false);
- $("#queryKonven").attr("disabled", true);
- }
- $("#downloadAlert").fadeIn();
- $("#downloadAlert").delay(<bean:message key="rekon.jquery.delay"/>).fadeOut(<bean:message key="rekon.jquery.fadeout"/>);
- },
- error: errorhandler,
- dataType: 'json'
- });
- });
-
- $("#queryKonven").click(function() {
- $("#queryKonven").attr("disabled", true);
- $('#step').val("BTN_PRIMA_PROC")
-
- $.ajax({
- url: 'rekonPrima.do',
- data: {
- action: 'downloadKonven',
- fileDate: $('#fileDate').val(),
- chanel: $('#biller').val(),
- step: 'BTN_PRIMA_PROC',
- rekonAction: 'BTN_PRIMA_ACTION_PRINT'
- },
- type: 'post',
- success: function(response){
- if (response.length > 0) {
- $("#queryKonvenListTable > tbody").find("tr").remove();
- $("#queryKonven").attr("disabled", true);
- $("#rekon").attr("disabled", false);
- $("#downloadAlert").html("Success download files");
- } else {
- $("#downloadAlert").html("Download files not exist");
- $("#queryKonven").attr("disabled", false);
- $("#rekon").attr("disabled", true);
- }
- $("#downloadAlert").fadeIn();
- $("#downloadAlert").delay(<bean:message key="rekon.jquery.delay"/>).fadeOut(<bean:message key="rekon.jquery.fadeout"/>);
- },
- error: errorhandler,
- dataType: 'json'
- });
- });
-
- $("#rekon").click(function() {
- //DOWNLOAD SYARIAH CLICKED
- $("#rekon").attr("disabled", true);
- $('#step').val("PRIMA_COMPARE_PROC")
- $('#step2').val("PRIMA_PRINT_PROC")
-
- $.ajax({
- url: 'rekonPrima.do',
- data: {
- action: 'rekonPrima',
- fileDate: $('#fileDate').val(),
- chanel: $('#biller').val(),
- step: 'PRIMA_COMPARE_PROC',
- step2: 'PRIMA_PRINT_PROC',
- rekonAction2: 'PRIMA_PRINT_ACTION',
- rekonAction3: 'PRIMA_LAPORAN_PRINT_ACTION'
- },
- type: 'post',
- success: function(response){
-
- if (response.length > 0) {
- $("#rekonListTable > tbody").find("tr").remove();
- for (var i=0; i < response.length; i++) {
- var downloadedFile = response[i];
- var downloadLink = "?rekonPrima.do?action=download&file=";
- downloadLink = '<a href="rekonPrima.do?action=download&file='+ downloadedFile.fileName +'&folder=' + downloadedFile.directory + '">' + downloadedFile.fileName + '</a>';
- $("#rekonListTable > tbody").append('<tr class="tr1"><td>' + downloadLink + '</td><td>' + downloadedFile.fileSize + '</td><td>' + downloadedFile.dateTime + '</td><td></td></tr>');
- }
-
- $("#rekon").attr("disabled", true);
- $("#downloadAlert").html("Success download files");
- } else {
- $("#rekon").attr("disabled", false);
- $("#downloadAlert").html("Download files not exist");
- }
- $("#downloadAlert").fadeIn();
- $("#downloadAlert").delay(<bean:message key="rekon.jquery.delay"/>).fadeOut(<bean:message key="rekon.jquery.fadeout"/>);
- },
- error: errorhandler,
- dataType: 'json'
- });
- });
- });
-
- function doGenerate(folder){
- var form = document.forms.rekonForm;
- form.folder.value=folder;
- form.action.value="view";
- form.submit();
- }
-
- function page(start, count){
- document.forms.appSetting.start.value=start;
- document.forms.appSetting.count.value=count;
- document.forms.appSetting.action.value="list";
- document.forms.appSetting.submit();
- }
- function doChangePage(count){
- document.forms.appSetting.start.value= (document.forms.appSetting.startx.value-1)*20;
- if(document.forms.appSetting.start.value=="NaN") document.forms.appSetting.start.value = 0;
- document.forms.appSetting.count.value=count;
- document.forms.appSetting.action.value="list";
- document.forms.appSetting.submit();
- //doDisable(document.forms.appSetting, "button");
- }
- function fillIndex(val){
- document.forms.appSetting.startx.value = val.value;
- }
-
- function doCreate(){
- document.forms.rekonFirst.action.value="generate";
- document.forms.rekonFirst.chanel.value = document.forms.rekonForm.billler.value;
- document.forms.rekonFirst.submit();
- doDisable(document.forms.rekonFirst, "button");
- }
- function doDetail(code){
- document.forms.appSetting.code.value=code;
- document.forms.appSetting.action.value="detail";
- document.forms.appSetting.submit();
- }
- function doFilter(){
- document.forms.appSetting.action.value="list";
- document.forms.appSetting.submit();
- doDisable(document.forms.appSetting, "button");
- }
- function doReset(){
- document.forms.appSetting.appSetting_code_filter.value="";
- document.forms.appSetting.appSetting_name_filter.value="";
- document.forms.appSetting.clear.value="true";
- document.forms.appSetting.action.value="list";
- document.forms.appSetting.submit();
- doDisable(document.forms.appSetting, "button");
- }
- function doOrder(field, type){
- document.forms.appSetting.appSetting_fieldOrder.value=field;
- document.forms.appSetting.appSetting_orderType.value=type;
- document.forms.appSetting.action.value="list";
- document.forms.appSetting.submit();
- doDisable(document.forms.status, "button");
- }
- </script>
- <!-- CONTENT -->
- <form name="rekonForm" method="post" action="rekonPrima.do">
- <input type="hidden" name="start" value="">
- <input type="hidden" name="startx" value="">
- <input type="hidden" name="action" value="">
- <input type="hidden" name="count" value="">
- <input type="hidden" name="code" value="">
- <input type="hidden" name="clear" value="">
- <input type="hidden" name="folder">
- <input type="hidden" name="focus_field" value=""/>
-
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td colspan="3" class="AddressTitle">REKON PRIMA</td>
- </tr>
- <tr>
- <td width="20%">Biller</td>
- <td width="2%">:</td>
- <td width="78%">
- Prima
- </td>
- </tr>
-
- <tr>
- <td width="20%">Rekon Date</td>
- <td width="2%">:</td>
- <td width="78%">
- <input type="text" id="fileDate" name="fileDate" value="" size="15" maxlength="10" >
- <a href="javascript:cal_rekonDate.popup();"><img src="./images/cal.gif" width="16" height="16" border="0" alt=""></a>
- <script type="text/javascript" language="javascript">
- var cal_rekonDate = new calendar1(document.forms['rekonForm'].elements['fileDate']);
- </script>
- </td>
- </tr>
- <tr>
- <td colspan="3">
- <input type="button" id="viewRekonData" name="viewRekonData" value="View">
- <!--input type="button" value="View" onclick="doGenerate('REKON/PRINT/KONVEN');"-->
- </td>
- </tr>
- </table>
- </form><br>
- <script language="javascript">
- function toggle(targetId) {
- target = document.all(targetId);
- if (target.style.display == "none"){
- target.style.display="";
- } else {
- target.style.display="none";
- }
- }
- //-->
- </script>
-
- <table width="100%" cellspacing="5" cellpadding="5">
- <tr>
- <td class="boxWhite">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td colspan="3">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td class="AddressTitle2">Download Prima</td>
- <td align="right" class="AddressTitle2">
- <a href="javascript:toggle('downloadLink','slide')">View</a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td colspan="3">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td class="AddressTitle2"><span id="downloadAlert"></span></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <div id="downloadLink">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td>
- <input type="reset" name="download" id="download" value="Download" />
- </td>
- <td> </td>
- </tr>
- </table><br>
- <table id="downloadedListTable" width="100%" border="0" cellspacing="1" cellpadding="2">
- <thead>
- <tr>
- <td class="titleField">Download Status</td>
- <td class="titleField">File Size</td>
- <td class="titleField">Date</td>
- <td class="titleField"> </td>
- </tr>
- </thead>
- <tbody>
- <tr class="tr1">
- <td align="center"> </td>
- <td align="center"> </td>
- <td align="center"> </td>
- <td align="center"> </td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- </tr>
- </table>
- <table width="100%" cellspacing="5" cellpadding="5">
- <tr>
- <td class="boxWhite">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td colspan="3">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td class="AddressTitle2">Query Konven</td>
- <td align="right" class="AddressTitle2">
- <a href="javascript:toggle('queryKonvenLink','slide')">View</a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td colspan="3">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td class="AddressTitle2"><span id="queryKonvenAlert"></span></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <div id="queryKonvenLink">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td>
- <input type="reset" name="queryKonven" id="queryKonven" value="Query" />
- </td>
- <td> </td>
- </tr>
- </table><br>
- <table id="queryKonvenListTable" width="100%" border="0" cellspacing="1" cellpadding="2">
- <thead>
- <tr>
- <td class="titleField">Download Status</td>
- <td class="titleField">File Size</td>
- <td class="titleField">Date</td>
- <td class="titleField"> </td>
- </tr>
- </thead>
- <tbody>
- <tr class="tr1">
- <td align="center"> </td>
- <td align="center"> </td>
- <td align="center"> </td>
- <td align="center"> </td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- </tr>
- </table>
- <table width="100%" cellspacing="5" cellpadding="5">
- <tr>
- <td class="boxWhite">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td colspan="3">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td class="AddressTitle2">Rekon </td>
- <td align="right" class="AddressTitle2">
- <a href="javascript:toggle('rekonLink','slide')">View</a>
- </td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <table width="100%" border="0" cellspacing="2" cellpadding="2">
- <tr>
- <td colspan="3">
- <table width="100%" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <td class="AddressTitle2"><span id="rekonAlert"></span></td>
- </tr>
- </table>
- </td>
- </tr>
- </table>
- <div id="rekonLink">
- <table width="100%" border="0" cellspacing="1" cellpadding="2">
- <tr>
- <td>
- <input type="reset" name="rekon" id="rekon" value="Rekon" />
- </td>
- <td> </td>
- </tr>
- </table><br>
- <table id="rekonListTable" width="100%" border="0" cellspacing="1" cellpadding="2">
- <thead>
- <tr>
- <td class="titleField">Rekon Status</td>
- <td class="titleField">File Size</td>
- <td class="titleField">Date</td>
- <td class="titleField"> </td>
- </tr>
- </thead>
- <tbody>
- <tr class="tr1">
- <td align="center"> </td>
- <td align="center"> </td>
- <td align="center"> </td>
- <td align="center"> </td>
- </tr>
- </tbody>
- </table>
- </div>
- </td>
- </tr>
- </table>
- <!-- END CONTENT -->
- <logic:notEmpty name="focus"><bean:write name="focus" filter="false" /></logic:notEmpty>
- <%@ include file="../common/footer.jsp"%>
|