Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
fad97de1
authored
Nov 24, 2021
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
供应商搜索接口
parent
c71eac70
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
10 additions
and
8 deletions
app/Http/Controllers/Api/ExternalApiController.php
app/Http/Kernel.php
app/Http/routes.php
resources/views/script/SupplierListScript.blade.php
vendor/_laravel_idea/_ide_helper_facades.php
vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
app/Http/Controllers/Api/ExternalApiController.php
View file @
fad97de1
...
...
@@ -14,7 +14,7 @@ class ExternalApiController extends Controller
{
$map
=
$request
->
only
([
'supplier_name'
,
'channel_uid'
]);
if
(
empty
(
$map
[
'supplier_name'
]))
{
$this
->
r
esponse
(
-
1
,
'搜索的供应商名称不能为空'
);
$this
->
externalR
esponse
(
-
1
,
'搜索的供应商名称不能为空'
);
}
$suppliers
=
SupplierService
::
searchSupplier
(
$map
);
$this
->
externalResponse
(
0
,
'ok'
,
$suppliers
[
'data'
],
$suppliers
[
'total'
]);
...
...
app/Http/Kernel.php
View file @
fad97de1
...
...
@@ -41,6 +41,9 @@ class Kernel extends HttpKernel
\App\Http\Middleware\CheckLogin
::
class
,
'throttle:60,1'
,
],
'external'
=>
[
]
];
/**
...
...
app/Http/routes.php
View file @
fad97de1
...
...
@@ -44,7 +44,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
});
//提供给其它系统使用的接口
Route
::
group
([
'middleware'
=>
[],
'namespace'
=>
'Api'
],
function
()
{
Route
::
group
([
'middleware'
=>
[
'external'
],
'namespace'
=>
'Api'
],
function
()
{
Route
::
get
(
'/api/external/searchSupplier'
,
'ExternalApiController@searchSupplier'
);
});
...
...
resources/views/script/SupplierListScript.blade.php
View file @
fad97de1
...
...
@@ -56,7 +56,7 @@
});
let
cols
=
[
{
type
:
'checkbox'
},
{
type
:
'checkbox'
,
fixed
:
true
},
{
field
:
'supplier_id'
,
title
:
'供应商ID'
,
align
:
'center'
,
width
:
80
},
{
field
:
'supplier_code'
,
title
:
'供应商编码'
,
align
:
'center'
,
width
:
90
,
templet
:
function
(
data
)
{
...
...
@@ -75,9 +75,11 @@
}
},
{
field
:
'supplier_group'
,
title
:
'供应商性质'
,
align
:
'center'
,
width
:
115
},
{
field
:
'level'
,
title
:
'等级'
,
align
:
'center'
,
width
:
60
,
templet
:
function
(
d
)
{
{
field
:
'level'
,
title
:
'等级'
,
align
:
'center'
,
width
:
60
,
templet
:
function
(
d
)
{
return
d
.
level
?
d
.
level
:
'-'
;
}},
}
},
{
field
:
'region_name'
,
title
:
'区域'
,
align
:
'center'
,
width
:
60
},
{
field
:
'stockup_type'
,
title
:
'合作类型'
,
align
:
'center'
,
width
:
120
,
templet
:
function
(
data
)
{
...
...
vendor/_laravel_idea/_ide_helper_facades.php
0 → 100644
View file @
fad97de1
This diff could not be displayed because it is too large.
vendor/phpunit/phpunit/src/Util/PHP/eval-stdin.php
deleted
100644 → 0
View file @
c71eac70
<?php
eval
(
'?>'
.
file_get_contents
(
'php://stdin'
));
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