wugg 8 miesięcy temu
rodzic
commit
aa46b5b2d0

+ 3 - 2
app/admin/controller/Export.php

@@ -223,7 +223,8 @@ class Export extends Base
     public function orderPayExport()
     {
         $param = $this->request->only(['start' => '', 'end' => '', 'name' => '', 'bank' => '', 'status' => '', 'tradNo' => '', 'company' => '', 'userd_lower' => '', 'used_upper' => ''], 'post', 'trim');
-        $where = [['a.is_del', '=', 0]];
+        $where = [['a.is_del', '=', 0],['b.is_del', '=', 0],['d.is_del', '=', 0],['d.is_del', '=', 0],["c.type","=",
+        2],["c.status","in",[1,2]]];
         if (($param['start'] != '') && ($param['end'] != '')) $where[] = ['a.trade_time', 'between', [$param['start'] . ' 00:00:00', $param['end'] . ' 23:59:59']];
         if ($param['name'] != '') $where[] = ['a.trade_out', 'like', '%' . $param['name'] . '%'];
         if ($param['bank'] != '') $where[] = ['a.trade_bank', 'like', '%' . $param['bank'] . '%'];
@@ -260,7 +261,7 @@ class Export extends Base
             b.status 认领审批状态,
             b.remark 驳回原因')
             ->leftJoin('trade_pool b', 'b.tradNo=a.tradNo')
-            ->leftJoin('assoc c', 'c.viceCode=b.logNo and c.type=2 and c.status<>3')
+            ->leftJoin('assoc c', 'c.viceCode=b.logNo')
             ->leftJoin('qrd_info d', 'd.sequenceNo=c.orderCode')
             ->where($where)
             ->order('a.trade_time desc')

+ 3 - 1
app/admin/controller/TagGood.php

@@ -195,7 +195,7 @@ class TagGood extends Base{
         if($code==''){
             return error_show(1004,"参数 code 不能为空");
         }
-        $taglog =TagLog::where(["tag_id"=>$tagid,"code"=>$code,"status"=>1])->findOrEmpty();
+//        $taglog =TagLog::where(["tag_id"=>$tagid,"code"=>$code,"status"=>1])->findOrEmpty();
         $total_fee =isset($this->post['total_fee']) &&$this->post["total_fee"]!=="" ? floatval($this->post["total_fee"]):"";
         if($total_fee==''){
             return error_show(1004,"参数 total_fee 不能为空");
@@ -284,6 +284,8 @@ class TagGood extends Base{
 	        $loginfo['tag_fee']=$fee;
 	       unset($loginfo['addtime'],$loginfo['updatetime']);
 	        $loginfo->id=null;
+	        $loginfo->apply_id=$this->uid;
+	        $loginfo->apply_name=$this->uname;
 	       TagLog::create($loginfo->toArray());
         }catch (\Exception $exception){
         	TagLog::rollback();

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

@@ -41,11 +41,11 @@ class Track extends Base
     	  $saleName =array_column($sale,'ownerName',"cxCode");
     	  $saleId =array_column($sale,'ownerid',"cxCode");
     	 $data=[];
-    	 foreach ($param as $item){
+    	 foreach ($param as $key=>$item){
     	    if($rule->check($item)==false)$this->error($rule->getError());
     	    if(!isset($outChild[$item['outChildCode']]))$this->error("发货工单{$item['outChildCode']}未找到或未发货");
     	    $temp=[
-    	    	"TrackCode"=>makeNo("TK"),
+    	    	"TrackCode"=>substr(makeNo('TK'), 0, -2) . str_pad(strval($key), 2, '0', STR_PAD_LEFT),
     	    	"orderCode"=>$outChild[$item['outChildCode']],
     	    	"cgdNo"=>$cgdArr[$outChild[$item['outChildCode']]]??"",
     	    	"saler"=>$saleName[$outChild[$item['outChildCode']]]??"",

+ 1 - 0
app/admin/listener/ComonQrd.php

@@ -74,6 +74,7 @@ class ComonQrd
 		                'createrid'=>0,
 		                'tag_fee'=>0,
 		                'tag_img'=>'',
+		                "tag_code"=>$data['invNo'],
 		                'status'=>$bool?1:0
 		                ];
 		            $qrd=[