value => '途中',
static::Wait->value => '揽收',
static::Question->value => '问题包裹',
static::Check->value => '签收',
static::Refund->value => '退签',
static::Distribute->value => '派送',
static::Refuse->value => '拒签',
static::Other->value => '其他',
static::Autocheck->value => '自动签收',
];
}
public function text()
{
return data_get(self::options(), $this->value);
}
public function color()
{
return match ($this) {
static::Wait => 'primary',
static::Ontheway => 'primary',
static::Distribute => 'primary',
static::Check => 'success',
static::Question => 'danger',
static::Refund => 'danger',
static::Refuse => 'danger',
static::Other => 'warning',
static::Autocheck => 'success',
};
}
public function label()
{
$color = $this->color();
$name = $this->text();
return "{$name}";
}
public function dot()
{
$color = $this->color();
$name = $this->text();
return " {$name}";
}
}