You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
344 lines
18 KiB
344 lines
18 KiB
{% extends 'base_index.html' %}
|
|
{% block asside %}
|
|
<aside id="aside" class="app-aside hidden-xs bg-dark" style="background: #3a3f51;">
|
|
<div class="aside-wrap">
|
|
<div class="navi-wrap">
|
|
<!-- user -->
|
|
<div class="clearfix hidden-xs text-center" id="aside-user">
|
|
<div class="dropdown wrapper">
|
|
<a href="/management/super_history/">
|
|
<span class="thumb-lg w-auto-folded avatar m-t-sm">
|
|
<img src="{{ request.user.get_image_url }}" class="img-thumbnail" style="width: 100%;" reloader_name="avatar">
|
|
</span>
|
|
</a>
|
|
<a href="#">
|
|
<span class="clear">
|
|
<span class="block m-t-sm">
|
|
<strong class="font-bold text-lt">{{ request.user.get_short_name }}</strong>
|
|
</span>
|
|
<span class="text-muted text-xs block">{{ request.user.get_role_display }}</span>
|
|
</span>
|
|
</a>
|
|
</div>
|
|
</div>
|
|
<!-- / user -->
|
|
<nav ui-nav="" class="navi clearfix">
|
|
<ul class="nav">
|
|
<li>
|
|
<a href="/" class="auto">
|
|
<i class="glyphicon glyphicon-education text-warning-dk"></i>
|
|
<span>Курсы</span>
|
|
</a>
|
|
</li>
|
|
<li class="active">
|
|
<a href="#">
|
|
<i class="glyphicon glyphicon-star"></i>
|
|
<span>Запросы</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/management/super_profile/">
|
|
<i class="icon-user icon text-warning-dk"></i>
|
|
<span>Пользователи</span>
|
|
</a>
|
|
</li>
|
|
<li>
|
|
<a href="/management/super_bill">
|
|
<i class="glyphicon glyphicon-stats text-warning-dk"></i>
|
|
<span>Счета</span>
|
|
</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
<!-- nav -->
|
|
</div>
|
|
</div>
|
|
</aside>
|
|
{% endblock %}
|
|
{% block modals %}
|
|
<div class="modal fade" id="new_bill" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="clear_form('new_bill')"><span aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div>
|
|
<div class="col-md-4 col-sm-5 col-xs-12 center_img">
|
|
<img src="/static/img/1441326667_certificate.png" alt="">
|
|
</div>
|
|
<div class="col-md-8 col-sm-7 col-xs-12">
|
|
<div class="activ">
|
|
<p class="modal-title" id="myModalLabel">Новый счет</p>
|
|
<form action="" name="new_bill" onsubmit="return false;">
|
|
<p class="error" id="error_new_bill"></p>
|
|
<p style="margin-bottom: 0;padding-bottom: 10px;
|
|
padding-top: 20px;">Пользователь</p>
|
|
<input type="text" name="new_bill_user_id" readonly style="display: none;">
|
|
<input type="text" name="new_bill_user" style="background-color: #ffc;" readonly>
|
|
<p style="margin-bottom: 0;padding-bottom: 10px;
|
|
padding-top: 20px;">Услуга</p>
|
|
<select type="text" name="new_bill_service" onchange="$('[name=new_bill_checked_service]').val($('[name=new_bill_service]').find('option:selected').attr('id'))" style=" width: 100%;
|
|
padding: 10px;
|
|
background-color: #ffc;
|
|
border: 1px solid #f1f1f1;
|
|
border-radius: 3px;
|
|
margin-bottom: 10px;">
|
|
</select>
|
|
<p style="margin-bottom: 0;padding-bottom: 10px;
|
|
padding-top: 20px;">Стоимость</p>
|
|
<input type="text" name="new_bill_cost" value="0" style="width: 100%;background: #ffc;
|
|
border: 1px solid #f1f1f1;
|
|
border-radius: 3px;">
|
|
<input name="new_bill_checked_service" type="text" readonly style="display: none;">
|
|
<p style="margin-bottom: 0;padding-bottom: 10px;
|
|
padding-top: 20px;">Ваш комментарий</p>
|
|
<textarea name="new_bill_comment" style="width: 100%;background: #ffc;
|
|
border: 1px solid #f1f1f1;
|
|
border-radius: 3px;"></textarea>
|
|
<button class="btn btn-warning btn-lg" onclick="create_new_bill()">Отправить</button>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="charge_request_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="clear_form('charge_request')"><span aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div>
|
|
<div class="col-md-4 col-sm-5 col-xs-12 center_img">
|
|
<img src="/static/img/1442107973_user_login_man.png" alt="">
|
|
</div>
|
|
<div class="col-md-8 col-sm-7 col-xs-12">
|
|
<div class="activ">
|
|
<p class="modal-title" id="myModalLabel">Поручить обработку</p>
|
|
<form action="" name="charge_request" onsubmit="return false;">
|
|
<p class="error" id="error_charge_request"></p>
|
|
<input type="text" style="display: none;" value="" readonly name="charge_request_object_id">
|
|
<p style="margin-bottom: 0;padding-bottom: 10px;
|
|
padding-top: 20px;">Продавец</p>
|
|
<select type="text" name="charge_request_new_seller" onchange="$('[name=charge_request_seller_checked]').val($('[name=charge_request_new_seller]').find('option:selected').attr('id'))" style=" width: 100%;
|
|
padding: 10px;
|
|
background-color: #ffc;
|
|
border: 1px solid #f1f1f1;
|
|
border-radius: 3px;
|
|
margin-bottom: 10px;">
|
|
</select>
|
|
<input type="text" name="charge_request_seller_checked" readonly style="display: none;">
|
|
<p style="padding-bottom: 5px;padding-top: 20px;">Поручение</p>
|
|
<textarea name="charge_request_description" style="width: 100%;border-radius: 3px;border-color: #f1f1f1;"></textarea>
|
|
<button class="btn btn-warning btn-lg" onclick="sent_charge()">Поручить</button>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="modal fade" id="fail_bill" style="z-index: 2100;" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close" onclick="clear_form('fail_bill')"><span aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div>
|
|
<div class="col-md-4 col-sm-5 col-xs-12 center_img">
|
|
<img src="/static/img/1441326667_certificate.png" alt="">
|
|
</div>
|
|
<div class="col-md-8 col-sm-7 col-xs-12">
|
|
<div class="activ">
|
|
<p class="modal-title" id="myModalLabel">Не продал</p>
|
|
<form action="" name="fail_bill" onsubmit="return false;">
|
|
<p class="error" id="error_fail_bill"></p>
|
|
<p style="margin-bottom: 0;padding-bottom: 10px;
|
|
padding-top: 20px;">Причина отказа</p>
|
|
<input style="display: none" type="text" value="" name="fail_bill_id">
|
|
<textarea name="fail_bill_comment" style="width: 100%;background: #ffc;
|
|
border: 1px solid #f1f1f1;
|
|
border-radius: 3px;"></textarea>
|
|
<button type="button" class="btn btn-warning btn-lg" onclick="fail_service_request()">Отправить</button>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% for i in servicerequests %}
|
|
<div class="modal fade" id="service_request_{{ i.id }}" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true" style="z-index: 2000;">
|
|
<div class="modal-dialog modal-lg">
|
|
<div class="modal-content">
|
|
<div class="modal-header">
|
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
|
|
</div>
|
|
<div>
|
|
<div class="col-md-4 col-sm-5 col-xs-12 center_img">
|
|
<img src="/static/img/1442374853_cart_completed.png" alt="">
|
|
{% if i.charge %}
|
|
<h3 style="
|
|
margin-left: 5px;
|
|
font-weight: bold;
|
|
margin-bottom: 20px;">Поручение руководителя</h3>
|
|
<div style=" background-color: #ffc;
|
|
padding: 10px;
|
|
border-radius: 3px;text-align: justify;font-weight: bold;">
|
|
{{ i.charge }}
|
|
</div>
|
|
{% endif %}
|
|
</div>
|
|
<div class="col-md-8 col-sm-7 col-xs-12">
|
|
<div class="activ">
|
|
<p class="modal-title" id="myModalLabel">Обработка заявки</p>
|
|
<form action="" name="service_request_{{ i.id }}" onsubmit="return false;">
|
|
<div style="text-align: left;margin-bottom: 10px;font-size: 20px;height: 40px;">
|
|
<span class="label label-danger" style="font-size: 25px;">{{ i.student.get_phone }}</span>
|
|
</div>
|
|
<div style="text-align: left;margin-bottom: 10px;font-size: 20px;">
|
|
<b>Студент:</b>
|
|
<div style="background-color: #f1f1f1;padding: 5px 10px;margin-top: 5px;border-radius: 3px;">{{ i.student.fname }} {{ i.student.name }} {{ i.student.oname }}</div>
|
|
</div>
|
|
<div style="text-align: left;margin-bottom: 10px;font-size: 20px;">
|
|
<b>Услуга:</b>
|
|
<div style="background-color: #f1f1f1;padding: 5px 10px;margin-top: 5px;border-radius: 3px;">
|
|
{{ i.get_name }}
|
|
</div>
|
|
</div>
|
|
<div style="text-align: left;margin-bottom: 10px;font-size: 20px;">
|
|
<b>Курс:</b>
|
|
<a href="/wallet/pay/traffic_map/{{ i.course.id }}" style="float: right;color: blue;" target="_blank">тарифы курса</a>
|
|
<a href="/courses/{{ i.course.id }}" style="float: right;color: blue;margin-right: 10px;" target="_blank">страница курса</a>
|
|
<div style="background-color: #f1f1f1;padding: 5px 10px;margin-top: 5px;border-radius: 3px;">
|
|
{{ i.course }}
|
|
</div>
|
|
</div>
|
|
<div style="text-align: left;margin-bottom: 10px;font-size: 20px;">
|
|
<b>Город:</b>
|
|
<div style="background-color: #f1f1f1;padding: 5px 10px;margin-top: 5px;border-radius: 3px;">
|
|
{% if i.user.city %}
|
|
{{ i.user.city }}
|
|
{% else %}
|
|
Не указан
|
|
{% endif %}
|
|
</div>
|
|
</div>
|
|
<button type="button" class="btn btn-warning btn-lg" onclick="sent_bill('{{ i.student.id }}', '{{ i.student.get_full_name }}')">Выписать счет</button>
|
|
<button type="button" class="btn btn-warning btn-lg" onclick="fail_service_request_modal('{{ i.id }}')">Не продал</button>
|
|
</form>
|
|
|
|
</div>
|
|
</div>
|
|
<div class="modal-footer">
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{% endfor %}
|
|
{% endblock %}
|
|
<!-- / aside -->
|
|
|
|
<!-- content -->
|
|
{% block content %}
|
|
<div class="col">
|
|
<!-- main header -->
|
|
<div class="bg-light lter b-b wrapper-md">
|
|
<div class="row">
|
|
<div class="col-lg-12 col-xs-12">
|
|
<h1 class="m-n font-thin h3">Запросы на услуги</h1>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div class="wrapper-md">
|
|
<div class="row">
|
|
<table width="100%">
|
|
<thead>
|
|
<tr>
|
|
<td style="padding: 10px;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-bottom: 1px dotted #999;">Плательщик</td>
|
|
<td style="padding: 10px;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-bottom: 1px dotted #999;">Телефон</td>
|
|
<td style="padding: 10px;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-bottom: 1px dotted #999;">Почта</td>
|
|
<td style="padding: 10px;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-bottom: 1px dotted #999;">Курс</td>
|
|
<td style="padding: 10px;text-align: center;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-bottom: 1px dotted #999;">Статус запроса</td>
|
|
<td style="padding: 10px;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-bottom: 1px dotted #999;">Дата запроса</td>
|
|
<td style="padding: 10px;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-bottom: 1px dotted #999;">Управление</td>
|
|
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
{% for i in servicerequests %}
|
|
<tr style="border-bottom: 1px dotted;" name="service_request_row_{{ i.id }}">
|
|
<td style="padding: 10px; background: #ffc;">{{ i.student.fname }} {{ i.student.name }} {{ i.student.oname }}</td>
|
|
<td style="padding: 10px; background: #ffc;font-weight: bold;">{{ i.student.get_phone }}</td>
|
|
<td style="padding: 10px; background: #ffc;font-weight: bold;">{{ i.student.email }}</td>
|
|
<td style="padding: 10px; background: #ffc;">{{ i.get_name }}</td>
|
|
<td style="padding: 10px; background: #ffc;font-weight: bold;text-align: center;">
|
|
{% if i.manager == request.user and i.status == 'W' %}
|
|
<span class="label label-danger">Вы не закончили обработку</span>
|
|
{% else %}
|
|
{{ i.get_status_display }}
|
|
{% endif %}
|
|
</td>
|
|
<td style="padding: 10px;
|
|
font-weight: bold;
|
|
background-color: #fff;border-right: 1px dotted #999;border-left: 1px dotted #999;">
|
|
{{ i.date }}
|
|
</td>
|
|
<td style="padding: 10px; background: #ffc;">
|
|
{% if not i.manager %}
|
|
<button onclick="open_service_request({{ i.id }})">Взять в работу</button>
|
|
{% else %}
|
|
{% if i.manager == request.user %}
|
|
<button onclick="open_service_request({{ i.id }})">Продолжит работу</button>
|
|
{% endif %}
|
|
{% endif %}
|
|
<button onclick="open_service_request_charge_modal({{ i.id }})">Поручить продажу</button>
|
|
<i onclick="accept_action('удалить запрос?<br>Его восстановление будет не возможно.', remove_service_request, {{ i.id }})" class="glyphicon glyphicon-trash red_icon" style="float: right;"></i>
|
|
</td>
|
|
|
|
</tr>
|
|
{% empty %}
|
|
<tr>
|
|
<td colspan="7" style="text-align: center;background: #ffc;padding: 20px;">
|
|
<h1 style="font-weight: bold;">
|
|
Запросов нет
|
|
</h1>
|
|
</td>
|
|
</tr>
|
|
{% endfor %}
|
|
</tbody>
|
|
</table>
|
|
</div>
|
|
</div>
|
|
<!-- / main header -->
|
|
|
|
</div>
|
|
<!-- / main -->
|
|
<!-- right col -->
|
|
<!-- / right col -->
|
|
{% endblock %}
|
|
|