cost query add biz_type

This commit is contained in:
qianhy
2023-01-11 17:35:30 +08:00
committed by lccsw
parent b25d7c63f5
commit e2b398fab6
3 changed files with 22 additions and 3 deletions
+9 -2
View File
@@ -61,8 +61,14 @@ class Cost extends HD_Controller{
}
# lc_receiver_orders_v2
//销售员筛选
$where_orders = $where_orders_default = '1 = 1';
//门店类型
!$params['biz_type'] && $params['biz_type'] = '';
if ($params['biz_type']) {
//$where["biz_id in (select id from lc_biz where type = " . $params['biz_type'] . ')'] = null;
$where_orders = $where_orders." and biz_id in (select id from lc_biz where type = {$params['biz_type']})";
}
//销售员筛选
if ($params['admin_id']) {
//$where["sale_id"] = $params['admin_id'];
$where_orders = $where_orders.' and sale_id = '.$params['admin_id'];
@@ -194,6 +200,8 @@ class Cost extends HD_Controller{
];
}
}
$show_info['bizTypeAry'] = $this->biz_model->type_ary();//门店类型
$this->data['show_info'] = $show_info;
$autoList[1] = $this->mdAutoBrand->select(array('status' => 1), 'id desc', 0, 0, 'id,name');
$this->data['lists'] = $lists;
$this->data['pager'] = array('count' => ceil($count / $size), 'curr' => $page, 'totle' => $count);
@@ -554,7 +562,6 @@ class Cost extends HD_Controller{
"back_price" => "客户退点金额", // 退客户保险退点
"insurance_price_pure" => "保险收入合计", // 保险净收入
'fee_carno' => '挂牌收入',
'cb_fee_carno' => '挂牌成本',
"fee_carno_price" => "挂牌收入合计",
+11
View File
@@ -67,6 +67,15 @@
</div>
</div>
<div class="am-form-group" style="margin-bottom: 0px;"></div>
<div class="am-form-group fl">
<label class="am-para-label w100">门店类型:</label>
<div class="am-para-inline w100">
<select name="biz_type" v-model="params.biz_type">
<option value="">请选择</option>
<option :value="i" v-for="(v,i) in show_info.bizTypeAry">{{v}}</option>
</select>
</div>
</div>
<div class="am-form-group fl">
<label class="am-para-label w100">归属门店:</label>
<div class="am-para-inline w120">
@@ -242,6 +251,7 @@
data: {
params: [],
lists: [],
show_info: [],
// modal_fine: {title: '', lists: [], selected: [], page: 1, size: 10, total: 0},
admins: {cityAry: [], countyAry: [], bizAry: [], list: []},
},
@@ -249,6 +259,7 @@
var vm = this;
vm.params = <?=json_encode($params)?>;
vm.lists = <?=json_encode($lists)?>;
vm.show_info = <?=json_encode($show_info)?>;
vm.set_sery();
vm.init_citys();
},
+2 -1
View File
@@ -63,7 +63,8 @@ class Biz_model extends HD_Model
*/
function type_ary($key = null)
{
$map = array('1' => '品牌店', '2' => '合伙店', '3' => '代理店', '4' => '合作店', '5' => '异业店');
//$map = array('1' => '品牌店', '2' => '合伙店', '3' => '代理店', '4' => '合作店', '5' => '异业店');
$map = array('1' => '品牌店', '2' => '合伙店', '3' => '代理店');
if (!is_null($key)) {
return $map[$key];
}