场所新增维保人员
This commit is contained in:
parent
b1d073b9e7
commit
ea653e1baa
|
|
@ -1,12 +1,12 @@
|
||||||
<?php
|
<?php
|
||||||
defined('IN_MET') or exit ('No permission');
|
|
||||||
|
defined('IN_MET') or exit('No permission');
|
||||||
|
|
||||||
load::own_class('appadmin');
|
load::own_class('appadmin');
|
||||||
|
|
||||||
class info_off extends appadmin {
|
class info_off extends appadmin {
|
||||||
|
|
||||||
private $form;
|
private $form;
|
||||||
|
|
||||||
// 文字提示
|
// 文字提示
|
||||||
private $tips = '';
|
private $tips = '';
|
||||||
//跳转URL
|
//跳转URL
|
||||||
|
|
@ -14,34 +14,32 @@ class info_off extends appadmin {
|
||||||
//当前时间
|
//当前时间
|
||||||
private $timedate;
|
private $timedate;
|
||||||
|
|
||||||
public function __construct()
|
public function __construct() {
|
||||||
{
|
global $_M, $_YW;
|
||||||
global $_M,$_YW;
|
|
||||||
parent::__construct();
|
parent::__construct();
|
||||||
$this->form = $_M['form'];
|
$this->form = $_M['form'];
|
||||||
$this->tname = $_M['form']['tname'];
|
$this->tname = $_M['form']['tname'];
|
||||||
$this->timedate = date('Y-m-d H:i:s', time());
|
$this->timedate = date('Y-m-d H:i:s', time());
|
||||||
}
|
}
|
||||||
|
|
||||||
public function __destruct()
|
public function __destruct() {
|
||||||
{
|
global $_M, $_YW;
|
||||||
global $_M,$_YW;
|
if ($this->destruct) {
|
||||||
if($this->destruct){
|
turnover(empty($this->returl) ? $_M['url']['own_name'] . 'c=table_on&a=do' . $this->tname : $this->returl, $this->tips);
|
||||||
turnover(empty($this->returl)?$_M['url']['own_name'] . 'c=table_on&a=do'.$this->tname:$this->returl, $this->tips);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
public function doindex() {
|
public function doindex() {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
switch ($this->tname) {
|
switch ($this->tname) {
|
||||||
case 'village':
|
case 'village':
|
||||||
self::village();
|
self::village();
|
||||||
case 'elevator':
|
case 'elevator':
|
||||||
$e_bno = stringto_array($this->form['e_bno'],'#@met@#');
|
$e_bno = stringto_array($this->form['e_bno'], '#@met@#');
|
||||||
$e_aps = stringto_array($this->form['e_aps'],'#@met@#');
|
$e_aps = stringto_array($this->form['e_aps'], '#@met@#');
|
||||||
foreach ($e_bno as $bno) {
|
foreach ($e_bno as $bno) {
|
||||||
foreach ($e_aps as $aps) {
|
foreach ($e_aps as $aps) {
|
||||||
self::elevator($bno,$aps);
|
self::elevator($bno, $aps);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
@ -54,7 +52,7 @@ class info_off extends appadmin {
|
||||||
|
|
||||||
//场所
|
//场所
|
||||||
private function village() {
|
private function village() {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
|
|
||||||
$field = [
|
$field = [
|
||||||
'v_name' => $this->form['v_name'],
|
'v_name' => $this->form['v_name'],
|
||||||
|
|
@ -68,17 +66,18 @@ class info_off extends appadmin {
|
||||||
'v_price' => $this->form['v_price'],
|
'v_price' => $this->form['v_price'],
|
||||||
'v_psize' => $this->form['v_psize'],
|
'v_psize' => $this->form['v_psize'],
|
||||||
'v_forbidtype' => $this->form['v_forbidtype'],
|
'v_forbidtype' => $this->form['v_forbidtype'],
|
||||||
|
'v_service' => $this->form['v_service'],
|
||||||
'v_text' => $this->form['v_text']
|
'v_text' => $this->form['v_text']
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->form['id']){
|
if ($this->form['id']) {
|
||||||
$field['v_updatetime'] = $this->timedate;
|
$field['v_updatetime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
->where(['id'=>$this->form['id']])
|
->where(['id' => $this->form['id']])
|
||||||
->upd();
|
->upd();
|
||||||
$this->tips = '更新成功';
|
$this->tips = '更新成功';
|
||||||
}else{
|
} else {
|
||||||
$field['v_addtime'] = $this->timedate;
|
$field['v_addtime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
|
|
@ -87,12 +86,13 @@ class info_off extends appadmin {
|
||||||
}
|
}
|
||||||
// 检测sql是否有错误
|
// 检测sql是否有错误
|
||||||
$error = $this->tsql->error();
|
$error = $this->tsql->error();
|
||||||
if($error) $this->tips = '操作失败:'.$error;
|
if ($error)
|
||||||
|
$this->tips = '操作失败:' . $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
//企业
|
//企业
|
||||||
private function customer() {
|
private function customer() {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
|
|
||||||
$field = [
|
$field = [
|
||||||
'c_allname' => $this->form['c_allname'],
|
'c_allname' => $this->form['c_allname'],
|
||||||
|
|
@ -106,14 +106,14 @@ class info_off extends appadmin {
|
||||||
'c_text' => $this->form['c_text']
|
'c_text' => $this->form['c_text']
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->form['id']){
|
if ($this->form['id']) {
|
||||||
$field['c_updatetime'] = $this->timedate;
|
$field['c_updatetime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
->where(['id'=>$this->form['id']])
|
->where(['id' => $this->form['id']])
|
||||||
->upd();
|
->upd();
|
||||||
$this->tips = '更新成功';
|
$this->tips = '更新成功';
|
||||||
}else{
|
} else {
|
||||||
$field['c_addtime'] = $this->timedate;
|
$field['c_addtime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
|
|
@ -122,12 +122,13 @@ class info_off extends appadmin {
|
||||||
}
|
}
|
||||||
// 检测sql是否有错误
|
// 检测sql是否有错误
|
||||||
$error = $this->tsql->error();
|
$error = $this->tsql->error();
|
||||||
if($error) $this->tips = '操作失败:'.$error;
|
if ($error)
|
||||||
|
$this->tips = '操作失败:' . $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
//企业联系人
|
//企业联系人
|
||||||
private function workers() {
|
private function workers() {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
|
|
||||||
$field = [
|
$field = [
|
||||||
'w_jid' => $this->form['w_jid'],
|
'w_jid' => $this->form['w_jid'],
|
||||||
|
|
@ -136,14 +137,14 @@ class info_off extends appadmin {
|
||||||
'w_text' => $this->form['w_text']
|
'w_text' => $this->form['w_text']
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->form['id']){
|
if ($this->form['id']) {
|
||||||
$field['w_updatetime'] = $this->timedate;
|
$field['w_updatetime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
->where(['id'=>$this->form['id']])
|
->where(['id' => $this->form['id']])
|
||||||
->upd();
|
->upd();
|
||||||
$this->tips = '更新成功';
|
$this->tips = '更新成功';
|
||||||
}else{
|
} else {
|
||||||
$field['w_addtime'] = $this->timedate;
|
$field['w_addtime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
|
|
@ -152,14 +153,16 @@ class info_off extends appadmin {
|
||||||
}
|
}
|
||||||
// 检测sql是否有错误
|
// 检测sql是否有错误
|
||||||
$error = $this->tsql->error();
|
$error = $this->tsql->error();
|
||||||
if($error) $this->tips = '操作失败:'.$error;
|
if ($error)
|
||||||
|
$this->tips = '操作失败:' . $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
//广告位
|
//广告位
|
||||||
private function elevator($e_bno,$e_aps) {
|
private function elevator($e_bno, $e_aps) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
$e_number = $this->form['e_number'];
|
$e_number = $this->form['e_number'];
|
||||||
if(!$this->form['id']) parent::e_number($e_number,$e_bno.$e_aps);
|
if (!$this->form['id'])
|
||||||
|
parent::e_number($e_number, $e_bno . $e_aps);
|
||||||
$field = [
|
$field = [
|
||||||
'e_number' => $e_number,
|
'e_number' => $e_number,
|
||||||
'e_vid' => $this->form['e_vid'],
|
'e_vid' => $this->form['e_vid'],
|
||||||
|
|
@ -171,13 +174,13 @@ class info_off extends appadmin {
|
||||||
'e_text' => $this->form['e_text']
|
'e_text' => $this->form['e_text']
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->form['id']){
|
if ($this->form['id']) {
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
->where(['id'=>$this->form['id']])
|
->where(['id' => $this->form['id']])
|
||||||
->upd();
|
->upd();
|
||||||
$this->tips = '更新成功';
|
$this->tips = '更新成功';
|
||||||
}else{
|
} else {
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
->add();
|
->add();
|
||||||
|
|
@ -189,31 +192,32 @@ class info_off extends appadmin {
|
||||||
//判断为修改编号则需要清理掉旧的编号
|
//判断为修改编号则需要清理掉旧的编号
|
||||||
$olde_number = $this->form['olde_number'];
|
$olde_number = $this->form['olde_number'];
|
||||||
$enumber = $this->form['e_number'];
|
$enumber = $this->form['e_number'];
|
||||||
if(!$error && $this->form['id'] && $olde_number != $enumber ){
|
if (!$error && $this->form['id'] && $olde_number != $enumber) {
|
||||||
$this->tsql->table('schedule')->where(['s_enumber' => $olde_number ])->del();
|
$this->tsql->table('schedule')->where(['s_enumber' => $olde_number])->del();
|
||||||
//清理掉缓存排期表 met_dzadsod_
|
//清理掉缓存排期表 met_dzadsod_
|
||||||
// olde_number
|
// olde_number
|
||||||
//替换掉旧的投放表内的编号 met_dzadsod_
|
//替换掉旧的投放表内的编号 met_dzadsod_
|
||||||
// ['l_enumber' => '','l_selectenum']
|
// ['l_enumber' => '','l_selectenum']
|
||||||
$launch = $this->tsql->table('launch')->where(" find_in_set( '{$olde_number}', l_enumber ) OR find_in_set( '{$olde_number}', l_selectenum ) ")->all();
|
$launch = $this->tsql->table('launch')->where(" find_in_set( '{$olde_number}', l_enumber ) OR find_in_set( '{$olde_number}', l_selectenum ) ")->all();
|
||||||
foreach ($launch as $val) {
|
foreach ($launch as $val) {
|
||||||
$lenumber = arrayto_string(array_unique(stringto_array($val['l_enumber'],',')),',');
|
$lenumber = arrayto_string(array_unique(stringto_array($val['l_enumber'], ',')), ',');
|
||||||
$l_enumber = preg_replace(["/^{$olde_number}$/","/^{$olde_number},/","/,{$olde_number},/","/,{$olde_number}$/"],[$enumber,"{$enumber},",",{$enumber},",",{$enumber}"],$lenumber);
|
$l_enumber = preg_replace(["/^{$olde_number}$/", "/^{$olde_number},/", "/,{$olde_number},/", "/,{$olde_number}$/"], [$enumber, "{$enumber},", ",{$enumber},", ",{$enumber}"], $lenumber);
|
||||||
$lselectenum = arrayto_string(array_unique(stringto_array($val['l_selectenum'],',')),',');
|
$lselectenum = arrayto_string(array_unique(stringto_array($val['l_selectenum'], ',')), ',');
|
||||||
$l_selectenum = preg_replace(["/^{$olde_number}$/","/^{$olde_number},/","/,{$olde_number},/","/,{$olde_number}$/"],[$enumber,"{$enumber},",",{$enumber},",",{$enumber}"],$lselectenum);
|
$l_selectenum = preg_replace(["/^{$olde_number}$/", "/^{$olde_number},/", "/,{$olde_number},/", "/,{$olde_number}$/"], [$enumber, "{$enumber},", ",{$enumber},", ",{$enumber}"], $lselectenum);
|
||||||
//修改
|
//修改
|
||||||
$this->tsql->table('launch')->field(['l_enumber' => $l_enumber, 'l_selectenum' => $l_selectenum ])->where(['id' => $val['id'] ])->upd();
|
$this->tsql->table('launch')->field(['l_enumber' => $l_enumber, 'l_selectenum' => $l_selectenum])->where(['id' => $val['id']])->upd();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if($error) $this->tips = '操作失败:'.$error;
|
if ($error)
|
||||||
|
$this->tips = '操作失败:' . $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
//合同录入
|
//合同录入
|
||||||
private function contract() {
|
private function contract() {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//报错
|
//报错
|
||||||
if(strtotime($this->form['h_starttime']) > strtotime($this->form['h_endtime'])){
|
if (strtotime($this->form['h_starttime']) > strtotime($this->form['h_endtime'])) {
|
||||||
$this->destruct = false;
|
$this->destruct = false;
|
||||||
parent::scriptgo("投放结束时间({$this->form['h_starttime']})不能小于开始时间({$this->form['h_endtime']})!");
|
parent::scriptgo("投放结束时间({$this->form['h_starttime']})不能小于开始时间({$this->form['h_endtime']})!");
|
||||||
}
|
}
|
||||||
|
|
@ -222,25 +226,25 @@ class info_off extends appadmin {
|
||||||
'h_number' => $this->form['h_number'],
|
'h_number' => $this->form['h_number'],
|
||||||
'h_signtime' => $this->form['h_signtime'],
|
'h_signtime' => $this->form['h_signtime'],
|
||||||
'h_cid' => $this->form['h_cid'],
|
'h_cid' => $this->form['h_cid'],
|
||||||
'h_wid' => arrayto_string($this->form['h_wid'],','),
|
'h_wid' => arrayto_string($this->form['h_wid'], ','),
|
||||||
'h_tprice' => $this->form['h_tprice'],
|
'h_tprice' => $this->form['h_tprice'],
|
||||||
'h_starttime' => $this->form['h_starttime'],
|
'h_starttime' => $this->form['h_starttime'],
|
||||||
'h_endtime' => $this->form['h_endtime'],
|
'h_endtime' => $this->form['h_endtime'],
|
||||||
'h_noticeday' => arrayto_string(array_unique(stringto_array($this->form['h_noticeday'],',')),','), //对数组进行去重处理
|
'h_noticeday' => arrayto_string(array_unique(stringto_array($this->form['h_noticeday'], ',')), ','), //对数组进行去重处理
|
||||||
'h_text' => $this->form['h_text'],
|
'h_text' => $this->form['h_text'],
|
||||||
'h_tower' => $this->form['h_tower'],
|
'h_tower' => $this->form['h_tower'],
|
||||||
'h_texta' => $this->form['h_texta'],
|
'h_texta' => $this->form['h_texta'],
|
||||||
'h_medium' => $this->form['h_medium']
|
'h_medium' => $this->form['h_medium']
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->form['id']){
|
if ($this->form['id']) {
|
||||||
$field['h_updatetime'] = $this->timedate;
|
$field['h_updatetime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
->where(['id'=>$this->form['id']])
|
->where(['id' => $this->form['id']])
|
||||||
->upd();
|
->upd();
|
||||||
$this->tips = '更新成功';
|
$this->tips = '更新成功';
|
||||||
}else{
|
} else {
|
||||||
$field['h_addtime'] = $this->timedate;
|
$field['h_addtime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
|
|
@ -249,16 +253,17 @@ class info_off extends appadmin {
|
||||||
}
|
}
|
||||||
// 检测sql是否有错误
|
// 检测sql是否有错误
|
||||||
$error = $this->tsql->error();
|
$error = $this->tsql->error();
|
||||||
if($error) $this->tips = '操作失败:'.$error;
|
if ($error)
|
||||||
|
$this->tips = '操作失败:' . $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
//投放计划保存
|
//投放计划保存
|
||||||
private function launch() {
|
private function launch() {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
$this->destruct = false;
|
$this->destruct = false;
|
||||||
|
|
||||||
// 每次保存都要计算时间是否合法
|
// 每次保存都要计算时间是否合法
|
||||||
if(strtotime($this->form['l_starttime']) > strtotime($this->form['l_endtime'])){
|
if (strtotime($this->form['l_starttime']) > strtotime($this->form['l_endtime'])) {
|
||||||
echo parent::jsoncallback([
|
echo parent::jsoncallback([
|
||||||
'slid' => $this->form['slid'],
|
'slid' => $this->form['slid'],
|
||||||
'code' => false,
|
'code' => false,
|
||||||
|
|
@ -278,7 +283,7 @@ class info_off extends appadmin {
|
||||||
'l_text' => $this->form['l_text']
|
'l_text' => $this->form['l_text']
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->form['slid']){
|
if ($this->form['slid']) {
|
||||||
$field['l_updatetime'] = $this->timedate;
|
$field['l_updatetime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
|
|
@ -286,7 +291,7 @@ class info_off extends appadmin {
|
||||||
->upd();
|
->upd();
|
||||||
// $query = $this->tsql->query();
|
// $query = $this->tsql->query();
|
||||||
$slid = $this->form['slid'];
|
$slid = $this->form['slid'];
|
||||||
}else{
|
} else {
|
||||||
$field['l_addtime'] = $this->timedate;
|
$field['l_addtime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
|
|
@ -302,25 +307,23 @@ class info_off extends appadmin {
|
||||||
$schedule = $this->tsql->table('schedule')
|
$schedule = $this->tsql->table('schedule')
|
||||||
->where(['s_lid' => $slid])
|
->where(['s_lid' => $slid])
|
||||||
->all();
|
->all();
|
||||||
$enumber = stringto_array($this->form['l_selectenum'],',');
|
$enumber = stringto_array($this->form['l_selectenum'], ',');
|
||||||
foreach ($schedule as $val) {
|
foreach ($schedule as $val) {
|
||||||
if(!in_array($val['s_enumber'], $enumber)){
|
if (!in_array($val['s_enumber'], $enumber)) {
|
||||||
$this->tsql->table('schedule')
|
$this->tsql->table('schedule')
|
||||||
->where(['id' => $val['id'] ])
|
->where(['id' => $val['id']])
|
||||||
->del();
|
->del();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//返回结果
|
//返回结果
|
||||||
$array = $error || $slid == 0
|
$array = $error || $slid == 0 ? ['slid' => $slid, 'code' => false, 'text' => "投放信息处理失败,广告位没有执行排期!错误提示({$error})", $this->form] : ['slid' => $slid, 'code' => true, 'text' => '投放信息处理成功。'];
|
||||||
?['slid' => $slid,'code' => false,'text' => "投放信息处理失败,广告位没有执行排期!错误提示({$error})",$this->form]
|
|
||||||
:['slid' => $slid,'code' => true,'text' => '投放信息处理成功。'];
|
|
||||||
echo parent::jsoncallback($array);
|
echo parent::jsoncallback($array);
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function keylist() {
|
private function keylist() {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
$field = [
|
$field = [
|
||||||
'k_passkey' => md5($this->form['k_passkey']),
|
'k_passkey' => md5($this->form['k_passkey']),
|
||||||
'k_basekey' => base64_encode($this->form['k_passkey']),
|
'k_basekey' => base64_encode($this->form['k_passkey']),
|
||||||
|
|
@ -329,14 +332,14 @@ class info_off extends appadmin {
|
||||||
'k_text' => $this->form['k_text']
|
'k_text' => $this->form['k_text']
|
||||||
];
|
];
|
||||||
|
|
||||||
if($this->form['id']){
|
if ($this->form['id']) {
|
||||||
$field['k_updatetime'] = $this->timedate;
|
$field['k_updatetime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
->where(['id'=>$this->form['id']])
|
->where(['id' => $this->form['id']])
|
||||||
->upd();
|
->upd();
|
||||||
$this->tips = '更新成功';
|
$this->tips = '更新成功';
|
||||||
}else{
|
} else {
|
||||||
$field['k_addtime'] = $this->timedate;
|
$field['k_addtime'] = $this->timedate;
|
||||||
$this->tsql->table($this->tname)
|
$this->tsql->table($this->tname)
|
||||||
->field($field)
|
->field($field)
|
||||||
|
|
@ -345,8 +348,10 @@ class info_off extends appadmin {
|
||||||
}
|
}
|
||||||
// 检测sql是否有错误
|
// 检测sql是否有错误
|
||||||
$error = $this->tsql->error();
|
$error = $this->tsql->error();
|
||||||
if($error) $this->tips = '操作失败:'.$error;
|
if ($error)
|
||||||
|
$this->tips = '操作失败:' . $error;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
@ -89,6 +89,15 @@ $met_title = $data['met_title'];
|
||||||
<span class="text-help m-l-10">禁投行业标签,可设置多个</span>
|
<span class="text-help m-l-10">禁投行业标签,可设置多个</span>
|
||||||
</dd>
|
</dd>
|
||||||
</dl>
|
</dl>
|
||||||
|
<dl>
|
||||||
|
<dt><label class='form-control-label'>维保人员</label></dt>
|
||||||
|
<dd class="form-group">
|
||||||
|
<input type="text" name="v_service"
|
||||||
|
value="{$data.data.v_service}"
|
||||||
|
class="form-control"
|
||||||
|
placeholder="请输入维保人员姓名">
|
||||||
|
</dd>
|
||||||
|
</dl>
|
||||||
<dl>
|
<dl>
|
||||||
<dt><label class='form-control-label'>备注</label></dt>
|
<dt><label class='form-control-label'>备注</label></dt>
|
||||||
<dd class="form-group">
|
<dd class="form-group">
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@ trait tfield {
|
||||||
|
|
||||||
//广告位统计
|
//广告位统计
|
||||||
protected function tf_elevator($sign = true) {
|
protected function tf_elevator($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'e_enable' => '状态',
|
'e_enable' => '状态',
|
||||||
'e_number' => '广告位编号',
|
'e_number' => '广告位编号',
|
||||||
|
|
@ -20,7 +20,7 @@ trait tfield {
|
||||||
|
|
||||||
//场所统计
|
//场所统计
|
||||||
protected function tf_village($sign = true) {
|
protected function tf_village($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'v_name' => '场所名称',
|
'v_name' => '场所名称',
|
||||||
'v_type' => '场所分类',
|
'v_type' => '场所分类',
|
||||||
|
|
@ -33,13 +33,14 @@ trait tfield {
|
||||||
'v_addtime' => '录入时间',
|
'v_addtime' => '录入时间',
|
||||||
'v_updatetime' => '修改时间',
|
'v_updatetime' => '修改时间',
|
||||||
'v_forbidtype' => '禁投行业',
|
'v_forbidtype' => '禁投行业',
|
||||||
|
'v_service' => '维保人员',
|
||||||
'v_text' => '备注'
|
'v_text' => '备注'
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
//广告合同关联表
|
//广告合同关联表
|
||||||
protected function tf_schedule($sign = '') {
|
protected function tf_schedule($sign = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//Table
|
//Table
|
||||||
$array = [
|
$array = [
|
||||||
'e_enable' => '状态',
|
'e_enable' => '状态',
|
||||||
|
|
@ -68,12 +69,12 @@ trait tfield {
|
||||||
'l_endtime' => '结束时间',
|
'l_endtime' => '结束时间',
|
||||||
'ltype' => '投放状态' //标记是否已经结束
|
'ltype' => '投放状态' //标记是否已经结束
|
||||||
];
|
];
|
||||||
return $sign || $this->bsign?$barray:$array;
|
return $sign || $this->bsign ? $barray : $array;
|
||||||
}
|
}
|
||||||
|
|
||||||
//合同
|
//合同
|
||||||
protected function tf_contract($sign = true) {
|
protected function tf_contract($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'h_number' => '合同编号',
|
'h_number' => '合同编号',
|
||||||
'h_medium' => '投放媒介',
|
'h_medium' => '投放媒介',
|
||||||
|
|
@ -95,7 +96,7 @@ trait tfield {
|
||||||
|
|
||||||
//企业资料
|
//企业资料
|
||||||
protected function tf_customer($sign = true) {
|
protected function tf_customer($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'c_allname' => '公司名称',
|
'c_allname' => '公司名称',
|
||||||
'c_name' => '公司简称',
|
'c_name' => '公司简称',
|
||||||
|
|
@ -110,7 +111,7 @@ trait tfield {
|
||||||
|
|
||||||
//企业联系人
|
//企业联系人
|
||||||
protected function tf_workers($sign = true) {
|
protected function tf_workers($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
// 'w_cid' => '隶属公司',
|
// 'w_cid' => '隶属公司',
|
||||||
'w_jid' => '职务id',
|
'w_jid' => '职务id',
|
||||||
|
|
@ -124,7 +125,7 @@ trait tfield {
|
||||||
|
|
||||||
//参数
|
//参数
|
||||||
protected function tf_para($sign = true) {
|
protected function tf_para($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'p_type' => '参数分类',
|
'p_type' => '参数分类',
|
||||||
'p_value' => '参数值',
|
'p_value' => '参数值',
|
||||||
|
|
@ -137,7 +138,7 @@ trait tfield {
|
||||||
|
|
||||||
// 投放页面选择广告位
|
// 投放页面选择广告位
|
||||||
protected function tf_launch($sign = true) {
|
protected function tf_launch($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'l_title' => '名称',
|
'l_title' => '名称',
|
||||||
'l_hnumber' => '合同编号',
|
'l_hnumber' => '合同编号',
|
||||||
|
|
@ -155,7 +156,7 @@ trait tfield {
|
||||||
|
|
||||||
// 投放页面选择广告位
|
// 投放页面选择广告位
|
||||||
protected function tf_applan($sign = true) {
|
protected function tf_applan($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'e_enable' => '状态',
|
'e_enable' => '状态',
|
||||||
'e_number' => '广告位编号',
|
'e_number' => '广告位编号',
|
||||||
|
|
@ -176,7 +177,7 @@ trait tfield {
|
||||||
|
|
||||||
//广告位查询统计
|
//广告位查询统计
|
||||||
protected function tf_elevators($sign = true) {
|
protected function tf_elevators($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'e_enable' => '状态',
|
'e_enable' => '状态',
|
||||||
'e_number' => '广告位编号',
|
'e_number' => '广告位编号',
|
||||||
|
|
@ -199,7 +200,7 @@ trait tfield {
|
||||||
|
|
||||||
//广告位查询统计
|
//广告位查询统计
|
||||||
protected function tf_villages($sign = true) {
|
protected function tf_villages($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
$array = [
|
$array = [
|
||||||
'v_name' => '场所名称',
|
'v_name' => '场所名称',
|
||||||
'v_type' => '场所分类',
|
'v_type' => '场所分类',
|
||||||
|
|
@ -214,7 +215,7 @@ trait tfield {
|
||||||
'v_prerow' => '预排的个数',
|
'v_prerow' => '预排的个数',
|
||||||
'v_text' => '备注'
|
'v_text' => '备注'
|
||||||
];
|
];
|
||||||
if($this->bsign){
|
if ($this->bsign) {
|
||||||
$array['v_free'] = '闲置广告位总数';
|
$array['v_free'] = '闲置广告位总数';
|
||||||
$array['v_bno'] = '闲置门口方位';
|
$array['v_bno'] = '闲置门口方位';
|
||||||
$array['v_enum'] = '广告位总数';
|
$array['v_enum'] = '广告位总数';
|
||||||
|
|
@ -222,7 +223,8 @@ trait tfield {
|
||||||
$array['v_price'] = '场所均价';
|
$array['v_price'] = '场所均价';
|
||||||
$array['v_psize'] = '居住规模';
|
$array['v_psize'] = '居住规模';
|
||||||
$array['v_forbidtype'] = '禁投行业';
|
$array['v_forbidtype'] = '禁投行业';
|
||||||
}else{
|
$array['v_service'] = '维保人员';
|
||||||
|
} else {
|
||||||
unset($array['v_district']);
|
unset($array['v_district']);
|
||||||
}
|
}
|
||||||
return $array;
|
return $array;
|
||||||
|
|
@ -230,7 +232,7 @@ trait tfield {
|
||||||
|
|
||||||
//广告位查询统计
|
//广告位查询统计
|
||||||
protected function tf_noticeday($sign = true) {
|
protected function tf_noticeday($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'h_number' => '合同编号',
|
'h_number' => '合同编号',
|
||||||
'h_signtime' => '签订日期',
|
'h_signtime' => '签订日期',
|
||||||
|
|
@ -247,7 +249,7 @@ trait tfield {
|
||||||
|
|
||||||
//前台巡查页面
|
//前台巡查页面
|
||||||
protected function tf_patrol($sign = true) {
|
protected function tf_patrol($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
'e_number' => '编号',
|
'e_number' => '编号',
|
||||||
'e_address' => '地址', //虚拟字段
|
'e_address' => '地址', //虚拟字段
|
||||||
|
|
@ -259,7 +261,7 @@ trait tfield {
|
||||||
|
|
||||||
//巡查列表
|
//巡查列表
|
||||||
protected function tf_keylist($sign = true) {
|
protected function tf_keylist($sign = true) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
return [
|
return [
|
||||||
// 'k_passkey' => '密钥密码',
|
// 'k_passkey' => '密钥密码',
|
||||||
'k_basekey' => '密文密码',
|
'k_basekey' => '密文密码',
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,10 @@ trait tlist {
|
||||||
|
|
||||||
//公用删除
|
//公用删除
|
||||||
//$query 主要用来替换删除按钮的值
|
//$query 主要用来替换删除按钮的值
|
||||||
protected function btn_group($val,$checked,$query = []) {
|
protected function btn_group($val, $checked, $query = []) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
if($query !== false){
|
if ($query !== false) {
|
||||||
$para = [
|
$para = [
|
||||||
'c' => 'table_off',
|
'c' => 'table_off',
|
||||||
'a' => 'doindex',
|
'a' => 'doindex',
|
||||||
|
|
@ -32,8 +32,8 @@ trait tlist {
|
||||||
'all_id' => $val['id'],
|
'all_id' => $val['id'],
|
||||||
'tname' => $this->tname,
|
'tname' => $this->tname,
|
||||||
];
|
];
|
||||||
$query = array_merge($para,$query);
|
$query = array_merge($para, $query);
|
||||||
$href = parent::http_build_query($_M['url']['own_name'],$query);
|
$href = parent::http_build_query($_M['url']['own_name'], $query);
|
||||||
$this->btn[] = '<a
|
$this->btn[] = '<a
|
||||||
class="btn btn-danger btn-sm"
|
class="btn btn-danger btn-sm"
|
||||||
table-delet
|
table-delet
|
||||||
|
|
@ -42,282 +42,292 @@ trait tlist {
|
||||||
data-label-ok="确定"
|
data-label-ok="确定"
|
||||||
data-label-cancel="取消"
|
data-label-cancel="取消"
|
||||||
data-confirm-title="确定要删除选中的信息吗?一旦删除将不能恢复!"
|
data-confirm-title="确定要删除选中的信息吗?一旦删除将不能恢复!"
|
||||||
href="'.$href.'"
|
href="' . $href . '"
|
||||||
>删除</a>';
|
>删除</a>';
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$this->btn[] = '<button type="button" class="btn btn-default btn-outline m-l-5" table-cancel>撤销</button>';
|
$this->btn[] = '<button type="button" class="btn btn-default btn-outline m-l-5" table-cancel>撤销</button>';
|
||||||
|
|
||||||
}
|
}
|
||||||
if(count($this->btn) > 0){
|
if (count($this->btn) > 0) {
|
||||||
$btnstr = arrayto_string($this->btn,'');
|
$btnstr = arrayto_string($this->btn, '');
|
||||||
unset($this->btn);
|
unset($this->btn);
|
||||||
return '<div class="btn-group" role="group" >'.$btnstr.'</div>';
|
return '<div class="btn-group" role="group" >' . $btnstr . '</div>';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//整合
|
//整合
|
||||||
private function assemble($key,$base,$val,$checked,$query = []) {
|
private function assemble($key, $base, $val, $checked, $query = []) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//搜索处理
|
//搜索处理
|
||||||
foreach ($this->search_input as $vs){
|
foreach ($this->search_input as $vs) {
|
||||||
if(in_array($vs, $this->skip_field,true)) continue;
|
if (in_array($vs, $this->skip_field, true))
|
||||||
|
continue;
|
||||||
$search = trim(strtoupper($this->form[$vs]));
|
$search = trim(strtoupper($this->form[$vs]));
|
||||||
if($search != null) $val[$vs] = str_ireplace($search, '<font color="#FF0000">'.$search.'</font>', $val[$vs]);
|
if ($search != null)
|
||||||
|
$val[$vs] = str_ireplace($search, '<font color="#FF0000">' . $search . '</font>', $val[$vs]);
|
||||||
}
|
}
|
||||||
//按钮组处理
|
//按钮组处理
|
||||||
$operation = [];
|
$operation = [];
|
||||||
if($this->banbtn == false) $operation['__operation'] = self::btn_group($val,$checked,$query);
|
if ($this->banbtn == false)
|
||||||
|
$operation['__operation'] = self::btn_group($val, $checked, $query);
|
||||||
//结果整合处理
|
//结果整合处理
|
||||||
return array_merge($base,$key,array_intersect_key($val,$key),$operation);
|
return array_merge($base, $key, array_intersect_key($val, $key), $operation);
|
||||||
}
|
}
|
||||||
|
|
||||||
//广告位详细地址转换
|
//广告位详细地址转换
|
||||||
protected function eaddress(&$val,$_address = 'e_address',$sign = false){
|
protected function eaddress(&$val, $_address = 'e_address', $sign = false) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//门口方位
|
//门口方位
|
||||||
if(empty(self::$para['e_bno'])) self::$para['e_bno'] = parent::translate(3);
|
if (empty(self::$para['e_bno']))
|
||||||
|
self::$para['e_bno'] = parent::translate(3);
|
||||||
//广告位置
|
//广告位置
|
||||||
if(empty(self::$para['e_aps'])) self::$para['e_aps'] = parent::translate();
|
if (empty(self::$para['e_aps']))
|
||||||
|
self::$para['e_aps'] = parent::translate();
|
||||||
//场所
|
//场所
|
||||||
if(empty(self::$village[$val['e_vid']])) self::$village[$val['e_vid']] = parent::villagelist($val['e_vid']);
|
if (empty(self::$village[$val['e_vid']]))
|
||||||
|
self::$village[$val['e_vid']] = parent::villagelist($val['e_vid']);
|
||||||
|
|
||||||
if($sign){
|
if ($sign) {
|
||||||
$val['e_vid'] = self::$village[$val['e_vid']];
|
$val['e_vid'] = self::$village[$val['e_vid']];
|
||||||
$val['e_bno'] = self::$para['e_bno'][$val['e_bno']];
|
$val['e_bno'] = self::$para['e_bno'][$val['e_bno']];
|
||||||
$val['e_aps'] = self::$para['e_aps'][$val['e_aps']];
|
$val['e_aps'] = self::$para['e_aps'][$val['e_aps']];
|
||||||
}else{
|
} else {
|
||||||
$villages = [
|
$villages = [
|
||||||
self::$village[$val['e_vid']],
|
self::$village[$val['e_vid']],
|
||||||
self::$para['e_bno'][$val['e_bno']],
|
self::$para['e_bno'][$val['e_bno']],
|
||||||
self::$para['e_aps'][$val['e_aps']]
|
self::$para['e_aps'][$val['e_aps']]
|
||||||
];
|
];
|
||||||
$val[$_address] = arrayto_string($villages,' ');
|
$val[$_address] = arrayto_string($villages, ' ');
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
// | 各表处理
|
// | 各表处理
|
||||||
// +----------------------------------------------------------------------
|
// +----------------------------------------------------------------------
|
||||||
|
|
||||||
//广告位统计
|
//广告位统计
|
||||||
protected function elevator($val,$checked = '') {
|
protected function elevator($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_elevator();
|
$key = self::tf_elevator();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'">
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '">
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
//对字段处理
|
//对字段处理
|
||||||
//门口方位
|
//门口方位
|
||||||
if(empty(self::$para['e_bno'])) self::$para['e_bno'] = parent::translate(3);
|
if (empty(self::$para['e_bno']))
|
||||||
|
self::$para['e_bno'] = parent::translate(3);
|
||||||
//广告位置
|
//广告位置
|
||||||
if(empty(self::$para['e_aps'])) self::$para['e_aps'] = parent::translate();
|
if (empty(self::$para['e_aps']))
|
||||||
|
self::$para['e_aps'] = parent::translate();
|
||||||
//场所
|
//场所
|
||||||
if(empty(self::$village[$val['e_vid']])) self::$village[$val['e_vid']] = parent::villagelist($val['e_vid']);
|
if (empty(self::$village[$val['e_vid']]))
|
||||||
|
self::$village[$val['e_vid']] = parent::villagelist($val['e_vid']);
|
||||||
|
|
||||||
$scheduleurl = $this->own_name_table.'elevators&e_number='.$val['e_number'];
|
$scheduleurl = $this->own_name_table . 'elevators&e_number=' . $val['e_number'];
|
||||||
|
|
||||||
$val['e_number'] = '<a href="'.$scheduleurl.'"> '.$val['e_number'].'</a>';
|
$val['e_number'] = '<a href="' . $scheduleurl . '"> ' . $val['e_number'] . '</a>';
|
||||||
$val['e_enable'] = parent::type_onoff('e_enable',$val['e_enable'],$val['id'],['禁用','启用']);
|
$val['e_enable'] = parent::type_onoff('e_enable', $val['e_enable'], $val['id'], ['禁用', '启用']);
|
||||||
|
|
||||||
$val['e_vid'] = self::$village[$val['e_vid']];
|
$val['e_vid'] = self::$village[$val['e_vid']];
|
||||||
$val['e_bno'] = self::$para['e_bno'][$val['e_bno']];
|
$val['e_bno'] = self::$para['e_bno'][$val['e_bno']];
|
||||||
$val['e_aps'] = self::$para['e_aps'][$val['e_aps']];
|
$val['e_aps'] = self::$para['e_aps'][$val['e_aps']];
|
||||||
$val['e_state'] = parent::e_state();
|
$val['e_state'] = parent::e_state();
|
||||||
$val['e_label'] = parent::tab_tokenfield($val['e_label'],2);
|
$val['e_label'] = parent::tab_tokenfield($val['e_label'], 2);
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$addtourl = $this->own_name_info.__FUNCTION__.'&id='.$val['id'];
|
$addtourl = $this->own_name_info . __FUNCTION__ . '&id=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-success btn-sm">编辑</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-success btn-sm">编辑</a>';
|
||||||
}
|
}
|
||||||
//跳过标记突出处理
|
//跳过标记突出处理
|
||||||
$this->skip_field = ['e_number'];
|
$this->skip_field = ['e_number'];
|
||||||
return self::assemble($key,$base,$val,$checked);
|
return self::assemble($key, $base, $val, $checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
//场所统计
|
//场所统计
|
||||||
protected function village($val,$checked = '') {
|
protected function village($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_village();
|
$key = self::tf_village();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'">
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '">
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
//对字段处理
|
//对字段处理
|
||||||
|
|
||||||
|
|
||||||
//场所分类
|
//场所分类
|
||||||
if(empty(self::$para['v_type'])) self::$para['v_type'] = parent::translate(6);
|
if (empty(self::$para['v_type']))
|
||||||
|
self::$para['v_type'] = parent::translate(6);
|
||||||
|
|
||||||
$vnameurl = $this->own_name_table.'elevator&e_vid='.$val['id'];
|
$vnameurl = $this->own_name_table . 'elevator&e_vid=' . $val['id'];
|
||||||
$totalstr = arrayto_string([$val['total'],$val['noban'],$val['normal']],' / ');
|
$totalstr = arrayto_string([$val['total'], $val['noban'], $val['normal']], ' / ');
|
||||||
|
|
||||||
$val['v_name'] = '<a href="'.$vnameurl.'"> '.$val['v_name'].'</a>';
|
$val['v_name'] = '<a href="' . $vnameurl . '"> ' . $val['v_name'] . '</a>';
|
||||||
$val['v_type'] = self::$para['v_type'][$val['v_type']];
|
$val['v_type'] = self::$para['v_type'][$val['v_type']];
|
||||||
$val['v_tel'] = parent::tab_tokenfield($val['v_tel'],1);
|
$val['v_tel'] = parent::tab_tokenfield($val['v_tel'], 1);
|
||||||
$val['v_address'] = $val['v_province'].$val['v_city'].$val['v_district'].$val['v_address'];
|
$val['v_address'] = $val['v_province'] . $val['v_city'] . $val['v_district'] . $val['v_address'];
|
||||||
$val['v_forbidtype'] = parent::tab_tokenfield($val['v_forbidtype'],2);
|
$val['v_forbidtype'] = parent::tab_tokenfield($val['v_forbidtype'], 2);
|
||||||
|
|
||||||
$val['v_totalstr'] = $val['noban'] > 0?parent::str_color(0,$totalstr,600):$totalstr;
|
$val['v_totalstr'] = $val['noban'] > 0 ? parent::str_color(0, $totalstr, 600) : $totalstr;
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$this->btn[] = '<a href="'.$vnameurl.'" class="btn btn-primary btn-sm">查看广告位</a>';
|
$this->btn[] = '<a href="' . $vnameurl . '" class="btn btn-primary btn-sm">查看广告位</a>';
|
||||||
$addtourl = $this->own_name_info.__FUNCTION__.'&id='.$val['id'];
|
$addtourl = $this->own_name_info . __FUNCTION__ . '&id=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-success btn-sm">编辑</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-success btn-sm">编辑</a>';
|
||||||
}
|
}
|
||||||
|
|
||||||
return self::assemble($key,$base,$val,$checked);
|
return self::assemble($key, $base, $val, $checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
//广告合同关联表
|
//广告合同关联表
|
||||||
protected function schedule($val,$checked = '',$base = []) {
|
protected function schedule($val, $checked = '', $base = []) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_schedule();
|
$key = self::tf_schedule();
|
||||||
//对字段处理
|
//对字段处理
|
||||||
//公司名称
|
//公司名称
|
||||||
if(empty(self::$customer[$val['h_cid']])) self::$customer[$val['h_cid']] = parent::customerlist($val['h_cid']);
|
if (empty(self::$customer[$val['h_cid']]))
|
||||||
|
self::$customer[$val['h_cid']] = parent::customerlist($val['h_cid']);
|
||||||
|
|
||||||
$s_type = strtotime($val['l_endtime']) >= strtotime(date('Y-m-d',time()))?1:0;
|
$s_type = strtotime($val['l_endtime']) >= strtotime(date('Y-m-d', time())) ? 1 : 0;
|
||||||
if(empty(self::$para['ltype']) && $s_type) self::$para['ltype'] = parent::translate(2);
|
if (empty(self::$para['ltype']) && $s_type)
|
||||||
|
self::$para['ltype'] = parent::translate(2);
|
||||||
|
|
||||||
$val['ltype'] = parent::state_color($s_type,['已经结束',self::$para['ltype'][$val['l_schedule']]]);
|
$val['ltype'] = parent::state_color($s_type, ['已经结束', self::$para['ltype'][$val['l_schedule']]]);
|
||||||
$val['h_cid'] = self::$customer[$val['h_cid']];
|
$val['h_cid'] = self::$customer[$val['h_cid']];
|
||||||
$val['e_enable'] = $val['e_enable'] == 0 || $this->bsign == false?parent::state_color($val['e_enable'],['禁用','启用']):'';
|
$val['e_enable'] = $val['e_enable'] == 0 || $this->bsign == false ? parent::state_color($val['e_enable'], ['禁用', '启用']) : '';
|
||||||
self::eaddress($val,'l_address',$this->bsign);
|
self::eaddress($val, 'l_address', $this->bsign);
|
||||||
return self::assemble($key,$base,$val,$checked,false);
|
return self::assemble($key, $base, $val, $checked, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//合同归档
|
//合同归档
|
||||||
protected function contract($val,$checked = '') {
|
protected function contract($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_contract();
|
$key = self::tf_contract();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'">
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '">
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
//对字段处理
|
//对字段处理
|
||||||
//公司名称
|
//公司名称
|
||||||
if(empty(self::$customer[$val['h_cid']])) self::$customer[$val['h_cid']] = parent::customerlist($val['h_cid']);
|
if (empty(self::$customer[$val['h_cid']]))
|
||||||
|
self::$customer[$val['h_cid']] = parent::customerlist($val['h_cid']);
|
||||||
//投放媒介
|
//投放媒介
|
||||||
if(empty(self::$para['h_medium'])) self::$para['h_medium'] = parent::translate(4);
|
if (empty(self::$para['h_medium']))
|
||||||
$h_mediumid = stringto_array($val['h_medium'],'#@met@#');
|
self::$para['h_medium'] = parent::translate(4);
|
||||||
|
$h_mediumid = stringto_array($val['h_medium'], '#@met@#');
|
||||||
foreach ($h_mediumid as $hmid) {
|
foreach ($h_mediumid as $hmid) {
|
||||||
$hmediumid[] = self::$para['h_medium'][$hmid];
|
$hmediumid[] = self::$para['h_medium'][$hmid];
|
||||||
}
|
}
|
||||||
|
|
||||||
//相关人员
|
//相关人员
|
||||||
$workerswid = stringto_array($val['h_wid'],',');
|
$workerswid = stringto_array($val['h_wid'], ',');
|
||||||
foreach ($workerswid as $hwid) {
|
foreach ($workerswid as $hwid) {
|
||||||
if(empty(self::$workers[$hwid])) self::$workers[$hwid] = parent::workerslist($hwid);
|
if (empty(self::$workers[$hwid]))
|
||||||
|
self::$workers[$hwid] = parent::workerslist($hwid);
|
||||||
$workersstr[] = self::$workers[$hwid];
|
$workersstr[] = self::$workers[$hwid];
|
||||||
}
|
}
|
||||||
|
|
||||||
//内连接
|
//内连接
|
||||||
$h_number = $val['h_number']; //避免后面采用
|
$h_number = $val['h_number']; //避免后面采用
|
||||||
$launchurl = $this->own_name_table.'launch&l_hnumber='.$h_number;
|
$launchurl = $this->own_name_table . 'launch&l_hnumber=' . $h_number;
|
||||||
$curdate = date('Y-m-d',time());
|
$curdate = date('Y-m-d', time());
|
||||||
|
|
||||||
$val['h_number'] = '<a href="'.$launchurl.'"> '.$h_number.'</a>';
|
$val['h_number'] = '<a href="' . $launchurl . '"> ' . $h_number . '</a>';
|
||||||
$val['h_cid'] = self::$customer[$val['h_cid']];
|
$val['h_cid'] = self::$customer[$val['h_cid']];
|
||||||
$val['h_wid'] = parent::tab_tokenfield(arrayto_string($workersstr),1);
|
$val['h_wid'] = parent::tab_tokenfield(arrayto_string($workersstr), 1);
|
||||||
$val['h_noticeday'] = parent::tab_tokenfield($val['h_noticeday'],2);
|
$val['h_noticeday'] = parent::tab_tokenfield($val['h_noticeday'], 2);
|
||||||
$val['h_medium'] = parent::tab_tokenfield(arrayto_string($hmediumid,','));
|
$val['h_medium'] = parent::tab_tokenfield(arrayto_string($hmediumid, ','));
|
||||||
$val['h_starttime'] = strtotime($val['h_starttime']) > strtotime($curdate)?parent::str_color(2,$val['h_starttime'],600):$val['h_starttime'];
|
$val['h_starttime'] = strtotime($val['h_starttime']) > strtotime($curdate) ? parent::str_color(2, $val['h_starttime'], 600) : $val['h_starttime'];
|
||||||
$val['h_endtime'] = strtotime($val['h_endtime']) < strtotime($curdate)?parent::str_color(0,$val['h_endtime'],600):$val['h_endtime'];
|
$val['h_endtime'] = strtotime($val['h_endtime']) < strtotime($curdate) ? parent::str_color(0, $val['h_endtime'], 600) : $val['h_endtime'];
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$addtourl = $this->own_name_info.'launch&cid='.$val['id'];
|
$addtourl = $this->own_name_info . 'launch&cid=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-primary btn-sm">新增投放</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-primary btn-sm">新增投放</a>';
|
||||||
$this->btn[] = '<a href="'.$launchurl.'" class="btn btn-info btn-sm">查看投放</a>';
|
$this->btn[] = '<a href="' . $launchurl . '" class="btn btn-info btn-sm">查看投放</a>';
|
||||||
$addtourl = $_M['url']['own_name'].'c=backups&a=doindex&tname=schedule&l_hnumber='.$h_number;
|
$addtourl = $_M['url']['own_name'] . 'c=backups&a=doindex&tname=schedule&l_hnumber=' . $h_number;
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-warning btn-sm">导出排期</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-warning btn-sm">导出排期</a>';
|
||||||
$addtourl = $this->own_name_info.__FUNCTION__.'&id='.$val['id'];
|
$addtourl = $this->own_name_info . __FUNCTION__ . '&id=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-success btn-sm">编辑</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-success btn-sm">编辑</a>';
|
||||||
}
|
}
|
||||||
//跳过标记突出处理
|
//跳过标记突出处理
|
||||||
$this->skip_field = ['h_number'];
|
$this->skip_field = ['h_number'];
|
||||||
return self::assemble($key,$base,$val,$checked);
|
return self::assemble($key, $base, $val, $checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
//公司资料
|
//公司资料
|
||||||
protected function customer($val,$checked = '') {
|
protected function customer($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_customer();
|
$key = self::tf_customer();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'">
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '">
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
//对字段处理
|
//对字段处理
|
||||||
|
|
||||||
$hcidurl = $this->own_name_table.'contract&h_cid='.$val['id'];
|
$hcidurl = $this->own_name_table . 'contract&h_cid=' . $val['id'];
|
||||||
$val['c_allname'] = '<a href="'.$hcidurl.'"> '.$val['c_allname'].'</a>';
|
$val['c_allname'] = '<a href="' . $hcidurl . '"> ' . $val['c_allname'] . '</a>';
|
||||||
$val['c_tel'] = parent::tab_tokenfield($val['c_tel'],1);
|
$val['c_tel'] = parent::tab_tokenfield($val['c_tel'], 1);
|
||||||
$val['c_address'] = $val['c_province'].$val['c_city'].$val['c_district'].$val['c_address'];
|
$val['c_address'] = $val['c_province'] . $val['c_city'] . $val['c_district'] . $val['c_address'];
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$addtourl = $this->own_name_info.__FUNCTION__.'&id='.$val['id'];
|
$addtourl = $this->own_name_info . __FUNCTION__ . '&id=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-success btn-sm">编辑</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-success btn-sm">编辑</a>';
|
||||||
}
|
}
|
||||||
return self::assemble($key,$base,$val,$checked);
|
return self::assemble($key, $base, $val, $checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
//企业联系人
|
//企业联系人
|
||||||
protected function workers($val,$checked = '') {
|
protected function workers($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_workers();
|
$key = self::tf_workers();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'">
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '">
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
|
|
||||||
//拿到对应的ID
|
//拿到对应的ID
|
||||||
//职务
|
//职务
|
||||||
if(empty(self::$para)) self::$para = parent::translate(1);
|
if (empty(self::$para))
|
||||||
|
self::$para = parent::translate(1);
|
||||||
|
|
||||||
//对字段处理
|
//对字段处理
|
||||||
$val['w_jid'] = self::$para[$val['w_jid']];
|
$val['w_jid'] = self::$para[$val['w_jid']];
|
||||||
$val['w_tel'] = parent::tab_tokenfield($val['w_tel'],1);
|
$val['w_tel'] = parent::tab_tokenfield($val['w_tel'], 1);
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$addtourl = $this->own_name_info.__FUNCTION__.'&id='.$val['id'];
|
$addtourl = $this->own_name_info . __FUNCTION__ . '&id=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-success btn-sm">编辑</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-success btn-sm">编辑</a>';
|
||||||
}
|
}
|
||||||
return self::assemble($key,$base,$val,$checked);
|
return self::assemble($key, $base, $val, $checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
//参数统计
|
//参数统计
|
||||||
protected function para($val,$checked = '') {
|
protected function para($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_para();
|
$key = self::tf_para();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'" '.$checked.'>
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '" ' . $checked . '>
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
|
|
||||||
|
|
@ -348,14 +358,14 @@ trait tlist {
|
||||||
}
|
}
|
||||||
|
|
||||||
//有数据后不允许再修改参数值,可修改参数名,且不是在新增情况下
|
//有数据后不允许再修改参数值,可修改参数名,且不是在新增情况下
|
||||||
if($p_num > 0 && empty($checked)){
|
if ($p_num > 0 && empty($checked)) {
|
||||||
$readonly = ' readonly="readonly" ';
|
$readonly = ' readonly="readonly" ';
|
||||||
}
|
}
|
||||||
|
|
||||||
$inputp_num = '<input type="hidden" name="p_num-'.$val['id'].'" value="'.$p_num.'">';
|
$inputp_num = '<input type="hidden" name="p_num-' . $val['id'] . '" value="' . $p_num . '">';
|
||||||
$val['p_num'] = $checked?$inputp_num:$p_num.' 条'.$inputp_num;
|
$val['p_num'] = $checked ? $inputp_num : $p_num . ' 条' . $inputp_num;
|
||||||
$val['p_type'] = '<div class="form-group">
|
$val['p_type'] = '<div class="form-group">
|
||||||
<select class="form-control" name="p_type-'.$val['id'].'" data-checked="'.$val['p_type'].'" required >
|
<select class="form-control" name="p_type-' . $val['id'] . '" data-checked="' . $val['p_type'] . '" required >
|
||||||
<option value="0">广告位置</option>
|
<option value="0">广告位置</option>
|
||||||
<option value="1">企业职位</option>
|
<option value="1">企业职位</option>
|
||||||
<option value="2">投放进度</option>
|
<option value="2">投放进度</option>
|
||||||
|
|
@ -366,263 +376,265 @@ trait tlist {
|
||||||
</select>
|
</select>
|
||||||
</div>';
|
</div>';
|
||||||
$val['p_order'] = '<div class="form-group">
|
$val['p_order'] = '<div class="form-group">
|
||||||
<input type="text" name="p_order-'.$val['id'].'" value="'.$val['p_order'].'" placeholder="仅支持数字" data-fv-integer="true" data-fv-integer-message="请输入有效的整数数字" class="form-control">
|
<input type="text" name="p_order-' . $val['id'] . '" value="' . $val['p_order'] . '" placeholder="仅支持数字" data-fv-integer="true" data-fv-integer-message="请输入有效的整数数字" class="form-control">
|
||||||
</div>';
|
</div>';
|
||||||
$val['p_name'] = '<div class="form-group">
|
$val['p_name'] = '<div class="form-group">
|
||||||
<input type="text" name="p_name-'.$val['id'].'" value="'.$val['p_name'].'" required class="form-control">
|
<input type="text" name="p_name-' . $val['id'] . '" value="' . $val['p_name'] . '" required class="form-control">
|
||||||
</div>';
|
</div>';
|
||||||
$val['p_value'] = '<div class="form-group">
|
$val['p_value'] = '<div class="form-group">
|
||||||
<input type="text" name="p_value-'.$val['id'].'" value="'.$val['p_value'].'" placeholder="仅支持数字" data-fv-integer="true" data-fv-integer-message="请输入有效的整数数字" class="form-control" '.$readonly.'>
|
<input type="text" name="p_value-' . $val['id'] . '" value="' . $val['p_value'] . '" placeholder="仅支持数字" data-fv-integer="true" data-fv-integer-message="请输入有效的整数数字" class="form-control" ' . $readonly . '>
|
||||||
</div>';
|
</div>';
|
||||||
$val['p_text'] = '<input type="text" name="p_text-'.$val['id'].'" value="'.$val['p_text'].'" class="form-control">';
|
$val['p_text'] = '<input type="text" name="p_text-' . $val['id'] . '" value="' . $val['p_text'] . '" class="form-control">';
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
return self::assemble($key,$base,$val,$checked,$p_num > 0?false:[]);
|
return self::assemble($key, $base, $val, $checked, $p_num > 0 ? false : []);
|
||||||
}
|
}
|
||||||
|
|
||||||
//投放计划
|
//投放计划
|
||||||
protected function launch($val,$checked = '') {
|
protected function launch($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_launch();
|
$key = self::tf_launch();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary ap-one">
|
$base[] = '<span class="checkbox-custom checkbox-primary ap-one">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'" '.$checked.'>
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '" ' . $checked . '>
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
//对字段处理
|
//对字段处理
|
||||||
if(empty(self::$para['l_schedule'])) self::$para['l_schedule'] = parent::translate(2);
|
if (empty(self::$para['l_schedule']))
|
||||||
if(empty(self::$para['l_type'])) self::$para['l_type'] = parent::translate(7);
|
self::$para['l_schedule'] = parent::translate(2);
|
||||||
$enum = count(array_filter(stringto_array($val['l_enumber'],',')));
|
if (empty(self::$para['l_type']))
|
||||||
$snum = count(array_filter(stringto_array($val['l_selectenum'],',')));
|
self::$para['l_type'] = parent::translate(7);
|
||||||
|
$enum = count(array_filter(stringto_array($val['l_enumber'], ',')));
|
||||||
|
$snum = count(array_filter(stringto_array($val['l_selectenum'], ',')));
|
||||||
$esstr = " {$enum} / {$snum} ";
|
$esstr = " {$enum} / {$snum} ";
|
||||||
$curdate = date('Y-m-d',time());
|
$curdate = date('Y-m-d', time());
|
||||||
|
|
||||||
$l_titleurl = $this->own_name_table.'schedule&l_id='.$val['id'];
|
$l_titleurl = $this->own_name_table . 'schedule&l_id=' . $val['id'];
|
||||||
$val['l_totalnum'] = $enum == $snum?$esstr:parent::state_color(0,[$esstr]); //放在最前面,防止后面对l_enumber 字段的处理
|
$val['l_totalnum'] = $enum == $snum ? $esstr : parent::state_color(0, [$esstr]); //放在最前面,防止后面对l_enumber 字段的处理
|
||||||
$val['l_title'] = '<a href="'.$l_titleurl.'"> '.$val['l_title'].'</a>';
|
$val['l_title'] = '<a href="' . $l_titleurl . '"> ' . $val['l_title'] . '</a>';
|
||||||
$val['l_enumber'] = parent::tab_tokenfield($val['l_enumber'],1,',',6);
|
$val['l_enumber'] = parent::tab_tokenfield($val['l_enumber'], 1, ',', 6);
|
||||||
$val['l_schedule'] = parent::tab_tokenfield(self::$para['l_schedule'][$val['l_schedule']],1);
|
$val['l_schedule'] = parent::tab_tokenfield(self::$para['l_schedule'][$val['l_schedule']], 1);
|
||||||
$val['l_type'] = self::$para['l_type'][$val['l_type']];
|
$val['l_type'] = self::$para['l_type'][$val['l_type']];
|
||||||
|
|
||||||
$val['l_starttime'] = strtotime($val['l_starttime']) > strtotime($curdate)?parent::str_color(2,$val['l_starttime'],600):$val['l_starttime'];
|
$val['l_starttime'] = strtotime($val['l_starttime']) > strtotime($curdate) ? parent::str_color(2, $val['l_starttime'], 600) : $val['l_starttime'];
|
||||||
$val['l_endtime'] = strtotime($val['l_endtime']) < strtotime($curdate)?parent::str_color(0,$val['l_endtime'],600):$val['l_endtime'];
|
$val['l_endtime'] = strtotime($val['l_endtime']) < strtotime($curdate) ? parent::str_color(0, $val['l_endtime'], 600) : $val['l_endtime'];
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$this->btn[] = '<a href="'.$l_titleurl.'" class="btn btn-info btn-sm">查看排期</a>';
|
$this->btn[] = '<a href="' . $l_titleurl . '" class="btn btn-info btn-sm">查看排期</a>';
|
||||||
$addtourl = $_M['url']['own_name'].'c=backups&a=doindex&tname=schedule&id='.$val['id'];
|
$addtourl = $_M['url']['own_name'] . 'c=backups&a=doindex&tname=schedule&id=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-warning btn-sm">导出排期</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-warning btn-sm">导出排期</a>';
|
||||||
$addtourl = $this->own_name_info.__FUNCTION__.'&slid='.$val['id'];
|
$addtourl = $this->own_name_info . __FUNCTION__ . '&slid=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-success btn-sm">编辑</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-success btn-sm">编辑</a>';
|
||||||
}
|
}
|
||||||
return self::assemble($key,$base,$val,$checked);
|
return self::assemble($key, $base, $val, $checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
//广告位统计
|
//广告位统计
|
||||||
protected function applan($val,$checked = '') {
|
protected function applan($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_applan();
|
$key = self::tf_applan();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$e_number = $val['e_number'];
|
$e_number = $val['e_number'];
|
||||||
//判断之前是否已经选中
|
//判断之前是否已经选中
|
||||||
$ebool = in_array($e_number, array_filter(stringto_array($this->form['l_selectenum'],',')),true);
|
$ebool = in_array($e_number, array_filter(stringto_array($this->form['l_selectenum'], ',')), true);
|
||||||
//给予选中标识
|
//给予选中标识
|
||||||
$class = ' checkbox-primary '; //刚选择默认颜色
|
$class = ' checkbox-primary '; //刚选择默认颜色
|
||||||
//$val['lanum'] 大于0 说明重复,不可投放
|
//$val['lanum'] 大于0 说明重复,不可投放
|
||||||
if($ebool) {
|
if ($ebool) {
|
||||||
$apchecked = ' checked ';
|
$apchecked = ' checked ';
|
||||||
$slid = $this->form['slid'];
|
$slid = $this->form['slid'];
|
||||||
//判断排期表内是否存在
|
//判断排期表内是否存在
|
||||||
if(!empty($this->form['slid'])){
|
if (!empty($this->form['slid'])) {
|
||||||
if(empty(self::$para[$slid])) self::$para[$slid] = $this->tsql->table('launch')->where(['id' => $slid])->one();
|
if (empty(self::$para[$slid]))
|
||||||
$l_hnumber = stringto_array(self::$para[$slid]['l_enumber'],',');
|
self::$para[$slid] = $this->tsql->table('launch')->where(['id' => $slid])->one();
|
||||||
$class = in_array($e_number,$l_hnumber,true)?' checkbox-success ':' checkbox-danger '; //刚选择默认颜色
|
$l_hnumber = stringto_array(self::$para[$slid]['l_enumber'], ',');
|
||||||
|
$class = in_array($e_number, $l_hnumber, true) ? ' checkbox-success ' : ' checkbox-danger '; //刚选择默认颜色
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// 判断广告位是否可排期
|
// 判断广告位是否可排期
|
||||||
if(empty($val['e_enable'])){
|
if (empty($val['e_enable'])) {
|
||||||
$e_types = parent::str_color(0,'禁止投放');
|
$e_types = parent::str_color(0, '禁止投放');
|
||||||
if($apchecked) {
|
if ($apchecked) {
|
||||||
$class .= ' ap-one-disabled ';
|
$class .= ' ap-one-disabled ';
|
||||||
}else{
|
} else {
|
||||||
$disabled = ' disabled ';
|
$disabled = ' disabled ';
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$s_starttime = $_M['form']['l_starttime'];
|
$s_starttime = $_M['form']['l_starttime'];
|
||||||
$s_endtime = $_M['form']['l_endtime'];
|
$s_endtime = $_M['form']['l_endtime'];
|
||||||
if($s_starttime && $s_endtime && strtotime($s_starttime) <= strtotime($s_endtime)){
|
if ($s_starttime && $s_endtime && strtotime($s_starttime) <= strtotime($s_endtime)) {
|
||||||
//判断是否可排期成功
|
//判断是否可排期成功
|
||||||
if($val['lanum'] > 0){
|
if ($val['lanum'] > 0) {
|
||||||
$e_types = parent::str_color(0,'禁止投放');
|
$e_types = parent::str_color(0, '禁止投放');
|
||||||
if($apchecked) {
|
if ($apchecked) {
|
||||||
$class .= ' ap-one-disabled ';
|
$class .= ' ap-one-disabled ';
|
||||||
}else{
|
} else {
|
||||||
$disabled = ' disabled ';
|
$disabled = ' disabled ';
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$e_types = parent::str_color(1,'可投放');
|
$e_types = parent::str_color(1, '可投放');
|
||||||
}
|
}
|
||||||
}else{
|
} else {
|
||||||
$e_types = parent::str_color(3,'无法判断');
|
$e_types = parent::str_color(3, '无法判断');
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// checkbox-danger 没有在排期库的显示为红色 checkbox-primary 正常的显示蓝色 checkbox-success 绿色
|
// checkbox-danger 没有在排期库的显示为红色 checkbox-primary 正常的显示蓝色 checkbox-success 绿色
|
||||||
$base[] = '<span class="checkbox-custom '.$class.' ap-one">
|
$base[] = '<span class="checkbox-custom ' . $class . ' ap-one">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$e_number.'" '.$apchecked.$disabled.'>
|
<input class="selectable-item" type="checkbox" name="id" value="' . $e_number . '" ' . $apchecked . $disabled . '>
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
|
|
||||||
//对字段处理
|
//对字段处理
|
||||||
$curtime = strtotime(date('Y-m-d',time()));
|
$curtime = strtotime(date('Y-m-d', time()));
|
||||||
//上个排期
|
//上个排期
|
||||||
if(strtotime($val['endetime']) < $curtime){
|
if (strtotime($val['endetime']) < $curtime) {
|
||||||
$val['endtitle'] = '<span class="blue-grey-400">'.$val['endtitle'].'</span>';
|
$val['endtitle'] = '<span class="blue-grey-400">' . $val['endtitle'] . '</span>';
|
||||||
$val['endstime'] = '<span class="blue-grey-400">'.$val['endstime'].'</span>';
|
$val['endstime'] = '<span class="blue-grey-400">' . $val['endstime'] . '</span>';
|
||||||
$val['endetime'] = '<span class="blue-grey-400">'.$val['endetime'].'</span>';
|
$val['endetime'] = '<span class="blue-grey-400">' . $val['endetime'] . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
$val['endtime'] = strtotime($val['endtime']) < $curtime
|
$val['endtime'] = strtotime($val['endtime']) < $curtime ? '<span class="line_through blue-grey-400">' . $val['endtime'] . '</span>' : $val['endtime'];
|
||||||
?'<span class="line_through blue-grey-400">'.$val['endtime'].'</span>'
|
|
||||||
:$val['endtime'];
|
|
||||||
$val['e_types'] = $e_types;
|
$val['e_types'] = $e_types;
|
||||||
$val['e_enable'] = parent::state_color($val['e_enable'],['禁用','启用']);
|
$val['e_enable'] = parent::state_color($val['e_enable'], ['禁用', '启用']);
|
||||||
self::eaddress($val,'e_address');
|
self::eaddress($val, 'e_address');
|
||||||
//比较每个广告位的结束时间 和 现在设置的投放订单的开始时间 大小
|
//比较每个广告位的结束时间 和 现在设置的投放订单的开始时间 大小
|
||||||
|
|
||||||
//禁用最后的按钮
|
//禁用最后的按钮
|
||||||
$this->banbtn = true;
|
$this->banbtn = true;
|
||||||
return self::assemble($key,$base,$val,$checked,false);
|
return self::assemble($key, $base, $val, $checked, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//广告位统计
|
//广告位统计
|
||||||
protected function elevators($val,$checked = '') {
|
protected function elevators($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_elevators();
|
$key = self::tf_elevators();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary ap-one">
|
$base[] = '<span class="checkbox-custom checkbox-primary ap-one">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['e_number'].'" '.$checked.'>
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['e_number'] . '" ' . $checked . '>
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
//对字段处理
|
//对字段处理
|
||||||
$curtime = strtotime(date('Y-m-d',time()));
|
$curtime = strtotime(date('Y-m-d', time()));
|
||||||
$scheduleurl = $this->own_name_table.'schedule&e_number='.$val['e_number'];
|
$scheduleurl = $this->own_name_table . 'schedule&e_number=' . $val['e_number'];
|
||||||
$uplaunchurl = $this->own_name_info.'uplaunch&e_number='.$val['e_number'];
|
$uplaunchurl = $this->own_name_info . 'uplaunch&e_number=' . $val['e_number'];
|
||||||
|
|
||||||
$val['e_number'] = '<a href="'.$scheduleurl.'"> '.$val['e_number'].'</a>';
|
$val['e_number'] = '<a href="' . $scheduleurl . '"> ' . $val['e_number'] . '</a>';
|
||||||
$val['etypes'] = parent::state_color($val['etypes'],[$val['e_enable']?'空位':'已禁用','排期中']);
|
$val['etypes'] = parent::state_color($val['etypes'], [$val['e_enable'] ? '空位' : '已禁用', '排期中']);
|
||||||
$val['e_enable'] = parent::state_color($val['e_enable'],['禁用','启用']);
|
$val['e_enable'] = parent::state_color($val['e_enable'], ['禁用', '启用']);
|
||||||
|
|
||||||
$scheduleurlid = $this->own_name_table.'schedule&l_id=';
|
$scheduleurlid = $this->own_name_table . 'schedule&l_id=';
|
||||||
$val['endtitle'] = $val['endtitle']?'<a href="'.$scheduleurlid.$val['endid'].'">'.$val['endtitle'].'</a>':'';
|
$val['endtitle'] = $val['endtitle'] ? '<a href="' . $scheduleurlid . $val['endid'] . '">' . $val['endtitle'] . '</a>' : '';
|
||||||
$val['nowtitle'] = $val['nowtitle']?'<a href="'.$scheduleurlid.$val['nowid'].'">'.$val['nowtitle'].'</a>':'';
|
$val['nowtitle'] = $val['nowtitle'] ? '<a href="' . $scheduleurlid . $val['nowid'] . '">' . $val['nowtitle'] . '</a>' : '';
|
||||||
$val['nexttitle'] = $val['nexttitle']?'<a href="'.$scheduleurlid.$val['nextid'].'">'.$val['nexttitle'].'</a>':'';
|
$val['nexttitle'] = $val['nexttitle'] ? '<a href="' . $scheduleurlid . $val['nextid'] . '">' . $val['nexttitle'] . '</a>' : '';
|
||||||
self::eaddress($val,'e_address');
|
self::eaddress($val, 'e_address');
|
||||||
|
|
||||||
$val['endtime'] = strtotime($val['endtime']) < $curtime
|
$val['endtime'] = strtotime($val['endtime']) < $curtime ? '<span class="line_through blue-grey-400">' . $val['endtime'] . '</span>' : $val['endtime'];
|
||||||
?'<span class="line_through blue-grey-400">'.$val['endtime'].'</span>'
|
|
||||||
:$val['endtime'];
|
|
||||||
//上个排期
|
//上个排期
|
||||||
if(strtotime($val['endetime']) < $curtime){
|
if (strtotime($val['endetime']) < $curtime) {
|
||||||
$val['endstime'] = '<span class="blue-grey-400">'.$val['endstime'].'</span>';
|
$val['endstime'] = '<span class="blue-grey-400">' . $val['endstime'] . '</span>';
|
||||||
$val['endetime'] = '<span class="blue-grey-400">'.$val['endetime'].'</span>';
|
$val['endetime'] = '<span class="blue-grey-400">' . $val['endetime'] . '</span>';
|
||||||
}
|
}
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
// $this->btn[] = '<a href="'.$uplaunchurl.'" class="btn btn-success btn-sm">调整排期</a>';
|
// $this->btn[] = '<a href="'.$uplaunchurl.'" class="btn btn-success btn-sm">调整排期</a>';
|
||||||
$this->btn[] = '<a href="'.$scheduleurl.'" class="btn btn-primary btn-sm">查看排期</a>';
|
$this->btn[] = '<a href="' . $scheduleurl . '" class="btn btn-primary btn-sm">查看排期</a>';
|
||||||
}
|
}
|
||||||
//跳过标记突出处理
|
//跳过标记突出处理
|
||||||
$this->skip_field = ['e_number'];
|
$this->skip_field = ['e_number'];
|
||||||
return self::assemble($key,$base,$val,$checked,false);
|
return self::assemble($key, $base, $val, $checked, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//场所统计展示
|
//场所统计展示
|
||||||
protected function villages($val,$checked = '') {
|
protected function villages($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_villages();
|
$key = self::tf_villages();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'">
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '">
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
|
|
||||||
//场所分类
|
//场所分类
|
||||||
if(empty(self::$para['v_type'])) self::$para['v_type'] = parent::translate(6);
|
if (empty(self::$para['v_type']))
|
||||||
|
self::$para['v_type'] = parent::translate(6);
|
||||||
//对字段处理
|
//对字段处理
|
||||||
$scheduleurl = $this->own_name_table.'schedule&e_vid='.$val['id'];
|
$scheduleurl = $this->own_name_table . 'schedule&e_vid=' . $val['id'];
|
||||||
|
|
||||||
$val['v_name'] = '<a href="'.$scheduleurl.'" title="查看排期"> '.$val['v_name'].'</a>';
|
$val['v_name'] = '<a href="' . $scheduleurl . '" title="查看排期"> ' . $val['v_name'] . '</a>';
|
||||||
$val['v_type'] = self::$para['v_type'][$val['v_type']];
|
$val['v_type'] = self::$para['v_type'][$val['v_type']];
|
||||||
$val['v_free'] = $val['v_free']?'<span class="tag tag-sm tag-pill tag-info">'.$val['v_free'].'</span>':$val['v_free'];
|
$val['v_free'] = $val['v_free'] ? '<span class="tag tag-sm tag-pill tag-info">' . $val['v_free'] . '</span>' : $val['v_free'];
|
||||||
$val['v_lease'] = $val['v_lease']?'<span class="tag tag-sm tag-pill tag-warning">'.$val['v_lease'].'</span>':$val['v_lease'];
|
$val['v_lease'] = $val['v_lease'] ? '<span class="tag tag-sm tag-pill tag-warning">' . $val['v_lease'] . '</span>' : $val['v_lease'];
|
||||||
$val['v_endday'] = $val['v_endday']?'<span class="tag tag-sm tag-pill tag-success">'.$val['v_endday'].'</span>':$val['v_endday'];
|
$val['v_endday'] = $val['v_endday'] ? '<span class="tag tag-sm tag-pill tag-success">' . $val['v_endday'] . '</span>' : $val['v_endday'];
|
||||||
$val['v_prerow'] = $val['v_prerow']?'<span class="tag tag-sm tag-pill tag-primary">'.$val['v_prerow'].'</span>':$val['v_prerow'];
|
$val['v_prerow'] = $val['v_prerow'] ? '<span class="tag tag-sm tag-pill tag-primary">' . $val['v_prerow'] . '</span>' : $val['v_prerow'];
|
||||||
if($val['noban'] > 0){
|
if ($val['noban'] > 0) {
|
||||||
$val['v_enum'] = '<span class="tag tag-sm tag-pill tag-dark">'.$val['v_enum'].'</span>';
|
$val['v_enum'] = '<span class="tag tag-sm tag-pill tag-dark">' . $val['v_enum'] . '</span>';
|
||||||
if($this->bsign) $val['v_enum'] .= ' -- ';
|
if ($this->bsign)
|
||||||
$val['v_enum'] .= '<span class="tag tag-sm tag-pill tag-danger m-l-10">'.$val['noban'].'</span>';
|
$val['v_enum'] .= ' -- ';
|
||||||
}else{
|
$val['v_enum'] .= '<span class="tag tag-sm tag-pill tag-danger m-l-10">' . $val['noban'] . '</span>';
|
||||||
$val['v_enum'] = $val['v_enum']?:'<span class="tag tag-sm tag-pill tag-danger">'.$val['v_enum'].'</span>';
|
} else {
|
||||||
|
$val['v_enum'] = $val['v_enum'] ?: '<span class="tag tag-sm tag-pill tag-danger">' . $val['v_enum'] . '</span>';
|
||||||
}
|
}
|
||||||
// $val['v_province'].$val['v_city'] 去掉省市
|
// $val['v_province'].$val['v_city'] 去掉省市
|
||||||
if(!$this->bsign) $val['v_address'] = $val['v_district'].' '.$val['v_address'];
|
if (!$this->bsign)
|
||||||
|
$val['v_address'] = $val['v_district'] . ' ' . $val['v_address'];
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$addtourl = $this->own_name_table.'elevators&e_vid='.$val['id'];
|
$addtourl = $this->own_name_table . 'elevators&e_vid=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-primary btn-sm">广告位统计</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-primary btn-sm">广告位统计</a>';
|
||||||
}
|
}
|
||||||
return self::assemble($key,$base,$val,$checked,false);
|
return self::assemble($key, $base, $val, $checked, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//场所统计展示
|
//场所统计展示
|
||||||
protected function noticeday($val,$checked = '',$base = []) {
|
protected function noticeday($val, $checked = '', $base = []) {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_noticeday();
|
$key = self::tf_noticeday();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
|
|
||||||
//对字段处理
|
//对字段处理
|
||||||
//公司
|
//公司
|
||||||
if(empty(self::$customer[$val['h_cid']])) self::$customer[$val['h_cid']] = parent::customerlist($val['h_cid']);
|
if (empty(self::$customer[$val['h_cid']]))
|
||||||
|
self::$customer[$val['h_cid']] = parent::customerlist($val['h_cid']);
|
||||||
|
|
||||||
//相关人员
|
//相关人员
|
||||||
$workerswid = stringto_array($val['h_wid'],',');
|
$workerswid = stringto_array($val['h_wid'], ',');
|
||||||
foreach ($workerswid as $hwid) {
|
foreach ($workerswid as $hwid) {
|
||||||
if(empty(self::$workers[$hwid])) self::$workers[$hwid] = parent::workerslist($hwid);
|
if (empty(self::$workers[$hwid]))
|
||||||
|
self::$workers[$hwid] = parent::workerslist($hwid);
|
||||||
$workersstr[] = self::$workers[$hwid];
|
$workersstr[] = self::$workers[$hwid];
|
||||||
}
|
}
|
||||||
|
|
||||||
$h_endtime = strtotime($val['h_endtime']);
|
$h_endtime = strtotime($val['h_endtime']);
|
||||||
$curdate = strtotime(date('Y-m-d',time()));
|
$curdate = strtotime(date('Y-m-d', time()));
|
||||||
//首先判断当前这条信息是属于到期前台3天的 还是属于设置的提醒
|
//首先判断当前这条信息是属于到期前台3天的 还是属于设置的提醒
|
||||||
//那就是判断订单结束时间和今天的相差天数
|
//那就是判断订单结束时间和今天的相差天数
|
||||||
$day = abs(($h_endtime - $curdate) / 86400);
|
$day = abs(($h_endtime - $curdate) / 86400);
|
||||||
if($day > 3){
|
if ($day > 3) {
|
||||||
//按照设置的提醒来计算
|
//按照设置的提醒来计算
|
||||||
$str = parent::str_color(0,$val['noticeday'],800);
|
$str = parent::str_color(0, $val['noticeday'], 800);
|
||||||
$htypes = "{$str} 天后到期提醒";
|
$htypes = "{$str} 天后到期提醒";
|
||||||
}else{
|
} else {
|
||||||
//按照前后3天来设置
|
//按照前后3天来设置
|
||||||
if($h_endtime > $curdate){
|
if ($h_endtime > $curdate) {
|
||||||
$str = parent::str_color(0,$day,800);
|
$str = parent::str_color(0, $day, 800);
|
||||||
//说明还没到期
|
//说明还没到期
|
||||||
$htypes = "{$str} 天后到期";
|
$htypes = "{$str} 天后到期";
|
||||||
}else{
|
} else {
|
||||||
//说明已经到期或者过期
|
//说明已经到期或者过期
|
||||||
$htypes = $day == 0?parent::str_color(0,'今天到期',800):parent::str_color(0,"已过期 {$day} 天",800);
|
$htypes = $day == 0 ? parent::str_color(0, '今天到期', 800) : parent::str_color(0, "已过期 {$day} 天", 800);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -630,18 +642,18 @@ trait tlist {
|
||||||
//订单到期前后3天提醒
|
//订单到期前后3天提醒
|
||||||
|
|
||||||
$val['h_cid'] = self::$customer[$val['h_cid']];
|
$val['h_cid'] = self::$customer[$val['h_cid']];
|
||||||
$val['h_wid'] = parent::tab_tokenfield(arrayto_string($workersstr),1);
|
$val['h_wid'] = parent::tab_tokenfield(arrayto_string($workersstr), 1);
|
||||||
$val['htypes'] = $htypes;
|
$val['htypes'] = $htypes;
|
||||||
|
|
||||||
$numberurl = $this->own_name_table.'contract&h_number='.$val['h_number'];
|
$numberurl = $this->own_name_table . 'contract&h_number=' . $val['h_number'];
|
||||||
$val['h_number'] = '<a href="'.$numberurl.'" title="查看排期"> '.$val['h_number'].'</a>';
|
$val['h_number'] = '<a href="' . $numberurl . '" title="查看排期"> ' . $val['h_number'] . '</a>';
|
||||||
|
|
||||||
return self::assemble($key,$base,$val,$checked,false);
|
return self::assemble($key, $base, $val, $checked, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//前台巡查
|
//前台巡查
|
||||||
protected function patrol($val,$checked = '') {
|
protected function patrol($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_patrol();
|
$key = self::tf_patrol();
|
||||||
|
|
||||||
|
|
@ -649,45 +661,45 @@ trait tlist {
|
||||||
//对字段处理
|
//对字段处理
|
||||||
//计算剩余时间
|
//计算剩余时间
|
||||||
$nowetime = strtotime($val['nowetime']);
|
$nowetime = strtotime($val['nowetime']);
|
||||||
$curdate = strtotime(date('Y-m-d',time()));
|
$curdate = strtotime(date('Y-m-d', time()));
|
||||||
$day = $val['nowetime']?abs(($nowetime - $curdate) / 86400):0;
|
$day = $val['nowetime'] ? abs(($nowetime - $curdate) / 86400) : 0;
|
||||||
|
|
||||||
$val['e_number'] = parent::state_color($val['e_enable'],[$val['e_number'],$val['e_number']]);
|
$val['e_number'] = parent::state_color($val['e_enable'], [$val['e_number'], $val['e_number']]);
|
||||||
self::eaddress($val,'e_address');
|
self::eaddress($val, 'e_address');
|
||||||
$val['nowtitle'] = parent::state_color($curdate > $nowetime ?0:($day > 2?1:2),[$val['nowtitle'],$val['nowtitle'],$val['nowtitle']]);
|
$val['nowtitle'] = parent::state_color($curdate > $nowetime ? 0 : ($day > 2 ? 1 : 2), [$val['nowtitle'], $val['nowtitle'], $val['nowtitle']]);
|
||||||
|
|
||||||
return self::assemble($key,[],$val,$checked,false);
|
return self::assemble($key, [], $val, $checked, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
//参数统计
|
//参数统计
|
||||||
protected function keylist($val,$checked = '') {
|
protected function keylist($val, $checked = '') {
|
||||||
global $_M,$_YW;
|
global $_M, $_YW;
|
||||||
//获取字段
|
//获取字段
|
||||||
$key = self::tf_keylist();
|
$key = self::tf_keylist();
|
||||||
|
|
||||||
//列表前段
|
//列表前段
|
||||||
$base[] = '<span class="checkbox-custom checkbox-primary">
|
$base[] = '<span class="checkbox-custom checkbox-primary">
|
||||||
<input class="selectable-item" type="checkbox" name="id" value="'.$val['id'].'" '.$checked.'>
|
<input class="selectable-item" type="checkbox" name="id" value="' . $val['id'] . '" ' . $checked . '>
|
||||||
<label></label>
|
<label></label>
|
||||||
</span>';
|
</span>';
|
||||||
|
|
||||||
//对字段处理
|
//对字段处理
|
||||||
if(empty(self::$workers[$val['k_wid']])) {
|
if (empty(self::$workers[$val['k_wid']])) {
|
||||||
$k_wid = parent::workerslist($val['k_wid'],false);
|
$k_wid = parent::workerslist($val['k_wid'], false);
|
||||||
self::$workers[$val['k_wid']] = $k_wid['w_name'].','.$k_wid['w_tel'];
|
self::$workers[$val['k_wid']] = $k_wid['w_name'] . ',' . $k_wid['w_tel'];
|
||||||
}
|
}
|
||||||
|
|
||||||
$val['k_basekey'] = base64_decode($val['k_basekey']);
|
$val['k_basekey'] = base64_decode($val['k_basekey']);
|
||||||
$val['k_state'] = parent::state_color($val['k_state'],['禁用','启用']);
|
$val['k_state'] = parent::state_color($val['k_state'], ['禁用', '启用']);
|
||||||
$val['k_wid'] = parent::tab_tokenfield(self::$workers[$val['k_wid']],1);
|
$val['k_wid'] = parent::tab_tokenfield(self::$workers[$val['k_wid']], 1);
|
||||||
|
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
if(empty($checked)){
|
if (empty($checked)) {
|
||||||
$addtourl = $this->own_name_info.__FUNCTION__.'&id='.$val['id'];
|
$addtourl = $this->own_name_info . __FUNCTION__ . '&id=' . $val['id'];
|
||||||
$this->btn[] = '<a href="'.$addtourl.'" class="btn btn-success btn-sm">编辑</a>';
|
$this->btn[] = '<a href="' . $addtourl . '" class="btn btn-success btn-sm">编辑</a>';
|
||||||
}
|
}
|
||||||
//执行操作按钮
|
//执行操作按钮
|
||||||
return self::assemble($key,$base,$val,$checked);
|
return self::assemble($key, $base, $val, $checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue