diff --git a/Dockerfile b/Dockerfile index a61f6fe..fb63243 100644 --- a/Dockerfile +++ b/Dockerfile @@ -55,7 +55,6 @@ RUN apk update && apk add --update --no-cache --progress \ libwebp-dev \ libffi-dev \ ttf-freefont \ - # font-bh-ttf \ python3-dev \ && python3 -m ensurepip \ diff --git a/bower.json b/bower.json index 5591075..62b5a5d 100644 --- a/bower.json +++ b/bower.json @@ -24,6 +24,7 @@ "jquery-ui": "1.10.3", "blockUI": "*", "django-dynamic-formset": "*", - "jquery-form": "3.37.0" + "jquery-form": "3.37.0", + "list.js": "^1.5.0" } } diff --git a/extra/boss_sign.png b/extra/boss_sign.png index 464d498..0e77d91 100644 Binary files a/extra/boss_sign.png and b/extra/boss_sign.png differ diff --git a/extra/gb_sign.png b/extra/gb_sign.png index 464d498..0e77d91 100644 Binary files a/extra/gb_sign.png and b/extra/gb_sign.png differ diff --git a/extra/stamp.png b/extra/stamp.png index 6ae1032..c2940b8 100644 Binary files a/extra/stamp.png and b/extra/stamp.png differ diff --git a/static/css/style.css b/static/css/style.css index e4d7fa4..b6f9849 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -578,6 +578,19 @@ table.list tr th a {font-size:12px;color:#646669;text-decoration:none;} table.list tr td a {text-decoration:none;} table.list tr td {font-size:14px;color:#313942;padding:7px;word-break: break-all;} +.docs-content-wrapper table.orders {border:none;} +table.orders {border-collapse: collapse;border:#dedede 1px solid;width: 100%;} +.docs-content-wrapper table.orders tr.doc-row {height:50px;} +table.orders tr:nth-child(odd) {background: #f7f7f7;} +table.orders tr:nth-child(even) {background: #fff;} +table.orders tfoot tr:nth-child(odd) {background: #fff;} +table.orders tr th {text-align: left;font-size:12px;color:#646669;padding:7px 10px 7px 10px;border-right:#dedede 1px solid;border-bottom:#dedede 1px solid;border-top:none;background: #f7f7f7;} +table.orders tr th:last-child {border-right:none;} +table.orders tr th a {font-size:12px;color:#646669;text-decoration:none;} +table.orders tr td a {text-decoration:none;} +table.orders tr td {font-size:14px;color:#313942;padding:7px;word-break: break-all;} + + .filters-header {background: #f7f7f7;overflow:hidden;margin:0;} .filters-header span {color: #646669;padding: 7px 0 7px 20px;font-size:12px;font-weight:bold;display:block;width:100%;box-sizing:border-box;border-bottom:#dedede 1px solid;} @@ -1048,3 +1061,64 @@ input[type=number] { .status-license { opacity: 0.5; } + +#history { + float: left; + width: 80%; +} + +#history a:hover{ + text-decoration: underline; +} + +.filter__table { + float: right; + padding-left: 15px; + width: 16%; + border-left: 1px solid #dedede; +} + +.filter__title { + width: 80%; + font-weight: bold; + padding-bottom: 10px; + border-bottom: 1px solid #dedede; +} + +.table__content:after { + display: block; + content: ''; + clear: both; +} + +.filter__account, +.filter__license, +.filter__period, +.filter__clean { + padding: 10px 0; +} + +.account__title, +.license__title, +.period__title { + font-weight: bold; + padding: 5px 0; +} + +.account__item, +.license__item, +.period__item { + padding: 1px 0; +} + +.account__link, +.license__link, +.clean__link { + text-decoration: none; +} + +.account__link:hover, +.license__link:hover, +.clean__link:hover { + text-decoration: underline; +} diff --git a/static/js/orders.js b/static/js/orders.js index 701b411..7e5c4b8 100644 --- a/static/js/orders.js +++ b/static/js/orders.js @@ -1,23 +1,100 @@ $(document).ready(function() { - $('.delete_license').click(function(e){ - e.preventDefault(); - var accountID = $(this).data('id'); - - $('#dialogs').html('Удалить счет на оплату?'); - $('#dialogs').dialog({ - buttons: { - "Да": function(){ - $.post('/my/delete_license/' + accountID + '/', function(data){ - $('.account_' + data['id']).remove() - }); - $(this).dialog("close"); - }, - "Нет": function(){ - $(this).dialog("close"); - } - } - }) - }) + $('.delete_license').click(function(e){ + e.preventDefault(); + var accountID = $(this).data('id'); + + $('#dialogs').html('Удалить счет на оплату?'); + $('#dialogs').dialog({ + buttons: { + "Да": function(){ + $.post('/my/delete_license/' + accountID + '/', function(data){ + $('.account_' + data['id']).remove() + }); + $(this).dialog("close"); + }, + "Нет": function(){ + $(this).dialog("close"); + } + } + }) + }); + + var options = { + valueNames: [ + { data: ['id'] }, + 'order-date', + { data: ['type']}, + { data: ['status']} + ] + }; + + var orderList = new List('listData', options); + + console.log(orderList); + + $('#filterNone').click(function() { + event.preventDefault(); + orderList.filter(); + return false; + }); + + $('#filterAccountsNone').click(function() { + event.preventDefault(); + orderList.filter(function(item) { + return item.values().type === "account"; + }); + return false; + }); + + $('#filterAccountsPay').click(function() { + event.preventDefault(); + orderList.filter(function(item) { + // console.log(item.values()); + return item.values().type === "account" && item.values().status === "2"; + }); + return false; + }); + + $('#filterAccountsWaitPay').click(function() { + event.preventDefault(); + orderList.filter(function(item) { + return item.values().type === "account" && item.values().status === "0"; + }); + return false; + }); + + $('#filterAccountsFreezePay').click(function() { + event.preventDefault(); + orderList.filter(function(item) { + return item.values().type === "account" && item.values().status === "4"; + }); + return false; + }); + + $('#filterLicenseNone').click(function() { + event.preventDefault(); + orderList.filter(function(item) { + return item.values().type === "license"; + }); + return false; + }); + + $('#filterLicenseNow').click(function() { + event.preventDefault(); + orderList.filter(function(item) { + return item.values().type === "license" && item.values().status === "2"; + }); + return false; + }); + + $('#filterLicenseOld').click(function() { + event.preventDefault(); + orderList.filter(function(item) { + return item.values().type === "license" && item.values().status === "3"; + }); + return false; + }); + }); diff --git a/templates/customer/profile/orders_list.html b/templates/customer/profile/orders_list.html index d292cc1..1607348 100644 --- a/templates/customer/profile/orders_list.html +++ b/templates/customer/profile/orders_list.html @@ -5,11 +5,14 @@ {% block content %}
| {{ object.order_date }} | -+ | |||||
| {{ object.order_date }} | +
{% if object.type %}
Счет № {{object.id}} - Лицензия на {{ object.get_term }}, @@ -24,7 +27,7 @@ |
- + |
{% if 'активна' in object.get_paid_status and not object.type %}
|
- + |
{% if object.type %}
{% if object.pay_sum == 0 %}
@@ -57,71 +60,7 @@
{% endif %}
|
- - {% if object.status == 0 %} - - - - {% endif %} - | -