mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-22 10:25:35 +08:00
50 lines
1.9 KiB
PHP
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_damaged extends desktop_controller{
|
|
function index(){
|
|
$this->title = '商品残损';
|
|
$finder_cols = "column_outname,column_inname,iostock_bn,original_bn,oper,create_time,operater,memo";
|
|
$filter = array('type_id'=>array('5','50'),'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,
|
|
'orderBy'=>'create_time desc',
|
|
'finder_cols'=>$finder_cols,
|
|
);
|
|
$this->finder('iostock_mdl_damaged',$params);
|
|
}
|
|
|
|
function exportTemplate(){
|
|
header("Content-Type: text/csv");
|
|
header("Content-Disposition: attachment; filename=damaged.csv");
|
|
header('Cache-Control:must-revalidate,post-check=0,pre-check=0');
|
|
header('Expires:0');
|
|
header('Pragma:public');
|
|
$pObj = $this->app->model('damaged');
|
|
$title1 = $pObj->exportTemplate('main');
|
|
$title2 = $pObj->exportTemplate('item');
|
|
echo '"'.implode('","',$title1).'"';
|
|
echo "\n\n";
|
|
echo '"'.implode('","',$title2).'"';
|
|
}
|
|
|
|
} |