Commit 2df84d67 authored by 谢希宇's avatar 谢希宇

create by Strive

create date 2021/01/27
1、检测券管理,赠券信息,检测结果建模
2、二维码生成工具;
3、检测券表单;
4、聊天记录模块;
parent 24a7e812
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base href="#springUrl('/assets/adminlte/')"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>工作台</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="plugins/ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="plugins/iCheck/flat/blue.css">
<!-- Date Picker -->
<link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="plugins/daterangepicker/daterangepicker-bs3.css">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<!--validate css-->
<link rel="stylesheet" href="plugins/jquery-validation/css/validate.css">
<!--fileinput css-->
<link rel="stylesheet" href="plugins/bootstrap-fileinput/bootstrap-fileinput.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<!-- END HEAD -->
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<div class="content-wrapper" style="margin-left:0;">
<section class="content-header">
<h1>
检测券管理管理
<small>检测券管理</small>
</h1>
<ol class="breadcrumb">
<li><a href="#"><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">检测券管理</a></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<!-- general form elements disabled -->
<div class="box box-primary">
<form role="form" id="myForm">
<input name="id" value="$!{data.id}" hidden="true"/>
<div class="box-body">
<div class="panel panel-primary">
<div class="panel-heading">基础信息</div>
<div class="panel-body">
<div class="form-group form-md-line-input col-xs-12">
<label for="name">检测券名称</label>
<input type="text"
class="form-control"
id="name" name="name"
placeholder="检测券名称"
value="$!{data.name}"
#if($!{pageType}== 'View') readonly="readonly" #end />
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="takeEffectYear">生效年</label>
<select class="form-control" name="takeEffectYear" id="takeEffectYear"
#if($!{pageType}== 'View') disabled="disabled" #end>
<option value="">请选择</option>
<option value="1" #if($!{data.takeEffectYear}==
'1') selected="selected" #end>1</option>
<option value="2" #if($!{data.takeEffectYear}==
'2') selected="selected" #end>2</option>
<option value="3" #if($!{data.takeEffectYear}==
'3') selected="selected" #end>3</option>
</select>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="takeEffectMonth">生效月</label>
<select class="form-control select2" name="takeEffectMonth"
id="takeEffectMonth" #if($!{pageType}== 'View') disabled="disabled"
#end>
<option value="">请选择</option>
<option value="1" #if($!{data.takeEffectMonth}==
'1') selected="selected" #end>1</option>
<option value="2" #if($!{data.takeEffectMonth}==
'2') selected="selected" #end>2</option>
<option value="3" #if($!{data.takeEffectMonth}==
'3') selected="selected" #end>3</option>
<option value="4" #if($!{data.takeEffectMonth}==
'4') selected="selected" #end>4</option>
<option value="5" #if($!{data.takeEffectMonth}==
'5') selected="selected" #end>5</option>
<option value="6" #if($!{data.takeEffectMonth}==
'6') selected="selected" #end>6</option>
<option value="7" #if($!{data.takeEffectMonth}==
'7') selected="selected" #end>7</option>
<option value="8" #if($!{data.takeEffectMonth}==
'8') selected="selected" #end>8</option>
<option value="9" #if($!{data.takeEffectMonth}==
'9') selected="selected" #end>9</option>
<option value="10" #if($!{data.takeEffectMonth}==
'10') selected="selected" #end>10</option>
<option value="11" #if($!{data.takeEffectMonth}==
'11') selected="selected" #end>11</option>
<option value="12" #if($!{data.takeEffectMonth}==
'12') selected="selected" #end>12</option>
</select>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="expireMonth">过期月</label>
<select class="form-control select2" name="expireMonth" id="expireMonth"
#if($!{pageType}== 'View') disabled="disabled" #end>
<option value="">请选择</option>
<option value="1" #if($!{data.expireMonth}==
'1') selected="selected" #end>1</option>
<option value="2" #if($!{data.expireMonth}==
'2') selected="selected" #end>2</option>
<option value="3" #if($!{data.expireMonth}==
'3') selected="selected" #end>3</option>
<option value="4" #if($!{data.expireMonth}==
'4') selected="selected" #end>4</option>
<option value="5" #if($!{data.expireMonth}==
'5') selected="selected" #end>5</option>
<option value="6" #if($!{data.expireMonth}==
'6') selected="selected" #end>6</option>
<option value="7" #if($!{data.expireMonth}==
'7') selected="selected" #end>7</option>
<option value="8" #if($!{data.expireMonth}==
'8') selected="selected" #end>8</option>
<option value="9" #if($!{data.expireMonth}==
'9') selected="selected" #end>9</option>
<option value="10" #if($!{data.expireMonth}==
'10') selected="selected" #end>10</option>
<option value="11" #if($!{data.expireMonth}==
'11') selected="selected" #end>11</option>
<option value="12" #if($!{data.expireMonth}==
'12') selected="selected" #end>12</option>
</select>
</div>
<div class="form-group form-md-line-input col-xs-6">
<label for="type">检测券类型</label>
<select class="form-control select2" name="type" id="type"
#if($!{pageType}== 'View') disabled="disabled" #end>
<option value="">请选择</option>
<option value="1" #if($!{data.type}==
'1') selected="selected" #end>第一张</option>
<option value="2" #if($!{data.type}==
'2') selected="selected" #end>第二张</option>
</select>
</div>
<br/>
<div class="form-group form-md-line-input col-xs-12">
<label for="remarks">描述</label>
<textarea class="form-control" rows="3" id="remarks" name="remarks"
#if($!{pageType}== 'View') readonly="readonly"
#end>$!{data.instructions}</textarea>
</div>
<br/>
<div class="form-group form-md-line-input col-xs-12">
<label for="instructions">使用说明</label>
<textarea class="form-control" rows="3" id="instructions"
name="instructions" #if($!{pageType}== 'View') readonly="readonly"
#end>$!{data.instructions}</textarea>
</div>
</div>
</div>
</div>
<div class="box-footer">
#if($shiro.hasPermission("qy:checkcoupon:edit"))
<input class="btn btn-primary" id="save" value="保存" type="submit">
#end
<a href="#springUrl('/a/checkcoupon/list')" class="btn btn-default">取消</a>
</div>
</form>
<!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/extensions/i18n/lanauage_ch.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<!-- FastClick -->
<script src="plugins/fastclick/fastclick.min.js"></script>
<!--fileinput js-->
<script src="plugins/bootstrap-fileinput/bootstrap-fileinput.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<script src="plugins/bootstrap-maxlength/bootstrap-maxlength.min.js" type="text/javascript"></script>
<script src="plugins/security/sha256.js" type="text/javascript"></script>
<script src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<script src="js/jquery.form.min.js"></script>
<script type="text/javascript" charset="utf-8" src="plugins/ueditor-min-1.4.3/ueditor.config.js"></script>
<script type="text/javascript" charset="utf-8" src="plugins/ueditor-min-1.4.3/ueditor.all.js"></script>
<script type="text/javascript" charset="utf-8" src="plugins/ueditor-min-1.4.3/lang/zh-cn/zh-cn.js"></script>
<script src="common/js/cfapp.js"></script>
<!-- END PAGE LEVEL PLUGINS -->
<script>
$().ready(function () {
Cfapp.init();
recdTypeAdd.init();
});
var recdTypeAdd = function () {
var initForm = function () {
var initFormCtrl = function () {
bindEvent();
};
var bindEvent = function () {
$("#myForm").validate({
rules: {},
messages: {},
submitHandler: function (form) {
$("#save").attr("disabled", true);
$.getJSON("#springUrl('/a/checkcoupon/formData')", $("#myForm").serialize(), function (returnobj) {
$("#save").attr("disabled", false);
if (returnobj.errorNo == 2) { //保存成功
Cfapp.confirm({
message: "添加成功",
btnoktext: "继续添加",
btncanceltext: "关闭",
success: function () {
location.href = "#springUrl('/a/checkcoupon/form')";
},
cancel: function () {
location.href = "#springUrl('/a/checkcoupon/list')";
}
});
} else if (returnobj.errorNo == 0) { //修改成功
Cfapp.alert({
message: "更新成功",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/checkcoupon/list')";
}
});
} else if (returnobj.errorNo == 3) {
Cfapp.alert({
message: "保存失败:" + returnobj.errorMsg,
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/checkcoupon/list')";
}
});
} else {
Cfapp.alert({
message: "创建失败",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/checkcoupon/list')";
}
});
}
});
}
})
}
initFormCtrl();
}
return {
//main function to initiate the module
init: function () {
initForm();
}
};
}();
</script>
</body>
<!-- END BODY -->
</html>
\ No newline at end of file
<!DOCTYPE html>
<!--[if IE 8]>
<html lang="en" class="ie8 no-js"> <![endif]-->
<!--[if IE 9]>
<html lang="en" class="ie9 no-js"> <![endif]-->
<!--[if !IE]><!-->
<html>
<!--<![endif]-->
<!-- BEGIN HEAD -->
<head>
<base href="#springUrl('/assets/adminlte/')"/>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>工作台</title>
<!-- Tell the browser to be responsive to screen width -->
<meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
<!-- Bootstrap 3.3.5 -->
<link rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- Font Awesome -->
<link rel="stylesheet" href="plugins/font-awesome/css/font-awesome.min.css">
<!-- Ionicons -->
<link rel="stylesheet" href="plugins/ionicons/css/ionicons.min.css">
<!-- DataTables -->
<link rel="stylesheet" href="plugins/datatables/dataTables.bootstrap.css">
<!-- Theme style -->
<link rel="stylesheet" href="dist/css/AdminLTE.min.css">
<!-- AdminLTE Skins. Choose a skin from the css/skins
folder instead of downloading all of them to reduce the load. -->
<link rel="stylesheet" href="dist/css/skins/_all-skins.min.css">
<!-- iCheck -->
<link rel="stylesheet" href="plugins/iCheck/flat/blue.css">
<!-- Morris chart -->
<link rel="stylesheet" href="plugins/morris/morris.css">
<!-- jvectormap -->
<link rel="stylesheet" href="plugins/jvectormap/jquery-jvectormap-1.2.2.css">
<!-- Date Picker -->
<link rel="stylesheet" href="plugins/datepicker/datepicker3.css">
<!-- Daterange picker -->
<link rel="stylesheet" href="plugins/daterangepicker/daterangepicker-bs3.css">
<link rel="stylesheet"
href="plugins\bootstrap-fileinput\fileinput.min.css">
<!-- bootstrap wysihtml5 - text editor -->
<link rel="stylesheet" href="plugins/bootstrap-wysihtml5/bootstrap3-wysihtml5.min.css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
<!--[if lt IE 9]>
<script src="https://oss.maxcdn.com/html5shiv/3.7.3/html5shiv.min.js"></script>
<script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script>
<![endif]-->
</head>
<body class="hold-transition skin-blue sidebar-mini">
<div class="wrapper">
<div class="content-wrapper" style="margin-left:0;">
<div id="importExcelDiv"></div>
<section class="content-header">
<h1>
检测券管理管理
<small>检测券管理</small>
</h1>
<ol class="breadcrumb">
<li><a><i class="fa fa-dashboard"></i>首页</a></li>
<li><a class="active">检测券管理管理列表</a></li>
</ol>
</section>
<!-- Main content -->
<section class="content">
<div class="row">
<div class="col-xs-12">
<div class="box">
<div class="box-header">
<form id="seachTableForm" action="#springUrl('/a/checkcoupon/list')" method="get">
<div class="col-xs-2">
<input type="text" class="form-control"
name="name" placeholder="检测券名称">
</div>
<div class="col-xs-2">
<button type="button" class="search btn btn-primary">搜索</button>
#if($shiro.hasPermission("qy:checkcoupon:edit"))
<a href="#springUrl('/a/checkcoupon/form')" class="btn btn-primary">新增</a>
<!-- <a href="#springUrl('/a/checkcoupon/exportExcel')" class="btn btn-primary">导出</a>-->
<!-- <a onclick="importExcel();" class="btn btn-primary">导入</a>-->
#end
</div>
</form>
</div><!-- /.box-header -->
<div class="box-body">
<table id="table" class="table table-bordered table-striped">
<thead>
<tr>
<td hidden="true">Id</td>
<th>检测券名称</th>
<th>生效年</th>
<th>生效月</th>
<th>过期月</th>
<th>检测券类型</th>
<th>描述</th>
<th>使用说明</th>
<th>创建时间</th>
<th>操作</th>
</tr>
</thead>
<tbody id="tablebody">
</tbody>
</table>
</div><!-- /.box-body -->
</div><!-- /.box -->
</div><!-- /.col -->
</div><!-- /.row -->
</section><!-- /.content -->
</div><!-- /.content-wrapper -->
<!-- Add the sidebar's background. This div must be placed
immediately after the control sidebar -->
<div class="control-sidebar-bg"></div>
</div><!-- ./wrapper -->
<!-- jQuery 2.1.4 -->
<script src="plugins/jQuery/jQuery-2.1.4.min.js"></script>
<!-- Bootstrap 3.3.5 -->
<script src="bootstrap/js/bootstrap.min.js"></script>
<!-- DataTables -->
<script src="plugins/datatables/jquery.dataTables.min.js"></script>
<script src="plugins/datatables/extensions/i18n/lanauage_ch.js"></script>
<script src="plugins/datatables/dataTables.bootstrap.min.js"></script>
<!-- SlimScroll -->
<script src="plugins/slimScroll/jquery.slimscroll.min.js"></script>
<script src="plugins/datepicker/bootstrap-datepicker.js"></script>
<script src="plugins/datepicker/locales/bootstrap-datepicker.zh-CN.js"></script>
<!-- FastClick -->
<script src="plugins/fastclick/fastclick.min.js"></script>
<!--fileinput js-->
<script src="plugins\bootstrap-fileinput\fileinput.js"></script>
<script src="plugins/bootstrap-fileinput/zh.js"></script>
<script src="plugins/bootstrap-fileinput/zh2.js"></script>
<!-- AdminLTE App -->
<script src="dist/js/app.min.js"></script>
<script type="text/javascript"
src="plugins/jquery-validation/js/jquery.validate.min.js"></script>
<!-- AdminLTE for demo purposes -->
<script src="common/js/cfapp.js"></script>
<script>
function formatDates(now) {
var now = new Date(now);
var year = now.getFullYear();
var month = now.getMonth() + 1;
var date = now.getDate();
var hour = now.getHours();
var minute = now.getMinutes();
var second = now.getSeconds();
return year + "-" + month + "-" + date + " " + hour + ":"
+ minute + ":" + second;
}
function seachTable() {
var sSource = "#springUrl('/a/checkcoupon/listData')";
var aoData = {
iDisplayStart: 1,
iDosplayLength: 10
}
var retrieveData = function (sSource, aoData, fnCallback) {
$("#seachTableForm input").each(function () {
var params = {
name: $(this).attr("name"),
value: $(this).val()
};
aoData.push(params);
})
$.ajax({
"type": "GET",
"url": sSource,
"dataType": "json",
"data": aoData, //以json格式传递
"success": fnCallback
});
};
$('#table').DataTable({
"lengthChange": false,
"searching": false,
"ordering": false,
"bFiltered": false,
"bStateSave": true, // save datatable state(pagination, sort, etc) in cookie.
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": sSource,
"fnServerData": retrieveData,
"pagingType": "full_numbers",
"aoColumns": [
{
"mData": "id"
},
{
"mData": "name"
},
{
"mData": "takeEffectYear"
},
{
"mData": "takeEffectMonth"
},
{
"mData": "expireMonth"
},
{
"mData": "type"
},
{
"mData": "remarks"
},
{
"mData": "instructions"
},
{
"mData": "createTime"
},
{
"mData": "id"
}],
"aoColumnDefs": [
{ // set default column settings
'visible': false,
'targets': [0]
},
{
"aTargets": [5],
"mData": "type",
"mRender": function (a, b, c, d) {
if (a == '1') {
return '第一张';
} else if (a == '2') {
return '第二张';
} else {
return '';
}
}
},
{
"aTargets": [8],
"mData": "createTime",
"mRender": function (a, b, c, d) {
return formatDates(a, "yyyy-MM-dd HH:mm:ss");
}
},
{
"aTargets": [9],
"mData": "id",
"mRender": function (a, b, c, d) {
let html = '';
html += '<div class="btn-group">' +
'<button type="button" class="btn btn-success btn-flat dropdown-toggle" data-toggle="dropdown">' +
' <span class="caret"></span>' +
' <span class="sr-only">Toggle Dropdown</span>' +
'</button>' +
'<ul class="dropdown-menu" role="menu" style="min-width: 100px;">';
html += '<li>#if($shiro.hasPermission("qy:checkcoupon:view"))<a href="#springUrl("/a/checkcoupon/form?pageType=View&id=' + a + '")" class="btn green">查看</a>#end</li>';
html += '<li>#if($shiro.hasPermission("qy:checkcoupon:edit"))<a href="#springUrl("/a/checkcoupon/form?pageType=Edit&id=' + a + '")" class="btn green">修改</a>#end</li>';
html += '</ul></div>';
return html;
}
}
]
});
}
jQuery(document).ready(function () {
seachTable();
$('.datepicker').datepicker({
show: true,
format: 'yyyy-mm-dd',
autoclose: true,
language: 'zh-CN',
todayBtn: 'linked',
clearBtn: 'linked'
});
$('.search').click(function () {
$("#table").dataTable().fnClearTable();
});
});
Cfapp.init();
function removeData(data) {
Cfapp.confirm({
message: "确定要删除吗",
btnoktext: "确定",
btncanceltext: "取消",
success: function () {
$.ajax({
type: "POST",
url: "#springUrl('/a/checkcoupon/delete')",
data: {id: data},
dataType: "json",
success: function (data) {
if (data.errorNo == 0) {
Cfapp.alert({
message: "删除成功",
btntext: "确定",
success: function () {
location.href = "#springUrl('/a/checkcoupon/list')";
}
});
}
},
error: function () {
}
})
},
cancel: function () {
$(".modal-backdrop").fadeOut();
}
});
}
function importExcel() {
var templateExcelUrl = "#springUrl('/a/checkcoupon/templateExcel')";
var importExcelUrl = "#springUrl('/a/checkcoupon/importExcel')";
Cfapp.importExcel({
title: '检测券管理导入',
importurl: importExcelUrl,
templateurl: templateExcelUrl,
cancel: function () {
},
success: function () {
}
});
}
</script>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment