first commit
This commit is contained in:
@@ -0,0 +1,126 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加问题</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<link rel="stylesheet" href="${path}/static/css/formSelects-v4.css">
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:370px
|
||||
}
|
||||
.form .layui-form-label{
|
||||
windth:100px;
|
||||
}
|
||||
.layui-upload-img{
|
||||
height:200px;
|
||||
width: 200px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div style="padding: 20px; background-color: #F2F2F2;">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-col-md3"></div>
|
||||
<div class="layui-col-md6">
|
||||
<div class="layui-card"
|
||||
style="border-radius: 20px; border: 2px solid buttonface; box-shadow: 5px 5px 5px #F2F2F2 inset;">
|
||||
<div class="layui-card-body">
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form form">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">问题页面</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="product" lay-verify="product"
|
||||
placeholder="发现问题或不足的菜单" class="layui-input" id="product">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">情况说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="8" cols="50" name="bugRemark"
|
||||
placeholder="说明" id="bugRemark"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" id="test2">多图片上传</button>
|
||||
<blockquote class="layui-elem-quote layui-quote-nm"
|
||||
style="margin-top: 10px; width: 450px">
|
||||
预览图:
|
||||
<div class="layui-upload-list" id="demo2" style="width: 600px"></div>
|
||||
</blockquote>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div style="height: 50px"></div>
|
||||
</div>
|
||||
<div class="layui-col-md3"></div>
|
||||
</div>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'form', 'layer','upload'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
upload = layui.upload;
|
||||
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addBug',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('提交成功,谢谢您的反馈!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
$("#product").val("")
|
||||
$("#bugRemark").val("")
|
||||
form.render()
|
||||
}else {
|
||||
layer.msg('提交出错了!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
//多图片上传
|
||||
upload.render({
|
||||
elem: '#test2',
|
||||
url: '${path}/bugUpload',
|
||||
multiple: true,
|
||||
data: {},
|
||||
before: function(obj){
|
||||
//预读本地文件示例,不支持ie8
|
||||
obj.preview(function(index, file, result){
|
||||
$('#demo2').append('<img src="'+ result +'" alt="'+ file.name +'"class="layui-upload-img">')
|
||||
});
|
||||
},
|
||||
done: function(res){
|
||||
console.log(res)
|
||||
//上传完毕
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,51 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>bug列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 提交问题</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">真实姓名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="realname" name="realname" placeholder="请输入真实姓名"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="bugTable"lay-data="bugTable" lay-filter="bugTable"></table>
|
||||
<script src="${path}/js/bug.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,109 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>财务列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">客服昵称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="nickname" name="nickname" placeholder="请输入客服昵称"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="shopname" id="shopname" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">录入时间</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="type" id="selectedOption" lay-filter="college">
|
||||
<option value="day" selected="selected">按日统计</option>
|
||||
<option value="dayRound">按日期范围统计</option>
|
||||
<option value="week">按周统计</option>
|
||||
<option value="month">按月统计</option>
|
||||
<option value="quarter">按季度统计</option>
|
||||
<option value="year">按年统计</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-inline" id="worldlable" style="width: 200px;">
|
||||
<input id="worldId" type="text" class="layui-input laydate-test" data-type="date" autocomplete="off">
|
||||
</label>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">导入人</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="creator" name="creator" placeholder="请输入导入人"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="bugTable"lay-data="bugTable" lay-filter="bugTable"></table>
|
||||
<script src="${path}/js/customerAward.js" charset="utf-8"></script>
|
||||
<script src="${path}/static/js/dateUtil.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,159 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加用户</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<link href="${path}/static/css/jquery-ui.min.css" rel="stylesheet"/>
|
||||
<script src="${path}/static/js/jquery-ui.min.js"></script>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:600px
|
||||
}
|
||||
.ui-helper-hidden-accessible{
|
||||
display:none
|
||||
}
|
||||
.edge .layui-edge{
|
||||
left:560px;
|
||||
}
|
||||
.ui-menu {
|
||||
z-index: 999;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">客户旺旺</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="wangwang" placeholder="请输入客户的旺旺名" class="layui-input"
|
||||
autocomplete="off" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">所属店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="role" id="role"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="productExplain" id="pExplain" placeholder="请输入产品说明" class="layui-input"
|
||||
autocomplete="on" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">金额</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="price" placeholder="请输入报价金额" class="layui-input"
|
||||
autocomplete="off" lay-verify="number">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item">
|
||||
<label class="layui-form-label">是否成交</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="isBuy" value="1" title="是" checked="">
|
||||
<input type="radio" name="isBuy" value="0" title="否">
|
||||
</div>
|
||||
</div> -->
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">未成交原因</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="commentSelf" placeholder="请输入未成交原因" class="layui-input"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
$("#pExplain").autocomplete({
|
||||
// 通过函数自定义处理数据源
|
||||
source: function(request, response){
|
||||
// request对象只有一个term属性,对应用户输入的文本
|
||||
// response是一个函数,在你自行处理并获取数据后,将JSON数据交给该函数处理,以便于autocomplete根据数据显示列表
|
||||
$.ajax( {
|
||||
url: '${path}/getProductExplain',
|
||||
dataType: 'json',
|
||||
data:{
|
||||
'productExplain' : $("#pExplain").val()
|
||||
},
|
||||
success: function(dataObj){
|
||||
response(dataObj); //将数据交给autocomplete去展示
|
||||
}
|
||||
} );
|
||||
}
|
||||
});
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
//获取用户的角色
|
||||
$.ajax({
|
||||
url : '${path}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {},
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
var datas = data.data.userRoleList
|
||||
$.each(datas, function(index, item) {
|
||||
$('#role').append(
|
||||
new Option(item.roleName, item.roleId));// 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerData',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
} else {
|
||||
layer.msg('录入失败!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("dataTableAll"); //重新加载页面表格
|
||||
}, 1100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,176 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>数据列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
/* 表格内数据超出换行 */
|
||||
.layui-table-cell {
|
||||
height:auto;
|
||||
overflow:visible;
|
||||
text-overflow:inherit;
|
||||
white-space:normal;
|
||||
word-break: break-all;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<!-- 只有自己新增的数据才允许编辑删除 -->
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"style="color:white;font-size:20px"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger"" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<script type="text/html" id="isBuyTpl">
|
||||
<input type="checkbox" name="isBuy" value="{{d.id}}+{{d.username}}+{{d.isBuy}}" lay-skin="switch" lay-text="已成交|未成交" lay-filter="isBuyDemo" {{ d.isBuy == '1'? 'checked' : '' }}>
|
||||
</script>
|
||||
<body>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">真实姓名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="realname" name="realname" placeholder="请输入真实姓名"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">客户旺旺</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="wangwang" name="wangwang" placeholder="请输入客户旺旺"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">是否成交</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="isBuy" id="isBuy">
|
||||
<option value=""></option>
|
||||
<option value="0">未成交</option>
|
||||
<option value="1">已成交</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">录入时间</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="type" id="selectedOption" lay-filter="college">
|
||||
<option value="day" selected="selected">按日统计</option>
|
||||
<option value="dayRound">按日期范围统计</option>
|
||||
<option value="week">按周统计</option>
|
||||
<option value="month">按月统计</option>
|
||||
<option value="quarter">按季度统计</option>
|
||||
<option value="year">按年统计</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-inline" id="worldlable" style="width: 200px;">
|
||||
<input id="worldId" type="text" class="layui-input laydate-test" data-type="date" autocomplete="off">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">所属店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="roleSearch" id="roleSearch" lay-search></select>
|
||||
</div>
|
||||
<input type="hidden" id="role" name="role" value="${sessionScope.USER_SESSION.role}" >
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="dataTable"lay-data="dataTable" lay-filter="dataTable"></table>
|
||||
<script type="text/javascript">
|
||||
//全局定义一次, 加载xm-select
|
||||
layui.config({
|
||||
base: '${path}/static/js/' //js文件的路径
|
||||
}).extend({
|
||||
xmSelect: 'xm-select'
|
||||
});
|
||||
|
||||
//角色名称转换(放在layui.use里面js页面读取不到)
|
||||
var roleData = {};
|
||||
$.ajax({
|
||||
url : '${path}/changeRoleName',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
roleData = data;
|
||||
}
|
||||
});
|
||||
|
||||
// 下拉框第一列添加空的option
|
||||
$('#roleSearch').append(new Option("",""));
|
||||
layui.use([ 'form', 'layer','xmSelect' ],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
xmSelect = layui.xmSelect;
|
||||
|
||||
//获取用户的角色
|
||||
$.ajax({
|
||||
url : '${path}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
flag:"customerData"
|
||||
},
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
var datas = data.data.userRoleList
|
||||
$.each(datas, function(index, item) {
|
||||
$('#roleSearch').append(
|
||||
new Option(item.roleName, item.roleId));// 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
})
|
||||
|
||||
|
||||
// 获取登录用户的用户名,带到js中判断
|
||||
var username;
|
||||
$(document).ready(function() {
|
||||
$.ajax({
|
||||
url : "${path}/loginAttribute",
|
||||
type : "get",
|
||||
success : function(obj) {
|
||||
username = obj.data.user.username;
|
||||
}
|
||||
})
|
||||
})
|
||||
</script>
|
||||
<script src="${path}/static/js/dateUtil.js" charset="utf-8"></script>
|
||||
<script src="${path}/js/customerData.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,131 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加用户</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:600px
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:-150px;
|
||||
}
|
||||
.layui-input-block{
|
||||
margin-top:50px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">客户旺旺</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="wangwang" id="wangwang" placeholder="请输入客户的旺旺名" class="layui-input"
|
||||
autocomplete="off" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" class="layui-input" id="ROLE">
|
||||
<label class="layui-form-label">所属店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="role" id="role"></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="productExplain" id="productExplain" placeholder="请输入产品说明" class="layui-input"
|
||||
autocomplete="off" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">金额</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="price" id="price" placeholder="请输入报价金额" class="layui-input"
|
||||
autocomplete="off" lay-verify="number">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">未成交原因</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="commentSelf" id="commentSelf" placeholder="请输入未成交原因" class="layui-input"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">是否成交</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="isBuy" value="1" title="是">
|
||||
<input type="radio" name="isBuy" value="0" title="否">
|
||||
</div>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'table', 'laydate', 'form','layer'], function() {
|
||||
var $ = layui.jquery;
|
||||
var table = layui.table;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
//获取用户的角色
|
||||
$.ajax({
|
||||
url : '${path}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {},
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
var datas = data.data.userRoleList
|
||||
$.each(datas, function(index, item) {
|
||||
$('#role').append(
|
||||
new Option(item.roleName, item.roleId));// 下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#role").val($("#ROLE").val());
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
form.on('submit(enadd)',function(data){
|
||||
$.ajax({
|
||||
url:'${path}/updateCustomerData',
|
||||
dataType : 'json',
|
||||
data:$(data.form).serialize(),
|
||||
type : 'post',
|
||||
success:function(data){
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:2000});//提示框
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("dataTableAll"); //重新加载页面表格
|
||||
}, 1100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item {
|
||||
margin-top:20px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" id="type" name="type" value="服务态度">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="proType" lay-filter="proType" lay-search lay-verify="required" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="kind" lay-filter="kind" lay-search lay-verify="required" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentAdd_content" name="content" lay-verify="content" lay-verify="required" style="display: none;"></textarea>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentAdd_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
|
||||
<style>
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:17px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增</button>
|
||||
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button> -->
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="服务态度">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kind_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainContentTable" lay-filter="trainContentTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainContentTable',
|
||||
url : '${path}/getCustomerTrainContents',
|
||||
toolbar : '#toolbarDemo',
|
||||
title : "更新日志",// 导出名
|
||||
id : 'trainContentAll',
|
||||
// skin : 'row',
|
||||
// size :'lg',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
kind : '',
|
||||
type : '服务态度'
|
||||
},
|
||||
cols : [ [
|
||||
/* { type: 'checkbox' }, */
|
||||
{
|
||||
type : 'numbers',
|
||||
title : '序号',
|
||||
width : '4%',
|
||||
unresize : true
|
||||
}, {
|
||||
field : 'proType',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
title : '产品类型'
|
||||
}, {
|
||||
field : 'kind',
|
||||
align : "center",
|
||||
width : '15%',
|
||||
title : '产品种类'
|
||||
}, {
|
||||
field : 'sort',
|
||||
align : "center",
|
||||
width : '5%',
|
||||
edit : 'text',
|
||||
title : '排序'
|
||||
}, {
|
||||
field : 'content',
|
||||
align : "center",
|
||||
width : '28%',
|
||||
title : '内容'
|
||||
}, {
|
||||
field : 'createDate',
|
||||
align : "center",
|
||||
width : '12%',
|
||||
title : '添加时间',
|
||||
templet : function(d) {
|
||||
return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : "";
|
||||
}
|
||||
}, {
|
||||
field : 'createBy',
|
||||
align : "center",
|
||||
width : '10%',
|
||||
title : '添加人'
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
toolbar : '#barDemo'
|
||||
} ] ],
|
||||
parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, // 解析接口状态
|
||||
"msg" : "", // 解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
// 解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainContentAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_content").val(),
|
||||
kind : $("#kind_content").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增按钮
|
||||
table.on('toolbar(trainContentTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
title: "添加产品知识",
|
||||
area: ['90%','90%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerAttitudeContent.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--编辑/删除
|
||||
table.on('tool(trainContentTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改信息",
|
||||
area: ['90%','90%'],
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerAttitudeContent.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_content').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_content').val(obj.data.proType);
|
||||
body.find('#proTypeUpdateInput_content').val(obj.data.proType);
|
||||
body.find('#kindUpdate_content').val(obj.data.kind);
|
||||
body.find('#kindUpdateInput_content').val(obj.data.kind);
|
||||
body.find('#contentUpdate_content').val(obj.data.content);
|
||||
iframeWin.layui.form.render();
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainContent",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
//监听单元格编辑--排序
|
||||
table.on('edit(trainContentTable)', function(obj){
|
||||
var value = obj.value, //得到修改后的值
|
||||
data = obj.data; //得到所在行所有键值
|
||||
$.ajax({
|
||||
url:"${path}/updateCustomerTrainContentSort",
|
||||
data:{
|
||||
id: data.id,
|
||||
value: value
|
||||
},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" id="type" name="type" value="服务态度">
|
||||
<input type="hidden" id="idUpdate_content" name="id"/>
|
||||
<input type="hidden" id="proTypeUpdateInput_content"/>
|
||||
<input type="hidden" id="kindUpdateInput_content"/>
|
||||
<br>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proTypeUpdate_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kindUpdate_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentUpdate_content" name="content" lay-verify="content" style="display: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<%-- <script src="${path}/js/getTrainProType.js" charset="utf-8"></script> --%>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentUpdate_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
layui.form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.proType').append(new Option(item.proType,item.proType));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#proTypeUpdate_content").val($("#proTypeUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :$("#proTypeUpdateInput_content").val(),
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 下拉框联动
|
||||
form.on('select(proType)', function(data) {
|
||||
$('.kind').empty();
|
||||
$('.kind').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :data.value,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="服务态度">
|
||||
<input type="hidden" id="proTypeAdd_kindLabel" name="proType" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增类型</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh"><i class="layui-icon layui-icon-search" style="font-size:20px;font-weight:bold"></i>数据未显示?点我试试</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" id="proType_kindLabel" name="proType" class="layui-input">
|
||||
</form>
|
||||
<table class="layui-hide" id="trainKindLabelTable" lay-filter="trainKindLabelTable"></table>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainKindLabelTable',
|
||||
url : '${path}/getCustomerTrainKindLabelsByProType',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainKindLabelAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '服务态度',
|
||||
needPage: "1"
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left",
|
||||
totalRowText: '合计'
|
||||
},{
|
||||
field : 'kindLabel',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '产品类型'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 300
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 120
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 180,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainKindLabelTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品类型",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerAttitudeKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
// 页面传参
|
||||
body.find('#proTypeAdd_kindLabel').val($("#proType_kindLabel").val());
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'refresh':
|
||||
table.reload('trainKindLabelAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '服务态度'
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainKindLabelTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerAttitudeKindLabel.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_kindLabel').val(obj.data.id);
|
||||
body.find('#kindLabelUpdate_kindLabel').val(obj.data.kindLabel);
|
||||
body.find('#sortUpdate_kindLabel').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_kindLabel').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainKindLabel",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="服务态度">
|
||||
<input type="hidden" id="idUpdate_kindLabel" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" id="kindLabelUpdate_kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_kindLabel" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_kindLabel" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="服务态度">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增种类</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="show"> <i class="layui-icon layui-icon-search"></i>查看</a>
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="服务态度">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_proType" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainProTypeTable" lay-filter="trainProTypeTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainProTypeTable',
|
||||
url : '${path}/getCustomerTrainProTypes',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainProTypeAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
type : '服务态度'
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'proType',
|
||||
width : 200,
|
||||
align : 'center',
|
||||
title : '产品种类'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 260
|
||||
},{
|
||||
field : 'type',
|
||||
title : '类型',
|
||||
width : 160
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 130
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 250,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainProTypeAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_proType").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainProTypeTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品种类",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerAttitudeProType.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainProTypeTable)',function(obj){
|
||||
if(obj.event === 'show'){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "产品类型",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area: ['80%','80%'],
|
||||
content: '../kindLabel/customerAttitudeKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
// 页面传参
|
||||
body.find('#proType_kindLabel').val(obj.data.proType);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerAttitudeProType.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_proType').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_proType').val(obj.data.proType);
|
||||
body.find('#sortUpdate_proType').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_proType').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainProType",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="服务态度">
|
||||
<input type="hidden" id="idUpdate_proType" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" id="proTypeUpdate_proType" autocomplete="off"
|
||||
class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_proType" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_proType" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" btn_groups>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,129 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
</head>
|
||||
<style>
|
||||
.price-layout-page{
|
||||
background:#eeeeee;
|
||||
padding:18px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-form-radio, .layui-form-radio *{
|
||||
vertical-align:baseline;
|
||||
}
|
||||
</style>
|
||||
<script id="trainContent" type="text/html">
|
||||
{{# layui.each(d.list, function(index, item){ }}
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<p>
|
||||
{{item.content}}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{# }); }}
|
||||
</script>
|
||||
<body class="price-layout-page">
|
||||
<form class="layui-form" action="" id="form">
|
||||
<input type="hidden" id="type" name="type" value="服务态度">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-form-item" id="myRadio"></div>
|
||||
</form>
|
||||
<div class="layui-col-md12" style="padding: 7px;">
|
||||
<div style="background: white; padding: 7px;">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
||||
<legend style="color:red;"><h1>服务态度:</h1></legend>
|
||||
</fieldset>
|
||||
<!-- 渲染到这 -->
|
||||
<div id="view"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'laytpl', 'layer'], function(){ //独立版的layer无需执行这一句
|
||||
var $ = layui.jquery,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
laytpl = layui.laytpl;
|
||||
form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
dataType : "json",
|
||||
success : function(proTypeResult) {
|
||||
var proTypeData = proTypeResult.list
|
||||
|
||||
for(var proTypeItem in proTypeData){
|
||||
var str="<label class='layui-form-label'>"+ proTypeData[proTypeItem].proType +":</label>"
|
||||
$("#myRadio").append(str);
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
proType :proTypeData[proTypeItem].proType,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(kindResult) {
|
||||
var kindData = kindResult.list
|
||||
for(var kindItem in kindData){
|
||||
var kindStr="<input type='radio' name='kind' lay-filter='kind' value="+ JSON.stringify(proTypeData[proTypeItem].proType+ '+' +kindData[kindItem].kindLabel)+ " title="+ JSON.stringify(kindData[kindItem].kindLabel)+">"
|
||||
$("#myRadio").append(kindStr)
|
||||
}
|
||||
$("#myRadio").append("</br>")
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#form")[0].reset();
|
||||
}
|
||||
});
|
||||
|
||||
form.on('radio(kind)', function(kindData) {
|
||||
// 传过来的数据是proType+kind拼接的
|
||||
var data = kindData.value.split("+");
|
||||
//获取后台数据后渲染
|
||||
$.ajax({
|
||||
url: "/quote_price/getCustomerTrainContents",
|
||||
datatype: "json",
|
||||
// data:$("form").serialize(),
|
||||
data:{
|
||||
proType :data[0],
|
||||
kind :data[1],
|
||||
type :$("#type").val()
|
||||
},
|
||||
type: "GET",
|
||||
async: false,//关闭异步,否则popover组件无法渲染出值
|
||||
context: document.body,
|
||||
success: function (data) {
|
||||
var getTpl = document.getElementById('trainContent').innerHTML,
|
||||
view = document.getElementById('view');
|
||||
laytpl(getTpl).render(data, function (html) {
|
||||
view.innerHTML = html;
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item {
|
||||
margin-top:20px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" id="type" name="type" value="客服底线">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="proType" lay-filter="proType" lay-search lay-verify="required" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="kind" lay-filter="kind" lay-search lay-verify="required" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentAdd_content" name="content" lay-verify="content" lay-verify="required" style="display: none;"></textarea>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentAdd_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
|
||||
<style>
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:17px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增</button>
|
||||
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button> -->
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="客服底线">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kind_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainContentTable" lay-filter="trainContentTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainContentTable',
|
||||
url : '${path}/getCustomerTrainContents',
|
||||
toolbar : '#toolbarDemo',
|
||||
title : "更新日志",// 导出名
|
||||
id : 'trainContentAll',
|
||||
// skin : 'row',
|
||||
// size :'lg',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
kind : '',
|
||||
type : '客服底线'
|
||||
},
|
||||
cols : [ [
|
||||
/* { type: 'checkbox' }, */
|
||||
{
|
||||
type : 'numbers',
|
||||
title : '序号',
|
||||
width : '4%',
|
||||
unresize : true
|
||||
}, {
|
||||
field : 'proType',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
title : '产品类型'
|
||||
}, {
|
||||
field : 'kind',
|
||||
align : "center",
|
||||
width : '15%',
|
||||
title : '产品种类'
|
||||
}, {
|
||||
field : 'sort',
|
||||
align : "center",
|
||||
width : '5%',
|
||||
edit : 'text',
|
||||
title : '排序'
|
||||
}, {
|
||||
field : 'content',
|
||||
align : "center",
|
||||
width : '28%',
|
||||
title : '内容'
|
||||
}, {
|
||||
field : 'createDate',
|
||||
align : "center",
|
||||
width : '12%',
|
||||
title : '添加时间',
|
||||
templet : function(d) {
|
||||
return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : "";
|
||||
}
|
||||
}, {
|
||||
field : 'createBy',
|
||||
align : "center",
|
||||
width : '10%',
|
||||
title : '添加人'
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
toolbar : '#barDemo'
|
||||
} ] ],
|
||||
parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, // 解析接口状态
|
||||
"msg" : "", // 解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
// 解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainContentAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_content").val(),
|
||||
kind : $("#kind_content").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增按钮
|
||||
table.on('toolbar(trainContentTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
title: "添加产品知识",
|
||||
area: ['90%','90%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerBottomLineContent.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--编辑/删除
|
||||
table.on('tool(trainContentTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改信息",
|
||||
area: ['90%','90%'],
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerBottomLineContent.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_content').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_content').val(obj.data.proType);
|
||||
body.find('#proTypeUpdateInput_content').val(obj.data.proType);
|
||||
body.find('#kindUpdate_content').val(obj.data.kind);
|
||||
body.find('#kindUpdateInput_content').val(obj.data.kind);
|
||||
body.find('#contentUpdate_content').val(obj.data.content);
|
||||
iframeWin.layui.form.render();
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainContent",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
//监听单元格编辑--排序
|
||||
table.on('edit(trainContentTable)', function(obj){
|
||||
var value = obj.value, //得到修改后的值
|
||||
data = obj.data; //得到所在行所有键值
|
||||
$.ajax({
|
||||
url:"${path}/updateCustomerTrainContentSort",
|
||||
data:{
|
||||
id: data.id,
|
||||
value: value
|
||||
},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" id="type" name="type" value="客服底线">
|
||||
<input type="hidden" id="idUpdate_content" name="id"/>
|
||||
<input type="hidden" id="proTypeUpdateInput_content"/>
|
||||
<input type="hidden" id="kindUpdateInput_content"/>
|
||||
<br>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proTypeUpdate_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kindUpdate_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentUpdate_content" name="content" lay-verify="content" style="display: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<%-- <script src="${path}/js/getTrainProType.js" charset="utf-8"></script> --%>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentUpdate_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
layui.form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.proType').append(new Option(item.proType,item.proType));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#proTypeUpdate_content").val($("#proTypeUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :$("#proTypeUpdateInput_content").val(),
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 下拉框联动
|
||||
form.on('select(proType)', function(data) {
|
||||
$('.kind').empty();
|
||||
$('.kind').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :data.value,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="客服底线">
|
||||
<input type="hidden" id="proTypeAdd_kindLabel" name="proType" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增类型</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh"><i class="layui-icon layui-icon-search" style="font-size:20px;font-weight:bold"></i>数据未显示?点我试试</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" id="proType_kindLabel" name="proType" class="layui-input">
|
||||
</form>
|
||||
<table class="layui-hide" id="trainKindLabelTable" lay-filter="trainKindLabelTable"></table>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainKindLabelTable',
|
||||
url : '${path}/getCustomerTrainKindLabelsByProType',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainKindLabelAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '客服底线',
|
||||
needPage: "1"
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left",
|
||||
totalRowText: '合计'
|
||||
},{
|
||||
field : 'kindLabel',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '产品类型'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 300
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 120
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 180,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainKindLabelTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品类型",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerBottomLineKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
// 页面传参
|
||||
body.find('#proTypeAdd_kindLabel').val($("#proType_kindLabel").val());
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'refresh':
|
||||
table.reload('trainKindLabelAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '客服底线'
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainKindLabelTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerBottomLineKindLabel.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_kindLabel').val(obj.data.id);
|
||||
body.find('#kindLabelUpdate_kindLabel').val(obj.data.kindLabel);
|
||||
body.find('#sortUpdate_kindLabel').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_kindLabel').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainKindLabel",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="客服底线">
|
||||
<input type="hidden" id="idUpdate_kindLabel" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" id="kindLabelUpdate_kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_kindLabel" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_kindLabel" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="客服底线">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增种类</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="show"> <i class="layui-icon layui-icon-search"></i>查看</a>
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="客服底线">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_proType" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainProTypeTable" lay-filter="trainProTypeTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainProTypeTable',
|
||||
url : '${path}/getCustomerTrainProTypes',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainProTypeAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
type : '客服底线'
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'proType',
|
||||
width : 200,
|
||||
align : 'center',
|
||||
title : '产品种类'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 260
|
||||
},{
|
||||
field : 'type',
|
||||
title : '类型',
|
||||
width : 160
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 130
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 250,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainProTypeAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_proType").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainProTypeTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品种类",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerBottomLineProType.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainProTypeTable)',function(obj){
|
||||
if(obj.event === 'show'){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "产品类型",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area: ['80%','80%'],
|
||||
content: '../kindLabel/customerBottomLineKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
// 页面传参
|
||||
body.find('#proType_kindLabel').val(obj.data.proType);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerBottomLineProType.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_proType').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_proType').val(obj.data.proType);
|
||||
body.find('#sortUpdate_proType').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_proType').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainProType",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="客服底线">
|
||||
<input type="hidden" id="idUpdate_proType" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" id="proTypeUpdate_proType" autocomplete="off"
|
||||
class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_proType" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_proType" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" btn_groups>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
</head>
|
||||
<style>
|
||||
.price-layout-page{
|
||||
background:#eeeeee;
|
||||
padding:18px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-form-radio, .layui-form-radio *{
|
||||
vertical-align:baseline;
|
||||
}
|
||||
</style>
|
||||
<script id="trainContent" type="text/html">
|
||||
{{# layui.each(d.list, function(index, item){ }}
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<p>
|
||||
{{item.content}}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{# }); }}
|
||||
</script>
|
||||
<body class="price-layout-page">
|
||||
<form class="layui-form" action="" id="form">
|
||||
<input type="hidden" id="type" name="type" value="客服底线">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-form-item" id="myRadio"></div>
|
||||
</form>
|
||||
<div class="layui-col-md12" style="padding: 7px;">
|
||||
<div style="background: white; padding: 7px;">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
||||
<legend style="color:red;"><h1>客服底线:</h1></legend>
|
||||
</fieldset>
|
||||
<!-- 渲染到这 -->
|
||||
<div id="view"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'laytpl', 'layer'], function(){ //独立版的layer无需执行这一句
|
||||
var $ = layui.jquery,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
laytpl = layui.laytpl;
|
||||
form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
dataType : "json",
|
||||
success : function(proTypeResult) {
|
||||
var proTypeData = proTypeResult.list
|
||||
|
||||
for(var proTypeItem in proTypeData){
|
||||
var str="<label class='layui-form-label'>"+ proTypeData[proTypeItem].proType +":</label>"
|
||||
$("#myRadio").append(str);
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
proType :proTypeData[proTypeItem].proType,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(kindResult) {
|
||||
var kindData = kindResult.list
|
||||
for(var kindItem in kindData){
|
||||
var kindStr="<input type='radio' name='kind' lay-filter='kind' value="+ JSON.stringify(proTypeData[proTypeItem].proType+ '+' +kindData[kindItem].kindLabel)+ " title="+ JSON.stringify(kindData[kindItem].kindLabel)+">"
|
||||
$("#myRadio").append(kindStr)
|
||||
}
|
||||
$("#myRadio").append("</br>")
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#form")[0].reset();
|
||||
}
|
||||
});
|
||||
|
||||
form.on('radio(kind)', function(kindData) {
|
||||
// 传过来的数据是proType+kind拼接的
|
||||
var data = kindData.value.split("+");
|
||||
//获取后台数据后渲染
|
||||
$.ajax({
|
||||
url: "/quote_price/getCustomerTrainContents",
|
||||
datatype: "json",
|
||||
// data:$("form").serialize(),
|
||||
data:{
|
||||
proType :data[0],
|
||||
kind :data[1],
|
||||
type :$("#type").val()
|
||||
},
|
||||
type: "GET",
|
||||
async: false,//关闭异步,否则popover组件无法渲染出值
|
||||
context: document.body,
|
||||
success: function (data) {
|
||||
var getTpl = document.getElementById('trainContent').innerHTML,
|
||||
view = document.getElementById('view');
|
||||
laytpl(getTpl).render(data, function (html) {
|
||||
view.innerHTML = html;
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item {
|
||||
margin-top:20px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" id="type" name="type" value="企业介绍">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="proType" lay-filter="proType" lay-search lay-verify="required" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="kind" lay-filter="kind" lay-search lay-verify="required" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentAdd_content" name="content" lay-verify="content" lay-verify="required" style="display: none;"></textarea>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentAdd_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
|
||||
<style>
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:17px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增</button>
|
||||
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button> -->
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="企业介绍">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kind_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainContentTable" lay-filter="trainContentTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainContentTable',
|
||||
url : '${path}/getCustomerTrainContents',
|
||||
toolbar : '#toolbarDemo',
|
||||
title : "更新日志",// 导出名
|
||||
id : 'trainContentAll',
|
||||
// skin : 'row',
|
||||
// size :'lg',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
kind : '',
|
||||
type : '企业介绍'
|
||||
},
|
||||
cols : [ [
|
||||
/* { type: 'checkbox' }, */
|
||||
{
|
||||
type : 'numbers',
|
||||
title : '序号',
|
||||
width : '4%',
|
||||
unresize : true
|
||||
}, {
|
||||
field : 'proType',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
title : '产品类型'
|
||||
}, {
|
||||
field : 'kind',
|
||||
align : "center",
|
||||
width : '15%',
|
||||
title : '产品种类'
|
||||
}, {
|
||||
field : 'sort',
|
||||
align : "center",
|
||||
width : '5%',
|
||||
edit : 'text',
|
||||
title : '排序'
|
||||
}, {
|
||||
field : 'content',
|
||||
align : "center",
|
||||
width : '28%',
|
||||
title : '内容'
|
||||
}, {
|
||||
field : 'createDate',
|
||||
align : "center",
|
||||
width : '12%',
|
||||
title : '添加时间',
|
||||
templet : function(d) {
|
||||
return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : "";
|
||||
}
|
||||
}, {
|
||||
field : 'createBy',
|
||||
align : "center",
|
||||
width : '10%',
|
||||
title : '添加人'
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
toolbar : '#barDemo'
|
||||
} ] ],
|
||||
parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, // 解析接口状态
|
||||
"msg" : "", // 解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
// 解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainContentAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_content").val(),
|
||||
kind : $("#kind_content").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增按钮
|
||||
table.on('toolbar(trainContentTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
title: "添加产品知识",
|
||||
area: ['90%','90%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerIntroduceContent.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--编辑/删除
|
||||
table.on('tool(trainContentTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改信息",
|
||||
area: ['90%','90%'],
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerIntroduceContent.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_content').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_content').val(obj.data.proType);
|
||||
body.find('#proTypeUpdateInput_content').val(obj.data.proType);
|
||||
body.find('#kindUpdate_content').val(obj.data.kind);
|
||||
body.find('#kindUpdateInput_content').val(obj.data.kind);
|
||||
body.find('#contentUpdate_content').val(obj.data.content);
|
||||
iframeWin.layui.form.render();
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainContent",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
//监听单元格编辑--排序
|
||||
table.on('edit(trainContentTable)', function(obj){
|
||||
var value = obj.value, //得到修改后的值
|
||||
data = obj.data; //得到所在行所有键值
|
||||
$.ajax({
|
||||
url:"${path}/updateCustomerTrainContentSort",
|
||||
data:{
|
||||
id: data.id,
|
||||
value: value
|
||||
},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" id="type" name="type" value="企业介绍">
|
||||
<input type="hidden" id="idUpdate_content" name="id"/>
|
||||
<input type="hidden" id="proTypeUpdateInput_content"/>
|
||||
<input type="hidden" id="kindUpdateInput_content"/>
|
||||
<br>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proTypeUpdate_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kindUpdate_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentUpdate_content" name="content" lay-verify="content" style="display: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<%-- <script src="${path}/js/getTrainProType.js" charset="utf-8"></script> --%>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentUpdate_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
layui.form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.proType').append(new Option(item.proType,item.proType));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#proTypeUpdate_content").val($("#proTypeUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :$("#proTypeUpdateInput_content").val(),
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 下拉框联动
|
||||
form.on('select(proType)', function(data) {
|
||||
$('.kind').empty();
|
||||
$('.kind').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :data.value,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="企业介绍">
|
||||
<input type="hidden" id="proTypeAdd_kindLabel" name="proType" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增类型</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh"><i class="layui-icon layui-icon-search" style="font-size:20px;font-weight:bold"></i>数据未显示?点我试试</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" id="proType_kindLabel" name="proType" class="layui-input">
|
||||
</form>
|
||||
<table class="layui-hide" id="trainKindLabelTable" lay-filter="trainKindLabelTable"></table>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainKindLabelTable',
|
||||
url : '${path}/getCustomerTrainKindLabelsByProType',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainKindLabelAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '企业介绍',
|
||||
needPage: "1"
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left",
|
||||
totalRowText: '合计'
|
||||
},{
|
||||
field : 'kindLabel',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '产品类型'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 300
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 120
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 180,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainKindLabelTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品类型",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerIntroduceKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
// 页面传参
|
||||
body.find('#proTypeAdd_kindLabel').val($("#proType_kindLabel").val());
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'refresh':
|
||||
table.reload('trainKindLabelAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '企业介绍'
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainKindLabelTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerIntroduceKindLabel.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_kindLabel').val(obj.data.id);
|
||||
body.find('#kindLabelUpdate_kindLabel').val(obj.data.kindLabel);
|
||||
body.find('#sortUpdate_kindLabel').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_kindLabel').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainKindLabel",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="企业介绍">
|
||||
<input type="hidden" id="idUpdate_kindLabel" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" id="kindLabelUpdate_kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_kindLabel" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_kindLabel" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="企业介绍">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增种类</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="show"> <i class="layui-icon layui-icon-search"></i>查看</a>
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="企业介绍">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_proType" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainProTypeTable" lay-filter="trainProTypeTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainProTypeTable',
|
||||
url : '${path}/getCustomerTrainProTypes',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainProTypeAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
type : '企业介绍'
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'proType',
|
||||
width : 200,
|
||||
align : 'center',
|
||||
title : '产品种类'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 260
|
||||
},{
|
||||
field : 'type',
|
||||
title : '类型',
|
||||
width : 160
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 130
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 250,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainProTypeAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_proType").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainProTypeTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品种类",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerIntroduceProType.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainProTypeTable)',function(obj){
|
||||
if(obj.event === 'show'){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "产品类型",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area: ['80%','80%'],
|
||||
content: '../kindLabel/customerIntroduceKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
// 页面传参
|
||||
body.find('#proType_kindLabel').val(obj.data.proType);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerIntroduceProType.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_proType').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_proType').val(obj.data.proType);
|
||||
body.find('#sortUpdate_proType').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_proType').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainProType",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="企业介绍">
|
||||
<input type="hidden" id="idUpdate_proType" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" id="proTypeUpdate_proType" autocomplete="off"
|
||||
class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_proType" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_proType" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" btn_groups>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
</head>
|
||||
<style>
|
||||
.price-layout-page{
|
||||
background:#eeeeee;
|
||||
padding:18px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-form-radio, .layui-form-radio *{
|
||||
vertical-align:baseline;
|
||||
}
|
||||
</style>
|
||||
<script id="trainContent" type="text/html">
|
||||
{{# layui.each(d.list, function(index, item){ }}
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<p>
|
||||
{{item.content}}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{# }); }}
|
||||
</script>
|
||||
<body class="price-layout-page">
|
||||
<form class="layui-form" action="" id="form">
|
||||
<input type="hidden" id="type" name="type" value="企业介绍">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-form-item" id="myRadio"></div>
|
||||
</form>
|
||||
<div class="layui-col-md12" style="padding: 7px;">
|
||||
<div style="background: white; padding: 7px;">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
||||
<legend style="color:red;"><h1>企业介绍:</h1></legend>
|
||||
</fieldset>
|
||||
<!-- 渲染到这 -->
|
||||
<div id="view"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'laytpl', 'layer'], function(){ //独立版的layer无需执行这一句
|
||||
var $ = layui.jquery,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
laytpl = layui.laytpl;
|
||||
form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
dataType : "json",
|
||||
success : function(proTypeResult) {
|
||||
var proTypeData = proTypeResult.list
|
||||
|
||||
for(var proTypeItem in proTypeData){
|
||||
var str="<label class='layui-form-label'>"+ proTypeData[proTypeItem].proType +":</label>"
|
||||
$("#myRadio").append(str);
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
proType :proTypeData[proTypeItem].proType,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(kindResult) {
|
||||
var kindData = kindResult.list
|
||||
for(var kindItem in kindData){
|
||||
var kindStr="<input type='radio' name='kind' lay-filter='kind' value="+ JSON.stringify(proTypeData[proTypeItem].proType+ '+' +kindData[kindItem].kindLabel)+ " title="+ JSON.stringify(kindData[kindItem].kindLabel)+">"
|
||||
$("#myRadio").append(kindStr)
|
||||
}
|
||||
$("#myRadio").append("</br>")
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#form")[0].reset();
|
||||
}
|
||||
});
|
||||
|
||||
form.on('radio(kind)', function(kindData) {
|
||||
// 传过来的数据是proType+kind拼接的
|
||||
var data = kindData.value.split("+");
|
||||
//获取后台数据后渲染
|
||||
$.ajax({
|
||||
url: "/quote_price/getCustomerTrainContents",
|
||||
datatype: "json",
|
||||
// data:$("form").serialize(),
|
||||
data:{
|
||||
proType :data[0],
|
||||
kind :data[1],
|
||||
type :$("#type").val()
|
||||
},
|
||||
type: "GET",
|
||||
async: false,//关闭异步,否则popover组件无法渲染出值
|
||||
context: document.body,
|
||||
success: function (data) {
|
||||
var getTpl = document.getElementById('trainContent').innerHTML,
|
||||
view = document.getElementById('view');
|
||||
laytpl(getTpl).render(data, function (html) {
|
||||
view.innerHTML = html;
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
+124
@@ -0,0 +1,124 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item {
|
||||
margin-top:20px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" id="type" name="type" value="产品知识">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="proType" lay-filter="proType" lay-search lay-verify="required" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="kind" lay-filter="kind" lay-search lay-verify="required" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentAdd_content" name="content" lay-verify="content" lay-verify="required" style="display: none;"></textarea>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentAdd_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
// 在线预览
|
||||
$(" .layui-layedit .layui-unselect.layui-layedit-tool")
|
||||
.append('<i class="layui-icon layedit-tool-preview" title="预览" style="font-size:18px"></i>');
|
||||
$(document).on('click','.layedit-tool-preview',function(data){
|
||||
parent.layer.open({
|
||||
title: '在线预览',
|
||||
shade: 0.2,
|
||||
move: false,
|
||||
content: layedit.getContent(content),
|
||||
offset: 'rt',
|
||||
area: ['450px',(top.window.innerHeight*0.80).toString()]
|
||||
});
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
|
||||
<style>
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:17px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增</button>
|
||||
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button> -->
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="产品知识">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kind_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainContentTable" lay-filter="trainContentTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainContentTable',
|
||||
url : '${path}/getCustomerTrainContents',
|
||||
toolbar : '#toolbarDemo',
|
||||
title : "更新日志",// 导出名
|
||||
id : 'trainContentAll',
|
||||
// skin : 'row',
|
||||
// size :'lg',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
kind : '',
|
||||
type : '产品知识'
|
||||
},
|
||||
cols : [ [
|
||||
/* { type: 'checkbox' }, */
|
||||
{
|
||||
type : 'numbers',
|
||||
title : '序号',
|
||||
width : '4%',
|
||||
unresize : true
|
||||
}, {
|
||||
field : 'proType',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
title : '产品类型'
|
||||
}, {
|
||||
field : 'kind',
|
||||
align : "center",
|
||||
width : '15%',
|
||||
title : '产品种类'
|
||||
}, {
|
||||
field : 'sort',
|
||||
align : "center",
|
||||
width : '5%',
|
||||
edit : 'text',
|
||||
title : '排序'
|
||||
}, {
|
||||
field : 'content',
|
||||
align : "center",
|
||||
width : '28%',
|
||||
title : '内容'
|
||||
}, {
|
||||
field : 'createDate',
|
||||
align : "center",
|
||||
width : '12%',
|
||||
title : '添加时间',
|
||||
templet : function(d) {
|
||||
return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : "";
|
||||
}
|
||||
}, {
|
||||
field : 'createBy',
|
||||
align : "center",
|
||||
width : '10%',
|
||||
title : '添加人'
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
toolbar : '#barDemo'
|
||||
} ] ],
|
||||
parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, // 解析接口状态
|
||||
"msg" : "", // 解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
// 解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainContentAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_content").val(),
|
||||
kind : $("#kind_content").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增按钮
|
||||
table.on('toolbar(trainContentTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
title: "添加产品知识",
|
||||
area: ['90%','90%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerKnowledgeContent.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--编辑/删除
|
||||
table.on('tool(trainContentTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改信息",
|
||||
area: ['90%','90%'],
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerKnowledgeContent.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_content').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_content').val(obj.data.proType);
|
||||
body.find('#proTypeUpdateInput_content').val(obj.data.proType);
|
||||
body.find('#kindUpdate_content').val(obj.data.kind);
|
||||
body.find('#kindUpdateInput_content').val(obj.data.kind);
|
||||
body.find('#contentUpdate_content').val(obj.data.content);
|
||||
iframeWin.layui.form.render();
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainContent",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
//监听单元格编辑--排序
|
||||
table.on('edit(trainContentTable)', function(obj){
|
||||
var value = obj.value, //得到修改后的值
|
||||
data = obj.data; //得到所在行所有键值
|
||||
$.ajax({
|
||||
url:"${path}/updateCustomerTrainContentSort",
|
||||
data:{
|
||||
id: data.id,
|
||||
value: value
|
||||
},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+185
@@ -0,0 +1,185 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" id="type" name="type" value="产品知识">
|
||||
<input type="hidden" id="idUpdate_content" name="id"/>
|
||||
<input type="hidden" id="proTypeUpdateInput_content"/>
|
||||
<input type="hidden" id="kindUpdateInput_content"/>
|
||||
<br>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proTypeUpdate_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kindUpdate_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentUpdate_content" name="content" lay-verify="content" style="display: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentUpdate_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
// 在线预览
|
||||
$(" .layui-layedit .layui-unselect.layui-layedit-tool")
|
||||
.append('<i class="layui-icon layedit-tool-preview" title="预览" style="font-size:18px"></i>');
|
||||
$(document).on('click','.layedit-tool-preview',function(data){
|
||||
parent.layer.open({
|
||||
title: '在线预览',
|
||||
shade: 0.2,
|
||||
move: false,
|
||||
content: layedit.getContent(content),
|
||||
offset: 'rt',
|
||||
area: ['450px',(top.window.innerHeight*0.80).toString()]
|
||||
});
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
layui.form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.proType').append(new Option(item.proType,item.proType));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#proTypeUpdate_content").val($("#proTypeUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :$("#proTypeUpdateInput_content").val(),
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 下拉框联动
|
||||
form.on('select(proType)', function(data) {
|
||||
$('.kind').empty();
|
||||
$('.kind').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :data.value,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="产品知识">
|
||||
<input type="hidden" id="proTypeAdd_kindLabel" name="proType" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增类型</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh"><i class="layui-icon layui-icon-search" style="font-size:20px;font-weight:bold"></i>数据未显示?点我试试</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" id="proType_kindLabel" name="proType" class="layui-input">
|
||||
</form>
|
||||
<table class="layui-hide" id="trainKindLabelTable" lay-filter="trainKindLabelTable"></table>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainKindLabelTable',
|
||||
url : '${path}/getCustomerTrainKindLabelsByProType',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainKindLabelAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '产品知识',
|
||||
needPage: "1"
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left",
|
||||
totalRowText: '合计'
|
||||
},{
|
||||
field : 'kindLabel',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '产品类型'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 300
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 120
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 180,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainKindLabelTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品类型",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerKnowledgeKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
// 页面传参
|
||||
body.find('#proTypeAdd_kindLabel').val($("#proType_kindLabel").val());
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'refresh':
|
||||
table.reload('trainKindLabelAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '产品知识'
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainKindLabelTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerKnowledgeKindLabel.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_kindLabel').val(obj.data.id);
|
||||
body.find('#kindLabelUpdate_kindLabel').val(obj.data.kindLabel);
|
||||
body.find('#sortUpdate_kindLabel').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_kindLabel').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainKindLabel",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="产品知识">
|
||||
<input type="hidden" id="idUpdate_kindLabel" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" id="kindLabelUpdate_kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_kindLabel" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_kindLabel" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="产品知识">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增种类</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="show"> <i class="layui-icon layui-icon-search"></i>查看</a>
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="产品知识">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_proType" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainProTypeTable" lay-filter="trainProTypeTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainProTypeTable',
|
||||
url : '${path}/getCustomerTrainProTypes',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainProTypeAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
type : '产品知识'
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'proType',
|
||||
width : 200,
|
||||
align : 'center',
|
||||
title : '产品种类'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 260
|
||||
},{
|
||||
field : 'type',
|
||||
title : '类型',
|
||||
width : 160
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 130
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 250,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainProTypeAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_proType").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainProTypeTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品种类",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerKnowledgeProType.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainProTypeTable)',function(obj){
|
||||
if(obj.event === 'show'){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "产品类型",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area: ['80%','80%'],
|
||||
content: '../kindLabel/customerKnowledgeKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
// 页面传参
|
||||
body.find('#proType_kindLabel').val(obj.data.proType);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerKnowledgeProType.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_proType').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_proType').val(obj.data.proType);
|
||||
body.find('#sortUpdate_proType').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_proType').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainProType",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="产品知识">
|
||||
<input type="hidden" id="idUpdate_proType" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" id="proTypeUpdate_proType" autocomplete="off"
|
||||
class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_proType" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_proType" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" btn_groups>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
</head>
|
||||
<style>
|
||||
.price-layout-page{
|
||||
background:#eeeeee;
|
||||
padding:18px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-form-radio, .layui-form-radio *{
|
||||
vertical-align:baseline;
|
||||
}
|
||||
</style>
|
||||
<script id="trainContent" type="text/html">
|
||||
{{# layui.each(d.list, function(index, item){ }}
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<p>
|
||||
{{item.content}}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{# }); }}
|
||||
</script>
|
||||
<body class="price-layout-page">
|
||||
<form class="layui-form" action="" id="form">
|
||||
<input type="hidden" id="type" name="type" value="产品知识">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-form-item" id="myRadio"></div>
|
||||
</form>
|
||||
<div class="layui-col-md12" style="padding: 7px;">
|
||||
<div style="background: white; padding: 7px;">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
||||
<legend style="color:red;"><h1>产品知识:</h1></legend>
|
||||
</fieldset>
|
||||
<!-- 渲染到这 -->
|
||||
<div id="view"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'laytpl', 'layer'], function(){ //独立版的layer无需执行这一句
|
||||
var $ = layui.jquery,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
laytpl = layui.laytpl;
|
||||
form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
dataType : "json",
|
||||
success : function(proTypeResult) {
|
||||
var proTypeData = proTypeResult.list
|
||||
|
||||
for(var proTypeItem in proTypeData){
|
||||
var str="<label class='layui-form-label'>"+ proTypeData[proTypeItem].proType +":</label>"
|
||||
$("#myRadio").append(str);
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
proType :proTypeData[proTypeItem].proType,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(kindResult) {
|
||||
var kindData = kindResult.list
|
||||
for(var kindItem in kindData){
|
||||
var kindStr="<input type='radio' name='kind' lay-filter='kind' value="+ JSON.stringify(proTypeData[proTypeItem].proType+ '+' +kindData[kindItem].kindLabel)+ " title="+ JSON.stringify(kindData[kindItem].kindLabel)+">"
|
||||
$("#myRadio").append(kindStr)
|
||||
}
|
||||
$("#myRadio").append("</br>")
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#form")[0].reset();
|
||||
}
|
||||
});
|
||||
|
||||
form.on('radio(kind)', function(kindData) {
|
||||
// 传过来的数据是proType+kind拼接的
|
||||
var data = kindData.value.split("+");
|
||||
//获取后台数据后渲染
|
||||
$.ajax({
|
||||
url: "/quote_price/getCustomerTrainContents",
|
||||
datatype: "json",
|
||||
// data:$("form").serialize(),
|
||||
data:{
|
||||
proType :data[0],
|
||||
kind :data[1],
|
||||
type :$("#type").val()
|
||||
},
|
||||
type: "GET",
|
||||
async: false,//关闭异步,否则popover组件无法渲染出值
|
||||
context: document.body,
|
||||
success: function (data) {
|
||||
var getTpl = document.getElementById('trainContent').innerHTML,
|
||||
view = document.getElementById('view');
|
||||
laytpl(getTpl).render(data, function (html) {
|
||||
view.innerHTML = html;
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
+111
@@ -0,0 +1,111 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item {
|
||||
margin-top:20px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" id="type" name="type" value="销售技巧">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="proType" lay-filter="proType" lay-search lay-verify="required" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="kind" lay-filter="kind" lay-search lay-verify="required" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentAdd_content" name="content" lay-verify="content" lay-verify="required" style="display: none;"></textarea>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentAdd_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+253
@@ -0,0 +1,253 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
|
||||
<style>
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:17px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增</button>
|
||||
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button> -->
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="销售技巧">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kind_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainContentTable" lay-filter="trainContentTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainContentTable',
|
||||
url : '${path}/getCustomerTrainContents',
|
||||
toolbar : '#toolbarDemo',
|
||||
title : "更新日志",// 导出名
|
||||
id : 'trainContentAll',
|
||||
// skin : 'row',
|
||||
// size :'lg',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
kind : '',
|
||||
type : '销售技巧'
|
||||
},
|
||||
cols : [ [
|
||||
/* { type: 'checkbox' }, */
|
||||
{
|
||||
type : 'numbers',
|
||||
title : '序号',
|
||||
width : '4%',
|
||||
unresize : true
|
||||
}, {
|
||||
field : 'proType',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
title : '产品类型'
|
||||
}, {
|
||||
field : 'kind',
|
||||
align : "center",
|
||||
width : '15%',
|
||||
title : '产品种类'
|
||||
}, {
|
||||
field : 'sort',
|
||||
align : "center",
|
||||
width : '5%',
|
||||
edit : 'text',
|
||||
title : '排序'
|
||||
}, {
|
||||
field : 'content',
|
||||
align : "center",
|
||||
width : '28%',
|
||||
title : '内容'
|
||||
}, {
|
||||
field : 'createDate',
|
||||
align : "center",
|
||||
width : '12%',
|
||||
title : '添加时间',
|
||||
templet : function(d) {
|
||||
return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : "";
|
||||
}
|
||||
}, {
|
||||
field : 'createBy',
|
||||
align : "center",
|
||||
width : '10%',
|
||||
title : '添加人'
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
toolbar : '#barDemo'
|
||||
} ] ],
|
||||
parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, // 解析接口状态
|
||||
"msg" : "", // 解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
// 解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainContentAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_content").val(),
|
||||
kind : $("#kind_content").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增按钮
|
||||
table.on('toolbar(trainContentTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
title: "添加产品知识",
|
||||
area: ['90%','90%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerSaleSkillContent.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--编辑/删除
|
||||
table.on('tool(trainContentTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改信息",
|
||||
area: ['90%','90%'],
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerSaleSkillContent.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_content').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_content').val(obj.data.proType);
|
||||
body.find('#proTypeUpdateInput_content').val(obj.data.proType);
|
||||
body.find('#kindUpdate_content').val(obj.data.kind);
|
||||
body.find('#kindUpdateInput_content').val(obj.data.kind);
|
||||
body.find('#contentUpdate_content').val(obj.data.content);
|
||||
iframeWin.layui.form.render();
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainContent",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
//监听单元格编辑--排序
|
||||
table.on('edit(trainContentTable)', function(obj){
|
||||
var value = obj.value, //得到修改后的值
|
||||
data = obj.data; //得到所在行所有键值
|
||||
$.ajax({
|
||||
url:"${path}/updateCustomerTrainContentSort",
|
||||
data:{
|
||||
id: data.id,
|
||||
value: value
|
||||
},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+172
@@ -0,0 +1,172 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" id="type" name="type" value="销售技巧">
|
||||
<input type="hidden" id="idUpdate_content" name="id"/>
|
||||
<input type="hidden" id="proTypeUpdateInput_content"/>
|
||||
<input type="hidden" id="kindUpdateInput_content"/>
|
||||
<br>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proTypeUpdate_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kindUpdate_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentUpdate_content" name="content" lay-verify="content" style="display: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentUpdate_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
layui.form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.proType').append(new Option(item.proType,item.proType));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#proTypeUpdate_content").val($("#proTypeUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :$("#proTypeUpdateInput_content").val(),
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 下拉框联动
|
||||
form.on('select(proType)', function(data) {
|
||||
$('.kind').empty();
|
||||
$('.kind').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :data.value,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="销售技巧">
|
||||
<input type="hidden" id="proTypeAdd_kindLabel" name="proType" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增类型</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh"><i class="layui-icon layui-icon-search" style="font-size:20px;font-weight:bold"></i>数据未显示?点我试试</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" id="proType_kindLabel" name="proType" class="layui-input">
|
||||
</form>
|
||||
<table class="layui-hide" id="trainKindLabelTable" lay-filter="trainKindLabelTable"></table>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainKindLabelTable',
|
||||
url : '${path}/getCustomerTrainKindLabelsByProType',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainKindLabelAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '销售技巧',
|
||||
needPage: "1"
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left",
|
||||
totalRowText: '合计'
|
||||
},{
|
||||
field : 'kindLabel',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '产品类型'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 300
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 120
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 180,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainKindLabelTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品类型",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerSaleSkillKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
// 页面传参
|
||||
body.find('#proTypeAdd_kindLabel').val($("#proType_kindLabel").val());
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'refresh':
|
||||
table.reload('trainKindLabelAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '销售技巧'
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainKindLabelTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerSaleSkillKindLabel.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_kindLabel').val(obj.data.id);
|
||||
body.find('#kindLabelUpdate_kindLabel').val(obj.data.kindLabel);
|
||||
body.find('#sortUpdate_kindLabel').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_kindLabel').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainKindLabel",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="销售技巧">
|
||||
<input type="hidden" id="idUpdate_kindLabel" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" id="kindLabelUpdate_kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_kindLabel" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_kindLabel" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+86
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="销售技巧">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+243
@@ -0,0 +1,243 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增种类</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="show"> <i class="layui-icon layui-icon-search"></i>查看</a>
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="销售技巧">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_proType" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainProTypeTable" lay-filter="trainProTypeTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainProTypeTable',
|
||||
url : '${path}/getCustomerTrainProTypes',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainProTypeAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
type : '销售技巧'
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'proType',
|
||||
width : 200,
|
||||
align : 'center',
|
||||
title : '产品种类'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 260
|
||||
},{
|
||||
field : 'type',
|
||||
title : '类型',
|
||||
width : 160
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 130
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 250,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainProTypeAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_proType").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainProTypeTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品种类",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerSaleSkillProType.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainProTypeTable)',function(obj){
|
||||
if(obj.event === 'show'){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "产品类型",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area: ['80%','80%'],
|
||||
content: '../kindLabel/customerSaleSkillKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
// 页面传参
|
||||
body.find('#proType_kindLabel').val(obj.data.proType);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerSaleSkillProType.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_proType').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_proType').val(obj.data.proType);
|
||||
body.find('#sortUpdate_proType').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_proType').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainProType",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="销售技巧">
|
||||
<input type="hidden" id="idUpdate_proType" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" id="proTypeUpdate_proType" autocomplete="off"
|
||||
class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_proType" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_proType" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" btn_groups>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+129
@@ -0,0 +1,129 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
</head>
|
||||
<style>
|
||||
.price-layout-page{
|
||||
background:#eeeeee;
|
||||
padding:18px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-form-radio, .layui-form-radio *{
|
||||
vertical-align:baseline;
|
||||
}
|
||||
</style>
|
||||
<script id="trainContent" type="text/html">
|
||||
{{# layui.each(d.list, function(index, item){ }}
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<p>
|
||||
{{item.content}}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{# }); }}
|
||||
</script>
|
||||
<body class="price-layout-page">
|
||||
<form class="layui-form" action="" id="form">
|
||||
<input type="hidden" id="type" name="type" value="销售技巧">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-form-item" id="myRadio"></div>
|
||||
</form>
|
||||
<div class="layui-col-md12" style="padding: 7px;">
|
||||
<div style="background: white; padding: 7px;">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
||||
<legend style="color:red;"><h1>销售技巧:</h1></legend>
|
||||
</fieldset>
|
||||
<!-- 渲染到这 -->
|
||||
<div id="view"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'laytpl', 'layer'], function(){ //独立版的layer无需执行这一句
|
||||
var $ = layui.jquery,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
laytpl = layui.laytpl;
|
||||
form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
dataType : "json",
|
||||
success : function(proTypeResult) {
|
||||
var proTypeData = proTypeResult.list
|
||||
|
||||
for(var proTypeItem in proTypeData){
|
||||
var str="<label class='layui-form-label'>"+ proTypeData[proTypeItem].proType +":</label>"
|
||||
$("#myRadio").append(str);
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
proType :proTypeData[proTypeItem].proType,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(kindResult) {
|
||||
var kindData = kindResult.list
|
||||
for(var kindItem in kindData){
|
||||
var kindStr="<input type='radio' name='kind' lay-filter='kind' value="+ JSON.stringify(proTypeData[proTypeItem].proType+ '+' +kindData[kindItem].kindLabel)+ " title="+ JSON.stringify(kindData[kindItem].kindLabel)+">"
|
||||
$("#myRadio").append(kindStr)
|
||||
}
|
||||
$("#myRadio").append("</br>")
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#form")[0].reset();
|
||||
}
|
||||
});
|
||||
|
||||
form.on('radio(kind)', function(kindData) {
|
||||
// 传过来的数据是proType+kind拼接的
|
||||
var data = kindData.value.split("+");
|
||||
//获取后台数据后渲染
|
||||
$.ajax({
|
||||
url: "/quote_price/getCustomerTrainContents",
|
||||
datatype: "json",
|
||||
// data:$("form").serialize(),
|
||||
data:{
|
||||
proType :data[0],
|
||||
kind :data[1],
|
||||
type :$("#type").val()
|
||||
},
|
||||
type: "GET",
|
||||
async: false,//关闭异步,否则popover组件无法渲染出值
|
||||
context: document.body,
|
||||
success: function (data) {
|
||||
var getTpl = document.getElementById('trainContent').innerHTML,
|
||||
view = document.getElementById('view');
|
||||
laytpl(getTpl).render(data, function (html) {
|
||||
view.innerHTML = html;
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,111 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.layui-form-item {
|
||||
margin-top:20px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" id="type" name="type" value="售前客服必备技能">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="proType" lay-filter="proType" lay-search lay-verify="required" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="kind" lay-filter="kind" lay-search lay-verify="required" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentAdd_content" name="content" lay-verify="content" lay-verify="required" style="display: none;"></textarea>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentAdd_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,253 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
|
||||
<style>
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:17px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
</style>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增</button>
|
||||
<!-- <button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button> -->
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="售前客服必备技能">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kind_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainContentTable" lay-filter="trainContentTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainContentTable',
|
||||
url : '${path}/getCustomerTrainContents',
|
||||
toolbar : '#toolbarDemo',
|
||||
title : "更新日志",// 导出名
|
||||
id : 'trainContentAll',
|
||||
// skin : 'row',
|
||||
// size :'lg',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
kind : '',
|
||||
type : '售前客服必备技能'
|
||||
},
|
||||
cols : [ [
|
||||
/* { type: 'checkbox' }, */
|
||||
{
|
||||
type : 'numbers',
|
||||
title : '序号',
|
||||
width : '4%',
|
||||
unresize : true
|
||||
}, {
|
||||
field : 'proType',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
title : '产品类型'
|
||||
}, {
|
||||
field : 'kind',
|
||||
align : "center",
|
||||
width : '15%',
|
||||
title : '产品种类'
|
||||
}, {
|
||||
field : 'sort',
|
||||
align : "center",
|
||||
width : '5%',
|
||||
edit : 'text',
|
||||
title : '排序'
|
||||
}, {
|
||||
field : 'content',
|
||||
align : "center",
|
||||
width : '28%',
|
||||
title : '内容'
|
||||
}, {
|
||||
field : 'createDate',
|
||||
align : "center",
|
||||
width : '12%',
|
||||
title : '添加时间',
|
||||
templet : function(d) {
|
||||
return d.createDate != null ?layui.util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss") : "";
|
||||
}
|
||||
}, {
|
||||
field : 'createBy',
|
||||
align : "center",
|
||||
width : '10%',
|
||||
title : '添加人'
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : '13%',
|
||||
toolbar : '#barDemo'
|
||||
} ] ],
|
||||
parseData : function(res) { // 将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, // 解析接口状态
|
||||
"msg" : "", // 解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
// 解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainContentAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_content").val(),
|
||||
kind : $("#kind_content").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增按钮
|
||||
table.on('toolbar(trainContentTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
title: "添加产品知识",
|
||||
area: ['90%','90%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerSkillContent.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--编辑/删除
|
||||
table.on('tool(trainContentTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改信息",
|
||||
area: ['90%','90%'],
|
||||
//btn: ['关闭'],//弹出层按钮
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerSkillContent.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_content').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_content').val(obj.data.proType);
|
||||
body.find('#proTypeUpdateInput_content').val(obj.data.proType);
|
||||
body.find('#kindUpdate_content').val(obj.data.kind);
|
||||
body.find('#kindUpdateInput_content').val(obj.data.kind);
|
||||
body.find('#contentUpdate_content').val(obj.data.content);
|
||||
iframeWin.layui.form.render();
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainContent",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
//监听单元格编辑--排序
|
||||
table.on('edit(trainContentTable)', function(obj){
|
||||
var value = obj.value, //得到修改后的值
|
||||
data = obj.data; //得到所在行所有键值
|
||||
$.ajax({
|
||||
url:"${path}/updateCustomerTrainContentSort",
|
||||
data:{
|
||||
id: data.id,
|
||||
value: value
|
||||
},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+173
@@ -0,0 +1,173 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input-block{
|
||||
margin-left: 10px;
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form">
|
||||
<form class="layui-form" action="" method="post">
|
||||
<input type="hidden" id="type" name="type" value="售前客服必备技能">
|
||||
<input type="hidden" id="idUpdate_content" name="id"/>
|
||||
<input type="hidden" id="proTypeUpdateInput_content"/>
|
||||
<input type="hidden" id="kindUpdateInput_content"/>
|
||||
<br>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proTypeUpdate_content" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<label class="layui-form-label">种类:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="kindUpdate_content" name="kind" lay-search lay-filter="kind" class="kind">
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-form-item layui-form-text">
|
||||
<label class="layui-form-label">主体内容</label>
|
||||
<textarea id="contentUpdate_content" name="content" lay-verify="content" style="display: none;"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="formSub">立即提交</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<%-- <script src="${path}/js/getTrainProType.js" charset="utf-8"></script> --%>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
layedit.set({
|
||||
uploadImage: {
|
||||
url: '${path}/imgUpload', //接口url
|
||||
type: 'post' //默认post
|
||||
}
|
||||
});
|
||||
//建立编辑器
|
||||
var content = layedit.build('contentUpdate_content', {
|
||||
height: 420 //设置编辑器高度
|
||||
});
|
||||
form.verify({
|
||||
content: function(value) {
|
||||
return layedit.sync(content);
|
||||
}
|
||||
});
|
||||
layui.form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.proType').append(new Option(item.proType,item.proType));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#proTypeUpdate_content").val($("#proTypeUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :$("#proTypeUpdateInput_content").val(),
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 下拉框联动
|
||||
form.on('select(proType)', function(data) {
|
||||
$('.kind').empty();
|
||||
$('.kind').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
proType :data.value,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(result) {
|
||||
var data = result.list
|
||||
$.each(data,function(index,item){
|
||||
$('.kind').append(new Option(item.kindLabel,item.kindLabel));//往下拉菜单里添加元素
|
||||
});
|
||||
//把input的值给下拉框,再渲染。做到动态下拉框回显
|
||||
$("#kindUpdate_content").val($("#kindUpdateInput_content").val());
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(formSub)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainContent',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainContentAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="售前客服必备技能">
|
||||
<input type="hidden" id="proTypeAdd_kindLabel" name="proType" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+213
@@ -0,0 +1,213 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增类型</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-normal" lay-event="refresh"><i class="layui-icon layui-icon-search" style="font-size:20px;font-weight:bold"></i>数据未显示?点我试试</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" id="proType_kindLabel" name="proType" class="layui-input">
|
||||
</form>
|
||||
<table class="layui-hide" id="trainKindLabelTable" lay-filter="trainKindLabelTable"></table>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainKindLabelTable',
|
||||
url : '${path}/getCustomerTrainKindLabelsByProType',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainKindLabelAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '售前客服必备技能',
|
||||
needPage: "1"
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left",
|
||||
totalRowText: '合计'
|
||||
},{
|
||||
field : 'kindLabel',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '产品类型'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 300
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 120
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 180,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainKindLabelTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品类型",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerSkillKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
// 页面传参
|
||||
body.find('#proTypeAdd_kindLabel').val($("#proType_kindLabel").val());
|
||||
}
|
||||
});
|
||||
break;
|
||||
case 'refresh':
|
||||
table.reload('trainKindLabelAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_kindLabel").val(),
|
||||
type : '售前客服必备技能'
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainKindLabelTable)',function(obj){
|
||||
if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['50%','60%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerSkillKindLabel.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_kindLabel').val(obj.data.id);
|
||||
body.find('#kindLabelUpdate_kindLabel').val(obj.data.kindLabel);
|
||||
body.find('#sortUpdate_kindLabel').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_kindLabel').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainKindLabel",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="售前客服必备技能">
|
||||
<input type="hidden" id="idUpdate_kindLabel" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="kindLabel" id="kindLabelUpdate_kindLabel" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_kindLabel" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_kindLabel" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainKindLabel',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainKindLabelAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="售前客服必备技能">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" autocomplete="off"
|
||||
placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block btn_groups">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('录入失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,243 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增种类</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-sm" lay-event="show"> <i class="layui-icon layui-icon-search"></i>查看</a>
|
||||
<a class="layui-btn layui-btn-sm" lay-event="edit"> <i class="layui-icon layui-icon-edit"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-sm layui-btn-danger" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<div class="layui-row">
|
||||
<form class="layui-form">
|
||||
<input type="hidden" id="type" name="type" value="售前客服必备技能">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">品种:</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select id="proType_proType" name="proType" lay-search lay-filter="proType" class="proType">
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block" style="margin-top:10px;">
|
||||
<button type="button" class="layui-btn" id="searchBtn">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="trainProTypeTable" lay-filter="trainProTypeTable"></table>
|
||||
</div>
|
||||
<script src="${path}/js/getTrainData.js" charset="utf-8"></script>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
// 生成表格
|
||||
table.render({
|
||||
elem : '#trainProTypeTable',
|
||||
url : '${path}/getCustomerTrainProTypes',
|
||||
toolbar : '#toolbarDemo',
|
||||
id : 'trainProTypeAll',
|
||||
border : true,
|
||||
page : true,
|
||||
limits : [ 10, 30, 50, 80, 100, 999 ],
|
||||
where : {
|
||||
proType : '',
|
||||
type : '售前客服必备技能'
|
||||
},
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'proType',
|
||||
width : 200,
|
||||
align : 'center',
|
||||
title : '产品种类'
|
||||
},{
|
||||
field : 'sort',
|
||||
title : '排序',
|
||||
width : 60,
|
||||
align : 'center',
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '说明',
|
||||
width : 260
|
||||
},{
|
||||
field : 'type',
|
||||
title : '类型',
|
||||
width : 160
|
||||
},{
|
||||
field : 'createBy',
|
||||
title : '创建人',
|
||||
align : 'center',
|
||||
width : 130
|
||||
},{
|
||||
field : 'createDate',
|
||||
width : 180,
|
||||
align : 'center',
|
||||
title : '添加时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.createDate, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}, {
|
||||
fixed : 'right',
|
||||
title : '操作',
|
||||
align : "center",
|
||||
width : 250,
|
||||
toolbar : '#barDemo'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('trainProTypeAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
proType : $("#proType_proType").val(),
|
||||
type : $("#type").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
//监听头工具栏事件--新增文章按钮
|
||||
table.on('toolbar(trainProTypeTable)', function (obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id),
|
||||
data = checkStatus.data; //获取选中的数据
|
||||
switch (obj.event) {
|
||||
case 'add':
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "添加产品种类",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
content: './addCustomerSkillProType.jsp',
|
||||
});
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听表格操作按钮--文章编辑
|
||||
table.on('tool(trainProTypeTable)',function(obj){
|
||||
if(obj.event === 'show'){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "产品类型",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area: ['80%','80%'],
|
||||
content: '../kindLabel/customerSkillKindLabel.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
// 页面传参
|
||||
body.find('#proType_kindLabel').val(obj.data.proType);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'edit'){
|
||||
layer.open({
|
||||
type: 2,
|
||||
title: "修改",
|
||||
area: ['40%','50%'],
|
||||
skin: "layui-layer-molv",
|
||||
fix: false, //不固定
|
||||
//btn: ['取消'],//弹出层按钮
|
||||
maxmin: true,
|
||||
content: './updateCustomerSkillProType.jsp',
|
||||
success: function(layero, index){
|
||||
var body = layer.getChildFrame('body', index);
|
||||
var iframeWin = window[layero.find('iframe')[0]['name']]; //得到iframe页的窗口对象
|
||||
body.find('#idUpdate_proType').val(obj.data.id);
|
||||
body.find('#proTypeUpdate_proType').val(obj.data.proType);
|
||||
body.find('#sortUpdate_proType').val(obj.data.sort);
|
||||
body.find('#remarkUpdate_proType').val(obj.data.remark);
|
||||
}
|
||||
});
|
||||
}else if(obj.event === 'del'){
|
||||
layer.confirm('确定要删除该数据么?',{icon:3,title:"提示"}, function(index){
|
||||
$.ajax({
|
||||
url:"${path}/deleteCustomerTrainProType",
|
||||
data:{'id': obj.data.id},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('删除成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('删除失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
location.reload();//重新加载页面
|
||||
}, 1100);
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
+88
@@ -0,0 +1,88 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>领淘报表系统</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input{
|
||||
width:120%
|
||||
}
|
||||
.btn_groups{
|
||||
width:200px;
|
||||
margin:auto
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="type" value="售前客服必备技能">
|
||||
<input type="hidden" id="idUpdate_proType" name="id" class="layui-input">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proType" id="proTypeUpdate_proType" autocomplete="off"
|
||||
class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">排序</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="sort" id="sortUpdate_proType" placeholder="请输入顺序" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="30" name="remark" id="remarkUpdate_proType" placeholder="请输入产品说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block" btn_groups>
|
||||
<button class="layui-btn" lay-submit="" lay-filter="updateBtn">确认修改</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'form', 'laydate','layedit' ], function() {
|
||||
var form = layui.form;
|
||||
var laydate = layui.laydate;
|
||||
var layedit = layui.layedit;
|
||||
var $ = layui.$;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(updateBtn)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateCustomerTrainProType',
|
||||
dataType : 'json',
|
||||
data:$("form").serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload('trainProTypeAll');//重新加载父页面表格
|
||||
}, 1100);
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,129 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
</head>
|
||||
<style>
|
||||
.price-layout-page{
|
||||
background:#eeeeee;
|
||||
padding:18px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:30px;
|
||||
}
|
||||
.layui-form-radio, .layui-form-radio *{
|
||||
vertical-align:baseline;
|
||||
}
|
||||
</style>
|
||||
<script id="trainContent" type="text/html">
|
||||
{{# layui.each(d.list, function(index, item){ }}
|
||||
<ul class="layui-timeline">
|
||||
<li class="layui-timeline-item">
|
||||
<i class="layui-icon layui-timeline-axis"></i>
|
||||
<div class="layui-timeline-content layui-text">
|
||||
<p>
|
||||
{{item.content}}
|
||||
</p>
|
||||
</div>
|
||||
</li>
|
||||
</ul>
|
||||
{{# }); }}
|
||||
</script>
|
||||
<body class="price-layout-page">
|
||||
<form class="layui-form" action="" id="form">
|
||||
<input type="hidden" id="type" name="type" value="售前客服必备技能">
|
||||
<label class="layui-form-label"></label>
|
||||
<div class="layui-form-item" id="myRadio"></div>
|
||||
</form>
|
||||
<div class="layui-col-md12" style="padding: 7px;">
|
||||
<div style="background: white; padding: 7px;">
|
||||
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 30px;">
|
||||
<legend style="color:red;"><h1>售前客服必备技能:</h1></legend>
|
||||
</fieldset>
|
||||
<!-- 渲染到这 -->
|
||||
<div id="view"></div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
<script>
|
||||
layui.use(['form', 'laytpl', 'layer'], function(){ //独立版的layer无需执行这一句
|
||||
var $ = layui.jquery,
|
||||
form = layui.form,
|
||||
layer = layui.layer,
|
||||
laytpl = layui.laytpl;
|
||||
form.render();
|
||||
|
||||
//一访问页面就调用
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainProTypes",
|
||||
type : "GET",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
type:$("#type").val()
|
||||
},
|
||||
dataType : "json",
|
||||
success : function(proTypeResult) {
|
||||
var proTypeData = proTypeResult.list
|
||||
|
||||
for(var proTypeItem in proTypeData){
|
||||
var str="<label class='layui-form-label'>"+ proTypeData[proTypeItem].proType +":</label>"
|
||||
$("#myRadio").append(str);
|
||||
$.ajax({
|
||||
url:"/quote_price/getCustomerTrainKindLabelsByProType",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
async: false, // 同步
|
||||
data:{
|
||||
proType :proTypeData[proTypeItem].proType,
|
||||
type :$("#type").val(),
|
||||
needPage:"0"
|
||||
},
|
||||
success : function(kindResult) {
|
||||
var kindData = kindResult.list
|
||||
for(var kindItem in kindData){
|
||||
var kindStr="<input type='radio' name='kind' lay-filter='kind' value="+ JSON.stringify(proTypeData[proTypeItem].proType+ '+' +kindData[kindItem].kindLabel)+ " title="+ JSON.stringify(kindData[kindItem].kindLabel)+">"
|
||||
$("#myRadio").append(kindStr)
|
||||
}
|
||||
$("#myRadio").append("</br>")
|
||||
}
|
||||
});
|
||||
}
|
||||
$("#form")[0].reset();
|
||||
}
|
||||
});
|
||||
|
||||
form.on('radio(kind)', function(kindData) {
|
||||
// 传过来的数据是proType+kind拼接的
|
||||
var data = kindData.value.split("+");
|
||||
//获取后台数据后渲染
|
||||
$.ajax({
|
||||
url: "/quote_price/getCustomerTrainContents",
|
||||
datatype: "json",
|
||||
// data:$("form").serialize(),
|
||||
data:{
|
||||
proType :data[0],
|
||||
kind :data[1],
|
||||
type :$("#type").val()
|
||||
},
|
||||
type: "GET",
|
||||
async: false,//关闭异步,否则popover组件无法渲染出值
|
||||
context: document.body,
|
||||
success: function (data) {
|
||||
var getTpl = document.getElementById('trainContent').innerHTML,
|
||||
view = document.getElementById('view');
|
||||
laytpl(getTpl).render(data, function (html) {
|
||||
view.innerHTML = html;
|
||||
});
|
||||
form.render();
|
||||
}
|
||||
})
|
||||
return false;
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,81 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加省份快递费</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">省份</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="province" placeholder="请输入省份" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">快递费</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="price" placeholder="请输入快递费价格" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addExpressFee',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
} else {
|
||||
layer.msg('录入失败!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("expressFeeTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,69 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>快递费列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.ztree *{
|
||||
font-size: 20px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增省份</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger"" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">省份</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="province" name="province" placeholder="请输入省份"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="expressFeeTable" lay-filter="expressFeeTable"></table>
|
||||
<script type="text/javascript">
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
})
|
||||
</script>
|
||||
<script src="${path}/js/expressFee.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>修改省份快递费</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">省份</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="province" placeholder="请输入省份" class="layui-input" id="provinceUpdate">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">快递费</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="price" placeholder="请输入快递费金额" class="layui-input" id="price">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'table', 'laydate', 'form','layer' ], function() {
|
||||
var $ = layui.jquery;
|
||||
var table = layui.table;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
form.on('submit(enadd)',function(data){
|
||||
$.ajax({
|
||||
url:'${path}/updateExpressFee',
|
||||
dataType : 'json',
|
||||
data:$(data.form).serialize(),
|
||||
type : 'post',
|
||||
success:function(data){
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:2000});//提示框
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("expressFeeTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,84 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>财务拆分尺寸列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="extractTable"lay-data="extractTable" lay-filter="extractTable"></table>
|
||||
<script src="${path}/js/extract.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,84 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>财务列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="financeTable"lay-data="financeTable" lay-filter="financeTable"></table>
|
||||
<script src="${path}/js/finance.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,84 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>财务列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="finance2Table"lay-data="finance2Table" lay-filter="finance2Table"></table>
|
||||
<script src="${path}/js/finance2.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>财务列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="hidden" id="financeType" name="financeType" value="3" />
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<input type="hidden" id="ui_table_name" value="finance3Table" />
|
||||
<table class="layui-hide" id="finance3Table" lay-data="finance3Table" lay-filter="finance3Table"></table>
|
||||
<script src="${path}/js/finance3.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,85 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>财务列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
<div class="layui-inline" style="color: red;">大纸尺寸430*300mm,出血3mm</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="finance4Table" lay-data="finance4Table" lay-filter="finance4Table"></table>
|
||||
<script src="${path}/js/finance4.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>拼版计算5</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
<div class="layui-inline" style="color: red;">大纸尺寸440*310mm,出血3mm</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<input type="hidden" id="ui_table_name" value="finance5Table" />
|
||||
<table class="layui-hide" id="finance5Table" lay-data="finance5Table" lay-filter="finance5Table"></table>
|
||||
<script src="${path}/js/finance5.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>拼版计算6</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
<div class="layui-inline" style="color: red;">大纸尺寸425*300mm,出血4mm</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<input type="hidden" id="ui_table_name" value="finance6Table" />
|
||||
<table class="layui-hide" id="finance6Table" lay-data="finance6Table" lay-filter="finance6Table"></table>
|
||||
<script src="${path}/js/finance6.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,86 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>拼版计算7</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="del"><i class="layui-icon"></i>删除数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
<div class="layui-inline" style="color: red;">大纸尺寸420*280mm,出血2mm</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<input type="hidden" id="ui_table_name" value="finance7Table" />
|
||||
<table class="layui-hide" id="finance7Table" lay-data="finance7Table" lay-filter="finance7Table"></table>
|
||||
<script src="${path}/js/finance7.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,83 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>补差价订单处理</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="mulAdd"><i class="layui-icon"></i>导入文件</button>
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">文件</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="filename" id="filename" lay-search="">
|
||||
<option value="">直接选择或搜索选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber" placeholder="订单号"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-upload" id="popmulAddTest" style="display:none;">
|
||||
<button type="button" class="layui-btn layui-btn-normal" id="testList">选择文件</button>
|
||||
<div class="layui-upload-list">
|
||||
<table class="layui-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>文件名</th>
|
||||
<th>大小</th>
|
||||
<th>状态</th>
|
||||
<th>操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="demoList"></tbody>
|
||||
</table>
|
||||
</div>
|
||||
<button type="button" class="layui-btn" style="margin:100px 300px" id="testListAction" lay-submit lay-filter="upLoad">开始上传</button>
|
||||
</div>
|
||||
<table class="layui-hide" id="differenceTable"lay-data="differenceTable" lay-filter="differenceTable"></table>
|
||||
<script src="${path}/js/difference.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,81 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加产品须知</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">内容</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="content" placeholder="请输入内容" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="type" placeholder="请输入类型" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addInformation',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
} else {
|
||||
layer.msg('录入失败!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("informationTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,70 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>产品知识列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.ztree *{
|
||||
font-size: 20px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增内容</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"style="color:white;font-size:20px"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger"" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">内容</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="content" name="content" placeholder="请输入内容"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="informationTable" lay-filter="informationTable"></table>
|
||||
<script type="text/javascript">
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
})
|
||||
</script>
|
||||
<script src="${path}/js/information.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,75 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>修改产品须知</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">内容</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="content" placeholder="请输入内容" class="layui-input" id="contentUpdate">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="type" placeholder="请输入类型" class="layui-input" id="type">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'table', 'laydate', 'form','layer' ], function() {
|
||||
var $ = layui.jquery;
|
||||
var table = layui.table;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
form.on('submit(enadd)',function(data){
|
||||
$.ajax({
|
||||
url:'${path}/updateInformation',
|
||||
dataType : 'json',
|
||||
data:$(data.form).serialize(),
|
||||
type : 'post',
|
||||
success:function(data){
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:2000});//提示框
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("informationTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,101 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加用户</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<link rel="stylesheet" href="${path}/static/css/formSelects-v4.css">
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">授权IP</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="agreeIp" placeholder="请输入IP" id="agreeIp" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="remark" id="realname" placeholder="请输入说明" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
layui.use(['form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#agreeIp').blur(function() {
|
||||
var param = {
|
||||
agreeIp : $("#agreeIp").val()
|
||||
}
|
||||
$.getJSON("${path}/checkIP",param,function(data) {
|
||||
console.log(data)
|
||||
if (data.code == 200) {
|
||||
layer.tips('IP符合规范','#agreeIp',{tips : [2,'#009688' ],time : 1500});
|
||||
} else {
|
||||
layer.tips('IP已存在,请重新输入','#agreeIp',{tips : [2, 'red' ],time : 0});
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addIp',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
} else {
|
||||
layer.msg('录入失败!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("loginIpTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,71 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>允许登录IP列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.ztree *{
|
||||
font-size: 20px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i>新增IP</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchdel" data-type="getCheckData"><i class="layui-icon layui-icon-delete" style="font-size:20px;"></i>批量删除</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"style="color:white;font-size:20px"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger"" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">授权IP</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="agreeIp" id="agreeIp" placeholder="请输入要查询的IP"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="remark" name="remark" placeholder="请输入要查询信息"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="loginIpTable"lay-data="loginIpTable" lay-filter="loginIpTable"></table>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script src="${path}/js/loginIp.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,93 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>修改ip</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<link rel="stylesheet" href="${path}/static/css/formSelects-v4.css">
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="updateIp"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" name="id" id="id" value="" />
|
||||
<label class="layui-form-label">授权IP</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="agreeIp" placeholder="请输入IP" id="agreeIp" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="remark" id="remark" placeholder="请输入说明" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
layui.use(['form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
$(document).ready(function() {
|
||||
$('#agreeIp').blur(function() {
|
||||
var param = {
|
||||
agreeIp : $("#agreeIp").val()
|
||||
}
|
||||
$.getJSON("${path}/checkIP",param,function(data) {
|
||||
console.log(data)
|
||||
if (data.code == 200) {
|
||||
layer.tips('IP符合规范','#agreeIp',{tips : [2,'#009688' ],time : 1500});
|
||||
} else {
|
||||
layer.tips('IP已存在,请重新输入','#agreeIp',{tips : [2, 'red' ],time : 0});
|
||||
}
|
||||
})
|
||||
});
|
||||
})
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/updateIp',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:2000});//提示框
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("loginIpTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,122 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link href="${pageContext.request.contextPath}/static/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="remark" name="remark" placeholder="请输入要查询信息"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">登录状态</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="status" id="status">
|
||||
<option value=""></option>
|
||||
<option value="正常">正常</option>
|
||||
<option value="警告">警告</option>
|
||||
<option value="异常">异常</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" data-type="reload" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
<table class="layui-hide" id="loginLogTable"></table>
|
||||
<script>
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//生成表格
|
||||
table.render({
|
||||
elem : '#loginLogTable',
|
||||
url : '${pageContext.request.contextPath}/getLoginLogList',
|
||||
//开启分页
|
||||
page : {
|
||||
layout:['count','prev','page','next', 'skip','limit']
|
||||
},
|
||||
limits : [10,30,50,80,100,999],
|
||||
id : 'loginLogAll',
|
||||
where : {
|
||||
remark : '',
|
||||
status : ''
|
||||
},
|
||||
/* request : {
|
||||
'limitName' : 'pageSize' //分页每页条数默认字段改为pageSize
|
||||
}, */
|
||||
cellMinWidth : 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'remark',
|
||||
width : 650,
|
||||
title : '登录详情'
|
||||
},{
|
||||
field : 'status',
|
||||
width : 150,
|
||||
algin : 'center',
|
||||
title : '登录状态',
|
||||
templet : function(d) {
|
||||
if(d.status == "异常"){
|
||||
return '<a class=""style="color:#ed2a4a">'+d.status+'</a>';
|
||||
}else if(d.status == "警告"){
|
||||
return '<a class=""style="color:green">'+d.status+'</a>';
|
||||
}else{
|
||||
return d.status;
|
||||
}
|
||||
}
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('loginLogAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
remark : $("#remark").val(),
|
||||
status : $("#status").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,56 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Insert title here</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<script src="${pageContext.request.contextPath}/static/js/jquery.ztree.all.min.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
<h2>权限列表</h2>
|
||||
<hr>
|
||||
<table id="permissionTable" lay-filter="permissionTable"></table>
|
||||
|
||||
<script type="text/javascript">
|
||||
layui.config({
|
||||
base: '${path}/static/js/'
|
||||
}).extend({
|
||||
treeGrid: 'treeGrid'
|
||||
});
|
||||
|
||||
layui.use('treeGrid',function () {
|
||||
var treeGrid = layui.treeGrid;
|
||||
|
||||
$.get("${path}/sysPermission/list",function (d) {
|
||||
$.each(d.data,function () {
|
||||
this.isOpen = false;
|
||||
});
|
||||
treeGrid.render({
|
||||
id : 'perTable',
|
||||
elem : '#permissionTable',//展示表格的lay-filter
|
||||
data : d.data,//数据
|
||||
idField : 'id',
|
||||
treeId : 'perId',//主键id
|
||||
treeUpId : 'parentId',//父ID
|
||||
treeShowName : 'perName',//展示的名字
|
||||
toolbar:'#toolbarDemo',
|
||||
cols : [[
|
||||
{field:'perName', title:'权限名称'},
|
||||
{field:'type', title:'权限类型'},
|
||||
{field:'url', title:'连接地址'}
|
||||
]]
|
||||
});
|
||||
})
|
||||
});
|
||||
</script>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add"><i class="layui-icon layui-icon-add-circle"></i> 添加</button>
|
||||
<button class="layui-btn layui-btn-sm layui-btn-danger" lay-event="batchDelete"><i class="layui-icon layui-icon-delete"></i> 批量删除</button>
|
||||
</div>
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,65 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>价格列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.ztree *{
|
||||
font-size: 20px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"style="color:white;font-size:20px"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger"" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="proTypeLabel" name="proTypeLabel" placeholder="请输入产品类型"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="productTable" lay-filter="productTable"></table>
|
||||
<script type="text/javascript">
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
})
|
||||
</script>
|
||||
<script src="${path}/js/product.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,112 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加问题</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">问题</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="question" placeholder="请输入问题" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项A</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer1" placeholder="请输入选项A" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项B</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer2" placeholder="请输入选项B" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项C</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer3" placeholder="请输入选项C" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项D</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer4" placeholder="请输入选项D" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">题目类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="type" value="0" title="单选" checked>
|
||||
<input type="radio" name="type" value="1" title="多选">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">正确答案</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer" placeholder="请输入正确答案" class="layui-input" lay-verify="required">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addQuestion',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
} else {
|
||||
layer.msg('录入失败!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("questionTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,77 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>问题列表</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.ztree *{
|
||||
font-size: 20px;
|
||||
}
|
||||
.edge .layui-edge{
|
||||
right:35px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增问题</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"style="color:white;font-size:20px"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-xs layui-btn-danger"" lay-event="del"><i class="layui-icon layui-icon-delete" ></i>删除</a>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">问题</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="question" name="question" placeholder="请输入问题"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<select name="type" id="type">
|
||||
<option value="0">单选题</option>
|
||||
<option value="1">多选题</option>
|
||||
<option value="2">填空题</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<table class="layui-hide" id="questionTable" lay-filter="questionTable"></table>
|
||||
<script type="text/javascript">
|
||||
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
})
|
||||
</script>
|
||||
<script src="${path}/js/question.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,107 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>修改问题</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="id" id="id">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">问题</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="question" lay-verify="question"
|
||||
placeholder="请输入问题" class="layui-input" id="question">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项A</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer1" placeholder="请输入选项A" class="layui-input" id="answer1">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项B</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer2" placeholder="请输入选项B" class="layui-input" id="answer2">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项C</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer3" placeholder="请输入选项C" class="layui-input" id="answer3">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">选项D</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer4" placeholder="请输入选项D" class="layui-input" id="answer4">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">题目类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="radio" name="type" value="0" title="单选" checked>
|
||||
<input type="radio" name="type" value="0" title="多选">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">正确答案</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="answer" placeholder="请输入正确答案" class="layui-input" id="answer">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'table', 'laydate', 'form','layer' ], function() {
|
||||
var $ = layui.jquery;
|
||||
var table = layui.table;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
|
||||
form.on('submit(enadd)',function(data){
|
||||
$.ajax({
|
||||
url:'${path}/updateQuestion',
|
||||
dataType : 'json',
|
||||
data:$(data.form).serialize(),
|
||||
type : 'post',
|
||||
success:function(data){
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:2000});//提示框
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("questionTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,112 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>填写成交订单号</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<link rel="stylesheet" href="${path}/static/css/formSelects-v4.css">
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<input type="hidden" id="TYPE" class="layui-input">
|
||||
<input type="hidden" id="ID" class="layui-input">
|
||||
<input type="hidden" id="USERNAME" class="layui-input">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="orderNumber" placeholder="请输入成交的订单号" class="layui-input" id="orderNumber"
|
||||
autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addOrderNumber',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
id : $("#ID").val(),
|
||||
orderNumber :$("#orderNumber").val()
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
//填写订单号后
|
||||
if (data.code == 200) {
|
||||
// 改变状态
|
||||
//当天成交
|
||||
if($("#TYPE").val() == 0){
|
||||
$.ajax({
|
||||
url : "${path}/changeIsBuyToDayStatus",
|
||||
dataType : 'json',
|
||||
data : {
|
||||
'id' : $("#ID").val(),
|
||||
'username' : $("#USERNAME").val()
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('状态修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
}else if($("#TYPE").val() == 1){ // 跟单成交
|
||||
$.ajax({
|
||||
url : "${path}/changeIsBuyStatus",
|
||||
dataType : 'json',
|
||||
data : {
|
||||
'id':$("#ID").val()
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('状态修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('只允许店长修改!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
//关闭弹出层
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index); //关闭弹出层
|
||||
}, 2100);
|
||||
} else {
|
||||
layer.msg(data.msg, {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,138 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<script src="${path}/static/js/echarts.min.js"></script>
|
||||
<script src="${path}/static/js/jquery.table2excel.js"></script>
|
||||
<style>
|
||||
.layui-form-select .layui-edge{
|
||||
right:40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-form">
|
||||
<div style="padding: 20px;">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-card"
|
||||
style="border-radius: 20px; border: 2px solid buttonface; box-shadow: 5px 5px 5px #F2F2F2 inset;">
|
||||
<div class="layui-card-header"
|
||||
style="font-weight: bold; font-size: 18px;">客服大单数据统计</div>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">时间</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="type" id="selectedOption" lay-filter="college">
|
||||
<option value="day" selected="selected">按日统计</option>
|
||||
<option value="dayRound">按日期范围统计</option>
|
||||
<option value="week">按周统计</option>
|
||||
<option value="month">按月统计</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-inline" id="worldlable" style="width: 220px;">
|
||||
<input id="worldId" type="text" class="layui-input laydate-test" data-type="date" autocomplete="off" style="width: 190px;">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">所属店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="roleSearch" id="roleSearch" lay-filter="roleSearch" lay-search></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">人员</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="realname" id="realname" lay-search>
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-inline">
|
||||
<label class="layui-form-label">根据产品查找</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="byProTypeLabel" id="byProTypeLabel">
|
||||
<option></option>
|
||||
<option value="0">否</option>
|
||||
<option value="1">是</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="searchBtn1">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-card-body">
|
||||
<div id="echartAcount" style="width: 100%; height: 600px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="${path}/js/echartBar_kefu.js" charset="utf-8" ></script>
|
||||
<script src="${path}/static/js/dateUtil.js" charset="utf-8"></script>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
// 下拉框第一列添加空的option
|
||||
$('#roleSearch').append(new Option("",""));
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
// 获取角色
|
||||
$.ajax({
|
||||
// 获取所有角色
|
||||
// url : '${path}/getRoleList',
|
||||
// 获取用户拥有的角色
|
||||
url : '${path}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
// 获取所有角色
|
||||
//var datas = data.data.allRoleList
|
||||
// 获取用户拥有的角色
|
||||
var datas = data.data.userRoleList
|
||||
$.each(datas, function(index, item) {
|
||||
$('#roleSearch').append(
|
||||
new Option(item.roleName, item.roleId));// 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 根据店铺获取人员
|
||||
form.on('select(roleSearch)', function(data) {
|
||||
// 切换按钮清空下拉框(防止一直重复加)
|
||||
$("#realname").empty();
|
||||
// 下拉框第一列添加空的option
|
||||
$('#realname').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"${pageContext.request.contextPath}/getRealnamesByShopname",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
shopname:data.value
|
||||
},
|
||||
success : function(result) {
|
||||
$.each(result,function(index,item){
|
||||
$('#realname').append(new Option(item,index));//往下拉菜单里添加元素
|
||||
});
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,628 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
/* 数据表格样式 */
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:14px;
|
||||
}
|
||||
.layui-table-cell{
|
||||
height:30px;
|
||||
line-height:34px;
|
||||
}
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
.layui-form-select .layui-edge{
|
||||
right:0px;
|
||||
}
|
||||
.layui-form-select .layui-input {
|
||||
padding-right: 0px;
|
||||
}
|
||||
/* 数据渲染完的回调。
|
||||
由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单 */
|
||||
.laytable-cell-1-0-2,.layui-table-box,.layui-table-body{
|
||||
overflow: visible;
|
||||
}
|
||||
/* 数据表格中的下拉框和表格相同高度 */
|
||||
td .layui-form-select {
|
||||
margin-top: -10px;
|
||||
margin-left: -15px;
|
||||
margin-right: -15px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-primary layui-btn-sm" lay-event="export"><i class="layui-icon"></i>导出数据</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="isBuyToDayTpl">
|
||||
<input type="checkbox" name="isBuyToDay" value="{{d.id}}+{{d.username}}+{{d.price}}" lay-skin="switch" lay-text="已成交|未成交" lay-filter="isBuyToDayDemo" {{ d.isBuyToDay == '1'? 'checked' : '' }}>
|
||||
</script>
|
||||
<script type="text/html" id="isBuyTpl">
|
||||
<input type="checkbox" name="isBuy" value="{{d.id}}+{{d.buyPrice}}" lay-skin="switch" lay-text="已成交|未成交" lay-filter="isBuyDemo" {{ d.isBuy == '1'? 'checked' : '' }}>
|
||||
</script>
|
||||
<script type="text/html" id="selectEducation">
|
||||
<select name="shopname" id="shopname" lay-filter="shopname" data.value="{{d.username}}+{{d.id}}+{{d.wangwang}}">
|
||||
<option value="">--请选择--</option>
|
||||
</select>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">操作人</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="realname" name="realname"
|
||||
placeholder="请输入真实姓名" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="roleSearch" id="roleSearch" lay-search></select>
|
||||
</div>
|
||||
<input type="hidden" id="role" name="role" value="${sessionScope.USER_SESSION.role}" >
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">当天成交</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="isBuyToDay" id="isBuyToDay">
|
||||
<option value=""></option>
|
||||
<option value="0">未成交</option>
|
||||
<option value="1">已成交</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">跟单后成交</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="isBuy" id="isBuy">
|
||||
<option value=""></option>
|
||||
<option value="0">未成交</option>
|
||||
<option value="1">已成交</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">操作时间</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="type" id="selectedOption" lay-filter="college">
|
||||
<option value="day" selected="selected">按日统计</option>
|
||||
<option value="dayRound">按日期范围统计</option>
|
||||
<option value="week">按周统计</option>
|
||||
<option value="month">按月统计</option>
|
||||
<option value="quarter">按季度统计</option>
|
||||
<option value="year">按年统计</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-inline" id="worldlable" style="width: 190px;">
|
||||
<input id="worldId" type="text" class="layui-input laydate-test" data-type="date" autocomplete="off">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">所属店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="isSelect" id="isSelect">
|
||||
<option value=""></option>
|
||||
<option value="0">未选择</option>
|
||||
<option value="1">已选择</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">填写旺旺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="isFillIn" id="isFillIn">
|
||||
<option value=""></option>
|
||||
<option value="0">未填写</option>
|
||||
<option value="1">已填写</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">客户旺旺</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="wangwang" name="wangwang"
|
||||
placeholder="请输入客户旺旺搜索" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">金额</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="price" name="price"
|
||||
placeholder="金额" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">操作</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="remark" name="remark"
|
||||
placeholder="搜索操作" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">产品</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="proTypeLabel" id="proTypeLabel" lay-search></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">订单号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="orderNumber" name="orderNumber"
|
||||
placeholder="订单号" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">跟踪情况</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="commentManager" name="commentManager"
|
||||
placeholder="跟踪情况" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" data-type="reload" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<br>
|
||||
<table class="layui-hide" id="quoteDataTable" lay-filter="quoteDataTable"></table>
|
||||
<script>
|
||||
var roleData = {};
|
||||
$.ajax({
|
||||
url : '${path}/changeRoleName',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
roleData = data;
|
||||
}
|
||||
});
|
||||
// 下拉框第一列添加空的option
|
||||
$('#roleSearch').append(new Option("",""));
|
||||
$('#proTypeLabel').append(new Option("",""));
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//获取用户的角色
|
||||
$.ajax({
|
||||
url : '${path}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
flag:"customerData"
|
||||
},
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
var datas = data.data.userRoleList
|
||||
$.each(datas, function(index, item) {
|
||||
$('#roleSearch').append(
|
||||
new Option(item.roleName, item.roleId));// 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
//获取报价过的产品
|
||||
$.ajax({
|
||||
url : '${path}/getProTypeLabel',
|
||||
dataType : 'json',
|
||||
data : {},
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
$.each(data, function(index, item) {
|
||||
$('#proTypeLabel').append(
|
||||
new Option(item, item));// 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
form.on('select(shopname)', function (data) {
|
||||
var id = data.elem.getAttribute("data.value");
|
||||
// 传过来的数据是 用户名+id+旺旺 拼接的
|
||||
var shopnameData = id.split("+");
|
||||
$.ajax({
|
||||
url : "${path}/updateShopname",
|
||||
dataType : 'json',
|
||||
data : {
|
||||
"username":shopnameData[0],
|
||||
"id" :shopnameData[1],
|
||||
"shopname":data.value,
|
||||
/* "wangwang":shopnameData[2] */
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
//生成表格
|
||||
table.render({
|
||||
elem : '#quoteDataTable',
|
||||
url : '${path}/getQuoteData',
|
||||
toolbar : '#toolbarDemo',
|
||||
page : {
|
||||
layout:['count','prev','page','next', 'skip','limit']
|
||||
},//开启分页
|
||||
limits : [10,30,50,100,500,999],
|
||||
id : 'quoteDataAll',
|
||||
totalRow: true,
|
||||
where : {
|
||||
realname : '',
|
||||
remark : '',
|
||||
shopname : '',
|
||||
price : '',
|
||||
wangwang : '',
|
||||
roleSearch :'',
|
||||
proTypeLabel:'',
|
||||
quoteTimeBegin: '',
|
||||
commentManager:'',
|
||||
role : $("#role").val()
|
||||
},
|
||||
cellMinWidth : 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left",
|
||||
totalRowText: '合计'
|
||||
},{
|
||||
field : 'realname',
|
||||
width : 75,
|
||||
align : 'center',
|
||||
title : '操作人'
|
||||
},/* {
|
||||
field : 'role',
|
||||
width : 120,
|
||||
align : 'center',
|
||||
title : '拥有的店铺',
|
||||
templet:function(d){
|
||||
if(d.role != null && d.role != ""){
|
||||
var load = d.role.split(",");
|
||||
var roleStr = "";
|
||||
for (var i = 0; i < load.length; i++) {
|
||||
roleStr += roleData[load[i]] + " ";
|
||||
}
|
||||
return roleStr
|
||||
}
|
||||
return ""
|
||||
}
|
||||
}, */{
|
||||
field : 'shopname',
|
||||
title : '选择店铺',
|
||||
width : 80,
|
||||
align : 'center',
|
||||
templet: "#selectEducation"
|
||||
},{
|
||||
field : 'shopname',
|
||||
title : '所属店铺',
|
||||
width : 100,
|
||||
align : 'center',
|
||||
templet:function(d){
|
||||
if(d.shopname != null && d.shopname != ""){
|
||||
return roleData[d.shopname]
|
||||
}
|
||||
return ""
|
||||
}
|
||||
},{
|
||||
field : 'wangwang',
|
||||
width : 120,
|
||||
align : 'center',
|
||||
title : '客户旺旺',
|
||||
edit : 'text'
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '操作'
|
||||
},{
|
||||
field : 'price',
|
||||
width : 70,
|
||||
align : 'center',
|
||||
title : '金额',
|
||||
edit : 'text',
|
||||
totalRow: true
|
||||
},{
|
||||
field : 'isBuyToDay',
|
||||
title : '当天成交',
|
||||
align : 'center',
|
||||
width : 105,
|
||||
templet : '#isBuyToDayTpl'
|
||||
},{
|
||||
field : 'commentSelf',
|
||||
title : '未成交原因',
|
||||
width : 200,
|
||||
edit : 'text'
|
||||
},{
|
||||
field : 'isBuy',
|
||||
title : '跟单后成交',
|
||||
align : 'center',
|
||||
width : 105,
|
||||
templet : '#isBuyTpl'
|
||||
},{
|
||||
field : 'buyPrice',
|
||||
title : '成交金额',
|
||||
align : 'center',
|
||||
width : 100,
|
||||
edit : 'text',
|
||||
totalRow: true
|
||||
},{
|
||||
field : 'commentManager',
|
||||
title : '店长跟踪情况汇报',
|
||||
width : 260,
|
||||
edit : 'text',
|
||||
},{
|
||||
field : 'quoteTime',
|
||||
width : 160,
|
||||
align : 'center',
|
||||
title : '操作时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.quoteTime, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
},
|
||||
//数据渲染完的回调。
|
||||
done: function (res, curr, count) {
|
||||
tabData = res.data;
|
||||
//获取用户的角色
|
||||
$.ajax({
|
||||
url : '${path}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
flag:"customerData"
|
||||
},
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
var datas = data.data.userRoleList
|
||||
$(datas).each(function (i) {
|
||||
var option = $('<option value="' + datas[i].roleId + '">' + datas[i].roleName + '</option>');
|
||||
// id只能唯一,所以用name赋值
|
||||
$("select[name = 'shopname']").append(option);
|
||||
})
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
//由于layui 设置了超出隐藏,所以这里改变下,以兼容操作按钮的下拉菜单
|
||||
// $(".layui-table-body, .layui-table-box, .layui-table-cell").css('overflow', 'visible');
|
||||
}
|
||||
});
|
||||
|
||||
//日期范围
|
||||
laydate.render({
|
||||
elem: '#time'
|
||||
,range: true
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('quoteDataAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
realname : $("#realname").val(),
|
||||
remark : $("#remark").val(),
|
||||
isBuy : $("#isBuy").val(),
|
||||
isBuyToDay : $("#isBuyToDay").val(),
|
||||
isSelect : $("#isSelect").val(),
|
||||
isFillIn : $("#isFillIn").val(),
|
||||
price : $("#price").val(),
|
||||
wangwang : $("#wangwang").val(),
|
||||
quoteTimeBegin: $("#worldId").val(),
|
||||
roleSearch : $("#roleSearch").val(),
|
||||
proTypeLabel: $("#proTypeLabel").val(),
|
||||
orderNumber : $("#orderNumber").val(),
|
||||
commentManager: $("#commentManager").val(),
|
||||
role : $("#role").val()
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
// 监听头部工作栏的导出
|
||||
table.on('toolbar(quoteDataTable)', function(obj) {
|
||||
var checkStatus = table.checkStatus(obj.config.id);
|
||||
switch (obj.event) {
|
||||
case 'export':
|
||||
var realname = $("#realname").val(),
|
||||
remark = $("#remark").val(),
|
||||
isBuy = $("#isBuy").val(),
|
||||
isBuyToDay = $("#isBuyToDay").val(),
|
||||
isSelect = $("#isSelect").val(),
|
||||
isFillIn = $("#isFillIn").val(),
|
||||
price = $("#price").val(),
|
||||
wangwang = $("#wangwang").val(),
|
||||
quoteTimeBegin= $("#worldId").val(),
|
||||
roleSearch = $("#roleSearch").val(),
|
||||
proTypeLabel= $("#proTypeLabel").val(),
|
||||
role = $("#role").val();
|
||||
window.location.href="../../../excel_quoteData" + "?realname=" + realname + "&remark=" + remark+ "&isBuy=" + isBuy
|
||||
+ "&isBuyToDay=" + isBuyToDay+ "&isSelect=" + isSelect+ "&isFillIn=" + isFillIn+ "&price=" + price + "&wangwang=" + wangwang
|
||||
+ ""eTimeBegin=" + quoteTimeBegin+ "&roleSearch=" + roleSearch+ "&proTypeLabel=" + proTypeLabel+ "&role=" + role;
|
||||
break;
|
||||
};
|
||||
});
|
||||
|
||||
//监听【是否当天成交】状态按钮(自己修改)
|
||||
form.on('switch(isBuyToDayDemo)', function(obj){
|
||||
// jsp传过来的数据是 id+用户名+价格 拼接的
|
||||
var rowData = obj.value.split("+");
|
||||
// 未成交点成已成交,且价格大于300-->需要填写订单号
|
||||
if(obj.othis[0].innerText == '已成交' && rowData[2] >= 300){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "填写订单号",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area : [ '40%', '30%' ],
|
||||
content : './addOrderNumber.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
//得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
||||
//var iframeWin = window[layero.find('iframe')[0]['name']];
|
||||
|
||||
// 页面传参
|
||||
body.find('#TYPE').val(0);
|
||||
body.find('#ID').val(rowData[0]);
|
||||
body.find('#USERNAME').val(rowData[1]);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
//如果是已经成交的,点掉不需要填订单号
|
||||
$.ajax({
|
||||
url : "${path}/changeIsBuyToDayStatus",
|
||||
dataType : 'json',
|
||||
data : {
|
||||
'id' : rowData[0],
|
||||
'username' : rowData[1]
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('状态修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
var updatePrice;
|
||||
//监听【是否成交】状态按钮(店长修改)
|
||||
form.on('switch(isBuyDemo)', function(obj){
|
||||
// jsp传过来的数据是 id+价格 拼接的
|
||||
var rowData = obj.value.split("+");
|
||||
// jsp传过来的数据是 id+价格
|
||||
var id = rowData[0];
|
||||
var buyPrice = rowData[1];
|
||||
if(buyPrice == "null" && updatePrice == null){
|
||||
layer.msg('请先填写价格!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
return false;
|
||||
}
|
||||
$.ajax({
|
||||
url : "${path}/changeIsBuyStatus",
|
||||
dataType : 'json',
|
||||
data : {
|
||||
'id':id
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('状态修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('只允许店长修改!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
/* // 未成交点成已成交,且价格大于300-->需要填写订单号
|
||||
if(obj.othis[0].innerText == '已成交' && buyPrice >= 300){
|
||||
layer.open({
|
||||
type : 2,
|
||||
title : "填写订单号",
|
||||
fix: false, //不固定
|
||||
shadeClose:true,//点击旁边地方自动关闭
|
||||
maxmin: true,
|
||||
area : [ '40%', '30%' ],
|
||||
content : './addOrderNumber.jsp',
|
||||
success: function (layero, index) {
|
||||
//向layer页面传值,传值主要代码
|
||||
var body = layer.getChildFrame('body', index);
|
||||
|
||||
// 页面传参
|
||||
// TYPE=》0:当天成交 1:跟单成交
|
||||
body.find('#TYPE').val(1);
|
||||
body.find('#ID').val(id);
|
||||
}
|
||||
});
|
||||
}else{
|
||||
//已经成交的,点掉不需要填订单号
|
||||
$.ajax({
|
||||
url : "${path}/changeIsBuyStatus",
|
||||
dataType : 'json',
|
||||
data : {
|
||||
'id':id
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('状态修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg('只允许店长修改!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
} */
|
||||
})
|
||||
|
||||
//监听单元格编辑
|
||||
table.on('edit(quoteDataTable)', function(obj){
|
||||
var value = obj.value, //得到修改后的值
|
||||
data = obj.data, //得到所在行所有键值
|
||||
field = obj.field; //得到字段
|
||||
if(field == 'buyPrice')
|
||||
updatePrice = value;
|
||||
$.ajax({
|
||||
url:"${path}/updateById",
|
||||
data:{
|
||||
id: data.id,
|
||||
value: value,
|
||||
field: field,
|
||||
username:data.username,
|
||||
/* shopname:data.shopname */
|
||||
},
|
||||
type:"post",
|
||||
success:function (data) {
|
||||
// 改了跟单的价格,刷新
|
||||
if(field == "buyPrice" && value >=300){
|
||||
table.reload('quoteDataAll')
|
||||
}
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:1000});//提示框
|
||||
}else{
|
||||
layer.msg(data.msg,{icon:5,offset:"auto",time:1000});//提示框
|
||||
}
|
||||
}
|
||||
});
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<script src="${path}/static/js/dateUtil.js" charset="utf-8"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,141 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<script src="${path}/static/js/echarts.min.js"></script>
|
||||
<script src="${path}/static/js/jquery.table2excel.js"></script>
|
||||
<style>
|
||||
.layui-form-select .layui-edge{
|
||||
right:40px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-form">
|
||||
<div style="padding: 20px;">
|
||||
<div class="layui-row layui-col-space15">
|
||||
<div class="layui-card"
|
||||
style="border-radius: 20px; border: 2px solid buttonface; box-shadow: 5px 5px 5px #F2F2F2 inset;">
|
||||
<div class="layui-card-header"
|
||||
style="font-weight: bold; font-size: 18px;">数据统计</div>
|
||||
<form class="layui-form">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">时间</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="type" id="selectedOption" lay-filter="college">
|
||||
<option value="day" selected="selected">按日统计</option>
|
||||
<option value="dayRound">按日期范围统计</option>
|
||||
<option value="week">按周统计</option>
|
||||
<option value="month">按月统计</option>
|
||||
<option value="quarter">按季度统计</option>
|
||||
<option value="year">按年统计</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-inline" id="worldlable" style="width: 220px;">
|
||||
<input id="worldId" type="text" class="layui-input laydate-test" data-type="date" autocomplete="off" style="width: 190px;">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">所属店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="roleSearch" id="roleSearch" lay-filter="roleSearch" lay-search></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">人员</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="realname" id="realname" lay-search>
|
||||
<option></option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">根据产品查找</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="byProTypeLabel" id="byProTypeLabel">
|
||||
<option></option>
|
||||
<option value="0">否</option>
|
||||
<option value="1">是</option>
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-block">
|
||||
<button type="button" class="layui-btn" id="searchBtn1">查询</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<div class="layui-card-body">
|
||||
<div id="echartAcount" style="width: 100%; height: 600px;"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script src="${path}/js/echartBar_summary.js" charset="utf-8" ></script>
|
||||
<script src="${path}/static/js/dateUtil.js" charset="utf-8"></script>
|
||||
</body>
|
||||
<script type="text/javascript">
|
||||
// 下拉框第一列添加空的option
|
||||
$('#roleSearch').append(new Option("",""));
|
||||
layui.use([ 'form', 'layer'],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
// 获取角色
|
||||
$.ajax({
|
||||
// 获取所有角色
|
||||
// url : '${path}/getRoleList',
|
||||
// 获取用户拥有的角色
|
||||
url : '${path}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
},
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
// 获取所有角色
|
||||
//var datas = data.data.allRoleList
|
||||
// 获取用户拥有的角色
|
||||
var datas = data.data.userRoleList
|
||||
$.each(datas, function(index, item) {
|
||||
$('#roleSearch').append(
|
||||
new Option(item.roleName, item.roleId));// 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
// 根据店铺获取人员
|
||||
form.on('select(roleSearch)', function(data) {
|
||||
// 切换按钮清空下拉框(防止一直重复加)
|
||||
$("#realname").empty();
|
||||
// 下拉框第一列添加空的option
|
||||
$('#realname').append(new Option("",""));
|
||||
form.render("select");
|
||||
$.ajax({
|
||||
url:"${pageContext.request.contextPath}/getRealnamesByShopname",
|
||||
type : "GET",
|
||||
dataType : "json",
|
||||
data:{
|
||||
shopname:data.value
|
||||
},
|
||||
success : function(result) {
|
||||
$.each(result,function(index,item){
|
||||
$('#realname').append(new Option(item,index));//往下拉菜单里添加元素
|
||||
});
|
||||
layui.form.render("select");
|
||||
}
|
||||
});
|
||||
})
|
||||
})
|
||||
//console.log($('#roleSearch').val());
|
||||
</script>
|
||||
</html>
|
||||
@@ -0,0 +1,212 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<link href="${pageContext.request.contextPath}/static/layui/css/layui.css" rel="stylesheet">
|
||||
<script src="${pageContext.request.contextPath}/static/layui/layui.js"></script>
|
||||
<script src="${pageContext.request.contextPath}/static/js/jquery.min.js"></script>
|
||||
<style type="text/css">
|
||||
.layui-input-inline,.layui-form-label{
|
||||
margin-top:10px;
|
||||
}
|
||||
.layui-input{
|
||||
width:100%;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">操作人</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="realname" name="realname"
|
||||
placeholder="请输入真实姓名" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">所属店铺</label>
|
||||
<div class="layui-input-inline edge">
|
||||
<select name="shopname" id="shopname" lay-search></select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">金额</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="price" name="price"
|
||||
placeholder="金额" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">操作时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="type" id="selectedOption" lay-filter="college">
|
||||
<option value="day" selected="selected">按日统计</option>
|
||||
<option value="dayRound">按日期范围统计</option>
|
||||
<option value="week">按周统计</option>
|
||||
<option value="month">按月统计</option>
|
||||
<option value="quarter">按季度统计</option>
|
||||
<option value="year">按年统计</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<label class="layui-inline" id="worldlable" style="width: 190px;">
|
||||
<input id="worldId" type="text" class="layui-input laydate-test" data-type="date" autocomplete="off">
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">操作</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="remark" name="remark"
|
||||
placeholder="搜索操作" autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" data-type="reload" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-inline">
|
||||
<label class="layui-form-label">数据时间</label>
|
||||
<div class="layui-input-inline">
|
||||
<select name="dataByDate" id="dataByDate">
|
||||
<option value="7" selected="selected">7天内</option>
|
||||
<option value="30">30天内</option>
|
||||
<option value="90">90天内</option>
|
||||
<option value="0">全部</option>
|
||||
</select>
|
||||
</div>
|
||||
</div> -->
|
||||
</form>
|
||||
<br>
|
||||
<table class="layui-hide" id="logTable" lay-filter="loginlay"></table>
|
||||
<script>
|
||||
// 下拉框第一列添加空的option
|
||||
$('#shopname').append(new Option("",""));
|
||||
layui.use([ 'table', 'form','util','laydate'], function() {
|
||||
var $ = layui.jquery,
|
||||
table = layui.table,
|
||||
form = layui.form,
|
||||
util = layui.util,
|
||||
laydate = layui.laydate;
|
||||
|
||||
//获取用户的角色
|
||||
$.ajax({
|
||||
url : '${pageContext.request.contextPath}/getUserRoles',
|
||||
dataType : 'json',
|
||||
data : {
|
||||
flag:"customerData"
|
||||
},
|
||||
type : 'get',
|
||||
success : function(data) {
|
||||
console.log(data)
|
||||
var datas = data.data.userRoleList
|
||||
$.each(datas, function(index, item) {
|
||||
$('#shopname').append(
|
||||
new Option(item.roleName, item.roleName));// 下拉菜单里添加元素
|
||||
});
|
||||
form.render("select");
|
||||
}
|
||||
});
|
||||
|
||||
//生成表格
|
||||
table.render({
|
||||
elem : '#logTable',
|
||||
url : '${pageContext.request.contextPath}/getQuoteLog',
|
||||
page : {
|
||||
layout:['count','prev','page','next', 'skip','limit']
|
||||
},//开启分页
|
||||
id : 'quoteAll',
|
||||
where : {
|
||||
realname : '',
|
||||
remark : '',
|
||||
shopname : '',
|
||||
price : '',
|
||||
quoteTimeBegin: ''
|
||||
},
|
||||
/* request : {
|
||||
'limitName' : 'pageSize' //分页每页条数默认字段改为pageSize
|
||||
}, */
|
||||
cellMinWidth : 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||
cols : [ [ {
|
||||
type : 'numbers',
|
||||
width : 50,
|
||||
title : '序号',
|
||||
fixed : "left"
|
||||
},{
|
||||
field : 'realname',
|
||||
width : 120,
|
||||
title : '操作人'
|
||||
},{
|
||||
field : 'shopname',
|
||||
width : 200,
|
||||
title : '所属店铺'
|
||||
},{
|
||||
field : 'remark',
|
||||
title : '操作'
|
||||
},{
|
||||
field : 'quoteTime',
|
||||
width : 180,
|
||||
title : '操作时间',
|
||||
templet:function(d){
|
||||
return util.toDateString(d.quoteTime, "yyyy-MM-dd HH:mm:ss");
|
||||
}
|
||||
},{
|
||||
field : 'quoteIp',
|
||||
width : 150,
|
||||
title : '操作IP'
|
||||
}, {
|
||||
field : 'os',
|
||||
width : 120,
|
||||
title : '操作系统'
|
||||
}, {
|
||||
field : 'brower',
|
||||
width : 150,
|
||||
title : '浏览器'
|
||||
}] ],
|
||||
parseData : function(res) { //将原始数据解析成 table 组件所规定的数据
|
||||
return {
|
||||
"code" : 0, //解析接口状态
|
||||
"msg" : "", //解析提示文本
|
||||
"count" : res.total,//解析数据长度
|
||||
"data" : res.list//解析数据列表
|
||||
};
|
||||
}
|
||||
});
|
||||
|
||||
//日期范围
|
||||
laydate.render({
|
||||
elem: '#time'
|
||||
,range: true
|
||||
});
|
||||
|
||||
//点击查询按钮,重载表格
|
||||
$('#searchBtn').on('click', function() {
|
||||
table.reload('quoteAll', {
|
||||
method : 'post',
|
||||
where : {
|
||||
realname : $("#realname").val(),
|
||||
remark : $("#remark").val(),
|
||||
shopname : $("#shopname").val(),
|
||||
price: $("#price").val(),
|
||||
quoteTimeBegin: $("#worldId").val(),
|
||||
},
|
||||
page : {
|
||||
curr : 1
|
||||
}
|
||||
});
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
<script src="${pageContext.request.contextPath}/static/js/dateUtil.js" charset="utf-8"></script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,98 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加角色</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<link rel="stylesheet" href="${path}/static/css/formSelects-v4.css">
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addRole"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">角色名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="roleName" lay-verify="roleName"
|
||||
placeholder="请输入角色名称" class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">角色说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="47" name="remark" id="remark" placeholder="请输入角色说明"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">是否可注册</label>
|
||||
<div class="layui-input-block" id="idSuper">
|
||||
<input type="radio" name="isRegist" value="1" title="是" checked="">
|
||||
<input type="radio" name="isRegist" value="0" title="否">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'form', 'layer' ],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
//自定义验证规则
|
||||
form.verify({
|
||||
roleName : function(value, item) { //value:表单的值、item:表单的DOM对象
|
||||
if(!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(value)){
|
||||
return '角色名称不能有特殊字符';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addRole',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("roleTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
} else {
|
||||
layer.msg('录入失败!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,99 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title></title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<link rel="stylesheet" href="${path}/static/css/metroStyle/metroStyle.css">
|
||||
<script src="${path}/static/js/jquery.ztree.all.min.js"></script>
|
||||
</head>
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增角色</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="barDemo">
|
||||
<a class="layui-btn layui-btn-xs" lay-event="edit"><i class="layui-icon layui-icon-edit"style="color:white;font-size:20px"></i>编辑</a>
|
||||
<a class="layui-btn layui-btn-normal layui-btn-xs" lay-event="editPer"><i class="layui-icon layui-icon-auz"style="color:white;font-size:20px"></i>修改权限</a>
|
||||
</script>
|
||||
<script type="text/html" id="statusTpl">
|
||||
<input type="checkbox" name="isRegist" value="{{d.roleId}}" lay-skin="switch" lay-text="是|否" lay-filter="statusDemo" {{ d.isRegist == '1'? 'checked' : '' }}>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">角色名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="roleName" name="roleName" placeholder="请输入角色名称"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<div class="layui-fluid">
|
||||
<div class="layui-row">
|
||||
<table class="layui-hide" id="roleTable"lay-data="roleTable" lay-filter="roleTable"></table>
|
||||
<div class="layui-col-md12" id="editPers" style="display:none;">
|
||||
<h3>角色权限</h3>
|
||||
<hr>
|
||||
<ul id="treeDemo" class="ztree"></ul>
|
||||
<hr>
|
||||
<button onclick="assignPers();" class="layui-btn layui-btn-fluid">授权</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
var zTreeObj;
|
||||
// zTree 的参数配置,深入使用请参考 API 文档(setting 配置详解)
|
||||
var setting = {
|
||||
check : {
|
||||
enable: true,
|
||||
chkStyle: "checkbox"
|
||||
},
|
||||
data: {
|
||||
key: {
|
||||
name: "perName"
|
||||
}
|
||||
}
|
||||
};
|
||||
$.get('${path}/sysPermission/parentList',function (zNodes) {
|
||||
// zTree 的数据属性,深入使用请参考 API 文档(zTreeNode 节点数据详解)
|
||||
zTreeObj = $.fn.zTree.init($("#treeDemo"), setting, zNodes);
|
||||
})
|
||||
//给用户授权
|
||||
var roleId ;
|
||||
function assignPers(){
|
||||
//获取选中用户的权限编号
|
||||
var nodes = zTreeObj.getCheckedNodes(true);
|
||||
var str = "";
|
||||
$.each(nodes,function(){
|
||||
str += this.perId +",";
|
||||
});
|
||||
str = str.substring(0,str.length - 1);
|
||||
//发送请求,改变用户权限
|
||||
$.post("${path}/assignPers",{
|
||||
roleId :roleId,
|
||||
persIds:str
|
||||
},function(){
|
||||
layer.msg('授权成功~',{icon:1});
|
||||
});
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
<script src="${path}/js/role.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
@@ -0,0 +1,79 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<title>修改用户</title>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<input type="hidden" name="roleId" id="roleId">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">角色名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="roleName" id="roleName" placeholder="角色名称"
|
||||
class="layui-input" autocomplete="off">
|
||||
</div>
|
||||
<!-- <div class="layui-form-mid layui-word-aux">不可修改</div> -->
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">说明</label>
|
||||
<div class="layui-input-inline">
|
||||
<textarea rows="5" cols="20" name="remark" id="remark" placeholder="角色说明" autocomplete="off"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- <div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block" >
|
||||
<input type="radio" name="isRegist" class="isRegist" value="1" title="启用" >
|
||||
<input type="radio" name="isRegist" class="isRegist" value="0" title="禁用">
|
||||
</div>
|
||||
</div> -->
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认修改</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script type="text/javascript">
|
||||
layui.use([ 'table', 'laydate', 'form','layer'], function() {
|
||||
var $ = layui.jquery;
|
||||
var table = layui.table;
|
||||
var laydate = layui.laydate;
|
||||
var form = layui.form;
|
||||
var layer = layui.layer;
|
||||
form.on('submit(enadd)',function(data){
|
||||
$.ajax({
|
||||
url:'${pageContext.request.contextPath}/updateRole',
|
||||
dataType : 'json',
|
||||
data:$(data.form).serialize(),
|
||||
type : 'post',
|
||||
success:function(data){
|
||||
if (data.code == 200) {
|
||||
layer.msg('修改成功!',{icon:6,offset:"auto",time:2000});//提示框
|
||||
}else {
|
||||
layer.msg('修改失败!',{icon:5,offset:"auto",time:2000});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("roleTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,105 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>添加关键字</title>
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style>
|
||||
.layui-input,.layui-input-inline{
|
||||
width:350px
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div class="layui-input-block layui-form" lay-filter="addUser"
|
||||
style="margin-top: 30px">
|
||||
<form class="layui-form " action="">
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">产品名称</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="proTypeLabel" lay-verify="proTypeLabel"
|
||||
placeholder="请输入产品名称" class="layui-input" id="proTypeLabel">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">菜单URL</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="url" placeholder="请输入菜单URL" class="layui-input" id="url">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">关键字</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" name="likeProTypeLabel" placeholder="请输入关键字"
|
||||
class="layui-input" id="likeProTypeLabel">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label">状态</label>
|
||||
<div class="layui-input-block">
|
||||
<input type="radio" name="status" value="1" title="启用" checked="">
|
||||
<input type="radio" name="status" value="0" title="禁用">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-input-block">
|
||||
<button class="layui-btn" lay-submit="" lay-filter="enadd">确认添加</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<script>
|
||||
layui.use([ 'form', 'layer' ],function() {
|
||||
var $ = layui.$,
|
||||
form = layui.form,
|
||||
layer = layui.layer;
|
||||
|
||||
//自定义验证规则
|
||||
form.verify({
|
||||
proTypeLabel : function(value, item) { //value:表单的值、item:表单的DOM对象
|
||||
if(!new RegExp("^[a-zA-Z0-9_\u4e00-\u9fa5\\s·]+$").test(value)){
|
||||
return '种类不能有特殊字符';
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
//监听提交
|
||||
form.on('submit(enadd)', function(data) {
|
||||
$.ajax({
|
||||
url : '${path}/addSearchPro',
|
||||
dataType : 'json',
|
||||
data : $(data.form).serialize(),
|
||||
type : 'post',
|
||||
success : function(data) {
|
||||
if (data.code == 200) {
|
||||
layer.msg('录入成功!', {
|
||||
icon : 6,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
} else {
|
||||
layer.msg('录入失败!', {
|
||||
icon : 5,
|
||||
offset : "auto",
|
||||
time : 2000
|
||||
});//提示框
|
||||
}
|
||||
setTimeout(function(){
|
||||
var index = parent.layer.getFrameIndex(window.name);//获取窗口索引
|
||||
parent.layer.close(index);//关闭弹出层
|
||||
parent.layui.table.reload("searchTableAll"); //重新加载页面表格
|
||||
}, 2100);
|
||||
}
|
||||
})
|
||||
return false;
|
||||
});
|
||||
})
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
@@ -0,0 +1,59 @@
|
||||
<%@ page language="java" contentType="text/html; charset=UTF-8"
|
||||
pageEncoding="UTF-8"%>
|
||||
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<%@include file="/views/common.jsp"%>
|
||||
<style type="text/css">
|
||||
.layui-table-cell{
|
||||
height:32px;
|
||||
line-height:32px;
|
||||
}
|
||||
.layui-table td, .layui-table th,.layui-table-header, .layui-table-page,.layui-table-tool, .layui-table-total, .layui-table-view{
|
||||
border-color:#6666;
|
||||
font-size:16px;
|
||||
}
|
||||
.ztree *{
|
||||
font-size: 20px;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<script type="text/html" id="toolbarDemo">
|
||||
<div class="layui-btn-container demoTable">
|
||||
<button class="layui-btn layui-btn-sm" lay-event="add" ><i class="layui-icon layui-icon-add-circle-fine" style="font-size:20px;font-weight:bold"></i> 新增关键字</button>
|
||||
</div>
|
||||
</script>
|
||||
<script type="text/html" id="statusTpl">
|
||||
<input type="checkbox" name="status" value="{{d.id}}" lay-skin="switch" lay-text="启用|禁用" lay-filter="statusDemo" {{ d.status == '1'? 'checked' : '' }}>
|
||||
</script>
|
||||
<body>
|
||||
<br>
|
||||
<form class="layui-form" action="">
|
||||
<div class="layui-inline">
|
||||
<label class="layui-form-label">产品类型</label>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="proTypeLabel" name="proTypeLabel" placeholder="请输入产品种类"
|
||||
autocomplete="off" class="layui-input">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<div class="layui-input-inline">
|
||||
<button class="layui-btn" id="searchBtn" lay-submit
|
||||
lay-filter="formDemo" style="margin-left: 15px">
|
||||
<i class="layui-icon layui-icon-search"></i> 查询
|
||||
</button>
|
||||
<button type="reset" class="layui-btn layui-btn-primary">重置</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<table class="layui-hide" id="searchTable"lay-data="searchTable" lay-filter="searchTable"></table>
|
||||
<script type="text/javascript">
|
||||
</script>
|
||||
<script src="${path}/js/searchPro.js" charset="utf-8"></script>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user