分页组件重构、新类型管理模块上线、BootStarp表格斑马线去除
This commit is contained in:
parent
8fa6e994f0
commit
fb1cbfcc37
|
|
@ -0,0 +1,392 @@
|
|||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<style>
|
||||
/* 表单弹窗样式优化 */
|
||||
.customTable {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
|
||||
.customTable .FormData {
|
||||
border-bottom: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.customTable .CaptionTD {
|
||||
width: 30%;
|
||||
padding: 12px 15px;
|
||||
text-align: right;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
background: #fafafa;
|
||||
vertical-align: middle;
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.customTable .DataTD {
|
||||
padding: 12px 15px;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.customTable .FormElement {
|
||||
width: 100%;
|
||||
height: 36px;
|
||||
padding: 6px 10px;
|
||||
border: 1px solid #ddd;
|
||||
border-radius: 4px;
|
||||
font-size: 13px;
|
||||
transition: all 0.3s;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
.customTable .FormElement:focus {
|
||||
border-color: #667eea;
|
||||
box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.1);
|
||||
outline: none;
|
||||
}
|
||||
|
||||
.customTable .radio-inline {
|
||||
margin-right: 15px;
|
||||
font-weight: normal;
|
||||
cursor: pointer;
|
||||
font-size: 13px;
|
||||
display: inline-block;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
.customTable .radio-inline input[type="radio"] {
|
||||
margin-right: 5px;
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
.form-section-title {
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: #667eea;
|
||||
margin: 15px 0 10px 0;
|
||||
padding-bottom: 8px;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.form-hint {
|
||||
color: #999;
|
||||
display: block;
|
||||
margin-top: 3px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
/* 两列布局 */
|
||||
.form-two-column {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.form-two-column .FormData {
|
||||
border-right: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.form-two-column .FormData:nth-child(odd) {
|
||||
border-right: 1px solid #f0f0f0;
|
||||
}
|
||||
|
||||
.form-two-column .FormData:nth-child(even) {
|
||||
border-right: none;
|
||||
}
|
||||
</style>
|
||||
|
||||
<!-- 新增表单 -->
|
||||
<div id="add" class="hide">
|
||||
<form id="addform" method="POST" onsubmit="return false;">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="customTable">
|
||||
<tbody>
|
||||
<tr style="display:none">
|
||||
<td class="DataTD">
|
||||
<input type="hidden" id="parentIds" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 设备类型:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" jyValidate="required" id="namesType" name="name"
|
||||
class="FormElement" placeholder="请输入设备类型名称">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">设备标签:</td>
|
||||
<td class="DataTD">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="label" id="label1" value="1" checked>
|
||||
<span style="color: #1976d2;">🏢 自有</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="label" id="label2" value="2">
|
||||
<span style="color: #f57c00;">🔄 外租</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 修改表单 -->
|
||||
<div id="auDiv" class="hide">
|
||||
<form id="auForm" method="POST" onsubmit="return false;">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="customTable">
|
||||
<tbody>
|
||||
<tr style="display:none">
|
||||
<td class="DataTD">
|
||||
<input type="hidden" id="parentIds" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 设备类型:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" jyValidate="required" id="names" name="name"
|
||||
class="FormElement" placeholder="请输入设备类型名称">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 库存预警值:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" jyValidate="required" id="warnValue" name="warnValue"
|
||||
class="FormElement" placeholder="请输入库存预警值(数字)">
|
||||
<small style="color: #999; display: block; margin-top: 5px;">
|
||||
💡 当库存低于此值时将触发预警提示
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">设备标签:</td>
|
||||
<td class="DataTD">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="label" id="label11" value="1">
|
||||
<span style="color: #1976d2;">🏢 自有</span>
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="label" id="label21" value="2">
|
||||
<span style="color: #f57c00;">🔄 外租</span>
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 库存预警值设置表单 -->
|
||||
<div id="update" class="hide">
|
||||
<form id="updateform" method="POST" onsubmit="return false;">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="customTable">
|
||||
<tbody>
|
||||
<tr style="display:none">
|
||||
<td class="DataTD">
|
||||
<input type="hidden" id="parentIds" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 库存预警值:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" jyValidate="required" id="warnValueUpdate" name="warnValue"
|
||||
class="FormElement" placeholder="请输入库存预警值(数字)">
|
||||
<small style="color: #999; display: block; margin-top: 5px;">
|
||||
💡 此设置将应用于所有机具类型的库存预警
|
||||
</small>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 新增规格型号表单 -->
|
||||
<div id="addSpecDiv" class="hide">
|
||||
<form id="addSpecForm" method="POST" onsubmit="return false;">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="customTable">
|
||||
<tbody>
|
||||
<tr style="display:none">
|
||||
<td class="DataTD">
|
||||
<input type="hidden" id="specParentId" name="parentId" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第一行:机具类型(全宽) -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 机具类型:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" readonly id="specParentName" class="FormElement" placeholder="请先选择机具类型">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第二行:规格型号(全宽) -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 规格型号:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" jyValidate="required" id="specName" name="name"
|
||||
class="FormElement" placeholder="请输入规格型号名称">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第三行:数量 + 计量单位 -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 数量:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="specNums" name="nums"
|
||||
class="FormElement" placeholder="请输入数量">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">计量单位:</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" id="specUnit" name="unit"
|
||||
class="FormElement" placeholder="如:台、套、个等">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第四行:租赁价格 + 丢失赔偿价格 -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 租赁价格(元):
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="specLeasePrice" name="leasePrice"
|
||||
class="FormElement" placeholder="请输入租赁价格">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 丢失赔偿价格(元):
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="specPayPrice" name="payPrice"
|
||||
class="FormElement" placeholder="请输入丢失赔偿价格">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第五行:购置价格 + 是否只计数 -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 购置价格(元):
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="specBuyPrice" name="buyPrice"
|
||||
class="FormElement" placeholder="请输入购置价格">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">是否只计数:</td>
|
||||
<td class="DataTD">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCount" id="specIsCount1" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCount" id="specIsCount0" value="0" checked> 否
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<!-- 编辑规格型号表单 -->
|
||||
<div id="editSpecDiv" class="hide">
|
||||
<form id="editSpecForm" method="POST" onsubmit="return false;">
|
||||
<table cellspacing="0" cellpadding="0" border="0" class="customTable">
|
||||
<tbody>
|
||||
<tr style="display:none">
|
||||
<td class="DataTD">
|
||||
<input type="hidden" id="editSpecId" name="id" value="0">
|
||||
<input type="hidden" id="editSpecParentId" name="parentId" value="0">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第一行:机具类型(全宽) -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
机具类型:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" readonly id="editSpecParentName" class="FormElement">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第二行:规格型号(全宽) -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 规格型号:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" jyValidate="required" id="editSpecName" name="name"
|
||||
class="FormElement" placeholder="请输入规格型号名称">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第三行:数量 + 计量单位 -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 数量:
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="editSpecNums" name="nums"
|
||||
class="FormElement" placeholder="请输入数量">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">计量单位:</td>
|
||||
<td class="DataTD">
|
||||
<input type="text" id="editSpecUnit" name="unit"
|
||||
class="FormElement" placeholder="如:台、套、个等">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第四行:租赁价格 + 丢失赔偿价格 -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 租赁价格(元):
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="editSpecLeasePrice" name="leasePrice"
|
||||
class="FormElement" placeholder="请输入租赁价格">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 丢失赔偿价格(元):
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="editSpecPayPrice" name="payPrice"
|
||||
class="FormElement" placeholder="请输入丢失赔偿价格">
|
||||
</td>
|
||||
</tr>
|
||||
<!-- 第五行:购置价格 + 是否只计数 -->
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">
|
||||
<font color="red">*</font> 购置价格(元):
|
||||
</td>
|
||||
<td class="DataTD">
|
||||
<input type="number" min="0" jyValidate="required" id="editSpecBuyPrice" name="buyPrice"
|
||||
class="FormElement" placeholder="请输入购置价格">
|
||||
</td>
|
||||
</tr>
|
||||
<tr class="FormData">
|
||||
<td class="CaptionTD">是否只计数:</td>
|
||||
<td class="DataTD">
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCount" id="editSpecIsCount1" value="1"> 是
|
||||
</label>
|
||||
<label class="radio-inline">
|
||||
<input type="radio" name="isCount" id="editSpecIsCount0" value="0"> 否
|
||||
</label>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</form>
|
||||
</div>
|
||||
|
||||
|
|
@ -0,0 +1,573 @@
|
|||
<%@ page contentType="text/html;charset=UTF-8" %>
|
||||
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
|
||||
<!DOCTYPE html>
|
||||
<html lang="zh-CN">
|
||||
<head>
|
||||
<%@include file="../baseset.jsp" %>
|
||||
<%@include file="../systemset.jsp" %>
|
||||
<link rel="stylesheet" href="${bonuspath}/static/plugins/zTree/3.5/zTreeStyle.css" />
|
||||
<link href="${bonuspath}/static/js/index/layui.css" rel="stylesheet">
|
||||
<script src="${bonuspath}/static/js/index/layui.min.js"></script>
|
||||
<script src="${bonuspath}/static/plugins/zTree/3.5/jquery.ztree.all.min.js"></script>
|
||||
|
||||
<style type="text/css">
|
||||
/* 全局样式优化 */
|
||||
body {
|
||||
background-color: #f5f7fa;
|
||||
}
|
||||
|
||||
.page-content {
|
||||
padding: 20px;
|
||||
background-color: #fff;
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 2px 12px rgba(0,0,0,0.08);
|
||||
}
|
||||
|
||||
/* 面包屑导航 */
|
||||
.breadcrumb-container {
|
||||
background: #f8f9fa;
|
||||
padding: 12px 20px;
|
||||
border-radius: 6px;
|
||||
margin-bottom: 20px;
|
||||
border-left: 4px solid #667eea;
|
||||
}
|
||||
|
||||
.breadcrumb-nav {
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.breadcrumb-nav li {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: #666;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.breadcrumb-nav li a {
|
||||
color: #667eea;
|
||||
text-decoration: none;
|
||||
transition: all 0.3s;
|
||||
padding: 4px 8px;
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
.breadcrumb-nav li a:hover {
|
||||
background: #667eea;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.breadcrumb-nav li.active {
|
||||
color: #333;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.breadcrumb-nav li:not(:last-child)::after {
|
||||
content: "›";
|
||||
margin: 0 8px;
|
||||
color: #999;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
/* 左侧树形区域 */
|
||||
.tree-container {
|
||||
background: #fff;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
padding: 15px;
|
||||
height: 750px;
|
||||
overflow: hidden;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
/* 树搜索区域 */
|
||||
.tree-search-area {
|
||||
padding: 10px;
|
||||
background: #f8f9fa;
|
||||
border-bottom: 1px solid #e0e0e0;
|
||||
margin: 0 -15px 15px -15px;
|
||||
}
|
||||
|
||||
.tree-search-area .form-control {
|
||||
border-radius: 4px;
|
||||
border: 1px solid #ddd;
|
||||
font-size: 13px;
|
||||
height: 32px;
|
||||
}
|
||||
|
||||
.tree-search-area .btn {
|
||||
border-radius: 4px;
|
||||
font-size: 14px;
|
||||
height: 32px;
|
||||
width: 36px;
|
||||
padding: 0;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.tree-search-area .btn i {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.tree-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 15px;
|
||||
padding-bottom: 12px;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.tree-header h4 {
|
||||
margin: 0;
|
||||
color: #333;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.tree-actions {
|
||||
display: flex;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.tree-actions .btn {
|
||||
padding: 6px 12px;
|
||||
font-size: 13px;
|
||||
border-radius: 6px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.tree-actions .btn:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
|
||||
}
|
||||
|
||||
.orgTree {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
overflow-x: auto;
|
||||
background: #fafafa;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 6px;
|
||||
padding: 10px;
|
||||
}
|
||||
|
||||
/* 右侧内容区域 */
|
||||
.content-container {
|
||||
background: #fff;
|
||||
border: 1px solid #e4e7ed;
|
||||
border-radius: 8px;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.content-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
margin-bottom: 20px;
|
||||
padding-bottom: 15px;
|
||||
border-bottom: 2px solid #e4e7ed;
|
||||
}
|
||||
|
||||
.content-title {
|
||||
font-size: 18px;
|
||||
font-weight: 600;
|
||||
color: #333;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.content-title i {
|
||||
color: #667eea;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
display: flex;
|
||||
gap: 10px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.action-buttons .btn {
|
||||
border-radius: 6px;
|
||||
padding: 8px 16px;
|
||||
font-size: 14px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
.btn-primary-custom {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-primary-custom:hover {
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
|
||||
}
|
||||
|
||||
.btn-success-custom {
|
||||
background: linear-gradient(135deg, #11998e 0%, #38ef7d 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-warning-custom {
|
||||
background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-info-custom {
|
||||
background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
|
||||
border: none;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
/* 表格样式优化 */
|
||||
#baseTable {
|
||||
border-radius: 6px;
|
||||
overflow: hidden;
|
||||
border: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
#baseTable thead {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
#baseTable thead th {
|
||||
border: none;
|
||||
padding: 15px 10px;
|
||||
font-weight: 600;
|
||||
text-align: center;
|
||||
vertical-align: middle;
|
||||
}
|
||||
|
||||
#baseTable tbody tr {
|
||||
transition: all 0.3s;
|
||||
border-bottom: 1px solid #e4e7ed;
|
||||
}
|
||||
|
||||
#baseTable tbody tr:hover {
|
||||
background-color: #f5f7fa;
|
||||
transform: translateX(2px);
|
||||
}
|
||||
|
||||
#baseTable tbody td {
|
||||
padding: 12px 10px;
|
||||
vertical-align: middle;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
/* 操作按钮样式 */
|
||||
.action-icon {
|
||||
display: inline-block;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
text-align: center;
|
||||
border-radius: 50%;
|
||||
margin: 0 3px;
|
||||
transition: all 0.3s;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.action-icon:hover {
|
||||
transform: scale(1.15);
|
||||
}
|
||||
|
||||
.action-icon.view {
|
||||
background: #e3f2fd;
|
||||
color: #2196f3;
|
||||
}
|
||||
|
||||
.action-icon.edit {
|
||||
background: #fff3e0;
|
||||
color: #ff9800;
|
||||
}
|
||||
|
||||
.action-icon.delete {
|
||||
background: #ffebee;
|
||||
color: #f44336;
|
||||
}
|
||||
|
||||
.action-icon.locate {
|
||||
background: #e8f5e9;
|
||||
color: #4caf50;
|
||||
}
|
||||
|
||||
/* 标签样式 */
|
||||
.label-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
border-radius: 12px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.label-own {
|
||||
background: #e3f2fd;
|
||||
color: #1976d2;
|
||||
}
|
||||
|
||||
.label-rent {
|
||||
background: #fff3e0;
|
||||
color: #f57c00;
|
||||
}
|
||||
|
||||
/* 分页样式优化 */
|
||||
.pagination > li > a,
|
||||
.pagination > li > span {
|
||||
border-radius: 6px;
|
||||
margin: 0 3px;
|
||||
border: 1px solid #e4e7ed;
|
||||
color: #667eea;
|
||||
}
|
||||
|
||||
.pagination > .active > a {
|
||||
background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
|
||||
border-color: #667eea;
|
||||
}
|
||||
|
||||
/* zTree节点图标 */
|
||||
.ztree li span.button.level1 {
|
||||
background-position: -110px -16px;
|
||||
}
|
||||
|
||||
.ztree li span.button.level2 {
|
||||
background-position: -110px -48px;
|
||||
}
|
||||
|
||||
.ztree li span.button.level3 {
|
||||
background-position: -110px -80px;
|
||||
}
|
||||
|
||||
.ztree li span.button.level4 {
|
||||
background-position: -110px -112px;
|
||||
}
|
||||
|
||||
/* zTree节点选中高亮 */
|
||||
.ztree li a.curSelectedNode {
|
||||
background-color: #667eea !important;
|
||||
color: #fff !important;
|
||||
border-radius: 4px;
|
||||
padding: 2px 6px;
|
||||
animation: pulse 0.5s ease-in-out;
|
||||
}
|
||||
|
||||
@keyframes pulse {
|
||||
0%, 100% {
|
||||
transform: scale(1);
|
||||
}
|
||||
50% {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
}
|
||||
|
||||
/* zTree节点悬停效果 */
|
||||
.ztree li a:hover {
|
||||
background-color: #f5f7fa;
|
||||
border-radius: 4px;
|
||||
transition: all 0.3s;
|
||||
}
|
||||
|
||||
/* 加载动画 */
|
||||
.loading-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(255, 255, 255, 0.9);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
|
||||
.loading-spinner {
|
||||
width: 50px;
|
||||
height: 50px;
|
||||
border: 4px solid #f3f3f3;
|
||||
border-top: 4px solid #667eea;
|
||||
border-radius: 50%;
|
||||
animation: spin 1s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
0% { transform: rotate(0deg); }
|
||||
100% { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* 空状态样式 */
|
||||
.empty-state {
|
||||
text-align: center;
|
||||
padding: 60px 20px;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
.empty-state i {
|
||||
font-size: 64px;
|
||||
color: #ddd;
|
||||
margin-bottom: 20px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
.empty-state p {
|
||||
font-size: 16px;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 响应式优化 */
|
||||
@media (max-width: 768px) {
|
||||
.tree-container {
|
||||
height: 400px;
|
||||
margin-bottom: 20px;
|
||||
}
|
||||
|
||||
.action-buttons {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.action-buttons .btn {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.search-header .form-control,
|
||||
.search-header .btn {
|
||||
width: 100% !important;
|
||||
margin: 5px 0 !important;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="page-content">
|
||||
<!-- 面包屑导航 -->
|
||||
<div class="breadcrumb-container" style="display: none;">
|
||||
<ul class="breadcrumb-nav" id="breadcrumbNav">
|
||||
<li><a href="javascript:void(0);" onclick="goToHome()"><i class="icon-home"></i> 首页</a></li>
|
||||
<li class="active">机具类型管理</li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<!-- 主内容区域 -->
|
||||
<div class="row">
|
||||
<!-- 左侧树形区域 -->
|
||||
<div class="col-sm-4">
|
||||
<div class="tree-container">
|
||||
<div class="tree-header">
|
||||
<h4><i class="icon-sitemap"></i> 机具类型结构</h4>
|
||||
<div class="tree-actions">
|
||||
<button class="btn btn-sm btn-primary-custom" id="addBtn">
|
||||
<i class="icon-plus"></i> 新增
|
||||
</button>
|
||||
<button class="btn btn-sm btn-info-custom" onclick="exportData()">
|
||||
<i class="icon-download"></i> 导出
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 树搜索区域 -->
|
||||
<div class="tree-search-area">
|
||||
<div style="display: flex; gap: 5px; align-items: center;">
|
||||
<input type="text" id="model" class="form-control" style="flex: 1;" placeholder="输入物资型号" onkeypress="if(event.keyCode==13){searchType();return false;}">
|
||||
<button class="btn btn-primary btn-sm" onclick="searchType()" title="搜索">
|
||||
<i class="icon-search"></i>
|
||||
</button>
|
||||
<button class="btn btn-default btn-sm" onclick="resetTreeSearch()" title="重置">
|
||||
<i class="icon-refresh"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ul id="orgTree" class="ztree orgTree"></ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 右侧内容区域 -->
|
||||
<div class="col-sm-8">
|
||||
<div class="content-container">
|
||||
<div class="content-header">
|
||||
<div class="content-title">
|
||||
<i class="icon-list-alt"></i>
|
||||
<span id="currentViewTitle">规格型号列表</span>
|
||||
<small style="color: #999; font-size: 12px; font-weight: normal;" id="roleVisName">请选择机具类型</small>
|
||||
</div>
|
||||
<div class="action-buttons">
|
||||
<button class="btn btn-sm btn-warning-custom" id="upWarnValue">
|
||||
<i class="icon-warning-sign"></i> 库存预警设置
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 搜索表单 -->
|
||||
<form id="baseForm" class="form-inline" method="POST" style="margin-bottom: 15px;">
|
||||
<input type="text" style="height: 36px; border-radius: 6px; width: 250px;" id="keyWord" name="keyWord" placeholder="输入规格型号关键词" class="form-control">
|
||||
<button id="searchBtn" class="btn btn-warning btn-sm" style="margin-left: 10px; border-radius: 6px;" type="button" onclick="getbaseList(1)">
|
||||
<i class="icon-search"></i> 搜索
|
||||
</button>
|
||||
<button id="showAllBtn" class="btn btn-info btn-sm" style="margin-left: 10px; border-radius: 6px;" type="button" onclick="showAllSpecifications()">
|
||||
<i class="icon-th-list"></i> 显示全部
|
||||
</button>
|
||||
<button id="addSpecBtn" class="btn btn-success btn-sm" style="margin-left: 10px; border-radius: 6px;" type="button" onclick="addSpecification()">
|
||||
<i class="icon-plus"></i> 新增规格型号
|
||||
</button>
|
||||
|
||||
<input style="display: none;" type="text" value="0" id="pId" name="parentId">
|
||||
<input style="display: none;" type="text" value="0" id="parentIds" name="parentIds">
|
||||
<input style="display: none;" type="text" value="0" id="level" name="level">
|
||||
<input type="hidden" class="pageNum" name="pageNum" value="1"/>
|
||||
<input type="hidden" class="pageSize" name="pageSize" value="10"/>
|
||||
<input type="hidden" id="companyId" name="companyId" value="0"/>
|
||||
<iframe name="downloadFrame" style="display: none;" frameborder="0"></iframe>
|
||||
</form>
|
||||
|
||||
<!-- 数据表格 -->
|
||||
<table id="baseTable" class="table table-bordered table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:5%">序号</th>
|
||||
<th style="width:10%">物资类型</th>
|
||||
<th style="width:10%">物资名称</th>
|
||||
<th style="width:12%">规格型号</th>
|
||||
<th style="width:8%">数量</th>
|
||||
<th style="width:8%">单位</th>
|
||||
<th style="width:10%">租赁价格(元)</th>
|
||||
<th style="width:10%">丢失赔偿价</th>
|
||||
<th style="width:10%">购置价(元)</th>
|
||||
<th style="width:17%">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
</table>
|
||||
|
||||
<!-- 分页 -->
|
||||
<div class="row" style="margin-top: 20px;">
|
||||
<div class="col-sm-12">
|
||||
<div id="pageing" class="dataTables_paginate paging_bootstrap">
|
||||
<ul class="pagination"></ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 引入表单弹窗 -->
|
||||
<%@include file="./machineTypeformNew.jsp" %>
|
||||
<%@include file="../dialog.jsp" %>
|
||||
</div>
|
||||
|
||||
<script src="${bonuspath}/static/js/ma/machineTypeNew.js?v=3.6"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
|
@ -54,9 +54,7 @@
|
|||
<th style="width:5%" class="center">购置价格</th>
|
||||
<th style="width:4%" class="center">固定资产</th>
|
||||
<th style="width:10%" class="center">固定编号</th>
|
||||
<th style="width:5%" class="center">原编号</th>
|
||||
<th style="width:5%" class="center">设备编码</th>
|
||||
<th style="width:9%" class="center">资产属性</th>
|
||||
<th style="width:6%" class="center">出厂日期</th>
|
||||
<th style="width:4.5%" class="center">合格证</th>
|
||||
<th style="width:4.5%" class="center">技术材料</th>
|
||||
|
|
|
|||
|
|
@ -57,9 +57,8 @@
|
|||
<th style="width:5%" class="center">购置价格</th>
|
||||
<th style="width:4%" class="center">固定资产</th>
|
||||
<th style="width:8%" class="center">固定编号</th>
|
||||
<th style="width:5%" class="center">原编号</th>
|
||||
<th style="width:5%" class="center">设备编码</th>
|
||||
<th style="width:9%" class="center">资产属性</th>
|
||||
<th style="width: 6%" class="center">出厂日期</th>
|
||||
<th style="width:5%" class="center">合格证</th>
|
||||
<th style="width:5%" class="center">技术材料</th>
|
||||
<th style="width:5%" class="center">改造手续</th>
|
||||
|
|
@ -67,7 +66,7 @@
|
|||
<th style="width:6%" class="center">二维码</th>
|
||||
<th style="width:6%" class="center">机具状态</th>
|
||||
<th style="width:6%" class="center">备注</th>
|
||||
<th style="width:10%" class="center">操作</th>
|
||||
<th style="width:5%" class="center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody></tbody>
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
<th style="width:6%" class="center">单位</th>
|
||||
<th style="width:10%" class="center">租赁价格(元)</th>
|
||||
<th style="width:10%" class="center">丢失赔偿价格(元)</th>
|
||||
<th style="width:10%" class="center">原值(元)</th>
|
||||
<th style="width:10%" class="center">购置价(元)</th>
|
||||
<th style="width:10%" class="center">操作人</th>
|
||||
<th style="width:10%" class="center">文件是否上传</th>
|
||||
<th style="width:8%" class="center">备注</th>
|
||||
|
|
|
|||
|
|
@ -24,14 +24,17 @@
|
|||
<form id="baseForm" class="form-inline" method="POST" onsubmit="return false;">
|
||||
<div class="row">
|
||||
<div class="widget-main">
|
||||
  <font>任务状态:</font>
|
||||
<select id="isFinish" name="isFinishs">
|
||||
|
||||
<label for="isFinish">任务状态:</label>
|
||||
<select id="isFinish" name="isFinishs" style="width: 60px;" >
|
||||
<option selected="selected" value="0">待办</option>
|
||||
<option value="1">已办</option>
|
||||
</select>
|
||||
<input type="text" id="keyWord" name="keyWord" placeholder="这里输入关键词" class="input-large">
|
||||
<button id='searchBtn' class="btn btn-warning btn-sm" title="过滤" type="button" onclick="getbaseList(1)"><i class="icon-search bigger-110 icon-only"></i></button>
|
||||
|
||||
<label for="keyWord">关键词搜索:</label><input type="text" id="keyWord" name="keyWord" placeholder="任务名称、单号" class="input-large">
|
||||
<button id='searchBtn' class="btn btn-success btn-sm" title="过滤" type="button" onclick="getbaseList(1)"><i class="icon-search bigger-110 icon-only"></i></button>
|
||||
<button id='getSelectedBtn' class="btn btn-success btn-sm" title="过滤" type="button">批量审批</button>
|
||||
<button id='viewFlowchart' class="btn btn-sm" onclick="viewFlowChart()" title="过滤" type="button">流程图</button>
|
||||
</div>
|
||||
</div>
|
||||
<input type='hidden' class='pageNum' name='pageNum' value='1'/>
|
||||
|
|
@ -138,6 +141,16 @@
|
|||
getbaseList(1);
|
||||
}
|
||||
|
||||
function viewFlowChart() {
|
||||
layer.open({
|
||||
type: 1,
|
||||
title: false,
|
||||
area: ['647px', '510px'],
|
||||
shadeClose: true,
|
||||
content: '<img src="${bonuspath}/static/img/flowchart.png" style="width:100%;" alt="流程图">'
|
||||
});
|
||||
}
|
||||
|
||||
$(function() {
|
||||
// 页面加载完成后立即获取待办列表
|
||||
getbaseList(1);
|
||||
|
|
|
|||
|
|
@ -1,5 +1,10 @@
|
|||
@CHARSET "UTF-8";
|
||||
body{background-color:#FFFFFF}
|
||||
/* 去掉表格斑马线效果 */
|
||||
.table-striped>tbody>tr:nth-child(odd)>td,
|
||||
.table-striped>tbody>tr:nth-child(odd)>th {
|
||||
background-color: #fff !important;
|
||||
}
|
||||
.row .form-inline select{font-weight: bold;color: #707070;}
|
||||
.form-inline label{font-weight: bold;color: #707070;}
|
||||
.font-bold{font-weight: bold;}
|
||||
|
|
@ -9,7 +14,176 @@ form .isSelect135{width:135px;}form .isSelect125{width:125px;}form .isSelect115{
|
|||
form .isSelect105{width:105px;}form .isSelect95{width:95px;}form .isSelect85{width:85px;}
|
||||
form .isSelect75{width:75px;}form .isSelect65{width:65px;}form .isSelect55{width:55px;}
|
||||
button, input, select, textarea {margin: 1px;}
|
||||
.dataTables_paginate .pagination .choseJPage{height:30px;width:55px;text-align:center;float:left;}
|
||||
|
||||
/* ========== 现代化分页组件设计 ========== */
|
||||
.dataTables_paginate {
|
||||
padding: 15px 0;
|
||||
text-align: right;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
flex-wrap: wrap;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination > li {
|
||||
display: inline-block;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
/* 页码链接和文本样式 */
|
||||
.dataTables_paginate .pagination > li > a,
|
||||
.dataTables_paginate .pagination > li > span {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 36px;
|
||||
height: 36px;
|
||||
padding: 0 8px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
color: #333;
|
||||
background-color: #f5f5f5;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
text-decoration: none;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination > li > a:hover {
|
||||
background-color: #e8e8e8;
|
||||
border-color: #d0d0d0;
|
||||
color: #000;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination > li > a:active {
|
||||
background-color: #ddd;
|
||||
}
|
||||
|
||||
/* 当前页码样式 */
|
||||
.dataTables_paginate .pagination > li.active > a,
|
||||
.dataTables_paginate .pagination > li.active > span {
|
||||
background-color: #428bca;
|
||||
border-color: #428bca;
|
||||
color: #fff;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination > li.active > a:hover {
|
||||
background-color: #3276b1;
|
||||
border-color: #3276b1;
|
||||
}
|
||||
|
||||
/* 禁用状态 */
|
||||
.dataTables_paginate .pagination > li.disabled > a,
|
||||
.dataTables_paginate .pagination > li.disabled > span {
|
||||
color: #999;
|
||||
background-color: #f9f9f9;
|
||||
border-color: #e0e0e0;
|
||||
cursor: not-allowed;
|
||||
opacity: 0.6;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination > li.disabled > a:hover {
|
||||
background-color: #f9f9f9;
|
||||
border-color: #e0e0e0;
|
||||
color: #999;
|
||||
}
|
||||
|
||||
/* 页码输入框 */
|
||||
.dataTables_paginate .pagination .choseJPage {
|
||||
height: 36px;
|
||||
width: 60px;
|
||||
padding: 6px 8px;
|
||||
font-size: 14px;
|
||||
text-align: center;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
transition: all 0.3s ease;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination .choseJPage:focus {
|
||||
outline: none;
|
||||
border-color: #428bca;
|
||||
box-shadow: 0 0 0 3px rgba(66, 139, 202, 0.1);
|
||||
}
|
||||
|
||||
/* 跳转按钮 */
|
||||
.dataTables_paginate .pagination .btn {
|
||||
height: 36px;
|
||||
padding: 0 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 500;
|
||||
border-radius: 4px;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination .btn-success {
|
||||
background-color: #5cb85c;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination .btn-success:hover {
|
||||
background-color: #4cae4c;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination .btn-success:active {
|
||||
background-color: #449d44;
|
||||
}
|
||||
|
||||
/* 条数下拉框 */
|
||||
.dataTables_paginate .pagination select {
|
||||
height: 36px;
|
||||
padding: 6px 8px;
|
||||
font-size: 14px;
|
||||
border: 1px solid #e0e0e0;
|
||||
border-radius: 4px;
|
||||
background-color: #fff;
|
||||
color: #333;
|
||||
cursor: pointer;
|
||||
transition: all 0.3s ease;
|
||||
appearance: none;
|
||||
background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
|
||||
background-repeat: no-repeat;
|
||||
background-position: right 8px center;
|
||||
background-size: 16px;
|
||||
padding-right: 28px;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination select:focus {
|
||||
outline: none;
|
||||
border-color: #428bca;
|
||||
box-shadow: 0 0 0 3px rgba(66, 139, 202, 0.1);
|
||||
}
|
||||
|
||||
/* 分页信息文本 */
|
||||
.dataTables_paginate .pagination > li > span {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #666;
|
||||
font-weight: normal;
|
||||
cursor: default;
|
||||
padding: 0 4px;
|
||||
}
|
||||
|
||||
.dataTables_paginate .pagination > li > span:hover {
|
||||
background-color: transparent;
|
||||
border: none;
|
||||
color: #666;
|
||||
}
|
||||
.aBtnNoTD{cursor:pointer;text-decoration:none;}
|
||||
.aBtnNoTD:hover{cursor: pointer;text-decoration:none;}
|
||||
.aBtnNoTD:focus{cursor: pointer;text-decoration:none;}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 176 KiB |
|
|
@ -196,9 +196,7 @@ function getbaseList(index) {
|
|||
html += "<td style='vertical-align:middle;' class='center'>是</td>";
|
||||
}
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.assetNum) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.originNum) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.deviceCode) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.companyName) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.outFactortTime) + "</td>";
|
||||
if(l.fileName == null || l.fileName == 'null' || l.fileName == ''){
|
||||
html += "<td style='vertical-align:middle;' class='center'><a href='javascript:void(0)' onclick = 'uploadImg("+l.id+",1)'>上传</a></td>";
|
||||
|
|
|
|||
|
|
@ -197,9 +197,8 @@ function getbaseList(index) {
|
|||
html += "<td style='vertical-align:middle;' class='center'>是</td>";
|
||||
}
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.assetNum) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.originNum) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.deviceCode) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.companyName) + "</td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'>"+ JY.Object.notEmpty(l.outFactortTime) + "</td>";
|
||||
if(l.fileName == null || l.fileName == 'null' || l.fileName == ''){
|
||||
html += "<td style='vertical-align:middle;' class='center'><a href='javascript:void(0)' onclick = 'uploadImg("+l.id+",1)'>上传</a></td>";
|
||||
html += "<td style='vertical-align:middle;' class='center'><a href='javascript:void(0)' onclick = 'uploadMaterials("+l.id+",2)'>上传</a></td>";
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
|
|
@ -43,97 +43,171 @@
|
|||
<select id="maTypeTree" parameterType="com.bonus.ma.beans.MachineTypeBean" resultMap="ZNode">
|
||||
SELECT *
|
||||
FROM (
|
||||
SELECT
|
||||
mta.ID,
|
||||
mta.PARENT_ID AS pId,
|
||||
CONCAT( mta.`NAME`, '
|
||||
', CASE mta.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE
|
||||
'' END ) AS `name`,
|
||||
|
||||
mta.`LEVEL` AS sx,
|
||||
mta.SORT_NUM,
|
||||
'11' as ORG_ID,
|
||||
mta.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type
|
||||
mta
|
||||
WHERE
|
||||
mta.`LEVEL` = 1
|
||||
AND mta.PARENT_ID = 0
|
||||
<if test=" param.typeName != null and param.typeName != ''">
|
||||
and mta.`NAME` LIKE CONCAT('%',#{param.typeName},'%')
|
||||
</if>
|
||||
GROUP BY mta.ID
|
||||
|
||||
UNION
|
||||
SELECT
|
||||
mtb.ID,
|
||||
mtb.PARENT_ID AS pId,
|
||||
CONCAT(
|
||||
mtb.`NAME`, ' ', CASE mtb.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE '' END ) AS `name`,
|
||||
|
||||
mtb.`LEVEL` AS sx,
|
||||
mtb.SORT_NUM,
|
||||
'11' as ORG_ID,
|
||||
mtb.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type
|
||||
mtb
|
||||
WHERE
|
||||
mtb.`LEVEL` = 2
|
||||
|
||||
AND mtb.IS_ACTIVE = 1
|
||||
<if test=" param.name != null and param.name != ''">
|
||||
and mtb.`NAME` LIKE CONCAT('%',#{param.name},'%')
|
||||
</if>
|
||||
|
||||
<if test=" param.typeName != null and param.typeName != ''">
|
||||
and mtb.PARENT_ID in (
|
||||
SELECT id FROM mm_type mta
|
||||
<!-- 当搜索 model(规格型号)时,只返回匹配的第3层节点及其父节点路径 -->
|
||||
<if test="param.model != null and param.model != ''">
|
||||
<!-- 第1层:只返回包含匹配规格型号的第1层节点 -->
|
||||
SELECT
|
||||
mta.ID,
|
||||
mta.PARENT_ID AS pId,
|
||||
CONCAT( mta.`NAME`, '
|
||||
', CASE mta.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE
|
||||
'' END ) AS `name`,
|
||||
mta.`LEVEL` AS sx,
|
||||
mta.SORT_NUM,
|
||||
'11' as ORG_ID,
|
||||
mta.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type mta
|
||||
WHERE
|
||||
mta.`NAME` LIKE CONCAT('%',#{param.typeName},'%')
|
||||
mta.`LEVEL` = 1
|
||||
AND mta.PARENT_ID = 0
|
||||
AND mta.ID IN (
|
||||
SELECT DISTINCT mtb.PARENT_ID FROM mm_type mtb
|
||||
WHERE mtb.`LEVEL` = 2 AND mtb.ID IN (
|
||||
SELECT DISTINCT mtc.PARENT_ID FROM mm_type mtc
|
||||
WHERE mtc.`LEVEL` = 3 AND mtc.IS_ACTIVE = 1
|
||||
AND mtc.`NAME` LIKE CONCAT('%',#{param.model},'%')
|
||||
)
|
||||
)
|
||||
GROUP BY mta.ID
|
||||
|
||||
UNION
|
||||
|
||||
<!-- 第2层:只返回包含匹配规格型号的第2层节点 -->
|
||||
SELECT
|
||||
mtb.ID,
|
||||
mtb.PARENT_ID AS pId,
|
||||
CONCAT(
|
||||
mtb.`NAME`, ' ', CASE mtb.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE '' END ) AS `name`,
|
||||
mtb.`LEVEL` AS sx,
|
||||
mtb.SORT_NUM,
|
||||
'11' as ORG_ID,
|
||||
mtb.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type mtb
|
||||
WHERE
|
||||
mtb.`LEVEL` = 2
|
||||
AND mtb.IS_ACTIVE = 1
|
||||
AND mtb.ID IN (
|
||||
SELECT DISTINCT mtc.PARENT_ID FROM mm_type mtc
|
||||
WHERE mtc.`LEVEL` = 3 AND mtc.IS_ACTIVE = 1
|
||||
AND mtc.`NAME` LIKE CONCAT('%',#{param.model},'%')
|
||||
)
|
||||
|
||||
UNION
|
||||
|
||||
<!-- 第3层:返回匹配的规格型号 -->
|
||||
SELECT
|
||||
mtc.ID,
|
||||
mtc.PARENT_ID AS pId,
|
||||
CONCAT( mtc.`NAME`, ' ', CASE
|
||||
mtc.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE '' END )
|
||||
AS `name`,
|
||||
mtc.`LEVEL` AS sx,
|
||||
mtc.SORT_NUM,
|
||||
'11' as ORG_ID,
|
||||
mtc.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type mtc
|
||||
WHERE
|
||||
mtc.`LEVEL` = 3
|
||||
AND mtc.IS_ACTIVE = 1
|
||||
AND mtc.`NAME` LIKE CONCAT('%',#{param.model},'%')
|
||||
</if>
|
||||
|
||||
UNION
|
||||
<!-- 当搜索其他参数时,使用原有逻辑 -->
|
||||
<if test="param.model == null or param.model == ''">
|
||||
SELECT
|
||||
mta.ID,
|
||||
mta.PARENT_ID AS pId,
|
||||
CONCAT( mta.`NAME`, '
|
||||
', CASE mta.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE
|
||||
'' END ) AS `name`,
|
||||
|
||||
SELECT
|
||||
mtc.ID,
|
||||
mtc.PARENT_ID AS pId,
|
||||
CONCAT( mtc.`NAME`, ' ', CASE
|
||||
mtc.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE '' END )
|
||||
AS `name`,
|
||||
mta.`LEVEL` AS sx,
|
||||
mta.SORT_NUM,
|
||||
'11' as ORG_ID,
|
||||
mta.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type
|
||||
mta
|
||||
WHERE
|
||||
mta.`LEVEL` = 1
|
||||
AND mta.PARENT_ID = 0
|
||||
<if test=" param.typeName != null and param.typeName != ''">
|
||||
and mta.`NAME` LIKE CONCAT('%',#{param.typeName},'%')
|
||||
</if>
|
||||
GROUP BY mta.ID
|
||||
|
||||
mtc.`LEVEL` AS sx,
|
||||
mtc.SORT_NUM,
|
||||
'11' as
|
||||
ORG_ID,
|
||||
mtc.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type mtc
|
||||
WHERE
|
||||
mtc.`LEVEL` = 3
|
||||
AND mtc.IS_ACTIVE = 1
|
||||
<if test=" param.model != null and param.model != ''">
|
||||
and mtc.`NAME` LIKE CONCAT('%',#{param.model},'%')
|
||||
</if>
|
||||
UNION
|
||||
SELECT
|
||||
mtb.ID,
|
||||
mtb.PARENT_ID AS pId,
|
||||
CONCAT(
|
||||
mtb.`NAME`, ' ', CASE mtb.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE '' END ) AS `name`,
|
||||
|
||||
<if test=" param.typeName != null and param.typeName != ''">
|
||||
and mtc.PARENT_ID in (
|
||||
SELECT id FROM mm_type mtb
|
||||
WHERE mtb.`LEVEL` = 2 AND mtb.PARENT_ID in (SELECT id FROM mm_type mta
|
||||
WHERE mta.`LEVEL` = 1 and mta.`NAME` LIKE CONCAT('%',#{param.typeName},'%' ))
|
||||
)
|
||||
</if>
|
||||
mtb.`LEVEL` AS sx,
|
||||
mtb.SORT_NUM,
|
||||
'11' as ORG_ID,
|
||||
mtb.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type
|
||||
mtb
|
||||
WHERE
|
||||
mtb.`LEVEL` = 2
|
||||
|
||||
<if test=" param.name != null and param.name != ''">
|
||||
and mtc.PARENT_ID in (
|
||||
SELECT id FROM mm_type mtb WHERE
|
||||
mtb.`LEVEL` = 2 AND mtb.`NAME` LIKE CONCAT('%',#{param.name},'%')
|
||||
)
|
||||
AND mtb.IS_ACTIVE = 1
|
||||
<if test=" param.name != null and param.name != ''">
|
||||
and mtb.`NAME` LIKE CONCAT('%',#{param.name},'%')
|
||||
</if>
|
||||
|
||||
<if test=" param.typeName != null and param.typeName != ''">
|
||||
and mtb.PARENT_ID in (
|
||||
SELECT id FROM mm_type mta
|
||||
WHERE
|
||||
mta.`NAME` LIKE CONCAT('%',#{param.typeName},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
UNION
|
||||
|
||||
SELECT
|
||||
mtc.ID,
|
||||
mtc.PARENT_ID AS pId,
|
||||
CONCAT( mtc.`NAME`, ' ', CASE
|
||||
mtc.`IS_LABEL` WHEN '1' THEN '(自有)' WHEN '2'
|
||||
THEN '(外租)' ELSE '' END )
|
||||
AS `name`,
|
||||
|
||||
mtc.`LEVEL` AS sx,
|
||||
mtc.SORT_NUM,
|
||||
'11' as
|
||||
ORG_ID,
|
||||
mtc.IS_COUNT AS isCount
|
||||
FROM
|
||||
mm_type mtc
|
||||
WHERE
|
||||
mtc.`LEVEL` = 3
|
||||
AND mtc.IS_ACTIVE = 1
|
||||
<if test=" param.name != null and param.name != ''">
|
||||
and mtc.PARENT_ID in (
|
||||
SELECT id FROM mm_type mtb WHERE
|
||||
mtb.`LEVEL` = 2 AND mtb.`NAME` LIKE CONCAT('%',#{param.name},'%')
|
||||
)
|
||||
</if>
|
||||
|
||||
<if test=" param.typeName != null and param.typeName != ''">
|
||||
and mtc.PARENT_ID in (
|
||||
SELECT id FROM mm_type mtb
|
||||
WHERE mtb.`LEVEL` = 2 AND mtb.PARENT_ID in (SELECT id FROM mm_type mta
|
||||
WHERE mta.`LEVEL` = 1 and mta.`NAME` LIKE CONCAT('%',#{param.typeName},'%' ))
|
||||
)
|
||||
</if>
|
||||
</if>
|
||||
|
||||
) a
|
||||
|
|
@ -661,67 +735,115 @@
|
|||
mkt.TYPE_ID = mta.ID LEFT JOIN mm_type mtb ON mta.PARENT_ID = mtb.ID WHERE
|
||||
mkt.USER_ID = #{keeperId} and mtb.ID = #{parentId} </select> -->
|
||||
|
||||
<select id="findDetails" parameterType="com.bonus.ma.beans.MachineTypeBean"
|
||||
resultType="com.bonus.ma.beans.MachineTypeBean">
|
||||
SELECT
|
||||
DISTINCT
|
||||
mat.ID AS id,
|
||||
mr.ORG_ID AS companyId,
|
||||
po.`NAME` AS
|
||||
companyName,
|
||||
mat.`NAME`,
|
||||
mat2.`NAME` AS parentName,
|
||||
mat.UNIT AS unit,
|
||||
mat.WEIGHT AS weight,
|
||||
mat.RATED_LOAD AS ratedLoad,
|
||||
mat.TEST_LOAD AS
|
||||
testLoad,
|
||||
mat.HOLDING_TIME AS holdingTime,
|
||||
mat.LEASE_PRICE AS
|
||||
leasePrice,
|
||||
ROUND(CONVERT ( ( mat.PAY_PRICE ), DECIMAL ( 10, 2 ) )) AS
|
||||
payPrice,
|
||||
ROUND(mat.BUY_PRICE) AS buyPrice,
|
||||
mat.IS_COUNT AS isCount,
|
||||
mat.FILE_URL AS fileUrl,
|
||||
ROUND(mat.NUM) AS nums,
|
||||
mat.SAMPING_RATIO AS
|
||||
sampingRatio,
|
||||
mat.WARN_NUM AS warnNum
|
||||
<select id="findDetails" parameterType="com.bonus.ma.beans.MachineTypeBean" resultType="com.bonus.ma.beans.MachineTypeBean">
|
||||
SELECT DISTINCT
|
||||
mat.ID AS id,
|
||||
mr.ORG_ID AS companyId,
|
||||
po.`NAME` AS companyName,
|
||||
mat.`NAME`,
|
||||
mat2.`NAME` AS parentName,
|
||||
mat2.ID AS parentId,
|
||||
mat.UNIT AS unit,
|
||||
mat.WEIGHT AS weight,
|
||||
mat.RATED_LOAD AS ratedLoad,
|
||||
mat.TEST_LOAD AS testLoad,
|
||||
mat.HOLDING_TIME AS holdingTime,
|
||||
mat.LEASE_PRICE AS leasePrice,
|
||||
ROUND(CONVERT ( ( mat.PAY_PRICE ), DECIMAL ( 10, 2 ) )) AS payPrice,
|
||||
ROUND(mat.BUY_PRICE) AS buyPrice,
|
||||
mat.IS_COUNT AS isCount,
|
||||
mat.FILE_URL AS fileUrl,
|
||||
ROUND(mat.NUM) AS nums,
|
||||
mat.SAMPING_RATIO AS sampingRatio,
|
||||
mat.WARN_NUM AS warnNum,
|
||||
mat.LEVEL AS level
|
||||
FROM
|
||||
mm_type mat
|
||||
LEFT JOIN
|
||||
ma_org_relation mr ON mat.ID = mr.TYPE_ID
|
||||
LEFT JOIN pm_organization po
|
||||
ON mr.ORG_ID = po.ID
|
||||
LEFT JOIN mm_type mat2 ON mat2.ID = mat.PARENT_ID
|
||||
LEFT JOIN mm_type mat3 ON mat3.ID = mat2.PARENT_ID
|
||||
LEFT JOIN mm_type
|
||||
mat4 ON mat4.ID = mat3.PARENT_ID
|
||||
mm_type mat
|
||||
LEFT JOIN ma_org_relation mr ON mat.ID = mr.TYPE_ID
|
||||
LEFT JOIN pm_organization po ON mr.ORG_ID = po.ID
|
||||
LEFT JOIN mm_type mat2 ON mat2.ID = mat.PARENT_ID
|
||||
LEFT JOIN mm_type mat3 ON mat3.ID = mat2.PARENT_ID
|
||||
LEFT JOIN mm_type mat4 ON mat4.ID = mat3.PARENT_ID
|
||||
WHERE
|
||||
mat4.PARENT_ID = 0
|
||||
AND
|
||||
mat.IS_ACTIVE = '1'
|
||||
AND mat2.IS_ACTIVE = '1'
|
||||
AND mat3.IS_ACTIVE = '1'
|
||||
AND mat4.IS_ACTIVE = '1'
|
||||
and mat.PARENT_ID = #{param.parentId}
|
||||
|
||||
mat4.PARENT_ID = 0
|
||||
AND mat.IS_ACTIVE = '1'
|
||||
AND mat2.IS_ACTIVE = '1'
|
||||
AND mat3.IS_ACTIVE = '1'
|
||||
AND mat4.IS_ACTIVE = '1'
|
||||
<if test="param.parentId != null and param.parentId != ''">
|
||||
and mat.PARENT_ID = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
and (
|
||||
mat.`NAME` like CONCAT('%',#{param.keyWord},'%') or
|
||||
mat4.`NAME` like CONCAT('%',#{param.keyWord},'%') or
|
||||
mat.WEIGHT like CONCAT('%',#{param.keyWord},'%') or
|
||||
mat.LEASE_PRICE
|
||||
like CONCAT('%',#{param.keyWord},'%') or
|
||||
mat.PAY_PRICE like
|
||||
CONCAT('%',#{param.keyWord},'%') or
|
||||
mat.BUY_PRICE like
|
||||
CONCAT('%',#{param.keyWord},'%')
|
||||
mat.LEASE_PRICE like CONCAT('%',#{param.keyWord},'%') or
|
||||
mat.PAY_PRICE like CONCAT('%',#{param.keyWord},'%') or
|
||||
mat.BUY_PRICE like CONCAT('%',#{param.keyWord},'%')
|
||||
)
|
||||
</if>
|
||||
GROUP BY mat.ID,mr.ORG_ID
|
||||
</select>
|
||||
|
||||
<!-- 新增:搜索规格型号(第4层)并返回完整层级信息 -->
|
||||
<select id="searchSpecifications" resultType="com.bonus.ma.beans.MachineTypeBean">
|
||||
SELECT DISTINCT
|
||||
mat.ID AS id,
|
||||
mat.`NAME` AS name,
|
||||
mat.LEVEL AS level,
|
||||
mat.IS_LABEL AS label,
|
||||
mat.WARN_VALUE AS warnValue,
|
||||
mat2.ID AS parentId,
|
||||
mat2.`NAME` AS parentName,
|
||||
mat3.ID AS secondId,
|
||||
mat3.`NAME` AS secondName,
|
||||
mat4.ID AS firstId,
|
||||
mat4.`NAME` AS firstName,
|
||||
mr.ORG_ID AS companyId,
|
||||
po.`NAME` AS companyName,
|
||||
mat.UNIT AS unit,
|
||||
mat.LEASE_PRICE AS leasePrice,
|
||||
ROUND(CONVERT ( ( mat.PAY_PRICE ), DECIMAL ( 10, 2 ) )) AS payPrice,
|
||||
ROUND(mat.BUY_PRICE) AS buyPrice,
|
||||
ROUND(mat.NUM) AS nums
|
||||
FROM
|
||||
mm_type mat
|
||||
LEFT JOIN mm_type mat2 ON mat2.ID = mat.PARENT_ID
|
||||
LEFT JOIN mm_type mat3 ON mat3.ID = mat2.PARENT_ID
|
||||
LEFT JOIN mm_type mat4 ON mat4.ID = mat3.PARENT_ID
|
||||
LEFT JOIN ma_org_relation mr ON mat.ID = mr.TYPE_ID
|
||||
LEFT JOIN pm_organization po ON mr.ORG_ID = po.ID
|
||||
WHERE
|
||||
mat.LEVEL = 4
|
||||
AND mat.IS_ACTIVE = '1'
|
||||
AND mat2.IS_ACTIVE = '1'
|
||||
AND mat3.IS_ACTIVE = '1'
|
||||
AND mat4.IS_ACTIVE = '1'
|
||||
<if test="param.keyWord != null and param.keyWord != ''">
|
||||
AND mat.`NAME` LIKE CONCAT('%', #{param.keyWord}, '%')
|
||||
</if>
|
||||
<if test="param.companyId != null and param.companyId != '' and param.companyId != '1'">
|
||||
AND mr.ORG_ID = #{param.companyId}
|
||||
</if>
|
||||
<!-- 树节点过滤 -->
|
||||
<if test="param.parentId != null and param.parentId != '' and param.parentId != '0'">
|
||||
<if test="param.level == 3 or param.level == '3'">
|
||||
<!-- 第3层:直接匹配parentId -->
|
||||
AND mat2.ID = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.level == 2 or param.level == '2'">
|
||||
<!-- 第2层:匹配secondId -->
|
||||
AND mat3.ID = #{param.parentId}
|
||||
</if>
|
||||
<if test="param.level == 1 or param.level == '1'">
|
||||
<!-- 第1层:匹配firstId -->
|
||||
AND mat4.ID = #{param.parentId}
|
||||
</if>
|
||||
</if>
|
||||
ORDER BY mat.ID
|
||||
</select>
|
||||
|
||||
<select id="findModel" parameterType="com.bonus.ma.beans.MachineTypeBean"
|
||||
resultType="com.bonus.ma.beans.MachineTypeBean">
|
||||
SELECT DISTINCT
|
||||
|
|
|
|||
|
|
@ -37,7 +37,7 @@
|
|||
/backstage/company/** = anon
|
||||
/backstage/project/** = anon
|
||||
/backstage/qrcode/** = anon
|
||||
/backstage/vender/** = anon
|
||||
/backstage/vender/** = authc
|
||||
/images/** = anon
|
||||
/upload/** = anon
|
||||
/optInfo/** = anon
|
||||
|
|
|
|||
|
|
@ -8,10 +8,12 @@ public class MachineTypeBean {
|
|||
|
||||
private String id;
|
||||
private String name;
|
||||
private String firstName;
|
||||
private String secondName;
|
||||
private String parentId;
|
||||
private String parentName;
|
||||
private String firstId; // 第1层ID(物资类型ID)
|
||||
private String firstName; // 第1层名称(物资类型名称)
|
||||
private String secondId; // 第2层ID(物资名称ID)
|
||||
private String secondName; // 第2层名称(物资名称)
|
||||
private String parentId; // 第3层ID(物资型号ID)
|
||||
private String parentName; // 第3层名称(物资型号名称)
|
||||
private String time;
|
||||
private String keeperId;
|
||||
private String keeper;
|
||||
|
|
@ -192,6 +194,14 @@ public class MachineTypeBean {
|
|||
this.id = id;
|
||||
}
|
||||
|
||||
public String getFirstId() {
|
||||
return firstId;
|
||||
}
|
||||
|
||||
public void setFirstId(String firstId) {
|
||||
this.firstId = firstId;
|
||||
}
|
||||
|
||||
public String getFirstName() {
|
||||
return firstName;
|
||||
}
|
||||
|
|
@ -200,12 +210,12 @@ public class MachineTypeBean {
|
|||
this.firstName = firstName;
|
||||
}
|
||||
|
||||
public String getKeeper() {
|
||||
return keeper;
|
||||
public String getSecondId() {
|
||||
return secondId;
|
||||
}
|
||||
|
||||
public void setKeeper(String keeper) {
|
||||
this.keeper = keeper;
|
||||
public void setSecondId(String secondId) {
|
||||
this.secondId = secondId;
|
||||
}
|
||||
|
||||
public String getSecondName() {
|
||||
|
|
@ -216,6 +226,14 @@ public class MachineTypeBean {
|
|||
this.secondName = secondName;
|
||||
}
|
||||
|
||||
public String getKeeper() {
|
||||
return keeper;
|
||||
}
|
||||
|
||||
public void setKeeper(String keeper) {
|
||||
this.keeper = keeper;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1734,6 +1734,9 @@ public class MachineController extends BaseController<MachineBean> {
|
|||
if (os.toLowerCase().startsWith("win")) {
|
||||
saveDirectory = "e://GZMachinesWeb/" + mkdirsName + "/";
|
||||
}
|
||||
if (os.toLowerCase().startsWith("mac")) {
|
||||
saveDirectory = "/Users/syruan/files/" + mkdirsName + "/";
|
||||
}
|
||||
File files = new File(saveDirectory);
|
||||
if (!files.exists()) {
|
||||
files.mkdirs();
|
||||
|
|
|
|||
|
|
@ -48,6 +48,11 @@ public class MachineTypeController extends BaseController<MachineTypeBean> {
|
|||
return "/ma/machineTypelist";
|
||||
}
|
||||
|
||||
@RequestMapping("listNew")
|
||||
public String indexNew(Model model) {
|
||||
return "/ma/machineTypelistNew";
|
||||
}
|
||||
|
||||
@RequestMapping("details")
|
||||
public String details(Model model) {
|
||||
return "/ma/typeDetailslist";
|
||||
|
|
@ -392,9 +397,6 @@ public class MachineTypeController extends BaseController<MachineTypeBean> {
|
|||
public AjaxRes findDetails(Page<MachineTypeBean> page, MachineTypeBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
UserBean user = UserShiroHelper.getRealCurrentUser();
|
||||
String companyId = user.getCompanyId();
|
||||
o.setCompanyId(companyId);
|
||||
Page<MachineTypeBean> result = service.findDetails(o, page);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result);
|
||||
|
|
@ -406,6 +408,31 @@ public class MachineTypeController extends BaseController<MachineTypeBean> {
|
|||
return ar;
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索规格型号(第4层)并返回完整层级信息
|
||||
* 用于全局搜索功能,当在树中(前3层)未找到时,搜索第4层规格型号
|
||||
* 支持分页
|
||||
*/
|
||||
@RequestMapping(value = "searchSpecifications", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes searchSpecifications(Page<MachineTypeBean> page, MachineTypeBean o) {
|
||||
AjaxRes ar = getAjaxRes();
|
||||
try {
|
||||
UserBean user = UserShiroHelper.getRealCurrentUser();
|
||||
String companyId = user.getCompanyId();
|
||||
o.setCompanyId(companyId);
|
||||
Page<MachineTypeBean> result = service.searchSpecifications(o, page);
|
||||
Map<String, Object> p = new HashMap<String, Object>();
|
||||
p.put("list", result.getResults());
|
||||
p.put("totalRecord", result.getTotalRecord());
|
||||
ar.setSucceed(p);
|
||||
} catch (Exception e) {
|
||||
logger.error("搜索规格型号失败", e);
|
||||
ar.setFailMsg("搜索失败:" + e.getMessage());
|
||||
}
|
||||
return ar;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "findModel", method = RequestMethod.POST)
|
||||
@ResponseBody
|
||||
public AjaxRes findModel(MachineTypeBean o) {
|
||||
|
|
|
|||
|
|
@ -96,4 +96,12 @@ public interface MachineTypeDao extends BaseDao<MachineTypeBean> {
|
|||
|
||||
List<MachineTypeBean> nameList(@Param("param") MachineTypeBean o);
|
||||
|
||||
/**
|
||||
* 搜索规格型号(第4层)并返回完整层级信息
|
||||
* @param o 查询参数,包含keyWord和companyId
|
||||
* @param page 分页参数
|
||||
* @return 规格型号列表,包含完整的层级信息(父节点ID、名称等)
|
||||
*/
|
||||
List<MachineTypeBean> searchSpecifications(@Param("param") MachineTypeBean o, Page<MachineTypeBean> page);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -85,4 +85,12 @@ public interface MachineTypeService extends BaseService<MachineTypeBean> {
|
|||
|
||||
List<MachineTypeBean> nameList(MachineTypeBean o);
|
||||
|
||||
/**
|
||||
* 搜索规格型号(第4层)并返回完整层级信息
|
||||
* @param o 查询参数,包含keyWord和companyId
|
||||
* @param page 分页参数
|
||||
* @return 规格型号列表,包含完整的层级信息(父节点ID、名称等)
|
||||
*/
|
||||
Page<MachineTypeBean> searchSpecifications(MachineTypeBean o, Page<MachineTypeBean> page);
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -286,4 +286,10 @@ public class MachineTypeServiceImp extends BaseServiceImp<MachineTypeBean> imple
|
|||
return dao.nameList(o);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Page<MachineTypeBean> searchSpecifications(MachineTypeBean o, Page<MachineTypeBean> page) {
|
||||
page.setResults(dao.searchSpecifications(o, page));
|
||||
return page;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue