mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-16 02:25:34 +08:00
83 lines
2.5 KiB
PHP
83 lines
2.5 KiB
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
|
||
class dealer_finder_bbu
|
||
{
|
||
|
||
public $addon_cols = "bbu_id,status";
|
||
|
||
public $column_edit = "操作";
|
||
public $column_edit_width = 60;
|
||
public $column_edit_order = 1;
|
||
/**
|
||
* column_edit
|
||
* @param mixed $row row
|
||
* @return mixed 返回值
|
||
*/
|
||
public function column_edit($row)
|
||
{
|
||
$finder_id = $_GET['_finder']['finder_id'];
|
||
// $bbuId = $row[$this->col_prefix . 'bbu_id'];
|
||
$bbuId = $row['bbu_id'];
|
||
$button = '<a href="index.php?app=dealer&ctl=admin_bbu&act=edit&p[0]=' . $bbuId . '&finder_id=' . $finder_id . '" target="dialog::{width:500,height:200,title:\'编辑公司业务组织\'}">编辑</a>';
|
||
return $button;
|
||
}
|
||
|
||
public $column_status = "状态";
|
||
public $column_status_width = 60;
|
||
public $column_status_order = 30;
|
||
/**
|
||
* column_status
|
||
* @param mixed $row row
|
||
* @return mixed 返回值
|
||
*/
|
||
public function column_status($row)
|
||
{
|
||
$status = $row[$this->col_prefix . 'status'];
|
||
switch ($status) {
|
||
case 'active':
|
||
$status = '活跃';
|
||
break;
|
||
case 'close':
|
||
$status = '关闭';
|
||
break;
|
||
default:
|
||
break;
|
||
}
|
||
return $status;
|
||
}
|
||
|
||
/**
|
||
* 订单操作记录
|
||
* @param int $bbu_id
|
||
* @return string
|
||
*/
|
||
public $detail_show_log = '操作记录';
|
||
/**
|
||
* detail_show_log
|
||
* @param mixed $bbu_id ID
|
||
* @return mixed 返回值
|
||
*/
|
||
public function detail_show_log($bbu_id)
|
||
{
|
||
$omeLogMdl = app::get('ome')->model('operation_log');
|
||
$logList = $omeLogMdl->read_log(array('obj_id' => $bbu_id, 'obj_type' => 'bbu@dealer'), 0, -1);
|
||
$finder_id = $_GET['_finder']['finder_id'];
|
||
foreach ($logList as $k => $v) {
|
||
$logList[$k]['operate_time'] = date('Y-m-d H:i:s', $v['operate_time']);
|
||
|
||
if ($v['operation'] == '销售团队编辑') {
|
||
$logList[$k]['memo'] = "<a href='index.php?app=dealer&ctl=admin_bbu&act=show_history&p[0]={$v['log_id']}&finder_id={$finder_id}' onclick=\"window.open(this.href, '_blank', 'width=500,height=140'); return false;\">查看快照</a>";
|
||
}
|
||
}
|
||
$render = app::get('dealer')->render();
|
||
$render->pagedata['logs'] = $logList;
|
||
|
||
return $render->fetch('admin/bbb_show_log.html');
|
||
}
|
||
|
||
}
|