Files
OMS/app/iostock/controller/admin/transfer.php
2026-01-04 19:08:31 +08:00

50 lines
1.9 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 iostock_ctl_admin_transfer extends desktop_controller{
function index(){
$this->title = '商品调拨';
$finder_cols = "column_outname,column_inname,iostock_bn,original_bn,oper,create_time,operator,memo";
$filter = array('type_id'=>array('4','40'),'iostock_bn'=>array($_SESSION['bn1'],$_SESSION['bn2']));
unset($_SESSION['bn1']);
unset($_SESSION['bn2']);
$params = array(
'title'=>$this->title,
'base_filter' => $filter,
'use_buildin_recycle'=>false,
'use_buildin_import'=>true,
'use_buildin_refresh'=>true,
'orderBy'=>'create_time desc',
'finder_cols'=>$finder_cols,
);
$this->finder('iostock_mdl_transfer',$params);
}
function exportTemplate(){
header("Content-Type: text/csv");
header("Content-Disposition: attachment; filename=transfer.csv");
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
header('Expires:0');
header('Pragma:public');
$pObj = $this->app->model('transfer');
$title1 = $pObj->exportTemplate('main');
$title2 = $pObj->exportTemplate('item');
echo '"'.implode('","',$title1).'"';
echo "\n\n";
echo '"'.implode('","',$title2).'"';
}
}