admin_order_1021

This commit is contained in:
dengbw
2021-10-21 17:51:23 +08:00
parent 8cb77421c4
commit e693c86fb7
4 changed files with 104 additions and 6 deletions
+2 -2
View File
@@ -46,8 +46,8 @@ class Orders extends HD_Controller
$where_c = ["$t2.id>" => 0];
$where_c["{$t2}.brand_id<>3"] = null;//狸车品牌不显示
$where_c["{$t2}.biz_id<>1"] = null;//biz_id=1不显示
if ($key == 6) {
$count1 = $this->orders_model->count(array("status" => 6, "brand_id<>3" => null));
if ($key == 6 || $key==7) {
$count1 = $this->orders_model->count(array("status" => $key, "brand_id<>3" => null));
} else {
if ($key == 0) {
$t1 = 'lc_receiver_order_signs';
@@ -0,0 +1,98 @@
<?php
defined('BASEPATH') OR exit('No direct script access allowed');
/**
* Notes:退款
* Created on: 2021/9/28 14:11
* Created by: dengbw
*/
class Refund extends HD_Controller
{
private $status_pid = 7;
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['cf_title'] = $value['cf_title'];
$temp['status_name'] = $value['status_name'];
$temp['c_time'] = $value['c_time'];
$data[] = $temp;
}
$indexs = [
'name' => '客户姓名',
'mobile' => '客户电话',
'car_name' => '车辆',
'biz_name' => '门店',
'price' => '车辆平台价',
'deposit' => '定金',
'payway_name' => '付款方式',
'cf_title' => '客户来源',
'status_name' => '状态',
'c_time' => '订单时间'
];
array_unshift($data, $indexs);
$this->load->library('excel');
return $this->excel->out_csv($data, $indexs, $fileName . "_" . date('YmdHis'));
}
}
+3 -3
View File
@@ -29,9 +29,9 @@ class OrdersList
!$params['qdjl_id'] && $params['qdjl_id'] = '';
//渠道经理
$qdjl_lists = $this->ci->mdLichebUsers->select(array('group_id' => 4, 'status' => 1, 'biz_id<>' => '0'), 'id desc', 0, 0, 'id,uname as name');
if (!strlen($status_pid) || $status_pid == 6) {
if ($status_pid == 6) {
$params['status'] = 6;
if (!strlen($status_pid) || $status_pid == 6 || $status_pid == 7) {
if ($status_pid) {
$params['status'] = $status_pid;
}
$result = $this->orders($params);
$result['qdjl_lists'] = $qdjl_lists;
@@ -41,7 +41,7 @@ class Receiver_orders_model extends HD_Model
$status_ary[5] = array('name' => '交付车辆', 'show' => true, 'list' => array(0 => '待用户确认', 1 => '用户已确认', 2 => '销售已确认'),
'menu_list' => array(0 => '待用户确认', 1 => '用户已确认', 2 => '销售已确认'), 'menu_default' => 0);
$status_ary[6] = array('name' => '交易完成', 'show' => true, 'list' => array(), 'menu_list' => array());
$status_ary[7] = array('name' => '申请退款', 'show' => false, 'list' => array(), 'menu_list' => array());
$status_ary[7] = array('name' => '退款', 'show' => true, 'list' => array(), 'menu_list' => array());
if (strlen($status)) {
$return_status = $status_ary[$status];
} else {