Merge branch 'feature/inv' into develop
This commit is contained in:
@@ -86,7 +86,9 @@ class InvRequisitionController extends BaseController
|
|||||||
protected function showFormat($data)
|
protected function showFormat($data)
|
||||||
{
|
{
|
||||||
if (isset($data['id'])){
|
if (isset($data['id'])){
|
||||||
$data['approve'] = InvRequisitionApprove::where('requisition_id', $data['id'])->get();
|
$data['approve'] = InvRequisitionApprove::where('requisition_id', $data['id'])->get()->toArray();
|
||||||
|
$approve_id = !empty($data['approve'])?array_pop($data['approve'])['id']:null;
|
||||||
|
$data['approve_id'] = $approve_id;
|
||||||
}
|
}
|
||||||
if (isset($data['created_at']))
|
if (isset($data['created_at']))
|
||||||
$data['created_at'] = date('Y-m-d H:i:s', $data['created_at']);
|
$data['created_at'] = date('Y-m-d H:i:s', $data['created_at']);
|
||||||
|
|||||||
@@ -147,7 +147,7 @@ class InvRequisitionService
|
|||||||
return $res;
|
return $res;
|
||||||
});
|
});
|
||||||
} catch (\Throwable $e) {
|
} catch (\Throwable $e) {
|
||||||
throw new BusinessException("创建物品申请失败:");
|
throw new BusinessException("创建物品申请失败:".$e->getMessage());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user