更新到账管理
This commit is contained in:
parent
7522e871b2
commit
dcc2a64222
|
@ -178,11 +178,12 @@ class FinanceIncome extends ApiController
|
|||
//查看
|
||||
public function view()
|
||||
{
|
||||
$this->uid = JWT_UID;
|
||||
$id = empty(get_params('id')) ? 0 : get_params('id');
|
||||
$model = new Invoice();
|
||||
$detail = $model->detail($id);
|
||||
if(empty($detail)){
|
||||
throw new \think\exception\HttpException(406, '找不到记录');
|
||||
$this->apiError('到账信息不存在');
|
||||
}
|
||||
$detail['not_income'] = ($detail['amount']*100 - $detail['enter_amount']*100)/100;
|
||||
//已到账的记录
|
||||
|
@ -192,18 +193,17 @@ class FinanceIncome extends ApiController
|
|||
->where(['i.inid'=>$id,'i.status'=>1])
|
||||
->order('i.enter_time desc')
|
||||
->select();
|
||||
$detail['fileArray'] = [];
|
||||
if($detail['file_ids'] !=''){
|
||||
$fileArray = Db::name('File')->where('id','in',$detail['file_ids'])->select();
|
||||
$detail['fileArray'] = $fileArray;
|
||||
}
|
||||
|
||||
$detail['fileArrayOther'] = [];
|
||||
if($detail['other_file_ids'] !=''){
|
||||
$fileArrayOther = Db::name('File')->where('id','in',$detail['other_file_ids'])->select();
|
||||
$detail['fileArrayOther'] = $fileArrayOther;
|
||||
}
|
||||
View::assign('uid', $this->uid);
|
||||
View::assign('detail', $detail);
|
||||
return view();
|
||||
$this->apiSuccess('获取成功', $detail);
|
||||
}
|
||||
|
||||
//删除到账记录
|
||||
|
|
Loading…
Reference in New Issue