Commit 439a80ca by 杨树贤

fix

parent f4c8ca61
...@@ -124,42 +124,12 @@ class SupplierShareApplyApiController extends Controller ...@@ -124,42 +124,12 @@ class SupplierShareApplyApiController extends Controller
//获取共用审核列表 //获取共用审核列表
//1.审核分初审和复审 //1.审核分初审和复审
//2.有审核权限都可以看到这个列表 //2.有审核权限都可以看到这个列表
public function GetAuditSupplierShareApplyList($request) public function GetAuditSupplierShareApplyList2($request)
{ {
$applyService = new SupplierShareApplyService(); $applyService = new SupplierShareApplyService();
$userId = $request->user->userId; $userId = $request->user->userId;
$list = $applyService->getAuditSupplierShareApplyList($userId); $list = $applyService->getAuditSupplierShareApplyList($userId);
return $this->response(0, 'ok', $list['data'], $list['total']);
// 清除之前的输出缓冲
if (ob_get_level()) {
ob_end_clean();
}
// 开启新的输出缓冲
ob_start();
$response = [
'err_code' => 0,
'code' => 0,
'err_msg' => 'ok',
'data' => $list['data'],
'count' => $list['total'],
'total' => $list['total'],
];
echo json_encode($response);
// 获取缓冲内容长度
$content = ob_get_contents();
$length = strlen($content);
// 清除缓冲并设置响应头
ob_end_clean();
header('Content-Type: application/json; charset=utf-8');
header('Content-Length: ' . $length);
echo $content;
exit();
} }
//审核 //审核
......
...@@ -14,7 +14,7 @@ class SupplierShareApplyService ...@@ -14,7 +14,7 @@ class SupplierShareApplyService
{ {
public function getSupplierShareApplyList($userId) public function getSupplierShareApplyList($userId)
{ {
$applyModel = new SupplierShareApplyModel(); $applyModel = new SupplierShareApplyModel();
$limit = request()->get('limit', 10); $limit = request()->get('limit', 10);
$query = $applyModel::with([ $query = $applyModel::with([
...@@ -143,7 +143,7 @@ class SupplierShareApplyService ...@@ -143,7 +143,7 @@ class SupplierShareApplyService
$q->where('review_uid', 0)->where('audit_uid', '!=', 0) $q->where('review_uid', 0)->where('audit_uid', '!=', 0)
->where('status', SupplierShareApplyModel::STATUS_NEED_REVIEW); ->where('status', SupplierShareApplyModel::STATUS_NEED_REVIEW);
})->orderBy('id', 'desc'); })->orderBy('id', 'desc');
$limit = request()->get('limit', 20); $limit = request()->get('limit', 10);
$list = $query->paginate($limit)->toArray(); $list = $query->paginate($limit)->toArray();
$transformer = new SupplierShareApplyTransformer(); $transformer = new SupplierShareApplyTransformer();
$list['data'] = $transformer->transformList($list['data']); $list['data'] = $transformer->transformList($list['data']);
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
let table = layui.table let table = layui.table
table.render({ table.render({
elem: '#auditList' elem: '#auditList'
, url: '/api/supplier_share_apply/GetAuditSupplierShareApplyList' , url: '/api/supplier_share_apply/GetAuditSupplierShareApplyList2'
, method: 'post' , method: 'post'
, size: 'sm' , size: 'sm'
, limit: 10 , limit: 10
......
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