wugg пре 1 година
родитељ
комит
4d05128494
2 измењених фајлова са 11 додато и 5 уклоњено
  1. 7 2
      app/admin/controller/Good.php
  2. 4 3
      app/admin/controller/Payment.php

+ 7 - 2
app/admin/controller/Good.php

@@ -18,7 +18,8 @@ class Good extends Base
 	 */
     public function list(){
     	$param=$this->request->param(["spuCode"=>"","status"=>"","good_name"=>"",'companyNo'=>'','supplierNo'=>'',
-    	'creater'=>'','isZx'=>'',"cat_diff"=>"","tax_diff"=>"","is_diff"=>"","start"=>"",'end'=>'','page'=>'1',
+    	'creater'=>'','isZx'=>'','isChange'=>'',"cat_diff"=>"","tax_diff"=>"","is_diff"=>"","start"=>"",'end'=>'',
+    	'page'=>'1',
     	'size'=>'15'],"post","trim");
     	$where=[];
     	$param["spuCode"]==""?: $where[]=['spuCode','like',"%{$param['spuCode']}%"];
@@ -28,6 +29,7 @@ class Good extends Base
     	$param["creater"]==""?: $where[]=['creater','like',"%{$param['creater']}%"];
     	$param["status"]===""?: $where[]=['status','=',$param['status']];
     	$param["isZx"]==""?: $where[]=['isZx','=',$param['isZx']];
+    	$param["isChange"]===""?: $where[]=['isChange','=',$param['isChange']];
     	$param["is_diff"]==""?: $where[]=['cat_diff|tax_diff','=',2];
     	$param["cat_diff"]==""?: $where[]=['cat_diff','=',$param['cat_diff']];
     	$param["tax_diff"]==""?: $where[]=['tax_diff','=',$param['tax_diff']];
@@ -93,7 +95,10 @@ class Good extends Base
         	    $temp['cat_diff']= $temp['inv_cat_code']==$good->cgd_inv_cat_code?1:2;
         	}
         	$check = $this->checkChange($good,$temp);
-        	if(!empty($check))GoodChange::create($check);
+        	if(!empty($check)){
+        		GoodChange::create($check);
+        		$temp['isChange']=1;
+        	}
         	$examinfo=$good->exam_info;
         	$examinfo[]=['apply_name'=>$this->uname,'exam_status'=>$item['status'],"updatetime"=>date("Y-m-d H:i:s")];
         	$temp['exam_info'] = json_encode($examinfo,JSON_UNESCAPED_UNICODE);

+ 4 - 3
app/admin/controller/Payment.php

@@ -1245,10 +1245,12 @@ class Payment extends Base
             //$da_insert 批量新增的数据,$payNo_hpNo对账编码=>回票编码
             $da_insert = $payNo_hpNo = [];
             $date = date('Y-m-d H:i:s');
+            $unique=[];
             foreach ($param['list'] as $item) {
 
                 if (!$val->check($item)) throw new Exception($val->getError());
-
+				if(in_array($item['invoiceNumber'],$unique))throw new Exception("{$item['invoiceNumber']} 发票重复提交");
+                $unique[]=$item['invoiceNumber'];
                 if (!isset($payinfo[$item['payNo']])) throw new Exception('对账单数据未找到');
                 if ($payinfo[$item['payNo']]['status'] != 2) throw new Exception('对账单数据未完成审核');
 				$invamount=0;
@@ -1683,8 +1685,7 @@ class Payment extends Base
         }
     }
 	/**
-	* @return \think\
- * response\Json|void
+	* @return \think\|\think\response\Json|void
 	*/
     public function  ticketInfo(){
 		$num =isset($this->post['number'])&&$this->post['number']!=''?trim($this->post['number']):"";