mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 02:45:33 +08:00
61 lines
2.3 KiB
PHP
61 lines
2.3 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 wms_ctl_admin_abnormal_cause extends desktop_controller{
|
|
|
|
function index(){
|
|
$this->finder('wms_mdl_abnormal_cause',array(
|
|
'title'=>'异常原因列表',
|
|
'actions' => array(
|
|
array('label'=>'添加','href'=>'index.php?app=wms&ctl=admin_abnormal_cause&act=create','target'=>'dialog::{width:600,height:200,title:\'新建异常原因\'}'),
|
|
),
|
|
'use_buildin_new_dialog' => false,
|
|
'use_buildin_set_tag'=>false,
|
|
'use_buildin_recycle'=>true,
|
|
'use_buildin_filter'=>true,
|
|
'orderBy' =>'ac_id DESC'
|
|
));
|
|
}
|
|
|
|
function create(){
|
|
$this->pagedata['title'] = '添加异常原因';
|
|
$this->display('admin/abnormal/cause/detail.html');
|
|
}
|
|
|
|
function save(){
|
|
$this->begin('index.php?app=wms&ctl=admin_abnormal_cause&act=index');
|
|
$mdl_abnormal_cause = $this->app->model('abnormal_cause');
|
|
$abnormal_cause = addslashes($_POST['abnormal_cause']);
|
|
if($_POST['ac_id']==''){
|
|
$rs = $mdl_abnormal_cause->dump(array('abnormal_cause'=>$abnormal_cause),'*');
|
|
if(!empty($rs)){
|
|
$this->end(false,app::get('base')->_('abnormal_cause已存在!不可以继续添加'));
|
|
}
|
|
}
|
|
$this->end($mdl_abnormal_cause->save($_POST),app::get('base')->_('异常原因保存成功'));
|
|
}
|
|
|
|
function edit(){
|
|
$ac_id = $_GET['ac_id'];
|
|
$mdl_abnormal_cause = $this->app->model('abnormal_cause');
|
|
$rs = $mdl_abnormal_cause->dump(array('ac_id'=>$ac_id), '*');
|
|
$this->pagedata['abnormalCauseInfo'] = $rs;
|
|
$this->singlepage('admin/abnormal/cause/detail.html');
|
|
}
|
|
|
|
}
|