198 lines
9.4 KiB
PHP
198 lines
9.4 KiB
PHP
<x-default-layout>
|
|
@php
|
|
$route = explode('.', Route::currentRouteName());
|
|
@endphp
|
|
<!--begin::Card-->
|
|
<meta name="csrf-token" content="{{ csrf_token() }}" />
|
|
<div class="card card-xxl-stretch mb-5 mb-xl-8">
|
|
<!--begin::Card body-->
|
|
<div class="card-body pt-6">
|
|
<div class="container">
|
|
<div class="row" >
|
|
<div class="col-md-3"></div>
|
|
<div class="col-md-6" style="border: 1px solid grey;padding: 20px;background-color:#f4f4f4">
|
|
<form>
|
|
<div class="row mb-3">
|
|
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">No CIF</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control form-control-sm" name="cif" id="cif" placeholder="No CIF">
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Cabang</label>
|
|
<div class="col-sm-10">
|
|
<input type="text" class="form-control form-control-sm" name="kodecabang" id="kodecabang" placeholder="Nama Cabang">
|
|
</div>
|
|
</div>
|
|
<div class="row mb-3">
|
|
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Priode</label>
|
|
<div class="col-sm-10">
|
|
<input type="number" class="form-control form-control-sm" min="2020" max="2023" name="periode" id="periode" placeholder="Periode">
|
|
</div>
|
|
</div>
|
|
<div class="text-end">
|
|
<button type="submit" class="btn btn-primary btn-sm ms-auto" id="btnSubmit">Cari</button>
|
|
</div>
|
|
|
|
</form>
|
|
</div>
|
|
<div class="col-md-3 ">
|
|
|
|
|
|
<form class="form_customer2" method="POST" action="{{ route($route[0] . '.export') }}">
|
|
@csrf
|
|
|
|
<div class="d-flex flex-column mb-8 fv-row">
|
|
<input type="hidden" style="margin-bottom: 5px" name="cus_no" id="acc_no2" />
|
|
<input type="hidden" style="margin-bottom: 5px" name="acc_no" />
|
|
<input type="hidden" style="margin-bottom: 5px" name="kode_cabang" />
|
|
<input type="hidden" style="margin-bottom: 5px" name="periode" />
|
|
<div class="text-right ">
|
|
<div class="d-flex justify-content-end ">
|
|
<button type="submit" class="btn btn-light-primary exportPdf" style="display:none">
|
|
<i class="ki-duotone ki-exit-down fs-2"><span class="path1"></span><span
|
|
class="path2"></span></i>
|
|
Export Report
|
|
</button>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="card-body pt-6">
|
|
<form class="form_customer3" method="POST" action="{{ route($route[0] . '.export') }}">
|
|
<div class="form-check d-flex justify-content-end " style ="margin-right:45px">
|
|
<input class="form-check-input mycheck" type="checkbox" value="" id="selectAll">
|
|
<label class="form-check-label mycheck" for="" style="padding-left:5px">
|
|
All
|
|
</label>
|
|
</div>
|
|
<div class="table-responsive " style="overflow-x:auto;">
|
|
<div id="user_table">
|
|
@include('konfirmasibank::pages.table')
|
|
</div>
|
|
</div>
|
|
</form>
|
|
|
|
</div>
|
|
<!--end::Card body-->
|
|
</div>
|
|
<!--end::Card-->
|
|
@push('customscript')
|
|
<script>
|
|
$(function() {
|
|
$('.mycheck').hide();
|
|
$('#cif_null').hide();
|
|
|
|
$("#btnSubmit").click(
|
|
function(e) {
|
|
//cekForm();
|
|
$('.row-none').hide();
|
|
$('.mycheck').show();
|
|
$('.firstrow').remove();
|
|
$('.secondrow').remove();
|
|
$('.loading1').show();
|
|
e.preventDefault();
|
|
var actionUrl = $(".form_customer3").attr('action');
|
|
var cif = $("input[name=cif]").val();
|
|
var kodecabang = $("input[name=kodecabang]").val();
|
|
var periode = $("input[name=periode]").val();
|
|
$("input[name=cus_no]").val(cif)
|
|
$("input[name=kode_cabang]").val(kodecabang)
|
|
$("input[name=periode]").val(periode)
|
|
var no = 1;
|
|
|
|
$.ajaxSetup({
|
|
headers: {
|
|
'X-CSRF-TOKEN': $('meta[name="csrf-token"]').attr('content')
|
|
}
|
|
});
|
|
$.ajax({
|
|
url: "{{ route('getData') }}",
|
|
type: 'GET',
|
|
dataType: 'json',
|
|
success: 'success',
|
|
data: {
|
|
'cif': cif,
|
|
'kodecabang': kodecabang,
|
|
'periode': periode
|
|
},
|
|
success: function(items) {
|
|
$('.loading1').hide();
|
|
$.each(items, function(i, index) {
|
|
let dateString = moment(items[i]['MATURITY_DATE']).format("YYYY-MM-DD");
|
|
$('#dataBody').append('<tr class="secondrow"><td>' + (
|
|
no++) +
|
|
'</td><td>' + items[i]['ACCOUNT_NUMBER'] +
|
|
'</td><td>' + items[i]['COMPANY_NAME'] +
|
|
'</td><td>' + items[i]['SHORT_TITLE'] +
|
|
'</td><td>' + items[i]['WORKING_BALANCE'] +
|
|
'</td><td>' + items[i]['PRODUCT'] +
|
|
'</td><td>' + items[i]['CURRENCY']+
|
|
'</td><td>'+ dateString +
|
|
'</td><td class="tes"><div style="padding-left:22px" class="form-check form-check-custom form-check-solid me-10"><input class=" form-check-input h-20px w-20px acc_no" type="checkbox" name="account_number" value="' +
|
|
items[i]['ACCOUNT_NUMBER'] + '"></div></td></tr>'
|
|
);
|
|
});
|
|
|
|
}
|
|
});
|
|
}
|
|
);
|
|
|
|
var acc_no = [];
|
|
$('#table4 tbody').on('change', 'tr td.tes input[type=checkbox]', function() {
|
|
$('.exportPdf').show();
|
|
if ($(this).is(':checked')) {
|
|
// Do something...
|
|
acc_no.push($(this).val());
|
|
$("input[name=acc_no]").val(acc_no)
|
|
};
|
|
|
|
});
|
|
|
|
var arr = [];
|
|
$("#selectAll").on('click', function() {
|
|
$('.exportPdf').show();
|
|
$("input[type=checkbox]").prop('checked', $(this).prop('checked'));
|
|
$.each($("input[name='account_number']:checked"), function() {
|
|
arr.push($(this).val());
|
|
$("input[name=acc_no]").val(arr)
|
|
});
|
|
});
|
|
|
|
// new tempusDominus.TempusDominus(document.getElementById("kt_td_picker_localization"), {
|
|
// localization: {
|
|
// locale: "idn",
|
|
// startOfTheWeek: 1,
|
|
// format: "yyyy-MM-dd"
|
|
// }
|
|
// });
|
|
|
|
});
|
|
|
|
|
|
// $(document).on('click', '.pagination a', function(event) {
|
|
// event.preventDefault();
|
|
// var page = $(this).attr('href').split('page=')[1];
|
|
// fetch_user_data(page);
|
|
// });
|
|
|
|
// function fetch_user_data(page) {
|
|
// $.ajax({
|
|
// url: "/konpirmasibank/pagination-ajax?page=" + page,
|
|
// success: function(data) {
|
|
// $('#user_table').html(data);
|
|
// }
|
|
// });
|
|
// }
|
|
</script>
|
|
@endpush
|
|
</x-default-layout>
|