Ввел логику сделок через партии
All checks were successful
Deploy MES Core / deploy (push) Successful in 4m16s
All checks were successful
Deploy MES Core / deploy (push) Successful in 4m16s
This commit is contained in:
@@ -373,6 +373,7 @@
|
||||
data-bs-toggle="modal"
|
||||
data-bs-target="#workItemModal"
|
||||
data-entity-id="{{ t.entity_id }}"
|
||||
data-batch-id="{{ t.delivery_batch_id|default:'' }}"
|
||||
data-operation-id="{{ t.current_operation_id }}"
|
||||
data-workshop-id="{{ t.current_workshop_id|default:'' }}"
|
||||
data-workshop-name="{{ t.current_workshop_name|default:'' }}"
|
||||
@@ -458,6 +459,7 @@
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<input type="hidden" name="entity_id" id="wiEntityId">
|
||||
<input type="hidden" name="delivery_batch_id" id="wiBatchId">
|
||||
<input type="hidden" name="operation_id" id="wiOperationId">
|
||||
|
||||
<div class="small text-muted mb-2" id="wiTitle"></div>
|
||||
@@ -941,12 +943,14 @@ document.addEventListener('DOMContentLoaded', function () {
|
||||
modal.addEventListener('shown.bs.modal', function (event) {
|
||||
const btn = event.relatedTarget;
|
||||
const entityId = btn.getAttribute('data-entity-id') || '';
|
||||
const batchId = btn.getAttribute('data-batch-id') || '';
|
||||
const opId = btn.getAttribute('data-operation-id') || '';
|
||||
const name = btn.getAttribute('data-task-name') || '';
|
||||
const opName = btn.getAttribute('data-operation-name') || '';
|
||||
const rem = btn.getAttribute('data-task-rem');
|
||||
|
||||
document.getElementById('wiEntityId').value = entityId;
|
||||
document.getElementById('wiBatchId').value = batchId;
|
||||
document.getElementById('wiOperationId').value = opId;
|
||||
|
||||
document.getElementById('wiTitle').textContent = name;
|
||||
|
||||
@@ -594,4 +594,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ next|json_script:"productInfoNext" }}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const form = document.getElementById('product-info-form');
|
||||
|
||||
function getNextUrl() {
|
||||
const el = document.getElementById('productInfoNext');
|
||||
return el ? JSON.parse(el.textContent || '""') : '';
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
if (!form) return;
|
||||
if (form.requestSubmit) {
|
||||
form.requestSubmit();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
if (e.defaultPrevented) return;
|
||||
if (document.querySelector('.modal.show')) return;
|
||||
const url = getNextUrl();
|
||||
if (url) {
|
||||
e.preventDefault();
|
||||
window.location.href = url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const key = (e.key || '').toLowerCase();
|
||||
if ((e.ctrlKey || e.metaKey) && key === 's') {
|
||||
e.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -275,4 +275,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ next|json_script:"productInfoNext" }}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const form = document.getElementById('product-info-form');
|
||||
|
||||
function getNextUrl() {
|
||||
const el = document.getElementById('productInfoNext');
|
||||
return el ? JSON.parse(el.textContent || '""') : '';
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
if (!form) return;
|
||||
if (form.requestSubmit) {
|
||||
form.requestSubmit();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
if (e.defaultPrevented) return;
|
||||
if (document.querySelector('.modal.show')) return;
|
||||
const url = getNextUrl();
|
||||
if (url) {
|
||||
e.preventDefault();
|
||||
window.location.href = url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const key = (e.key || '').toLowerCase();
|
||||
if ((e.ctrlKey || e.metaKey) && key === 's') {
|
||||
e.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -24,7 +24,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-body">
|
||||
<form method="post" action="{% url 'product_info' entity.id %}" class="container-fluid p-0">
|
||||
<form method="post" action="{% url 'product_info' entity.id %}" class="container-fluid p-0" id="product-info-form">
|
||||
{% csrf_token %}
|
||||
<input type="hidden" name="action" value="save">
|
||||
<input type="hidden" name="next" value="{{ next }}">
|
||||
@@ -64,4 +64,44 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ next|json_script:"productInfoNext" }}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const form = document.getElementById('product-info-form');
|
||||
|
||||
function getNextUrl() {
|
||||
const el = document.getElementById('productInfoNext');
|
||||
return el ? JSON.parse(el.textContent || '""') : '';
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
if (!form) return;
|
||||
if (form.requestSubmit) {
|
||||
form.requestSubmit();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
if (e.defaultPrevented) return;
|
||||
if (document.querySelector('.modal.show')) return;
|
||||
const url = getNextUrl();
|
||||
if (url) {
|
||||
e.preventDefault();
|
||||
window.location.href = url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const key = (e.key || '').toLowerCase();
|
||||
if ((e.ctrlKey || e.metaKey) && key === 's') {
|
||||
e.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -275,4 +275,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ next|json_script:"productInfoNext" }}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const form = document.getElementById('product-info-form');
|
||||
|
||||
function getNextUrl() {
|
||||
const el = document.getElementById('productInfoNext');
|
||||
return el ? JSON.parse(el.textContent || '""') : '';
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
if (!form) return;
|
||||
if (form.requestSubmit) {
|
||||
form.requestSubmit();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
if (e.defaultPrevented) return;
|
||||
if (document.querySelector('.modal.show')) return;
|
||||
const url = getNextUrl();
|
||||
if (url) {
|
||||
e.preventDefault();
|
||||
window.location.href = url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const key = (e.key || '').toLowerCase();
|
||||
if ((e.ctrlKey || e.metaKey) && key === 's') {
|
||||
e.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -310,4 +310,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ next|json_script:"productInfoNext" }}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const form = document.getElementById('product-info-form');
|
||||
|
||||
function getNextUrl() {
|
||||
const el = document.getElementById('productInfoNext');
|
||||
return el ? JSON.parse(el.textContent || '""') : '';
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
if (!form) return;
|
||||
if (form.requestSubmit) {
|
||||
form.requestSubmit();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
if (e.defaultPrevented) return;
|
||||
if (document.querySelector('.modal.show')) return;
|
||||
const url = getNextUrl();
|
||||
if (url) {
|
||||
e.preventDefault();
|
||||
window.location.href = url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const key = (e.key || '').toLowerCase();
|
||||
if ((e.ctrlKey || e.metaKey) && key === 's') {
|
||||
e.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -270,4 +270,44 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{{ next|json_script:"productInfoNext" }}
|
||||
<script>
|
||||
document.addEventListener('DOMContentLoaded', function () {
|
||||
const form = document.getElementById('product-info-form');
|
||||
|
||||
function getNextUrl() {
|
||||
const el = document.getElementById('productInfoNext');
|
||||
return el ? JSON.parse(el.textContent || '""') : '';
|
||||
}
|
||||
|
||||
function submitForm() {
|
||||
if (!form) return;
|
||||
if (form.requestSubmit) {
|
||||
form.requestSubmit();
|
||||
} else {
|
||||
form.submit();
|
||||
}
|
||||
}
|
||||
|
||||
document.addEventListener('keydown', function (e) {
|
||||
if (e.key === 'Escape') {
|
||||
if (e.defaultPrevented) return;
|
||||
if (document.querySelector('.modal.show')) return;
|
||||
const url = getNextUrl();
|
||||
if (url) {
|
||||
e.preventDefault();
|
||||
window.location.href = url;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
const key = (e.key || '').toLowerCase();
|
||||
if ((e.ctrlKey || e.metaKey) && key === 's') {
|
||||
e.preventDefault();
|
||||
submitForm();
|
||||
}
|
||||
}, true);
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user