wugg 2 years ago
parent
commit
e127490d6e

+ 3 - 0
app/admin/BaseController.php

@@ -13,6 +13,7 @@ class BaseController extends base{
     public  $uid='';
     public  $uname='';
     public  $roleid='';
+    public $invoiceType=[];
      public function __construct(App $app) {
          parent::__construct($app);
          $this->post =$this->request->post();
@@ -42,4 +43,6 @@ class BaseController extends base{
             }
             $this->roleid=$role['roleid'];
      }
+
+
 }

+ 42 - 0
app/admin/controller/InvCat.php

@@ -0,0 +1,42 @@
+<?php
+
+
+namespace app\admin\controller;
+use app\admin\BaseController;
+use think\App;
+use think\facade\Db;
+
+class InvCat extends BaseController{
+    public function __construct(App $app) {parent::__construct($app);}
+
+    public function AddGood(){
+
+    }
+
+    public function GoodList(){
+        $page =isset($this->post['page'])&&  $this->post['page']!="" ? intval($this->post['page']) :1;
+        $size =isset($this->post['size'])&&  $this->post['size']!="" ? intval($this->post['size']) :15;
+        $condition =[];
+        $spuCode=isset($this->post['spuCode'])&&$this->post['spuCode']!=''?trim($this->post['spuCode']):"";
+        if($spuCode!="") $condition[]=["spuCode","like","%$spuCode%"];
+        $good_name=isset($this->post['good_name'])&&$this->post['good_name']!=''?trim($this->post['good_name']):"";
+        if($good_name!="") $condition[]=["good_name","like","%$good_name%"];
+        $companyNo=isset($this->post['companyNo'])&&$this->post['companyNo']!=''?trim($this->post['companyNo']):"";
+        if($companyNo!="") $condition[]=["companyNo","like","%$companyNo%"];
+        $supplierNo=isset($this->post['supplierNo'])&&$this->post['supplierNo']!=''?trim($this->post['supplierNo']):"";
+        if($supplierNo!="") $condition[]=["supplierNo","like","%$supplierNo%"];
+         $creater=isset($this->post['creater'])&&$this->post['creater']!=''?trim($this->post['creater']):"";
+        if($creater!="") $condition[]=["creater","like","%$creater%"];
+        $count=Db::name("good")->where($condition)->count();
+        $total=ceil($count/$size);
+        $page = $page>=$total? intval($total):$page;
+        $list =Db::name("good")->where($condition)->order("addtime desc")->page($page,$size)->select()->toArray();
+        foreach ($list as &$value){
+            $company =Db::name("company_info")->where(["companyNo"=>$value['companyNo']])->find();
+            $value['companyName']=$company['company_name']??"";
+            $supplier =Db::name("supplier_info")->where(["code"=>$value["supplierNo"]])->find();
+            $value["supplierName"]=$supplier["name"]??"";
+        }
+        return app_show(0,"获取成功",["list"=>$list,"count"=>$count]);
+    }
+}

+ 1 - 1
app/admin/controller/OrderPay.php

@@ -41,7 +41,7 @@ class OrderPay extends BaseController{
                     Db::rollback();
                    return error_show(1004,"销售单核销金额不能为空");
                 }
-                $qrd =Db::name("qrd_info")->where("sequenceNo","=",$value['sequenceNo'])->field("id,status,pay_fee,wpay_fee,pay_status,totalPrice")->findOrEmpty();
+                $qrd =Db::name("qrd_info")->where("sequenceNo","=",$value['sequenceNo'])->field("id,customerNo,status,pay_fee,wpay_fee,pay_status,totalPrice")->findOrEmpty();
                 if(empty($qrd)){
                     Db::rollback();
                    return error_show(1004,"销售单信息未找到");

+ 2 - 2
app/admin/controller/Payment.php

@@ -895,7 +895,7 @@ class Payment extends BaseController
                 "apply_name"=>$this->uname,
                 "inv_fee"=> $subtotal_amount,
                 "invType"=> $type,
-                "invoiceType"=>0,
+                "invoiceType"=>'',
                 "inv_img"=>$invimg,
                 "invName"=>$invName,
                 "invoiceNumber"=>$invNumber,
@@ -924,7 +924,7 @@ class Payment extends BaseController
 
     /**
  * 发票审核状态
- *  0 上传发票,1待识别验证 2 待校验识别 3 待财务审核 6 待认证 7认证成功待确认完成 8回票完成 9识别失败 10 验证失败 11 财务驳回 12 认证失败
+ *  0 上传发票,1待识别验证 2 待校验识别 3 待财务审核 6 待认证 7认证成功待确认完成 8回票完成 9识别失败 10 验证失败 11 财务驳回 12 认证失败 13校验超过次数 第二天校验
      * @return \think\response\Json|void
      * @throws \think\db\exception\DataNotFoundException
      * @throws \think\db\exception\DbException