mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 02:45:33 +08:00
103 lines
3.6 KiB
PHP
103 lines
3.6 KiB
PHP
<?php
|
|
/**
|
|
* Copyright 2012-2026 ShopeX (https://www.shopex.cn)
|
|
*
|
|
* Licensed under the Apache License, Version 2.0 (the "License");
|
|
* you may not use this file except in compliance with the License.
|
|
* You may obtain a copy of the License at
|
|
*
|
|
* http://www.apache.org/licenses/LICENSE-2.0
|
|
*
|
|
* Unless required by applicable law or agreed to in writing, software
|
|
* distributed under the License is distributed on an "AS IS" BASIS,
|
|
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
* See the License for the specific language governing permissions and
|
|
* limitations under the License.
|
|
*/
|
|
|
|
class finance_analysis_bills extends finance_analysis_abstract implements eccommon_analysis_interface{
|
|
public $detail_options = array(
|
|
'hidden' => false,
|
|
);
|
|
public $graph_options = array(
|
|
'hidden' => true,
|
|
);
|
|
public $type_options = array(
|
|
'display' => 'true',
|
|
);
|
|
|
|
/**
|
|
* 查找er
|
|
* @return mixed 返回结果
|
|
*/
|
|
public function finder(){
|
|
$filter = array();
|
|
foreach ($this->_params as $key => $value) {
|
|
$filter['filter'][$key] = $value;
|
|
}
|
|
|
|
return array(
|
|
'model' => 'finance_mdl_analysis_bills',
|
|
'params' => array(
|
|
'actions'=>array(
|
|
array(
|
|
'label' => '导出',
|
|
'href' => 'index.php?app=finance&ctl=analysis_bills&act=index&action=export',
|
|
'target' => '{width:600,height:300,title:\'导出\'}',
|
|
//'id' => 'export_id',
|
|
'class'=>'export',
|
|
),
|
|
array(
|
|
'label' => '同步费用',
|
|
'href' => 'index.php?app=finance&ctl=analysis_bills&act=bills_get&flt=sale&finder_id='.$_GET['finder_id'],
|
|
'target' => "dialog::{width:550,height:150,title:'同步费用'}",
|
|
),
|
|
),
|
|
'title' => '交易费用<script>if($$(".finder-list").getElement("tbody").get("html") == "\n" || $$(".finder-list").getElement("tbody").get("html") == "" ){$$(".export").set("href","javascript:;").set("onclick", "alert(\"没有可以生成的数据\")");}else{$$(".export").set("href",\'index.php?app=finance&ctl=analysis_bills&act=index&action=export\');}</script>',
|
|
'use_buildin_recycle' => false,
|
|
'use_buildin_selectrow' => false,
|
|
'use_buildin_filter' => false,
|
|
),
|
|
);
|
|
}
|
|
|
|
/**
|
|
* 获取_type
|
|
* @return mixed 返回结果
|
|
*/
|
|
public function get_type()
|
|
{
|
|
$selfinputs = array(
|
|
array(
|
|
'type' => array('1' => '按结算时间', '2' => '按业务时间'),
|
|
'label' => '统计时间类型',
|
|
'name' => 'time_type',
|
|
'value' => $this->_params['time_type'],
|
|
),
|
|
);
|
|
|
|
$ui = kernel::single('base_component_ui',null,app::get('finance'));
|
|
|
|
foreach ($selfinputs as &$input) {
|
|
$input['html'] = $ui->input($input);
|
|
}
|
|
|
|
$inputs = parent::get_type();
|
|
|
|
return array_merge((array) $inputs , (array) $selfinputs);
|
|
}
|
|
|
|
/**
|
|
* 设置_params
|
|
* @param mixed $params 参数
|
|
* @return mixed 返回操作结果
|
|
*/
|
|
public function set_params($params)
|
|
{
|
|
$return = parent::set_params($params);
|
|
|
|
$this->_params['time_type'] = isset($this->_params['time_type']) ? $this->_params['time_type'] : '1';
|
|
|
|
return $return;
|
|
}
|
|
} |