Commit fad97de1 by 杨树贤

供应商搜索接口

parent c71eac70
...@@ -14,7 +14,7 @@ class ExternalApiController extends Controller ...@@ -14,7 +14,7 @@ class ExternalApiController extends Controller
{ {
$map = $request->only(['supplier_name','channel_uid']); $map = $request->only(['supplier_name','channel_uid']);
if (empty($map['supplier_name'])) { if (empty($map['supplier_name'])) {
$this->response(-1, '搜索的供应商名称不能为空'); $this->externalResponse(-1, '搜索的供应商名称不能为空');
} }
$suppliers = SupplierService::searchSupplier($map); $suppliers = SupplierService::searchSupplier($map);
$this->externalResponse(0, 'ok', $suppliers['data'], $suppliers['total']); $this->externalResponse(0, 'ok', $suppliers['data'], $suppliers['total']);
......
...@@ -41,6 +41,9 @@ class Kernel extends HttpKernel ...@@ -41,6 +41,9 @@ class Kernel extends HttpKernel
\App\Http\Middleware\CheckLogin::class, \App\Http\Middleware\CheckLogin::class,
'throttle:60,1', 'throttle:60,1',
], ],
'external' => [
]
]; ];
/** /**
......
...@@ -44,7 +44,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () { ...@@ -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'); Route::get('/api/external/searchSupplier','ExternalApiController@searchSupplier');
}); });
......
...@@ -56,7 +56,7 @@ ...@@ -56,7 +56,7 @@
}); });
let cols = [ let cols = [
{type: 'checkbox'}, {type: 'checkbox', fixed: true},
{field: 'supplier_id', title: '供应商ID', align: 'center', width: 80}, {field: 'supplier_id', title: '供应商ID', align: 'center', width: 80},
{ {
field: 'supplier_code', title: '供应商编码', align: 'center', width: 90, templet: function (data) { field: 'supplier_code', title: '供应商编码', align: 'center', width: 90, templet: function (data) {
...@@ -75,9 +75,11 @@ ...@@ -75,9 +75,11 @@
} }
}, },
{field: 'supplier_group', title: '供应商性质', align: 'center', width: 115}, {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 : '-'; return d.level ? d.level : '-';
}}, }
},
{field: 'region_name', title: '区域', align: 'center', width: 60}, {field: 'region_name', title: '区域', align: 'center', width: 60},
{ {
field: 'stockup_type', title: '合作类型', align: 'center', width: 120, templet: function (data) { field: 'stockup_type', title: '合作类型', align: 'center', width: 120, templet: function (data) {
......
This diff could not be displayed because it is too large.
<?php
eval('?>' . file_get_contents('php://stdin'));
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment