|
@@ -5,7 +5,7 @@ namespace app\admin\controller;
|
|
|
use think\facade\Db;
|
|
|
use think\facade\Validate;
|
|
|
|
|
|
-//销售报表处理类
|
|
|
+//前端报表处理类
|
|
|
class SaleReport extends Base
|
|
|
{
|
|
|
|
|
@@ -1389,16 +1389,17 @@ class SaleReport extends Base
|
|
|
|
|
|
}
|
|
|
|
|
|
- //【八、无地址待发货订单】
|
|
|
+ //【八、延时发货申请单统计】
|
|
|
public function orderOutNotAddr()
|
|
|
{
|
|
|
- $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => '', 'page' => 1, 'size' => 15], 'post', 'trim');
|
|
|
+ $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => '', 'page' => 1, 'size' => 15, 'order_type' => ''], 'post', 'trim');
|
|
|
|
|
|
$where = [['b.is_del', '=', 0], ['b.send_type', '=', 2]];//send_type==2 延迟发货
|
|
|
if ($param['start_date'] != '' && $param['end_date'] != '') $where[] = ['a.addtime', 'between', [$param['start_date'] . ' 00:00:00', $param['end_date'] . ' 23:59:59']];
|
|
|
if ($param['start_sendtime'] != '' && $param['end_sendtime'] != '') $where[] = ['a.sendtime', 'between', [$param['start_sendtime'] . ' 00:00:00', $param['end_sendtime'] . ' 23:59:59']];
|
|
|
if ($param['status'] != '') $where[] = ['a.status', '=', $param['status']];
|
|
|
if ($param['apply_company'] != '') $where[] = ['ci.name', 'like', '%' . $param['apply_company'] . '%'];
|
|
|
+ if ($param['order_type'] != '') $where[] = ['b.order_type', '=', $param['order_type']];
|
|
|
|
|
|
$count = Db::name('order_out')
|
|
|
->alias('a')
|
|
@@ -1456,17 +1457,18 @@ class SaleReport extends Base
|
|
|
return app_show(0, '请求成功', ['list' => $list, 'count' => $count]);
|
|
|
}
|
|
|
|
|
|
- //【八、无地址待发货订单】
|
|
|
+ //【八、延时发货申请单统计】
|
|
|
public function orderOutNotAddrExport()
|
|
|
{
|
|
|
|
|
|
- $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => '', 'page' => 1, 'size' => 15], 'post', 'trim');
|
|
|
+ $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => '', 'page' => 1, 'size' => 15, 'order_type' => ''], 'post', 'trim');
|
|
|
|
|
|
$where = [['b.is_del', '=', 0], ['b.send_type', '=', 2]];//send_type==2 延迟发货
|
|
|
if ($param['start_date'] != '' && $param['end_date'] != '') $where[] = ['a.addtime', 'between', [$param['start_date'] . ' 00:00:00', $param['end_date'] . ' 23:59:59']];
|
|
|
if ($param['start_sendtime'] != '' && $param['end_sendtime'] != '') $where[] = ['a.sendtime', 'between', [$param['start_sendtime'] . ' 00:00:00', $param['end_sendtime'] . ' 23:59:59']];
|
|
|
if ($param['status'] != '') $where[] = ['a.status', '=', $param['status']];
|
|
|
if ($param['apply_company'] != '') $where[] = ['ci.name', 'like', '%' . $param['apply_company'] . '%'];
|
|
|
+ if ($param['order_type'] != '') $where[] = ['b.order_type', '=', $param['order_type']];
|
|
|
|
|
|
$data = Db::name('order_out')
|
|
|
->alias('a')
|
|
@@ -1518,16 +1520,17 @@ class SaleReport extends Base
|
|
|
|
|
|
}
|
|
|
|
|
|
- //【九、有地址待发货订单】
|
|
|
+ //【九、直接发货申请单统计 】
|
|
|
public function orderOutAddr()
|
|
|
{
|
|
|
- $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => '', 'page' => 1, 'size' => 15], 'post', 'trim');
|
|
|
+ $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => '', 'page' => 1, 'size' => 15, 'order_type' => ''], 'post', 'trim');
|
|
|
|
|
|
$where = [['b.send_type', '=', 1]];//send_type==1 直接发货
|
|
|
if ($param['start_date'] != '' && $param['end_date'] != '') $where[] = ['a.addtime', 'between', [$param['start_date'] . ' 00:00:00', $param['end_date'] . ' 23:59:59']];
|
|
|
if ($param['start_sendtime'] != '' && $param['end_sendtime'] != '') $where[] = ['a.sendtime', 'between', [$param['start_sendtime'] . ' 00:00:00', $param['end_sendtime'] . ' 23:59:59']];
|
|
|
if ($param['status'] != '') $where[] = ['a.status', '=', $param['status']];
|
|
|
if ($param['apply_company'] != '') $where[] = ['ci.name', 'like', '%' . $param['apply_company'] . '%'];
|
|
|
+ if ($param['order_type'] != '') $where[] = ['b.order_type', '=', $param['order_type']];
|
|
|
|
|
|
$count = Db::name('order_out')
|
|
|
->alias('a')
|
|
@@ -1577,16 +1580,17 @@ class SaleReport extends Base
|
|
|
|
|
|
}
|
|
|
|
|
|
- //【九、有地址待发货订单】
|
|
|
+ //【九、直接发货申请单统计 】
|
|
|
public function orderOutAddrExport()
|
|
|
{
|
|
|
- $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => ''], 'post', 'trim');
|
|
|
+ $param = $this->request->only(['token', 'start_date' => '', 'end_date' => '', 'start_sendtime' => '', 'end_sendtime' => '', 'status' => '', 'apply_company' => '', 'order_type' => ''], 'post', 'trim');
|
|
|
|
|
|
$where = [['b.send_type', '=', 1]];//send_type==1 直接发货
|
|
|
if ($param['start_date'] != '' && $param['end_date'] != '') $where[] = ['a.addtime', 'between', [$param['start_date'] . ' 00:00:00', $param['end_date'] . ' 23:59:59']];
|
|
|
if ($param['start_sendtime'] != '' && $param['end_sendtime'] != '') $where[] = ['a.sendtime', 'between', [$param['start_sendtime'] . ' 00:00:00', $param['end_sendtime'] . ' 23:59:59']];
|
|
|
if ($param['status'] != '') $where[] = ['a.status', '=', $param['status']];
|
|
|
if ($param['apply_company'] != '') $where[] = ['ci.name', 'like', '%' . $param['apply_company'] . '%'];
|
|
|
+ if ($param['order_type'] != '') $where[] = ['b.order_type', '=', $param['order_type']];
|
|
|
|
|
|
$data = Db::name('order_out')
|
|
|
->alias('a')
|