fix gadai teller

This commit is contained in:
LAPTOP-DGCU80CH\user1
2020-12-02 11:43:12 +08:00
parent 3eb90e2c89
commit f0cb6e3312
11 changed files with 428 additions and 194 deletions
+3 -3
View File
@@ -14,7 +14,7 @@
<div class="card-body">
<div class="text-center">
<h5 class="text-uppercase">masukkan nombor kad pengenalan</h5>
<form action="{{ route('customer.search','juruwang') }}" method="GET">
<form action="{{ route('customer.search') }}" method="GET">
<input type="text" id="noic" style="width:400px" name="noic" placeholder="No Kad Pengenalan Pelanggan" autocomplete="off" value="{{$search == false ? '' : $noic ?? ''}}"/>
<input type="submit" class="btn btn-primary" value="SAHKAN" />
</form>
@@ -36,7 +36,7 @@
<h5 class="modal-title" id="ModalLabel">Daftar Pelanggan</h5>
</div>
<div class="modal-body">
<form action="{{ route('customer.store','juruwang') }}" method="POST">
<form action="{{ route('customer.store') }}" method="POST">
@csrf
<div class="row form-group">
<div class="col-md-6">
@@ -158,7 +158,7 @@
</div>
</div>
<script>
var api_url = "<?php echo $api_url ?>";
$(document).ready(function(){
var noic = $('#noic').val();
+118 -50
View File
@@ -1,68 +1,131 @@
@extends('layouts.app')
<!-- Modal -->
<div class="modal fade" id="exampleModal" tabindex="-1" aria-labelledby="exampleModalLabel" aria-hidden="true">
<div class="modal-dialog modal-dialog-centered modal-xl">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="exampleModalLabel">Maklumat Pelaggan</h5>
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
<span aria-hidden="true">&times;</span>
</button>
</div>
<div class="modal-body">
<div class='row form-group'>
<div class='col-md-6'>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
Nama
</div>
<div class='col-md-7'>
<input type="text" readonly name='' id='' value="{{ $customer_info['nama'] }}" class='form-control'>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
No KP
</div>
<div class='col-md-7'>
<input type="text" readonly name='' id='' value="{{ $customer_info['kpbaru'] }}" class='form-control'>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
No Pelanggan
</div>
<div class='col-md-7'>
<input type="text" readonly name='' id='' value="{{ $customer_info['nopelanggan'] }}" class='form-control'>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
No Telefon 1
</div>
<div class='col-md-7'>
<input type="text" readonly name='' id='' value="{{ $customer_info['telefon'] }}" class='form-control'>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-5'>
No Telefon 2
</div>
<div class='col-md-7'>
<input type="text" readonly name='' id='' value="{{ $customer_info['telefon2'] }}" class='form-control'>
</div>
</div>
</div>
<div class='col-md-6'>
<div class='form-group row col-md-12'>
<div class='col-md-4'>
Alamat
</div>
<div class='col-md-8'>
<textarea style="resize:none" name="alamat" id="alamat" cols="30" rows="3" readonly class='form-control'>{{ $customer_info['alamat1'] }}</textarea>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-4'>
Poskod
</div>
<div class='col-md-8'>
<input type="text" readonly name='' id='' value="{{ $customer_info['poskod'] }}" class='form-control'>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-4'>
Daerah
</div>
<div class='col-md-8'>
<input type="text" readonly name='' id='' value="{{ $customer_info['koddaerah'] }}" class='form-control'>
</div>
</div>
<div class='form-group row col-md-12'>
<div class='col-md-4'>
Negeri
</div>
<div class='col-md-8'>
<input type="text" readonly name='' id='' value="{{ $customer_info['kodnegeri'] }}" class='form-control'>
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
</div>
</div>
</div>
</div>
@section('content')
<?php
$customer_info = Session::get('customer_info');
?>
<div class="container">
<div class="row justify-content-center">
<div class="col-md-12">
<a href="{{ url('/pelanggan') }}"><i class="fas fa-arrow-left"></i> Kembali</a>
<h3 class="text-center text-uppercase">maklumat pelanggan</h3>
<div class="form-group row col-12">
<div class="col-6">
<div class="form-group row col-md-12">
<div class="col-md-6">
<div class="form-group row">
<div class="col-4">
No Kad Pengenalan
</div>
<div class="col-8">
<input type="text" class="form-control" name="noic" id="noic" readonly value="{{ $customer_info['kpbaru'] }}">
</div>
</div>
</div>
<div class="col-6">
<div class="form-group row">
<div class="col-4">
No Pelanggan
</div>
<div class="col-8">
<input type="text" class="form-control" name="no_pelanggan" readonly id="no_pelanggan" value="{{ $customer_info['nopelanggan'] }}">
</div>
</div>
</div>
<div class="col-6">
<div class="form-group row">
<div class="col-4">
<div class="col-md-4">
Nama
</div>
<div class="col-8">
<div class="col-md-8">
<input type="text" class="form-control" name="name" id="name" readonly value="{{ $customer_info['nama'] }}">
</div>
</div>
</div>
<div class="col-6">
<div class="col-md-6">
<div class="form-group row">
<div class="col-4">
Alamat
<div class="col-md-4">
No Kad Pengenalan
</div>
<div class="col-8">
<textarea style="resize:none" class="form-control" name="alamat" id="alamat" cols="30" rows="2" readonly>{{ $customer_info['alamat1'].','.$customer_info['alamat2'].','.$customer_info['alamat3'].','.$customer_info['alamat4'] }}</textarea>
<div class="col-md-8">
<input type="text" class="form-control" name="noic" id="noic" readonly value="{{ $customer_info['kpbaru'] }}">
</div>
</div>
</div>
<div class="col-6">
<div class="form-group row">
<div class="col-4">
No Telefon
</div>
<div class="col-8">
<input type="text" class="form-control" readonly name="no_phone" id="no_phone" value="{{ $customer_info['telefon'] }}">
</div>
</div>
</div>
<div class="col-12 mt-3 justify-content-between form-group row">
<div class="btn-group btn-group-toggle col-6" data-toggle="buttons">
<div class="col-md-12 mt-md-3 justify-content-between form-group row">
<div class="btn-group btn-group-toggle col-md-6" data-toggle="buttons">
<label class="btn btn-primary">
<input type="radio" name="options" id="option1" value="belum_tebus" autocomplete="off" checked>Belum Tebus
</label>
@@ -73,7 +136,10 @@
<input type="radio" name="options" id="option3" value="lelong" autocomplete="off">Lelong
</label>
</div>
<div class="col-6 text-right">
<div class='col-md-3'>
<button class='btn btn-primary' data-toggle="modal" data-target="#exampleModal">Maklumat Pelanggan</button>
</div>
<div class="col-md-3 text-right">
<a class="button btn btn-primary" style="margin-right:-50px" href="{{ route('gadaian',['noic'=>$customer_info['kpbaru'] ]) }}">Daftar Gadai</a>
</div>
</div>
@@ -104,6 +170,8 @@
</div>
</div>
<script>
var api_url = "<?php echo $api_url ?>";
var tablegadai = $('#myTable').DataTable({
"scrollX": true
});
@@ -138,7 +206,7 @@
var noic = $("#noic").val();
$.ajax({
method:"GET",
url:"http://localhost:8000/api/customers/"+noic+"/gadai/belum_tebus",
url: api_url + "/api/customers/"+noic+"/gadai/belum_tebus",
success: function(data){
gadaiTable(data);
}
@@ -154,7 +222,7 @@
// console.log(noic);
$.ajax({
method:"GET",
url:"http://localhost:8000/api/customers/"+noic+"/gadai/belum_tebus",
url: api_url + "/api/customers/"+noic+"/gadai/belum_tebus",
success: function(data){
gadaiTable(data);
}
@@ -163,7 +231,7 @@
if($("input[name='options']:checked").val() == 'sudah_tebus'){
$.ajax({
method:"GET",
url:"http://localhost:8000/api/customers/"+noic+"/gadai/sudah_tebus",
url: api_url + "/api/customers/"+noic+"/gadai/sudah_tebus",
success: function(data){
gadaiTable(data);
}
@@ -172,7 +240,7 @@
if($("input[name='options']:checked").val() == 'lelong'){
$.ajax({
method:"GET",
url:"http://localhost:8000/api/customers/"+noic+"/gadai/lelong",
url: api_url + "/api/customers/"+noic+"/gadai/lelong",
success: function(data){
gadaiTable(data);
}