state = $state; parent::__construct($title=null); } protected function script() { if ($this->state){ $url = "order?order_state=".$this->state.'&'."time=".(time()-(7*86400)); }else{ $url = "order"; } return <<state}").on('click',function () { window.location.href = "{$url}" }); JS; } public function render() { $title = ' 重置'; $count = ImsCjdcOrderMain::getOrderStateCount($this->state,Auth::getMarket()); if ($this->state==8){ $title = "退款申请(".$count.")"; }elseif ($this->state==2){ $title = "待接单(".$count.")"; }elseif ($this->state==3){ $title = "待发货(".$count.")"; }elseif ($this->state==311){ $title = "配送中(".$count.")"; } Admin::script($this->script()); return ""; } }