teguhsugiono891208

form modal

May 19th, 2019
113
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 13.03 KB | None | 0 0
  1. <html>
  2. <head>
  3. <link rel="stylesheet" href="<?php echo base_url() . 'assets/Thema1/css/'; ?>select2/select2.min.css">
  4. <style type="text/css">
  5. body { font-family: Verdana; }
  6. table td {
  7. padding: 5px;
  8. }
  9. /* div.dataTables_wrapper {
  10. width: 60%;
  11. margin: 0 auto;
  12. }*/
  13. </style>
  14.  
  15. <!-- <link rel="stylesheet" href="<?php echo base_url() . 'assets/datepicker/'; ?>smoothness/jquery-ui.css">
  16. <link rel="stylesheet" href="<?php echo base_url() . 'assets/datepicker/'; ?>jquery-ui.theme.css">-->
  17.  
  18. <script>
  19. $(document).ready(function(){
  20. $("#txtTglInvoice").datepicker({
  21. dateFormat : 'dd MM yy'
  22. })
  23. })
  24. </script>
  25.  
  26. <script>
  27. function convertToRupiah (objek) {
  28. separator = ".";
  29. a = objek.value;
  30. b = a.replace(/[^\d]/g,"");
  31. c = "";
  32. panjang = b.length;
  33. j = 0; for (i = panjang; i > 0; i--) {
  34. j = j + 1; if (((j % 3) == 1) && (j != 1)) {
  35. c = b.substr(i-1,1) + separator + c; } else {
  36. c = b.substr(i-1,1) + c; } } objek.value = c;
  37. }
  38. </script>
  39.  
  40.  
  41. </head>
  42. <body>
  43.  
  44. <div class="modal fade" id="modal_proses" role="dialog" aria-hidden="true" >
  45. <div class="modal-dialog" style="width: 99%">
  46. <div class="modal-content">
  47. <div class="modal-header">
  48. <button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
  49. <h3 class="modal-title" id="myModalLabel"></h3>
  50. </div>
  51.  
  52. <form id="form_biaya_tps" class="form-horizontal" method="post" action="#">
  53. <div class="modal-body">
  54.  
  55. <table width="100%" border="0">
  56. <tr>
  57. <td width="100px"><label class="control-label" for="NoBCF">No BCF</label></td>
  58. <td width="5px"><label class="control-label" for="titikdua">:</label></td>
  59. <td width="70px"><input name="txtNoBCF" id="txtNoBCF" class="form-control" type="text" value="<?php echo $nobcf; ?>" readonly></td>
  60. <td width="3px"></td>
  61. <td width="100px"><label class="control-label" for="TglBCF">Tgl BCF</label></td>
  62. <td width="5px"><label class="control-label" for="titikdua">:</label></td>
  63. <td width="100px"><input name="txtTglBCF" id="txtTglBCF" class="form-control" type="text" value="<?php echo $tglbcf; ?>" readonly></td>
  64. <td width="3px"></td>
  65. <td width="100px"><label class="control-label" for="NoBAP">No BAP</label></td>
  66. <td width="5px"><label class="control-label" for="titikdua">:</label></td>
  67. <td width="250px"><input name="txtNoBAP" id="txtNoBAP" class="form-control" type="text" value="<?php echo $nobap; ?>" readonly></td>
  68. <td width="3px"></td>
  69. <td width="100px"><label class="control-label" for="TglBAP">Tgl BAP</label></td>
  70. <td width="5px"><label class="control-label" for="titikdua">:</label></td>
  71. <td width="100px"><input name="txtTglBAP" id="txtTglBAP" class="form-control" type="text" value="<?php echo $tglbap; ?>" readonly></td>
  72. </tr>
  73.  
  74. <tr>
  75. <td><label class="control-label" for="vessel">Vessel/Voyage</label></td>
  76. <td><label class="control-label" for="titikdua">:</label></td>
  77. <td colspan="5"><input name="txtVessel" id="txtVessel" class="form-control" type="text" value="<?php echo $vessel; ?>" readonly></td>
  78. <td></td>
  79. <td><label class="control-label" for="consignee">Consignee</label></td>
  80. <td><label class="control-label" for="titikdua">:</label></td>
  81. <td><input name="txtConsignee" id="txtConsignee" class="form-control" type="text" value="<?php echo $consignee; ?>" readonly></td>
  82. <td></td>
  83. <td><label class="control-label" for="TPS">TPS</label></td>
  84. <td><label class="control-label" for="titikdua">:</label></td>
  85. <td><input name="txtTPS" id="txtTPS" class="form-control" type="text" value="<?php echo $tps; ?>" readonly></td>
  86. </tr>
  87.  
  88. <tr>
  89. <td><label class="control-label" for="invtps">No Invoice TPS</label></td>
  90. <td><label class="control-label" for="titikdua">:</label></td>
  91. <td colspan="3"><input name="txtInvTPS" id="txtInvTPS" class="form-control" type="text"></td>
  92. <td></td>
  93. <td><label class="control-label" for="tglinvoice">Tgl Invoice</label></td>
  94. <td><label class="control-label" for="titikdua">:</label></td>
  95. <td><input name="txtTglInvoice" id="txtTglInvoice" class="form-control" type="text"></td>
  96. <td></td>
  97. <td></td>
  98. <td></td>
  99. <td></td>
  100. <td></td>
  101. <td></td>
  102. </tr>
  103.  
  104. <tr>
  105. <td><label class="control-label" for="bytps">Biaya TPS</label></td>
  106. <td><label class="control-label" for="titikdua">:</label></td>
  107. <td colspan="3"><input name="txtBiayaTPS" id="txtBiayaTPS" class="form-control" type="text"></td>
  108. <td></td>
  109. <td></td>
  110. <td></td>
  111. <td></td>
  112. <td></td>
  113. <td></td>
  114. <td></td>
  115. <td></td>
  116. <td></td>
  117. <td></td>
  118. </tr>
  119.  
  120. <tr>
  121. <td><label class="control-label" for="ppn">PPN</label></td>
  122. <td><label class="control-label" for="titikdua">:</label></td>
  123. <td colspan="3"><input name="txtPPN" id="txtPPN" class="form-control" type="text"></td>
  124. <td></td>
  125. <td><label class="control-label" for="ket">Keterangan</label></td>
  126. <td><label class="control-label" for="titikdua">:</label></td>
  127. <td colspan="3" rowspan="3"><textarea id="txtArea" rows="4" cols="3" name="keterangan" id="keterangan" class="form-control"></textarea></td>
  128. <td></td>
  129. <td></td>
  130. <td></td>
  131. <td></td>
  132. </tr>
  133.  
  134. <tr>
  135. <td><label class="control-label" for="bylaintps">Biaya Lain2 TPS</label></td>
  136. <td><label class="control-label" for="titikdua">:</label></td>
  137. <td colspan="3"><input name="txtBiayaLainTPS" id="txtBiayaLainTPS" class="form-control" type="text"></td>
  138. <td></td>
  139. <td></td>
  140. <td></td>
  141. <td></td>
  142. <td></td>
  143. <td></td>
  144. <td></td>
  145. </tr>
  146.  
  147. <tr>
  148. <td><label class="control-label" for="totalbytps">Total Biaya TPS</label></td>
  149. <td><label class="control-label" for="titikdua">:</label></td>
  150. <td colspan="3"><input name="txtTotalBiayaTPS" id="txtTotalBiayaTPS" class="form-control" type="text"></td>
  151. <td></td>
  152. <td></td>
  153. <td></td>
  154. <td></td>
  155. <td></td>
  156. <td></td>
  157. <td></td>
  158. </tr>
  159.  
  160. </table>
  161.  
  162. <input name="T_IN_ID" id="T_IN_ID" class="form-control" type="hidden" value="<?php echo $T_IN_ID; ?>">
  163.  
  164. <br />
  165. <table border="0" id="tablesgg" style="width: 50%" >
  166. <thead>
  167. <tr>
  168. <th width="10%">Tanggal Bayar</th>
  169. <th width="10%">Jumlah</th>
  170. <th width="10%">Keterangan</th>
  171. </tr>
  172. </thead>
  173. <tbody>
  174. </tbody>
  175. </table>
  176.  
  177. </div>
  178. </form>
  179. </div>
  180. </div>
  181. </div>
  182.  
  183.  
  184.  
  185.  
  186. <script src="<?php echo base_url() . 'assets/Thema1/js/'; ?>select2/select2.full.min.js"></script>
  187. <script src="<?php echo base_url() . 'assets/Thema1/js/'; ?>select2/select2-active.js"></script>
  188.  
  189. <script type="text/javascript">
  190. $(document).ready(function() {
  191. //var T_IN_ID = $("#T_IN_ID").val();
  192. //alert(T_IN_ID);
  193. table = $('#tables').DataTable({
  194.  
  195. "processing" : true, //Feature control the processing indicator.
  196. "serverSide" : true, //Feature control DataTables' server-side processing mode.
  197. "order" : [], //Initial no order.
  198. "searching" : false,
  199. "paging" : false,
  200. "ordering" : false,
  201. "info" : false,
  202. "bLengthChange" : false,
  203. //"scrollX" : true,
  204. //"lengthMenu" : [20, 40, 60, 80, 100],
  205. //"pageLength" : 20,
  206.  
  207. "ajax": {
  208. "url": "<?php echo site_url('biaya_tps_asal/c_biaya_tps_asal/get_data_history')?>",
  209. "type": "POST",
  210. "data": function ( data ) {
  211. data.T_IN_ID = $('#T_IN_ID').val();
  212. }
  213. },
  214.  
  215. //Set column definition initialisation properties.
  216. "columnDefs": [
  217. {
  218. "targets": [0,1], //first column / numbering column
  219. "orderable": false, //set not orderable
  220. },
  221. ],
  222.  
  223. });
  224. });
  225.  
  226.  
  227. $('#modal_proses').on('hidden.bs.modal', function () {
  228. //alert('tes');
  229. table.ajax.reload();
  230. });
  231.  
  232. </script>
  233.  
  234. </body>
  235. </html>
Advertisement
Add Comment
Please, Sign In to add comment