$row["spuCode"],"status"=>1,"is_del"=>0])->findOrEmpty()->isEmpty(); return $isT==false; } public function GetQrdToPayAttr($v,$row){ $isT = InvoiceGood::Where([['goodNo',"=",$row['spuCode']],['goodNum','>',0]])->findOrEmpty() ->isEmpty(); return $isT==false; } public function GetExamInfoAttr($v){ return $v==""?[]:json_decode($v,true); } public function GetInvTaxAttr($v){ return $v==''?"": strval($v*100)."%"; } public function GetCgdInvTaxAttr($v){ return $v==""?'': strval($v*100).'%'; } public function GetCgdInvCatCodeAttr($v){ return $v.' '; } public function GetInvCatCodeAttr($v){ return $v." "; } public function export($where,$field){ $list= $this->where($where)->field($field)->cursor(); foreach ($list as $item){ $item->append(); if(isset($item['cat_diff'])){ $item['cat_diff']=self::$diff[$item['cat_diff']]; } if(isset($item['tax_diff'])){ $item['tax_diff']=self::$diff[$item['tax_diff']]; } if(isset($item['isZx'])){ $item['isZx']=self::$Zx[$item['isZx']]; } if(isset($item['status'])){ $item['status']=self::$status[$item['status']]; } yield $item; } } }