update format export surat
This commit is contained in:
@ -192,7 +192,7 @@
|
||||
<div class="modal-content">
|
||||
<!-- Modal header -->
|
||||
<div class="modal-header">
|
||||
<h5 class="modal-title" id="myModalLabel">Tambah Signer</h5>
|
||||
<h5 class="modal-title" id="myModalLabel">Tambah Info Surat</h5>
|
||||
<button type="button" class="closeButton" data-dismiss="modal" aria-label="Close"
|
||||
style="display:none">
|
||||
<span aria-hidden="true">×</span>
|
||||
@ -208,12 +208,59 @@
|
||||
<input type="hidden" style="margin-bottom: 5px" name="kode_cabang" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="startDateExport" />
|
||||
<input type="hidden" style="margin-bottom: 5px" name="endDateExport" />
|
||||
<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>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Penandatangan</label>
|
||||
<div class="col-sm-8">
|
||||
<select class="form-select form-select-sm" aria-label="Small select example" id="signer-select" name="signer" required>
|
||||
<option selected>Pilih Penandatangan</option>
|
||||
@foreach ($data['signer'] as $item)
|
||||
<option value="{{$item->id}}">{{$item->signer_type}}</option>
|
||||
@endforeach
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">No Req Surat</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm " name="no_req_surat" placeholder="Nomor Permintaan Surat" value ="{{$data['no_req_surat']}}" required>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Tgl Req Surat</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="date" class="form-control form-control-sm " name="tgl_req_surat" placeholder="Tanggal Permintaan Surat" required>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">email</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="email" class="form-control form-control-sm " name="email" placeholder="Email">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Tlp</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="number" class="form-control form-control-sm " id="quantity" name="tlp" min="6" max="12">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Nama tujuan</label>
|
||||
<div class="col-sm-8">
|
||||
<input type="text" class="form-control form-control-sm " name="nama_tujuan" placeholder="Nama Tujauan">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="inputName" class="col-sm-4 col-form-label">Alamat</label>
|
||||
<div class="col-sm-8">
|
||||
<textarea rows="4" cols="40" class="form-control form-control-sm " id="alamat" name="alamat" placeholder="Alamat"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Modal footer -->
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-secondary btn-sm closeButtonSigner"
|
||||
@ -248,6 +295,7 @@
|
||||
$('.mycheck').hide();
|
||||
$('#cif_null').hide();
|
||||
|
||||
|
||||
$("#myForm").submit(function (event) {
|
||||
event.preventDefault(); // Prevent the form from submitting normally
|
||||
if ($("#cif").val() === "") {
|
||||
@ -298,10 +346,11 @@
|
||||
'</td><td>' + items[i]['SHORT_NAME'] +
|
||||
'</td><td>' + items[i]['WORKING_BALANCE'] +
|
||||
// '</td><td>' + items[i]['PRODUCT'] +
|
||||
'</td><td>' + items[i]['CURRENCY']+
|
||||
// '</td><td class="text-center">'+ items[i]['MATURITY_DATE'] +
|
||||
'</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>'
|
||||
'</td><td>' + items[i]['CURRENCY'] + '</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>'
|
||||
);
|
||||
});
|
||||
|
||||
@ -399,6 +448,12 @@
|
||||
var startDate = $('input[name="startDate"]').val();
|
||||
var endDate = $('input[name="endDate"]').val();
|
||||
var acc_no = $('input[name="acc_no"]').val();
|
||||
var no_req_surat = $('input[name="no_req_surat"]').val();
|
||||
var tgl_req_surat = $('input[name="tgl_req_surat"]').val();
|
||||
var email = $('input[name="email"]').val();
|
||||
var tlp = $('input[name="tlp"]').val();
|
||||
var nama_tujuan = $('input[name="nama_tujuan"]').val();
|
||||
var alamat = $.trim($("#alamat").val());
|
||||
var signer = $("#signer-select").find('option:selected').val();
|
||||
$("#signerModal").modal('hide');
|
||||
$('.modalSpiner').modal('show');
|
||||
@ -412,14 +467,20 @@
|
||||
startDate:startDate,
|
||||
endDate:endDate,
|
||||
acc_no:acc_no,
|
||||
signer:signer
|
||||
signer:signer,
|
||||
no_req_surat:no_req_surat,
|
||||
tgl_req_surat:tgl_req_surat,
|
||||
email:email,
|
||||
tlp:tlp,
|
||||
nama_tujuan:nama_tujuan,
|
||||
alamat:alamat
|
||||
|
||||
};
|
||||
|
||||
|
||||
$.ajax({
|
||||
type: "POST",
|
||||
url: "{{ route('konfirmasibank.exportWord') }}",
|
||||
url: "{{ route('konfirmasibank.export') }}",
|
||||
data: dataToSend, // serializes the form's elements.
|
||||
xhrFields: {
|
||||
responseType: 'blob'
|
||||
@ -436,7 +497,7 @@
|
||||
link.href = window.URL.createObjectURL(blob);
|
||||
|
||||
// Set the download attribute with the desired file name
|
||||
link.download = 'KonfirmasiBank_' + time +'.doc';
|
||||
link.download = 'KonfirmasiBank_' + time +'.pdf';
|
||||
|
||||
// Append the link to the document body
|
||||
document.body.appendChild(link);
|
||||
|
Reference in New Issue
Block a user