|
@@ -616,18 +616,24 @@ class OrderInv extends BaseController{
|
|
|
* @throws \think\db\exception\DbException
|
|
|
*/
|
|
|
public function batchCheck(){
|
|
|
- $param =$this->request->only(["invNos"=>[],"status"=>'',"open_type"=>0],"post");
|
|
|
+ $param =$this->request->only(["invNos"=>[],"status"=>'',"open_type"=>0,"remark"=>''],"post");
|
|
|
$valid=Validate::rule([
|
|
|
"invNos|发票编号"=>"require|array",
|
|
|
"status|审核状态"=>"require|number|in:2,8",
|
|
|
- "open_type|审核状态"=>"require|number|in:0,1,2,3",
|
|
|
+ "open_type|开票方式"=>"require|number|in:0,1,2,3",
|
|
|
+ "remark|审核备注"=>"max:255",
|
|
|
]);
|
|
|
if($valid->check($param)==false) return error_show(1004,$valid->getError());
|
|
|
$list =Db::name("invoice_pool")->where(["invNo"=>$param['invNos'],"status"=>1,"is_del"=>0])->column("id");
|
|
|
if(empty($list)) return error_show(1004,"未找到有效数据");
|
|
|
$up =Db::name("invoice_pool")
|
|
|
->where(["id"=>$list,"status"=>1,"is_del"=>0])
|
|
|
- ->update(["status"=>$param['status'],"open_type"=>$param['open_type'],"updatetime"=>date("Y-m-d H:i:s")]);
|
|
|
+ ->update([
|
|
|
+ "status"=>$param['status'],
|
|
|
+ "open_type"=>$param['open_type'],
|
|
|
+ "exam_remark"=>$param['exam_remark'],
|
|
|
+ "updatetime"=>date("Y-m-d H:i:s")
|
|
|
+ ]);
|
|
|
if($up==false) return error_show(1004,"数据审核失败");
|
|
|
return app_show(0,"数据审核成功");
|
|
|
}
|