wugg 2 years ago
parent
commit
75c42861ff

+ 22 - 20
app/admin/controller/Menu.php

@@ -6,14 +6,16 @@ use think\App;
 use think\facade\Db;
 
 class Menu extends BaseController{
-    public function __construct(App $app) {parent::__construct($app);}
-/** 进入页面获取权限列表
-* @return \think\response\Json|void
-* @throws \think\db\exception\DataNotFoundException
-* @throws \think\db\exception\DbException
-* @throws \think\db\exception\ModelNotFoundException
- */
- public function MenuList(){
+    public function __construct(App $app) {
+    	parent::__construct($app);
+    }
+	/** 进入页面获取权限列表
+	* @return \think\response\Json|void
+	* @throws \think\db\exception\DataNotFoundException
+	* @throws \think\db\exception\DbException
+	* @throws \think\db\exception\ModelNotFoundException
+	 */
+    public function MenuList(){
 
         $role = Db::name("role_action")->where("role_id","=",$this->roleid)->find();
 
@@ -101,12 +103,12 @@ class Menu extends BaseController{
         return $result ? app_show(0,"添加成功"): error_show(1003,"添加失败");
     }
         /**菜单编辑或新建
-    * @return \think\response\Json|void
-    * @throws \think\db\exception\DataNotFoundException
-    * @throws \think\db\exception\DbException
-    * @throws \think\db\exception\ModelNotFoundException
+	    * @return \think\response\Json|void
+	    * @throws \think\db\exception\DataNotFoundException
+	    * @throws \think\db\exception\DbException
+	    * @throws \think\db\exception\ModelNotFoundException
      */
-        public function MenuEdit(){
+     public function MenuEdit(){
         $post  =$this->post;
         $id = isset($post['id']) ?intval($post['id']) :"";
         if($id!=""){
@@ -155,12 +157,12 @@ class Menu extends BaseController{
         return $result ? app_show(0,"{$message}成功"): error_show(1003,"{$message}失败");
     }
     /**菜单状态更新
-* @return \think\response\Json|void
-* @throws \think\db\exception\DataNotFoundException
-* @throws \think\db\exception\DbException
-* @throws \think\db\exception\ModelNotFoundException
- */
-      public function MenuStatus(){
+	* @return \think\response\Json|void
+	* @throws \think\db\exception\DataNotFoundException
+	* @throws \think\db\exception\DbException
+	* @throws \think\db\exception\ModelNotFoundException
+	 */
+    public function MenuStatus(){
         $post  =$this->post;
         $id = isset($post['id']) ?intval($post['id']) :"";
         $menu = Db::name("admin_menu")->where("id","=",$id)->find();
@@ -208,7 +210,7 @@ class Menu extends BaseController{
         return app_show(0,"获取成功",$data);
     }
         /** 菜单下功能信息修改*/
-        public function ActionSave(){
+    public function ActionSave(){
         $post  =$this->post;
         $actid = isset($post['id']) ? intval($post['id']) : "";
         if($actid==""){

+ 16 - 3
app/admin/controller/OrderInv.php

@@ -1006,8 +1006,7 @@ class OrderInv extends BaseController{
 									-totalPrice as JE,
 									1 HSBZ,
 									tax as SL,
-									-taxPrice as SE")
-									->select()->toArray();
+									-taxPrice as SE")->select()->toArray();
 					if(empty($goodinfo)){
 						Db::rollback();
 	                    return error_show(1004,"开票商品信息未找到");
@@ -1374,5 +1373,19 @@ class OrderInv extends BaseController{
         ->toArray();
         return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
     }
-
+	/**
+	* @return \think\response\Json|void
+	 */
+    public function ticketInfo(){
+       	$num =isset($this->post['number'])&&$this->post['number']!=''?trim($this->post['number']):"";
+		if($num==''){
+			return error_show(1004,'参数 number 不能为空');
+		}
+		$condition=[];
+		$condition[]=["number","=",$num];
+		$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
+		if($invNo!=='')$condition[]=["invNo","=",$invNo];
+		$info =Db::name("invoice_ticket")->where($condition)->findOrEmpty();
+		return app_show(0,"获取成功",$info);
+    }
 }

+ 19 - 0
app/admin/controller/Payment.php

@@ -1273,6 +1273,10 @@ class Payment extends BaseController
         $payinv["info"]=$invinfo;
         return app_show(0,'获取成功',$payinv);
     }
+    /**
+	* @return \think\response\Json|void
+	* @throws \think\db\exception\DbException
+	*/
     public  function UnPay(){
         $post = $this->post;
         $codeNo = isset($post['id'])&&$post['id']!=="" ? trim($post['id']) :'';
@@ -1286,4 +1290,19 @@ class Payment extends BaseController
             return error_show(1004,'更新失败');
         }
     }
+	/**
+	* @return \think\response\Json|void
+	*/
+    public function  ticketInfo(){
+		$num =isset($this->post['number'])&&$this->post['number']!=''?trim($this->post['number']):"";
+		if($num==''){
+			return error_show(1004,'参数 number 不能为空');
+		}
+		$condition=[];
+		$condition[]=["number","=",$num];
+		$invNo = isset($this->post['invNo'])&&$this->post['invNo']!=''?trim($this->post['invNo']):"";
+		if($invNo!=='')$condition[]=["hpNo","=",$invNo];
+		$info =Db::name("invoice_info")->where($condition)->findOrEmpty();
+		return app_show(0,"获取成功",$info);
+    }
 }

+ 2 - 0
app/admin/route/app.php

@@ -83,6 +83,7 @@ Route::rule("invadd","admin/Payment/invAdd");
 Route::rule("invstatus","admin/Payment/invStatus");
 Route::rule("invlist","admin/Payment/InvList");
 Route::rule("invdel","admin/Payment/invDel");
+Route::rule("cgdticket","admin/Payment/ticketInfo");
 
 Route::rule("orderinvadd","admin/OrderInv/create");
 Route::rule("orderinvstatus","admin/OrderInv/status");
@@ -98,6 +99,7 @@ Route::rule("applyred","admin/OrderInv/applyRed");
 Route::rule("batchapplyred","admin/OrderInv/batchApplyRed");
 Route::rule("redopen","admin/OrderInv/redOpen");
 Route::rule("redlist","admin/OrderInv/redList");
+Route::rule("orderticket","admin/OrderInv/ticketInfo");
 
 Route::rule("orderpayadd","admin/OrderPay/create");
 Route::rule("orderpaystatus","admin/OrderPay/status");