first commit
This commit is contained in:
226
application/views/vAdminVolume.php
Normal file
226
application/views/vAdminVolume.php
Normal file
@ -0,0 +1,226 @@
|
||||
<script>
|
||||
var data;
|
||||
$(document).ready(function() {
|
||||
$('#volumelist').dataTable( {
|
||||
"sScrollX": "1000px",
|
||||
"sScrollXInner": "1800px",
|
||||
"bScrollCollapse": true
|
||||
} );
|
||||
$('#modal').click(function()
|
||||
{
|
||||
$.ajax({
|
||||
url: 'form/loadwilayah/',
|
||||
success: function(msg)
|
||||
{
|
||||
data = jQuery.parseJSON(msg);
|
||||
var region;
|
||||
for (var i=0;i<data.length;i++)
|
||||
{
|
||||
if (i==0)
|
||||
{
|
||||
region=data[i]['region'];
|
||||
var op = "<option>"+data[i]['region']+"</option>"
|
||||
$(op).appendTo('#region');
|
||||
}
|
||||
else
|
||||
{
|
||||
if(data[i]['region']!=region)
|
||||
{
|
||||
var op = "<option>"+data[i]['region']+"</option>"
|
||||
$(op).appendTo('#region');
|
||||
region=data[i]['region'];
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
);
|
||||
function showprovince(val)
|
||||
{
|
||||
$('#prov option:not(:first-child)').remove();
|
||||
for (var i=0;i<data.length;i++)
|
||||
{
|
||||
if (data[i]['region']==val)
|
||||
{
|
||||
var op = "<option>"+data[i]['province']+"</option>"
|
||||
$(op).appendTo('#prov');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function showarea(val)
|
||||
{
|
||||
$('#area option:not(:first-child)').remove();
|
||||
for (var i=0;i<data.length;i++)
|
||||
{
|
||||
if (data[i]['province']==val)
|
||||
{
|
||||
var op = "<option>"+data[i]['kota']+"</option>"
|
||||
$(op).appendTo('#area');
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<div class="well-white">
|
||||
<div class="navbar">
|
||||
<div class="navbar-inner">
|
||||
<a class="brand"><i class="icon-user"></i> List Volume</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="well-white stafflist">
|
||||
<a data-toggle="modal" href="#myModal" id="modal" class="btn pull-right" href=""><i class="icon-plus-sign"></i>Tambah</a>
|
||||
<br /><br />
|
||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="volumelist">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><i class="icon-user"></i> Dealaer</th>
|
||||
<th><i class="icon-map-marker"></i> Region</th>
|
||||
<th><i class="icon-map-marker"></i> Province</th>
|
||||
<th><i class="icon-map-marker"></i> Area</th>
|
||||
<th><i class="icon-calendar"></i> Month</th>
|
||||
<th><i class="icon-tasks"></i> Target</th>
|
||||
<th><i class="icon-share-alt"></i> Sellout</th>
|
||||
<th><i class="icon-shopping-cart"></i> Order</th>
|
||||
<th><i class=""></i> Previous Stock</th>
|
||||
<th><i class=""></i> Actual</th>
|
||||
<th><i class=""></i> Current Stock</th>
|
||||
<th><i class=""></i> Category</th>
|
||||
<th><i class=""></i> Pattern</th>
|
||||
<th><i class=""></i> Service Level</th>
|
||||
<!--<th><i class="icon-wrench"></i> Action</th>-->
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>everseiko</td>
|
||||
<td>Jawa</td>
|
||||
<td>Jawa Barat</td>
|
||||
<td>Bandung</td>
|
||||
<td>April</td>
|
||||
<td>4</td>
|
||||
<td>6</td>
|
||||
<td>2</td>
|
||||
<td>7</td>
|
||||
<td>7</td>
|
||||
<td>5</td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<td></td>
|
||||
<!--<td align="center">
|
||||
<button class="btn btn-small btn-danger disabled">Delete</button>
|
||||
</td>-->
|
||||
</tr>
|
||||
<?php
|
||||
foreach($volume as $vlm){
|
||||
?>
|
||||
<tr>
|
||||
<td><?php echo $vlm->dealer; ?></td>
|
||||
<td><?php echo $vlm->region; ?></td>
|
||||
<td><?php echo $vlm->province; ?></td>
|
||||
<td><?php echo $vlm->area; ?></td>
|
||||
<td><?php echo $vlm->date; ?></td>
|
||||
<td><?php echo $vlm->target; ?></td>
|
||||
<td><?php echo $vlm->sellout; ?></td>
|
||||
<td><?php echo $vlm->order; ?></td>
|
||||
<td><?php echo $vlm->previous_stock; ?></td>
|
||||
<td><?php echo $vlm->actual; ?></td>
|
||||
<td><?php echo $vlm->current_stock; ?></td>
|
||||
<td><?php echo $vlm->category; ?></td>
|
||||
<td><?php echo $vlm->pattern; ?></td>
|
||||
<td><?php echo $vlm->service_level; ?></td>
|
||||
<!--<td align="center">
|
||||
<button class="btn btn-small btn-danger" onclick="">Delete</button>
|
||||
</td>-->
|
||||
</tr>
|
||||
<?php } ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
|
||||
|
||||
<!--modal-->
|
||||
<div id="myModal" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="display: none;">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
|
||||
<h3 id="myModalLabel">Add New Volume</h3>
|
||||
</div>
|
||||
<form class="form-horizontal" action="<?php echo base_url(); ?>form/addVolume" method="post">
|
||||
<div class="modal-body">
|
||||
<label class="control-label">Dealer :</label>
|
||||
<div class="controls">
|
||||
<input type="text" name="dealer">
|
||||
</div><br />
|
||||
<label class="control-label">Region :</label>
|
||||
<div class="controls">
|
||||
<select name="region" id="region" onchange="showprovince(this.value)">
|
||||
<option>--select region</option>
|
||||
</select>
|
||||
</div><br />
|
||||
<label class="control-label">Province :</label>
|
||||
<div class="controls">
|
||||
<select name="province" id="prov" onchange="showarea(this.value)">
|
||||
<option>--select province</option>
|
||||
</select>
|
||||
</div><br />
|
||||
<label class="control-label">Area :</label>
|
||||
<div class="controls">
|
||||
<select name="area" id="area">
|
||||
<option>--select area</option>
|
||||
</select>
|
||||
</div><br />
|
||||
<label class="control-label">Date :</label>
|
||||
<div class="controls">
|
||||
<input type="date" name="date">
|
||||
</div><br />
|
||||
<label class="control-label">Target :</label>
|
||||
<div class="controls">
|
||||
<input type="number" name="target" style="font-size:15px;padding:5px;" value="0">
|
||||
</div><br />
|
||||
<label class="control-label">Previous Stock :</label>
|
||||
<div class="controls">
|
||||
<input type="number" name="prevstock" style="font-size:15px;padding:5px;" value="0">
|
||||
</div><br />
|
||||
<label class="control-label">Actual :</label>
|
||||
<div class="controls">
|
||||
<input type="number" name="actual" style="font-size:15px;padding:5px;" value="0">
|
||||
</div><br />
|
||||
<label class="control-label">Sellout :</label>
|
||||
<div class="controls">
|
||||
<input type="number" name="sellout" style="font-size:15px;padding:5px;" value="0">
|
||||
</div><br />
|
||||
<label class="control-label">Order :</label>
|
||||
<div class="controls">
|
||||
<input type="number" name="order" style="font-size:15px;padding:5px;" value="0">
|
||||
</div><br />
|
||||
<label class="control-label">Pattern :</label>
|
||||
<div class="controls">
|
||||
<select name="pattern" id="pattern" style="overflow:auto">
|
||||
<option>7.50-16 M77</option>
|
||||
<option>7.50-16 SLUG</option>
|
||||
<option>7.50-16 SM95</option>
|
||||
<option>7.50-16 SML</option>
|
||||
<option>9.00-20 M77</option>
|
||||
<option>9.00-20 SML</option>
|
||||
<option>10.00-20 M77</option>
|
||||
<option>10.00-20 SLUG</option>
|
||||
<option>10.00-20 SLUG 50+</option>
|
||||
<option>10.00-20 SLUG 50+R</option>
|
||||
<option>11.00-20 M77</option>
|
||||
<option>11.00-20 MMR</option>
|
||||
<option>11.00-20 SLUG</option>
|
||||
<option>11.00-20 SLUG 50+</option>
|
||||
<option>11.00-20 SLUG 50+R</option>
|
||||
<option>11.00-20 SM95</option>
|
||||
</select>
|
||||
</div><br />
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn" data-dismiss="modal">Cancel</button>
|
||||
<button type="submit" class="btn btn-primary">Save</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
Reference in New Issue
Block a user