Commit e0a8c91d by 杨树贤

Merge branch 'master' into ysx-spu的redis拆库-20230705

parents fd1a9f6a 8c8f386f
Showing with 255 additions and 154 deletions
...@@ -41,7 +41,7 @@ DB_SELF_USERNAME=spu ...@@ -41,7 +41,7 @@ DB_SELF_USERNAME=spu
DB_SELF_PASSWORD=spu DB_SELF_PASSWORD=spu
DB_SELF_PORT=3306 DB_SELF_PORT=3306
#云芯 MYSQL配置 #芯链 MYSQL配置
DB_HOST_YUNXIN=192.168.1.252 DB_HOST_YUNXIN=192.168.1.252
DB_DATABASE_YUNXIN=liexin_yunxin DB_DATABASE_YUNXIN=liexin_yunxin
DB_USERNAME_YUNXIN=liexin_yunxin DB_USERNAME_YUNXIN=liexin_yunxin
...@@ -124,6 +124,7 @@ RABBITMQ2_QUEUE=wms_service ...@@ -124,6 +124,7 @@ RABBITMQ2_QUEUE=wms_service
#RABBITMQ_PASSWORD=jy2y2900 #RABBITMQ_PASSWORD=jy2y2900
ES_SKU_URL=http://so.liexin.net/search/Es/searchSku ES_SKU_URL=http://so.liexin.net/search/Es/searchSku
ES_URL=http://so.liexin.net
MAIL_DRIVER=smtp MAIL_DRIVER=smtp
MAIL_HOST=mailtrap.io MAIL_HOST=mailtrap.io
......
...@@ -79,7 +79,7 @@ class ExternalApiController extends Controller ...@@ -79,7 +79,7 @@ class ExternalApiController extends Controller
if ($canApplySupplier !== true) { if ($canApplySupplier !== true) {
$this->externalResponse(-1, $canApplySupplier); $this->externalResponse(-1, $canApplySupplier);
} }
//判断这个手机号对应的云芯账号是否已经存在 //判断这个手机号对应的芯链账号是否已经存在
$existAccount = SupplierAccountModel::where('mobile', $data['mobile'])->exists(); $existAccount = SupplierAccountModel::where('mobile', $data['mobile'])->exists();
if ($existAccount) { if ($existAccount) {
$this->externalResponse(-1, '该手机号已经有对应的芯链账号,请重新选择手机号'); $this->externalResponse(-1, '该手机号已经有对应的芯链账号,请重新选择手机号');
......
...@@ -515,7 +515,7 @@ class SupplierApiController extends Controller ...@@ -515,7 +515,7 @@ class SupplierApiController extends Controller
} }
//设置云芯账号 //设置芯链账号
public function SetYunxinChannelUid($request) public function SetYunxinChannelUid($request)
{ {
$supplierId = $request->get('supplier_id'); $supplierId = $request->get('supplier_id');
...@@ -534,14 +534,14 @@ class SupplierApiController extends Controller ...@@ -534,14 +534,14 @@ 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采购失败');
} }
} }
//批量分配云芯采购员 //批量分配芯链采购员
public function BatchAllocateYunxinChannelUser($request) public function BatchAllocateYunxinChannelUser($request)
{ {
$channelUid = $request->get('channel_uid'); $channelUid = $request->get('channel_uid');
...@@ -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, '批量分配线上采购员成功');
} }
//检查能否能申请审核 //检查能否能申请审核
......
...@@ -25,6 +25,14 @@ class SupplierShareApplyApiController extends Controller ...@@ -25,6 +25,14 @@ class SupplierShareApplyApiController extends Controller
} }
//校验申请的供应商,并且还要返回所属部门列表 //校验申请的供应商,并且还要返回所属部门列表
/**
* 功能说明:1、采购员在操作共用申请时,如果该供应商有sku采购员,则只能选择sku采购员所在部门进行审核(其余部门都不显示)并且出现“申请原因”,文本框,必填,300个字符以内;
* PS:没有sku采购员的供应商,申请共用时不显示“申请原因”,无需填写;
* 如果该供应商没有sku采购员,有其他采购员,则显示其他采购员对应的采购部门(有几个部门就显示几个部门,不显示运营部)
* 如果该供应商没有sku采购员,也没有采购员,有运营部人员,则显示运营部;
* PS:该供应商完全没有人员,则无法申请共用(同现有流程)
**/
public function CheckApplySupplierShare($request) public function CheckApplySupplierShare($request)
{ {
$supplierName = trim($request->get('supplier_name')); $supplierName = trim($request->get('supplier_name'));
...@@ -40,6 +48,7 @@ class SupplierShareApplyApiController extends Controller ...@@ -40,6 +48,7 @@ class SupplierShareApplyApiController extends Controller
if (empty($supplier)) { if (empty($supplier)) {
$this->response(-1, '该供应商名称不存在,请输入正确供应商名称'); $this->response(-1, '该供应商名称不存在,请输入正确供应商名称');
} }
$hasYunxinChannelUid = $supplier['yunxin_channel_uid'] ? 1 : 0;
$userId = $request->user->userId; $userId = $request->user->userId;
$codeId = $request->user->codeId; $codeId = $request->user->codeId;
if (empty($codeId)) { if (empty($codeId)) {
...@@ -52,7 +61,8 @@ class SupplierShareApplyApiController extends Controller ...@@ -52,7 +61,8 @@ class SupplierShareApplyApiController extends Controller
$q->orWhere('purchase_uid', $codeId) $q->orWhere('purchase_uid', $codeId)
->orwhere('channel_uid', 'like', "%$codeId%"); ->orwhere('channel_uid', 'like', "%$codeId%");
} }
})->where('is_type', 0)->first(); })
->where('is_type', 0)->first();
if ($isOwn) { if ($isOwn) {
$this->response(-1, '你已经可以管理该供应商,无需申请共用'); $this->response(-1, '你已经可以管理该供应商,无需申请共用');
} }
...@@ -70,7 +80,11 @@ class SupplierShareApplyApiController extends Controller ...@@ -70,7 +80,11 @@ class SupplierShareApplyApiController extends Controller
if (empty($departments)) { if (empty($departments)) {
$this->response(-1, '该供应商不存在相关联的部门'); $this->response(-1, '该供应商不存在相关联的部门');
} }
$this->response(0, '匹配到供应商数据,可以下拉选择你需要申请的部门', $departments, $supplier['supplier_id']); $data = [
'departments' => $departments,
'has_yunxin_channel_uid' => $hasYunxinChannelUid,
];
$this->response(0, '匹配到供应商数据,可以下拉选择你需要申请的部门', $data, $supplier['supplier_id']);
} }
//保存共用申请 //保存共用申请
...@@ -78,10 +92,11 @@ class SupplierShareApplyApiController extends Controller ...@@ -78,10 +92,11 @@ class SupplierShareApplyApiController extends Controller
{ {
$map = $request->only([ $map = $request->only([
'apply_department_id', 'apply_department_id',
'apply_reason',
'supplier_id', 'supplier_id',
]); ]);
if (empty($map['apply_department_id']) || empty($map['supplier_id'])) { if (empty($map['apply_department_id']) || empty($map['supplier_id'])) {
$this->response(-1, '缺少参数'); $this->response(-1, '被申请部门不能为空');
} }
if (empty($request->user->codeId)) { if (empty($request->user->codeId)) {
$this->response(-1, '你还没有绑定内部编码,无法申请共用'); $this->response(-1, '你还没有绑定内部编码,无法申请共用');
...@@ -92,6 +107,12 @@ class SupplierShareApplyApiController extends Controller ...@@ -92,6 +107,12 @@ class SupplierShareApplyApiController extends Controller
if ($hasNoFinish) { if ($hasNoFinish) {
$this->response(-1, '你存在对该供应商的申请,正在审核流程中,请等待对应的审核流程走完方可针对该供应商进行新的共用申请'); $this->response(-1, '你存在对该供应商的申请,正在审核流程中,请等待对应的审核流程走完方可针对该供应商进行新的共用申请');
} }
//如果是包含sku采购员的供应商,那么就要有申请理由
if (SupplierChannelModel::where('supplier_id', $map['supplier_id'])->value('yunxin_channel_uid')) {
if (!$map['apply_reason']) {
$this->response(-1, '申请原因不能为空');
}
}
$result = $applyService->saveSupplierShareApply($map); $result = $applyService->saveSupplierShareApply($map);
if (!$result) { if (!$result) {
$this->response(-1, '申请失败,系统错误'); $this->response(-1, '申请失败,系统错误');
......
...@@ -48,7 +48,7 @@ class SupplierAccountController extends Controller ...@@ -48,7 +48,7 @@ class SupplierAccountController extends Controller
public function AddSupplierAccount($request) public function AddSupplierAccount($request)
{ {
//获取所有启用的供应商编码,而且类型是包括云芯 //获取所有启用的供应商编码,而且类型是包括芯链
$model = new SupplierChannelModel(); $model = new SupplierChannelModel();
$suppliers = $model->where('is_type', 0) $suppliers = $model->where('is_type', 0)
->whereRaw('stockup_type like "%5%"') ->whereRaw('stockup_type like "%5%"')
...@@ -69,7 +69,7 @@ class SupplierAccountController extends Controller ...@@ -69,7 +69,7 @@ class SupplierAccountController extends Controller
$id = $request->get('id'); $id = $request->get('id');
$model = new SupplierAccountModel(); $model = new SupplierAccountModel();
$account = $model->where('id', $id)->first()->toArray(); $account = $model->where('id', $id)->first()->toArray();
//获取所有启用的供应商编码,而且类型是包括云芯 //获取所有启用的供应商编码,而且类型是包括芯链
$model = new SupplierChannelModel(); $model = new SupplierChannelModel();
$suppliers = $model->where('is_type', 0) $suppliers = $model->where('is_type', 0)
->whereRaw('stockup_type like "%5%"') ->whereRaw('stockup_type like "%5%"')
......
...@@ -53,7 +53,7 @@ class SupplierApplyController extends Controller ...@@ -53,7 +53,7 @@ class SupplierApplyController extends Controller
$apply = SupplierApplyModel::with('supplier')->where('id', $id)->first()->toArray(); $apply = SupplierApplyModel::with('supplier')->where('id', $id)->first()->toArray();
$apply['supplier_group_name'] = array_get(config('fixed.SupplierGroup'), $apply['supplier']['supplier_group']); $apply['supplier_group_name'] = array_get(config('fixed.SupplierGroup'), $apply['supplier']['supplier_group']);
$this->data['apply'] = $apply; $this->data['apply'] = $apply;
$this->data['title'] = '云芯入驻审核'; $this->data['title'] = '芯链入驻审核';
return $this->view('云芯入驻审核'); return $this->view('芯链入驻审核');
} }
} }
\ No newline at end of file
...@@ -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');
......
...@@ -69,7 +69,7 @@ class Menu ...@@ -69,7 +69,7 @@ class Menu
$urls = [ $urls = [
[ [
'title' => '商机管理', 'title' => '商机管理',
'href' => 'https://yunxin.ichunt.com', 'href' => 'https://xinlian.ichunt.com',
'class' => '', 'class' => '',
'target' => '_blank', 'target' => '_blank',
'childs' => [], 'childs' => [],
......
...@@ -48,6 +48,8 @@ class SkuService ...@@ -48,6 +48,8 @@ class SkuService
} }
$sku = json_decode($redis->hget('sku', $goodsId), true); $sku = json_decode($redis->hget('sku', $goodsId), true);
if (empty($sku)) { if (empty($sku)) {
$sku = ['goods_id' => $goodsId];
$list[] = $sku;
continue; continue;
} }
//赋值 //赋值
...@@ -108,6 +110,9 @@ class SkuService ...@@ -108,6 +110,9 @@ class SkuService
$encodedList = array_column($list, 'encoded'); $encodedList = array_column($list, 'encoded');
$encodedUsers = $intraCodeModel->getEncodedUserByEncoded($encodedList); $encodedUsers = $intraCodeModel->getEncodedUserByEncoded($encodedList);
$list = array_map(function ($item) use ($encodedUsers, $redis) { $list = array_map(function ($item) use ($encodedUsers, $redis) {
if (empty($item['goods_name'])) {
return $item;
}
$encoded = array_get($item, 'encoded', 0); $encoded = array_get($item, 'encoded', 0);
$item['encoded_user_name'] = array_get($encodedUsers, $encoded, ''); $item['encoded_user_name'] = array_get($encodedUsers, $encoded, '');
$item['moq'] = $item['moq'] ?: 0; $item['moq'] = $item['moq'] ?: 0;
......
...@@ -276,7 +276,7 @@ class SupplierAuditService ...@@ -276,7 +276,7 @@ class SupplierAuditService
return true; return true;
} else { } else {
if ($field === 'stockup_type') { if ($field === 'stockup_type') {
//还要单独判断供应商的stockup_type,只有是操作云芯这个值的时候,才不去审核,真是服了 //还要单独判断供应商的stockup_type,只有是操作芯链这个值的时候,才不去审核,真是服了
$oldStockupType = explode(',', trim($supplier['stockup_type'], '')); $oldStockupType = explode(',', trim($supplier['stockup_type'], ''));
$newStockupType = explode(',', trim($channel['stockup_type'], '')); $newStockupType = explode(',', trim($channel['stockup_type'], ''));
if (count($oldStockupType) > count($newStockupType)) { if (count($oldStockupType) > count($newStockupType)) {
......
...@@ -109,7 +109,6 @@ class SupplierService ...@@ -109,7 +109,6 @@ class SupplierService
//sku上传规则相关设置 //sku上传规则相关设置
$skuAuditRulerService = new SupplierSkuAuditRulerService(); $skuAuditRulerService = new SupplierSkuAuditRulerService();
$channel['sku_audit_ruler'] = $skuAuditRulerService->getSkuAuditRulerForDB($channel['sku_audit_ruler']); $channel['sku_audit_ruler'] = $skuAuditRulerService->getSkuAuditRulerForDB($channel['sku_audit_ruler']);
/**新增供应商操作**/ /**新增供应商操作**/
if (empty($channel['supplier_id'])) { if (empty($channel['supplier_id'])) {
//处理附件信息,新增的时候才会有附件信息提交过来 //处理附件信息,新增的时候才会有附件信息提交过来
...@@ -487,7 +486,7 @@ class SupplierService ...@@ -487,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);
...@@ -512,13 +511,13 @@ class SupplierService ...@@ -512,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)
{ {
...@@ -782,7 +781,7 @@ class SupplierService ...@@ -782,7 +781,7 @@ class SupplierService
$supplier = SupplierChannelModel::where('supplier_name', $supplierName)->first(); $supplier = SupplierChannelModel::where('supplier_name', $supplierName)->first();
$supplier = !empty($supplier) ? $supplier->toArray() : []; $supplier = !empty($supplier) ? $supplier->toArray() : [];
if ($supplier) { if ($supplier) {
//查询是否是云芯商家 //查询是否是芯链商家
$existsYunxinAccount = SupplierAccountModel::where('supplier_id', $supplier['supplier_id'])->exists(); $existsYunxinAccount = SupplierAccountModel::where('supplier_id', $supplier['supplier_id'])->exists();
$supplier['is_yunxin_supplier'] = $existsYunxinAccount ? 1 : 0; $supplier['is_yunxin_supplier'] = $existsYunxinAccount ? 1 : 0;
} }
......
...@@ -18,7 +18,7 @@ class SupplierShareApplyService ...@@ -18,7 +18,7 @@ class SupplierShareApplyService
$limit = request()->get('limit', 10); $limit = request()->get('limit', 10);
$query = $applyModel::with([ $query = $applyModel::with([
'supplier' => function ($q) { 'supplier' => function ($q) {
$q->select(['supplier_name', 'supplier_id']); $q->select(['supplier_name', 'supplier_id','yunxin_channel_uid']);
}, },
'department', 'department',
'apply_department' 'apply_department'
...@@ -45,13 +45,21 @@ class SupplierShareApplyService ...@@ -45,13 +45,21 @@ class SupplierShareApplyService
public function getApplyCanUseDepartments($supplier) public function getApplyCanUseDepartments($supplier)
{ {
$supplier = $supplier->toArray(); $supplier = $supplier->toArray();
//找出采购,开发员,创建者所属部门,一个供应商可能和多个部门相关,因为采购可能有自营或者联营的 $yunxinChannelUid = $supplier['yunxin_channel_uid'];
$purchaseUid = $supplier['purchase_uid']; //如果是有芯链sku采购员的,那么就只取sku采购员所在的部门进行审核
$channelUids = explode(',', $supplier['channel_uid']); if ($yunxinChannelUid) {
$createUid = $supplier['create_uid']; $purchaseUid = 0;
$channelUids = [$yunxinChannelUid];
$createUid = 0;
} else {
//找出采购,开发员,创建者所属部门,一个供应商可能和多个部门相关,因为采购可能有自营或者联营的
$purchaseUid = $supplier['purchase_uid'];
$channelUids = explode(',', $supplier['channel_uid']);
$createUid = $supplier['create_uid'];
}
//dd($purchaseUid,$channelUids,$createUid);
$departmentService = new DepartmentService(); $departmentService = new DepartmentService();
$adminService = new AdminUserService(); $adminService = new AdminUserService();
$purchaseUser = $adminService->getAdminUserInfoByCodeId($purchaseUid); $purchaseUser = $adminService->getAdminUserInfoByCodeId($purchaseUid);
$purchaseDepartment = $departmentService->getUpperDepartmentByUserIdForShareApply($purchaseUser['userId']); $purchaseDepartment = $departmentService->getUpperDepartmentByUserIdForShareApply($purchaseUser['userId']);
$createDepartment = $departmentService->getUpperDepartmentByUserIdForShareApply($createUid); $createDepartment = $departmentService->getUpperDepartmentByUserIdForShareApply($createUid);
...@@ -75,6 +83,12 @@ class SupplierShareApplyService ...@@ -75,6 +83,12 @@ class SupplierShareApplyService
$allDepartments = array_filter($allDepartments, function ($department) { $allDepartments = array_filter($allDepartments, function ($department) {
return !empty($department); return !empty($department);
}); });
//这里还要去判断,如果返回的部门里面有多个部门,并且包含运营部,那么就要去除运营部
if (count($allDepartments) > 1) {
$allDepartments = array_filter($allDepartments, function ($department) {
return $department['department_id'] != config('field.YunyingTopDepartmentId');
});
}
return $allDepartments; return $allDepartments;
} }
...@@ -108,11 +122,10 @@ class SupplierShareApplyService ...@@ -108,11 +122,10 @@ class SupplierShareApplyService
$departmentService = new DepartmentService(); $departmentService = new DepartmentService();
$topDepartment = $departmentService->getUpperDepartmentByUserIdForShareApply($userId); $topDepartment = $departmentService->getUpperDepartmentByUserIdForShareApply($userId);
$departmentId = $topDepartment['department_id']; $departmentId = $topDepartment['department_id'];
$applyModel = new SupplierShareApplyModel(); $applyModel = new SupplierShareApplyModel();
$query = $applyModel::with([ $query = $applyModel::with([
'supplier' => function ($q) { 'supplier' => function ($q) {
$q->select(['supplier_name', 'supplier_id']); $q->select(['supplier_name', 'supplier_id','yunxin_channel_uid']);
}, },
'department', 'department',
'apply_department', 'apply_department',
...@@ -163,7 +176,6 @@ class SupplierShareApplyService ...@@ -163,7 +176,6 @@ class SupplierShareApplyService
$syncService->syncSupplierToErp($apply['supplier_id']); $syncService->syncSupplierToErp($apply['supplier_id']);
} }
} }
return $applyModel->where('id', $id)->update($apply); return $applyModel->where('id', $id)->update($apply);
} }
} }
\ No newline at end of file
...@@ -57,12 +57,12 @@ class SupplierSkuAuditRulerService ...@@ -57,12 +57,12 @@ class SupplierSkuAuditRulerService
*/ */
$defaultRuler = [ $defaultRuler = [
'1' => 1, '1' => 1,
'2' => 1, // '2' => 1,
'3' => 1, // '3' => 1,
'4' => 1 // '4' => 1
]; ];
if (empty($auditData)) { if (empty($auditData)) {
$auditRuler['skip'] = 0; $auditRuler['skip'] = 1;
$auditRuler['audit_ruler'] = $defaultRuler; $auditRuler['audit_ruler'] = $defaultRuler;
return json_encode($auditRuler); return json_encode($auditRuler);
} }
......
...@@ -85,25 +85,25 @@ class SupplierStatisticsService ...@@ -85,25 +85,25 @@ class SupplierStatisticsService
'all_channel_user_resigned' => null, 'all_channel_user_resigned' => null,
//历史平台合作供应商 //历史平台合作供应商
'uploaded_sku' => null, 'uploaded_sku' => null,
// 非云芯供应商 // 非芯链供应商
'not_yunxin' => null, 'not_yunxin' => null,
//已上架(非云芯)供应商 //已上架(非芯链)供应商
'not_yunxin_and_has_sku' => null, 'not_yunxin_and_has_sku' => null,
//已下架(非云芯)供应商 //已下架(非芯链)供应商
'not_yunxin_and_has_no_sku' => null, 'not_yunxin_and_has_no_sku' => null,
//云芯供应商 //芯链供应商
'yunxin' => null, 'yunxin' => null,
//已上架(云芯)供应商 //已上架(芯链)供应商
'yunxin_and_has_sku' => null, 'yunxin_and_has_sku' => null,
//已下架(云芯)供应商 //已下架(芯链)供应商
'yunxin_and_has_no_sku' => null, 'yunxin_and_has_no_sku' => null,
//3天内到期(云芯)供应商 //3天内到期(芯链)供应商
'yunxin_expired_at_days' => null, 'yunxin_expired_at_days' => null,
//3天内到期(非云芯)供应商 //3天内到期(非芯链)供应商
'not_yunxin_expired_at_days' => null, 'not_yunxin_expired_at_days' => null,
//已过期(云芯)供应商 //已过期(芯链)供应商
'yunxin_expired' => null, 'yunxin_expired' => null,
//已过期(非云芯)供应商 //已过期(非芯链)供应商
'not_yunxin_expired' => null, 'not_yunxin_expired' => null,
//缺少平台合作协议(线上) //缺少平台合作协议(线上)
'no_cooperation_agreement' => null, 'no_cooperation_agreement' => null,
......
...@@ -14,6 +14,7 @@ class SupplierShareApplyTransformer ...@@ -14,6 +14,7 @@ class SupplierShareApplyTransformer
foreach ($list as &$item) { foreach ($list as &$item) {
$item['create_time'] = date('Y-m-d H:i:s', $item['create_time']); $item['create_time'] = date('Y-m-d H:i:s', $item['create_time']);
$item['status_name'] = array_get(config('field.SupplierShareApplyStatus'), $item['status']); $item['status_name'] = array_get(config('field.SupplierShareApplyStatus'), $item['status']);
$item['yunxin_channel_name'] = (new AdminUserService())->getAdminUserNameByCodeId($item['supplier']['yunxin_channel_uid']);
} }
unset($item); unset($item);
return $list; return $list;
......
...@@ -55,7 +55,7 @@ class SupplierAccountValidator ...@@ -55,7 +55,7 @@ class SupplierAccountValidator
{ {
return [ return [
'supplier_code.required' => '请选择一个供应商', 'supplier_code.required' => '请选择一个供应商',
'a_type.required' => '类型必须勾选为云芯商家', 'a_type.required' => '类型必须勾选为芯链商家',
'mobile.required' => '登录账号不能为空', 'mobile.required' => '登录账号不能为空',
'mobile.regex' => '账号格式必须为手机号', 'mobile.regex' => '账号格式必须为手机号',
'password_raw.required' => '账号密码不能为空', 'password_raw.required' => '账号密码不能为空',
......
...@@ -56,7 +56,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () { ...@@ -56,7 +56,7 @@ Route::group(['middleware' => ['web'], 'namespace' => 'Api'], function () {
Route::match(['get', 'post'], '/api/shipping_cost_ruler/{key}', 'ShippingCostRulerApiController@Entrance'); Route::match(['get', 'post'], '/api/shipping_cost_ruler/{key}', 'ShippingCostRulerApiController@Entrance');
//单独的统计接口 //单独的统计接口
Route::match(['get', 'post'], '/statisticsSkuNumber', function () { Route::match(['get', 'post'], '/statisticsSkuNumber', function () {
(new \App\Http\Services\DataService())->statisticsSkuNumber(); (new \App\Http\Services\DataService())->statisticsSkuNumberFromSKu();
}); });
}); });
...@@ -77,7 +77,10 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function () ...@@ -77,7 +77,10 @@ Route::group(['middleware' => ['external'], 'namespace' => 'Sync'], function ()
Route::match(['get', 'post'], '/test', function () { Route::match(['get', 'post'], '/test', function () {
(new \App\Http\Services\DataService())->exportSupplierByPurchaseAmount(); \App\Model\SupplierChannelModel::where('supplier_id',15385)->update([
'supplier_name' => 'Information And Communication Technology Group (Hongkong) Co., Limited'
]);
// (new \App\Http\Services\DataService())->initSkuRulers();
// (new \App\Http\Services\DataService())->initialMainBrandsLimit(); // (new \App\Http\Services\DataService())->initialMainBrandsLimit();
// (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler(); // (new \App\Http\Services\DataService())->initialMainBrandsToSkuRuler();
......
...@@ -68,7 +68,7 @@ return [ ...@@ -68,7 +68,7 @@ return [
'SupplierAccountType' => [ 'SupplierAccountType' => [
0 => '其它', 0 => '其它',
1 => '云芯商家' 1 => '芯链商家'
], ],
'AttachmentFields' => [ 'AttachmentFields' => [
...@@ -98,6 +98,8 @@ return [ ...@@ -98,6 +98,8 @@ return [
'ZiYingDepartmentId' => 51, 'ZiYingDepartmentId' => 51,
//60是本地的数据 //60是本地的数据
'LiangYingDepartmentIds' => [47, 60, 72], 'LiangYingDepartmentIds' => [47, 60, 72],
//运营部门id
'YunyingTopDepartmentId' => 9,
//等级显示对应数据 //等级显示对应数据
'LevelMap' => [ 'LevelMap' => [
...@@ -131,7 +133,7 @@ return [ ...@@ -131,7 +133,7 @@ return [
'OutsideContactType' => [ 'OutsideContactType' => [
1 => '人工上传', 1 => '人工上传',
2 => 'API对接', 2 => 'API对接',
3 => '云芯上传' 3 => '芯链上传'
], ],
//以下供应商为代购供应商,不要更改为临时的,保持为正式供应商 //以下供应商为代购供应商,不要更改为临时的,保持为正式供应商
...@@ -224,7 +226,7 @@ return [ ...@@ -224,7 +226,7 @@ return [
4 => '专营API', 4 => '专营API',
5 => '专营数据包', 5 => '专营数据包',
6 => '专营后台上传', 6 => '专营后台上传',
7 => '专营云芯上传', 7 => '专营芯链上传',
8 => '专营采集', 8 => '专营采集',
], ],
......
...@@ -55,7 +55,7 @@ return [ ...@@ -55,7 +55,7 @@ return [
'OutsideContactType' => [ 'OutsideContactType' => [
1 => 'API', 1 => 'API',
//2 => 'FTP', //2 => 'FTP',
3 => '云芯', 3 => '芯链',
], ],
'StockupTypeOld' => [ 'StockupTypeOld' => [
...@@ -65,7 +65,7 @@ return [ ...@@ -65,7 +65,7 @@ return [
7 => '联营-原厂直供', 7 => '联营-原厂直供',
2 => '自营-自采', 2 => '自营-自采',
4 => '自营-寄售', 4 => '自营-寄售',
// 5 => '联营-云芯商家', // 5 => '联营-芯链商家',
], ],
'StockupType' => [ 'StockupType' => [
...@@ -75,7 +75,7 @@ return [ ...@@ -75,7 +75,7 @@ return [
7 => '原厂直供', 7 => '原厂直供',
2 => '猎芯仓库', 2 => '猎芯仓库',
4 => '现货寄售', 4 => '现货寄售',
5 => '云芯商家', 5 => '芯链商家',
], ],
'SupplierPayType' => [ 'SupplierPayType' => [
...@@ -93,7 +93,7 @@ return [ ...@@ -93,7 +93,7 @@ return [
'SupplierApiType' => [ 'SupplierApiType' => [
1 => 'API', 1 => 'API',
2 => 'FTP', 2 => 'FTP',
3 => '云芯', 3 => '芯链',
], ],
...@@ -184,15 +184,15 @@ return [ ...@@ -184,15 +184,15 @@ return [
"skip" => 0,//1无需审核,0需要审核 "skip" => 0,//1无需审核,0需要审核
"audit_ruler" => [ "audit_ruler" => [
"1" => 1, //1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过 "1" => 1, //1=>1 如果其中一条数据型号与品牌都存在,value是1,代表需要审核;value是0,直接通过
"2" => 1, //依次类推类推 // "2" => 1, //依次类推类推
"3" => 1, // "3" => 1,
"4" => 1, // "4" => 1,
], ],
"name_map" => [ "name_map" => [
"1" => '型号与品牌已存在', "1" => '型号与品牌已存在',
"2" => '型号不存在,品牌存在', // "2" => '型号不存在,品牌存在',
"3" => '型号不存在,品牌不存在', // "3" => '型号不存在,品牌不存在',
"4" => '型号存在,品牌不存在', // "4" => '型号存在,品牌不存在',
] ]
], ],
...@@ -241,16 +241,16 @@ return [ ...@@ -241,16 +241,16 @@ return [
'pay_type_term' => '账期供应商', 'pay_type_term' => '账期供应商',
'all_channel_user_resigned' => '采购员全离职', 'all_channel_user_resigned' => '采购员全离职',
'uploaded_sku' => '历史平台合作供应商', 'uploaded_sku' => '历史平台合作供应商',
'not_yunxin' => '非云芯供应商', 'not_yunxin' => '非芯链供应商',
'not_yunxin_and_has_sku' => '已上架(非云芯)供应商', 'not_yunxin_and_has_sku' => '已上架(非芯链)供应商',
'not_yunxin_and_has_no_sku' => '已下架(非云芯)供应商', 'not_yunxin_and_has_no_sku' => '已下架(非芯链)供应商',
'yunxin' => '云芯供应商', 'yunxin' => '芯链供应商',
'yunxin_and_has_sku' => '已上架(云芯)供应商', 'yunxin_and_has_sku' => '已上架(芯链)供应商',
'yunxin_and_has_no_sku' => '已下架(云芯)供应商', 'yunxin_and_has_no_sku' => '已下架(芯链)供应商',
'yunxin_expired_at_days' => '3天内到期(云芯)供应商', 'yunxin_expired_at_days' => '3天内到期(芯链)供应商',
'not_yunxin_expired_at_days' => '3天内到期(非云芯)供应商', 'not_yunxin_expired_at_days' => '3天内到期(非芯链)供应商',
'yunxin_expired' => '已过期(云芯)供应商', 'yunxin_expired' => '已过期(芯链)供应商',
'not_yunxin_expired' => '已过期(非云芯)供应商', 'not_yunxin_expired' => '已过期(非芯链)供应商',
'no_cooperation_agreement' => '缺少平台合作协议(线上)', 'no_cooperation_agreement' => '缺少平台合作协议(线上)',
], ],
//Sku列表的罗盘对应菜单id //Sku列表的罗盘对应菜单id
......
...@@ -19,7 +19,7 @@ ...@@ -19,7 +19,7 @@
//不让选,也不隐藏 //不让选,也不隐藏
form.on('checkbox(stockup_type_filter)', function (data) { form.on('checkbox(stockup_type_filter)', function (data) {
if (data.elem.checked && data.elem.name === "stockup_type[5]") { if (data.elem.checked && data.elem.name === "stockup_type[5]") {
layer.msg('新增供应商没法设置为云芯账号类型,设置云芯账号要先去魔方系统配置阶梯系数', {icon: 5}) layer.msg('新增供应商没法设置为芯链账号类型,设置芯链账号要先去魔方系统配置阶梯系数', {icon: 5})
$('input[name="stockup_type[5]"]').next().click(); $('input[name="stockup_type[5]"]').next().click();
} }
}); });
......
...@@ -43,6 +43,7 @@ ...@@ -43,6 +43,7 @@
//点击校验按钮 //点击校验按钮
$('#check_apply_supplier_share').click(function () { $('#check_apply_supplier_share').click(function () {
$('#apply_reason_div').hide();
let supplierName = $('#supplier_name').val(); let supplierName = $('#supplier_name').val();
let url = '/api/supplier_share_apply/CheckApplySupplierShare'; let url = '/api/supplier_share_apply/CheckApplySupplierShare';
let data = { let data = {
...@@ -50,17 +51,25 @@ ...@@ -50,17 +51,25 @@
} }
let res = ajax(url,data); let res = ajax(url,data);
if (res.err_code === 0) { if (res.err_code === 0) {
//是否有sku采购
if (res.total > 0) {
$('#apply_audit_reason')
}
layer.msg(res.err_msg, {icon: 6}); layer.msg(res.err_msg, {icon: 6});
//设置对应的supplier_id,后端暂时放到res.count这个字段吧... //设置对应的supplier_id,后端暂时放到res.count这个字段吧...
let supplierId = res.count; let supplierId = res.count;
$('#supplier_id').val(supplierId); $('#supplier_id').val(supplierId);
//渲染下拉框 //渲染下拉框
let optionHtml = '<option value="">请选择一个部门</option>'; let optionHtml = '<option value="">请选择一个部门</option>';
$.each(res.data, function (index, value) { $.each(res.data.departments, function (index, value) {
optionHtml += "<option value='" + value.department_id + "'>" + value.department_name + "</option>" optionHtml += "<option value='" + value.department_id + "'>" + value.department_name + "</option>"
}) })
$('#apply_department_id').html(optionHtml); $('#apply_department_id').html(optionHtml);
form.render('select'); form.render('select');
let hasYunxinChannelUid = res.data.has_yunxin_channel_uid;
if (hasYunxinChannelUid) {
$('#apply_reason_div').show();
}
} else { } else {
layer.msg(res.err_msg, {icon: 5}); layer.msg(res.err_msg, {icon: 5});
} }
......
...@@ -29,7 +29,11 @@ ...@@ -29,7 +29,11 @@
} }
}, },
{ {
field: 'apply_department_name', title: '被申请部门', width: 150, align: 'center', templet: function (d) { field: 'apply_department_name',
title: '被申请部门',
width: 150,
align: 'center',
templet: function (d) {
return d.apply_department ? d.apply_department.department_name : ''; return d.apply_department ? d.apply_department.department_name : '';
} }
}, },
...@@ -41,23 +45,56 @@ ...@@ -41,23 +45,56 @@
, page: {} , page: {}
}); });
$(document).on('click', '.audit_supplier_share_apply', function () { table.on('tool(auditList)', function (obj) { //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
let status = $(this).attr('status'); var data = obj.data; //获得当前行数据
let id = $(this).val(); var layEvent = obj.event; //获得 lay-event 对应的值(也可以是表头的 event 参数对应的值)
let statusName = status === 'pass' ? '通过' : '拒绝'; var tr = obj.tr; //获得当前行 tr 的 DOM 对象(如果有的话)
layer.confirm('确定要' + statusName + '该申请吗?', function () { if (layEvent === 'pass' || layEvent === 'reject') { //查看
let url = '/api/supplier_share_apply/AuditSupplierShareApply'; let hasYunxinChannelUid = data.supplier.yunxin_channel_uid;
let result = ajax(url, { let statusName = layEvent === 'pass' ? '通过' : '拒绝';
status: status, let status = layEvent;
id: id, //没有芯链采购员
}); if (!hasYunxinChannelUid) {
if (result.err_code === 0) { layer.confirm('确定要' + statusName + '该申请吗?', function () {
layer.msg('审核成功', {icon: 6}) let url = '/api/supplier_share_apply/AuditSupplierShareApply';
table.reload('auditList'); let result = ajax(url, {
status: status,
id: data.id,
});
if (result.err_code === 0) {
layer.msg('审核成功', {icon: 6})
table.reload('auditList');
} else {
layer.msg(result.err_msg, {icon: 5})
}
});
} else { } else {
layer.msg(result.err_msg, {icon: 5}) layer.confirm('确定要' + statusName + '该申请吗?',{
area: ['700px', '500px'],
title: '确定要' + statusName + '该申请吗?',
content: '<div><div style="margin-left: 20px;margin-bottom: 20px"><p>该供应商有<span style="color: #D9001B">SKU采购员 : ' + data.yunxin_channel_name + '</span>,请确认是否同意<span style="color: #E85B2F">"' + data.apply_user.name + '"</span>的共用申请</p></div><div>' +
'<div class="layui-form-item"><label class="layui-form-label">申请原因 : </label><div class="layui-input-block"><textarea class="layui-textarea layui-disabled" disabled>' + data.apply_reason + '</textarea></div></div></div></div>',
btn: ['确定', '取消']
}, function (index) {
let url = '/api/supplier_share_apply/AuditSupplierShareApply';
let result = ajax(url, {
status: status,
id: data.id,
});
if (result.err_code === 0) {
layer.msg('审核成功', {icon: 6})
table.reload('auditList');
} else {
layer.msg(result.err_msg, {icon: 5})
}
}, function (index) {
// 取消按钮点击回调函数
layer.close(index);
});
return false;
} }
});
}
}); });
}); });
</script> </script>
\ No newline at end of file
...@@ -96,11 +96,11 @@ ...@@ -96,11 +96,11 @@
return; return;
} }
if (data[0].has_ladder_ratio !== 1 && data[0].has_ladder_ratio !== 1) { if (data[0].has_ladder_ratio !== 1 && data[0].has_ladder_ratio !== 1) {
layer.msg('请先设置该供应商为“云芯商家”,并且配置“阶梯系数”后,再进行审核操作', {icon: 5}); layer.msg('请先设置该供应商为“芯链商家”,并且配置“阶梯系数”后,再进行审核操作', {icon: 5});
return; return;
} }
if (data[0].is_yunxin !== 1) { if (data[0].is_yunxin !== 1) {
layer.msg('请先设置该供应商为“云芯商家”,再进行审核操作', {icon: 5}); layer.msg('请先设置该供应商为“芯链商家”,再进行审核操作', {icon: 5});
return; return;
} }
if (data[0].has_ladder_ratio !== 1) { if (data[0].has_ladder_ratio !== 1) {
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
type: 2, type: 2,
content: '/supplier_apply/AuditSupplierApply?view=iframe&id=' + id, content: '/supplier_apply/AuditSupplierApply?view=iframe&id=' + id,
area: ['800px', '600px'], area: ['800px', '600px'],
title: '云芯入驻审核', title: '芯链入驻审核',
end: function () { end: function () {
table.reload('supplierApplyList'); table.reload('supplierApplyList');
} }
...@@ -129,7 +129,7 @@ ...@@ -129,7 +129,7 @@
let hasLadderRatio = table.cache['supplierApplyList'][rowIndex].has_ladder_ratio; let hasLadderRatio = table.cache['supplierApplyList'][rowIndex].has_ladder_ratio;
let yunxinHtml = isYunxin ? '<i class="layui-icon layui-icon-ok-circle" style="color: limegreen"></i>' : '<i class="layui-icon layui-icon-close-fill" style="color: orangered"></i>'; let yunxinHtml = isYunxin ? '<i class="layui-icon layui-icon-ok-circle" style="color: limegreen"></i>' : '<i class="layui-icon layui-icon-close-fill" style="color: orangered"></i>';
let ratioHtml = hasLadderRatio ? '<i class="layui-icon layui-icon-ok-circle" style="color: limegreen"></i>' : '<i class="layui-icon layui-icon-close-fill" style="color:orangered"></i>'; let ratioHtml = hasLadderRatio ? '<i class="layui-icon layui-icon-ok-circle" style="color: limegreen"></i>' : '<i class="layui-icon layui-icon-close-fill" style="color:orangered"></i>';
let html = '<p>云芯商家 ' + yunxinHtml + '</p><p>阶梯系数 ' + ratioHtml + '</p>' let html = '<p>芯链商家 ' + yunxinHtml + '</p><p>阶梯系数 ' + ratioHtml + '</p>'
auditConditionTipsVal = layer.tips(html, self, { auditConditionTipsVal = layer.tips(html, self, {
tips: [3, "#555555"], tips: [3, "#555555"],
time: 1000000, time: 1000000,
......
...@@ -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');
} }
......
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
}); });
//点击云芯 //点击芯链
form.on('checkbox(stockup_type_filter)', function (data) { form.on('checkbox(stockup_type_filter)', function (data) {
if (data.elem.checked && data.elem.name === "stockup_type[5]") { if (data.elem.checked && data.elem.name === "stockup_type[5]") {
let url = '/api/supplier/checkHasLadderPriceSetting?supplier_id=' + getQueryVariable('supplier_id'); let url = '/api/supplier/checkHasLadderPriceSetting?supplier_id=' + getQueryVariable('supplier_id');
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
if (res.err_code === 0) { if (res.err_code === 0) {
} else { } else {
layer.msg('请先去魔方系统配置阶梯系数,再新建云芯账号', {icon: 5}) layer.msg('请先去魔方系统配置阶梯系数,再新建芯链账号', {icon: 5})
$('input[name="stockup_type[5]"]').next().click(); $('input[name="stockup_type[5]"]').next().click();
} }
}, },
......
...@@ -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');
} }
......
...@@ -32,7 +32,7 @@ ...@@ -32,7 +32,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="require">*</span>账号类型 : </label> <label class="layui-form-label"><span class="require">*</span>账号类型 : </label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="checkbox" name="a_type" title="云芯商家" lay-skin="primary" checked> <input type="checkbox" name="a_type" title="芯链商家" lay-skin="primary" checked>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
......
...@@ -4,26 +4,26 @@ ...@@ -4,26 +4,26 @@
} }
</style> </style>
<div class="layui-card"> <div class="layui-card">
{{-- <div class="layui-card-header" style="height: 90px">--}} {{-- <div class="layui-card-header" style="height: 90px">--}}
{{-- </div>--}} {{-- </div>--}}
<div class="layui-card-body"> <div class="layui-card-body">
<form class="layui-form" action=""> <form class="layui-form" action="">
<div class="layui-form-item"> <div class="layui-form-item">
<div class="layui-col-xs8"> <div class="layui-col-xs8">
<label class="layui-form-label"><span class="require">*</span>供应商名称 : <label class="layui-form-label"><span class="require">*</span>供应商名称 :
</label> </label>
<div class="layui-inline" style="width: 250px"> <div class="layui-inline" style="width: 250px">
<input type="text" id="supplier_name" <input type="text" id="supplier_name"
placeholder="请输入供应商名称进行校验" class="layui-input" placeholder="请输入供应商名称进行校验" class="layui-input"
value=""> value="">
</div>
<input type="hidden" name="supplier_id" id="supplier_id">
</div>
<div class="layui-col-xs4">
<button type="button" class="layui-btn layui-btn-sm" id="check_apply_supplier_share">校验</button>
</div> </div>
<input type="hidden" name="supplier_id" id="supplier_id">
</div> </div>
<div class="layui-col-xs4">
<button type="button" class="layui-btn layui-btn-sm" id="check_apply_supplier_share">校验</button>
</div>
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="require">*</span>被申请部门 : <label class="layui-form-label"><span class="require">*</span>被申请部门 :
</label> </label>
...@@ -33,6 +33,13 @@ ...@@ -33,6 +33,13 @@
</select> </select>
</div> </div>
</div> </div>
<div class="layui-form-item" style="display: none" id="apply_reason_div">
<label class="layui-form-label"><span class="require">*</span>申请原因 :
</label>
<div class="layui-input-block">
<textarea class="layui-textarea" name="apply_reason" placeholder="请填写申请原因"></textarea>
</div>
</div>
<div class="layui-form-item"> <div class="layui-form-item">
<div align="center" style="margin-top: 20px;text-align: right"> <div align="center" style="margin-top: 20px;text-align: right">
<button type="button" class="layui-btn layui-btn-sm layui-btn-info submit-loading" lay-submit <button type="button" class="layui-btn layui-btn-sm layui-btn-info submit-loading" lay-submit
......
...@@ -4,9 +4,9 @@ ...@@ -4,9 +4,9 @@
<table class="layui-table" id="auditList" lay-filter="auditList"></table> <table class="layui-table" id="auditList" lay-filter="auditList"></table>
<script type="text/html" id="operate"> <script type="text/html" id="operate">
<div> <div>
<button type="button" value="@{{ d.id}}" status="pass" class="layui-btn layui-btn-xs audit_supplier_share_apply">同意 <button type="button" value="@{{ d.id}}" status="pass" class="layui-btn layui-btn-xs audit_supplier_share_apply" lay-event="pass">同意
</button> </button>
<button type="button" value="@{{ d.id}}" status="reject" class="layui-btn layui-btn-xs layui-btn-danger audit_supplier_share_apply">拒绝 <button type="button" value="@{{ d.id}}" status="reject" class="layui-btn layui-btn-xs layui-btn-danger audit_supplier_share_apply" lay-event="reject">拒绝
</button> </button>
</div> </div>
</script> </script>
\ No newline at end of file
...@@ -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>
......
...@@ -27,7 +27,7 @@ ...@@ -27,7 +27,7 @@
是否有平台合作 : <span id="uploaded_sku"></span> 是否有平台合作 : <span id="uploaded_sku"></span>
</div> </div>
<div class="layui-col-md4"> <div class="layui-col-md4">
是否云芯商家 : <span id="is_yunxin_supplier"></span> 是否芯链商家 : <span id="is_yunxin_supplier"></span>
</div> </div>
</div> </div>
</form> </form>
......
...@@ -24,10 +24,12 @@ ...@@ -24,10 +24,12 @@
@if(checkPerm('TempTemp')) @if(checkPerm('TempTemp'))
<button type="button" class="layui-btn layui-btn-sm" id="add_supplier">新增</button> <button type="button" class="layui-btn layui-btn-sm" id="add_supplier">新增</button>
@endif @endif
@if(checkPerm('OperateSku')) @if (checkPerm('UpdateGoodsStatus'))
<button type="button" class="layui-btn layui-btn-sm" id="batch_putaway">上架</button> <button type="button" class="layui-btn layui-btn-sm" id="batch_putaway">上架</button>
<button type="button" class="layui-btn layui-btn-sm" id="batch_off_shelf">下架</button> <button type="button" class="layui-btn layui-btn-sm" id="batch_off_shelf">下架</button>
<button type="button" class="layui-btn layui-btn-sm" id="remote_batch_off_shelf">批量下架</button> <button type="button" class="layui-btn layui-btn-sm" id="remote_batch_off_shelf">批量下架</button>
@endif
@if(checkPerm('OperateSku'))
@if (checkPerm('BatchUpdateEncoded')) @if (checkPerm('BatchUpdateEncoded'))
<button type="button" class="layui-btn layui-btn-sm" id="batch_update_encoded">批量修改内部编码</button> <button type="button" class="layui-btn layui-btn-sm" id="batch_update_encoded">批量修改内部编码</button>
@endif @endif
......
...@@ -17,7 +17,7 @@ ...@@ -17,7 +17,7 @@
} }
</style> </style>
<div class="layui-card"> <div class="layui-card">
<div class="layui-card-header fix-top" style="box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.5);"> <div class="layui-card-header fix-top" style="box-shadow: 0 5px 5px -5px rgba(0, 0, 0, 0.5);">
<div class="layui-row"> <div class="layui-row">
<div class="layui-col-md2"> <div class="layui-col-md2">
<b>{{$supplier['supplier_name']}}</b> <b>{{$supplier['supplier_name']}}</b>
...@@ -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']}}">
...@@ -178,10 +178,10 @@ ...@@ -178,10 +178,10 @@
</div> </div>
<div class="layui-row"> <div class="layui-row">
<span class="required_field">*</span> 主营品牌 :{{$supplier['main_brand_names']}} <span class="required_field">*</span> 主营品牌 :{{$supplier['main_brand_names']}}
{{-- <div style="">--}} {{-- <div style="">--}}
{{-- 主营品牌数量--}} {{-- 主营品牌数量--}}
{{-- :{{$supplier['main_brands_limit']!=-1?$supplier['main_brands_limit']:'无限制'}}--}} {{-- :{{$supplier['main_brands_limit']!=-1?$supplier['main_brands_limit']:'无限制'}}--}}
{{-- </div>--}} {{-- </div>--}}
</div> </div>
@if($supplier['supplier_group'] == \App\Model\SupplierChannelModel::SUPPLIER_GROUP_MIX) @if($supplier['supplier_group'] == \App\Model\SupplierChannelModel::SUPPLIER_GROUP_MIX)
<div class="layui-row"> <div class="layui-row">
......
...@@ -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']}}">
......
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
<div class="layui-form-item"> <div class="layui-form-item">
<label class="layui-form-label"><span class="require">*</span>账号类型 : </label> <label class="layui-form-label"><span class="require">*</span>账号类型 : </label>
<div class="layui-input-block"> <div class="layui-input-block">
<input type="checkbox" name="a_type" title="云芯商家" lay-skin="primary" @if(!empty($account['a_type'])&&$account['a_type']==1) checked @endif> <input type="checkbox" name="a_type" title="芯链商家" lay-skin="primary" @if(!empty($account['a_type'])&&$account['a_type']==1) checked @endif>
</div> </div>
</div> </div>
<div class="layui-form-item"> <div class="layui-form-item">
......
...@@ -151,55 +151,55 @@ ...@@ -151,55 +151,55 @@
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="非云芯供应商" id="not_yunxin"> <a class="main_filter" title="非芯链供应商" id="not_yunxin">
云芯供应商 芯链供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="已上架(非云芯)供应商" id="not_yunxin_and_has_sku"> <a class="main_filter" title="已上架(非芯链)供应商" id="not_yunxin_and_has_sku">
已上架(非云芯)供应商 已上架(非芯链)供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="已下架(非云芯)供应商" id="not_yunxin_and_has_no_sku"> <a class="main_filter" title="已下架(非芯链)供应商" id="not_yunxin_and_has_no_sku">
已下架(非云芯)供应商 已下架(非芯链)供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="云芯供应商" id="yunxin"> <a class="main_filter" title="芯链供应商" id="yunxin">
云芯供应商 芯链供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="已上架(云芯)供应商" id="yunxin_and_has_sku"> <a class="main_filter" title="已上架(芯链)供应商" id="yunxin_and_has_sku">
已上架(云芯)供应商 已上架(芯链)供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="已下架(云芯)供应商" id="yunxin_and_has_no_sku"> <a class="main_filter" title="已下架(芯链)供应商" id="yunxin_and_has_no_sku">
已下架(云芯)供应商 已下架(芯链)供应商
</a> </a>
</div> </div>
</div> </div>
<div class="split-item" id="s8" style="text-align: center"> <div class="split-item" id="s8" style="text-align: center">
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="3天内到期(云芯)供应商" id="yunxin_expired_at_days"> <a class="main_filter" title="3天内到期(芯链)供应商" id="yunxin_expired_at_days">
3天内到期(云芯)供应商 3天内到期(芯链)供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="3天内到期(非云芯)供应商" id="not_yunxin_expired_at_days"> <a class="main_filter" title="3天内到期(非芯链)供应商" id="not_yunxin_expired_at_days">
3天内到期(非云芯)供应商 3天内到期(非芯链)供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="已过期(云芯)供应商" id="yunxin_expired"> <a class="main_filter" title="已过期(芯链)供应商" id="yunxin_expired">
已过期(云芯)供应商 已过期(芯链)供应商
</a> </a>
</div> </div>
<div class="layui-row"> <div class="layui-row">
<a class="main_filter" title="已过期(非云芯)供应商" id="not_yunxin_expired"> <a class="main_filter" title="已过期(非芯链)供应商" id="not_yunxin_expired">
已过期(非云芯)供应商 已过期(非芯链)供应商
</a> </a>
</div> </div>
</div> </div>
...@@ -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