Commit d7ce6acf by 杨树贤

罗盘完成

parent e05f4b37
......@@ -303,20 +303,20 @@ class SupplierFilter
$q->whereRaw("system_tags REGEXP '客户指定供应商'");
});
break;
//附件里面缺少品质协议的
//附件里面缺少品质协议的,而且是现货类型供应商
case "no_quality_assurance_agreement":
$query->leftjoin('supplier_attachment', 'supplier_channel.supplier_id', '=',
'supplier_attachment.supplier_id')
->selectRaw('lie_supplier_channel.*,
lie_supplier_attachment.quality_assurance_agreement,lie_supplier_attachment.supplier_id as supplier_attachment_supplier_id')
->where(function ($q) {
$q->where('supplier_attachment.quality_assurance_agreement', '')
->orWhereNull('supplier_attachment.supplier_id');
});
$query->whereNotIn('status',
[SupplierChannelModel::STATUS_DISABLE, SupplierChannelModel::STATUS_BLOCK]);
//而且还是现货商类型的供应商
$query->where('supplier_group', 2);
// $query->leftjoin('supplier_attachments', 'supplier_channel.supplier_id', '=',
// 'supplier_attachments.supplier_id')
// ->selectRaw('lie_supplier_channel.*,
// lie_supplier_attachments.quality_assurance_agreement,lie_supplier_attachments.supplier_id as supplier_attachment_supplier_id')
// ->where(function ($q) {
// $q->where('supplier_attachments.quality_assurance_agreement', '')
// ->orWhereNull('supplier_attachment.supplier_id');
// });
// $query->whereNotIn('status',
// [SupplierChannelModel::STATUS_DISABLE, SupplierChannelModel::STATUS_BLOCK]);
// //而且还是现货商类型的供应商
// $query->where('supplier_group', 2);
break;
//联系人待完善
case "contact_no_complete":
......@@ -355,6 +355,45 @@ class SupplierFilter
$query->where('channel_uid', '!=', '')->where('is_type', 0)
->whereRaw(DB::raw("(channel_uid NOT REGEXP '$likeSqlRaw')"));
break;
case "uploaded_sku":
$query->where('uploaded_sku', 1);
break;
case "not_yunxin":
$query->where('stockup_type', 'NOT LIKE', '%5%');
break;
case "not_yunxin_and_has_sku":
$query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', '>', 0);
break;
case "not_yunxin_expired":
case "not_yunxin_and_has_no_sku":
$query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_num', 0);
break;
case "yunxin":
$query->where('stockup_type', 'LIKE', '%5%');
break;
case "yunxin_and_has_sku":
$query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', '>', 0);
break;
case "yunxin_expired":
case "yunxin_and_has_no_sku":
$query->where('stockup_type', 'LIKE', '%5%')->where('sku_num', 0);
break;
case "yunxin_expired_at_days":
$query->where('stockup_type', 'LIKE', '%5%')->where('sku_expired_in_days', '!=', 0);
break;
case "not_yunxin_expired_at_days":
$query->where('stockup_type', 'NOT LIKE', '%5%')->where('sku_expired_in_days', '!=', 0);
break;
case "no_quality_assurance_agreement_all":
$query->whereDoesntHave('attachment', function ($query) {
$query->where('field_name', 'quality_assurance_agreement');
})->where('uploaded_sku', '>', 0);
break;
case "no_cooperation_agreement":
$query->whereDoesntHave('attachment', function ($query) {
$query->where('field_name', 'cooperation_agreement');
})->where('uploaded_sku', '>', 0);
break;
}
return $query;
}
......
......@@ -32,6 +32,7 @@ class SkuService
$url = env('ES_SKU_URL', '');
$map['show_status'] = 1;
$return = curl($url, $map, 1);
$data = json_decode($return, true);
$list = [];
if (isset($data['error_code']) && $data['error_code'] == 0) {
......
......@@ -58,6 +58,8 @@ class SupplierStatisticsService
$payTypeTerm = $this->getStatisticsCount('pay_type_term');
//账期供应商
$levelA = $this->getStatisticsCount('level_a');
//缺少合作协议(线上)
//缺少品质协议(线上)
$result = [
'total' => $total,
'need_review' => $needReview,
......@@ -79,7 +81,32 @@ class SupplierStatisticsService
'history_abnormal' => $historyAbnormal,
'pay_type_term' => $payTypeTerm,
'level_a' => $levelA,
//所有采购员离职
'all_channel_user_resigned' => null,
//历史平台合作供应商
'uploaded_sku' => null,
// 非云芯供应商
'not_yunxin' => null,
//已上架(非云芯)供应商
'not_yunxin_and_has_sku' => null,
//已下架(非云芯)供应商
'not_yunxin_and_has_no_sku' => null,
//云芯供应商
'yunxin' => null,
//已上架(云芯)供应商
'yunxin_and_has_sku' => null,
//已下架(云芯)供应商
'yunxin_and_has_no_sku' => null,
//3天内到期(云芯)供应商
'yunxin_expired_at_days' => null,
//3天内到期(非云芯)供应商
'not_yunxin_expired_at_days' => null,
//已过期(云芯)供应商
'yunxin_expired' => null,
//已过期(非云芯)供应商
'not_yunxin_expired' => null,
//缺少合作协议(线上)
'no_cooperation_agreement' => null,
];
$result = array_map(function ($value) {
if ($value > 999) {
......
......@@ -240,6 +240,18 @@ return [
'level_a' => '战略供应商',
'pay_type_term' => '账期供应商',
'all_channel_user_resigned' => '采购员全离职',
'uploaded_sku' => '历史平台合作供应商',
'not_yunxin' => '非云芯供应商',
'not_yunxin_and_has_sku' => '已上架(非云芯)供应商',
'not_yunxin_and_has_no_sku' => '已下架(非云芯)供应商',
'yunxin' => '云芯供应商',
'yunxin_and_has_sku' => '已上架(云芯)供应商',
'yunxin_and_has_no_sku' => '已下架(云芯)供应商',
'yunxin_expired_at_days' => '3天内到期(云芯)供应商',
'not_yunxin_expired_at_days' => '3天内到期(非云芯)供应商',
'yunxin_expired' => '已过期(云芯)供应商',
'not_yunxin_expired' => '已过期(非云芯)供应商',
'no_cooperation_agreement' => '缺少合作协议(线上)',
],
//Sku列表的罗盘对应菜单id
'SkuListCompassMenuMap' => [
......
......@@ -3,7 +3,7 @@
let $ = layui.jquery;
let Split = layui.Split;
// 水平分割,需要分割的元素(id)、默认大小(百分比)、最小值(单位px)
Split(['#s1', '#s2', '#s3', '#s4', '#s5', '#s6', '#s7'], {sizes: [9, 12, 12, 12, 12, 12, 31], minSize: 70});
Split(['#s1', '#s2', '#s3', '#s4', '#s5', '#s6', '#s7','#s8'], {sizes: [9, 12, 12, 12, 12, 12, 12,19], minSize: 70});
let table = layui.table;
let form = layui.form;
let index = layui.index;
......
......@@ -6,7 +6,7 @@
<div class="layui-fluid" id="type_filter">
<div class="layui-card">
<div class="layui-card-body" style="padding: 0;">
<div class="split-group" style="height: 130px;">
<div class="split-group" style="height: 170px;">
<div class="split-item" id="s1">
<div class="layui-row">
<a class="main_filter layui-badge layui-bg-green" id="total"></a>
......@@ -57,14 +57,16 @@
@endif
@if(checkPerm('SupplierInvalidChannelUidList'))
<div class="layui-row">
<a title="非禁止交易状态联系人绑定的采购员姓名不在组织架构中(采购员离职)的供应商" class="main_filter"
<a title="非禁止交易状态联系人绑定的采购员姓名不在组织架构中(采购员离职)的供应商"
class="main_filter"
id="invalid_channel_uid">
</a>
</div>
@endif
@if(checkPerm('SupplierInvalidPurchaseUidList'))
<div class="layui-row">
<a title="非禁止交易状态联系人绑定的渠道开发员姓名不在组织架构中(渠道开发员离职)的供应商" class="main_filter"
<a title="非禁止交易状态联系人绑定的渠道开发员姓名不在组织架构中(渠道开发员离职)的供应商"
class="main_filter"
id="invalid_purchase_uid">
</a>
</div>
......@@ -78,7 +80,8 @@
<div class="split-item" id="s4" style="text-align: center">
@if(checkPerm('SupplierToFollowUpList'))
<div class="layui-row">
<a title="非禁止交易状态的供应商重新分配渠道员,且必填信息不完整;或者禁用状态的供应商重新分配渠道员" class="main_filter"
<a title="非禁止交易状态的供应商重新分配渠道员,且必填信息不完整;或者禁用状态的供应商重新分配渠道员"
class="main_filter"
id="to_follow_up">
</a>
</div>
......@@ -90,7 +93,8 @@
</div>
@endif
<div class="layui-row">
<a title="公司性质为现货商性质的供应商没有上传品质协议" class="main_filter" id="no_quality_assurance_agreement">
<a title="公司性质为现货商性质的供应商没有上传品质协议" class="main_filter"
id="no_quality_assurance_agreement">
</a>
</div>
<div class="layui-row">
......@@ -129,16 +133,82 @@
<a class="main_filter" title="账期供应商" id="pay_type_term">
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="缺少合作协议(线上)" id="no_cooperation_agreement">
缺少合作协议(线上)
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="缺少品质协议(线上)" id="no_quality_assurance_agreement_all">
缺少品质协议(线上)
</a>
</div>
</div>
<div class="split-item" id="s7" style="text-align: center">
<div class="layui-row">
<a class="main_filter" title="历史平台合作供应商" id="uploaded_sku">
历史平台合作供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="非云芯供应商" id="not_yunxin">
非云芯供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="已上架(非云芯)供应商" id="not_yunxin_and_has_sku">
已上架(非云芯)供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="已下架(非云芯)供应商" id="not_yunxin_and_has_no_sku">
已下架(非云芯)供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="云芯供应商" id="yunxin">
云芯供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="已上架(云芯)供应商" id="yunxin_and_has_sku">
已上架(云芯)供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="已下架(云芯)供应商" id="yunxin_and_has_no_sku">
已下架(云芯)供应商
</a>
</div>
</div>
<div class="split-item" id="s8" style="text-align: center">
<div class="layui-row">
<a class="main_filter" title="3天内到期(云芯)供应商" id="yunxin_expired_at_days">
3天内到期(云芯)供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="3天内到期(非云芯)供应商" id="not_yunxin_expired_at_days">
3天内到期(非云芯)供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="已过期(云芯)供应商" id="yunxin_expired">
已过期(云芯)供应商
</a>
</div>
<div class="layui-row">
<a class="main_filter" title="已过期(非云芯)供应商" id="not_yunxin_expired">
已过期(非云芯)供应商
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div class="layui-collapse">
@if(checkPerm('ViewFilter'))
@if(checkPerm('ViewFilter'))
<!--通用的筛选-->
<form class="layui-form" style="margin-top: 15px">
<?php
......
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