86 lines
2.2 KiB
PHP
86 lines
2.2 KiB
PHP
<?php
|
|
defined('BASEPATH') OR exit('No direct script access allowed');
|
|
|
|
/**
|
|
* Notes:代办服务
|
|
* Created on: 2021/9/28 14:11
|
|
* Created by: dengbw
|
|
*/
|
|
class Agent extends HD_Controller{
|
|
|
|
private $status_pid = 4;
|
|
|
|
public function __construct(){
|
|
parent::__construct();
|
|
}
|
|
|
|
public function index(){
|
|
$this->lists();
|
|
}
|
|
|
|
public function lists(){
|
|
$params = $this->input->get();
|
|
$this->load->library('OrdersList');
|
|
$result = $this->orderslist->lists($this->status_pid, $params);
|
|
$this->data = $result;
|
|
return $this->show_view($result['view'], true);
|
|
}
|
|
|
|
public function get(){
|
|
}
|
|
|
|
//添加单条数据
|
|
public function add(){
|
|
}
|
|
|
|
//编辑单条数据
|
|
public function edit(){
|
|
}
|
|
|
|
//删除单条数据
|
|
public function del(){
|
|
|
|
}
|
|
|
|
//批量操作(默认修改状态)
|
|
public function batch(){
|
|
|
|
}
|
|
|
|
//导出数据列表
|
|
public function export()
|
|
{
|
|
$params = $this->input->get();
|
|
$params['page'] = 1;
|
|
$params['size'] = 10000;
|
|
$this->load->library('OrdersList');
|
|
$result = $this->orderslist->lists($this->status_pid, $params);
|
|
$fileName = $result['_title'];
|
|
foreach ($result['lists'] as $key => $value) {
|
|
$temp['name'] = $value['name'];
|
|
$temp['mobile'] = $value['mobile'];
|
|
$temp['car_name'] = $value['car_name'];
|
|
$temp['biz_name'] = $value['biz_name'];
|
|
$temp['price'] = $value['price'];
|
|
$temp['deposit'] = $value['deposit'];
|
|
$temp['payway_name'] = $value['payway_name'];
|
|
$temp['status_name'] = $value['status_name'];
|
|
$data[] = $temp;
|
|
}
|
|
$indexs = [
|
|
'name' => '客户姓名',
|
|
'mobile' => '客户电话',
|
|
'car_name' => '车辆',
|
|
'biz_name' => '门店',
|
|
'price' => '车辆平台价',
|
|
'deposit' => '定金',
|
|
'payway_name' => '付款方式',
|
|
'status_name' => '状态',
|
|
];
|
|
array_unshift($data, $indexs);
|
|
$this->load->library('excel');
|
|
return $this->excel->out_csv($data, $indexs, $fileName . "_" . date('YmdHis'));
|
|
}
|
|
|
|
}
|