Commit 40f91cc1 by 杨树贤

SKU采购员字眼替换

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