Commit c25041ab by 杨树贤

修改字样

parent 6c00982f
Showing with 236 additions and 76 deletions
......@@ -437,28 +437,28 @@ class SupplierApiController extends Controller
$this->response(0, '审核成功');
}
//分配渠道开发
//分配数据维护
public function AllocatePurchaseUser($request)
{
$purchaseUid = $request->get('purchase_uid');
$supplierId = $request->get('supplier_id');
if (empty($purchaseUid)) {
$this->response(-1, '渠道开发员不能为空');
$this->response(-1, '数据维护员不能为空');
}
$adminService = new AdminUserService();
$check = $adminService->checkIsResignedByCodeId($purchaseUid);
if ($check) {
$this->response(-1, '该渠道开发员已经离职,请选择其他人员');
$this->response(-1, '该数据维护员已经离职,请选择其他人员');
}
$service = new SupplierService();
$result = $service->allocatePurchaseUser($supplierId, $purchaseUid);
if (!$result) {
$this->response(-1, '分配渠道开发员失败');
$this->response(-1, '分配数据维护员失败');
}
$this->response(0, '分配渠道开发员成功');
$this->response(0, '分配数据维护员成功');
}
//批量修改渠道开发
//批量修改数据维护
//修改后自动触发转正,资料不完善,进入待提审
public function BatchAllocatePurchaseUser($request)
{
......@@ -467,10 +467,10 @@ class SupplierApiController extends Controller
$supplierIds = explode(',', $supplierIds);
$supplierService = new SupplierService();
if (empty($purchaseUid)) {
$this->response(-1, '请选择渠道开发员');
$this->response(-1, '请选择数据维护员');
}
$supplierService->batchAllocatePurchaseUser($supplierIds, $purchaseUid);
$this->response(0, '批量分配渠道员成功');
$this->response(0, '批量分配数据维护员成功');
}
//分配采购员(支持批量操作)
......
......@@ -68,6 +68,11 @@ class SkuListFilter
unset($map['update_time']);
}
if (!empty($map['data_channel_uid'])) {
$map['encoded/condition'] = $map['data_channel_uid'];
unset($map['data_channel_uid']);
}
if (!empty($map['source_type'])) {
switch ($map['source_type']) {
case 'all':
......
......@@ -72,6 +72,10 @@ class SupplierFilter
$query->where('channel_uid', 'like', "%{$map['channel_uid']}%");
}
if (!empty($map['data_channel_uid'])) {
$query->where('channel_uid', 'like', "%{$map['data_channel_uid']}%");
}
if (!empty($map['supplier_search_fuzzy'])) {
$query->where(function ($q) use ($map) {
$q->where('supplier_name', 'like', "%${map['supplier_search_fuzzy']}%")
......@@ -374,7 +378,7 @@ class SupplierFilter
$query->orWhere('status', SupplierChannelModel::STATUS_DISABLE);
break;
case "no_purchase_uid":
//没有渠道开发
//没有数据维护员
$query->where('status', '!=', SupplierChannelModel::STATUS_DISABLE)
->where('status', '!=', SupplierChannelModel::STATUS_BLOCK)
->where('purchase_uid', '');
......@@ -386,7 +390,7 @@ class SupplierFilter
->where('channel_uid', '');
break;
case "invalid_channel_uid":
//不合理的渠道开发(比如渠道开发离职了)
//不合理的数据维护员(比如数据维护员离职了)
$adminUserService = new AdminUserService();
$resignedUsers = $adminUserService->getResignedUsers();
$resignedUserCodes = array_column($resignedUsers, 'code_id');
......
......@@ -291,7 +291,7 @@ class SupplierController extends Controller
$supplierId = $request->get('supplier_id');
$model = new SupplierChannelModel();
$supplier = $model->where('supplier_id', $supplierId)->first();
//获取最后一条非分配渠道员的日志
//获取最后一条非分配数据维护员的日志
$logModel = new LogModel();
$auditContent = $logModel->where('supplier_id', $supplierId)
->where('action', '!=', '')
......@@ -308,7 +308,7 @@ class SupplierController extends Controller
return $this->view('审核供应商');
}
//分配渠道
//分配数据维护
public function AllocatePurchaseUser($request)
{
$supplierId = $request->get('supplier_id');
......@@ -322,12 +322,12 @@ class SupplierController extends Controller
$this->data['userCodes'] = $intraCodeModel->getChannelUsersEncode(false);
$logModel = new LogModel();
$this->data['logs'] = $logModel->where('supplier_id', $supplierId)
->where('action', '分配渠道开发员')->orderBy('id', 'desc')
->where('action', '分配数据维护员')->orderBy('id', 'desc')
->limit(10)->get();
return $this->view('审核供应商');
}
//批量分配渠道开发
//批量分配数据维护
public function BatchAllocatePurchaseUser($request)
{
$supplierIds = $request->get('supplier_ids');
......@@ -340,7 +340,7 @@ class SupplierController extends Controller
$this->data['suppliers'] = $suppliers;
$intraCodeModel = new IntracodeModel();
$this->data['userCodes'] = $intraCodeModel->getChannelUsersEncode(false);
return $this->view('批量分配渠道开发员');
return $this->view('批量分配数据维护员');
}
//批量添加采购员
......@@ -410,7 +410,7 @@ class SupplierController extends Controller
$this->data['suppliers'] = $suppliers;
$intraCodeModel = new IntracodeModel();
$this->data['userCodes'] = $intraCodeModel->getChannelUsersEncode(false);
return $this->view('批量分配渠道开发员');
return $this->view('批量分配数据维护员');
}
//拉黑供应商
......@@ -454,7 +454,7 @@ class SupplierController extends Controller
$transformer = new SupplierTransformer();
$suppliers = $transformer->transformList($suppliers);
$this->data['suppliers'] = $suppliers;
return $this->view('批量分配渠道开发员');
return $this->view('批量分配数据维护员');
}
//查询供应商
......
......@@ -115,7 +115,7 @@ class AdminUserService
}
//获取渠道开发员(运营部)的所有用户信息
//获取数据维护员(运营部)的所有用户信息
public function getPurchaseUsers()
{
$departmentService = new DepartmentService();
......
......@@ -1903,4 +1903,142 @@ class DataService
'msg' => '分配成功',
];
}
/**
* 清空所有供应商数据维护员数据
* 1. 清空SupplierChannelModel表的purchase_uid字段
* 2. 更新对应的供应商redis缓存
*/
public static function clearAllPurchaseUid($updateData = false)
{
ini_set('memory_limit', '512M');
$redis = new RedisModel();
$suppliers = SupplierChannelModel::get()->toArray();
$count = 0;
foreach ($suppliers as $supplier) {
$supplierId = $supplier['supplier_id'];
$oldPurchaseUid = $supplier['purchase_uid'];
if (empty($oldPurchaseUid)) {
continue;
}
if ($updateData) {
// 清空purchase_uid
SupplierChannelModel::where('supplier_id', $supplierId)->update([
'purchase_uid' => '',
'update_time' => time(),
]);
// 更新redis缓存 - 先获取现有数据,只修改purchase_uid字段
$existingData = $redis->hget('lie_supplier_info', $supplierId);
if ($existingData) {
$data = json_decode($existingData, true);
$data['purchase_uid'] = '';
$redis->hset('lie_supplier_info', $supplierId, json_encode($data));
}
$count++;
dump("供应商ID: {$supplierId}, 供应商名称: {$supplier['supplier_name']}, 已清空数据维护员: {$oldPurchaseUid}");
} else {
$count++;
dump("供应商ID: {$supplierId}, 供应商名称: {$supplier['supplier_name']}, 待清空数据维护员: {$oldPurchaseUid}");
}
}
dump("共处理 {$count} 个供应商");
if (!$updateData) {
dump("当前为预览模式,如需执行,请传入 updateData=true");
} else {
dump("已清空 {$count} 个供应商的数据维护员数据");
}
}
/**
* 删除所有京东采购员类型的联系人
* 1. 删除SupplierContactModel表中channel_user_type=2的联系人
* 2. 更新SupplierChannelModel表的channel_uid字段,移除京东采购员ID
* 3. 更新redis缓存lie_supplier_info中的channel_uid字段
*/
public static function deleteAllJdChannelUser($updateData = false)
{
ini_set('memory_limit', '512M');
$redis = new RedisModel();
// 获取所有京东采购员类型的联系人
$jdContacts = SupplierContactModel::where('channel_user_type', 2)->get()->toArray();
$count = count($jdContacts);
dump("共找到 {$count} 个京东采购员类型的联系人");
if ($count == 0) {
dump("没有京东采购员类型的联系人需要删除");
return;
}
// 按供应商ID分组
$contactsBySupplier = [];
foreach ($jdContacts as $contact) {
$supplierId = $contact['supplier_id'];
$channelUid = $contact['can_check_uids'];
if (!isset($contactsBySupplier[$supplierId])) {
$contactsBySupplier[$supplierId] = [];
}
$contactsBySupplier[$supplierId][] = $channelUid;
}
dump("涉及 " . count($contactsBySupplier) . " 个供应商");
foreach ($contactsBySupplier as $supplierId => $channelUids) {
$supplier = SupplierChannelModel::where('supplier_id', $supplierId)->first();
if (empty($supplier)) {
dump("供应商ID: {$supplierId} 不存在,跳过");
continue;
}
$supplier = $supplier->toArray();
$oldChannelUid = $supplier['channel_uid'];
$channelUidArray = explode(',', trim($oldChannelUid, ','));
// 移除京东采购员ID
$newChannelUidArray = array_diff($channelUidArray, $channelUids);
$newChannelUid = implode(',', $newChannelUidArray);
$newChannelUid = trim($newChannelUid, ',');
if ($updateData) {
// 删除联系人
SupplierContactModel::where('supplier_id', $supplierId)
->where('channel_user_type', 2)
->whereIn('can_check_uids', $channelUids)
->delete();
// 更新channel_uid
SupplierChannelModel::where('supplier_id', $supplierId)->update([
'channel_uid' => $newChannelUid,
'update_time' => time(),
]);
// 更新redis缓存
$existingData = $redis->hget('lie_supplier_info', $supplierId);
if ($existingData) {
$data = json_decode($existingData, true);
$data['channel_uid'] = $newChannelUid;
$redis->hset('lie_supplier_info', $supplierId, json_encode($data));
}
dump("供应商ID: {$supplierId}, 供应商名称: {$supplier['supplier_name']}, 已删除京东采购员: " . implode(',', $channelUids));
} else {
dump("供应商ID: {$supplierId}, 供应商名称: {$supplier['supplier_name']}, 待删除京东采购员: " . implode(',', $channelUids));
}
}
if (!$updateData) {
dump("当前为预览模式,如需执行,请传入 updateData=true");
} else {
dump("已删除 {$count} 个京东采购员类型的联系人");
}
}
}
......@@ -402,7 +402,7 @@ class SupplierAuditService
{
$model = new SupplierChannelModel();
$supplier = $model->where('supplier_id', $supplierId)->first();
//针对非禁止交易状态的供应商重新分配渠道员,且必填信息不完整
//针对非禁止交易状态的供应商重新分配数据维护员,且必填信息不完整
if (!empty($supplier) && ($supplier['status'] != SupplierChannelModel::STATUS_DISABLE)) {
//开始检查
//如果全部必填字段都有了,就返回false(不需要跟进)
......@@ -412,7 +412,7 @@ class SupplierAuditService
return true;
}
}
//或者单纯只是禁用状态的供应商重新分配渠道员,也是要处理待跟进状态
//或者单纯只是禁用状态的供应商重新分配数据维护员,也是要处理待跟进状态
if (!empty($supplier) && ($supplier['status'] == SupplierChannelModel::STATUS_DISABLE)) {
//开始检查
return true;
......
......@@ -150,7 +150,7 @@ class SupplierContactService
}
//如果申请人属于联营采购部/自营采购部,业务负责人取绑定的采购员为申请人的联系人(如果有多条,随机取一条);
//如果申请人属于渠道部,渠道开发员没有设置采购,则显示为空;如果渠道开发员显示自己为采购,显示自己对应的联系人;如果创建其他采购,显示创建采购对应的联系人(如果有多条,随机取一条)
//如果申请人属于渠道部,数据维护员没有设置采购,则显示为空;如果数据维护员显示自己为采购,显示自己对应的联系人;如果创建其他采购,显示创建采购对应的联系人(如果有多条,随机取一条)
//获取用于打印的联系方式
public function getContactForPrint($supplierId)
{
......
......@@ -585,7 +585,7 @@ class SupplierService
'purchase_uid' => $purchaseUid,
]);
if ($result) {
//重新分配渠道开发并且开发人员有变更的时候,就去检查是否需要跟进
//重新分配数据维护员并且开发人员有变更的时候,就去检查是否需要跟进
if ($supplier['purchase_uid'] != $purchaseUid) {
$auditService = new SupplierAuditService();
//还要判断是否为待跟进供应商
......@@ -605,8 +605,8 @@ class SupplierService
$purchaseUser = $adminUserService->getAdminUserInfoByCodeId($purchaseUid);
$purchaseUserName = array_get($purchaseUser, 'name', '');
$logService = new LogService();
$content = "将渠道开发员由 [${prePurchaseUserName}] 改为 [${purchaseUserName}]";
$logService->AddIgnoreAuditCheckLog($supplierId, LogModel::UPDATE_OPERATE, '分配渠道开发员', $content);
$content = "将数据维护员由 [${prePurchaseUserName}] 改为 [${purchaseUserName}]";
$logService->AddIgnoreAuditCheckLog($supplierId, LogModel::UPDATE_OPERATE, '分配数据维护员', $content);
}
});
......@@ -655,7 +655,7 @@ class SupplierService
}
$preYunxinChannelUserName = (new AdminUserService())->getAdminUserNameByCodeId($preYunxinChannelUid);
$content = "将线上采购员由 [${preYunxinChannelUserName}] 改为 [${yunxinChannelUserName}]";
$logService->AddIgnoreAuditCheckLog($supplierId, LogModel::UPDATE_OPERATE, '分配渠道开发员', $content);
$logService->AddIgnoreAuditCheckLog($supplierId, LogModel::UPDATE_OPERATE, '分配数据维护员', $content);
}
return true;
}
......@@ -1397,7 +1397,7 @@ class SupplierService
$assignNames = array_map(function ($codeId) use ($adminUserService) {
return $adminUserService->getAdminUserNameByCodeId($codeId);
}, $assignCodeIds);
// 记录日志
if ($isProdMode) {
$skuPurchaseUserName = isset($assignResult['debug_info']['sku_purchase_name']) ? $assignResult['debug_info']['sku_purchase_name'] : '';
......@@ -1405,7 +1405,7 @@ class SupplierService
$content = "批量刷新历史数据自动分配采购员:SKU采购员[{$skuPurchaseUserName}],分配类型[{$assignType}],分配人员[" . implode(',', $assignNames) . "]";
$logService->AddAdminLog($supplierId, LogModel::UPDATE_OPERATE, '批量刷新历史数据', $content);
}
echo "成功 采购员:" . implode(',', $assignNames) . "\n";
}
} else {
......
......@@ -32,7 +32,7 @@ class SupplierStatisticsService
// $rejected = $this->getStatisticsCount('rejected');
// //禁用
// $disable = $this->getStatisticsCount('disable');
// //没有渠道开发
// //没有数据维护
// $noPurchaseUid = $this->getStatisticsCount('no_purchase_uid');
// //没有采购
// $noChannelUid = $this->getStatisticsCount('no_channel_uid');
......
......@@ -313,7 +313,7 @@ class SupplierValidator
}
}
//新增的时候,渠道开发 不能为空
//新增的时候,数据维护员 不能为空
$rules['purchase_uid'] = 'required';
$messages = $this->messages();
......@@ -375,7 +375,7 @@ class SupplierValidator
'supplier_group.required' => '公司性质 不能为空',
'supplier_address.required' => '注册地址 不能为空',
'region.required' => '所在区域 不能为空',
'purchase_uid.required' => '渠道开发员 不能为空',
'purchase_uid.required' => '数据维护员 不能为空',
'cn_ratio.min' => '人民币系数必须是大于1的浮点数',
'business_license.required' => '营业执照 不能为空',
'established_time.required' => '成立时间 不能为空',
......
......@@ -227,7 +227,7 @@ class IntracodeModel extends Model
return $code;
}
//获取渠道开发那边的人员(还是会汇总所有的内部编码的,只是把运营他们那边的人员优先级提高一些)
//获取数据维护员那边的人员(还是会汇总所有的内部编码的,只是把运营他们那边的人员优先级提高一些)
public function getPurchaseUserCodes()
{
$adminService = new AdminUserService();
......
......@@ -366,7 +366,7 @@ return [
'ChannelUserType' => [
1 => '猎芯采购',
2 => '京东采购',
// 2 => '京东采购',
3 => '华云采购',
4 => '数据跟单员',
],
......
......@@ -253,7 +253,7 @@ return [
// 'no_purchase_uid' => '渠道未分配',
// 'no_channel_uid' => '采购未分配',
// 'invalid_channel_uid' => '无效采购员',
// 'invalid_purchase_uid' => '无效渠道员',
// 'invalid_purchase_uid' => '无效数据维护员',
// 'contact_no_complete' => '联系人不完善',
// 'to_follow_up' => '待跟进',
// 'no_sku' => '无sku',
......
......@@ -38,7 +38,7 @@ return [
'register_company_name' => '注册公司名',
'trading_method_name' => '交易方式',
'channel_username' => '采购员',
'purchase_username' => '渠道开发员',
'purchase_username' => '数据维护员',
'us_delivery_time_full' => '香港交期',
'cn_delivery_time_full' => '国内交期',
'shipping_address' => '发货地址',
......
供应商编码,集团编码,供应商名称,供应商性质,公司实际性质,等级,数据等级,数据跟单员,区域,合作类型,代购类型,品质协议,平台合作协议,启用芯链账号,通过芯链上传合同,采购员,实体名单,状态,最新修改人,签约公司,联系人,渠道开发员,线上采购员,数据跟单员,SKU上传,SKU合作,日均上架数,有效期最高天数,创建人,创建部门,最近修改时间,供应商类别,创建时间,首次上传sku时间,最新上传sku时间
供应商编码,集团编码,供应商名称,供应商性质,公司实际性质,等级,数据等级,数据跟单员,区域,合作类型,代购类型,品质协议,平台合作协议,启用芯链账号,通过芯链上传合同,采购员,实体名单,状态,最新修改人,签约公司,联系人,数据维护员,线上采购员,数据跟单员,SKU上传,SKU合作,日均上架数,有效期最高天数,创建人,创建部门,最近修改时间,供应商类别,创建时间,首次上传sku时间,最新上传sku时间
供应商编码,集团编码,供应商名称,供应商性质,公司实际性质,等级,数据等级,数据跟单员,区域,合作类型,代购类型,品质协议,平台合作协议,启用芯链账号,通过芯链上传合同,采购员,实体名单,状态,最新修改人,签约公司,联系人,渠道开发员,线上采购员,数据跟单员,SKU上传,SKU合作,日均上架数,有效期最高天数,创建人,创建部门,最近修改时间,供应商类别,创建时间,首次上传sku时间,最新上传sku时间
供应商编码,集团编码,供应商名称,供应商性质,公司实际性质,等级,数据等级,数据跟单员,区域,合作类型,代购类型,品质协议,平台合作协议,启用芯链账号,通过芯链上传合同,采购员,实体名单,状态,最新修改人,签约公司,联系人,数据维护员,线上采购员,数据跟单员,SKU上传,SKU合作,日均上架数,有效期最高天数,创建人,创建部门,最近修改时间,供应商类别,创建时间,首次上传sku时间,最新上传sku时间
L0004825,G000774,深圳市成轩恒业电子科技有限公司,现货商,现货商,D,E,欧阳海梅,国内,国内现货 | 芯链商家,无,有,有,是,是,"廖长青(10112),周琴(10257),黄瑜娜(10326),刘维(10544),汪洋(10476),王千丽(10295),邱沛敏(10009),邹琪(10253),王刚(10347),梁福(10413),张华(10073),陈琴(10317),李萍(10392),黄湉湉(10680),李尚文杰(10546),刘银(10632),艾华(10725),钟一龙(10713),陈海佳(10043),杨康(10098),陈燕(10188),张思云(10267),邓斌军(10256),汤浩升(10224),刘帅(采购)(10306),万惠(10301),阳杰(10352),莫小花(10318),相宁(10518),董爱华(10406),侯筱(10320),罗惠婷(10379),余辉(10467),杨秀英(10609)",普通,已通过,admin,深圳市猎芯科技有限公司,34,周强(10294),周琴(10257),,否,是,0,现货 : 7天 | 期货 : 30天,,,2025/12/19 17:11,正式,2019/5/7 17:35,2023/7/14 11:53,2025/12/9 16:53
L0007346,G001281,深圳市蓝信宏业电子科技有限公司,现货商,现货商,D,E,欧阳海梅,国内,国内现货 | 芯链商家,无,有,有,是,否,"张右辉(10011),廖长青(10112),王文娟(10214),陈琴(10317),汪洋(10476),周琴(10257),朱薇(10499),郑慧(10576),刘维(10544),彭亮(10568),陈欢(10096),刘伟佳(10110),李妹(10239),苏海英(10395),韦诗相(10226),徐蓉琳(10344),侯筱(10320)",普通,已通过,王文娟,深贸电子有限公司,17,陈琴(10317),周琴(10257),,是,是,0,现货 : 7天 | 期货 : 30天,,,2025/12/17 17:22,正式,2019/8/20 14:46,2023/8/4 17:51,2025/12/22 16:38
L0013663,G012253,深圳市祥锋微电子有限公司,现货商,现货商,-,E,欧阳海梅,国内,国内现货 | 芯链商家,无,有,有,是,否,"周琴(10257),谢飞燕(10350),梁福(10413),段灵芝(10012),邹琪(10253),李萍(10392),王千丽(10295),汪洋(10476),邱沛敏(10009),陈琴(10317),朱薇(10499),张右辉(10011),李尚文杰(10546),施佳君(10758),邓斌军(10256)",普通,已通过,段灵芝,深贸电子有限公司,15,周强(10294),周琴(10257),,否,是,0,现货 : 7天 | 期货 : 30天,邓晓琳,京东项目部,2025/12/17 15:20,正式,2022/7/22 16:10,2023/7/7 18:54,2025/5/14 15:57
......
......@@ -13,7 +13,7 @@
, cellMinWidth: 80 //全局定义常规单元格的最小宽度
, where: {
supplier_id:{{$supplier['supplier_id']}},
action: '分配渠道开发员',
action: '分配数据维护员',
}
, loading: true
, first: true //不显示首页
......@@ -52,4 +52,4 @@
admin.closeThisDialog();
});
});
</script>
\ No newline at end of file
</script>
......@@ -21,7 +21,7 @@
{field: 'supplier_name', title: '供应商名称', align: 'center'},
{field: 'supplier_group', title: '供应商性质', align: 'center'},
{field: 'stockup_type', title: '合作类型', align: 'center'},
{field: 'channel_username', title: '渠道开发员', align: 'center'},
{field: 'channel_username', title: '数据维护员', align: 'center'},
{field: 'create_name', title: '创建人', align: 'center'},
{field: 'create_time', title: '创建时间', align: 'center'},
{field: 'status_name', title: '状态', align: 'center'},
......@@ -98,7 +98,7 @@
{field: 'stockup_type', title: '合作类型', align: 'center', width: 100},
{field: 'channel_username', title: '采购员', align: 'center', width: 130},
{field: 'create_time', title: '创建时间', align: 'center', width: 170},
{field: 'purchase_username', title: '渠道开发员', align: 'center', width: 130},
{field: 'purchase_username', title: '数据维护员', align: 'center', width: 130},
{field: 'audit_time', title: '审批时间', align: 'center', width: 170},
{
field: 'status_name', title: '状态', align: 'center', width: 80, templet: function (data) {
......@@ -139,4 +139,4 @@
});
</script>
\ No newline at end of file
</script>
......@@ -267,7 +267,7 @@
}
},
{field: 'purchase_username', title: '渠道开发员', align: 'center', width: 110},
{field: 'purchase_username', title: '数据维护员', align: 'center', width: 110},
{field: 'yunxin_channel_username', title: '线上采购员', align: 'center', width: 110},
{
field: 'jd_channel_username', title: '京东采购员', align: 'center', width: 130, templet: function (data) {
......@@ -510,7 +510,7 @@
}
})
//批量修改(分配)渠道
//批量修改(分配)数据维护
$("#batch_allocate_purchase_user").click(function () {
let checkStatus = table.checkStatus('list');
let data = checkStatus.data;
......@@ -522,14 +522,14 @@
let status = Array.from(data, ({status}) => status);
//分配采购员的多选操作,需要先去判断是否存在审核中的供应商,存在的话,要提示
if (status.indexOf(1) !== -1 || status.indexOf(-3) !== -1 || status.indexOf(-1) !== -1) {
layer.msg('选择的供应商里,存在审核中/待复审/黑名单的供应商,无法分配渠道员', {icon: 5})
layer.msg('选择的供应商里,存在审核中/待复审/黑名单的供应商,无法分配数据维护员', {icon: 5})
return
}
layer.open({
type: 2,
content: '/supplier/BatchAllocatePurchaseUser?view=iframe&supplier_ids=' + supplierIds,
area: ['600px', '70%'],
title: '批量分配渠道员',
title: '批量分配数据维护员',
end: function () {
table.reload('list');
supplierStatistics();
......
......@@ -112,7 +112,7 @@
<div class="layui-row">
<div class="layui-col-md3">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_uid','渠道开发员 : ',$default_purchase_uid,$userCodes,['required'=>true,'width'=>'150px']) !!}
{!! $statusPresenter->render('purchase_uid','数据维护员 : ',$default_purchase_uid,$userCodes,['required'=>true,'width'=>'150px']) !!}
</div>
<div class="layui-col-md3">
<label class="layui-form-label"><span class="require">*</span>注册资金(万): </label>
......
......@@ -27,7 +27,7 @@
<div class="layui-form-item">
<div class="layui-inline" style="margin-left: -30px">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_uid','渠道开发员',$supplier['purchase_uid'],
{!! $statusPresenter->render('purchase_uid','数据维护员',$supplier['purchase_uid'],
$userCodes,['required'=>true,'width'=>'150px']) !!}
</div>
</div>
......
......@@ -6,14 +6,14 @@
<div class="layui-card">
<div class="layui-card-header" style="height: 170px">
<blockquote class="layui-elem-quote layui-text">
<b>渠道开发员设置</b>
<b>数据维护员设置</b>
</blockquote>
<form class="layui-form" action="">
<input type="hidden" name="supplier_ids" value="{{$supplierIds}}">
<div class="layui-form-item">
<div class="layui-inline" style="margin-left: -30px">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_uid','渠道开发员',null,
{!! $statusPresenter->render('purchase_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>当前选中需要批量修改渠道员的供应商列表</b>
<b>当前选中需要批量修改数据维护员的供应商列表</b>
</blockquote>
<table class="layui-table">
<colgroup>
......@@ -42,7 +42,7 @@
<thead>
<tr>
<th>供应商名称</th>
<th>当前渠道开发</th>
<th>当前数据维护</th>
</tr>
</thead>
<tbody>
......
......@@ -6,7 +6,7 @@
<div class="layui-card">
<div class="layui-card-header" style="height: 170px">
<blockquote class="layui-elem-quote layui-text">
<b>渠道开发员设置</b>
<b>数据维护员设置</b>
</blockquote>
<form class="layui-form" action="">
<input type="hidden" name="supplier_ids" value="{{$supplierIds}}">
......
......@@ -29,7 +29,7 @@
状态 : {{$supplier['status_name']}}
</div>
<div class="layui-col-md2">
渠道开发员 : {{$supplier['purchase_username']}}
数据维护员 : {{$supplier['purchase_username']}}
</div>
<div class="layui-col-md4">
最近修改时间 : {{$supplier['update_time']}}
......
......@@ -11,11 +11,11 @@
<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>--}}
{{-- <button type="button" class="layui-btn layui-btn-sm" id="allocate_purchase_user">分配数据维护员</button>--}}
{{-- @endif--}}
@if(checkPerm('BatchAllocatePurchaseUser'))
{{-- <button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">批量分配渠道员</button>--}}
<button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">分配渠道员</button>
{{-- <button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">批量分配数据维护员</button>--}}
<button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">分配数据维护员</button>
@endif
@if(checkPerm('AllocateChannelUser'))
<button type="button" class="layui-btn layui-btn-sm" id="allocate_channel_user">分配采购员</button>
......
......@@ -38,7 +38,7 @@
状态 : {{$supplier['status_name']}}
</div>
<div class="layui-col-md2">
渠道开发员 : {{$supplier['purchase_username']}}
数据维护员 : {{$supplier['purchase_username']}}
</div>
<div class="layui-col-md4">
最近修改时间 : {{$supplier['update_time']}}
......
......@@ -156,6 +156,11 @@
<div id="create_user_department" style="width: 150px"></div>
</div>
</div>
<div class="layui-inline">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('data_channel_uid','数据跟单员',request()->get('data_channel_uid'),
$userCodes) !!}
</div>
<div class="layui-inline" style="width: 600px">
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
{!! $transformableTimeIntervalPresenter->render(['update_time'=>'更新时间','create_time'=>'创建时间','audit_time'=>'上传时间'],true) !!}
......
......@@ -109,7 +109,7 @@
<div class="layui-row">
<div class="layui-col-md3">
@inject('statusPresenter','App\Presenters\StatusPresenter')
{!! $statusPresenter->render('purchase_uid','渠道开发员 : ',$supplier['purchase_uid'],$userCodes,['required'=>true,'width'=>'150px']) !!}
{!! $statusPresenter->render('purchase_uid','数据维护员 : ',$supplier['purchase_uid'],$userCodes,['required'=>true,'width'=>'150px']) !!}
</div>
<div class="layui-col-md3">
<label class="layui-form-label"><span class="require">*</span>注册资金(万): </label>
......
......@@ -30,7 +30,7 @@
<select name="channel_user_type">
<option value="">全部</option>
<option value="1">猎芯采购</option>
<option value="2">京东采购</option>
{{-- <option value="2">京东采购</option> --}}
<option value="3">华云采购</option>
<option value="4">数据跟单员</option>
</select>
......
......@@ -183,10 +183,10 @@
@inject('transformableSelectPresenter','App\Presenters\Filter\TransformableSelectPresenter')
{!! $transformableSelectPresenter->render(['channel_uid'=>'采购员'],$userCodes) !!}
</div>
<div class="layui-inline">
{{-- <div class="layui-inline">
@inject('transformableSelectPresenter','App\Presenters\Filter\TransformableSelectPresenter')
{!! $transformableSelectPresenter->render(['purchase_uid'=>'开发员'],$userCodes) !!}
</div>
</div> --}}
<div class="layui-inline">
@inject('transformableSelectPresenter','App\Presenters\Filter\TransformableSelectPresenter')
{!! $transformableSelectPresenter->render(['create_uid'=>'创建人'],$userCodes) !!}
......@@ -245,6 +245,11 @@
<div id="create_user_department" style="width: 150px"></div>
</div>
</div>
<div class="layui-inline">
@inject('multiTransformableSelectPresenter','App\Presenters\Filter\MultiTransformableSelectPresenter')
{!! $multiTransformableSelectPresenter->render(['data_channel_uid' => '数据跟单员'],
['data_channel_uid' => $userCodes]) !!}
</div>
<div class="layui-row">
<div class="layui-inline" style="width: 600px">
@inject('transformableTimeIntervalPresenter','App\Presenters\Filter\TransformableTimeIntervalPresenter')
......
......@@ -11,11 +11,11 @@
<button type="button" class="layui-btn layui-btn-sm" id="audit_supplier">审核</button>
<?php endif; ?>
<?php /* <?php if(checkPerm('AllocatePurchaseUser')): ?>*/ ?>
<?php /* <button type="button" class="layui-btn layui-btn-sm" id="allocate_purchase_user">分配渠道员</button>*/ ?>
<?php /* <button type="button" class="layui-btn layui-btn-sm" id="allocate_purchase_user">分配数据维护员</button>*/ ?>
<?php /* <?php endif; ?>*/ ?>
<?php if(checkPerm('BatchAllocatePurchaseUser')): ?>
<?php /* <button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">批量分配渠道员</button>*/ ?>
<button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">分配渠道</button>
<?php /* <button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">批量分配数据维护员</button>*/ ?>
<button type="button" class="layui-btn layui-btn-sm" id="batch_allocate_purchase_user">分配数据维护</button>
<?php endif; ?>
<?php if(checkPerm('AllocateChannelUser')): ?>
<button type="button" class="layui-btn layui-btn-sm" id="allocate_channel_user">分配采购员</button>
......
......@@ -197,11 +197,11 @@
<?php echo $transformableSelectPresenter->render(['channel_uid'=>'采购员'],$userCodes); ?>
</div>
<div class="layui-inline">
<?php /* <div class="layui-inline">
<?php $transformableSelectPresenter = app('App\Presenters\Filter\TransformableSelectPresenter'); ?>
<?php echo $transformableSelectPresenter->render(['purchase_uid'=>'开发员'],$userCodes); ?>
</div>
</div> */ ?>
<div class="layui-inline">
<?php $transformableSelectPresenter = app('App\Presenters\Filter\TransformableSelectPresenter'); ?>
<?php echo $transformableSelectPresenter->render(['create_uid'=>'创建人'],$userCodes); ?>
......@@ -272,6 +272,12 @@
<div id="create_user_department" style="width: 150px"></div>
</div>
</div>
<div class="layui-inline">
<?php $multiTransformableSelectPresenter = app('App\Presenters\Filter\MultiTransformableSelectPresenter'); ?>
<?php echo $multiTransformableSelectPresenter->render(['purchase_uid' => '线上采购员'],
['purchase_uid' => $userCodes]); ?>
</div>
<div class="layui-row">
<div class="layui-inline" style="width: 600px">
<?php $transformableTimeIntervalPresenter = app('App\Presenters\Filter\TransformableTimeIntervalPresenter'); ?>
......
......@@ -21,7 +21,7 @@
{field: 'supplier_name', title: '供应商名称', align: 'center'},
{field: 'supplier_group', title: '供应商性质', align: 'center'},
{field: 'stockup_type', title: '合作类型', align: 'center'},
{field: 'channel_username', title: '渠道开发员', align: 'center'},
{field: 'channel_username', title: '数据维护员', align: 'center'},
{field: 'create_name', title: '创建人', align: 'center'},
{field: 'create_time', title: '创建时间', align: 'center'},
{field: 'status_name', title: '状态', align: 'center'},
......@@ -98,7 +98,7 @@
{field: 'stockup_type', title: '合作类型', align: 'center', width: 100},
{field: 'channel_username', title: '采购员', align: 'center', width: 130},
{field: 'create_time', title: '创建时间', align: 'center', width: 170},
{field: 'purchase_username', title: '渠道开发员', align: 'center', width: 130},
{field: 'purchase_username', title: '数据维护员', align: 'center', width: 130},
{field: 'audit_time', title: '审批时间', align: 'center', width: 170},
{
field: 'status_name', title: '状态', align: 'center', width: 80, templet: function (data) {
......@@ -139,4 +139,4 @@
});
</script>
\ No newline at end of file
</script>
......@@ -267,7 +267,7 @@
}
},
{field: 'purchase_username', title: '渠道开发员', align: 'center', width: 110},
{field: 'purchase_username', title: '数据维护员', align: 'center', width: 110},
{field: 'yunxin_channel_username', title: '线上采购员', align: 'center', width: 110},
{
field: 'jd_channel_username', title: '京东采购员', align: 'center', width: 130, templet: function (data) {
......@@ -510,7 +510,7 @@
}
})
//批量修改(分配)渠道
//批量修改(分配)数据维护
$("#batch_allocate_purchase_user").click(function () {
let checkStatus = table.checkStatus('list');
let data = checkStatus.data;
......@@ -522,14 +522,14 @@
let status = Array.from(data, ({status}) => status);
//分配采购员的多选操作,需要先去判断是否存在审核中的供应商,存在的话,要提示
if (status.indexOf(1) !== -1 || status.indexOf(-3) !== -1 || status.indexOf(-1) !== -1) {
layer.msg('选择的供应商里,存在审核中/待复审/黑名单的供应商,无法分配渠道员', {icon: 5})
layer.msg('选择的供应商里,存在审核中/待复审/黑名单的供应商,无法分配数据维护员', {icon: 5})
return
}
layer.open({
type: 2,
content: '/supplier/BatchAllocatePurchaseUser?view=iframe&supplier_ids=' + supplierIds,
area: ['600px', '70%'],
title: '批量分配渠道员',
title: '批量分配数据维护员',
end: function () {
table.reload('list');
supplierStatistics();
......
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