Sale.php 329 B

1234567891011121314151617
  1. <?php
  2. declare (strict_types = 1);
  3. namespace app\report\model;
  4. use think\Model;
  5. /**
  6. * @mixin \think\Model
  7. */
  8. class Sale extends Model
  9. {
  10. protected $append=["addr_num"];
  11. public function GetAddrNumAttr($v,$row){
  12. return (new OrderAddr())->where(["orderCode"=>$row["orderCode"],"is_del"=>0])->sum("receipt_quantity");
  13. }
  14. }