Commit 57bfa062 by 杨树贤

Merge branch 'master' into ysx-供应商需求-20250723

parents 14861efa 51cdff1d
...@@ -44,9 +44,16 @@ class SkuService extends BaseService ...@@ -44,9 +44,16 @@ class SkuService extends BaseService
$data = json_decode($return, true); $data = json_decode($return, true);
$list = []; $list = [];
if (isset($data['error_code']) && $data['error_code'] == 0) { if (isset($data['error_code']) && $data['error_code'] == 0) {
$url = config('website.GoodsServerUrl').'/synchronization?goods_id='.implode(',', $data['data']['goods_id']);
$return = curl($url, $map, 1);
$skuListData = json_decode($return, true);
if (isset($skuListData['errcode']) && $skuListData['errcode'] == 0) {
$skuListData = collect($skuListData['data'])->keyBy('goods_id')->toArray();
}
$redis = new RedisModel; $redis = new RedisModel;
//处理供应商 //处理供应商
$spuRedis = Redis::connection('spu'); $spuRedis = Redis::connection('spu');
//商品服务获取数据
foreach ($data['data']['goods_id'] as $k => $goodsId) { foreach ($data['data']['goods_id'] as $k => $goodsId) {
$uploadItemService = new SkuUploadItemService(); $uploadItemService = new SkuUploadItemService();
$auditData = $uploadItemService->getSkuAuditData($data['data']['goods_id']); $auditData = $uploadItemService->getSkuAuditData($data['data']['goods_id']);
...@@ -97,7 +104,11 @@ class SkuService extends BaseService ...@@ -97,7 +104,11 @@ class SkuService extends BaseService
$standardBrand = json_decode($standardBrand, true); $standardBrand = json_decode($standardBrand, true);
$sku['standard_brand_name'] = $standardBrand['brand_name']; $sku['standard_brand_name'] = $standardBrand['brand_name'];
} }
$skuData = array_get($skuListData, $sku['goods_id'], []);
$sku['goods_tag_names'] = '';
if (!empty($skuData['goods_tag']['goods_tag_names'])) {
$sku['goods_tag_names'] = implode(',', $skuData['goods_tag']['goods_tag_names']);
}
//获取价格 //获取价格
$moqPrice = []; $moqPrice = [];
if (!empty($sku['ladder_price'])) { if (!empty($sku['ladder_price'])) {
......
...@@ -196,7 +196,7 @@ class SupplierService ...@@ -196,7 +196,7 @@ class SupplierService
$channel['channel_uid'] = $contact['can_check_uids']; $channel['channel_uid'] = $contact['can_check_uids'];
$channel['sku_upload_ruler'] = $this->getInitSkuUploadRuler(); $channel['sku_upload_ruler'] = $this->getInitSkuUploadRuler();
$channel['sku_optional_batch'] = 1;
//插入供应商返回供应商id //插入供应商返回供应商id
$supplierId = $this->newSupplierId = $model->insertGetId($channel); $supplierId = $this->newSupplierId = $model->insertGetId($channel);
......
...@@ -175,7 +175,7 @@ class SupplierTagService ...@@ -175,7 +175,7 @@ class SupplierTagService
$result = []; $result = [];
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$result[] = [ $result[] = [
'goods_label' => config('field.SkuGoodsLabel')[$key], 'goods_label' => isset(config('field.SkuGoodsLabel')[$key]) ? config('field.SkuGoodsLabel')[$key] : '',
'system_tags' => implode(',', $value['system_tags']), 'system_tags' => implode(',', $value['system_tags']),
]; ];
} }
...@@ -193,7 +193,7 @@ class SupplierTagService ...@@ -193,7 +193,7 @@ class SupplierTagService
$result = []; $result = [];
foreach ($data as $key => $value) { foreach ($data as $key => $value) {
$result[] = [ $result[] = [
'goods_source' => config('field.SkuGoodsLabel')[$key], 'goods_source' => isset(config('field.SkuSource')[$key]) ? config('field.SkuSource')[$key] : '',
'system_tags' => implode(',', $value['system_tags']), 'system_tags' => implode(',', $value['system_tags']),
]; ];
} }
...@@ -203,7 +203,7 @@ class SupplierTagService ...@@ -203,7 +203,7 @@ class SupplierTagService
//批量更新供应商的SKU显示类型 //批量更新供应商的SKU显示类型
public function batchSaveGoodsLabelTags($goodsLabel, $goodsLabelSystemTags) public function batchSaveGoodsLabelTags($goodsLabel, $goodsLabelSystemTags)
{ {
$goodsLabelSystemTags = explode(',', $goodsLabelSystemTags); $goodsLabelSystemTags = $goodsLabelSystemTags ? explode(',', $goodsLabelSystemTags) : [];
$data = [ $data = [
'system_tags' => $goodsLabelSystemTags, 'system_tags' => $goodsLabelSystemTags,
]; ];
...@@ -215,7 +215,7 @@ class SupplierTagService ...@@ -215,7 +215,7 @@ class SupplierTagService
//批量更新供应商的SKU接入方式 //批量更新供应商的SKU接入方式
public function batchSaveGoodsSourceTags($goodsSource, $goodsSourceSystemTags) public function batchSaveGoodsSourceTags($goodsSource, $goodsSourceSystemTags)
{ {
$goodsSourceSystemTags = explode(',', $goodsSourceSystemTags); $goodsSourceSystemTags = $goodsSourceSystemTags ? explode(',', $goodsSourceSystemTags) : [];
$data = [ $data = [
'system_tags' => $goodsSourceSystemTags, 'system_tags' => $goodsSourceSystemTags,
]; ];
......
...@@ -336,10 +336,10 @@ class SupplierValidator ...@@ -336,10 +336,10 @@ class SupplierValidator
$errorMessageList[] = "存在和你相关的联系人没有完善,请先去完善相关联系人"; $errorMessageList[] = "存在和你相关的联系人没有完善,请先去完善相关联系人";
} }
//还要校验sku可选批次 ////还要校验sku可选批次
if (!$validateData['sku_optional_batch']) { //if (!$validateData['sku_optional_batch']) {
$errorMessageList[] = "请设置SKU可选批次,在SKU概况栏"; // $errorMessageList[] = "请设置SKU可选批次,在SKU概况栏";
} //}
} }
return implode('|', $errorMessageList); return implode('|', $errorMessageList);
......
...@@ -45,5 +45,6 @@ return [ ...@@ -45,5 +45,6 @@ return [
'CrmUrl' => env('CRM_URL'), 'CrmUrl' => env('CRM_URL'),
'SkipSendEmail' => env('skip_send_email'), 'SkipSendEmail' => env('skip_send_email'),
'CubeUrl' => env('CUBE_URL'), 'CubeUrl' => env('CUBE_URL'),
'FootstoneCurlUrl' => 'http://footstone.liexindev.net/open/curl?url=' 'FootstoneCurlUrl' => 'http://footstone.liexindev.net/open/curl?url=',
'GoodsServerUrl' => 'http://192.168.1.237:60014'
]; ];
...@@ -223,7 +223,9 @@ ...@@ -223,7 +223,9 @@
} else { } else {
let msg = '确定直接申请审核吗?确定后会直接进入审核中的状态,审核完成前无法进行二次修改'; let msg = '确定直接申请审核吗?确定后会直接进入审核中的状态,审核完成前无法进行二次修改';
//未上传品质保证协议(代理商则提示为“未上传代理证”),是否需要切换为临时供应商? //未上传品质保证协议(代理商则提示为“未上传代理证”),是否需要切换为临时供应商?
layer.confirm(msg, function (index) { layer.confirm(msg, {
offset: ['100px'] // 第一个参数是距离页面顶部距离
}, function (index) {
addSupplier(data); addSupplier(data);
}); });
} }
......
...@@ -85,10 +85,7 @@ ...@@ -85,10 +85,7 @@
// 检查是否选择了系统标签 // 检查是否选择了系统标签
if (!data.field.goods_label_system_tags || data.field.goods_label_system_tags === '') { if (!data.field.goods_label_system_tags || data.field.goods_label_system_tags === '') {
layer.msg('请选择系统标签', {
icon: 5
});
return false;
} }
return true; return true;
...@@ -107,10 +104,7 @@ ...@@ -107,10 +104,7 @@
// 检查是否选择了系统标签 // 检查是否选择了系统标签
if (!data.field.goods_source_system_tags || data.field.goods_source_system_tags === '') { if (!data.field.goods_source_system_tags || data.field.goods_source_system_tags === '') {
layer.msg('请选择系统标签', {
icon: 5
});
return false;
} }
return true; return true;
......
...@@ -156,12 +156,8 @@ ...@@ -156,12 +156,8 @@
} }
}, },
{ {
field: 'sku_tags', title: '标签', align: 'center', width: 150, templet: function (data) { field: 'goods_tag_names', title: '标签', align: 'center', width: 150, templet: function (data) {
if (data.invalid_sku_tags) { return data.goods_tag_names;
return `<span>${data.valid_sku_tags}</span>` + ` <span style="color: #D7D7D7">${data.invalid_sku_tags}</span>`;
} else {
return `<span>${data.valid_sku_tags}</span>`
}
} }
}, },
{field: 'ability_level_name', title: '履约程度', align: 'center', width: 80,templet: function (data) { {field: 'ability_level_name', title: '履约程度', align: 'center', width: 80,templet: function (data) {
......
...@@ -148,7 +148,9 @@ ...@@ -148,7 +148,9 @@
}, },
}); });
} else { } else {
layer.confirm('确定直接申请审核吗?确定后会直接进入审核中的状态,审核完成前无法进行二次修改', function (index) { layer.confirm('确定直接申请审核吗?确定后会直接进入审核中的状态,审核完成前无法进行二次修改',{
offset: ['100px'] // 第一个参数是距离页面顶部距离
}, function (index) {
updateSupplier(data); updateSupplier(data);
}); });
} }
...@@ -190,4 +192,4 @@ ...@@ -190,4 +192,4 @@
} }
}); });
</script> </script>
\ No newline at end of file
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