Commit 437917e8 by 杨树贤

展示上传时间的 逻辑修改

parent 7a92d4fc
...@@ -103,6 +103,9 @@ class SupplierFilter ...@@ -103,6 +103,9 @@ class SupplierFilter
$query->where('sku_tag', $map['sku_tag']); $query->where('sku_tag', $map['sku_tag']);
} }
if ((isset($map['purchase_type']) && $map['purchase_type'] === "0") || !empty($map['purchase_type'])) {
$query->where('purchase_type', $map['purchase_type']);
}
if (!empty($map['outside_contact_type'])) { if (!empty($map['outside_contact_type'])) {
$query->where('outside_contact_type', $map['outside_contact_type']); $query->where('outside_contact_type', $map['outside_contact_type']);
} }
......
...@@ -30,18 +30,17 @@ class SupplierTransformer ...@@ -30,18 +30,17 @@ class SupplierTransformer
$viewData = $viewCheckService->checkSupplierView($supplierIds); $viewData = $viewCheckService->checkSupplierView($supplierIds);
$adminUserService = new AdminUserService(); $adminUserService = new AdminUserService();
//获取基石上传记录情况,展示第一次上传时间和最后一次上传时间
$firstUploadSkuTimes = SkuService::getUploadTimeBySupplierCodes(array_column($list, 'supplier_code'), 'first');
$lastUploadSkuTimes = SkuService::getUploadTimeBySupplierCodes(array_column($list, 'supplier_code'), 'last');
foreach ($list as &$supplier) { foreach ($list as &$supplier) {
$supplier['viewed'] = array_get($viewData, $supplier['supplier_id'], false); $supplier['viewed'] = array_get($viewData, $supplier['supplier_id'], false);
$supplier = $this->getStockupType($supplier); $supplier = $this->getStockupType($supplier);
$supplier['supplier_group'] = array_get(config('fixed.SupplierGroup'), $supplier['supplier_group'], '未设置'); $supplier['supplier_group'] = array_get(config('fixed.SupplierGroup'), $supplier['supplier_group'], '未设置');
$supplier['purchase_type'] = array_get(config('field.PurchaseType'), $supplier['purchase_type'], '无');
$supplier['region_name'] = array_get(config('fixed.Region'), $supplier['region']); $supplier['region_name'] = array_get(config('fixed.Region'), $supplier['region']);
$supplier['create_time'] = $supplier['create_time'] ? date('Y-m-d H:i:s', $supplier['create_time']) : ''; $supplier['create_time'] = $supplier['create_time'] ? date('Y-m-d H:i:s', $supplier['create_time']) : '';
$supplier['audit_time'] = $supplier['audit_time'] ? date('Y-m-d H:i:s', $supplier['audit_time']) : ''; $supplier['audit_time'] = $supplier['audit_time'] ? date('Y-m-d H:i:s', $supplier['audit_time']) : '';
$supplier['update_time'] = $supplier['update_time'] ? date('Y-m-d H:i:s', $supplier['update_time']) : ''; $supplier['update_time'] = $supplier['update_time'] ? date('Y-m-d H:i:s', $supplier['update_time']) : '';
$supplier['sku_create_time'] = $supplier['sku_create_time'] ? date('Y-m-d H:i:s', $supplier['sku_create_time']) : '';
$supplier['sku_update_time'] = $supplier['sku_update_time'] ? date('Y-m-d H:i:s', $supplier['sku_update_time']) : '';
$supplier['channel_username'] = $this->getChannelUserNames($supplier['channel_uid']); $supplier['channel_username'] = $this->getChannelUserNames($supplier['channel_uid']);
$supplier['purchase_username'] = array_get($users, $supplier['purchase_uid']); $supplier['purchase_username'] = array_get($users, $supplier['purchase_uid']);
$supplier['yunxin_channel_username'] = array_get($users, $supplier['yunxin_channel_uid']); $supplier['yunxin_channel_username'] = array_get($users, $supplier['yunxin_channel_uid']);
...@@ -63,10 +62,6 @@ class SupplierTransformer ...@@ -63,10 +62,6 @@ class SupplierTransformer
$userInfo = $adminUserService->getAdminUserInfo($supplier['create_uid']); $userInfo = $adminUserService->getAdminUserInfo($supplier['create_uid']);
$supplier['create_name'] = array_get($userInfo, 'name'); $supplier['create_name'] = array_get($userInfo, 'name');
} }
$supplier['first_upload_sku_time'] = array_get($firstUploadSkuTimes, $supplier['supplier_code']) ? date('Y-m-d H:i:s',
$firstUploadSkuTimes[$supplier['supplier_code']]) : '';
$supplier['last_upload_sku_time'] = array_get($lastUploadSkuTimes, $supplier['supplier_code']) ? date('Y-m-d H:i:s',
$lastUploadSkuTimes[$supplier['supplier_code']]) : '';
//获取最新修改人以及下级审核员 //获取最新修改人以及下级审核员
$log = LogModel::getLastLog($supplier['supplier_id']); $log = LogModel::getLastLog($supplier['supplier_id']);
......
...@@ -120,6 +120,7 @@ ...@@ -120,6 +120,7 @@
return "<span title='" + data.stockup_type + "'>" + data.stockup_type + "</span>" return "<span title='" + data.stockup_type + "'>" + data.stockup_type + "</span>"
} }
}, },
{field: 'purchase_type', title: '代购类型', align: 'center', width: 80},
{ {
field: 'has_quality_assurance_agreement', field: 'has_quality_assurance_agreement',
title: '品质协议', title: '品质协议',
...@@ -183,8 +184,8 @@ ...@@ -183,8 +184,8 @@
{field: 'update_time', title: '最近修改时间', align: 'center', width: 145}, {field: 'update_time', title: '最近修改时间', align: 'center', width: 145},
{field: 'supplier_type_name', title: '供应商类别', align: 'center', width: 110}, {field: 'supplier_type_name', title: '供应商类别', align: 'center', width: 110},
{field: 'create_time', title: '创建时间', align: 'center', width: 145}, {field: 'create_time', title: '创建时间', align: 'center', width: 145},
{field: 'first_upload_sku_time', title: '首次上传sku时间', align: 'center', width: 145}, {field: 'sku_create_time', title: '首次上传sku时间', align: 'center', width: 145},
{field: 'last_upload_sku_time', title: '最新上传sku时间', align: 'center', width: 145}, {field: 'sku_update_time', title: '最新上传sku时间', align: 'center', width: 145},
]; ];
cols.push( cols.push(
); );
......
...@@ -48,7 +48,9 @@ ...@@ -48,7 +48,9 @@
@else @else
{{$supplier['stockup_type_name']}} {{$supplier['stockup_type_name']}}
@endif @endif
</div>
<div class="layui-col-md2">
代购类型 : {{$supplier['purchase_type']}}
</div> </div>
<div class="layui-col-md2"> <div class="layui-col-md2">
线上采购员 : {{$supplier['yunxin_channel_username']}} 线上采购员 : {{$supplier['yunxin_channel_username']}}
......
...@@ -257,12 +257,17 @@ ...@@ -257,12 +257,17 @@
{!! $multiTransformableSelectPresenter->render(['has_cooperation_agreement'=>'平台合作协议'], {!! $multiTransformableSelectPresenter->render(['has_cooperation_agreement'=>'平台合作协议'],
['has_cooperation_agreement'=>[1=>'是',-1=>'否']]) !!} ['has_cooperation_agreement'=>[1=>'是',-1=>'否']]) !!}
</div> </div>
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_type','代购类型','',config('field.PurchaseType')) !!}
</div>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<div class="layui-inline" style="width: 600px"> <div class="layui-inline" style="width: 600px">
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter') @inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间']) !!} {!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间']) !!}
</div> </div>
</div> </div>
<div class="layui-row" style="margin-top:10px;margin-bottom: 10px;margin-left: 20px;"> <div class="layui-row" style="margin-top:10px;margin-bottom: 10px;margin-left: 20px;">
......
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