| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232 |
- <%@ page contentType="text/html;charset=GBK"%>
- <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
- <HEAD>
- <TITLE>资产卡片</TITLE>
- <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
- <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
- <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"
- type="text/javascript"></script>
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1_asset/assetTypeTree.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
- <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
- <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
- <script type="text/javascript">
-
- function viewAssetEntry(id){
- window.parent.f_addTab(new Date().getTime(), '查看', '${pageContext.request.contextPath }/erpAssetEntry.do?task=viewAssetEntry&id='+id+'&tabid=' + getCurrentTabId());
- }
- function editAssetEntry(id){
- location = 'MTErpAssetEntry.do?task=toEditAssetEntry&id='+id;
- }
- function delAssetEntry(id){
- if (window.confirm("确定要删除吗?")){
- var param={'id':id};
- sendAjaxParam(param,"erpAssetEntry.do?task=delAssetEntry",'json',delProcess);
- }
- }
- function assetDepreciationRecord(id){
- window.parent.f_addTab(new Date().getTime(), '查看折旧记录', '${pageContext.request.contextPath }/erpAssetEntry.do?task=toViewDepreciationRocard&id='+id+'&tabid=' + getCurrentTabId());
- }
- function assetDepreciationOperate(id,mid){
- if (window.confirm("确定要折旧吗?")){
- var param={'id':id,'mid':mid};
- sendAjaxParam(param,"erpAssetEntry.do?task=assetDepreciationOperate",'json',delProcess);
- }
- }
- function delProcess(data){
- var msg=data.error;
- if(msg!=null){
- showAjaxError(null, data.error);
- }
- var msg2=data.success;
- if(msg2!=null){
- $.ligerDialog.success(msg2);
- }
- var params="";
- search();
- }
- //导入固资卡片
- var importEntryDlg;
- function importAssetEntryExcel(){
- var type="assetEntry";
- importEntryDlg = $.ligerDialog.open({
- height: 120,
- width:440,
- url: 'assetImportExcelAction.do?task=toImport&type='+type,
- allowClose:false,
- title:'导入固资卡片',
- buttons : [ {
- text : '导入',
- onclick : function(item,dialog){
- dialog.frame.importExcel(window);
- }
- },{
- text : '关闭',
- onclick : function(item,dialog){
- importEntryDlg.close();
- searchByKword();
- }
- }]
- });
- }
- //导入资产分类
- var importTypeDlg;
- function importAssetTypeExcel(){
- var type="assetType";
- importTypeDlg = $.ligerDialog.open({
- height: 120,
- width:440,
- url: 'assetImportExcelAction.do?task=toImport&type='+type,
- allowClose:false,
- title:'导入固资类别',
- buttons : [ {
- text : '导入',
- onclick : function(item,dialog){
- dialog.frame.importExcel(window);
- }
- },{
- text : '关闭',
- onclick : function(item,dialog){
- importTypeDlg.close();
- loadTree();
- }
- }]
- });
- }
- </script>
- <script type="text/javascript">
- $(function () {
- search();
- });
- function searchByKword(s){
- var p = $("#p").val();
- var pSize = getPize();
-
- var param={"p":p,"pSize":pSize};
-
- sendAsyncAjax(param, "MTErpAssetEntry.do?task=assetEntryList"+s, "json", function(data) {
- var num = data.Total;
- page(num,pSize,p);
-
- var list = data.Rows;
- var item_name = $('#contentDiv');
- $(item_name).empty();//初始化table,清空table
- var html = '';
- if(list.length == 0){
- html = notquery();
- }else{
- var j=0;
- for (var i = 0; i < list.length; i++)
- {
- var arr = list[i];
- var bdiv=1+j;
- //bdiv=1+j;
- if(j<7){j++;}else{j=0;};
-
- // var asset_specification=arr.asset_specification;
- // var asset_version=arr.asset_version;
- // if(asset_specification=="undefined"||asset_specification==undefined){
- // asset_specification="";
- // }
- // if(asset_version=="undefined"||asset_version==undefined){
- // asset_version="";
- // }
- // var zcfl = asset_specification + " " + asset_version;
- html+= '<div class=\"tr_cont_new mar4 f5_new'+bdiv+'\">';
- html+= '<a href=\"MTErpAssetEntry.do?task=viewAssetEntry&id='+arr.universalid+'\">';
- html+= '<div class=\"wdrw_tiao_new bn'+bdiv+' fl\"></div>';
- html+= '<div class=\"tr_rw_d_new fl\">';
- html+= '<p><img src=\"/shares/images/master1/rw_ico_menu.png\" width=\"17\" height=\"15\" />';
- //html+= '规格型号:'+;
- //html+= ' 所属部门:' + arr.asset_loan_department + '';
- html+= '资产分类:';
- if( arr.asset_type_name){
- html+= arr.asset_type_name;
- }
- html+= ' 单价:' + arr.asset_unit_price + '';
- html+= ' 数量:' + arr.asset_number + '';
- html+= ' 单位:' + arr.asset_measureunit_name + '';
- html+= '</p><p class=\"mar5\">资产名称:' + arr.asset_name + '</p>';
- html+= '</div>';
- html+= '</a>';
- html+= '<div class=\"tr_rw_btn_new fr\" style=\"width: 300px;\">';
- html+= '<div class=\"div_btn\"><input type=\"button\" onclick=\"delAssetEntry('+arr.universalid+');\" class=\"btn_c\" value=\"删 除\" /></div>';
- html+= '<div class=\"div_btn\"><input type=\"button\" onclick=\"editAssetEntry('+arr.universalid+');\" class=\"btn_c\" value=\"编 辑\" /></div>';
- html+= '</div>';
- html+= '</div>';
-
- }
- }
-
- $(item_name).html(html);
-
- });
- }
- function search(){
- var s="";
- var asset_search_type = encodeURI(encodeURI($("#asset_search_type").val()));
- if(typeof(asset_search_type) != "undefined" ){
- s += "&asset_search_type=" + asset_search_type;
- }
- var asset_search_name = encodeURI(encodeURI(searchBox.getValue()));
- if(typeof(asset_search_name) != "undefined" ){
- s += "&asset_search_name=" + asset_search_name;
- }
- var asset_search_id = encodeURI(encodeURI($("#asset_search_id").val()));
- if(typeof(asset_search_id) != "undefined" ){
- s += "&asset_search_id=" + asset_search_id;
- }
- searchByKword(s);
- }
- </script>
- </HEAD>
- <BODY>
-
- <div class="tc_b">
- <div id="left" style="float:left;width:100%;">
- <input type="hidden" name="selectAssetType" id="selectAssetType" value=""/>
- <input type="hidden" name="typeRootId" id="typeRootId" value="${typeRootId }"/>
- <input type="hidden" name="asset_search_type" id="asset_search_type" value=""/>
- <input type="hidden" name="asset_search_id" id="asset_search_id" value=""/>
- <div class="tc_r">
- <div class="tr_con b5 f4" ><div class="fl f4">
- <img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" /> 资产列表</div>
- <div class="div_tree fl">
- <!-- <input class="fl" id="tree" name="tree" type="text" value="根目录"/> -->
- </div>
- <div class="div_ck_k fr">
- <input class="div_cx fl" name="asset_search_name" id="asset_search_name" type="text" value="输入资产名称"/>
- <input class="btn_ck fl" type="button" onclick="search()" id="button" />
- </div>
- </div>
- <div class="tr_right_bg fl" style="width:20%;height:440px;background:#fff" >
- <ul id="assetTypeTree" class="tree" style="margin-top: 3px;"></ul>
- </div>
- <div class="tr_right_bg fl" style="width: 76.8%;margin-left: 5px" >
- <div id="contentDiv"></div>
- <jsp:include page="/yw/master1/page.jsp">
- <jsp:param name="functionName" value="search"/>
- </jsp:include>
- </div></div>
- </div>
- <%@ include file="/yw/master1_asset/left/leftInfo.jsp"%>
- </div>
- <%@ include file="/include/message.jsp"%>
- </BODY>
- </HTML>
|