|
@@ -1906,4 +1906,30 @@ class OrderInv extends BaseController{
|
|
|
->toArray();
|
|
|
return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
|
}
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @return \think\response\Json|void
|
|
|
+ * @throws \think\db\exception\DataNotFoundException
|
|
|
+ * @throws \think\db\exception\DbException
|
|
|
+ * @throws \think\db\exception\ModelNotFoundException
|
|
|
+ */
|
|
|
+ public function tikcetList(){
|
|
|
+ $post=$this->request->only(["invNo"=>"","page"=>1,"size"=>15],"post","trim");
|
|
|
+ $where=[];
|
|
|
+ if($post["invNo"]!="") $where[]=["invNo","=",$post['invNo']];
|
|
|
+ $count=Db::name("invoice_ticket")->where($where)->count();
|
|
|
+ $total =ceil($count/$post['size']);
|
|
|
+ $page= $post['page']>$total ? intval($total):intval($post['page']);
|
|
|
+ $list = Db::name("invoice_ticket")
|
|
|
+ ->where($where)
|
|
|
+ ->json(["item"])
|
|
|
+ ->page($page,intval($post['size']))
|
|
|
+ ->order("id desc")
|
|
|
+ ->select()->toArray();
|
|
|
+ $typename=["004"=>"增值税专用发票",'007'=>"增值税普通发票",'026'=>'增值税电子普通发票','028'=>'增值税电子专用发票'];
|
|
|
+ foreach ($list as &$value){
|
|
|
+ $value['invtype_name'] = $typename[$value['inv_type']]??"";
|
|
|
+ }
|
|
|
+ return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
|
|
|
+ }
|
|
|
}
|