mirror of
https://github.com/inventree/InvenTree.git
synced 2025-04-29 20:16:44 +00:00
Remove rows from order form
This commit is contained in:
parent
3bb76060d9
commit
4be82a31ce
@ -25,7 +25,7 @@
|
|||||||
<table class='table table-condensed table-striped' id='order-wizard-part-table'>
|
<table class='table table-condensed table-striped' id='order-wizard-part-table'>
|
||||||
<tr>
|
<tr>
|
||||||
<th>Part</th>
|
<th>Part</th>
|
||||||
<th>Supplier</th>
|
<th colspan='2'>Select Supplier</th>
|
||||||
<th>Quantity</th>
|
<th>Quantity</th>
|
||||||
<th></th>
|
<th></th>
|
||||||
</tr>
|
</tr>
|
||||||
@ -35,6 +35,11 @@
|
|||||||
{% include "hover_image.html" with image=part.image hover=False %}
|
{% include "hover_image.html" with image=part.image hover=False %}
|
||||||
{{ part.full_name }} <small><i>{{ part.description }}</i></small>
|
{{ part.full_name }} <small><i>{{ part.description }}</i></small>
|
||||||
</td>
|
</td>
|
||||||
|
<td>
|
||||||
|
<button class='btn btn-default btn-create' id='new_supplier_part_{{ part.id }}' title='Create new supplier part for {{ part }}' type='button'>
|
||||||
|
<span onClick='newSupplierPartFromWizard()' class='glyphicon glyphicon-small glyphicon-plus'></span>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class='control-group'>
|
<div class='control-group'>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
@ -59,7 +64,7 @@
|
|||||||
</td>
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<button class='btn btn-default btn-remove' id='del_item_{{ part.id }}' title='Remove part' type='button'>
|
<button class='btn btn-default btn-remove' id='del_item_{{ part.id }}' title='Remove part' type='button'>
|
||||||
<span row='part_row_{{ part.id }}' onclick='removeOrderRow()' class='glyphicon glyphicon-small glyphicon-remove'></span>
|
<span row='part_row_{{ part.id }}' onclick='removeOrderRowFromOrderWizard()' class='glyphicon glyphicon-small glyphicon-remove'></span>
|
||||||
</button>
|
</button>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -27,8 +27,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<th>Supplier</th>
|
<th>Supplier</th>
|
||||||
<th>Items</th>
|
<th>Items</th>
|
||||||
<th>Purchase Order</th>
|
<th colspan='2'>Select Purchase Order</th>
|
||||||
<th></th>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% for supplier in suppliers %}
|
{% for supplier in suppliers %}
|
||||||
<tr id='suppier_row_{{ supplier.id }}'>
|
<tr id='suppier_row_{{ supplier.id }}'>
|
||||||
@ -37,6 +36,15 @@
|
|||||||
{{ supplier.name }}
|
{{ supplier.name }}
|
||||||
</td>
|
</td>
|
||||||
<td>{{ supplier.order_items|length }}</td>
|
<td>{{ supplier.order_items|length }}</td>
|
||||||
|
<td>
|
||||||
|
<button
|
||||||
|
class='btn btn-default btn-create'
|
||||||
|
id='new_po_{{ supplier.id }}'
|
||||||
|
title='Create new purchase order for {{ supplier.name }}'
|
||||||
|
type='button'>
|
||||||
|
<span onclick='newPurchaseOrderFromWizard()' class='glyphicon glyphicon-small glyphicon-plus'></span>
|
||||||
|
</button>
|
||||||
|
</td>
|
||||||
<td>
|
<td>
|
||||||
<div class='control-group'>
|
<div class='control-group'>
|
||||||
<div class='controls'>
|
<div class='controls'>
|
||||||
@ -57,15 +65,6 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
<td>
|
|
||||||
<button
|
|
||||||
class='btn btn-default btn-create'
|
|
||||||
id='new_po_{{ supplier.id }}'
|
|
||||||
title='Create new purchase order for {{ supplier.name }}'
|
|
||||||
type='button'>
|
|
||||||
<span onclick='newPurchaseOrderFromWizard()' class='glyphicon glyphicon-small glyphicon-plus'></span>
|
|
||||||
</button>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|
||||||
|
11
InvenTree/static/script/inventree/order.js
Normal file
11
InvenTree/static/script/inventree/order.js
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
function removeOrderRowFromOrderWizard(e) {
|
||||||
|
/* Remove a part selection from an order form. */
|
||||||
|
|
||||||
|
e = e || window.event;
|
||||||
|
|
||||||
|
var src = e.target || e.srcElement;
|
||||||
|
|
||||||
|
var row = $(src).attr('row');
|
||||||
|
|
||||||
|
$('#' + row).remove();
|
||||||
|
}
|
@ -99,6 +99,7 @@ InvenTree
|
|||||||
<script type='text/javascript' src="{% static 'script/inventree/api.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/api.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/tables.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/tables.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/modals.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/modals.js' %}"></script>
|
||||||
|
<script type='text/javascript' src="{% static 'script/inventree/order.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/notification.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/notification.js' %}"></script>
|
||||||
<script type='text/javascript' src="{% static 'script/inventree/sidenav.js' %}"></script>
|
<script type='text/javascript' src="{% static 'script/inventree/sidenav.js' %}"></script>
|
||||||
{% block js_load %}
|
{% block js_load %}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user