123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189 |
- <%@ page contentType="text/html;charset=UTF-8" %>
- <%@ include file="/WEB-INF/views/include/taglib.jsp"%>
- <html>
- <head>
- <title>仪器维修管理</title>
- <meta name="decorator" content="default"/>
- <style type="text/css">
- .table th{text-align: center;}
- .table td{text-align: center;}
- #cancelModal{display: none;}
- </style>
- <script type="text/javascript">
- $(document).ready(function() {
- $('.cancelModal').on('click',function () {
- $('#confirm').attr('data-id',$(this).attr('data-id'));
- $('#cancelModal').modal();
- })
- $('#confirm').on('click',function () {
- var params = {
- "id": $(this).attr('data-id'),
- "cancelReason": $("#cancelSelect").val()
- };
- $.ajax({
- type: "post",
- url: "${ctx}/newhome/cmInstrumentMaintenance/cancel",
- data: params,
- success : function (res) {
- if(res.errcode == '1') {
- alertx(res.errmsg);
- }
- if(res.errcode == '0') {
- console.log(res.data);
- window.location.href = "${ctx}/newhome/cmInstrumentMaintenance/";
- }
- },
- error : function (res) {
- }
- });
- })
- });
- function page(n,s){
- $("#pageNo").val(n);
- $("#pageSize").val(s);
- $("#searchForm").submit();
- return false;
- }
- function copyText(id) {
- var Url2 = document.getElementById(id);
- Url2.select(); // 选择对象
- document.execCommand("Copy"); // 执行浏览器复制命令
- alert("已复制好,可贴粘。");
- }
- function copyUrl(url) {
- window.clipboardData.setData("Text",url);
- alert("复制成功!");
- }
- </script>
- </head>
- <body>
- <ul class="nav nav-tabs">
- <li class="active"><a href="${ctx}/newhome/cmInstrumentMaintenance/">仪器维修列表</a></li>
- <shiro:hasPermission name="newhome:cmInstrumentMaintenance:edit"><li><a href="${ctx}/newhome/cmInstrumentMaintenance/form">仪器维修添加</a></li></shiro:hasPermission>
- </ul>
- <form:form id="searchForm" modelAttribute="cmInstrumentMaintenance" action="${ctx}/newhome/cmInstrumentMaintenance/" method="post" class="breadcrumb form-search">
- <input id="pageNo" name="pageNo" type="hidden" value="${page.pageNo}"/>
- <input id="pageSize" name="pageSize" type="hidden" value="${page.pageSize}"/>
- <div class="ul-form">
- <div class="flex-wrap">
- <div class="item">
- <label>维修订单号:</label>
- <form:input path="orderNo" htmlEscape="false" maxlength="100" class="input-medium"/>
- </div>
- <div class="item">
- <label>用户名称:</label>
- <form:input path="userName" htmlEscape="false" maxlength="100" class="input-medium"/>
- </div>
- <div class="item">
- <label>维修商名称:</label>
- <form:input path="maintainerName" htmlEscape="false" maxlength="100" class="input-medium"/>
- </div>
- <div class="item">
- <label>仪器名称:</label>
- <form:input path="instrumentName" htmlEscape="false" maxlength="100" class="input-medium"/>
- </div>
- <div class="item">
- <label>提交时间:</label>
- <form:input path="startTime" type="text" maxlength="20" class="input-mini Wdate" value="${startTime}"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
- -
- <form:input path="endTime" type="text" maxlength="20" class="input-mini Wdate" value="${endTime}"
- onclick="WdatePicker({dateFmt:'yyyy-MM-dd',isShowClear:false});"/>
- </div>
- <div class="item">
- <label> 状态:</label>
- <form:select path="status" class="input-medium">
- <form:option value="" label=" "/>
- <form:options items="${fns:getDictList('maintenance_status')}" itemLabel="label" itemValue="value"
- htmlEscape="false"/>
- </form:select>
- </div>
- <div class="item">
- <input id="btnSubmit" class="btn btn-primary" type="submit" value="查询"/>
- </div>
- </div>
- </div>
- </form:form>
- <sys:message content="${message}"/>
- <table id="contentTable" class="table table-striped table-bordered table-condensed">
- <thead>
- <tr>
- <th>序号</th>
- <th>维修订单号</th>
- <th>用户名称</th>
- <th>联系人</th>
- <th>手机号</th>
- <th>仪器名称</th>
- <th>提交时间</th>
- <th>进度</th>
- <shiro:hasPermission name="newhome:cmInstrumentMaintenance:edit"><th>操作</th></shiro:hasPermission>
- </tr>
- </thead>
- <tbody>
- <c:forEach items="${page.list}" var="cmInstrumentMaintenance">
- <tr>
- <td>${cmInstrumentMaintenance.id}</td>
- <td>${cmInstrumentMaintenance.orderNo}</td>
- <td>${cmInstrumentMaintenance.userName}</td>
- <td>${cmInstrumentMaintenance.userContact}</td>
- <td>${cmInstrumentMaintenance.userMobile}</td>
- <td>${cmInstrumentMaintenance.instrumentName}</td>
- <td><fmt:formatDate value="${cmInstrumentMaintenance.submitDate}" pattern="yyyy-MM-dd HH:mm:ss"/></td>
- <td>${fns:getDictLabel(cmInstrumentMaintenance.status, 'maintenance_status', cmInstrumentMaintenance.status)}</td>
- <shiro:hasPermission name="newhome:cmInstrumentMaintenance:edit"><td>
- <a href="${ctx}/newhome/cmInstrumentMaintenance/form?id=${cmInstrumentMaintenance.id}">
- <c:if test="${cmInstrumentMaintenance.status eq 1 or cmInstrumentMaintenance.status eq 2}">
- 编辑
- </c:if>
- <c:if test="${cmInstrumentMaintenance.status eq 3 or cmInstrumentMaintenance.status eq 4}">
- 详情
- </c:if>
- </a>
- <c:if test="${empty cmInstrumentMaintenance.link}">
- 复制链接
- </c:if>
- <c:if test="${not empty cmInstrumentMaintenance.link}">
- <textarea id="${fns:appendLast("copy_", cmInstrumentMaintenance.id)}" rows="10" style="position: absolute; resize:none;opacity:0;width: 0;height: 0">${cmInstrumentMaintenance.link}</textarea>
- <a href="javascript:void(0);" onclick="copyText('${fns:appendLast("copy_", cmInstrumentMaintenance.id)}')">复制链接</a>
- </c:if>
- <shiro:hasPermission name="newhome:cmInstrumentMaintenance:delete">
- <c:if test="${cmInstrumentMaintenance.status eq 1}">
- <a href="javascript:void(0);" class="cancelModal" data-id="${cmInstrumentMaintenance.id}">取消</a>
- </c:if>
- <a href="${ctx}/newhome/cmInstrumentMaintenance/delete?id=${cmInstrumentMaintenance.id}" onclick="return confirmx('确定删除吗,删除后不可恢复?', this.href)">删除</a>
- </shiro:hasPermission>
- </td></shiro:hasPermission>
- </tr>
- </c:forEach>
- </tbody>
- </table>
- <div class="pagination">${page}</div>
- <div class="modal fade" id="cancelModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
- <div class="modal-dialog">
- <div class="modal-content">
- <div class="modal-header">
- <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
- <h4 class="modal-title" id="myModalLabel">确定取消吗</h4>
- </div>
- <div class="modal-body">
- <div class="reg-row">
- <label>取消原因</label>
- <select class="select" id="cancelSelect">
- <option>无效错误信息</option>
- <option>重复提交</option>
- <option>无法维修</option>
- <option>其他原因</option>
- </select>
- </div>
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
- <button type="button" class="btn btn-primary" id="confirm">确认</button>
- </div>
- </div><!-- /.modal-content -->
- </div><!-- /.modal -->
- </div>
- </body>
- </html>
|