1优化:办公审批、日常办公各个数据列表时间区间的筛选操作
2修复:办公审批中待我审批,我已审批的列表数据读取错误的问题
This commit is contained in:
parent
55f2421462
commit
6f52406408
@ -96,12 +96,11 @@ class Approve extends BaseController
|
|||||||
$map2[] = ['f.admin_id', '=', $param['uid']];
|
$map2[] = ['f.admin_id', '=', $param['uid']];
|
||||||
}
|
}
|
||||||
//按时间检索
|
//按时间检索
|
||||||
$start_time = isset($param['start_time']) ? strtotime($param['start_time']) : 0;
|
if (!empty($param['apply_time'])) {
|
||||||
$end_time = isset($param['end_time']) ? strtotime($param['end_time']) : 0;
|
$apply_time =explode('~', $param['apply_time']);
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
$map1[] = ['f.create_time', 'between', [strtotime(urldecode($apply_time[0])),strtotime(urldecode($apply_time[1]))]];
|
||||||
$map1[] = ['f.create_time', 'between', [$start_time, $end_time]];
|
$map2[] = ['f.create_time', 'between', [strtotime(urldecode($apply_time[0])),strtotime(urldecode($apply_time[1]))]];
|
||||||
$map2[] = ['f.create_time', 'between', [$start_time, $end_time]];
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
|
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
|
||||||
|
|
||||||
@ -193,11 +192,10 @@ class Approve extends BaseController
|
|||||||
$map[] = ['f.admin_id', '=', $param['uid']];
|
$map[] = ['f.admin_id', '=', $param['uid']];
|
||||||
}
|
}
|
||||||
//按时间检索
|
//按时间检索
|
||||||
$start_time = isset($param['start_time']) ? strtotime($param['start_time']) : 0;
|
if (!empty($param['apply_time'])) {
|
||||||
$end_time = isset($param['end_time']) ? strtotime($param['end_time']) : 0;
|
$apply_time =explode('~', $param['apply_time']);
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
$map[] = ['f.create_time', 'between', [strtotime(urldecode($apply_time[0])),strtotime(urldecode($apply_time[1]))]];
|
||||||
$map[] = ['f.create_time', 'between', [$start_time, $end_time]];
|
}
|
||||||
}
|
|
||||||
|
|
||||||
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
|
$rows = empty($param['limit']) ? get_config('app.page_size') : $param['limit'];
|
||||||
$list = Db::name('Approve')
|
$list = Db::name('Approve')
|
||||||
|
@ -20,13 +20,12 @@ class Plan extends BaseController
|
|||||||
function index() {
|
function index() {
|
||||||
if (request()->isAjax()) {
|
if (request()->isAjax()) {
|
||||||
$param = get_params();
|
$param = get_params();
|
||||||
//按时间检索
|
//按时间检索
|
||||||
$start_time = isset($param['start_time']) ? strtotime($param['start_time']) : 0;
|
if (!empty($param['diff_time'])) {
|
||||||
$end_time = isset($param['end_time']) ? strtotime($param['end_time']) : 0;
|
$diff_time =explode('~', $param['diff_time']);
|
||||||
$where = [];
|
$where[] = ['a.start_time', 'between', [strtotime(urldecode($diff_time[0])),strtotime(urldecode($diff_time[1]))]];
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
|
||||||
$where[] = ['a.start_time', 'between', [$start_time, $end_time]];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!empty($param['keywords'])) {
|
if (!empty($param['keywords'])) {
|
||||||
$where[] = ['a.title', 'like', '%' . trim($param['keywords']) . '%'];
|
$where[] = ['a.title', 'like', '%' . trim($param['keywords']) . '%'];
|
||||||
}
|
}
|
||||||
|
@ -20,9 +20,6 @@ class Schedule extends BaseController
|
|||||||
function index() {
|
function index() {
|
||||||
if (request()->isAjax()) {
|
if (request()->isAjax()) {
|
||||||
$param = get_params();
|
$param = get_params();
|
||||||
//按时间检索
|
|
||||||
$start_time = isset($param['start_time']) ? strtotime($param['start_time']) : 0;
|
|
||||||
$end_time = isset($param['end_time']) ? strtotime($param['end_time']) : 0;
|
|
||||||
$tid = isset($param['tid']) ? $param['tid'] : 0;
|
$tid = isset($param['tid']) ? $param['tid'] : 0;
|
||||||
$where = [];
|
$where = [];
|
||||||
if ($tid>0) {
|
if ($tid>0) {
|
||||||
@ -38,8 +35,10 @@ class Schedule extends BaseController
|
|||||||
if (!empty($param['keywords'])) {
|
if (!empty($param['keywords'])) {
|
||||||
$where[] = ['a.title', 'like', '%' . trim($param['keywords']) . '%'];
|
$where[] = ['a.title', 'like', '%' . trim($param['keywords']) . '%'];
|
||||||
}
|
}
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
//按时间检索
|
||||||
$where[] = ['a.start_time', 'between', [$start_time, $end_time]];
|
if (!empty($param['diff_time'])) {
|
||||||
|
$diff_time =explode('~', $param['diff_time']);
|
||||||
|
$where[] = ['a.start_time', 'between', [strtotime(urldecode($diff_time[0])),strtotime(urldecode($diff_time[1]))]];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
$where[] = ['a.delete_time', '=', 0];
|
$where[] = ['a.delete_time', '=', 0];
|
||||||
|
@ -64,10 +64,9 @@ class Work extends BaseController
|
|||||||
$map[] = ['type', '=', $param['type']];
|
$map[] = ['type', '=', $param['type']];
|
||||||
}
|
}
|
||||||
//按时间检索
|
//按时间检索
|
||||||
$start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0;
|
if (!empty($param['diff_time'])) {
|
||||||
$end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'].' 23:59:59')) : 0;
|
$diff_time =explode('~', $param['diff_time']);
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
$map[] = ['create_time', 'between', [strtotime(urldecode($diff_time[0])),strtotime(urldecode($diff_time[1]))]];
|
||||||
$map[] = ['create_time', 'between', "$start_time,$end_time"];
|
|
||||||
}
|
}
|
||||||
$map[] = ['admin_id', '=', $this->uid];
|
$map[] = ['admin_id', '=', $this->uid];
|
||||||
$map[] = ['status', '=', 1];
|
$map[] = ['status', '=', 1];
|
||||||
@ -87,10 +86,9 @@ class Work extends BaseController
|
|||||||
$map[] = ['a.to_uid', '=', $this->uid];
|
$map[] = ['a.to_uid', '=', $this->uid];
|
||||||
$map[] = ['a.status', '=', 1];
|
$map[] = ['a.status', '=', 1];
|
||||||
//按时间检索
|
//按时间检索
|
||||||
$start_time = isset($param['start_time']) ? strtotime(urldecode($param['start_time'])) : 0;
|
if (!empty($param['diff_time1'])) {
|
||||||
$end_time = isset($param['end_time']) ? strtotime(urldecode($param['end_time'].' 23:59:59')) : 0;
|
$diff_time =explode('~', $param['diff_time1']);
|
||||||
if ($start_time > 0 && $end_time > 0) {
|
$map[] = ['send_time', 'between', [strtotime(urldecode($diff_time[0])),strtotime(urldecode($diff_time[1]))]];
|
||||||
$map[] = ['a.send_time', 'between', "$start_time,$end_time"];
|
|
||||||
}
|
}
|
||||||
$list = $this->getList($map, $param);
|
$list = $this->getList($map, $param);
|
||||||
}
|
}
|
||||||
|
@ -15,14 +15,8 @@
|
|||||||
<input type="text" name="username" placeholder="选择申请人" class="layui-input picker-one" readonly>
|
<input type="text" name="username" placeholder="选择申请人" class="layui-input picker-one" readonly>
|
||||||
<input type="text" name="uid" value="" style="display:none" />
|
<input type="text" name="uid" value="" style="display:none" />
|
||||||
</div>
|
</div>
|
||||||
<div id="barDate" class="layui-input-inline">
|
<div class="layui-input-inline" style="width:300px;">
|
||||||
<div class="layui-input-inline" style="width:120px; margin-bottom:0">
|
<input type="text" class="layui-input" id="apply_time" placeholder="申请时间区间" readonly name="apply_time">
|
||||||
<input type="text" class="layui-input" id="start_time" placeholder="申请时间区间" readonly name="start_time">
|
|
||||||
</div>
|
|
||||||
~
|
|
||||||
<div class="layui-input-inline" style="width:120px; margin-bottom:0">
|
|
||||||
<input type="text" class="layui-input" id="end_time" placeholder="申请时间区间" readonly name="end_time">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:150px;">
|
<div class="layui-input-inline" style="width:150px;">
|
||||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
|
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
|
||||||
@ -40,39 +34,26 @@
|
|||||||
<!-- 脚本 -->
|
<!-- 脚本 -->
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script>
|
<script>
|
||||||
const moduleInit = ['tool','employeepicker'];
|
const moduleInit = ['tool','employeepicker','laydatePlus'];
|
||||||
function gouguInit() {
|
function gouguInit() {
|
||||||
var form = layui.form,table = layui.table, tool = layui.tool ,element=layui.element,laydate = layui.laydate;
|
var form = layui.form,table = layui.table, tool = layui.tool ,element=layui.element,laydatePlus = layui.laydatePlus;
|
||||||
|
|
||||||
$('[lay-filter="clear"]').on('click',function(){
|
|
||||||
setTimeout(function(){
|
|
||||||
$('[lay-filter="webform"]').click();
|
|
||||||
},10)
|
|
||||||
});
|
|
||||||
|
|
||||||
//日期范围
|
//日期范围
|
||||||
laydate.render({
|
var apply_time = new laydatePlus({'target':'apply_time'});
|
||||||
elem: '#barDate',
|
|
||||||
range: ['#start_time', '#end_time'],
|
|
||||||
rangeLinked:true
|
|
||||||
});
|
|
||||||
|
|
||||||
//监听搜索提交
|
//监听搜索提交
|
||||||
form.on('submit(webform)', function(data) {
|
form.on('submit(webform)', function(data) {
|
||||||
layui.pageTable.reload({
|
layui.pageTable.reload({
|
||||||
where: {
|
where: data.field,
|
||||||
status: data.field.tab,
|
page: {curr: 1}
|
||||||
type: data.field.type,
|
|
||||||
start_time:data.field.start_time,
|
|
||||||
end_time:data.field.end_time,
|
|
||||||
uid: data.field.uid
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
curr: 1
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$('[lay-filter="clear"]').on('click',function(){
|
||||||
|
setTimeout(function(){
|
||||||
|
$('[lay-filter="webform"]').click();
|
||||||
|
},10)
|
||||||
|
});
|
||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
|
@ -23,15 +23,10 @@
|
|||||||
<div class="layui-input-inline" style="width:150px;">
|
<div class="layui-input-inline" style="width:150px;">
|
||||||
<input type="text" name="username" placeholder="选择申请人" class="layui-input picker-one" readonly>
|
<input type="text" name="username" placeholder="选择申请人" class="layui-input picker-one" readonly>
|
||||||
<input type="text" name="uid" value="" style="display:none" />
|
<input type="text" name="uid" value="" style="display:none" />
|
||||||
|
<input type="text" name="status" value="0" style="display:none" />
|
||||||
</div>
|
</div>
|
||||||
<div id="barDate" class="layui-input-inline">
|
<div class="layui-input-inline" style="width:300px;">
|
||||||
<div class="layui-input-inline" style="width:120px; margin-bottom:0">
|
<input type="text" class="layui-input" id="apply_time" placeholder="申请时间区间" readonly name="apply_time">
|
||||||
<input type="text" class="layui-input" id="start_time" placeholder="申请时间区间" readonly name="start_time">
|
|
||||||
</div>
|
|
||||||
~
|
|
||||||
<div class="layui-input-inline" style="width:120px; margin-bottom:0">
|
|
||||||
<input type="text" class="layui-input" id="end_time" placeholder="申请时间区间" readonly name="end_time">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:150px;">
|
<div class="layui-input-inline" style="width:150px;">
|
||||||
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
|
<button class="layui-btn layui-btn-normal" lay-submit="" lay-filter="webform"><i class="layui-icon layui-icon-search mr-1"></i>搜索</button>
|
||||||
@ -49,46 +44,33 @@
|
|||||||
<!-- 脚本 -->
|
<!-- 脚本 -->
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script>
|
<script>
|
||||||
const moduleInit = ['tool','employeepicker'];
|
const moduleInit = ['tool','employeepicker','laydatePlus'];
|
||||||
function gouguInit() {
|
function gouguInit() {
|
||||||
var form = layui.form,table = layui.table, tool = layui.tool ,element=layui.element,laydate = layui.laydate;
|
var form = layui.form,table = layui.table, tool = layui.tool ,element=layui.element,laydatePlus = layui.laydatePlus;
|
||||||
|
|
||||||
$('[lay-filter="clear"]').on('click',function(){
|
|
||||||
setTimeout(function(){
|
|
||||||
$('[lay-filter="webform"]').click();
|
|
||||||
},10)
|
|
||||||
});
|
|
||||||
|
|
||||||
//日期范围
|
//日期范围
|
||||||
laydate.render({
|
var apply_time = new laydatePlus({'target':'apply_time'});
|
||||||
elem: '#barDate',
|
|
||||||
range: ['#start_time', '#end_time'],
|
|
||||||
rangeLinked:true
|
|
||||||
});
|
|
||||||
|
|
||||||
element.on('tab(tab)', function(data){
|
element.on('tab(tab)', function(data){
|
||||||
$('[name="tab"]').val(data.index);
|
|
||||||
$("#barsearchform")[0].reset();
|
$("#barsearchform")[0].reset();
|
||||||
layui.pageTable.reload({where:{status:data.index},page:{curr:1}});
|
layui.pageTable.reload({where:{status:data.index},page:{curr:1}});
|
||||||
|
$('[name="status"]').val(data.index);
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
//监听搜索提交
|
//监听搜索提交
|
||||||
form.on('submit(webform)', function(data) {
|
form.on('submit(webform)', function(data) {
|
||||||
layui.pageTable.reload({
|
layui.pageTable.reload({
|
||||||
where: {
|
where: data.field,
|
||||||
status: data.field.tab,
|
page: {curr: 1}
|
||||||
type: data.field.type,
|
|
||||||
start_time:data.field.start_time,
|
|
||||||
end_time:data.field.end_time,
|
|
||||||
uid: data.field.uid
|
|
||||||
},
|
|
||||||
page: {
|
|
||||||
curr: 1
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
$('[lay-filter="clear"]').on('click',function(){
|
||||||
|
setTimeout(function(){
|
||||||
|
$('[lay-filter="webform"]').click();
|
||||||
|
},10)
|
||||||
|
});
|
||||||
|
|
||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
|
@ -8,17 +8,11 @@
|
|||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="p-3">
|
<div class="p-3">
|
||||||
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform">
|
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform">
|
||||||
<div id="barDate" class="layui-input-inline">
|
<div class="layui-input-inline" style="width:300px;">
|
||||||
<div class="layui-input-inline" style="width:110px; margin-bottom:0">
|
<input type="text" class="layui-input" id="diff_time" placeholder="日程时间范围" readonly name="diff_time">
|
||||||
<input type="text" class="layui-input" id="start_time" placeholder="选择时间区间" readonly name="start_time">
|
|
||||||
</div>
|
|
||||||
~
|
|
||||||
<div class="layui-input-inline" style="width:110px; margin-bottom:0;">
|
|
||||||
<input type="text" class="layui-input" id="end_time" placeholder="选择时间区间" readonly name="end_time">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:110px;">
|
<div class="layui-input-inline" style="width:110px;">
|
||||||
<input type="text" name="username" placeholder="请选择员工" class="layui-input" readonly data-event="select"/>
|
<input type="text" name="username" placeholder="请选择员工" class="layui-input picker-one" readonly />
|
||||||
<input type="text" name="uid" value="" style="display:none" />
|
<input type="text" name="uid" value="" style="display:none" />
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:220px;">
|
<div class="layui-input-inline" style="width:220px;">
|
||||||
@ -44,46 +38,25 @@
|
|||||||
<!-- 脚本 -->
|
<!-- 脚本 -->
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script>
|
<script>
|
||||||
const moduleInit = ['tool','employeepicker'];
|
const moduleInit = ['tool','employeepicker','laydatePlus'];
|
||||||
function gouguInit() {
|
function gouguInit() {
|
||||||
var form = layui.form,table = layui.table,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate,dropdown = layui.dropdown;
|
var form = layui.form,table = layui.table,tool=layui.tool,laydatePlus = layui.laydatePlus,laydate = layui.laydate,dropdown = layui.dropdown;
|
||||||
|
|
||||||
//日期范围
|
//日期范围
|
||||||
laydate.render({
|
var diff_time = new laydatePlus({'target':'diff_time'});
|
||||||
elem: '#barDate',
|
|
||||||
range: ['#start_time', '#end_time'],
|
|
||||||
rangeLinked:true
|
|
||||||
});
|
|
||||||
|
|
||||||
|
//监听搜索提交
|
||||||
|
form.on('submit(webform)', function(data) {
|
||||||
|
layui.pageTable.reload({
|
||||||
|
where: data.field,
|
||||||
|
page: {curr: 1}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
$('[lay-filter="clear"]').on('click',function(){
|
$('[lay-filter="clear"]').on('click',function(){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$('[lay-filter="webform"]').click();
|
$('[lay-filter="webform"]').click();
|
||||||
},10)
|
},10)
|
||||||
})
|
|
||||||
|
|
||||||
// 选择员工
|
|
||||||
$('body').on('click','[data-event="select"]',function(){
|
|
||||||
var that = $(this);
|
|
||||||
var names = that.val(), ids = $('[name="uid"]').val();
|
|
||||||
employeepicker.init({
|
|
||||||
ids: ids,
|
|
||||||
names: names,
|
|
||||||
type: 0,
|
|
||||||
department_url: "/api/index/get_department_tree",
|
|
||||||
employee_url: "/api/index/get_employee",
|
|
||||||
callback: function (ids, names, dids, departments) {
|
|
||||||
$('[name="uid"]').val(ids);
|
|
||||||
that.val(names);
|
|
||||||
$('[lay-filter="webform"]').click();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
//监听搜索提交
|
|
||||||
form.on('submit(webform)', function(data){
|
|
||||||
let f=data.field;
|
|
||||||
layui.pageTable.reload({where:{keywords:f.keywords,start_time:f.start_time,end_time:f.end_time,uid:f.uid},page:{curr:1}});
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
|
@ -8,17 +8,11 @@
|
|||||||
{block name="body"}
|
{block name="body"}
|
||||||
<div class="p-3">
|
<div class="p-3">
|
||||||
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform">
|
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform">
|
||||||
<div id="barDate" class="layui-input-inline">
|
<div class="layui-input-inline" style="width:300px;">
|
||||||
<div class="layui-input-inline" style="width:110px; margin-bottom:0">
|
<input type="text" class="layui-input" id="diff_time" placeholder="工作时间范围" readonly name="diff_time">
|
||||||
<input type="text" class="layui-input" id="start_time" placeholder="选择时间区间" readonly name="start_time">
|
|
||||||
</div>
|
|
||||||
~
|
|
||||||
<div class="layui-input-inline" style="width:110px;margin-bottom:0">
|
|
||||||
<input type="text" class="layui-input" id="end_time" placeholder="选择时间区间" readonly name="end_time">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:110px;">
|
<div class="layui-input-inline" style="width:110px;">
|
||||||
<input type="text" name="username" placeholder="请选择员工" class="layui-input" readonly data-event="select"/>
|
<input type="text" name="username" placeholder="请选择员工" class="layui-input picker-one" readonly />
|
||||||
<input type="text" name="uid" value="" style="display:none" />
|
<input type="text" name="uid" value="" style="display:none" />
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:220px;">
|
<div class="layui-input-inline" style="width:220px;">
|
||||||
@ -44,45 +38,25 @@
|
|||||||
<!-- 脚本 -->
|
<!-- 脚本 -->
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script>
|
<script>
|
||||||
const moduleInit = ['tool','employeepicker','oaSchedule'];
|
const moduleInit = ['tool','employeepicker','oaSchedule','laydatePlus'];
|
||||||
function gouguInit() {
|
function gouguInit() {
|
||||||
var form = layui.form,table = layui.table,tool=layui.tool, employeepicker = layui.employeepicker,laydate = layui.laydate,work = layui.oaSchedule;
|
var form = layui.form,table = layui.table,tool=layui.tool,laydatePlus = layui.laydatePlus, laydate = layui.laydate,work = layui.oaSchedule;
|
||||||
//日期范围
|
|
||||||
laydate.render({
|
|
||||||
elem: '#barDate',
|
|
||||||
range: ['#start_time', '#end_time'],
|
|
||||||
rangeLinked:true
|
|
||||||
});
|
|
||||||
|
|
||||||
|
//日期范围
|
||||||
|
var diff_time = new laydatePlus({'target':'diff_time'});
|
||||||
|
|
||||||
|
//监听搜索提交
|
||||||
|
form.on('submit(webform)', function(data) {
|
||||||
|
layui.scheduleTable.reload({
|
||||||
|
where: data.field,
|
||||||
|
page: {curr: 1}
|
||||||
|
});
|
||||||
|
return false;
|
||||||
|
});
|
||||||
$('[lay-filter="clear"]').on('click',function(){
|
$('[lay-filter="clear"]').on('click',function(){
|
||||||
setTimeout(function(){
|
setTimeout(function(){
|
||||||
$('[lay-filter="webform"]').click();
|
$('[lay-filter="webform"]').click();
|
||||||
},10)
|
},10)
|
||||||
})
|
|
||||||
|
|
||||||
// 选择员工
|
|
||||||
$('body').on('click','[data-event="select"]',function(){
|
|
||||||
var that = $(this);
|
|
||||||
var names = that.val(), ids = $('[name="uid"]').val();
|
|
||||||
employeepicker.init({
|
|
||||||
ids: ids,
|
|
||||||
names: names,
|
|
||||||
type: 0,
|
|
||||||
department_url: "/api/index/get_department_tree",
|
|
||||||
employee_url: "/api/index/get_employee",
|
|
||||||
callback: function (ids, names, dids, departments) {
|
|
||||||
$('[name="uid"]').val(ids);
|
|
||||||
that.val(names);
|
|
||||||
$('[lay-filter="webform"]').click();
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
//监听搜索提交
|
|
||||||
form.on('submit(webform)', function(data){
|
|
||||||
let f=data.field;
|
|
||||||
layui.scheduleTable.reload({where:{keywords:f.keywords,start_time:f.start_time,end_time:f.end_time,uid:f.uid},page:{curr:1}});
|
|
||||||
return false;
|
|
||||||
});
|
});
|
||||||
|
|
||||||
layui.scheduleTable = table.render({
|
layui.scheduleTable = table.render({
|
||||||
|
@ -11,21 +11,15 @@
|
|||||||
<div class="layui-tab-content" style="padding:0">
|
<div class="layui-tab-content" style="padding:0">
|
||||||
<div class="layui-tab-item layui-show">
|
<div class="layui-tab-item layui-show">
|
||||||
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform">
|
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform">
|
||||||
<div class="layui-input-inline" id="date">
|
<div class="layui-input-inline" style="width:300px;">
|
||||||
<div class="layui-input-inline" style="width:112px; margin-bottom:0">
|
<input type="text" class="layui-input" id="diff_time" placeholder="接收日期范围" readonly name="diff_time">
|
||||||
<input type="text" autocomplete="off" id="start_time" name="start_time" class="layui-input" placeholder="接收开始日期">
|
|
||||||
</div>
|
|
||||||
~
|
|
||||||
<div class="layui-input-inline" style="width:112px; margin-bottom:0">
|
|
||||||
<input type="text" autocomplete="off" id="end_time" name="end_time" class="layui-input" placeholder="接收结束日期">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:136px">
|
<div class="layui-input-inline" style="width:136px">
|
||||||
<select name="type">
|
<select name="type">
|
||||||
<option value="">选择类型</option>
|
<option value="">选择类型</option>
|
||||||
<option value="1">日报</option>
|
<option value="1">日报</option>
|
||||||
<option value="2">周报</option>
|
<option value="2">周报</option>
|
||||||
<option value="2">月报</option>
|
<option value="3">月报</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:150px;">
|
<div class="layui-input-inline" style="width:150px;">
|
||||||
@ -37,14 +31,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="layui-tab-item">
|
<div class="layui-tab-item">
|
||||||
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform2">
|
<form class="layui-form gg-form-bar border-x border-t" lay-filter="barsearchform2">
|
||||||
<div class="layui-input-inline" id="date1">
|
<div class="layui-input-inline" style="width:300px;">
|
||||||
<div class="layui-input-inline" style="width:112px; margin-bottom:0"">
|
<input type="text" class="layui-input" id="diff_time1" placeholder="接收日期范围" readonly name="diff_time1">
|
||||||
<input type="text" autocomplete="off" id="start_time1" name="start_time" class="layui-input" placeholder="接收开始日期">
|
|
||||||
</div>
|
|
||||||
~
|
|
||||||
<div class="layui-input-inline" style="width:112px; margin-bottom:0"">
|
|
||||||
<input type="text" autocomplete="off" id="end_time1" name="end_time" class="layui-input" placeholder="接收结束日期">
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:136px">
|
<div class="layui-input-inline" style="width:136px">
|
||||||
<select name="read">
|
<select name="read">
|
||||||
@ -58,7 +46,7 @@
|
|||||||
<option value="">选择类型</option>
|
<option value="">选择类型</option>
|
||||||
<option value="1">日报</option>
|
<option value="1">日报</option>
|
||||||
<option value="2">周报</option>
|
<option value="2">周报</option>
|
||||||
<option value="2">月报</option>
|
<option value="3">月报</option>
|
||||||
</select>
|
</select>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-input-inline" style="width:150px;">
|
<div class="layui-input-inline" style="width:150px;">
|
||||||
@ -93,16 +81,12 @@
|
|||||||
<!-- 脚本 -->
|
<!-- 脚本 -->
|
||||||
{block name="script"}
|
{block name="script"}
|
||||||
<script>
|
<script>
|
||||||
const moduleInit = ['tool','employeepicker'];
|
const moduleInit = ['tool','employeepicker','laydatePlus'];
|
||||||
function gouguInit() {
|
function gouguInit() {
|
||||||
var form = layui.form,table = layui.table,tool=layui.tool, laydate = layui.laydate;
|
var form = layui.form,table = layui.table,tool=layui.tool, laydatePlus = layui.laydatePlus;
|
||||||
|
|
||||||
//日期范围
|
//日期范围
|
||||||
laydate.render({
|
var diff_time = new laydatePlus({'target':'diff_time'});
|
||||||
elem: '#date',
|
|
||||||
range: ['#start_time', '#end_time'],
|
|
||||||
rangeLinked:true
|
|
||||||
});
|
|
||||||
|
|
||||||
layui.pageTable = table.render({
|
layui.pageTable = table.render({
|
||||||
elem: '#test',
|
elem: '#test',
|
||||||
@ -178,17 +162,13 @@
|
|||||||
//监听搜索提交
|
//监听搜索提交
|
||||||
form.on('submit(webform)', function(data){
|
form.on('submit(webform)', function(data){
|
||||||
let f=data.field;
|
let f=data.field;
|
||||||
layui.pageTable.reload({where:{send:1,start_time:f.start_time,end_time:f.end_time,type:f.type,read:f.read},page:{curr:1}});
|
layui.pageTable.reload({where:{send:1,diff_time:f.diff_time,type:f.type,read:f.read},page:{curr:1}});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
//日期范围
|
//日期范围
|
||||||
laydate.render({
|
var diff_time1 = new laydatePlus({'target':'diff_time1'});
|
||||||
elem: '#date1',
|
|
||||||
range: ['#start_time1', '#end_time1'],
|
|
||||||
rangeLinked:true
|
|
||||||
});
|
|
||||||
|
|
||||||
layui.pageTable1 = table.render({
|
layui.pageTable1 = table.render({
|
||||||
elem: '#test1',
|
elem: '#test1',
|
||||||
@ -246,7 +226,7 @@
|
|||||||
//监听搜索提交
|
//监听搜索提交
|
||||||
form.on('submit(webform1)', function(data){
|
form.on('submit(webform1)', function(data){
|
||||||
let f=data.field;
|
let f=data.field;
|
||||||
layui.pageTable1.reload({where:{send:0,start_time:f.start_time,end_time:f.end_time,type:f.type,read:f.read},page:{curr:1}});
|
layui.pageTable1.reload({where:{send:0,diff_time1:f.diff_time1,type:f.type,read:f.read},page:{curr:1}});
|
||||||
return false;
|
return false;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -3,6 +3,7 @@ layui.define(['layer'],function(exports){
|
|||||||
let laydate = layui.laydate;
|
let laydate = layui.laydate;
|
||||||
const opts={
|
const opts={
|
||||||
"target":'laydateplus',
|
"target":'laydateplus',
|
||||||
|
"rangeLinked":false,
|
||||||
"callback": null
|
"callback": null
|
||||||
};
|
};
|
||||||
var laydatePlus = function(options){
|
var laydatePlus = function(options){
|
||||||
@ -163,7 +164,7 @@ layui.define(['layer'],function(exports){
|
|||||||
type: 'datetime',
|
type: 'datetime',
|
||||||
range: '~',
|
range: '~',
|
||||||
trigger: 'none',
|
trigger: 'none',
|
||||||
rangeLinked:true,
|
rangeLinked:this.settings.rangeLinked,
|
||||||
shortcuts: shortcuts,
|
shortcuts: shortcuts,
|
||||||
show:true
|
show:true
|
||||||
});
|
});
|
||||||
|
@ -9,7 +9,7 @@
|
|||||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="30s" type="rotate" values="0 210 530 ; -30 210 530 ; 0 210 530" keyTimes="0 ; 0.5 ; 1" repeatCount="indefinite"/>
|
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="30s" type="rotate" values="0 210 530 ; -30 210 530 ; 0 210 530" keyTimes="0 ; 0.5 ; 1" repeatCount="indefinite"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<circle cx="200" cy="150" r="30" stroke="#1a73e8" fill="#1a73e8">
|
<circle cx="200" cy="150" r="30" stroke="#FBBC05" fill="#FBBC05">
|
||||||
<animateMotion path="M 0 0 L 40 20 Z" dur="5s" repeatCount="indefinite"/>
|
<animateMotion path="M 0 0 L 40 20 Z" dur="5s" repeatCount="indefinite"/>
|
||||||
</circle>
|
</circle>
|
||||||
|
|
||||||
@ -18,7 +18,12 @@
|
|||||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 210 530" to="360 210 530" repeatCount="indefinite"/>
|
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="0 210 530" to="360 210 530" repeatCount="indefinite"/>
|
||||||
</path>
|
</path>
|
||||||
|
|
||||||
<rect x="400" y="600" rx="40" ry="40" width="100" height="100" stroke="rgb(129, 201, 149)" fill="rgb(129, 201, 149)">
|
<rect x="400" y="600" rx="40" ry="40" width="100" height="100" stroke="rgb(85, 179, 5)" fill="rgb(85, 179, 5)">
|
||||||
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="-30 550 750" to="330 550 750" repeatCount="indefinite"/>
|
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="-320 500 600" to="320 500 600" repeatCount="indefinite"/>
|
||||||
</rect>
|
</rect>
|
||||||
|
|
||||||
|
|
||||||
|
<path d="M135.461,9.654 L192.193,221.380 C195.055,232.063 189.027,237.482 178.708,233.504 L10.722,168.736 C0.402,164.758 -2.323,154.585 4.624,145.980 L117.721,5.897 C124.668,-2.708 132.598,-1.029 135.461,9.654 Z" stroke="rgb(24, 106, 242)" fill="rgb(24, 106, 242)">
|
||||||
|
<animateTransform attributeType="XML" attributeName="transform" begin="0s" dur="35s" type="rotate" from="-180 300 200" to="360 300 200" repeatCount="indefinite"/>
|
||||||
|
</path>
|
||||||
</svg>
|
</svg>
|
Before Width: | Height: | Size: 1.7 KiB After Width: | Height: | Size: 2.1 KiB |
Loading…
x
Reference in New Issue
Block a user