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
40eb4d72
Commit
40eb4d72
authored
May 28, 2019
by
Александр Чаплыгин
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Правка для смены статуса заказа в excel таблице
parent
23190c6b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
5 deletions
+11
-5
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
+9
-3
No files found.
src/public/js/script-feeds-stat-table.js
View file @
40eb4d72
...
...
@@ -196,7 +196,7 @@ $(document).ready(function(){
}
})));
$rowExcel
=
$
(
'<tr class="order-item '
+
trClass
+
'">'
);
$rowExcel
=
$
(
'<tr class="order-item '
+
trClass
+
'"
data-feed-id="'
+
item
[
'ViewID'
][
0
]
+
'" data-order-id="'
+
item
[
'period'
]
+
'"
>'
);
$rowExcel
.
append
(
$
(
'<td>'
).
html
(
item
[
'period'
]));
}
else
{
...
...
@@ -260,7 +260,7 @@ $(document).ready(function(){
$row
.
append
(
$
(
'<td>'
).
html
(
"Всего заказов: "
+
dataPeriod
.
length
));
$rowExcel
=
$
(
'<tr class="total-all">'
);
$rowExcel
.
append
(
$
(
'<td>'
).
html
(
"<b>Всего заказов: "
+
dataPeriod
.
length
+
'</b>'
));
$rowExcel
.
append
(
$
(
'<td
class="count"
>'
).
html
(
"<b>Всего заказов: "
+
dataPeriod
.
length
+
'</b>'
));
activeLines
.
forEach
(
function
(
item
){
currentActiveLine
=
item
;
...
...
src/public/js/script-feeds-stat.js
View file @
40eb4d72
...
...
@@ -298,9 +298,9 @@ $(document).ready(function(){
if
(
$this
.
hasClass
(
'confirmed'
))
orderStatusTitle
=
'Подтверждён'
;
if
(
$this
.
hasClass
(
'rejected'
))
orderStatusTitle
=
'Отклонён'
;
$
(
'td.Timestamp'
,
$this
).
after
(
'<t
h>'
+
orderStatusTitle
+
'</th
>'
);
$
(
'td.Timestamp'
,
$this
).
after
(
'<t
d>'
+
orderStatusTitle
+
'</td
>'
);
});
$
(
'tbody tr.total-all td.count'
,
$tableToExcelCopy
).
after
(
'<td></td>'
);
}
if
(
activeStatus
==
'confirmed'
)
{
$
(
'thead tr.orders-title.all, thead tr.orders-title.rejected'
,
$tableToExcelCopy
).
remove
();
...
...
@@ -355,7 +355,9 @@ $(document).ready(function(){
'confirmed'
:
$this
.
prop
(
"checked"
)
?
1
:
0
,
'feedId'
:
$spanWrap
.
data
(
'feed-id'
),
'orderId'
:
$spanWrap
.
data
(
'order-id'
),
};
},
$tableToExcel
=
$
(
"#table2excel"
),
$orderTrExcel
=
$
(
'tbody tr.order-item[data-feed-id="'
+
$spanWrap
.
data
(
'feed-id'
)
+
'"][data-order-id="'
+
$spanWrap
.
data
(
'order-id'
)
+
'"]'
,
$tableToExcel
);
$this
.
prop
(
"disabled"
,
true
);
...
...
@@ -367,6 +369,10 @@ $(document).ready(function(){
if
(
data
.
result
)
{
$orderTr
.
removeClass
(
'confirmed'
).
removeClass
(
'rejected'
);
$orderTr
.
addClass
((
data
.
confirmed
)
?
'confirmed'
:
'rejected'
);
$orderTrExcel
.
removeClass
(
'confirmed'
).
removeClass
(
'rejected'
);
$orderTrExcel
.
addClass
((
data
.
confirmed
)
?
'confirmed'
:
'rejected'
);
}
else
{
$this
.
prop
(
"checked"
,
!
$this
.
prop
(
"checked"
))
}
...
...
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