mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-30 04:55:35 +08:00
66 lines
1.9 KiB
PHP
66 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 logisticsaccounts_ctl_admin_statements_obj extends desktop_controller{
|
|
function addobj(){
|
|
|
|
$this->page('add_statements_object.html');
|
|
}
|
|
|
|
function dosave(){
|
|
$Ostatements_obj = $this->app->model('statements_object');
|
|
$data = $_POST;
|
|
$statements_obj = $Ostatements_obj->dump(array('name'=>$data['name']),'name');
|
|
if($statements_obj){
|
|
echo 'false';
|
|
exit;
|
|
}else{
|
|
$obj_data = array(
|
|
'name'=>$data['name'],
|
|
'memo'=>$data['memo']
|
|
);
|
|
$result = $Ostatements_obj->save($obj_data);
|
|
if($result){
|
|
echo json_encode($obj_data);
|
|
}else{
|
|
echo 'false';
|
|
}
|
|
|
|
}
|
|
}
|
|
|
|
/**
|
|
* 根据name快速获取订单信息
|
|
*
|
|
* @return void
|
|
|
|
**/
|
|
function getObjinfo(){
|
|
$name = $_GET['name'];
|
|
if ($name){
|
|
$Ostatements_obj = $this->app->model('statements_object');
|
|
|
|
$statements_obj = $Ostatements_obj->getlist('name,memo',array('name|has'=>$name),0,-1);
|
|
echo "window.autocompleter_json=".json_encode($statements_obj);
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
?>
|