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
d82c7217
Commit
d82c7217
authored
a year ago
by
lizhilin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
2d12a6d2
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
20 additions
and
26 deletions
+20
-26
app/Admin/Actions/MerchantSubStore.php
+4
-5
app/Admin/Controllers/ArticleController.php
+2
-1
app/Admin/Controllers/MerchantController.php
+4
-0
app/Admin/Controllers/MerchantGoodsStoreController.php
+1
-9
app/Admin/Metrics/Examples/OrderBar.php
+3
-5
app/Models/Article.php
+1
-1
app/Models/OrderInfo.php
+1
-1
app/Models/Store.php
+1
-1
app/Store/Metrics/Examples/PickupTotal.php
+1
-1
app/Store/Metrics/Examples/ProductOrders.php
+1
-1
app/Store/Metrics/Examples/WaitPickTotal.php
+1
-1
No files found.
app/Admin/Actions/MerchantSubStore.php
View file @
d82c7217
...
...
@@ -32,10 +32,7 @@ public function __construct($title = '', $goods_id = 0)
parent
::
__construct
(
$title
);
$this
->
title
=
$title
;
}
/**
* @return string
*/
//protected $title = '<i class="feather icon-stop-circle"> 增加库存 </i>';
/**
* 按钮文本
*
...
...
@@ -82,7 +79,6 @@ public function render()
$html
=
''
;
foreach
(
$dataArr
as
$kk
=>
$vv
)
{
$html
.=
'<tr>'
;
$html
.=
'<input type="hidden" name="sskuid[]" value="'
.
$vv
[
'id'
]
.
'">'
;
$html
.=
'<input type="hidden" name="goods_id" value="'
.
$this
->
goods_id
.
'">'
;
$html
.=
'<input type="hidden" name="mgs_id" value="'
.
$mgs_id
.
'">'
;
...
...
@@ -103,7 +99,10 @@ public function render()
<<<
js
$
(
document
)
.
ready
(
function
()
{
console
.
log
(
'{$html}'
);
var
htmlValue
=
'{$html}'
;
if
(
htmlValue
.
length
>
0
)
{
$
(
"#tabletr2"
)
.
html
(
'"+ $html +"'
);
}
});
js
);
...
...
This diff is collapsed.
Click to expand it.
app/Admin/Controllers/ArticleController.php
View file @
d82c7217
...
...
@@ -23,7 +23,8 @@ protected function grid()
return
Grid
::
make
(
Article
::
with
([
'cat'
]),
function
(
Grid
$grid
)
{
$grid
->
model
()
->
orderBy
(
'created_at'
,
'DESC'
);
$grid
->
column
(
'id'
)
->
sortable
();
$grid
->
column
(
'title'
);
$grid
->
column
(
'title'
)
->
limit
(
20
);
$grid
->
column
(
'brief'
,
'副标题'
)
->
limit
(
20
);
$grid
->
column
(
'cat.title'
,
'分类名称'
);
$grid
->
column
(
'content'
)
->
if
(
function
(
$column
)
{
return
$column
->
getValue
();
...
...
This diff is collapsed.
Click to expand it.
app/Admin/Controllers/MerchantController.php
View file @
d82c7217
...
...
@@ -91,6 +91,10 @@ protected function form()
$form
->
select
(
'city_id'
,
'城市'
);
$form
->
hasMany
(
'store_desc'
,
'添加门店'
,
function
(
\Dcat\Admin\Widgets\Form
$forms
)
{
$forms
->
text
(
'title'
,
'门店名称'
)
->
required
();
$forms
->
select
(
'provinceId'
,
'省份'
)
->
options
(
City
::
where
(
'parent_id'
,
0
)
->
get
()
->
pluck
(
'name'
,
'city_id'
))
->
rules
(
'required'
)
->
load
(
'cityId'
,
'/city'
);
$forms
->
select
(
'cityId'
,
'城市'
);
$forms
->
text
(
'contacts'
,
'联系人'
);
$forms
->
text
(
'phone'
,
'手机号'
);
$forms
->
text
(
'lat_lng'
,
'经纬度'
)
->
help
(
'<a href="https://lbs.amap.com/tools/picker" target="_blank">点击获取高德地图坐标</a>'
);
$forms
->
text
(
'address'
,
'详细地址'
);
$forms
->
text
(
'distance'
,
'配送范围(Km)'
);
...
...
This diff is collapsed.
Click to expand it.
app/Admin/Controllers/MerchantGoodsStoreController.php
View file @
d82c7217
...
...
@@ -22,11 +22,7 @@
class
MerchantGoodsStoreController
extends
AdminController
{
// public function index(Content $content)
// {
// echo 11;
// die;
// }
/**
* Make a grid builder.
*
...
...
@@ -63,12 +59,8 @@ protected function grid()
});
$grid
->
actions
(
function
(
Grid\Displayers\Actions
$actions
)
{
//当前status
//$status = $actions->row->status;
//if ($status == 0) {
$actions
->
append
(
new
MerchantAddStore
(
'增加库存'
,
$actions
->
row
->
goods_id
));
$actions
->
append
(
new
MerchantSubStore
(
'减少库存'
,
$actions
->
row
->
goods_id
));
//}
});
});
}
...
...
This diff is collapsed.
Click to expand it.
app/Admin/Metrics/Examples/OrderBar.php
View file @
d82c7217
...
...
@@ -14,6 +14,8 @@ public function __construct($containerSelector = null, $options = [])
$this
->
setUpOptions
();
}
/**
* 初始化图表配置
*/
...
...
@@ -28,7 +30,7 @@ protected function setUpOptions()
'chart'
=>
[
'type'
=>
'bar'
,
'height'
=>
430
,
'barWidth'
=>
'1'
'barWidth'
=>
'1'
,
],
'plotOptions'
=>
[
'bar'
=>
[
...
...
@@ -85,10 +87,6 @@ protected function buildData()
*/
public
function
withData
(
array
$data
)
{
//$data[0] = array_merge($data[0], ['itemStyle' => ['barWidth' => '1%']]);
// echo "<pre>";
// print_r($data);
// die;
return
$this
->
option
(
'series'
,
$data
);
}
...
...
This diff is collapsed.
Click to expand it.
app/Models/Article.php
View file @
d82c7217
...
...
@@ -13,6 +13,6 @@ class Article extends Model
public
function
cat
()
{
return
$this
->
belongsTo
(
c
ategory
::
class
,
'cat_id'
);
return
$this
->
belongsTo
(
C
ategory
::
class
,
'cat_id'
);
}
}
This diff is collapsed.
Click to expand it.
app/Models/OrderInfo.php
View file @
d82c7217
...
...
@@ -42,7 +42,7 @@ public function merchant()
* status 订单状态
* merchant_id 商户ID
*/
public
static
function
getNumDa
yData2
(
$started
=
''
,
$ended
=
''
,
$status
=
[],
$merchant_id
=
0
)
public
static
function
getNumDa
ta
(
$started
=
''
,
$ended
=
''
,
$status
=
[],
$merchant_id
=
0
)
{
$where
=
[];
$sqlObj
=
new
self
();
...
...
This diff is collapsed.
Click to expand it.
app/Models/Store.php
View file @
d82c7217
...
...
@@ -11,5 +11,5 @@ class Store extends Model
use
HasDateTimeFormatter
;
protected
$table
=
'store'
;
protected
$fillable
=
[
'title'
,
'merchant_id'
,
'
lat_lng
'
];
protected
$fillable
=
[
'title'
,
'merchant_id'
,
'
provinceId'
,
'cityId'
,
'contacts'
,
'phone'
,
'lat_lng'
,
'address'
,
'distance'
,
'business_license
'
];
}
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/PickupTotal.php
View file @
d82c7217
...
...
@@ -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
::
getNumDa
yDa
ta
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
id
);
// 卡片内容
$this
->
withContent
(
$count
);
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/ProductOrders.php
View file @
d82c7217
...
...
@@ -50,7 +50,7 @@ public function handle(Request $request)
//本月
$started
=
date
(
"Y-m-01"
);
$ended
=
date
(
"Y-m-t"
);
$count
=
OrderInfoModel
::
getNumDa
yDa
ta
(
$started
,
$ended
,
[
2
],
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
[
2
],
Admin
::
user
()
->
id
);
// 卡片内容
$this
->
withContent
(
$count
);
// 图表数据
...
...
This diff is collapsed.
Click to expand it.
app/Store/Metrics/Examples/WaitPickTotal.php
View file @
d82c7217
...
...
@@ -54,7 +54,7 @@ public function handle(Request $request)
$started
=
date
(
"Y-m-01"
);
$ended
=
date
(
"Y-m-t"
);
$order_status
=
[
2
];
$count
=
OrderInfoModel
::
getNumDa
yDa
ta
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
id
);
$count
=
OrderInfoModel
::
getNumData
(
$started
,
$ended
,
$order_status
,
Admin
::
user
()
->
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