|
|
|
|
@ -48,7 +48,7 @@ |
|
|
|
|
class="conMess">Контакты</a> |
|
|
|
|
|
|
|
|
|
<span>0</span> |
|
|
|
|
<a href="javascript:void(0)" class="deleteMess"> |
|
|
|
|
<a href="#" class="deleteMess" data-recipent-id="{{ contact.pk }}"> |
|
|
|
|
Удалить контакт |
|
|
|
|
</a> |
|
|
|
|
</div> |
|
|
|
|
@ -159,37 +159,14 @@ |
|
|
|
|
</p> |
|
|
|
|
|
|
|
|
|
<div class="textAreaBlock2 FFD box-sizing disTab"> |
|
|
|
|
<a href="#" data-toggle="modal" data-target="#reserve-stage-modal">Зарезирвировать</a> |
|
|
|
|
<a href="#" id="reserve-button" data-order-id="" data-toggle="modal" data-target="#reserve-stage-modal">Зарезирвировать</a> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<!-- Зарезервировать средства (модальное окно)--> |
|
|
|
|
<div id="reserve-stage-modal" class="modal fade"> |
|
|
|
|
<div class="modal-dialog" style="width:900px;"> |
|
|
|
|
<div class="modal-content"> |
|
|
|
|
<div class="modal-header"> |
|
|
|
|
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button> |
|
|
|
|
<h4 class="modal-title">Зарезервировать средства</h4> |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<div class="modal-body"> |
|
|
|
|
<div class="textAreaBlock2 text-nn box-sizing disTab"> |
|
|
|
|
<input type="radio" name="choice_way" value="" />Сумма оплаты всего заказа |
|
|
|
|
<input type="radio" name="choice_way" value="" /> Оплатить этап |
|
|
|
|
</div> |
|
|
|
|
|
|
|
|
|
<h2>Резервирование средств</h2> |
|
|
|
|
<h5>Оплатить через яндекс</h5> |
|
|
|
|
<div class="searchF1 polsF1 polsFF links-filter"> |
|
|
|
|
<input class="btn-submit-link" type="submit" value="Сохранить"> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<div class="modal-footer"></div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
</div> |
|
|
|
|
<!-- Конец блока --> |
|
|
|
|
{% include 'reverse_stage_modal.html' %} |
|
|
|
|
<!-- Конец блока --> |
|
|
|
|
|
|
|
|
|
<div class="stepssBlock box-sizing disTab"> |
|
|
|
|
<p class="titleStepss">3 / Выполнение работы</p> |
|
|
|
|
@ -290,6 +267,20 @@ |
|
|
|
|
var form = document.getElementById('message_form'); |
|
|
|
|
var csrftoken = getCookie('csrftoken'); |
|
|
|
|
|
|
|
|
|
$("#reserve-button").on("click",function(e) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
var orderId = $(this).attr('data-order-id'); |
|
|
|
|
$.ajax({ |
|
|
|
|
url: '/api/stages/', |
|
|
|
|
type: 'GET', |
|
|
|
|
data: {csrfmiddlewaretoken: csrftoken, 'order': orderId}, |
|
|
|
|
dataType: 'json', |
|
|
|
|
success: function (json) { |
|
|
|
|
console.log(json.results); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
function getStages(orderId, senderId, recipentId) { |
|
|
|
|
|
|
|
|
|
$.ajax({ |
|
|
|
|
@ -318,6 +309,7 @@ |
|
|
|
|
'<input class="form-control orderStagesInput" name="order" type="hidden" value="' + orderId + '"/>' + |
|
|
|
|
'<label for="">Срок</label><input class="form-control" name="term" type="text" />' + |
|
|
|
|
'<label for="">Результат</label><input class="form-control" name="result" type="text" />' + |
|
|
|
|
'<label for="">Позиция</label><input class="form-control" name="pos" value="1" type="text" />' + |
|
|
|
|
'</form></div>'; |
|
|
|
|
} |
|
|
|
|
var statusNotAgreed = true; |
|
|
|
|
@ -337,7 +329,7 @@ |
|
|
|
|
htmlInbox += '<div class="numberStepp box-sizing"><div class="insetNumStepp">' + |
|
|
|
|
'<p class="titleNumStepp"><span>Этап ' + v.pos + '</span>' + v.name + '</p>' + |
|
|
|
|
'<p class="textNumStepp">Результаты этапа:' + v.result + '</p><div>' + |
|
|
|
|
'<p>до 16.03.2015</p><span>' + v.cost + '<i class="fa fa-rub"></i></span></div></div></div>'; |
|
|
|
|
'<p>до Дата</p><span>' + v.cost + '<i class="fa fa-rub"></i></span></div></div></div>'; |
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
@ -430,15 +422,17 @@ |
|
|
|
|
|
|
|
|
|
if (countStage > currentCountStage){ |
|
|
|
|
for(var jj=currentCountStage; jj<countStage;jj++){ |
|
|
|
|
var pos = jj + 1; |
|
|
|
|
var lastFormStage = $(".numberStepp").last(); |
|
|
|
|
var orderId = lastFormStage.find('.orderStagesInput').val(); |
|
|
|
|
var addFormTemplate = '<div class="numberStepp box-sizing" id="stage1">' + |
|
|
|
|
'<p>Этап <span class="stage-span-id">1</span></p><form class="new-stages-form" id="stage-form">' + |
|
|
|
|
'<p>Этап <span class="stage-span-id">'+ pos +'</span></p><form class="new-stages-form" id="stage-form">' + |
|
|
|
|
'<label for="">Название</label><input class="form-control" name="name" type="text" />' + |
|
|
|
|
'<label for="">Цена</label><input class="form-control" name="cost" type="text" />' + |
|
|
|
|
'<input class="form-control orderStagesInput" name="order" type="hidden" value="' + orderId + '" />' + |
|
|
|
|
'<label for="">Срок</label><input class="form-control" name="term" type="text" />' + |
|
|
|
|
'<label for="">Результат</label><input class="form-control" name="result" type="text" />' + |
|
|
|
|
'<label for="">Позиция</label><input class="form-control" name="pos" value="'+ pos +'" type="text" />' |
|
|
|
|
'</form></div>'; |
|
|
|
|
|
|
|
|
|
lastFormStage.after(addFormTemplate); |
|
|
|
|
@ -481,6 +475,7 @@ |
|
|
|
|
var recipentId = $(this).attr('data-recipent-id'); |
|
|
|
|
$("#chat-order-add #orderId").val(orderId); |
|
|
|
|
$("#projectReviewId").val(orderId); |
|
|
|
|
$("#reserve-button").attr('data-order-id', orderId); |
|
|
|
|
$("#targetContractorId").val(recipentId); |
|
|
|
|
$("#chat-order-add #recipentId").val(recipentId); |
|
|
|
|
$(".orderStagesInput").val(orderId); |
|
|
|
|
@ -550,7 +545,6 @@ |
|
|
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$('#contact-chat-add-message').on('click', function () { |
|
|
|
|
var chatMessage = $("#chat").val(); |
|
|
|
|
var recipentId = $("#recipentId").val(); |
|
|
|
|
|