Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
liexin_supplier
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
6a18da4f
authored
Mar 02, 2026
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
调试代码
parent
8d472396
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
2 deletions
app/Http/Controllers/Api/SupplierApiController.php
app/Http/Services/SupplierService.php
app/Model/SupplierChannelModel.php
config/field.php
app/Http/Controllers/Api/SupplierApiController.php
View file @
6a18da4f
...
...
@@ -634,6 +634,11 @@ class SupplierApiController extends Controller
$user
=
$adminService
->
getAdminUserInfoByCodeId
(
$channelUid
);
$logService
=
new
LogService
();
$logService
->
AddLog
(
$supplierId
,
LogModel
::
UPDATE_OPERATE
,
'设置线上采购员'
,
'设置线上采购员为 : '
.
$user
[
'name'
]);
// 自动分配猎芯采购和数据跟单员
$supplierService
=
new
SupplierService
();
$supplierService
->
autoAssignPurchaseUser
(
$supplierId
,
$channelUid
);
$this
->
response
(
0
,
'设置SKU采购成功'
);
}
else
{
$this
->
response
(
-
1
,
'设置SKU采购失败'
);
...
...
@@ -654,6 +659,16 @@ class SupplierApiController extends Controller
$this
->
response
(
-
1
,
'选择的供应商里面不存在对应的线上采购员'
);
}
$supplierService
->
batchAllocateYunxinChannelUser
(
$supplierIds
,
$channelUid
);
$userId
=
$request
->
user
->
userId
;
if
(
$userId
==
1000
)
{
// 批量自动分配猎芯采购和数据跟单员
foreach
(
$supplierIds
as
$supplierId
)
{
$supplierService
->
autoAssignPurchaseUser
(
$supplierId
,
$channelUid
);
}
}
$this
->
response
(
0
,
'批量分配线上采购员成功'
);
}
...
...
@@ -868,6 +883,16 @@ class SupplierApiController extends Controller
}
}
//刷新历史数据:自动分配猎芯采购和数据跟单员
public
function
RefreshHistoryPurchaseUser
(
$request
)
{
$updateData
=
$request
->
get
(
'update_data'
,
false
);
$limit
=
$request
->
get
(
'limit'
,
100
);
$result
=
SupplierService
::
refreshHistoryPurchaseUser
(
$updateData
,
$limit
);
$this
->
response
(
0
,
'刷新完成'
,
$result
);
}
//获取审核流程
public
function
GetAuditFlow
(
$request
)
{
...
...
app/Http/Services/SupplierService.php
View file @
6a18da4f
This diff is collapsed.
Click to expand it.
app/Model/SupplierChannelModel.php
View file @
6a18da4f
...
...
@@ -34,7 +34,8 @@ class SupplierChannelModel extends Model
const
SYNC_UNITED_STATUS_OK
=
1
;
//供应商类型
const
SUPPLIER_GROUP_PROXY
=
1
;
//代理
const
SUPPLIER_GROUP_PROXY
=
1
;
//代理商
const
SUPPLIER_GROUP_SPOT
=
2
;
//现货商
const
SUPPLIER_GROUP_ORIGINAL
=
4
;
//原厂
const
SUPPLIER_GROUP_MIX
=
7
;
//混合分销商
...
...
config/field.php
View file @
6a18da4f
...
...
@@ -385,5 +385,27 @@ return [
'天'
=>
'月结'
,
'当月'
=>
'当月'
,
'当周'
=>
'当周'
,
]
],
// 自动分配采购员相关配置
// 子部门ID配置(需要根据实际数据库配置)
'AutoAssignDepartmentIds'
=>
[
'zhudong_guochan'
=>
121
,
// 主动兼国产供应链部
'beidong_guochan'
=>
122
,
// 被动兼国产供应链部
'shangpin_gongyinglian'
=>
142
,
// 商品供应链部
'xinzhi_gongyinglian'
=>
123
,
// 新质供应链部
'shuju_gendan_caigouzu'
=>
150
,
// 数据跟单采购组
],
// 新质供应链部默认数据跟单员姓名
'XinzhiDefaultDataFollowerName'
=>
'欧阳海梅'
,
// 商品供应链部数据跟单采购组人员名单(用于现货商默认分配4人)
'ShangpinDataFollowerGroup'
=>
[
// 需要配置实际姓名
'郑君'
,
'李尚文杰'
,
'陈雪梅'
,
'邱沛敏'
,
],
];
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment