Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
A
addcpm-json
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Александр Чаплыгин
addcpm-json
Commits
6f2992f4
Commit
6f2992f4
authored
May 28, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Добавил колонку статуса в excel-таблице для в режиме All
parent
418073a7
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
21 additions
and
14 deletions
+21
-14
script-feeds-stat-table.js
src/public/js/script-feeds-stat-table.js
+2
-2
script-feeds-stat.js
src/public/js/script-feeds-stat.js
+14
-0
cabinet-feed.phtml
src/templates/app/user/cabinet-feed.phtml
+5
-12
No files found.
src/public/js/script-feeds-stat-table.js
View file @
6f2992f4
...
@@ -195,7 +195,7 @@ $(document).ready(function(){
...
@@ -195,7 +195,7 @@ $(document).ready(function(){
}
}
})));
})));
$rowExcel
=
$
(
'<tr class="'
+
trClass
+
'">'
);
$rowExcel
=
$
(
'<tr class="
order-item
'
+
trClass
+
'">'
);
$rowExcel
.
append
(
$
(
'<td>'
).
html
(
item
[
'period'
]));
$rowExcel
.
append
(
$
(
'<td>'
).
html
(
item
[
'period'
]));
}
else
{
}
else
{
...
@@ -212,7 +212,7 @@ $(document).ready(function(){
...
@@ -212,7 +212,7 @@ $(document).ready(function(){
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateTimestampContent
({
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateTimestampContent
({
data
:
{
date
:
getDateValue
(
item
[
line
]),
time
:
getHourMinValue
(
item
[
line
])}
data
:
{
date
:
getDateValue
(
item
[
line
]),
time
:
getHourMinValue
(
item
[
line
])}
})));
})));
$rowExcel
.
append
(
$
(
'<td>'
).
append
(
item
[
line
]));
$rowExcel
.
append
(
$
(
'<td
class="Timestamp"
>'
).
append
(
item
[
line
]));
}
else
if
(
line
==
'ViewID'
)
{
}
else
if
(
line
==
'ViewID'
)
{
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateViewIDContent
({
$row
.
append
(
$
(
'<td class="'
+
line
+
'">'
).
append
(
templateViewIDContent
({
data
:
{
feedId
:
item
[
line
][
0
],
viewId
:
item
[
line
][
1
]}
data
:
{
feedId
:
item
[
line
][
0
],
viewId
:
item
[
line
][
1
]}
...
...
src/public/js/script-feeds-stat.js
View file @
6f2992f4
...
@@ -288,6 +288,20 @@ $(document).ready(function(){
...
@@ -288,6 +288,20 @@ $(document).ready(function(){
if
(
activeStatus
==
'all'
)
{
if
(
activeStatus
==
'all'
)
{
$
(
'thead tr.orders-title.confirmed, thead tr.orders-title.rejected'
,
$tableToExcelCopy
).
remove
();
$
(
'thead tr.orders-title.confirmed, thead tr.orders-title.rejected'
,
$tableToExcelCopy
).
remove
();
$
(
'tbody tr.total-orders'
,
$tableToExcelCopy
).
remove
();
$
(
'tbody tr.total-orders'
,
$tableToExcelCopy
).
remove
();
// Добавляем сколонку статуса:
$
(
'thead tr th.Timestamp'
,
$tableToExcelCopy
).
after
(
'<th><b>Статус</b></th>'
);
$
(
'tbody tr.order-item'
,
$tableToExcelCopy
).
each
(
function
(){
var
$this
=
$
(
this
),
orderStatusTitle
;
if
(
$this
.
hasClass
(
'confirmed'
))
orderStatusTitle
=
'Подтверждён'
;
if
(
$this
.
hasClass
(
'rejected'
))
orderStatusTitle
=
'Отклонён'
;
$
(
'td.Timestamp'
,
$this
).
after
(
'<th>'
+
orderStatusTitle
+
'</th>'
);
});
}
}
if
(
activeStatus
==
'confirmed'
)
{
if
(
activeStatus
==
'confirmed'
)
{
$
(
'thead tr.orders-title.all, thead tr.orders-title.rejected'
,
$tableToExcelCopy
).
remove
();
$
(
'thead tr.orders-title.all, thead tr.orders-title.rejected'
,
$tableToExcelCopy
).
remove
();
...
...
src/templates/app/user/cabinet-feed.phtml
View file @
6f2992f4
...
@@ -231,24 +231,17 @@ if (!$error) {
...
@@ -231,24 +231,17 @@ if (!$error) {
<?php endif; */
?>
<?php endif; */
?>
<?php
if
(
$current_report
==
'transactions'
)
:
?>
<?php
if
(
$current_report
==
'transactions'
)
:
?>
<table
id=
"table2excel"
data-content=
"shop-
<?=
$shop_title
?>
"
width=
"100%"
>
<table
id=
"table2excel"
data-content=
"shop-
<?=
$shop_title
?>
"
width=
"100%"
>
<thead>
<thead>
<tr
class=
"orders-title all"
><th
colspan=
"4"
>
Все заказы
</th></tr>
<tr
class=
"orders-title all"
><th
colspan=
"4"
>
Все заказы
</th></tr>
<tr
class=
"orders-title confirmed"
><th
colspan=
"4"
>
Подтвержденные заказы
</th></tr>
<tr
class=
"orders-title confirmed"
><th
colspan=
"4"
>
Подтвержденные заказы
</th></tr>
<tr
class=
"orders-title rejected"
><th
colspan=
"4"
>
Отклонённые заказы
</th></tr>
<tr
class=
"orders-title rejected"
><th
colspan=
"4"
>
Отклонённые заказы
</th></tr>
<tr>
<tr>
<th>
<th><b>
<?=
_t
(
$main_cat
[
'title'
])
?>
</b></th>
<b>
<?=
_t
(
$main_cat
[
'title'
])
?>
</b>
<th
class=
"Timestamp"
><b>
<?=
_t
(
'Дата время'
)
?>
</b></th>
</th>
<th><b>
<?=
_t
(
'Сумма'
)
?>
</b></th>
<?php
foreach
(
$report_cats
as
$name
=>
$title
)
:
?>
<th><b>
<?=
_t
(
'Комиссия'
)
?>
</b></th>
<?php
if
(
$name
==
'Timestamp'
)
:
?>
<th><b>
<?=
_t
(
'Дата время'
)
?>
</b></th>
<?php
else
:
?>
<?php
if
(
!
in_array
(
$name
,
[
'ViewID'
,
'Basket'
]))
:
?>
<th><b>
<?=
_t
(
$title
)
?>
</b></th>
<?php
endif
;
?>
<?php
endif
;
?>
<?php
endforeach
;
?>
</tr>
</tr>
</thead>
</thead>
<tbody>
<tbody>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment