去掉无用的参数
修改表单构建关联字段的逻辑 修改外部插件说明
This commit is contained in:
@@ -1156,7 +1156,7 @@ class OrderController extends WorkflowController
|
||||
$avaMoney = 0;
|
||||
|
||||
if ($tax) {
|
||||
// 获取接口数据
|
||||
// 获取外部接口数据
|
||||
$a = plugin_sync_api('getAccInfo/code/'.$tax['code']);
|
||||
$b = CustomerService::getLockMoney($tax['id']);
|
||||
|
||||
|
||||
@@ -40,8 +40,8 @@ class PlanController extends DefaultController
|
||||
],[
|
||||
'form_type' =>'select',
|
||||
'field' => 'type',
|
||||
'name' => '内销/外贸',
|
||||
'options' => [['id'=>1, 'name'=> '内销'], ['id'=>2, 'name'=> '外贸']]
|
||||
'name' => '内销/外销',
|
||||
'options' => [['id'=>1, 'name'=> '内销'], ['id'=>2, 'name'=> '外销']]
|
||||
],[
|
||||
'form_type' =>'dialog',
|
||||
'field' => 'warehouse_id',
|
||||
@@ -92,7 +92,7 @@ class PlanController extends DefaultController
|
||||
}
|
||||
|
||||
/**
|
||||
* 外销进度表
|
||||
* 外销销售进度表
|
||||
*/
|
||||
public function export_saleAction()
|
||||
{
|
||||
@@ -232,8 +232,8 @@ class PlanController extends DefaultController
|
||||
],[
|
||||
'form_type' =>'select',
|
||||
'field' => 'type',
|
||||
'name' => '内销/外贸',
|
||||
'options' => [['id'=>1, 'name'=> '内销'], ['id'=>2, 'name'=> '外贸']]
|
||||
'name' => '内销/外销',
|
||||
'options' => [['id'=>1, 'name'=> '内销'], ['id'=>2, 'name'=> '外销']]
|
||||
],[
|
||||
'form_type' =>'dialog',
|
||||
'field' => 'category_id',
|
||||
|
||||
@@ -7,12 +7,16 @@ use Request;
|
||||
use Gdoo\Index\Services\NotificationService;
|
||||
|
||||
use Gdoo\Product\Models\ProductCategory;
|
||||
use Gdoo\Customer\Models\CustomerType;
|
||||
|
||||
use Gdoo\Index\Controllers\DefaultController;
|
||||
|
||||
class ReportController extends DefaultController
|
||||
{
|
||||
public $permission = [
|
||||
'citydata',
|
||||
'clientdata'
|
||||
];
|
||||
|
||||
public $promotion = [
|
||||
'promotions_category' => [
|
||||
1 => '消费促销',
|
||||
@@ -1396,46 +1400,6 @@ class ReportController extends DefaultController
|
||||
));
|
||||
}
|
||||
|
||||
// 促销分类查询
|
||||
public function promotionAction()
|
||||
{
|
||||
// 获得销售员登录名
|
||||
$id = (int)Request::get('id');
|
||||
$tag = Request::get('tag');
|
||||
$category = Request::get('category');
|
||||
|
||||
if ($id <= 0 and empty($tag) and empty($category)) {
|
||||
return $this->alert('很抱歉,参数不正确。');
|
||||
}
|
||||
|
||||
$category_name = $this->promotion['promotions_category'][$category];
|
||||
$category_name = str_replace('促销', '', $category_name);
|
||||
|
||||
//查询类型
|
||||
if ($tag == 'salesman_id') {
|
||||
$where = 'c.salesman_id='.$id;
|
||||
} elseif ($tag == 'city_id') {
|
||||
$where = 'c.city_id='.$id;
|
||||
} elseif ($tag == 'user_id') {
|
||||
$where = 'p.user_id='.$id;
|
||||
}
|
||||
|
||||
// 促销计算
|
||||
$_promotions = DB::table('promotion as p')
|
||||
->leftJoin('user as c', 'c.id', '=', 'p.customer_id')
|
||||
->where('p.deleted_by', 0)
|
||||
->whereRaw($where)
|
||||
->where('p.type_id', $category)
|
||||
->groupBy('p.id')
|
||||
->orderBy('p.id', 'DESC')
|
||||
->selectRaw('p.step_number,p.start_at,p.end_at,p.data_4,p.data_3,p.type_id,p.product_remark,p.data_5,p.data_18,p.data_19,p.data_amount,p.data_amount1')
|
||||
->get();
|
||||
|
||||
return $this->display(array(
|
||||
'promotions'=> $_promotions,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新客户分析
|
||||
* 计算本年度有订单去年无订单为新客户
|
||||
|
||||
@@ -89,7 +89,7 @@ class OrderService
|
||||
cot.name AS type_id_name,
|
||||
sd.customer_stock,
|
||||
sd.other_money,
|
||||
p.is_special,
|
||||
p.is_produce_plan,
|
||||
pc.code AS category_code,
|
||||
p.barcode,
|
||||
isnull(sd.money, 0) + isnull(sd.other_money, 0) AS hj_money,
|
||||
|
||||
@@ -226,52 +226,28 @@ return [
|
||||
]
|
||||
],
|
||||
"report" => [
|
||||
"name" => "客户订单报表",
|
||||
"name" => "客户销售报表",
|
||||
"actions" => [
|
||||
"index" => [
|
||||
"name" => "总订单报表"
|
||||
"name" => "销售曲线表"
|
||||
],
|
||||
"category" => [
|
||||
"name" => "品类报表"
|
||||
"name" => "销售品类汇总表"
|
||||
],
|
||||
"single" => [
|
||||
"name" => "单品报表"
|
||||
],
|
||||
"increase" => [
|
||||
"name" => "单品涨跌报表"
|
||||
],
|
||||
"clientsort" => [
|
||||
"name" => "客户涨跌报表"
|
||||
"name" => "销售单品汇总表"
|
||||
],
|
||||
"city" => [
|
||||
"name" => "城市报表"
|
||||
],
|
||||
"citydata" => [
|
||||
"name" => "城市数据报表"
|
||||
"name" => "区域销售品类表"
|
||||
],
|
||||
"client" => [
|
||||
"name" => "单品客户报表"
|
||||
],
|
||||
"clientdata" => [
|
||||
"name" => "单品数据客户报表"
|
||||
"name" => "销售单品客户表"
|
||||
],
|
||||
"ranking" => [
|
||||
"name" => "客户销售排行报表"
|
||||
],
|
||||
"promotion" => [
|
||||
"name" => "促销分类报表"
|
||||
],
|
||||
"clienttype" => [
|
||||
"name" => "客户销售类型报表"
|
||||
"name" => "销售排名表"
|
||||
],
|
||||
"newclient" => [
|
||||
"name" => "新客户报表"
|
||||
],
|
||||
"receivable" => [
|
||||
"name" => "客户回款报表"
|
||||
],
|
||||
"billingtype" => [
|
||||
"name" => "开票类型订单分析"
|
||||
"name" => "年度新客户表"
|
||||
],
|
||||
"stockmonth" => [
|
||||
"name" => "三个月未进货客户报表"
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
{cellClass:'text-center', field: 'sn', headerName: '订单号', width: 140},
|
||||
{cellClass:'text-right', type: 'number', field: 'fhjh_num', headerName: '数量', width: 80},
|
||||
{cellClass:'text-center', field: 'pay_dt', headerName: '打款日期', width: 100},
|
||||
{cellClass:'text-left', field: 'export_country', headerName: '出口国家', width: 100},
|
||||
{cellClass:'text-left', field: 'export_country', headerName: '外销国家', width: 100},
|
||||
];
|
||||
|
||||
grid.defaultColDef.cellStyle1 = function(params) {
|
||||
|
||||
@@ -18,7 +18,7 @@
|
||||
<table class="table table-bordered" id="report_export">
|
||||
<tr>
|
||||
<th style="white-space:nowrap">
|
||||
销售团队
|
||||
销售组
|
||||
</th>
|
||||
|
||||
@foreach($categorys as $k => $v)
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
<tr>
|
||||
<th width="80">排行</th>
|
||||
@if($select['query']['tag'] == 'customer_id')
|
||||
<th style="white-space:nowrap;">销售团队</th>
|
||||
<th style="white-space:nowrap;">销售组</th>
|
||||
<th style="white-space:nowrap;">负责人</th>
|
||||
@endif
|
||||
@if($select['query']['tag']=='city_id')
|
||||
|
||||
Reference in New Issue
Block a user