Commit bece04e5 by mushishixian

fixbug

parent afd52278
...@@ -36,6 +36,9 @@ class SupplierShareApplyApiController extends Controller ...@@ -36,6 +36,9 @@ class SupplierShareApplyApiController extends Controller
if (empty($supplier)) { if (empty($supplier)) {
$this->response(-1, '该供应商名称不存在,请输入正确供应商名称'); $this->response(-1, '该供应商名称不存在,请输入正确供应商名称');
} }
if (empty($supplier['create_uid']) && empty($supplier['channel_uid']) && empty($supplier['purchase_uid'])) {
$this->response(-1, '该供应商没有相关的所属人信息,请联系管理员');
}
$applyService = new SupplierShareApplyService(); $applyService = new SupplierShareApplyService();
$departments = $applyService->getApplyCanUseDepartments($supplier); $departments = $applyService->getApplyCanUseDepartments($supplier);
//获取当前人的部门id,如果部门列表里面包含自己的部门,则提示该供应商属于自己部门,请找主管分配 //获取当前人的部门id,如果部门列表里面包含自己的部门,则提示该供应商属于自己部门,请找主管分配
......
...@@ -59,6 +59,9 @@ class SupplierShareApplyService ...@@ -59,6 +59,9 @@ class SupplierShareApplyService
} }
} }
} }
$allDepartments = array_filter($allDepartments, function ($department) {
return !empty($department);
});
return $allDepartments; return $allDepartments;
} }
......
...@@ -41,9 +41,9 @@ ...@@ -41,9 +41,9 @@
</div> </div>
<div class="layui-col-md2"> <div class="layui-col-md2">
合作类型 : 合作类型 :
@if (mb_strlen($supplier['stockup_type_name'])>20) @if (mb_strlen($supplier['stockup_type_name'])>15)
<span title="{{$supplier['stockup_type_name']}}"> <span title="{{$supplier['stockup_type_name']}}">
{{mb_substr($supplier['stockup_type_name'],0,20)}}... {{mb_substr($supplier['stockup_type_name'],0,15)}}...
</span> </span>
@else @else
{{$supplier['stockup_type_name']}} {{$supplier['stockup_type_name']}}
......
...@@ -50,9 +50,9 @@ ...@@ -50,9 +50,9 @@
</div> </div>
<div class="layui-col-md2"> <div class="layui-col-md2">
合作类型 : 合作类型 :
@if (mb_strlen($supplier['stockup_type_name'])>20) @if (mb_strlen($supplier['stockup_type_name'])>15)
<span title="{{$supplier['stockup_type_name']}}"> <span title="{{$supplier['stockup_type_name']}}">
{{mb_substr($supplier['stockup_type_name'],0,20)}}... {{mb_substr($supplier['stockup_type_name'],0,15)}}...
</span> </span>
@else @else
{{$supplier['stockup_type_name']}} {{$supplier['stockup_type_name']}}
......
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