wupengfei 2 years ago
parent
commit
9cb94c467e
3 changed files with 60 additions and 6 deletions
  1. 7 6
      .idea/workspace.xml
  2. 38 0
      application/api/controller/Bill.php
  3. 15 0
      application/common/model/BillType.php

+ 7 - 6
.idea/workspace.xml

@@ -2,8 +2,9 @@
 <project version="4">
   <component name="ChangeListManager">
     <list default="true" id="1a36929e-c054-4875-a943-593a74e55fa4" name="Default Changelist" comment="">
+      <change afterPath="$PROJECT_DIR$/application/common/model/BillType.php" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/application/synth/controller/BillType.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/synth/controller/BillType.php" afterDir="false" />
+      <change beforePath="$PROJECT_DIR$/application/api/controller/Bill.php" beforeDir="false" afterPath="$PROJECT_DIR$/application/api/controller/Bill.php" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -121,7 +122,7 @@
   <component name="PropertiesComponent">
     <property name="RunOnceActivity.ShowReadmeOnStart" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/synth/view/bill_type" />
+    <property name="last_opened_file_path" value="$PROJECT_DIR$/application/common/model" />
     <property name="node.js.detected.package.eslint" value="true" />
     <property name="node.js.detected.package.tslint" value="true" />
     <property name="node.js.path.for.package.eslint" value="project" />
@@ -137,9 +138,9 @@
       <recent name="D:\zs\gaoyixia\application\api\controller" />
     </key>
     <key name="CopyFile.RECENT_KEYS">
+      <recent name="D:\zs\gaoyixia\application\common\model" />
       <recent name="D:\zs\gaoyixia\application\synth\view\bill_type" />
       <recent name="D:\zs\gaoyixia\application\api\controller" />
-      <recent name="D:\zs\gaoyixia\application\common\model" />
       <recent name="D:\zs\gaoyixia\application\operate\view\recruit" />
       <recent name="D:\zs\gaoyixia\application\operate\view\forum" />
     </key>
@@ -210,7 +211,7 @@
       <workItem from="1672793409629" duration="408000" />
       <workItem from="1672793834653" duration="24306000" />
       <workItem from="1672880479757" duration="22897000" />
-      <workItem from="1672966192005" duration="8714000" />
+      <workItem from="1672966192005" duration="9470000" />
     </task>
     <servers />
   </component>
@@ -373,10 +374,10 @@
     </state>
     <state x="875" y="449" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.1920.1040@0.0.1920.1040" timestamp="1665835639346" />
     <state x="1166" y="605" key="com.intellij.openapi.vcs.update.UpdateOrStatusOptionsDialogupdate-v2/0.0.2560.1400@0.0.2560.1400" timestamp="1672985282244" />
-    <state x="1057" y="460" width="746" height="548" key="find.popup" timestamp="1672985240209">
+    <state x="1057" y="460" width="746" height="548" key="find.popup" timestamp="1672987034068">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>
-    <state x="1057" y="460" width="746" height="548" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1672985240209" />
+    <state x="1057" y="460" width="746" height="548" key="find.popup/0.0.2560.1400@0.0.2560.1400" timestamp="1672987034068" />
     <state x="1291" y="317" key="run.anything.popup" timestamp="1672903043103">
       <screen x="0" y="0" width="2560" height="1400" />
     </state>

+ 38 - 0
application/api/controller/Bill.php

@@ -14,6 +14,7 @@
 // +----------------------------------------------------------------------
 
 namespace app\api\controller;
+use app\common\model\BillType;
 use app\common\model\ChinaArea;
 use think\Db;
 /**
@@ -34,6 +35,43 @@ class Bill extends Base
     }
 
 
+    /**
+     * @title 获取发票类型
+     * @desc  获取发票类型
+     * @author  qc
+     * @url /api/Bill/getBillType
+     * @method GET
+     * @header name:Authorization require:1 desc:Token
+     * @return name:id type:int default:-- desc:id
+     * @return name:title type:string default:0 desc:名称
+     */
+    public function getBillType()
+    {
+        $list  = BillType::getType();
+        $this->success('ok',['list'=>$list]);
+    }
+
+
+    /**
+     * @title 设置发票抬头
+     * @desc  设置发票抬头
+     * @author  qc
+     * @url /api/Bill/selBillHeader
+     * @method GET
+     * @header name:Authorization require:1 desc:Token
+     * @return name:id type:int default:-- desc:id
+     * @return name:title type:string default:0 desc:名称
+     * @return name:type type:int default:0 desc:类型id
+     * @return name:email type:string default:0 desc:邮箱
+     * @return name:phone type:string default:0 desc:电话
+     */
+    public function selBillHeader()
+    {
+
+    }
+
+
+
 
 
 

+ 15 - 0
application/common/model/BillType.php

@@ -0,0 +1,15 @@
+<?php
+namespace app\common\model;
+use think\Model;
+// 发票类型
+class BillType extends Model
+{
+
+    public static function getType()
+    {
+        return static::where(['is_deleted'=>0,'status'=>1])->select()->toArray();
+    }
+
+
+
+}