Commit 088292e1 by 杨树贤

Merge branch 'ysx-CRM转化供应商流程-20260518' into Dev

parents fcd6035c dc83e83b
...@@ -10,4 +10,6 @@ Homestead.json ...@@ -10,4 +10,6 @@ Homestead.json
/vendor/_laravel_ide /vendor/_laravel_ide
/storage/framework/views /storage/framework/views
/storage /storage
CLAUDE.md CLAUDE.md
\ No newline at end of file /.windsurf
/skills-lock.json
...@@ -21,7 +21,6 @@ class SkuListFilter ...@@ -21,7 +21,6 @@ class SkuListFilter
$map = array_map(function ($item) { $map = array_map(function ($item) {
return trim($item); return trim($item);
}, $map); }, $map);
//dd($map);
//只获取专卖的数据 //只获取专卖的数据
$map['supplier_id'] = 17; $map['supplier_id'] = 17;
if ((!empty($map['create_time']))) { if ((!empty($map['create_time']))) {
...@@ -40,19 +39,20 @@ class SkuListFilter ...@@ -40,19 +39,20 @@ class SkuListFilter
$adminUserService = new AdminUserService(); $adminUserService = new AdminUserService();
$subordinateCodeIds = $adminUserService->getCodeIdsByUserIds($subordinateUserIds); $subordinateCodeIds = $adminUserService->getCodeIdsByUserIds($subordinateUserIds);
$subordinateCodeIds = $subordinateCodeIds->toArray(); $subordinateCodeIds = $subordinateCodeIds->toArray();
$map['encoded/eqs'] = implode(',', $subordinateCodeIds); // $map['encoded/eqs'] = implode(',', $subordinateCodeIds);
$supplierCodes = SupplierChannelModel::where(function ($query) use ($subordinateCodeIds) { $supplierCodes = SupplierChannelModel::where(function ($query) use ($subordinateCodeIds) {
$query->whereIn('purchase_uid', $subordinateCodeIds) $query->whereIn('purchase_uid', $subordinateCodeIds)
->orWhereRaw("channel_uid REGEXP '" . implode('|', $subordinateCodeIds) . "'"); ->orWhereRaw("channel_uid REGEXP '" . implode('|', $subordinateCodeIds) . "'");
})->whereNotNull('supplier_code')->where('supplier_code', '!=', '')->pluck('supplier_code')->toArray(); })->whereNotNull('supplier_code')->where('supplier_code', '!=', '')->pluck('supplier_code')->toArray();
if (!empty($supplierCodes)) { if (!empty($supplierCodes)) {
$map['canal_new/eqs'] = implode(',', $supplierCodes); $map['canal_new/eqs'] = implode(',', $supplierCodes);
} else { } else {
$map['canal_new/eqs'] = 'NO_MATCH'; $map['canal_new/eqs'] = 'NO_MATCH';
} }
} else { } else {
$map['encoded/condition'] = $codeId; // $map['encoded/condition'] = $codeId;
$supplierCodes = SupplierChannelModel::where(function ($query) use ($codeId) { $supplierCodes = SupplierChannelModel::where(function ($query) use ($codeId) {
$query->where('purchase_uid', $codeId) $query->where('purchase_uid', $codeId)
......
...@@ -237,7 +237,7 @@ class SupplierSyncController extends BaseSyncController ...@@ -237,7 +237,7 @@ class SupplierSyncController extends BaseSyncController
$phone = array_get($companyInfo, 'phone', ''); $phone = array_get($companyInfo, 'phone', '');
$establishedTime = array_get($companyInfo, 'establishment_time', ''); $establishedTime = array_get($companyInfo, 'establishment_time', '');
// legal_representative 从天眼查数据获取(如果有) // legal_representative 从天眼查数据获取(如果有)
$legalRepresentative = ''; $legalRepresentative = array_get($companyInfo, 'legal_representative', '');
$applyUid = !empty($data['apply_uid']) ? $data['apply_uid'] : 1000; $applyUid = !empty($data['apply_uid']) ? $data['apply_uid'] : 1000;
$applyName = (new AdminUserService())->getAdminUserNameByUserId($applyUid); $applyName = (new AdminUserService())->getAdminUserNameByUserId($applyUid);
// 2. 构建供应商数据 // 2. 构建供应商数据
......
...@@ -73,6 +73,7 @@ class CompanyService ...@@ -73,6 +73,7 @@ class CompanyService
$company = [ $company = [
'supplier_name' => $companyInfo['com_name'] == $supplierName ? $companyInfo['com_name'] : $companyInfo['en_com_name'], 'supplier_name' => $companyInfo['com_name'] == $supplierName ? $companyInfo['com_name'] : $companyInfo['en_com_name'],
'registered_capital' => (int)$companyInfo['registered_capital'], 'registered_capital' => (int)$companyInfo['registered_capital'],
'legal_representative' => isset($companyInfo['legal_representative']) ? $companyInfo['legal_representative'] : '',
'supplier_address' => $companyInfo['com_address'], 'supplier_address' => $companyInfo['com_address'],
'tax_number' => $companyInfo['tyc_info']['tax_number'], 'tax_number' => $companyInfo['tyc_info']['tax_number'],
'phone' => $companyInfo['tyc_info']['phone_number'], 'phone' => $companyInfo['tyc_info']['phone_number'],
......
...@@ -44,9 +44,7 @@ class SkuService extends BaseService ...@@ -44,9 +44,7 @@ class SkuService extends BaseService
die(); die();
} }
try { try {
// $return = curl($url, $map, 1); $return = curl($url, $map, 1);
$url = base64_encode($url . '?' . http_build_query($map));
$return = curl(config('website.FootstoneCurlUrl') . $url);
} catch (\Exception $e) { } catch (\Exception $e) {
return $e->getMessage(); return $e->getMessage();
} }
......
...@@ -79,7 +79,7 @@ ...@@ -79,7 +79,7 @@
@if(checkPerm('TransferSupplier')) @if(checkPerm('TransferSupplier'))
<button type="button" class="layui-btn layui-btn-sm" id="transfer_supplier">供应商交接</button> <button type="button" class="layui-btn layui-btn-sm" id="transfer_supplier">供应商交接</button>
@endif @endif
@if(checkPerm('ConfirmCrmSupplier') && checkPerm('ViewConfirmSupplier')) @if(checkPerm('ConfirmCrmSupplier'))
<button type="button" class="layui-btn layui-btn-sm" id="confirm_crm_supplier">确认客户转化供应商</button> <button type="button" class="layui-btn layui-btn-sm" id="confirm_crm_supplier">确认客户转化供应商</button>
@endif @endif
<button type="button" class="layui-btn layui-btn-sm layui-btn-normal" id="col_setting">展示列设置</button> <button type="button" class="layui-btn layui-btn-sm layui-btn-normal" id="col_setting">展示列设置</button>
......
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