Commit bc8a68b1 by mushishixian

temp

parent 087c79cf
<?php
namespace App\Http\Controllers\Api;
use App\Http\Controllers\Controller;
use App\Http\Services\SupplierContactService;
use App\Http\Services\SupplierStatisticsService;
use App\Http\Transformers\SupplierContactTransformer;
use App\Http\Validators\SupplierContactValidator;
use App\Model\SupplierContactModel;
use Illuminate\Http\Request;
//通用API,比如获取品牌列表,分类列表等
class SkuApiController extends Controller
{
public function Entrance(Request $request, $id)
{
$this->$id($request, $id);
}
public function GetSkuList($request)
{
$this->response(0, 'ok', []);
}
}
<?php
namespace App\Http\Controllers;
use App\Http\Controllers\Filter\LogFilter;
use App\Http\Controllers\Filter\SupplierLogFilter;
use App\Http\Services\LogService;
use App\Model\LogModel;
use App\Model\SupplierLogModel;
use Illuminate\Http\Request;
use DB;
class SkuController extends Controller
{
public function Entrance(Request $request, $id = 'index')
{
if ($request->path() == '/') {
$path = 'web/index';
} else {
$path = $request->path();
}
$this->data = [
'menus' => $request->menus,
'header' => $request->user->header,
'username' => $request->user->email,
'user_email' => $request->user->email,
'uri' => '/' . $path,
'id' => $id
];
return $this->$id($request);
}
public function __call($method, $parameters)
{
return $this->errhtml('Not', '没有这个页面');
}
public function SkuList($request)
{
return $this->view('供应商日志');
}
}
......@@ -20,8 +20,8 @@ Route::group(['middleware' => ['web', 'menu']], function () {
Route::match(['get', 'post'], '/supplier/{key}', 'SupplierController@info');
Route::match(['get', 'post'], '/supplier_contact/{key}', 'SupplierContactController@info');
Route::match(['get', 'post'], '/supplier_receipt/{key}', 'SupplierReceiptController@info');
// Route::match(['get', 'post'], '/supplier_sync_log/{key}', 'SupplierSyncLogController@info');
Route::match(['get', 'post'], '/index/{key}', 'IndexController@Entrance');
Route::match(['get', 'post'], '/sku/{key}', 'SkuController@Entrance');
Route::match(['get', 'post'], '/log/{key}', 'LogController@Entrance');
// Route::match(['get', 'post'], '/api/{key}', 'ApiController@Entrance');
// Route::match(['get', 'post'], '/hd/{key}', 'HandleController@Entrance');
......
......@@ -9,7 +9,8 @@ return [
'menuId' => env('MENU_ID'),
'menuUrl' => env('MENU_URL'),
'notAuth' => [
'SwitchWarehouse'
'SwitchWarehouse',
'SkuList'
]//不用验证权限的方法
],
];
......@@ -29,7 +29,7 @@ return [
'uploadskulist' => 'http://footstone.liexin.net/footstone/uploadskulist',
'batch' => 'http://footstone.liexin.net/footstone/Batches?', // 批量下架
'exportMonopoly' => 'http://footstone.liexin.net/footstone/exportMonopoly?', // 专卖商品批量导出
'templet' => 'http://footstone.liexin.com/footstone/templet?', // 专卖商品批量导出
'templet' => 'http://footstone.liexin.net/footstone/templet?', // 专卖商品批量导出
],
];
{{--@include('web.supplier.SupplierListCommon')--}}
<div class="layui-btn-group demoTable" style="margin-bottom: 15px;margin-top: 15px">
@if(checkPerm('AddSupplier'))
<button type="button" class="layui-btn layui-btn-sm" id="add_supplier">新增</button>
@endif
@if(checkPerm('DisableSupplier'))
<button type="button" class="layui-btn layui-btn-sm" id="disable_supplier">禁用</button>
@endif
@if(checkPerm('AuditSupplier'))
<button type="button" class="layui-btn layui-btn-sm" id="audit_supplier">审核</button>
@endif
@if(checkPerm('AllocatePurchaseUser'))
<button type="button" class="layui-btn layui-btn-sm" id="allocate_purchase_user">分配渠道员</button>
@endif
@if(checkPerm('ChangeSupplierIsType'))
<button type="button" class="layui-btn layui-btn-sm" title="该操作可以将竞调供应商转为正式供应商" id="change_supplier_is_type">转正供应商</button>
@endif
</div>
<table class="layui-table" id="skuList" lay-filter="skuList"></table>
<script>
</script>
<style>
.main_filter {
cursor: pointer;
}
</style>
<div class="layui-fluid" id="type_filter">
<div class="layui-card">
<div class="layui-card-body" style="padding: 0;">
<div class="split-group" style="height: 130px;">
<div class="split-item" id="s1">
<div class="layui-row">
<a class="main_filter layui-badge layui-bg-green" id="all">全部({{$statistics['total']}})</a>
</div>
</div>
<div class="split-item" id="s2" style="text-align: center">
<div class="layui-row">
<a class="main_filter" id="pending">
</a>
</div>
<div class="layui-row">
<a class="main_filter" id="in_review">
</a>
</div>
</div>
</div>
<div class="split-item" id="s5">
</div>
</div>
</div>
</div>
</div>
<div class="layui-collapse">
@if(checkPerm('ViewFilter'))
<!--通用的筛选-->
<form class="layui-form" style="margin-top: 15px">
<?php
$routerName = explode('/', request()->path())[1];
?>
<div class="layui-row">
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('supplier_group','供应商性质','',
config('fixed.SupplierGroup')) !!}
</div>
<div class="layui-inline">
@inject('transformableInputPresenter','App\Presenters\Filter\TransformableInputPresenter')
{!! $transformableInputPresenter->render(['supplier_name'=>'供应商名称','supplier_code'=>'供应商编码','supplier_id'=>'供应商ID']) !!}
</div>
{{-- <div class="layui-inline">--}}
{{-- @inject('statusPresenter','App\Presenters\StatusPresenter')--}}
{{-- {!! $statusPresenter->render('status','供应商状态','',config('fixed.SupplierStatus')) !!}--}}
{{-- </div>--}}
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('stockup_type','合作类型','',config('fixed.StockupType')) !!}
</div>
<div class="layui-inline">
@inject('transformableSelectPresenter','App\Presenters\Filter\TransformableSelectPresenter')
{!! $transformableSelectPresenter->render(['channel_uid'=>'采购员','purchase_uid'=>'开发员','create_uid'=>'创建人'],$userCodes) !!}
</div>
@if(checkPerm('ViewFakeSupplier'))
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('is_type','正式供应商','',[0=>'是',1=>'否'],['width'=>'100px']) !!}
</div>
@endif
</div>
<div class="layui-row">
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('has_sku','SKU上传','',[-1=>'否',1=>'是']) !!}
</div>
<div class="layui-inline" style="width: 600px">
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间']) !!}
</div>
</div>
<div class="layui-row" style="margin-top:10px;margin-bottom: 10px;margin-left: 20px;">
<button class="layui-btn layui-btn-sm layui-btn load" id="getSupplierListButton" lay-submit=""
lay-filter="load">查询
</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn" lay-submit="" lay-filter="reset">重置
</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn hide_filter_type">隐藏罗盘</button>
<button type="button" class="layui-btn layui-btn-sm layui-btn show_filter_type"
style="display: none">显示罗盘
</button>
</div>
</form>
@endif
</div>
<script>
//一进来就去获取统计数据
function supplierStatistics() {
let res = ajax('/api/supplier_statistics/GetSupplierStatistics');
if (res.err_code === 0) {
$.each(res.data, function (index, value) {
let menuObj = $('#' + index);
menuObj.text('');
menuObj.append(value);
});
}
}
supplierStatistics();
//罗盘隐藏
$('.hide_filter_type').click(function () {
$(this).hide();
$('#type_filter').hide();
$('.show_filter_type').show();
});
$('.show_filter_type').click(function () {
$(this).hide();
$('#type_filter').show();
$('.hide_filter_type').show();
});
</script>
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