id;
    	$status = Dever::input('factory_status');
    	if ($status) {
    		$where['factory_status'] = $status;
    	}
    	$start = Dever::input('start');
    	if ($start) {
    		$where['start'] = $start;
    	}
    	$end = Dever::input('end');
    	if ($end) {
    		$where['end'] = $end;
    	}
        $data = Dever::db('cash/factory')->getAll($where);
        $html = '';
        if ($data) {
        	$config = Dever::db('cash/factory')->config;
        	foreach ($data as $k => $v) {
        		$view = Dever::url('stat_view?id=' . $v['id'] . '&type=factory&show=2', 'factory');
        		$url = Dever::url('lib/set.audit_other&id='.$v['id'].'&type=factory', 'cash');
        		$button = '';
        		if ($v['factory_status'] == 1) {
        			$button .= '  ';
        		}
        		$html .= '
| '.Dever::load("cash/lib/set.statDate", $v['type'], $v['day']).' | '.Dever::load("cash/lib/set.statTime", $v['start'], $v['end']).' | '.round($v['cash'], 2).' | '.$config['config_status'][$v['factory_status']].' | '.$button.' | 
';
        	}
        }
        return $html;
    }
    # 获取列表页搜索信息
    public function getSearch()
    {
    	$config = array
        (
        	array('value' => '0', 'name' => '全部'),
            array('value' => 1, 'name' => '未对账'),
            array('value' => 2, 'name' => '已对账'),
        );
        $status = Dever::input('factory_status');
        $html = '';
        foreach ($config as $k => $v) {
        	$selected = '';
    		if ((!$status && $k == 0) || $status == $v['value']) {
    			$selected = 'selected=""';
    		} 
    		$html .= '';
    	}
        return $html;
    }
    # 获取基本信息
    public function getConfig()
    {
    	$data['search'] = Dever::url('stat', 'factory');
    	return $data;
    }
    # 打印订单单
    public function print_api()
    {
        return Dever::load('cash/lib/set')->printer($this->user);
    }
}