调整广告位录入时可以同时筛选多个广告位置

This commit is contained in:
cloud 2020-06-26 02:39:55 +08:00
parent bf9ccca0a7
commit d876f4389e
2 changed files with 24 additions and 15 deletions

View File

@ -730,8 +730,19 @@ class table_theme {
$para = $tsql->table('para')->where(['p_type' => 3])->all();
$this->search['left'][] = self::para_select($para,['e_bno','门口方位']);
//位置
$para = $tsql->table('para')->where(['p_type' => 0])->all();
$this->search['left'][] = self::para_select($para,['e_aps','位置']);
//位置
$this->select2 = [
'_fiend' => ['veaps','位置'],
'placeholder' => '可选择多个位置',
'fiend' => 'p_value',
'tname' => 'para',
'source' => 'search_para_eaps',
'allnone' => 0,
'condition' => 'p_type|||0'
];
$this->search['left'][] = self::input_select_search_multiple();
// $para = $tsql->table('para')->where(['p_type' => 0])->all();
// $this->search['left'][] = self::para_select($para,['e_aps','位置']);
$this->search['left'][] = self::input_search('e_number','输入广告位编号');
//状态
// $this->search[] = self::para_select([['禁用',0],['启用',1]],['e_enable','状态'],true);
@ -773,18 +784,8 @@ class table_theme {
$tsql = load::own_class('tsql','new');
$this->search[] = self::input_search(['e_number','广告位编号',$_M['form']['e_number']],'输入广告位编号');
//位置
$this->select2 = [
'_fiend' => ['veaps','位置'],
'placeholder' => '可选择多个位置',
'fiend' => 'p_value',
'tname' => 'para',
'source' => 'search_para_eaps',
'allnone' => 0,
'condition' => 'p_type|||0'
];
$this->search[] = self::input_select_search_multiple();
// $para = $tsql->table('para')->where(['p_type' => 0])->all();
// $this->search[] = self::para_select($para,['e_aps','位置']);
$para = $tsql->table('para')->where(['p_type' => 0])->all();
$this->search[] = self::para_select($para,['e_aps','位置']);
//门口方位
$para = $tsql->table('para')->where(['p_type' => 3])->all();
$this->search[] = self::para_select($para,['e_bno','门口方位']);

View File

@ -32,6 +32,13 @@ trait tdata {
case 'applan':
//判断是否可选的依据
if(!empty($this->form['slid'])) $where = " AND nla.id != '{$this->form['slid']}' ";
// 不考虑导出的情况
if(is_array($this->form['veaps'])){
$veaps = parent::strchange(array_filter($this->form['veaps']));
$this->villages_where = " e_aps IN($veaps) ";
}
//表
$sqlk = " {$_YW['k']['elevator']} AS el "
. "LEFT JOIN (SELECT * FROM( SELECT DISTINCT( nel.e_number ) AS nowe_number,ANY_VALUE( nla.id ) AS nowid,ANY_VALUE( nla.l_title ) AS nowtitle,ANY_VALUE( nla.l_starttime ) AS nowstime,ANY_VALUE( nla.l_endtime ) AS nowetime,if(NOT ( nla.l_endtime < '{$curdate}' OR nla.l_starttime > '{$curdate}' ) OR nla.l_starttime > '{$curdate}',1,0) AS estate FROM {$_YW['k']['elevator']} AS nel LEFT JOIN {$_YW['k']['launch']} AS nla ON find_in_set( nel.e_number, nla.l_enumber ) WHERE NOT ( nla.l_endtime < '{$curdate}' OR nla.l_starttime > '{$curdate}' ) AND nla.id IS NOT NULL ORDER BY nowstime ASC ) eala GROUP BY nowe_number ) ala ON ala.nowe_number = el.e_number "
@ -291,8 +298,9 @@ trait tdata {
switch ($this->tname) {
case 'applan':
$this->search_input = ['e_number'];
$this->search_other = ['e_aps','e_bno','e_vid','e_enable'];
$this->search_other = ['e_bno','e_vid','e_enable'];
$where .= self::td_search();
if(is_array($this->form['veaps'])) $where .= " AND {$this->villages_where} ";
break;
case 'elevators':
$this->search_input = ['e_number'];