wupengfei 1 年之前
父節點
當前提交
3027dca9d7
共有 3 個文件被更改,包括 40 次插入7 次删除
  1. 5 4
      .idea/workspace.xml
  2. 1 3
      application/api/controller/Bill.php
  3. 34 0
      application/api/controller/Order.php

+ 5 - 4
.idea/workspace.xml

@@ -3,7 +3,8 @@
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/thinkphp/library/think/db/Query.php" beforeDir="false" afterPath="$PROJECT_DIR$/thinkphp/library/think/db/Query.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Bill.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Bill.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Order.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Order.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -418,7 +419,7 @@
       <workItem from="1694048197092" duration="22485000" />
       <workItem from="1694134843963" duration="47639000" />
       <workItem from="1694392543142" duration="23428000" />
-      <workItem from="1694480523673" duration="9639000" />
+      <workItem from="1694480523673" duration="9921000" />
     </task>
     <servers />
   </component>
@@ -568,10 +569,10 @@
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
     <state x="1166" y="605" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.2560.1400@0.0.2560.1400" timestamp="1687246001889" />
-    <state x="686" y="156" width="1407" height="1056" key="find.popup" timestamp="1694241733252">
+    <state x="686" y="156" width="1407" height="1056" key="find.popup" timestamp="1694499272246">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="686" y="156" width="1407" height="1056" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1694241733252" />
+    <state x="686" y="156" width="1407" height="1056" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1694499272246" />
     <state x="1282" y="549" key="ftp.server.browser" timestamp="1693012785412">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 1 - 3
application/api/controller/Bill.php

@@ -278,9 +278,7 @@ class Bill extends Base
      */
     public function getApplyInfo()
     {
-        $apply_info = BillApply::where('id',input('get.apply_id'))
-            ->where('user_id',$this->user_id)->where('is_deleted',0)
-            ->find()->toArray();
+        $apply_info = BillApply::where('id',input('get.apply_id'))->where('user_id',$this->user_id)->where('is_deleted',0)->find()->toArray();
         $apply_info['address_info']  =  $apply_info['address_info'] ? json_decode($apply_info['address_info'],true):null;
         $this->success('ok',['detail'=>$apply_info]);
     }

+ 34 - 0
application/api/controller/Order.php

@@ -1045,6 +1045,40 @@ class Order extends Base
 
 
 
+    /**
+     * @title 获取发票详情
+     * @desc 获取发票详情
+     * @author qc
+     * @url /api/Order/getBillInfo
+     * @method GET
+     * @param name:id type:int require default:-- desc:订单id
+     * @return name:id type:array default:-- desc:票详情id
+     * @return name:header type:string default:0 desc:抬头
+     * @return name:type_title type_title:int default:0 desc:发票类型
+     * @return name:email type:string default:0 desc:邮箱
+     * @return name:create_at type:string default:0 desc:申请时间
+     * @return name:phone type:string default:0 desc:电话
+     * @return name:status type:int default:0 desc:状态(0申请中1已开票2已完成)
+     * @return name:identify_number type:string default:0 desc:纳税人识别号
+     * @return name:send_type type:string default:1 desc:1点子发票2纸质发票
+     * @return name:remark type:string default:0 desc:备注
+     * @return name:bill_img type:string default:0 desc:点子发票【图片】
+     * @return name:bill_time type:string default:0 desc:开票时间
+     *
+     */
+
+    public function getBillInfo()
+    {
+        $info = BillApply::where(['order_type'=>2,'order_id'=>input('get.id')])
+            ->alias('b')->field('b.id,b.type,b.header,b.status,b.email,b.phone,b.bill_img,b.bill_time,b.remark,identify_number,b.create_at,t.title type_title,a.price_total money')
+            ->leftJoin('BillType t','t.id = b.type')
+            ->leftJoin('GoodsOrder a','a.id = b.order_id')
+            ->find();
+        if(empty($info)) $this->error('该订单未申请发票');
+        $info = $info->toArray();
+        $this->success('ok',['detail'=>$info]);
+    }
+