assetEntryList.jsp 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232
  1. <%@ page contentType="text/html;charset=GBK"%>
  2. <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
  3. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  4. <HEAD>
  5. <TITLE>资产卡片</TITLE>
  6. <link href="/shares/js/yw/master1/liger/skins/ynet/css/ligerui-all.css" rel="stylesheet" type="text/css" />
  7. <script src="${pageContext.request.contextPath }/liger/lib/jquery/jquery-1.3.2.min.js" type="text/javascript"></script>
  8. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/core/base.js" type="text/javascript"></script>
  9. <script src="${pageContext.request.contextPath }/liger/lib/ligerUI/js/plugins/ligerGrid.js" type="text/javascript"></script>
  10. <script src="${pageContext.request.contextPath}/liger/lib/ligerUI/js/ligerui.all.js"
  11. type="text/javascript"></script>
  12. <script type="text/javascript" src="/shares/js/constant.js"></script>
  13. <script type="text/javascript" src="/shares/js/common.js"></script>
  14. <script type="text/javascript" src="/shares/js/yw/master1_asset/assetTypeTree.js"></script>
  15. <script type="text/javascript" src="/shares/js/yw/master1/page.js"></script>
  16. <script type="text/javascript" src="/shares/js/yw/master1/common.js"></script>
  17. <script type="text/javascript" src="/shares/js/yw/master1/searchBox.js"></script>
  18. <link href="/shares/css/yw/master1/reset.css" rel="stylesheet" type="text/css" />
  19. <script type="text/javascript">
  20. function viewAssetEntry(id){
  21. window.parent.f_addTab(new Date().getTime(), '查看', '${pageContext.request.contextPath }/erpAssetEntry.do?task=viewAssetEntry&id='+id+'&tabid=' + getCurrentTabId());
  22. }
  23. function editAssetEntry(id){
  24. location = 'MTErpAssetEntry.do?task=toEditAssetEntry&id='+id;
  25. }
  26. function delAssetEntry(id){
  27. if (window.confirm("确定要删除吗?")){
  28. var param={'id':id};
  29. sendAjaxParam(param,"erpAssetEntry.do?task=delAssetEntry",'json',delProcess);
  30. }
  31. }
  32. function assetDepreciationRecord(id){
  33. window.parent.f_addTab(new Date().getTime(), '查看折旧记录', '${pageContext.request.contextPath }/erpAssetEntry.do?task=toViewDepreciationRocard&id='+id+'&tabid=' + getCurrentTabId());
  34. }
  35. function assetDepreciationOperate(id,mid){
  36. if (window.confirm("确定要折旧吗?")){
  37. var param={'id':id,'mid':mid};
  38. sendAjaxParam(param,"erpAssetEntry.do?task=assetDepreciationOperate",'json',delProcess);
  39. }
  40. }
  41. function delProcess(data){
  42. var msg=data.error;
  43. if(msg!=null){
  44. showAjaxError(null, data.error);
  45. }
  46. var msg2=data.success;
  47. if(msg2!=null){
  48. $.ligerDialog.success(msg2);
  49. }
  50. var params="";
  51. search();
  52. }
  53. //导入固资卡片
  54. var importEntryDlg;
  55. function importAssetEntryExcel(){
  56. var type="assetEntry";
  57. importEntryDlg = $.ligerDialog.open({
  58. height: 120,
  59. width:440,
  60. url: 'assetImportExcelAction.do?task=toImport&type='+type,
  61. allowClose:false,
  62. title:'导入固资卡片',
  63. buttons : [ {
  64. text : '导入',
  65. onclick : function(item,dialog){
  66. dialog.frame.importExcel(window);
  67. }
  68. },{
  69. text : '关闭',
  70. onclick : function(item,dialog){
  71. importEntryDlg.close();
  72. searchByKword();
  73. }
  74. }]
  75. });
  76. }
  77. //导入资产分类
  78. var importTypeDlg;
  79. function importAssetTypeExcel(){
  80. var type="assetType";
  81. importTypeDlg = $.ligerDialog.open({
  82. height: 120,
  83. width:440,
  84. url: 'assetImportExcelAction.do?task=toImport&type='+type,
  85. allowClose:false,
  86. title:'导入固资类别',
  87. buttons : [ {
  88. text : '导入',
  89. onclick : function(item,dialog){
  90. dialog.frame.importExcel(window);
  91. }
  92. },{
  93. text : '关闭',
  94. onclick : function(item,dialog){
  95. importTypeDlg.close();
  96. loadTree();
  97. }
  98. }]
  99. });
  100. }
  101. </script>
  102. <script type="text/javascript">
  103. $(function () {
  104. search();
  105. });
  106. function searchByKword(s){
  107. var p = $("#p").val();
  108. var pSize = getPize();
  109. var param={"p":p,"pSize":pSize};
  110. sendAsyncAjax(param, "MTErpAssetEntry.do?task=assetEntryList"+s, "json", function(data) {
  111. var num = data.Total;
  112. page(num,pSize,p);
  113. var list = data.Rows;
  114. var item_name = $('#contentDiv');
  115. $(item_name).empty();//初始化table,清空table
  116. var html = '';
  117. if(list.length == 0){
  118. html = notquery();
  119. }else{
  120. var j=0;
  121. for (var i = 0; i < list.length; i++)
  122. {
  123. var arr = list[i];
  124. var bdiv=1+j;
  125. //bdiv=1+j;
  126. if(j<7){j++;}else{j=0;};
  127. // var asset_specification=arr.asset_specification;
  128. // var asset_version=arr.asset_version;
  129. // if(asset_specification=="undefined"||asset_specification==undefined){
  130. // asset_specification="";
  131. // }
  132. // if(asset_version=="undefined"||asset_version==undefined){
  133. // asset_version="";
  134. // }
  135. // var zcfl = asset_specification + " " + asset_version;
  136. html+= '<div class=\"tr_cont_new mar4 f5_new'+bdiv+'\">';
  137. html+= '<a href=\"MTErpAssetEntry.do?task=viewAssetEntry&id='+arr.universalid+'\">';
  138. html+= '<div class=\"wdrw_tiao_new bn'+bdiv+' fl\"></div>';
  139. html+= '<div class=\"tr_rw_d_new fl\">';
  140. html+= '<p><img src=\"/shares/images/master1/rw_ico_menu.png\" width=\"17\" height=\"15\" />';
  141. //html+= '规格型号:'+;
  142. //html+= '&nbsp;&nbsp;所属部门:' + arr.asset_loan_department + '';
  143. html+= '资产分类:';
  144. if( arr.asset_type_name){
  145. html+= arr.asset_type_name;
  146. }
  147. html+= '&nbsp;单价:' + arr.asset_unit_price + '';
  148. html+= '&nbsp;数量:' + arr.asset_number + '';
  149. html+= '&nbsp;单位:' + arr.asset_measureunit_name + '';
  150. html+= '</p><p class=\"mar5\">资产名称:' + arr.asset_name + '</p>';
  151. html+= '</div>';
  152. html+= '</a>';
  153. html+= '<div class=\"tr_rw_btn_new fr\" style=\"width: 300px;\">';
  154. html+= '<div class=\"div_btn\"><input type=\"button\" onclick=\"delAssetEntry('+arr.universalid+');\" class=\"btn_c\" value=\"删&nbsp;除\" /></div>';
  155. html+= '<div class=\"div_btn\"><input type=\"button\" onclick=\"editAssetEntry('+arr.universalid+');\" class=\"btn_c\" value=\"编&nbsp;辑\" /></div>';
  156. html+= '</div>';
  157. html+= '</div>';
  158. }
  159. }
  160. $(item_name).html(html);
  161. });
  162. }
  163. function search(){
  164. var s="";
  165. var asset_search_type = encodeURI(encodeURI($("#asset_search_type").val()));
  166. if(typeof(asset_search_type) != "undefined" ){
  167. s += "&asset_search_type=" + asset_search_type;
  168. }
  169. var asset_search_name = encodeURI(encodeURI(searchBox.getValue()));
  170. if(typeof(asset_search_name) != "undefined" ){
  171. s += "&asset_search_name=" + asset_search_name;
  172. }
  173. var asset_search_id = encodeURI(encodeURI($("#asset_search_id").val()));
  174. if(typeof(asset_search_id) != "undefined" ){
  175. s += "&asset_search_id=" + asset_search_id;
  176. }
  177. searchByKword(s);
  178. }
  179. </script>
  180. </HEAD>
  181. <BODY>
  182. <div class="tc_b">
  183. <div id="left" style="float:left;width:100%;">
  184. <input type="hidden" name="selectAssetType" id="selectAssetType" value=""/>
  185. <input type="hidden" name="typeRootId" id="typeRootId" value="${typeRootId }"/>
  186. <input type="hidden" name="asset_search_type" id="asset_search_type" value=""/>
  187. <input type="hidden" name="asset_search_id" id="asset_search_id" value=""/>
  188. <div class="tc_r">
  189. <div class="tr_con b5 f4" ><div class="fl f4">
  190. <img src="/shares/images/master1/wdrw_ico.png" width="25" height="31" />&nbsp;资产列表</div>
  191. <div class="div_tree fl">
  192. <!-- <input class="fl" id="tree" name="tree" type="text" value="根目录"/> -->
  193. </div>
  194. <div class="div_ck_k fr">
  195. <input class="div_cx fl" name="asset_search_name" id="asset_search_name" type="text" value="输入资产名称"/>
  196. <input class="btn_ck fl" type="button" onclick="search()" id="button" />
  197. </div>
  198. </div>
  199. <div class="tr_right_bg fl" style="width:20%;height:440px;background:#fff" >
  200. <ul id="assetTypeTree" class="tree" style="margin-top: 3px;"></ul>
  201. </div>
  202. <div class="tr_right_bg fl" style="width: 76.8%;margin-left: 5px" >
  203. <div id="contentDiv"></div>
  204. <jsp:include page="/yw/master1/page.jsp">
  205. <jsp:param name="functionName" value="search"/>
  206. </jsp:include>
  207. </div></div>
  208. </div>
  209. <%@ include file="/yw/master1_asset/left/leftInfo.jsp"%>
  210. </div>
  211. <%@ include file="/include/message.jsp"%>
  212. </BODY>
  213. </HTML>