Merge branch 'feature/inv' into develop
This commit is contained in:
@@ -83,6 +83,6 @@ class InvRequisitionService
|
|||||||
//requisition_id:申请id
|
//requisition_id:申请id
|
||||||
//action:审批动作:1通过 2驳回
|
//action:审批动作:1通过 2驳回
|
||||||
//comment:审批意见
|
//comment:审批意见
|
||||||
return $appro->approve($param['requisition_id'], $param['approver_id'], $request->user->uid, $param['action'], $param['comment']);
|
return $appro->approve($param['requisition_id'], $param['approve_id'], $request->user->uid, $param['action'], $param['comment']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -128,7 +128,7 @@ class InvRequisitionApproveService
|
|||||||
// 已处理过?
|
// 已处理过?
|
||||||
$anyRecord = Db::table('inv_requisition_approve')
|
$anyRecord = Db::table('inv_requisition_approve')
|
||||||
->where('requisition_id', $requisitionId)
|
->where('requisition_id', $requisitionId)
|
||||||
->where('approver_id', $approverId)
|
->where('id', $approverId)
|
||||||
->first();
|
->first();
|
||||||
if ($anyRecord && $anyRecord->action > 0) {
|
if ($anyRecord && $anyRecord->action > 0) {
|
||||||
return ['status' => 'noop', 'msg' => '已处理'];
|
return ['status' => 'noop', 'msg' => '已处理'];
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ namespace app\mobile\controller;
|
|||||||
use app\common\controller\BaseController;
|
use app\common\controller\BaseController;
|
||||||
use app\common\model\Corp;
|
use app\common\model\Corp;
|
||||||
use app\common\model\InvItem;
|
use app\common\model\InvItem;
|
||||||
|
use app\common\model\InvRequisitionApprove;
|
||||||
use app\common\model\InvRequisitionAttachment;
|
use app\common\model\InvRequisitionAttachment;
|
||||||
use app\common\model\InvRequisitionItem;
|
use app\common\model\InvRequisitionItem;
|
||||||
use app\common\service\OssService;
|
use app\common\service\OssService;
|
||||||
@@ -92,6 +93,11 @@ class InvRequisitionController extends BaseController
|
|||||||
*/
|
*/
|
||||||
protected function showFormat($data)
|
protected function showFormat($data)
|
||||||
{
|
{
|
||||||
|
if (isset($data['id'])){
|
||||||
|
$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']);
|
||||||
if (isset($data['updated_at']))
|
if (isset($data['updated_at']))
|
||||||
|
|||||||
Reference in New Issue
Block a user