Commit 4d494e0a by 杨树贤

供应商入驻页面迁移

parent d538d0ee
...@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Api; ...@@ -4,7 +4,7 @@ namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller; use App\Http\Controllers\Controller;
use App\Http\Services\LogService; use App\Http\Services\LogService;
use App\Http\Services\SupplierApplyService; use App\Http\Services\ChainService;
use App\Http\Services\SupplierExaminationService; use App\Http\Services\SupplierExaminationService;
use App\Http\Transformers\SupplierLogTransformer; use App\Http\Transformers\SupplierLogTransformer;
use App\Http\Validators\SupplierExaminationValidator; use App\Http\Validators\SupplierExaminationValidator;
...@@ -24,10 +24,10 @@ class ChainApiController extends Controller ...@@ -24,10 +24,10 @@ class ChainApiController extends Controller
} }
//获取列表 //获取列表
public function GetSupplierApplyList($request) public function GetChainList($request)
{ {
$service = new SupplierApplyService(); $service = new ChainService();
$list = $service->getSupplierApplyList($request->all()); $list = $service->getChainList($request->all());
$this->response(0, 'ok', $list['data'], $list['total']); $this->response(0, 'ok', $list['data'], $list['total']);
} }
} }
...@@ -43,6 +43,7 @@ class ChainController extends Controller ...@@ -43,6 +43,7 @@ class ChainController extends Controller
public function ChainList($request) public function ChainList($request)
{ {
$this->data['title'] = '供应商申请列表'; $this->data['title'] = '供应商申请列表';
$this->data['view'] = 'ChainList';
return $this->view('供应商申请列表'); return $this->view('供应商申请列表');
} }
} }
\ No newline at end of file
...@@ -15,6 +15,8 @@ class ChainTransformer ...@@ -15,6 +15,8 @@ class ChainTransformer
$redis = new RedisModel(); $redis = new RedisModel();
foreach ($list as &$item) { foreach ($list as &$item) {
$item['create_time'] = $item['create_time'] ? date('Y-m-d H:i:s', $item['create_time']) : ''; $item['create_time'] = $item['create_time'] ? date('Y-m-d H:i:s', $item['create_time']) : '';
$item['supplier_type_name'] = array_get(config('field.ChainSupplierType'), $item['supplier_type'], '无');
$item['data_type_name'] = array_get(config('field.ChainDataType'), $item['data_type'], '无');
} }
unset($item); unset($item);
......
...@@ -32,6 +32,7 @@ Route::group(['middleware' => ['web', 'menu']], function () { ...@@ -32,6 +32,7 @@ Route::group(['middleware' => ['web', 'menu']], function () {
Route::match(['get', 'post'], '/supplier_apply/{key}', 'SupplierApplyController@info'); Route::match(['get', 'post'], '/supplier_apply/{key}', 'SupplierApplyController@info');
Route::match(['get', 'post'], '/purchase_remark/{key}', 'PurchaseRemarkController@info'); Route::match(['get', 'post'], '/purchase_remark/{key}', 'PurchaseRemarkController@info');
Route::match(['get', 'post'], '/shipping_cost_ruler/{key}', 'ShippingCostRulerController@info'); Route::match(['get', 'post'], '/shipping_cost_ruler/{key}', 'ShippingCostRulerController@info');
Route::match(['get', 'post'], '/chain/{key}', 'ChainController@info');
}); });
Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () { Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
...@@ -54,6 +55,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () { ...@@ -54,6 +55,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
Route::match(['get', 'post'], '/api/supplier_apply/{key}', 'SupplierApplyApiController@Entrance'); Route::match(['get', 'post'], '/api/supplier_apply/{key}', 'SupplierApplyApiController@Entrance');
Route::match(['get', 'post'], '/api/purchase_remark/{key}', 'PurchaseRemarkApiController@Entrance'); Route::match(['get', 'post'], '/api/purchase_remark/{key}', 'PurchaseRemarkApiController@Entrance');
Route::match(['get', 'post'], '/api/shipping_cost_ruler/{key}', 'ShippingCostRulerApiController@Entrance'); Route::match(['get', 'post'], '/api/shipping_cost_ruler/{key}', 'ShippingCostRulerApiController@Entrance');
Route::match(['get', 'post'], '/api/chain/{key}', 'ChainApiController@Entrance');
//单独的统计接口 //单独的统计接口
Route::match(['get', 'post'], '/statisticsSkuNumber', function () { Route::match(['get', 'post'], '/statisticsSkuNumber', function () {
(new \App\Http\Services\DataService())->statisticsSkuNumberFromSKu(); (new \App\Http\Services\DataService())->statisticsSkuNumberFromSKu();
......
...@@ -9,7 +9,8 @@ use Illuminate\Support\Facades\Redis; ...@@ -9,7 +9,8 @@ use Illuminate\Support\Facades\Redis;
class ChainModel extends Model class ChainModel extends Model
{ {
protected $table = 'lie_chain'; protected $connection = 'liexin';
protected $table = 'chain';
protected $primaryKey = 'chain_id'; protected $primaryKey = 'chain_id';
public $timestamps = false; public $timestamps = false;
} }
...@@ -275,5 +275,17 @@ return [ ...@@ -275,5 +275,17 @@ return [
1 => '国内代购', 1 => '国内代购',
2 => '海外代购', 2 => '海外代购',
3 => '非代购', 3 => '非代购',
] ],
'ChainDataType' => [
1 => 'PC端',
2 => '移动端'
],
'ChainSupplierType' => [
1 => '自营供应商',
2 => '联营供应商',
3 => '国产推荐'
],
]; ];
\ No newline at end of file
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