perbaikan hasil sit
This commit is contained in:
@ -17,7 +17,7 @@
|
||||
<div class="col-md-6" style="border: 1px solid grey;padding: 20px;background-color:#f4f4f4">
|
||||
<form id="myForm">
|
||||
<div class="row mb-3">
|
||||
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">No CIF</label>
|
||||
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">No CIF <span style="color:red">*</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="text" class="form-control form-control-sm" name="cif" id="cif" placeholder="No CIF" >
|
||||
</div>
|
||||
@ -29,7 +29,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-3">
|
||||
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Periode</label>
|
||||
<label for="colFormLabelSm" class="col-sm-2 col-form-label col-form-label-sm">Periode <span style="color:red">*</span></label>
|
||||
<div class="col-sm-10">
|
||||
<input type="number" class="form-control form-control-sm" min="{{$data['pastYear']}}" max="{{$data['currentYear']}}" name="periode" clear id="periode" placeholder="Periode">
|
||||
</div>
|
||||
@ -41,17 +41,17 @@
|
||||
</form>
|
||||
</div>
|
||||
<div class="col-md-3 d-flex justify-content-end">
|
||||
<form class="form_customer2" method="POST" action="{{ route($route[0] . '.export') }}">
|
||||
<form class="form_customer2" id="exportForm">
|
||||
@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" />
|
||||
{{-- <input type="text" 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 btn-sm exportPdf" style="display:none">
|
||||
<button type="button" class="btn btn-light-primary btn-sm exportPdf" style="display:none" id="buttonExport1">
|
||||
<i class="ki-duotone ki-exit-down fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Export Report
|
||||
@ -98,6 +98,7 @@
|
||||
</div>
|
||||
<!--end::Card body-->
|
||||
</div>
|
||||
|
||||
<!-- The Modal -->
|
||||
<div class="modal" id="myModal">
|
||||
<div class="modal-dialog">
|
||||
@ -154,15 +155,62 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal -->
|
||||
<div class="modal fade" id="signerModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel"
|
||||
aria-hidden="true">
|
||||
<div class="modal-dialog" role="document">
|
||||
<div class="modal-content">
|
||||
<!-- Modal header -->
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">Tambah Signer</h5>
|
||||
<button type="button" class="closeButton" data-dismiss="modal" aria-label="Close"
|
||||
style="display:none">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- Modal body -->
|
||||
<div class="modal-body">
|
||||
<form class="form-horizontal" id="formSigner">
|
||||
@csrf
|
||||
<!-- Add your form fields here -->
|
||||
<input type="hidden" style="margin-bottom: 5px" name="cus_no" id="acc_no2" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="kode_cabang" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="periode" />
|
||||
<select class="form-select form-select-sm" aria-label="Small select example" id="signer-select" name="signer">
|
||||
<option selected>Select Signer</option>
|
||||
@foreach ($data['signer'] as $item)
|
||||
<option value="{{$item->id}}">{{$item->signer_type}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary btn-sm closeButtonSigner"
|
||||
data-dismiss="modal">Close</button>
|
||||
<button type="button" class="btn btn-primary btn-sm" id="submitSigner">Submit</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
@push('customscript')
|
||||
<script>
|
||||
$(function() {
|
||||
$('.mycheck').hide();
|
||||
$('#cif_null').hide();
|
||||
|
||||
$("#myForm").submit(function (event) {
|
||||
event.preventDefault(); // Prevent the form from submitting normally
|
||||
if ($("#cif").val() === "") {
|
||||
alert("Nomor CIF harus diisi.");
|
||||
return; // Stop form submission
|
||||
}
|
||||
if ($("#periode").val() === "") {
|
||||
alert("periode harus diisi.");
|
||||
alert("Periode harus diisi.");
|
||||
return; // Stop form submission
|
||||
}
|
||||
|
||||
@ -254,10 +302,67 @@
|
||||
$("#myModal").modal('hide');
|
||||
});
|
||||
|
||||
$("#cancelBtn").click(function() {
|
||||
$("#cancelBtn").click(function() {
|
||||
$("#myModal").modal('hide');
|
||||
});
|
||||
|
||||
$(".closeButtonSigner").click(function() {
|
||||
$("#signerModal").modal('hide');
|
||||
});
|
||||
|
||||
//submit signer
|
||||
$("#buttonExport1").click(function(){
|
||||
$("#signerModal").modal('show');
|
||||
|
||||
})
|
||||
|
||||
// Handle form submission when the "Submit" button inside the modal is clicked
|
||||
$("#submitSigner").click(function(e) {
|
||||
e.preventDefault();
|
||||
var cif = $('input[name="cus_no"]').val();
|
||||
var cabang = $('input[name="kode_cabang"]').val();
|
||||
var periode = $('input[name="periode"]').val();
|
||||
var acc_no = $('input[name="acc_no"]').val();
|
||||
var signer = $("#signer-select").find('option:selected').val();
|
||||
// var formData = $("#formSigner").serialize();
|
||||
var dataToSend = {
|
||||
_token: $('meta[name="csrf-token"]').attr('content'),
|
||||
cus_no: cif,
|
||||
kode_cabang: cabang,
|
||||
periode:periode,
|
||||
acc_no:acc_no,
|
||||
signer:signer
|
||||
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{{ route('konfirmasibank.export') }}",
|
||||
data: dataToSend, // serializes the form's elements.
|
||||
xhrFields: {
|
||||
responseType: 'blob'
|
||||
},
|
||||
success: function(response) {
|
||||
$("#signerModal").modal('hide');
|
||||
var blob = new Blob([response]);
|
||||
var link = document.createElement('a');
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
link.download = "techsolutionstuff.pdf";
|
||||
link.click();
|
||||
|
||||
},
|
||||
error: function(data, textStatus, errorThrown) {
|
||||
var errors = data.responseJSON.errors;
|
||||
$.each(errors, function(key, value) {
|
||||
toastr.error(value);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
|
@ -21,11 +21,11 @@
|
||||
</div>
|
||||
<div class="d-flex justify-content-end ">
|
||||
|
||||
<a href="{{ route($route[0] . '.index') }}" type="button" class="btn btn-danger btn-sm redirectButton" style="margin-top:10px">
|
||||
<button type="button" class="btn btn-danger btn-sm redirectButton" style="margin-top:10px">
|
||||
<i class="ki-duotone ki-exit-left fs-2"><span class="path1"></span><span
|
||||
class="path2"></span></i>
|
||||
Kembali
|
||||
</a>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@ -57,13 +57,14 @@
|
||||
<input type="text" class="form-control form-control-sm " name="nomor_rekening" placeholder="Nomor Rekening">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Company</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-select form-select-sm optionSelectCompany" aria-label="Small select example" name="cabang">
|
||||
<select class="form-select form-select-sm " id="cabang" aria-label="Small select example" name="cabang">
|
||||
<option selected>Select Company</option>
|
||||
@foreach ($data['Company'] as $item)
|
||||
<option value="{{$item->COMPANY_NAME}}">{{$item->COMPANY_NAME}}</option>
|
||||
@foreach ($data['Company'] as $item1)
|
||||
<option value="{{$item1->COMPANY_NAME}}">{{$item1->COMPANY_NAME}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@ -71,23 +72,22 @@
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Limit Type</label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-select form-select-sm optionSelectlimit" aria-label="Small select example" name="jenis_fasilitas">
|
||||
<select class="form-select form-select-sm " aria-label="Small select example" name="jenis_fasilitas">
|
||||
<option selected>Select Limit Type</option>
|
||||
@foreach ($data['limitReference'] as $item)
|
||||
<option value="{{$item->SHORT_NAME}}">{{$item->SHORT_NAME}}</option>
|
||||
@foreach ($data['limitReference'] as $item2)
|
||||
<option value="{{$item2->SHORT_NAME}}">{{$item2->SHORT_NAME}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Account Type</label>
|
||||
<div class="col-sm-9">
|
||||
{{-- <input type="text" class="form-control form-control-sm " id="jnsFasilitas" name="jenis_fasilitas" placeholder="Jenis Fasilitas"> --}}
|
||||
<select class="form-select form-select-sm optionSelectRek" aria-label="Small select example"
|
||||
id="jnsRekening-select" name="jenis_rekening">
|
||||
<select class="form-select form-select-sm " aria-label="Small select example" name="jenis_rekening">
|
||||
<option selected>Select Account Type</option>
|
||||
@foreach ($data['Category'] as $item)
|
||||
<option value="{{$item->SHORT_NAME}}">{{$item->SHORT_NAME}}</option>
|
||||
@foreach ($data['Category'] as $item3)
|
||||
<option value="{{$item3->SHORT_NAME}}">{{$item3->SHORT_NAME}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
@ -194,10 +194,9 @@
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Company</label>
|
||||
<div class="col-sm-9">
|
||||
{{-- <input type="text" class="form-control form-control-sm " id="jnsFasilitas" name="jenis_fasilitas" placeholder="Jenis Fasilitas"> --}}
|
||||
<select class="form-select form-select-sm optionSelectCompany" aria-label="Small select example"
|
||||
id="cabangEdit-select" name="cabang_edit">
|
||||
<option selected>Select Company</option>
|
||||
<option >Select Company</option>
|
||||
@foreach ($data['Company'] as $item)
|
||||
<option value="{{$item->COMPANY_NAME}}">{{$item->COMPANY_NAME}}</option>
|
||||
@endforeach
|
||||
@ -207,7 +206,6 @@
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Limit Type</label>
|
||||
<div class="col-sm-9">
|
||||
{{-- <input type="text" class="form-control form-control-sm " id="jnsFasilitas" name="jenis_fasilitas" placeholder="Jenis Fasilitas"> --}}
|
||||
<select class="form-select form-select-sm optionSelectLimit" aria-label="Small select example"
|
||||
id="jnsFaasilitasEdit-select" name="jenis_fasilitas_edit">
|
||||
<option selected>Select Limit Type</option>
|
||||
@ -220,10 +218,9 @@
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Account Type</label>
|
||||
<div class="col-sm-9">
|
||||
{{-- <input type="text" class="form-control form-control-sm " id="jnsFasilitas" name="jenis_fasilitas" placeholder="Jenis Fasilitas"> --}}
|
||||
<select class="form-select form-select-sm optionSelectRek" aria-label="Small select example"
|
||||
id="jnsRekeningEdit-select" name="jenis_rekening_edit">
|
||||
<option selected>Pilih Jenis Rekening</option>
|
||||
<option selected>Select Account Type</option>
|
||||
@foreach ($data['Category'] as $item)
|
||||
<option value="{{$item->SHORT_NAME}}">{{$item->SHORT_NAME}}</option>
|
||||
@endforeach
|
||||
@ -233,7 +230,6 @@
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-3 col-form-label">Signer</label>
|
||||
<div class="col-sm-9">
|
||||
{{-- <input type="text" class="form-control form-control-sm " id="jnsFasilitas" name="jenis_fasilitas" placeholder="Jenis Fasilitas"> --}}
|
||||
<select class="form-select form-select-sm" aria-label="Small select example"
|
||||
id="signerTypeEdit-select" name="signer_id_edit">
|
||||
<option selected>Pilih Penandatangan</option>
|
||||
@ -310,17 +306,19 @@
|
||||
<script>
|
||||
$(document).ready(function() {
|
||||
|
||||
$(".optionSelectCompany").on("change", function() {
|
||||
$(".optionSelectCompany").val($(".optionSelectCompany option:first").val());
|
||||
});
|
||||
|
||||
$(".optionSelectLimit").on("change", function() {
|
||||
$(".optionSelectLimit").val($(".optionSelectLimit option:first").val());
|
||||
});
|
||||
// $(".optionSelectCompany").on("change", function() {
|
||||
// $(".optionSelectCompany").val($(".optionSelectCompany option:first").val());
|
||||
// });
|
||||
|
||||
// $(".optionSelectLimit").on("change", function() {
|
||||
// $(".optionSelectLimit").val($(".optionSelectLimit option:first").val());
|
||||
// });
|
||||
|
||||
// $(".optionSelectRek").on("change", function() {
|
||||
// $(".optionSelectRek").val($(".optionSelectRek option:first").val());
|
||||
// });
|
||||
|
||||
$(".optionSelectRek").on("change", function() {
|
||||
$(".optionSelectRek").val($(".optionSelectRek option:first").val());
|
||||
});
|
||||
// Open the modal when the "Open Modal" button is clicked
|
||||
$("#openModalBtn").click(function() {
|
||||
$("#myModal").modal('show');
|
||||
@ -345,8 +343,8 @@
|
||||
data: formData,
|
||||
success: function(data) {
|
||||
$("#myModal").modal('hide');
|
||||
var _data = JSON.parse(data);
|
||||
toastr.success(_data.message);
|
||||
// var _data = JSON.parse(data);
|
||||
toastr.success(data.message);
|
||||
location.reload();
|
||||
|
||||
},
|
||||
@ -470,6 +468,10 @@
|
||||
})
|
||||
})
|
||||
|
||||
$(".redirectButton").click(function () {
|
||||
history.back();
|
||||
})
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
|
@ -63,6 +63,12 @@
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm " name="executive_officer" placeholder="Nama Executive Officer">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Signer Type</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm " name="signer_type" placeholder="Nama Jenis Penandatangan">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
@ -108,6 +114,12 @@
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm " name="executive_officer" placeholder="Nama Executive Officer">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Signer Type</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm " name="signer_type" placeholder="Nama Jenis Penandatangan">
|
||||
</div>
|
||||
</div>
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
@ -130,6 +142,10 @@
|
||||
$("#openModalBtnSigner").click(function() {
|
||||
$("#signerModal").modal('show');
|
||||
});
|
||||
|
||||
$(".closeButtonSigner").click(function() {
|
||||
$("#signerModal").modal('hide');
|
||||
});
|
||||
$(".closeButtonUpdateSigner").click(function() {
|
||||
$("#myModalEditSigner").modal('hide');
|
||||
});
|
||||
@ -146,10 +162,11 @@
|
||||
url: "{{ route('konfirmasibank.postSigner') }}",
|
||||
data: formData,
|
||||
dataType: 'json',
|
||||
success: function(response) {
|
||||
success: function(data) {
|
||||
$("#signerModal").modal('hide');
|
||||
var _data = JSON.parse(data);
|
||||
toastr.success(_data.message);
|
||||
// var _data = JSON.parse(data);
|
||||
toastr.success(data.message);
|
||||
location.reload();
|
||||
|
||||
},
|
||||
error: function(xhr, status, error) {
|
||||
@ -180,6 +197,7 @@
|
||||
success: function(response) {
|
||||
$('input[name="executive_officer"]').val(response.executive_officer_name);
|
||||
$('input[name="deputy_director"]').val(response.deputy_director_name);
|
||||
$('input[name="signer_type"]').val(response.signer_type);
|
||||
$('input[name="id"]').val(id);
|
||||
$("#myModalEditSigner").modal('show');
|
||||
},
|
||||
|
Reference in New Issue
Block a user