Files
OMS/app/taoguaninventory/controller/admin/queue.php
2025-12-28 23:13:25 +08:00

54 lines
1.6 KiB
PHP
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<?php
/**
* Copyright © ShopeX http://www.shopex.cn. All rights reserved.
* See LICENSE file for license details.
*/
class taoguaninventory_ctl_admin_queue extends desktop_controller
{
var $name = "导入中盘点";
var $workground = "storage_center";
/**
* index
* @return mixed 返回值
*/
public function index(){
$base_filter = array(
'queue_title'=>'盘点导入',
);
$params = array(
'title'=>app::get('desktop')->_('导入中盘点'),
'actions'=>array(
array('label'=>app::get('desktop')->_('全部启动'),'submit'=>'index.php?app=taoguaninventory&ctl=admin_queue&act=run'),
array('label'=>app::get('desktop')->_('全部暂停'),'submit'=>'index.php?app=desktop&ctl=queue&act=pause'),
),
'base_filter' => $base_filter
);
$this->finder('base_mdl_queue',$params);
}
/**
* 盘点表启动.
* @
* @return
* @access public
* @author cyyr24@sina.cn
*/
function run()
{
$this->begin('index.php?app=taoguaninventory&ctl=admin_queue&act=index');
if( $_POST['isSelectedAll']=='_ALL_'){
$this->end(false,'不支持全选全部启动!');
}
$queue_id = $_POST['queue_id'];
$queue_model = app::get('base')->model('queue');
foreach ($queue_id as $_id ) {
$queue_model->runtask($_id);
}
$this->end(true,app::get('desktop')->_('启动成功'));
}
}
?>