Commit 40f91cc1 by 杨树贤

SKU采购员字眼替换

parent 8cd2d589
...@@ -534,7 +534,7 @@ class SupplierApiController extends Controller ...@@ -534,7 +534,7 @@ class SupplierApiController extends Controller
$adminService = new AdminUserService(); $adminService = new AdminUserService();
$user = $adminService->getAdminUserInfoByCodeId($channelUid); $user = $adminService->getAdminUserInfoByCodeId($channelUid);
$logService = new LogService(); $logService = new LogService();
$logService->AddLog($supplierId, LogModel::UPDATE_OPERATE, '设置SKU采购员', '设置SKU采购员为 : ' . $user['name']); $logService->AddLog($supplierId, LogModel::UPDATE_OPERATE, '设置线上采购员', '设置线上采购员为 : ' . $user['name']);
$this->response(0, '设置SKU采购成功'); $this->response(0, '设置SKU采购成功');
} else { } else {
$this->response(-1, '设置SKU采购失败'); $this->response(-1, '设置SKU采购失败');
...@@ -549,13 +549,13 @@ class SupplierApiController extends Controller ...@@ -549,13 +549,13 @@ class SupplierApiController extends Controller
$supplierIds = explode(',', $supplierIds); $supplierIds = explode(',', $supplierIds);
$supplierService = new SupplierService(); $supplierService = new SupplierService();
if (empty($channelUid)) { if (empty($channelUid)) {
$this->response(-1, '请选择SKU采购员'); $this->response(-1, '请选择线上采购员');
} }
if (!$supplierService->checkCanAllocatYunxinChannelUid($supplierIds, $channelUid)) { if (!$supplierService->checkCanAllocatYunxinChannelUid($supplierIds, $channelUid)) {
$this->response(-1, '选择的供应商里面不存在对应的SKU采购员'); $this->response(-1, '选择的供应商里面不存在对应的线上采购员');
} }
$supplierService->batchAllocateYunxinChannelUser($supplierIds, $channelUid); $supplierService->batchAllocateYunxinChannelUser($supplierIds, $channelUid);
$this->response(0, '批量分配SKU采购员成功'); $this->response(0, '批量分配线上采购员成功');
} }
//检查能否能申请审核 //检查能否能申请审核
......
...@@ -316,7 +316,7 @@ class SupplierController extends Controller ...@@ -316,7 +316,7 @@ class SupplierController extends Controller
return view('web', $data); return view('web', $data);
} }
//分配SKU采购员 //分配线上采购员
public function SetYunxinChannelUser($request) public function SetYunxinChannelUser($request)
{ {
$supplierId = $request->get('supplier_id'); $supplierId = $request->get('supplier_id');
...@@ -326,7 +326,7 @@ class SupplierController extends Controller ...@@ -326,7 +326,7 @@ class SupplierController extends Controller
$this->data['supplier'] = $supplier; $this->data['supplier'] = $supplier;
$intraCodeModel = new IntracodeModel(); $intraCodeModel = new IntracodeModel();
$userCodes = $intraCodeModel->getSampleEncode(); $userCodes = $intraCodeModel->getSampleEncode();
//去除非当前供应商所拥有的采购的人员,只能从当前供应商设置的采购里面选择SKU采购员 //去除非当前供应商所拥有的采购的人员,只能从当前供应商设置的采购里面选择线上采购员
$channelUids = explode(',', $supplier['channel_uid']); $channelUids = explode(',', $supplier['channel_uid']);
foreach ($userCodes as $codeId => $value) { foreach ($userCodes as $codeId => $value) {
if (!in_array($codeId, $channelUids)) { if (!in_array($codeId, $channelUids)) {
...@@ -337,7 +337,7 @@ class SupplierController extends Controller ...@@ -337,7 +337,7 @@ class SupplierController extends Controller
return $this->view('审核供应商'); return $this->view('审核供应商');
} }
//批量分配SKU采购员 //批量分配线上采购员
public function BatchAllocateYunxinChannelUser($request) public function BatchAllocateYunxinChannelUser($request)
{ {
$supplierIds = $request->get('supplier_ids'); $supplierIds = $request->get('supplier_ids');
......
...@@ -484,7 +484,7 @@ class DataService ...@@ -484,7 +484,7 @@ class DataService
'是否平台供应商', '是否平台供应商',
'是否芯链商家', '是否芯链商家',
'是否SKU上架中', '是否SKU上架中',
'现有SKU采购员或者意向分配采购员', '现有线上采购员或者意向分配采购员',
'采购所在采购部门', '采购所在采购部门',
]; ];
$intraCodeModel = new IntracodeModel(); $intraCodeModel = new IntracodeModel();
...@@ -806,7 +806,7 @@ class DataService ...@@ -806,7 +806,7 @@ class DataService
} }
} }
//同步基石的sku上传内部编码到供应商的SKU采购员 //同步基石的sku上传内部编码到供应商的线上采购员
public function syncFootstoneSkuUploadEncoded($isUpdate = false) public function syncFootstoneSkuUploadEncoded($isUpdate = false)
{ {
$suppliers = SupplierChannelModel::select(['supplier_code', 'yunxin_channel_uid'])->where('is_type', $suppliers = SupplierChannelModel::select(['supplier_code', 'yunxin_channel_uid'])->where('is_type',
...@@ -818,14 +818,14 @@ class DataService ...@@ -818,14 +818,14 @@ class DataService
if (!$lastEncoded) { if (!$lastEncoded) {
continue; continue;
} }
//判断是否已经有SKU采购员了,有的话跳过 //判断是否已经有线上采购员了,有的话跳过
$hasSkuChannelUid = SupplierChannelModel::where('supplier_code', $supplier['supplier_code']) $hasSkuChannelUid = SupplierChannelModel::where('supplier_code', $supplier['supplier_code'])
->where('yunxin_channel_uid', '!=', 0)->exists(); ->where('yunxin_channel_uid', '!=', 0)->exists();
if ($hasSkuChannelUid) { if ($hasSkuChannelUid) {
echo "已经有SKU采购员,供应商编码为 : ${supplier['supplier_code']} , 跳过" . PHP_EOL; echo "已经有线上采购员,供应商编码为 : ${supplier['supplier_code']} , 跳过" . PHP_EOL;
continue; continue;
} }
echo "修改SKU采购员 : ${supplier['supplier_code']} => ${lastEncoded}" . PHP_EOL; echo "修改线上采购员 : ${supplier['supplier_code']} => ${lastEncoded}" . PHP_EOL;
if ($isUpdate) { if ($isUpdate) {
SupplierChannelModel::where('supplier_code', $supplier['supplier_code']) SupplierChannelModel::where('supplier_code', $supplier['supplier_code'])
->update(['yunxin_channel_uid' => $lastEncoded]); ->update(['yunxin_channel_uid' => $lastEncoded]);
...@@ -933,7 +933,7 @@ class DataService ...@@ -933,7 +933,7 @@ class DataService
'供应商名称', '供应商名称',
'供应商性质', '供应商性质',
'采购员', '采购员',
'sku采购员', '线上采购员',
'最新修改人', '最新修改人',
'创建人', '创建人',
'创建时间', '创建时间',
...@@ -1066,7 +1066,7 @@ class DataService ...@@ -1066,7 +1066,7 @@ class DataService
// } // }
$intraCodeModel = new IntracodeModel(); $intraCodeModel = new IntracodeModel();
$users = $intraCodeModel->getSampleName(true); $users = $intraCodeModel->getSampleName(true);
$header = ['供应商编码', '供应商名称', 'sku采购员', '采购组别']; $header = ['供应商编码', '供应商名称', '线上采购员', '采购组别'];
// //
// //导出sku接入方式为专营API // //导出sku接入方式为专营API
// $excelData = []; // $excelData = [];
...@@ -1168,7 +1168,7 @@ class DataService ...@@ -1168,7 +1168,7 @@ class DataService
'供应商编码', '供应商编码',
'供应商名称', '供应商名称',
'供应商性质', '供应商性质',
'sku采购员', '线上采购员',
'组别', '组别',
]; ];
$intraCodeModel = new IntracodeModel(); $intraCodeModel = new IntracodeModel();
...@@ -1348,7 +1348,7 @@ class DataService ...@@ -1348,7 +1348,7 @@ class DataService
{ {
$header = [ $header = [
'采购部门', '采购部门',
'sku采购员', '线上采购员',
'供应商性质', '供应商性质',
'供应商编码', '供应商编码',
'供应商名称', '供应商名称',
...@@ -1453,7 +1453,7 @@ class DataService ...@@ -1453,7 +1453,7 @@ class DataService
{ {
ini_set('memory_limit', -1); ini_set('memory_limit', -1);
$isUpdate = false; $isUpdate = false;
$filePath = public_path('data') . DIRECTORY_SEPARATOR . '没有SKU采购员供应商清单.xlsx'; $filePath = public_path('data') . DIRECTORY_SEPARATOR . '没有线上采购员供应商清单.xlsx';
$supplierCodeList = []; $supplierCodeList = [];
Excel::selectSheetsByIndex(0)->load($filePath, function ($reader) use ($isUpdate, &$supplierCodeList) { Excel::selectSheetsByIndex(0)->load($filePath, function ($reader) use ($isUpdate, &$supplierCodeList) {
$reader->sheet('Sheet1', function () use ($reader, $isUpdate, &$supplierCodeList) { $reader->sheet('Sheet1', function () use ($reader, $isUpdate, &$supplierCodeList) {
...@@ -1478,7 +1478,7 @@ class DataService ...@@ -1478,7 +1478,7 @@ class DataService
$header = [ $header = [
'供应商名称', '供应商名称',
'最大金额采购员', '最大金额采购员',
'sku采购员', '线上采购员',
'采购员', '采购员',
'创建人', '创建人',
]; ];
......
...@@ -486,7 +486,7 @@ class SupplierService ...@@ -486,7 +486,7 @@ class SupplierService
return true; return true;
} }
//批量分配SKU采购员 //批量分配线上采购员
public function batchAllocateYunxinChannelUser($supplierIds, $yunxinChannelUid) public function batchAllocateYunxinChannelUser($supplierIds, $yunxinChannelUid)
{ {
$yunxinChannelUserName = (new AdminUserService())->getAdminUserNameByCodeId($yunxinChannelUid); $yunxinChannelUserName = (new AdminUserService())->getAdminUserNameByCodeId($yunxinChannelUid);
...@@ -511,13 +511,13 @@ class SupplierService ...@@ -511,13 +511,13 @@ class SupplierService
$redis->expire($redisKey, 60 * 60 * 3); $redis->expire($redisKey, 60 * 60 * 3);
} }
$preYunxinChannelUserName = (new AdminUserService())->getAdminUserNameByCodeId($preYunxinChannelUid); $preYunxinChannelUserName = (new AdminUserService())->getAdminUserNameByCodeId($preYunxinChannelUid);
$content = "将SKU采购员由 [${preYunxinChannelUserName}] 改为 [${yunxinChannelUserName}]"; $content = "将线上采购员由 [${preYunxinChannelUserName}] 改为 [${yunxinChannelUserName}]";
$logService->AddIgnoreAuditCheckLog($supplierId, LogModel::UPDATE_OPERATE, '分配渠道开发员', $content); $logService->AddIgnoreAuditCheckLog($supplierId, LogModel::UPDATE_OPERATE, '分配渠道开发员', $content);
} }
return true; return true;
} }
//检测是否可以批量分配SKU采购员(分配的采购员必须供应商要有的) //检测是否可以批量分配线上采购员(分配的采购员必须供应商要有的)
//$filterChannelUid筛选出来的采购员ID //$filterChannelUid筛选出来的采购员ID
public function checkCanAllocatYunxinChannelUid($supplierIds, $skuChannelUid) public function checkCanAllocatYunxinChannelUid($supplierIds, $skuChannelUid)
{ {
......
...@@ -168,7 +168,7 @@ ...@@ -168,7 +168,7 @@
}, },
{field: 'purchase_username', title: '渠道开发员', align: 'center', width: 110}, {field: 'purchase_username', title: '渠道开发员', align: 'center', width: 110},
{field: 'last_update_name', title: '最新修改人', align: 'center', width: 110}, {field: 'last_update_name', title: '最新修改人', align: 'center', width: 110},
{field: 'yunxin_channel_username', title: 'SKU采购员', align: 'center', width: 110}, {field: 'yunxin_channel_username', title: '线上采购员', align: 'center', width: 110},
{field: 'has_sku', title: 'SKU上传', align: 'center', width: 80}, {field: 'has_sku', title: 'SKU上传', align: 'center', width: 80},
{ {
field: 'uploaded_sku', title: 'SKU合作', align: 'center', width: 80, templet: function (data) { field: 'uploaded_sku', title: 'SKU合作', align: 'center', width: 80, templet: function (data) {
...@@ -638,7 +638,7 @@ ...@@ -638,7 +638,7 @@
type: 2, type: 2,
content: '/supplier/BatchAllocateYunxinChannelUser?view=iframe&supplier_ids=' + supplierIds, content: '/supplier/BatchAllocateYunxinChannelUser?view=iframe&supplier_ids=' + supplierIds,
area: ['80%', '80%'], area: ['80%', '80%'],
title: '批量配置SKU采购员', title: '批量配置线上采购员',
end: function () { end: function () {
table.reload('list'); table.reload('list');
} }
......
...@@ -89,7 +89,7 @@ ...@@ -89,7 +89,7 @@
type: 2, type: 2,
content: '/supplier/SetYunxinChannelUser?view=iframe&supplier_id=' + supplierId, content: '/supplier/SetYunxinChannelUser?view=iframe&supplier_id=' + supplierId,
area: ['600px', '525px'], area: ['600px', '525px'],
title: '配置SKU采购员', title: '配置线上采购员',
end: function () { // 监听弹窗关闭 end: function () { // 监听弹窗关闭
table.reload('contactList'); table.reload('contactList');
} }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-inline" style="margin-left: -30px"> <div class="layui-inline" style="margin-left: -30px">
@inject('statusPresenter','App\Presenters\StatusPresenter') @inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('channel_uid','SKU采购员',null, {!! $statusPresenter->render('channel_uid','线上采购员',null,
$userCodes,['required'=>true,'width'=>'150px']) !!} $userCodes,['required'=>true,'width'=>'150px']) !!}
</div> </div>
</div> </div>
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
</div> </div>
<div class="layui-card-body"> <div class="layui-card-body">
<blockquote class="layui-elem-quote layui-text"> <blockquote class="layui-elem-quote layui-text">
<b>当前选中需要批量修改SKU采购员的供应商列表 <span style="color: red"> (注意需要分配的SKU采购员必须是下列供应商都有的采购才行) </span></b> <b>当前选中需要批量修改线上采购员的供应商列表 <span style="color: red"> (注意需要分配的线上采购员必须是下列供应商都有的采购才行) </span></b>
</blockquote> </blockquote>
<table class="layui-table"> <table class="layui-table">
<colgroup> <colgroup>
...@@ -44,7 +44,7 @@ ...@@ -44,7 +44,7 @@
<tr> <tr>
<th>供应商名称</th> <th>供应商名称</th>
<th>当前采购员</th> <th>当前采购员</th>
<th>当前SKU采购员</th> <th>当前线上采购员</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
......
...@@ -51,7 +51,7 @@ ...@@ -51,7 +51,7 @@
</div> </div>
<div class="layui-col-md2"> <div class="layui-col-md2">
SKU采购员 : {{$supplier['yunxin_channel_username']}} 线上采购员 : {{$supplier['yunxin_channel_username']}}
</div> </div>
<div class="layui-col-md3"> <div class="layui-col-md3">
<span title="{{$supplier['channel_username']}}"> <span title="{{$supplier['channel_username']}}">
......
...@@ -59,7 +59,7 @@ ...@@ -59,7 +59,7 @@
@endif @endif
</div> </div>
<div class="layui-col-md2"> <div class="layui-col-md2">
SKU采购员 : {{$supplier['yunxin_channel_username']}} 线上采购员 : {{$supplier['yunxin_channel_username']}}
</div> </div>
<div class="layui-col-md3"> <div class="layui-col-md3">
<span title="{{$supplier['channel_username']}}"> <span title="{{$supplier['channel_username']}}">
......
...@@ -241,7 +241,7 @@ ...@@ -241,7 +241,7 @@
<div class="layui-row"> <div class="layui-row">
<div class="layui-inline"> <div class="layui-inline">
@inject('multiTransformableSelectPresenter','App\Presenters\Filter\MultiTransformableSelectPresenter') @inject('multiTransformableSelectPresenter','App\Presenters\Filter\MultiTransformableSelectPresenter')
{!! $multiTransformableSelectPresenter->render(['has_sku'=>'SKU上传','sku_tag'=>'SKU标准','sku_mode'=>'SKU模式','uploaded_sku' => '历史SKU合作','outside_contact_type' => 'SKU上传方式','yunxin_channel_uid' => 'SKU采购员'], {!! $multiTransformableSelectPresenter->render(['has_sku'=>'SKU上传','sku_tag'=>'SKU标准','sku_mode'=>'SKU模式','uploaded_sku' => '历史SKU合作','outside_contact_type' => 'SKU上传方式','yunxin_channel_uid' => '线上采购员'],
['has_sku'=>[1=>'是',-1=>'否'], 'sku_tag'=>config('field.SkuTag'),'sku_mode'=>config('field.SkuMode'),'uploaded_sku'=>[1=>'是',-1=>'否'],'outside_contact_type'=>config('field.OutsideContactType'),'yunxin_channel_uid' => $userCodes]) !!} ['has_sku'=>[1=>'是',-1=>'否'], 'sku_tag'=>config('field.SkuTag'),'sku_mode'=>config('field.SkuMode'),'uploaded_sku'=>[1=>'是',-1=>'否'],'outside_contact_type'=>config('field.OutsideContactType'),'yunxin_channel_uid' => $userCodes]) !!}
</div> </div>
<div class="layui-inline"> <div class="layui-inline">
......
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