From d3adb2fc28f5144e2899df2753c35cac999d53e4 Mon Sep 17 00:00:00 2001 From: liugang Date: Wed, 30 Aug 2023 10:37:19 +0800 Subject: [PATCH] + datatable: remove the fields only used for export when get field list. --- module/datatable/model.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/module/datatable/model.php b/module/datatable/model.php index 69e67245c9..59570a4476 100644 --- a/module/datatable/model.php +++ b/module/datatable/model.php @@ -32,12 +32,19 @@ class datatableModel extends model if($this->session->currentProductType === 'normal') unset($this->config->$module->datatable->fieldList['branch']); foreach($this->config->$module->datatable->fieldList as $field => $items) { + if(zget($items, 'display', true) === false) + { + unset($this->config->$module->datatable->fieldList[$field]); + continue; + } + if($field === 'branch') { if($this->session->currentProductType === 'branch') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->branch; if($this->session->currentProductType === 'platform') $this->config->$module->datatable->fieldList[$field]['title'] = $this->lang->datatable->platform; continue; } + $title = zget($this->lang->$module, $items['title'], zget($this->lang, $items['title'], $items['title'])); $this->config->$module->datatable->fieldList[$field]['title'] = $title; }