Commit 088292e1 by 杨树贤

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

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