first commit
This commit is contained in:
+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>
|
||||
Reference in New Issue
Block a user