|
@@ -169,7 +169,7 @@ class Payinv extends Base{
|
|
|
'relaComNo|关联公司' => 'requireWithout:companyNo|max:255',
|
|
|
'companyNo|公司编号' => 'requireWithout:relaComNo|max:255',
|
|
|
]);
|
|
|
- if ($valid->check($post) == false) return error_show(1004, $valid->getError());
|
|
|
+ if ($valid->check($post) == false) return error($valid->getError());
|
|
|
$companyNo = $post['relaComNo'] ?: $post['companyNo'];
|
|
|
$payArr = $this->model
|
|
|
->alias('a')
|
|
@@ -185,8 +185,8 @@ class Payinv extends Base{
|
|
|
]);
|
|
|
$unique=[];
|
|
|
foreach ($post['list'] as $item) {
|
|
|
- if (!$val_hpNo->check($item)) return error_show(1004, $val_hpNo->getError());
|
|
|
- if(in_array($item['hpNo'],$unique))return error_show(1004, "{$item['hpNo']} 发票重复提交");
|
|
|
+ if (!$val_hpNo->check($item)) return error($val_hpNo->getError());
|
|
|
+ if(in_array($item['hpNo'],$unique))return error("{$item['hpNo']} 发票重复提交");
|
|
|
$unique[]=$item['hpNo'];
|
|
|
}
|
|
|
$this->model->startTrans();
|
|
@@ -209,9 +209,9 @@ class Payinv extends Base{
|
|
|
$this->model->commit();
|
|
|
} catch (\Exception $e) {
|
|
|
$this->model->rollback();
|
|
|
- return error_show(1004, $e->getMessage());
|
|
|
+ return error( $e->getMessage());
|
|
|
}
|
|
|
- return app_show(0, '回票申请认证成功');
|
|
|
+ return success('回票申请认证成功');
|
|
|
}
|
|
|
public function Back(){
|
|
|
$param= $this->request->param(['hpNo'=>'','reason'=>''],'post','trim');
|