信呼OA版本v2.3.8
This commit is contained in:
15
webmain/main/assetm/assetmAction.php
Normal file
15
webmain/main/assetm/assetmAction.php
Normal file
@@ -0,0 +1,15 @@
|
||||
<?php
|
||||
class assetmClassAction extends Action
|
||||
{
|
||||
public function printewmAction()
|
||||
{
|
||||
$sid = c('check')->onlynumber($this->get('sid'));
|
||||
$rows= m('assetm')->getall('id in('.$sid.')');
|
||||
|
||||
foreach($rows as $k=>$rs){
|
||||
$rows[$k]['url'] = $this->jm->base64encode('task.php?a=x&num=assetm&mid='.$rs['id'].'');
|
||||
}
|
||||
$this->title = '固定资产二维码打印';
|
||||
$this->assign('rows', $rows);
|
||||
}
|
||||
}
|
||||
115
webmain/main/assetm/rock_assetm_list.php
Normal file
115
webmain/main/assetm/rock_assetm_list.php
Normal file
@@ -0,0 +1,115 @@
|
||||
<?php if(!defined('HOST'))die('not access');?>
|
||||
<script >
|
||||
$(document).ready(function(){
|
||||
|
||||
var modenum='assetm';
|
||||
var a = $('#view_{rand}').bootstable({
|
||||
tablename:modenum,celleditor:true,autoLoad:false,modenum:modenum,fanye:true,
|
||||
checked:true,
|
||||
columns:[{
|
||||
text:'资产名称',dataIndex:'title',editor:false,align:'left'
|
||||
},{
|
||||
text:'编号',dataIndex:'num'
|
||||
},{
|
||||
text:'操作时间',dataIndex:'optdt'
|
||||
},{
|
||||
text:'状态',dataIndex:'state'
|
||||
},{
|
||||
text:'品牌',dataIndex:'brand'
|
||||
},{
|
||||
text:'所在位置',dataIndex:'address'
|
||||
},{
|
||||
text:'使用者',dataIndex:'usename'
|
||||
},{
|
||||
text:'',dataIndex:'caozuo'
|
||||
}],
|
||||
itemdblclick:function(d){
|
||||
openxiangs(d.title,modenum, d.id);
|
||||
}
|
||||
});
|
||||
|
||||
var c = {
|
||||
del:function(){
|
||||
a.del();
|
||||
},
|
||||
daochu:function(o1){
|
||||
publicdaochuobj({
|
||||
'objtable':a,
|
||||
'modename':'固定资产',
|
||||
'modenum':modenum,
|
||||
'btnobj':o1
|
||||
});
|
||||
},
|
||||
adds:function(){
|
||||
openinput('固定资产',modenum);
|
||||
},
|
||||
search:function(){
|
||||
var s=get('key_{rand}').value;
|
||||
a.setparams({key:s},true);
|
||||
},
|
||||
daoru:function(){
|
||||
managelistassetm = a;
|
||||
addtabs({num:'daoruassetm',url:'flow,input,daoru,modenum=assetm',icons:'plus',name:'导入固定资产'});
|
||||
},
|
||||
prinwem:function(){
|
||||
var sid = a.getchecked();
|
||||
if(sid==''){
|
||||
js.msg('msg','没有选中记录');
|
||||
return;
|
||||
}
|
||||
var url = '?a=printewm&m=assetm&d=main&sid='+sid+'';
|
||||
window.open(url);
|
||||
},
|
||||
mobj:a,
|
||||
title:'资产分类',
|
||||
stable:'assetm',
|
||||
optionview:'optionview_{rand}',
|
||||
optionnum:'assetstype',
|
||||
rand:'{rand}'
|
||||
};
|
||||
|
||||
var c = new optionclass(c);
|
||||
|
||||
js.initbtn(c);
|
||||
});
|
||||
</script>
|
||||
|
||||
|
||||
<table width="100%">
|
||||
<tr valign="top">
|
||||
<td>
|
||||
<div style="border:1px #cccccc solid;width:220px">
|
||||
<div id="optionview_{rand}" style="height:400px;overflow:auto;"></div>
|
||||
</div>
|
||||
</td>
|
||||
<td width="10" nowrap> </td>
|
||||
<td width="95%">
|
||||
<div>
|
||||
<table width="100%"><tr>
|
||||
<td align="left" nowrap>
|
||||
<button class="btn btn-primary" click="adds" type="button"><i class="icon-plus"></i> 新增</button>
|
||||
<button class="btn btn-default" click="allshow" type="button">所有资产</button>
|
||||
|
||||
</td>
|
||||
|
||||
<td style="padding-left:10px">
|
||||
<input class="form-control" style="width:200px" id="key_{rand}" placeholder="资产名称/编号/使用人">
|
||||
</td>
|
||||
<td style="padding-left:10px">
|
||||
<button class="btn btn-default" click="search" type="button">搜索</button>
|
||||
</td>
|
||||
<td width="90%">
|
||||
<span id="megss{rand}"></span>
|
||||
</td>
|
||||
<td align="right" nowrap>
|
||||
<button class="btn btn-default" click="prinwem" type="button">打印二维码</button>
|
||||
<button class="btn btn-default" click="daoru" type="button">导入资产</button>
|
||||
<button class="btn btn-default" click="daochu" type="button">导出 <i class="icon-angle-down"></i></button>
|
||||
</td>
|
||||
</tr></table>
|
||||
</div>
|
||||
<div class="blank10"></div>
|
||||
<div id="view_{rand}"></div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
47
webmain/main/assetm/tpl_assetm_printewm.html
Normal file
47
webmain/main/assetm/tpl_assetm_printewm.html
Normal file
@@ -0,0 +1,47 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<title><?=$da['title']?></title>
|
||||
<link rel="stylesheet" type="text/css" href="webmain/css/webmain.css"/>
|
||||
<script type="text/javascript" src="js/jquery.js"></script>
|
||||
<script type="text/javascript" src="js/js.js"></script>
|
||||
<script src="js/rmb.js"></script>
|
||||
<script type="text/javascript">
|
||||
function prints(o1){
|
||||
$(o1).remove();
|
||||
window.print();
|
||||
}
|
||||
function initbody(){
|
||||
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.borderdd td,.borderdd th{ height:30px;text-align:center;padding:0px 10px;font-size:12px;border:1px #000000 dashed;padding:10px 0px}
|
||||
</style>
|
||||
|
||||
</head>
|
||||
<body>
|
||||
<style>
|
||||
</style>
|
||||
<div align="center" style="padding:10px 0px">
|
||||
<div style="width:700px">
|
||||
<table class="borderdd" width="100%" style="border-color:#000000;border-collapse: collapse;" border="0" >
|
||||
|
||||
<tr>
|
||||
<?php
|
||||
$oi = 0;
|
||||
foreach($rows as $k=>$rs){
|
||||
$oi++;
|
||||
echo '<td width="20%"><div><img src="api.php?m=login&a=ewm&url='.$rs['url'].'" width="100px" height="100px"></div><div>'.$rs['num'].'</div></td>';
|
||||
if($oi%5==0)echo '</tr><tr>';
|
||||
}
|
||||
?>
|
||||
</td>
|
||||
</table>
|
||||
<div align="left"><a href="javascript:;" class="blue" onclick="prints(this)">[打印]</a>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
Reference in New Issue
Block a user