mirror of
https://gitee.com/ShopeX/OMS
synced 2026-04-04 14:36:50 +08:00
44 lines
1.4 KiB
PHP
44 lines
1.4 KiB
PHP
<?php
|
||
/**
|
||
* Copyright © ShopeX (http://www.shopex.cn). All rights reserved.
|
||
* See LICENSE file for license details.
|
||
*/
|
||
|
||
|
||
class desktop_finder_builder_dorecycle extends desktop_finder_builder_prototype{
|
||
|
||
function main(){
|
||
|
||
$this->controller->begin();
|
||
|
||
$o = $this->app->model($this->object->table_name());
|
||
$o->filter_use_like = true;
|
||
|
||
$this->dbschema = $this->object->get_schema();
|
||
|
||
$pkey = $this->dbschema['idColumn'];
|
||
|
||
$pkey_value = $_POST[$pkey];
|
||
$filter = array($pkey=>$pkey_value);
|
||
|
||
if( $_POST['isSelectedAll']=='_ALL_') //edit by 矫雷 (点此选择全部) 分开写的应该统一函数处理
|
||
$filter = null;
|
||
if($_GET['view']){
|
||
$views = $this->get_views();
|
||
$filter = array_merge((array)$views[$_GET['view']]['filter'],(array)$filter);
|
||
}
|
||
|
||
$recycle = kernel::single('desktop_system_recycle');
|
||
|
||
$result = $recycle->dorecycle(get_class($this->object),$filter);
|
||
|
||
if($result){
|
||
$this->controller->end(true,app::get('desktop')->_('删除成功'),'javascript:finderGroup["'.$_GET['finder_id'].'"].unselectAll();finderGroup["'.$_GET['finder_id'].'"].refresh();');
|
||
}else{
|
||
$this->controller->end(false,$o->recycle_msg?$o->recycle_msg:app::get('desktop')->_('删除失败!'));
|
||
}
|
||
|
||
}
|
||
|
||
}
|