mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-26 02:35:47 +08:00
1. 【新增】售后单售后原因类型支持搜索
2. 【新增】手工创建订单折扣可输入正数 3. 【优化】盘点申请单确认 4. 【修复】采购退货单模拟出库失败问题 5. 【新增】订单金额客户实付与结算金额 6. 【优化】仓库发货统计报表物料名称显示 7. 【优化】自有仓储虚拟发货逻辑 8. 【修复】基础物料分类管理问题
This commit is contained in:
@@ -17,7 +17,8 @@
|
||||
|
||||
class financebase_finder_bill_category_rules {
|
||||
|
||||
|
||||
var $addon_cols = 'account_id_plus,account_id_minus';
|
||||
var $col_prefix = ''; // 动态设置的前缀,用于addon_cols字段
|
||||
|
||||
var $column_edit = "操作";
|
||||
var $column_edit_width = "150";
|
||||
@@ -25,11 +26,74 @@ class financebase_finder_bill_category_rules {
|
||||
function column_edit($row) {
|
||||
$finder_id = $_GET['_finder']['finder_id'];
|
||||
|
||||
// 检查编辑权限
|
||||
if (!kernel::single('desktop_user')->has_permission('shop_settlement_rules_edit')) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$ret = '<a href="index.php?app=financebase&ctl=admin_shop_settlement_rules&act=setCategory&p[0]='.$row['rule_id'].'&_finder[finder_id]=' . $finder_id . '&finder_id=' . $finder_id . '" target="dialog::{width:550,height:400,resizeable:false,title:\'编辑收支分类\'}">编辑</a>';
|
||||
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// 添加贷会计科目列
|
||||
public $column_account_id_plus = "贷会计科目";
|
||||
public $column_account_id_plus_width = 110;
|
||||
public $column_account_id_plus_order = 15;
|
||||
|
||||
// 添加借会计科目列
|
||||
public $column_account_id_minus = "借会计科目";
|
||||
public $column_account_id_minus_width = 110;
|
||||
public $column_account_id_minus_order = 16;
|
||||
|
||||
private function _getAccountCache()
|
||||
{
|
||||
static $accountCache;
|
||||
|
||||
if (!isset($accountCache)) {
|
||||
$accountObj = app::get('financebase')->model('account_chart');
|
||||
$accountList = $accountObj->getList('id,account,description,postingkey');
|
||||
$accountCache = array();
|
||||
foreach ($accountList as $account) {
|
||||
$accountCache[$account['id']] = '[' . $account['account'] . '-' . $account['postingkey'] . ']' . $account['description'];
|
||||
}
|
||||
}
|
||||
|
||||
return $accountCache;
|
||||
}
|
||||
|
||||
public function column_account_id_plus($row, $list)
|
||||
{
|
||||
if (empty($row[$this->col_prefix.'account_id_plus'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$accountCache = $this->_getAccountCache();
|
||||
|
||||
// 格式化显示
|
||||
if (isset($accountCache[$row[$this->col_prefix.'account_id_plus']])) {
|
||||
return $accountCache[$row[$this->col_prefix.'account_id_plus']];
|
||||
}
|
||||
|
||||
return $row[$this->col_prefix.'account_id_plus'];
|
||||
}
|
||||
|
||||
public function column_account_id_minus($row, $list)
|
||||
{
|
||||
if (empty($row[$this->col_prefix.'account_id_minus'])) {
|
||||
return '';
|
||||
}
|
||||
|
||||
$accountCache = $this->_getAccountCache();
|
||||
|
||||
// 格式化显示
|
||||
if (isset($accountCache[$row[$this->col_prefix.'account_id_minus']])) {
|
||||
return $accountCache[$row[$this->col_prefix.'account_id_minus']];
|
||||
}
|
||||
|
||||
return $row[$this->col_prefix.'account_id_minus'];
|
||||
}
|
||||
|
||||
|
||||
var $column_platform = '平台规则设置(蓝色:已设置、红色:未设置)';
|
||||
var $column_platform_width = "500";
|
||||
@@ -39,7 +103,7 @@ class financebase_finder_bill_category_rules {
|
||||
$finder_id = $_GET['_finder']['finder_id'];
|
||||
$oFunc = kernel::single('financebase_func');
|
||||
|
||||
$platform = $oFunc->getShopPlatform();
|
||||
$platform = $oFunc->getShopPlatform(true);
|
||||
|
||||
$ret = "";
|
||||
|
||||
@@ -57,7 +121,34 @@ class financebase_finder_bill_category_rules {
|
||||
return $ret;
|
||||
}
|
||||
|
||||
// 添加操作日志功能
|
||||
public $detail_show_log = '操作记录';
|
||||
public function detail_show_log($rule_id)
|
||||
{
|
||||
// 使用ome模块的read_log方法,与经销商品价格保持一致
|
||||
$omeLogMdl = app::get('ome')->model('operation_log');
|
||||
$logList = $omeLogMdl->read_log(array('obj_id' => $rule_id, 'obj_type' => 'bill_category_rules@financebase'), 0, -1);
|
||||
|
||||
$finder_id = $_GET['_finder']['finder_id'];
|
||||
|
||||
if ($logList) {
|
||||
foreach ($logList as $k => $v) {
|
||||
$logList[$k]['operate_time'] = date('Y-m-d H:i:s', $v['operate_time']);
|
||||
|
||||
// 检查操作类型,为编辑操作添加快照链接
|
||||
if (strpos($v['operation'], '编辑') !== false) {
|
||||
$logList[$k]['memo'] = "<a href='index.php?app=financebase&ctl=admin_shop_settlement_rules&act=show_history&p[0]={$v['log_id']}&finder_id={$finder_id}' onclick=\"window.open(this.href, '_blank', 'width=801,height=570'); return false;\">查看快照</a>";
|
||||
} else {
|
||||
// 其他操作(如新建)不显示快照链接,但保留原有的memo内容
|
||||
$logList[$k]['memo'] = $v['memo'] ?: '';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$render = app::get('financebase')->render();
|
||||
$render->pagedata['logs'] = $logList ?: array();
|
||||
return $render->fetch('finder/bill/category/rules/operation_log.html');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user