去掉无用的参数
修改表单构建关联字段的逻辑 修改外部插件说明
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,
|
||||
));
|
||||
}
|
||||
|
||||
/**
|
||||
* 新客户分析
|
||||
* 计算本年度有订单去年无订单为新客户
|
||||
|
||||
Reference in New Issue
Block a user