public function export() { sys_xls('日志明细.xls'); $user = str_enhtml($this->input->get('user', TRUE)); $where = ''; if ($user) { $where .= ' and username="******"'; } $data['list'] = $this->cache_model->load_data(LOG, '(1=1) ' . $where . ' order by id desc'); $this->load->view('logs/export', $data); }
public function export() { $this->purview_model->checkpurview(62); sys_xls('客户.xls'); $skey = str_enhtml($this->input->get('skey', TRUE)); $where = ' and type=1'; if ($skey) { $where .= ' and contact like "%' . $skey . '%"'; } $this->data_model->logs('导出客户'); $data['list'] = $this->cache_model->load_data(CONTACT, '(status=1) ' . $where . ' order by id desc'); $this->load->view('customer/export', $data); }
public function export() { $this->purview_model->checkpurview(10); sys_xls('销货记录.xls'); $id = str_enhtml($this->input->get_post('id', TRUE)); if (strlen($id) > 0) { $data['list1'] = $this->cache_model->load_data(INVSA, '(id in(' . $id . '))'); $data['list2'] = $this->data_model->invsa_info(' and (a.invsaid in(' . $id . '))'); $this->data_model->logs('导出销货记录'); $this->load->view('invsa/export', $data); } }
public function export() { $this->purview_model->checkpurview(72); sys_xls('商品明细.xls'); $skey = str_enhtml($this->input->get('skey', TRUE)); $categoryid = intval($this->input->get('assistId', TRUE)); $where = ''; if ($skey) { $where .= ' and goods like "%' . $skey . '%"'; } if ($categoryid > 0) { $cid = $this->cache_model->load_data(CATEGORY, '(1=1) and find_in_set(' . $categoryid . ',path)', 'id'); if (count($cid) > 0) { $cid = join(',', $cid); $where .= ' and categoryid in(' . $cid . ')'; } } $this->data_model->logs('导出商品'); $data['list'] = $this->cache_model->load_data(GOODS, '(status=1) ' . $where . ' order by id desc'); $this->load->view('goods/export', $data); }
public function balance_detail_xls() { $this->purview_model->checkpurview(56); sys_xls('balance_detail.xls'); $data['stt'] = str_enhtml($this->input->get_post('beginDate', TRUE)); $data['ett'] = str_enhtml($this->input->get_post('endDate', TRUE)); $accountno = str_enhtml($this->input->get_post('accountNo', TRUE)); $where1 = ''; $where2 = ''; if ($accountno) { $where1 .= ' and number in(' . str_quote($accountno) . ')'; } if ($data['stt']) { $where2 .= ' and billdate>="' . $data['stt'] . '"'; } if ($data['ett']) { $where2 .= ' and billdate<="' . $data['ett'] . '"'; } $data['list1'] = $this->cache_model->load_data(CONTACT, '(status=1) and type=1 ' . $where1 . ' order by id'); $data['list2'] = $this->cache_model->load_data(INVSA, '(1=1) ' . $where2 . ' order by id'); $this->load->view('report/balance_detail_xls', $data); }
public function export() { $this->purview_model->checkpurview(13); sys_xls('盘点表.xls'); $categoryid = intval($this->input->get_post('categoryId', TRUE)); $goods = str_enhtml($this->input->get_post('goods', TRUE)); $qty = intval($this->input->get_post('showZero', TRUE)); $where = ''; $order = 'order by a.id desc'; if ($categoryid > 0) { $cid = $this->cache_model->load_data(CATEGORY, '(1=1) and find_in_set(' . $categoryid . ',path)', 'id'); if (count($cid) > 0) { $cid = join(',', $cid); $where .= ' and a.categoryid in(' . $cid . ')'; } } if ($qty > 0) { $order = ' HAVING (qty<=0)'; } if ($goods) { $where .= ' and a.goods like "%' . $goods . '%"'; } $this->data_model->logs('导出盘点记录'); $data['list'] = $this->data_model->inventory($where, $order); $this->load->view('inventory/export', $data); }