mirror of
https://gitee.com/ShopeX/OMS
synced 2026-03-23 02:45:33 +08:00
95 lines
3.5 KiB
PHP
95 lines
3.5 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_finder_inventory{
|
|
var $detail_basic = "盘点记录";
|
|
var $detail_log = '盘点日志';
|
|
function __construct(){
|
|
|
|
if ($_GET['act']=='confirm'){
|
|
unset($this->column_view);
|
|
}
|
|
|
|
if ($_GET['act']=='import'){
|
|
unset($this->column_confirm);
|
|
}
|
|
|
|
}
|
|
|
|
function detail_basic($inventory_id){
|
|
|
|
$render = app::get('taoguaninventory')->render();
|
|
$oInventory = app::get('taoguaninventory')->model("inventory");
|
|
$inventory_detail = $oInventory->dump($inventory_id, '*');
|
|
|
|
$render->pagedata['detail'] = $inventory_detail;
|
|
$render->pagedata['inventory_id'] = $inventory_detail['inventory_id'];
|
|
return $render->fetch('admin/inventory/base_detail.html');
|
|
}
|
|
|
|
function detail_log($inventory_id){
|
|
$render = app::get('taoguaninventory')->render();
|
|
$opObj = app::get('ome')->model('operation_log');
|
|
$logdata = $opObj->read_log(array('obj_id'=>$inventory_id,'obj_type'=>'inventory@taoguaninventory'), 0, -1);
|
|
foreach($logdata as $k=>$v){
|
|
$logdata[$k]['operate_time'] = date('Y-m-d H:i:s',$v['operate_time']);
|
|
}
|
|
$render->pagedata['log'] = $logdata;
|
|
return $render->fetch('admin/inventory/operation_log.html');
|
|
|
|
}
|
|
|
|
var $addon_cols = "inventory_id,import_status,branch_id";
|
|
var $column_view = '操作';
|
|
var $column_view_width = "100";
|
|
function column_view($row){
|
|
$id = $row[$this->col_prefix.'inventory_id'];
|
|
$import_status = $row[$this->col_prefix.'import_status'];
|
|
$branch_id = $row[$this->col_prefix.'branch_id'];
|
|
$find_id = $_GET['_finder']['finder_id'];
|
|
$button= <<<EOF
|
|
<a href="index.php?app=wms&ctl=admin_inventory&act=detail_inventory&p[0]=$id&view=true" class="lnk" " target="dialog::{width:700,height:600,title:'盘点查看'}">查看</a>
|
|
EOF;
|
|
if ($_GET['flt'] == 'list'){
|
|
|
|
if($row['confirm_status'] == 1){
|
|
$button.= <<<EOF
|
|
<a href="index.php?app=wms&ctl=admin_inventory&act=go_inventory&inventory_id=$id" class="lnk">加入</a>
|
|
EOF;
|
|
}
|
|
}else if($_GET['flt']=='confirm'){
|
|
if($row['confirm_status'] == 1 || $row['confirm_status'] == 4){
|
|
$button.= <<<EOF
|
|
<a href="index.php?app=wms&ctl=admin_inventory&act=confirm_inventory&p[0]=$id&p[1]=1&find_id=$find_id" class="lnk" target="dialog::{width:700,height:600,title:'盘点'}">盘点</a>
|
|
<a href="index.php?app=wms&ctl=admin_inventory&act=edit_inventory&inventory_id=$id&finder_id=$find_id" class="lnk" target="_blank">编辑</a>
|
|
EOF;
|
|
}
|
|
if($row['confirm_status'] == 2) {
|
|
$button .= <<<EOF
|
|
<a href="index.php?app=wms&ctl=admin_inventory&act=exportOne&inventory_id=$id&finder_id=$find_id" class="lnk" target="dialog::{width:400,height:200,title:'导出'}">导出</a>
|
|
EOF;
|
|
}
|
|
}
|
|
|
|
|
|
return $button;
|
|
}
|
|
|
|
|
|
|
|
}
|
|
?>
|