删除无用的注释和文件
This commit is contained in:
@@ -70,7 +70,6 @@ class LogisticsController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建客户联系人
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
@@ -80,19 +79,16 @@ class LogisticsController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
// 创建客户联系人
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 创建客户联系人
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
@@ -101,18 +97,15 @@ class LogisticsController extends DefaultController
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层信息
|
||||
*/
|
||||
public function dialogAction()
|
||||
{
|
||||
$search = search_form([
|
||||
'advanced' => '',
|
||||
'prefix' => '',
|
||||
'offset' => '',
|
||||
'sort' => '',
|
||||
'order' => '',
|
||||
'limit' => '',
|
||||
'prefix' => '',
|
||||
'offset' => '',
|
||||
'sort' => '',
|
||||
'order' => '',
|
||||
'limit' => '',
|
||||
], [
|
||||
['text','logistics.name','名称'],
|
||||
]);
|
||||
|
||||
@@ -45,9 +45,6 @@ class OrderController extends WorkflowController
|
||||
'serviceCustomerMoney',
|
||||
];
|
||||
|
||||
/**
|
||||
* 订单列表
|
||||
*/
|
||||
public function indexAction()
|
||||
{
|
||||
// 客户权限
|
||||
@@ -61,19 +58,6 @@ class OrderController extends WorkflowController
|
||||
|
||||
$search = $header['search_form'];
|
||||
$query = $search['query'];
|
||||
|
||||
$search['forms']['field'][] = 'acc_audit_date';
|
||||
$search['forms']['condition'][] = '';
|
||||
$search['forms']['search'][] = '';
|
||||
$search['forms']['option'][] = [];
|
||||
$search['columns'][] = [
|
||||
'form_type' => 'date',
|
||||
'field' => 'acc_audit_date',
|
||||
'name' => '销售会计审核日期',
|
||||
'options' => [],
|
||||
];
|
||||
$header['search_form'] = $search;
|
||||
|
||||
$cols = $header['cols'];
|
||||
|
||||
// 自定义列
|
||||
@@ -259,17 +243,7 @@ class OrderController extends WorkflowController
|
||||
|
||||
foreach ($search['where'] as $where) {
|
||||
if ($where['active']) {
|
||||
if ($where['field'] == 'acc_audit_date') {
|
||||
// 销售会计审核日期
|
||||
$model->leftJoin(DB::raw("(select max(d.updated_at) as audit_date, m.data_id
|
||||
FROM model_run_log as d left join model_run as m on d.run_id = m.id where m.bill_id = 23 and d.run_name = '销售会计'
|
||||
GROUP BY m.data_id
|
||||
) as l
|
||||
"), 'l.data_id', '=', 'customer_order.id')
|
||||
->whereRaw('('.sql_year_month('l.audit_date', 'ts').' = ?)', [$where['search']]);
|
||||
} else {
|
||||
$model->search($where);
|
||||
}
|
||||
$model->search($where);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -708,7 +682,6 @@ class OrderController extends WorkflowController
|
||||
}
|
||||
}
|
||||
|
||||
// 新建促销
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -731,19 +704,16 @@ class OrderController extends WorkflowController
|
||||
return $this->display(['form' => $form], $tpl);
|
||||
}
|
||||
|
||||
// 编辑促销
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 显示促销
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
@@ -770,7 +740,6 @@ class OrderController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 显示促销
|
||||
public function printAction()
|
||||
{
|
||||
$id = Request::get('id');
|
||||
@@ -809,9 +778,6 @@ class OrderController extends WorkflowController
|
||||
return $print_type == 'pdf' ? print_prince($tpl) : $tpl;
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层信息
|
||||
*/
|
||||
public function dialogAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -1174,9 +1140,6 @@ class OrderController extends WorkflowController
|
||||
return $data;
|
||||
}
|
||||
|
||||
/**
|
||||
* 订单删除
|
||||
*/
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -20,7 +20,6 @@ class SampleApplyController extends WorkflowController
|
||||
{
|
||||
public $permission = ['dialog', 'serviceDelivery'];
|
||||
|
||||
// 列表
|
||||
public function indexAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -86,7 +85,7 @@ class SampleApplyController extends WorkflowController
|
||||
|
||||
$model->select($header['select']);
|
||||
|
||||
// 发货统计
|
||||
// 明细统计
|
||||
$model->leftJoin(DB::raw('(select SUM(ISNULL(d.money, 0)) money, SUM(ISNULL(d.quantity, 0)) quantity, d.sample_id
|
||||
FROM sample_apply_data as d
|
||||
GROUP BY d.sample_id
|
||||
@@ -118,7 +117,6 @@ class SampleApplyController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 明细列表
|
||||
public function detailAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -182,7 +180,6 @@ class SampleApplyController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建
|
||||
public function createAction($action = 'edit')
|
||||
{
|
||||
$id = (int) Request::get('id');
|
||||
@@ -197,25 +194,21 @@ class SampleApplyController extends WorkflowController
|
||||
], $tpl);
|
||||
}
|
||||
|
||||
// 编辑
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
// 审核
|
||||
public function auditAction()
|
||||
{
|
||||
return $this->createAction('audit');
|
||||
}
|
||||
|
||||
// 显示
|
||||
public function showAction()
|
||||
{
|
||||
return $this->createAction('show');
|
||||
}
|
||||
|
||||
// 打印
|
||||
public function printAction()
|
||||
{
|
||||
$this->layout = 'layouts.print2';
|
||||
@@ -227,7 +220,7 @@ class SampleApplyController extends WorkflowController
|
||||
{
|
||||
$gets = Request::all();
|
||||
if (Request::method() == 'POST') {
|
||||
$rows = SampleApplyProduct::whereIn('id', $gets['ids'])->get();
|
||||
$rows = SampleApply::whereIn('id', $gets['ids'])->get();
|
||||
foreach($rows as $row) {
|
||||
$row->use_close = $row->use_close == 1 ? 0 : 1;
|
||||
$row->save();
|
||||
@@ -287,7 +280,6 @@ class SampleApplyController extends WorkflowController
|
||||
]);
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -69,7 +69,6 @@ class TypeController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 新建客户联系人
|
||||
public function createAction()
|
||||
{
|
||||
$id = (int)Request::get('id');
|
||||
@@ -79,15 +78,11 @@ class TypeController extends DefaultController
|
||||
], 'create');
|
||||
}
|
||||
|
||||
// 创建客户联系人
|
||||
public function editAction()
|
||||
{
|
||||
return $this->createAction();
|
||||
}
|
||||
|
||||
/**
|
||||
* 弹出层信息
|
||||
*/
|
||||
public function dialogAction()
|
||||
{
|
||||
$header = Grid::header([
|
||||
@@ -126,7 +121,6 @@ class TypeController extends DefaultController
|
||||
]);
|
||||
}
|
||||
|
||||
// 删除
|
||||
public function deleteAction()
|
||||
{
|
||||
if (Request::method() == 'POST') {
|
||||
|
||||
@@ -195,50 +195,6 @@ class WidgetController extends DefaultController
|
||||
}
|
||||
$res = $direct->get();
|
||||
$rows[] = ['title' => '本月直营共发出 <span class="red">'.number_format($res->sum('count')).'</span> 张发货单,<span class="red">'.number_format($res->sum('quantity')).' </span>件,<span class="red">'.number_format($res->sum('money')).'</span> 元'];
|
||||
|
||||
/*
|
||||
// 订单审核状态。
|
||||
$model = DB::table('customer_order')
|
||||
->leftJoin('customer', 'customer.id', '=', 'customer_order.customer_id')
|
||||
->selectRaw('sum(l.xshj_num) AS xshj_num, sum(l.sqjl_num) AS sqjl_num');
|
||||
|
||||
// 销售会计审核日期
|
||||
$model->leftJoin(DB::raw("(select
|
||||
m.data_id,
|
||||
sum(case when d.run_name = '销售会计' then 1 else 0 end) as xshj_num,
|
||||
sum(case when d.run_name = '省区经理' then 1 else 0 end) as sqjl_num
|
||||
FROM model_run_log as d left join model_run as m on d.run_id = m.id where m.bill_id = 23 and d.updated_id = 0 and d.[option] = 1
|
||||
GROUP BY m.data_id
|
||||
) as l
|
||||
"), 'l.data_id', '=', 'customer_order.id');
|
||||
|
||||
if ($region['authorise']) {
|
||||
foreach ($region['whereIn'] as $key => $where) {
|
||||
$model->whereIn($key, $where);
|
||||
}
|
||||
}
|
||||
$res = $model->first();
|
||||
$rows[] = ['title' => '订单待审核:销售会计<span class="red">'. $res['xshj_num'].'</span>张,省区经理<span class="red">'.$res['sqjl_num'].'</span>张'];
|
||||
*/
|
||||
|
||||
/*
|
||||
// 目前在途[]件。
|
||||
$model = DB::table('customer_order')
|
||||
->leftJoin('customer_order_data', 'customer_order_data.order_id', '=', 'customer_order.id')
|
||||
->leftJoin('customer', 'customer.id', '=', 'customer_order.customer_id')
|
||||
->whereRaw('FROM_UNIXTIME(customer_order.created_at,"%Y") BETWEEN '.$lastYear.' AND '.$nowYear)
|
||||
->where('customer_order.delivery_time', '>', 0)
|
||||
->where('customer_order.arrival_time', 0)
|
||||
->selectRaw('SUM(customer_order_data.amount) AS amount');
|
||||
|
||||
if ($region['authorise']) {
|
||||
foreach ($region['whereIn'] as $key => $where) {
|
||||
$model->whereIn($key, $where);
|
||||
}
|
||||
}
|
||||
$res = $model->first();
|
||||
$rows[] = ['title' => '目前在途订单 <span class="red">'.(int)$res['amount'].'</span> 件'];
|
||||
*/
|
||||
|
||||
$json['total'] = sizeof($rows);
|
||||
$json['data'] = $rows;
|
||||
|
||||
Reference in New Issue
Block a user