| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <%@ page language="java" contentType="text/html;charset=GBK"
- pageEncoding="GBK"%>
- <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
- <html>
- <head>
- <meta http-equiv="Content-Type" content="text/html;charset=GBK">
- <title>设备列表</title>
- <link
- href="${pageContext.request.contextPath }/liger/lib/ligerUI/skins/${sessionScope.css}/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>
- <link href="${pageContext.request.contextPath}/main.css"
- rel="stylesheet" type="text/css" />
- <script type="text/javascript" src="/shares/js/constant.js"></script>
- <script type="text/javascript" src="/shares/js/common.js"></script>
- <script type="text/javascript">
- $(function() {
- loadDevMaintainList();
- });
- var grid = null;
- function loadDevMaintainList() {
- var checkbox = false;
- if ("${checkbox}" == 'false' || "${checkbox}" == '') {
- checkbox = false;
- } else {
- checkbox = true;
- }
- grid = $("#deviceGrid").ligerGrid(
- {
- columns : [ {
- display : '设备编号',
- name : 'm_dev_code',
- width : 120
- }, {
- display : '设备名称',
- name : 'm_dev_name',
- width : 120
- }, {
- display : '设备类别',
- name : 'm_dev_type_name',
- width : 120
- }, {
- display : '故障现象',
- name : 'm_bad_phe',
- width : 120
- }, {
- display : '故障开始时间',
- name : 'm_start_time',
- width : 120
- } , {
- display : '故障结束时间',
- name : 'm_end_time',
- width : 120
- } , {
- display : '维修类型',
- name : 'm_dev_main_type_name',
- width : 120
- } , {
- display : '维修工时',
- name : 'm_dev_main_hour',
- width : 120
- } , {
- display : '维修费用',
- name : 'm_dev_main_cost',
- width : 120
- } , {
- display : '录入时间',
- name : 'm_create_date',
- width : 120
- } , {
- display : '完成情况',
- name : 'm_finishmemo',
- width : 120
- } , {
- display : '备注',
- name : 'm_remark',
- width : 120
- } ],
- pageSize : 20,
- url : 'devMaintainAction.do?task=devMaintainList&time='
- + new Date().getTime(),
- pageParmName : 'p', //页索引参数名,(提交给服务器)
- pagesizeParmName : 'pSize', //页记录数参数名,(提交给服务器)
- width : 'auto',
- height : 'auto',
- checkbox : true
- });
- $("#pageloading").hide();
- }
- function f_select() {
- var rows = grid.getCheckedRows();
- return rows;
- }
-
- function editDevMaintain(){
- var rows = grid.getCheckedRows();
- if(rows.length == 1){
- window.parent.f_addTab('editDevMaintain', '修改维修记录', '${pageContext.request.contextPath }/devMaintainAction.do?task=toEditDevMaintain&m_id='+rows[0].m_id+'&tabid=' + getCurrentTabId());
- }else if(rows.length == 0){
- alert("请先选择一条记录");
- }else{
- alert("只能选择一条记录");
- }
- }
-
- function delDevMaintain(){
- var rows = grid.getCheckedRows();
- var m_ids = "";
- if(rows.length == 0){
- alert("请先选择要删除的记录");
- return;
- }else{
- for ( var i = 0; i < rows.length; i++) {
- m_ids += ("," + rows[i].m_id);
- }
- m_ids = m_ids.substring(1, m_ids.length);
- }
- if (confirm("确定要删除吗?")) {
- $.ajax({
- type:"POST",
- url:"devMaintainAction.do?task=delDevMaintain",
- data : {"m_ids":m_ids},
- timeout:10000,
- cache:false,
- dataType:"json",
- success:function(data){
- var success = data.success;
- if(success != undefined){
- $.ligerDialog.success("删除成功");
- }else{
- showAjaxError(null, data.error);
- }
- loadDevMaintainList();
- },
- error:showAjaxError
- });
- }
- }
- </script>
- </head>
- <body>
- <%@ include file="/include/message.jsp"%>
- <div class="container-layout">
- <c:if test="${requestScope.lookup == null or requestScope.looup == '' }">
- <div id="title" class="form-button">
- <input type="button" class="l-button" value="添加"
- onclick="window.parent.f_addTab('addDevMaintain', '新增维修记录', '${pageContext.request.contextPath }/devMaintainAction.do?task=toEditDevMaintain&tabid=' + getCurrentTabId());" />
- <input type="button" class="l-button" value="修改"
- onclick="editDevMaintain()" />
- <input type="button" class="l-button" value="删除"
- onclick="delDevMaintain();" />
- </div>
- </c:if>
- <div class="default_search" style="margin: 0;">
- <ul class="list_search">
- <li class="title">设备编号:</li>
- <li class="text"><input type="text" name="product_num"
- id="product_num"></li>
- </ul>
- <ul class="list_search">
- <li class="title">设备名称:</li>
- <li class="text"><input type="text" name="product_name"
- id="product_name"></li>
- </ul>
- <ul>
- <li class="search-button"><input type="button" class='l-button'
- name="search" onclick="searchByKword()" value="查询" /></li>
- </ul>
- </div>
- <div id="searchbar">
- <div style="overflow: hidden; clear: both;">
- <div id="deviceGrid" style="margin: 0; padding: 0"></div>
- </div>
- </div>
- </div>
- </body>
- </html>
|