Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
service
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
aimeiyue
service
Commits
960cbdbe
Commit
960cbdbe
authored
9 months ago
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
0844224e
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
8 additions
and
13 deletions
+8
-13
app/Models/OrderInfo.php
+1
-1
app/Store/Controllers/HomeController.php
+0
-5
app/Store/Metrics/Examples/LastPickupTotal.php
+1
-1
app/Store/Metrics/Examples/LastProductOrders.php
+1
-1
app/Store/Metrics/Examples/LastStockTotal.php
+1
-1
app/Store/Metrics/Examples/PickupTotal.php
+1
-1
app/Store/Metrics/Examples/ProductOrders.php
+1
-1
app/Store/Metrics/Examples/StockTotal.php
+1
-1
app/Store/Metrics/Examples/WaitPickTotal.php
+1
-1
No files found.
app/Models/OrderInfo.php
View file @
960cbdbe
...
...
@@ -44,7 +44,7 @@ public function merchant()
*/
public
static
function
getNumData
(
$started
=
''
,
$ended
=
''
,
$status
=
[],
$merchant_id
=
0
)
{
$where
=
[];
$where
=
[
'pay_status'
=>
1
];
$sqlObj
=
new
self
();
if
(
$merchant_id
)
{
$where
[
'merchant_id'
]
=
$merchant_id
;
...
...
This diff is collapsed.
Click to expand it.
app/Store/Controllers/HomeController.php
View file @
960cbdbe
...
...
@@ -20,11 +20,6 @@ public function index(Content $content)
->
header
(
'主页'
)
->
description
(
'数据总览'
)
->
body
(
function
(
Row
$row
)
{
// $row->column(6, function (Column $column) {
// // $row->column(6, new Examples\NewUsers());
// // $row->column(6, new Examples\GoodsTotal());
// $column->row(new Examples\Revenue());
// });
$day
=
date
(
"d"
);
$row
->
column
(
12
,
function
(
Column
$column
)
{
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/LastPickupTotal.php
View file @
960cbdbe
...
...
@@ -45,7 +45,7 @@ public function handle(Request $request)
$started
=
date
(
'Y-m-01'
,
strtotime
(
'last month'
));
$ended
=
date
(
'Y-m-t'
,
strtotime
(
'last month'
));
$order_status
=
[
3
,
4
];
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
merchant_
id
);
// 卡片内容
$this
->
withContent
(
$count
);
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/LastProductOrders.php
View file @
960cbdbe
...
...
@@ -50,7 +50,7 @@ public function handle(Request $request)
//上月
$started
=
date
(
'Y-m-01'
,
strtotime
(
'last month'
));
$ended
=
date
(
'Y-m-t'
,
strtotime
(
'last month'
));
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
[
2
],
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
[
],
Admin
::
user
()
->
merchant_
id
);
// 卡片内容
$this
->
withContent
(
$count
);
// 图表数据
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/LastStockTotal.php
View file @
960cbdbe
...
...
@@ -43,7 +43,7 @@ public function handle(Request $request)
case
'30'
:
case
'7'
:
default
:
$mer_id
=
Admin
::
user
()
->
id
;
$mer_id
=
Admin
::
user
()
->
merchant_
id
;
$firstDayOfMonth
=
date
(
'Y-m-01 00:00:00'
,
strtotime
(
'-1 month'
,
time
()));
$lastDayOfMonth
=
date
(
'Y-m-t 23:59:59'
,
strtotime
(
'-1 month'
,
time
()));
$currentStock
=
MerchantGoodSku
::
where
(
"merchant_id"
,
$mer_id
)
->
sum
(
'stock'
);
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/PickupTotal.php
View file @
960cbdbe
...
...
@@ -55,7 +55,7 @@ public function handle(Request $request)
$started
=
date
(
"Y-m-01"
);
$ended
=
date
(
"Y-m-t"
);
$order_status
=
[
3
,
4
];
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
merchant_
id
);
// 卡片内容
$this
->
withContent
(
$count
);
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/ProductOrders.php
View file @
960cbdbe
...
...
@@ -50,7 +50,7 @@ public function handle(Request $request)
//本月
$started
=
date
(
"Y-m-01"
);
$ended
=
date
(
"Y-m-t"
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
[
2
],
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
[
],
Admin
::
user
()
->
merchant_
id
);
// 卡片内容
$this
->
withContent
(
$count
);
// 图表数据
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/StockTotal.php
View file @
960cbdbe
...
...
@@ -42,7 +42,7 @@ public function handle(Request $request)
case
'30'
:
case
'7'
:
default
:
$mer_id
=
Admin
::
user
()
->
id
;
$mer_id
=
Admin
::
user
()
->
merchant_
id
;
$currentStock
=
MerchantGoodSku
::
where
(
"merchant_id"
,
$mer_id
)
->
sum
(
'stock'
);
// 卡片内容
$this
->
withContent
(
$currentStock
);
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/WaitPickTotal.php
View file @
960cbdbe
...
...
@@ -54,7 +54,7 @@ public function handle(Request $request)
$started
=
date
(
"Y-m-01"
);
$ended
=
date
(
"Y-m-t"
);
$order_status
=
[
2
];
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
merchant_
id
);
// 卡片内容
$this
->
withContent
(
$count
);
...
...
This diff is collapsed.
Click to expand it.
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