优化url地址,兼容php7.3,php7.4

This commit is contained in:
hdm 2021-12-05 00:23:33 +08:00
parent a816e367d6
commit 2eba6eab5a
71 changed files with 227 additions and 215 deletions

View File

@ -102,6 +102,20 @@ function format_bytes($size, $delimiter = '')
return round($size, 2) . $delimiter . $units[$i];
}
/**
* PHP截取文字长度
* @return string
*/
function sub_str($str,$len=20){
$strlen=strlen($str)/3;#在编码utf8下计算字符串的长度并把它交给变量$strlen
#echo $strlen;#输出字符串长度
if($strlen<$len){
return $str;
}else{
return mb_substr($str,0,$len,"utf-8")."...";
}
}
/**
*数据处理成树形格式1
* @return array

View File

@ -205,7 +205,7 @@ class Admin extends BaseController
add_log('view', get_params('id'));
return view();
}
//禁用,离职,恢复
//禁用,恢复
public function set()
{
$type = get_params("type");
@ -224,11 +224,9 @@ class Admin extends BaseController
}
foreach ($list as $key => $v) {
if (Db::name('Admin')->update($v) !== false) {
if ($type = 0) {
if ($type == 0) {
add_log('disable', $v['id']);
} else if ($type = 1) {
add_log('leave', $v['id']);
} else if ($type = 2) {
} else if ($type == 1) {
add_log('recovery', $v['id']);
}
}

View File

@ -204,7 +204,7 @@
//头像上传
var uploadInst = upload.render({
elem: "#test1",
url: "{:url('home/api/upload')}",
url: "/home/api/upload",
done: function (e) {
//如果上传失败
if (e.code == 1) {
@ -219,7 +219,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/admin/add')}",
url: "/home/admin/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -44,7 +44,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/api/edit_password')}",
url: "/home/api/edit_password",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -74,7 +74,7 @@
//头像上传
var uploadInst = upload.render({
elem: '#test1',
url: "{:url('home/api/upload')}",
url: "/home/api/upload",
done: function (e) {
//如果上传失败
if (e.code == 1) {
@ -91,7 +91,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/api/edit_personal')}",
url: "/home/api/edit_personal",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -71,7 +71,7 @@
form = layui.form;
$.ajax({
url:"{:url('home/api/get_department_tree')}",
url: "/home/api/get_department_tree",
type:'post',
success:function(res){
//仅节点左侧图标控制收缩
@ -100,7 +100,7 @@
elem: '#test',
title: '员工列表',
toolbar: '#toolbarDemo',
url: "{:url('home/admin/index')}", //数据接口
url: "/home/admin/index", //数据接口
page: true, //开启分页
limit: 20,
cols: [
@ -231,7 +231,7 @@
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
var data = checkStatus.data;
if (obj.event === 'add') {
rightpage.open("{:url('home/admin/add')}");
rightpage.open("/home/admin/add");
return;
}
if(data.length==0){
@ -258,7 +258,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/admin/set')}",
url: "/home/admin/set",
data: {
ids: uidArray.join(','),
type:type
@ -320,7 +320,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/admin/reset_psw')}",
url: "/home/admin/reset_psw",
data: {
id: id
},

View File

@ -35,7 +35,7 @@
elem: '#test',
title: '操作日志列表',
toolbar: '#toolbarDemo',
url: "{:url('home/admin/log')}", //数据接口
url: "/home/admin/log", //数据接口
page: true, //开启分页
limit: 20,
cols: [

View File

@ -27,7 +27,7 @@
var page=1,limit=20;
function getLogs() {
$.ajax({
url: "{:url('home/api/get_log_list')}",
url: "/home/api/get_log_list",
type: 'post',
data: {
page:page,

View File

@ -182,7 +182,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/admin/reset_psw')}",
url: "/home/admin/reset_psw",
data: {
id: id
},

View File

@ -93,7 +93,7 @@ function init(layui) {
, upload = layui.upload;
var tags = new tagspicker({
'url': "{:url('home/api/get_keyword_cate')}",
'url': "/home/api/get_keyword_cate",
'target': 'keyword_name',
'tag_ids': 'keyword_id',
'tag_tags': 'keyword_name',
@ -104,7 +104,7 @@ function init(layui) {
//封面上传
var uploadInst = upload.render({
elem: '#test1'
, url: "{:url('home/api/upload')}"
, url: "/home/api/upload"
, done: function (res) {
//如果上传失败
if (res.code == 1) {
@ -119,7 +119,7 @@ function init(layui) {
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/article/add')}",
url: "/home/article/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -26,7 +26,7 @@
id:'treeTable'
,elem: '#treeTable'
,idField:'id'
,url:"{:url('home/article/cate')}"
,url: "/home/article/cate"
,cellMinWidth: 100
,treeId:'id'//树形id字段名称
,treeUpId:'pid'//树形父id字段名称
@ -49,7 +49,7 @@
//表头工具栏事件
$('.add-menu').on('click', function(){
rightpage.open("{:url('home/article/cate_add')}");
rightpage.open("/home/article/cate_add");
return;
});
@ -66,7 +66,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/article/cate_delete')}",
url: "/home/article/cate_delete",
type: 'post',
data: { id: obj.data.id },
success: function (e) {

View File

@ -75,7 +75,7 @@
//监听提交
form.on('submit(webform)', function(data){
$.ajax({
url:"{:url('home/article/cate_add')}",
url: "/home/article/cate_add",
type:'post',
data:data.field,
success:function(e){

View File

@ -94,7 +94,7 @@
, upload = layui.upload;
var tags = new tagspicker({
'url': "{:url('home/api/get_keyword_cate')}",
'url': "/home/api/get_keyword_cate",
'target': 'keyword_name',
'tag_ids': 'keyword_id',
'tag_tags': 'keyword_name',
@ -104,23 +104,23 @@
//封面上传
var uploadInst = upload.render({
elem: '#test1'
, url: "{:url('home/api/upload')}"
, done: function (res) {
//如果上传失败
if (res.code == 1) {
return layer.msg('上传失败');
elem: '#test1',
url: "/home/api/upload",
done: function (res) {
//如果上传失败
if (res.code == 1) {
return layer.msg('上传失败');
}
//上传成功
$('#demo1 input').attr('value', res.data.id);
$('#demo1 img').attr('src', res.data.filepath);
}
//上传成功
$('#demo1 input').attr('value', res.data.id);
$('#demo1 img').attr('src', res.data.filepath);
}
});
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/article/add')}",
url: "/home/article/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -38,7 +38,7 @@
elem: '#test',
title: '文章列表',
toolbar: '#toolbarDemo',
url: "{:url('home/article/index')}", //数据接口
url: "/home/article/index", //数据接口
page: true, //开启分页
limit: 20,
cols: [

View File

@ -49,7 +49,7 @@
elem: '#test',
title: '文章列表',
toolbar: '#toolbarDemo',
url: "{:url('home/article/list')}", //数据接口
url: "/home/article/list", //数据接口
page: true, //开启分页
limit: 20,
cols: [
@ -103,7 +103,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/article/add')}");
rightpage.open("/home/article/add");
return;
}
});
@ -124,7 +124,7 @@
title: '提示'
}, function(index) {
$.ajax({
url: "{:url('home/article/delete')}",
url: "/home/article/delete",
data: {
id: data.id
},

View File

@ -85,8 +85,8 @@
namesArray=names.split(',');
}
employeepicker.init({
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
ids:idsArray,
names:namesArray,
type:0,
@ -103,7 +103,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/check/add')}",
url: "/home/check/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -24,7 +24,7 @@
elem: '#test',
title: '配置列表',
toolbar: '#toolbarDemo',
url: "{:url('home/check/index')}",
url: "/home/check/index",
page: true, //开启分页
limit: 20,
cols: [
@ -62,7 +62,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/check/add')}");
rightpage.open("/home/check/add");
return;
}
});
@ -76,7 +76,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/check/delete')}",
url: "/home/check/delete",
data: { id: data.id },
success: function (e) {
layer.msg(e.msg);

View File

@ -50,7 +50,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/conf/add')}",
url: "/home/conf/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -82,7 +82,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/conf/edit')}",
url: "/home/conf/edit",
type: 'post',
data: data.field,
success: function (e) {
@ -111,7 +111,7 @@
return false;
}
$.ajax({
url: "{:url('home/api/email_test')}",
url: "/home/api/email_test",
data: { email: value },
type: "post",
beforeSend: function () {

View File

@ -29,7 +29,7 @@
elem: '#test',
title: '配置列表',
toolbar: '#toolbarDemo',
url: "{:url('home/conf/index')}",
url: "/home/conf/index",
page: true, //开启分页
limit: 20,
cols: [
@ -80,7 +80,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/conf/delete')}",
url: "/home/conf/delete",
type: 'post',
data: {
id: obj.data.id
@ -100,7 +100,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/conf/add')}");
rightpage.open("/home/conf/add");
return;
}
});

View File

@ -36,7 +36,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/conf/edit')}",
url: "/home/conf/edit",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -55,7 +55,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/conf/edit')}",
url: "/home/conf/edit",
type: 'post',
data: data.field,
success: function (e) {
@ -83,7 +83,7 @@
headers: {
Token: token
},
url: "{:url('home/api/index/demo')}",
url: "/home/api/index/demo",
type: "get",
success: function (res) {
$('#res').html(JSON.stringify(res));
@ -128,7 +128,7 @@
return;
}
$.ajax({
url:"{:url('home/api/index/reg')}",
url: "/home/api/index/reg",
type:'post',
data:{username:username,pwd:password},
success:function(res){
@ -172,7 +172,7 @@
return;
}
$.ajax({
url:"{:url('home/api/index/login')}",
url: "/home/api/index/login",
type:'post',
data:{username:username,password:password},
success:function(res){

View File

@ -96,7 +96,7 @@
//logo上传
var uploadInst = upload.render({
elem: '#test1',
url: "{:url('home/api/upload')}",
url: "/home/api/upload",
done: function (res) {
//如果上传失败
if (res.code == 1) {
@ -112,7 +112,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/conf/edit')}",
url: "/home/conf/edit",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -72,7 +72,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/database/del')}",
url: "/home/database/del",
data: {'id':id},
success: function (res) {
layer.msg(res.msg);

View File

@ -25,7 +25,7 @@
elem: '#test',
title: '数据备份',
toolbar: '#toolbarDemo',
url: "{:url('home/database/database')}", //数据接口
url: "/home/database/database", //数据接口
page: false,
cols: [
[ //表头
@ -98,7 +98,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/database/backup')}",
url: "/home/database/backup",
data: {'id':ids},
success: function (res) {
layer.msg(res.msg);
@ -115,7 +115,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/database/optimize')}",
url: "/home/database/optimize",
data: {'id':ids},
success: function (res) {
layer.msg(res.msg);
@ -132,7 +132,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/database/repair')}",
url: "/home/database/repair",
data: {'id':ids},
success: function (res) {
layer.msg(res.msg);

View File

@ -78,7 +78,7 @@
//监听提交
form.on('submit(webform)', function(data) {
$.ajax({
url: "{:url('home/department/add')}",
url: "/home/department/add",
type: 'post',
data: data.field,
success: function(e) {

View File

@ -23,7 +23,7 @@
id: 'treeTable'
, elem: '#treeTable'
, idField: 'id'
, url: "{:url('home/department/index')}"
, url: "/home/department/index"
, cellMinWidth: 100
, treeId: 'id'//树形id字段名称
, treeUpId: 'pid'//树形父id字段名称
@ -47,7 +47,7 @@
//表头工具栏事件
$('.body-table').on('click','.add-menu', function(){
rightpage.open("{:url('home/department/add')}");
rightpage.open("/home/department/add");
return;
});
@ -64,7 +64,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/department/delete')}",
url: "/home/department/delete",
type: 'post',
data: { id: obj.data.id },
success: function (e) {

View File

@ -190,7 +190,7 @@
title: '提示'
}, function(index) {
$.ajax({
url:"{:url('/home/expense/add')}",
url: "/home/expense/add",
type:'post',
data:data.field,
success:function(e){
@ -234,7 +234,7 @@
title: '提示'
}, function(index) {
$.ajax({
url: "{:url('home/api/del_expense_interfix')}",
url: "/home/api/del_expense_interfix",
data: {
id: _id
},

View File

@ -24,7 +24,7 @@
elem: '#test'
,toolbar: '#toolbarDemo'
,title:'报销类别列表'
,url:"{:url('home/expense/cate')}"
,url: "/home/expense/cate"
,page: true //开启分页
,limit: 20
,cellMinWidth: 80
@ -64,7 +64,7 @@
if(obj.event === 'disable'){
layer.confirm('确定要禁用该类别吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:url('home/expense/cate_add')}",
url: "/home/expense/cate_add",
type: 'post',
data: {
id: obj.data.id,
@ -84,7 +84,7 @@
if(obj.event === 'open'){
layer.confirm('确定要启用该类别吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:url('home/expense/cate_add')}",
url: "/home/expense/cate_add",
type: 'post',
data: {
id: obj.data.id,
@ -120,7 +120,7 @@
var value = layero.find(".layui-layer-input").val();
if (value) {
$.ajax({
url: "{:url('home/expense/cate_add')}",
url: "/home/expense/cate_add",
type: 'post',
data: {
id: id,

View File

@ -59,7 +59,7 @@
elem: '#test',
title: '报销管理列表',
toolbar: '#toolbarDemo',
url: "{:url('home/expense/index')}", //数据接口
url: "/home/expense/index", //数据接口
page: true, //开启分页
limit: 20,
cols: [
@ -168,7 +168,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/expense/add')}");
rightpage.open("/home/expense/add");
return;
}
});
@ -189,7 +189,7 @@
title: '提示'
}, function(index) {
$.ajax({
url: "{:url('home/expense/delete')}",
url: "/home/expense/delete",
data: {
id: data.id
},

View File

@ -128,7 +128,7 @@ function init(layui) {
}
layer.confirm('确定审核通过该报销申请?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/expense/check')}",
url: "/home/expense/check",
data:{id:id,check_status:2,pay_admin_id:pay_admin},
success:function(res){
layer.msg(res.msg);
@ -153,7 +153,7 @@ function init(layui) {
return false;
}
$.ajax({
url:"{:url('home/expense/check')}",
url: "/home/expense/check",
data:{id:id,check_status:0,check_remark:text},
success:function(res){
layer.msg(res.msg);
@ -174,7 +174,7 @@ function init(layui) {
var id=$('#id').val();
layer.confirm('确定已经打款?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/expense/check')}",
url: "/home/expense/check",
data:{id:id,check_status:3},
success:function(res){
layer.msg(res.msg);

View File

@ -214,7 +214,7 @@ function init(layui) {
var inid=that.data('inid');
layer.confirm('确定要删除该到账记录?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/income/delete')}",
url: "/home/income/delete",
data:{id:id,inid:inid},
success:function(res){
layer.msg(res.msg);
@ -237,7 +237,7 @@ function init(layui) {
return false;
}
$.ajax({
url:"{:url('home/income/add')}",
url: "/home/income/add",
type:'post',
data:data.field,
success:function(res){
@ -257,7 +257,7 @@ function init(layui) {
var inid=$('#inid').val();
layer.confirm('确定要全部反到账?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/income/add')}",
url: "/home/income/add",
data:{inid:inid,enter_type:3},
success:function(res){
layer.msg(res.msg);
@ -292,7 +292,7 @@ function init(layui) {
return false;
}
$.ajax({
url:"{:url('home/income/add')}",
url: "/home/income/add",
data:{inid:inid,enter_type:2,enter_time:enter_time},
success:function(res){
layer.msg(res.msg);

View File

@ -53,7 +53,7 @@
elem: '#test',
title: '到账列表',
toolbar: '#toolbarDemo',
url: "{:url('home/income/index')}", //数据接口
url: "/home/income/index", //数据接口
page: true, //开启分页
limit: 20,
cols: [

View File

@ -33,7 +33,7 @@
<div class="layui-side ittab-bg-gray">
<div class="ittab-menulist">
<div class="ittab-menulist-top">
<a href="/" title="返回首页" style="background-color: #E94335"><i class="layui-icon layui-icon-home"></i></a><a href="javascript:;" title="修改个人信息" style="background-color:#fbbc05" data-id="10000" data-title="修改个人信息" data-src="{:url('home/api/edit_personal')}" class="site-menu-active"><i class="layui-icon layui-icon-username"></i></a><a href="javascript:;" title="修改密码" style="background-color:#4285f4" data-id="10001" data-title="修改密码" data-src="{:url('home/api/edit_password')}" class="site-menu-active"><i class="layui-icon layui-icon-password"></i></a>
<a href="/" title="返回首页" style="background-color: #E94335"><i class="layui-icon layui-icon-home"></i></a><a href="javascript:;" title="修改个人信息" style="background-color:#fbbc05" data-id="10000" data-title="修改个人信息" data-src="/home/api/edit_personal" class="site-menu-active"><i class="layui-icon layui-icon-username"></i></a><a href="javascript:;" title="修改密码" style="background-color:#4285f4" data-id="10001" data-title="修改密码" data-src="/home/api/edit_password" class="site-menu-active"><i class="layui-icon layui-icon-password"></i></a>
</div>
<div class="ittab-menulist-1">
{foreach name="menu" item="a"}
@ -87,7 +87,7 @@
<div class="layui-icon layui-icon-next" id="right_button" title="向右滚动菜单"></div>
<div class="layui-tab-content" style="height: 100%;">
<div class="layui-tab-item layui-show">
<iframe id="0" data-frameid="0" name="myiframe" src="{:url('home/index/main')}" frameborder="0" align="left" width="100%" height="100%" scrolling="yes"></iframe>
<iframe id="0" data-frameid="0" name="myiframe" src="/home/index/main" frameborder="0" align="left" width="100%" height="100%" scrolling="yes"></iframe>
</div>
</div>
</div>
@ -106,12 +106,12 @@
layer.confirm('确认注销登录吗?', { icon: 7, title: '警告' }, function (index) {
//注销
$.ajax({
url: "{:url('home/login/login_out')}",
url: "/home/login/login_out",
success: function (e) {
layer.msg(e.msg);
if (e.code == 0) {
setTimeout(function () {
location.href = "{:url('home/login/index')}"
location.href = "/home/login/index"
}, 1000)
}
}
@ -123,7 +123,7 @@
//轮循获取消息
var getStatus = setInterval(function () {
$.ajax({
url:"{:url('home/index/index')}",
url: "/home/index/index",
type:'post',
success:function(e){
if(e.code==0 && e.data!=''){

View File

@ -161,7 +161,7 @@
<div class="table-title">员工动态</div>
<div class="layui-card-body">
<ul class="layui-timeline" id="logs"></ul>
<div class="panel-more"><a href="{:url('home/api/log_list')}">查看更多动态</a></div>
<div class="panel-more"><a href="/home/api/log_list">查看更多动态</a></div>
</div>
</div>
</div>
@ -181,7 +181,7 @@
//公告
table.render({
elem: '#Note'
, url: "{:url('home/api/get_note_list')}" //数据接口
, url: "/home/api/get_note_list" //数据接口
, page: false //开启分页
, cols: [[ //表头
{ field: 'cate_title', title: '公告分类', align: 'center','width': 90 },
@ -196,7 +196,7 @@
//文章
table.render({
elem: '#Article'
, url: "{:url('home/api/get_article_list')}" //数据接口
, url: "/home/api/get_article_list" //数据接口
, page: false //开启分页
, cols: [[ //表头
{ field: 'cate_title', title: '知识分类', align: 'center','width': 90 },
@ -234,7 +234,7 @@
function get_logs() {
$.ajax({
url: "{:url('home/api/get_log_list')}",
url: "/home/api/get_log_list",
type: 'post',
data: {
page: 1,
@ -269,7 +269,7 @@
var chartView = echarts.init(document.getElementById('chartView'));
function get_view_data() {
$.ajax({
url: "{:url('home/api/get_view_data')}",
url: "/home/api/get_view_data",
type: 'post',
data: {},
success: function (e) {

View File

@ -179,7 +179,7 @@
form.on('submit(webform)', function(data){
$.ajax({
url:"{:url('/home/invoice/add')}",
url: "/home/invoice/add",
type:'post',
data:data.field,
success:function(e){

View File

@ -60,7 +60,7 @@
elem: '#test',
title: '发票列表',
toolbar: '#toolbarDemo',
url: "{:url('home/invoice/index')}", //数据接口
url: "/home/invoice/index", //数据接口
page: true, //开启分页
limit: 20,
cols: [
@ -196,7 +196,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/invoice/add')}");
rightpage.open("/home/invoice/add");
return;
}
});
@ -217,7 +217,7 @@
title: '提示'
}, function(index) {
$.ajax({
url: "{:url('home/invoice/delete')}",
url: "/home/invoice/delete",
data: {
id: data.id
},
@ -237,7 +237,7 @@
title: '提示'
}, function(index) {
$.ajax({
url: "{:url('home/invoice/check')}",
url: "/home/invoice/check",
data: {
id: data.id,
invoice_status:10

View File

@ -24,7 +24,7 @@
elem: '#test'
,toolbar: '#toolbarDemo'
,title:'报销类别列表'
,url:"{:url('home/invoice/subject')}"
,url: "/home/invoice/subject"
,page: true //开启分页
,limit: 20
,cellMinWidth: 80
@ -64,7 +64,7 @@
if(obj.event === 'disable'){
layer.confirm('确定要禁用该发票主体吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:url('home/invoice/subject_add')}",
url: "/home/invoice/subject_add",
type: 'post',
data: {
id: obj.data.id,
@ -84,7 +84,7 @@
if(obj.event === 'open'){
layer.confirm('确定要启用该发票主体吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url: "{:url('home/invoice/subject_add')}",
url: "/home/invoice/subject_add",
type: 'post',
data: {
id: obj.data.id,
@ -120,7 +120,7 @@
var value = layero.find(".layui-layer-input").val();
if (value) {
$.ajax({
url: "{:url('home/invoice/subject_add')}",
url: "/home/invoice/subject_add",
type: 'post',
data: {
id: id,

View File

@ -143,7 +143,7 @@ function init(layui) {
}
layer.confirm('确定审核通过该发票申请?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/invoice/check')}",
url: "/home/invoice/check",
data:{id:id,invoice_status:2,open_admin_id:open_admin},
success:function(res){
layer.msg(res.msg);
@ -168,7 +168,7 @@ function init(layui) {
return false;
}
$.ajax({
url:"{:url('home/invoice/check')}",
url: "/home/invoice/check",
data:{id:id,invoice_status:0,check_remark:text},
success:function(res){
layer.msg(res.msg);
@ -194,7 +194,7 @@ function init(layui) {
return false;
}
$.ajax({
url:"{:url('home/invoice/check')}",
url: "/home/invoice/check",
data:{id:id,invoice_status:3,code:text},
success:function(res){
layer.msg(res.msg);

View File

@ -45,7 +45,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/keywords/add')}",
url: "/home/keywords/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -34,7 +34,7 @@
elem: '#test',
title: '关键字列表',
toolbar: '#toolbarDemo',
url: "{:url('home/keywords/index')}",
url: "/home/keywords/index",
page: true, //开启分页
limit: 20,
cols: [
@ -91,7 +91,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/keywords/add')}");
rightpage.open("/home/keywords/add");
return;
}
});
@ -105,7 +105,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/keywords/delete')}",
url: "/home/keywords/delete",
data: { id: data.id },
success: function (e) {
layer.msg(e.msg);

View File

@ -83,7 +83,7 @@
$ = layui.$;
form.on('submit(login-submit)', function(data) {
$.ajax({
url: "{:url('/home/login/login_submit')}",
url: "/home/login/login_submit",
data: $('#gougu-login').serialize(),
type: 'post',
async: false,

View File

@ -195,14 +195,14 @@
//监听保存到草稿并发送
form.on('submit(webform)', function(data){
$.ajax({
url:"{:url('home/mail/save')}",
url: "/home/mail/save",
type:'post',
data:data.field,
success:function(e){
if(e.code==0){
layer.msg('消息保存成功,正在发送中...');
$.ajax({
url:"{:url('home/mail/send')}",
url: "/home/mail/send",
type:'post',
data:{'id':e.data},
success:function(e){
@ -226,7 +226,7 @@
//监听保存到草稿
form.on('submit(draftform)', function(data){
$.ajax({
url:"{:url('home/mail/save')}",
url: "/home/mail/save",
type:'post',
data:data.field,
success:function(e){
@ -249,7 +249,7 @@
var demoListView = $('#demoList')
,uploadListIns = upload.render({
elem: '#testList'
,url: "{:url('home/api/upload')}"
,url: "/home/api/upload"
,accept: 'file'
,multiple: true
,auto: false
@ -356,8 +356,8 @@
namesArray=names.split(',');
}
employeepicker.init({
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
ids:idsArray,
names:namesArray,
callback:function(ids,names){
@ -379,7 +379,7 @@
content:tpl,
success:function(){
$.ajax({
url:"{:url('/home/api/get_department_tree')}",
url: "/home/api/get_department_tree",
type:'post',
success:function(res){
dtree.render({
@ -422,7 +422,7 @@
success:function(){
tableid=table.render({
elem: '#vaeservice'
,url:"{:url('/home/api/get_position')}"
,url: "/home/api/get_position"
,page: false //开启分页
,cols: [[
{type:'checkbox',title: '选择'}

View File

@ -59,7 +59,7 @@
elem: '#test',
toolbar: '#toolbarDemo',
title:'草稿箱',
url: "{:url('home/mail/draft')}", //数据接口
url: "/home/mail/draft", //数据接口
page: true ,//开启分页
limit: 15,
cellMinWidth: 80, //全局定义常规单元格的最小宽度layui 2.2.1 新增
@ -80,7 +80,7 @@
if(obj.event === 'del'){
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data:{ids:data.id,type:2,source:2},
success:function(e){
layer.msg(e.msg);
@ -102,7 +102,7 @@
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
var data = checkStatus.data;
if (obj.event === 'add') {
rightpage.open("{:url('home/mail/add')}");
rightpage.open("/home/mail/add");
return;
}
if(data.length==0){
@ -125,7 +125,7 @@
title: '提示'
}, function (index) {
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data: {
ids: idArray.join(','),
type:type,

View File

@ -75,7 +75,7 @@
elem: '#test',
toolbar: '#toolbarDemo',
title:'收件箱',
url: "{:url('home/mail/inbox')}", //数据接口
url: "/home/mail/inbox", //数据接口
page: true ,//开启分页
limit: 15,
cellMinWidth: 80, //全局定义常规单元格的最小宽度layui 2.2.1 新增
@ -104,7 +104,7 @@
if(obj.event === 'del'){
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data:{ids:data.id,type:2,source:3},
success:function(e){
layer.msg(e.msg);
@ -135,7 +135,7 @@
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
var data = checkStatus.data;
if (obj.event === 'add') {
rightpage.open("{:url('home/mail/add')}");
rightpage.open("/home/mail/add");
return;
}
if(data.length==0){
@ -162,7 +162,7 @@
title: '提示'
}, function (index) {
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data: {
ids: idArray.join(','),
type:type,

View File

@ -142,14 +142,14 @@
//监听保存到草稿并发送
form.on('submit(webform)', function(data){
$.ajax({
url:"{:url('home/mail/save')}",
url: "/home/mail/save",
type:'post',
data:data.field,
success:function(e){
if(e.code==0){
layer.msg('消息保存成功,正在发送中...');
$.ajax({
url:"{:url('home/mail/send')}",
url: "/home/mail/send",
type:'post',
data:{'id':e.data},
success:function(e){
@ -173,7 +173,7 @@
//监听保存到草稿
form.on('submit(draftform)', function(data){
$.ajax({
url:"{:url('home/mail/save')}",
url: "/home/mail/save",
type:'post',
data:data.field,
success:function(e){
@ -196,7 +196,7 @@
var demoListView = $('#demoList')
,uploadListIns = upload.render({
elem: '#testList'
,url: "{:url('home/api/upload')}"
,url: "/home/api/upload"
,accept: 'file'
,multiple: true
,auto: false
@ -303,8 +303,8 @@
namesArray=names.split(',');
}
employeepicker.init({
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
ids:idsArray,
names:namesArray,
callback:function(ids,names){
@ -326,7 +326,7 @@
content:tpl,
success:function(){
$.ajax({
url:"{:url('/home/api/get_department_tree')}",
url: "/home/api/get_department_tree",
type:'post',
success:function(res){
dtree.render({
@ -369,7 +369,7 @@
success:function(){
tableid=table.render({
elem: '#vaeservice'
,url:"{:url('/home/api/get_position')}"
,url: "/home/api/get_position"
,page: false //开启分页
,cols: [[
{type:'checkbox',title: '选择'}

View File

@ -60,7 +60,7 @@
elem: '#test',
toolbar: '#toolbarDemo',
title:'垃圾箱',
url: "{:url('home/mail/rubbish')}", //数据接口
url: "/home/mail/rubbish", //数据接口
page: true ,//开启分页
limit: 15,
cellMinWidth: 80, //全局定义常规单元格的最小宽度layui 2.2.1 新增
@ -86,7 +86,7 @@
if(obj.event === 'del'){
layer.confirm('确定把该信息彻底删除吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data:{ids:data.id,type:4},
success:function(e){
layer.msg(e.msg);
@ -101,7 +101,7 @@
if(obj.event === 'recover'){
layer.confirm('确定把该信息移出垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data:{ids:data.id,type:3},
success:function(e){
layer.msg(e.msg);
@ -120,7 +120,7 @@
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
var data = checkStatus.data;
if (obj.event === 'add') {
rightpage.open("{:url('home/mail/add')}");
rightpage.open("/home/mail/add");
return;
}
if(data.length==0){
@ -147,7 +147,7 @@
title: '提示'
}, function (index) {
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data: {
ids: idArray.join(','),
type:type

View File

@ -59,7 +59,7 @@
elem: '#test',
toolbar: '#toolbarDemo',
title:'发件箱',
url: "{:url('home/mail/sendbox')}", //数据接口
url: "/home/mail/sendbox", //数据接口
page: true ,//开启分页
limit: 15,
cellMinWidth: 80, //全局定义常规单元格的最小宽度layui 2.2.1 新增
@ -80,7 +80,7 @@
if(obj.event === 'del'){
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data:{ids:data.id,type:2,source:1},
success:function(e){
layer.msg(e.msg);
@ -106,7 +106,7 @@
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
var data = checkStatus.data;
if (obj.event === 'add') {
rightpage.open("{:url('home/mail/add')}");
rightpage.open("/home/mail/add");
return;
}
if(data.length==0){
@ -129,7 +129,7 @@
title: '提示'
}, function (index) {
$.ajax({
url:"{:url('home/mail/check')}",
url: "/home/mail/check",
data: {
ids: idArray.join(','),
type:type,

View File

@ -86,7 +86,7 @@
//监听提交
form.on('submit(webform)', function(data) {
$.ajax({
url: "{:url('home/menu/add')}",
url: "/home/menu/add",
type: 'post',
data: data.field,
success: function(e) {

View File

@ -25,7 +25,7 @@
id: tableId
, elem: '#' + tableId
, idField: 'id'
, url: "{:url('home/menu/index')}"
, url: "/home/menu/index"
, cellMinWidth: 100
, treeId: 'id'//树形id字段名称
, treeUpId: 'pid'//树形父id字段名称
@ -49,7 +49,7 @@
//表头工具栏事件
$('.add-menu').on('click',function(){
rightpage.open("{:url('home/menu/add')}");
rightpage.open("/home/menu/add");
return;
});
@ -66,7 +66,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/menu/delete')}",
url: "/home/menu/delete",
type: 'post',
data: { id: obj.data.id },
success: function (e) {

View File

@ -98,7 +98,7 @@ function init(layui) {
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/note/add')}",
url: "/home/note/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -26,7 +26,7 @@
id:'treeTable'
,elem: '#treeTable'
,idField:'id'
,url:"{:url('home/note/cate')}"
,url: "/home/note/cate"
,cellMinWidth: 100
,treeId:'id'//树形id字段名称
,treeUpId:'pid'//树形父id字段名称
@ -50,7 +50,7 @@
//表头工具栏事件
$('.add-menu').on('click', function(){
rightpage.open("{:url('home/note/cate_add')}");
rightpage.open("/home/note/cate_add");
return;
});
@ -67,7 +67,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/note/cate_delete')}",
url: "/home/note/cate_delete",
type: 'post',
data: { id: obj.data.id },
success: function (e) {

View File

@ -67,7 +67,7 @@
//监听提交
form.on('submit(webform)', function(data){
$.ajax({
url:"{:url('home/note/cate_add')}",
url: "/home/note/cate_add",
type:'post',
data:data.field,
success:function(e){

View File

@ -31,7 +31,7 @@
elem: '#test',
title: '公告列表',
toolbar: '#toolbarDemo',
url: "{:url('home/note/index')}", //数据接口
url: "/home/note/index", //数据接口
cols: [
[
{
@ -81,7 +81,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/note/add')}");
rightpage.open("/home/note/add");
return;
}
})
@ -103,7 +103,7 @@
title: '提示'
}, function(index) {
$.ajax({
url: "{:url('home/note/delete')}",
url: "/home/note/delete",
data: {
id: data.id
},

View File

@ -30,7 +30,7 @@
var tableIns = table.render({
elem: '#test'
, toolbar: '#toolbarDemo'
, url: "{:url('home/personal/change')}"
, url: "/home/personal/change"
, page: true //开启分页
, limit: 20
, cols: [[
@ -63,7 +63,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/personal/change_add')}");
rightpage.open("/home/personal/change_add");
return;
}
});

View File

@ -119,8 +119,8 @@
names:names,
dids:dids,
departments:departments,
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
type:0,
callback:function(ids,names,dids,departments){
$('[name="uid"]').val(ids);
@ -143,7 +143,7 @@
return false;
}
$.ajax({
url: "{:url('home/personal/change_add')}",
url: "/home/personal/change_add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -30,7 +30,7 @@
var tableIns = table.render({
elem: '#test'
, toolbar: '#toolbarDemo'
, url: "{:url('home/personal/leave')}"
, url: "/home/personal/leave"
, page: true //开启分页
, limit: 20
, cols: [[
@ -85,7 +85,7 @@
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
var data = checkStatus.data;
if (obj.event === 'add') {
rightpage.open("{:url('home/personal/leave_add')}");
rightpage.open("/home/personal/leave_add");
return;
}
});

View File

@ -122,8 +122,8 @@
ids:ids,
names:names,
departments:departments,
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
type:0,
callback:function(ids,names,dids,departments){
$('[name="uid"]').val(ids);
@ -139,8 +139,8 @@
employeepicker.init({
ids:ids,
names:names,
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
type:0,
callback:function(ids,names,dids,departments){
$('[name="lead_admin_id"]').val(ids);
@ -159,8 +159,8 @@
employeepicker.init({
ids:idsArray,
names:namesArray,
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
callback:function(ids,names){
$('[name="connect_uids"]').val(ids.join(',')),
$('[name="connect_names"]').val(names.join(','));
@ -179,7 +179,7 @@
return false;
}
$.ajax({
url: "{:url('home/personal/leave_add')}",
url: "/home/personal/leave_add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -81,8 +81,8 @@ user-select: none;}
ids: ids,
names: names,
type: 0,
department_url:"{:url('home/api/get_department_tree')}",
employee_url:"{:url('home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
callback: function (ids, names, dids, departments) {
uid = ids;
that.val(names);
@ -301,7 +301,7 @@ user-select: none;}
}
console.log(detail);
$.ajax({
url:"{:url('home/plan/add')}",
url: "/home/plan/add",
type:'post',
data:detail,
success:function(e){
@ -376,7 +376,7 @@ user-select: none;}
return false;
}
$.ajax({
url:"{:url('home/plan/detail')}",
url: "/home/plan/detail",
type:'post',
data:{id:id},
success:function(res){
@ -447,7 +447,7 @@ user-select: none;}
detail['end_time_b']=addZero(arg.end.getHours())+':'+addZero(arg.end.getMinutes());
console.log(detail);
$.ajax({
url:"{:url('home/plan/add')}",
url: "/home/plan/add",
type:'post',
data:detail,
success:function(e){
@ -469,7 +469,7 @@ user-select: none;}
detail['end_time_b']=addZero(arg.end.getHours())+':'+addZero(arg.end.getMinutes());
console.log(detail);
$.ajax({
url:"{:url('home/plan/add')}",
url: "/home/plan/add",
type:'post',
data:detail,
success:function(e){
@ -532,7 +532,7 @@ user-select: none;}
events: function(fetchInfo, successCallback, failureCallback ){
$.ajax({
type:"POST",
url:"{:url('home/plan/calendar')}",
url: "/home/plan/calendar",
dataType:"json",
data:{start:fetchInfo.startStr,end:fetchInfo.endStr,uid:uid},
success:function(result){

View File

@ -72,8 +72,8 @@
ids: ids,
names: names,
type: 0,
department_url:"{:url('home/api/get_department_tree')}",
employee_url:"{:url('home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
callback: function (ids, names, dids, departments) {
$('[name="uid"]').val(ids);
that.val(names);
@ -93,7 +93,7 @@
elem: '#test'
,toolbar: '#toolbarDemo'
,title:'日程安排列表'
,url:"{:url('home/plan/index')}"
,url: "/home/plan/index"
,page: true //开启分页
,limit: 20
,cellMinWidth: 80
@ -141,7 +141,7 @@
var data = obj.data;
if(obj.event === 'edit'){
$.ajax({
url:"{:url('home/plan/detail')}",
url: "/home/plan/detail",
data:{
id:data.id
},
@ -164,7 +164,7 @@
}
else if(obj.event === 'view'){
$.ajax({
url:"{:url('home/plan/detail')}",
url: "/home/plan/detail",
data:{
id:data.id
},
@ -451,7 +451,7 @@
}
console.log(detail);
$.ajax({
url:"{:url('home/plan/add')}",
url: "/home/plan/add",
type:'post',
data:detail,
success:function(e){

View File

@ -87,7 +87,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/position/add')}",
url: "/home/position/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -32,7 +32,7 @@
elem: '#test',
title: '岗位列表',
toolbar: '#toolbarDemo',
url: "{:url('home/position/index')}", //数据接口
url: "/home/position/index", //数据接口
page: false, //开启分页
cols: [
[
@ -77,7 +77,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/position/add')}");
rightpage.open("/home/position/add");
return;
}
});
@ -108,7 +108,7 @@
title: '提示'
}, function (index) {
$.ajax({
url: "{:url('home/position/delete')}",
url: "/home/position/delete",
data: {
id: data.id
},

View File

@ -127,7 +127,7 @@
form.on('submit(webform)', function (obj) {
console.log(obj.field);
$.ajax({
url: "{:url('home/role/add')}",
url: "/home/role/add",
data: obj.field,
type: 'post',
success: function (e) {

View File

@ -33,7 +33,7 @@
var tableIns = table.render({
elem: '#test',
toolbar: '#toolbarDemo',
url: "{:url('home/role/index')}", //数据接口
url: "/home/role/index", //数据接口
page: true, //开启分页
limit: 20,
cols: [[ //表头
@ -52,7 +52,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/role/add')}");
rightpage.open("/home/role/add");
return;
}
});
@ -66,7 +66,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除该权限角色吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/role/delete')}",
url: "/home/role/delete",
data: { id: data.id },
success: function (e) {
layer.msg(e.msg);

View File

@ -79,7 +79,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/rule/add')}",
url: "/home/rule/add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -24,7 +24,7 @@
id: tableId
, elem: '#' + tableId
, idField: 'id'
, url: "{:url('home/rule/index')}"
, url: "/home/rule/index"
, cellMinWidth: 100
, treeId: 'id'//树形id字段名称
, treeUpId: 'pid'//树形父id字段名称
@ -47,7 +47,7 @@
});
//表头工具栏事件
$('.add-menu').on('click',function(){
rightpage.open("{:url('home/rule/add')}");
rightpage.open("/home/rule/add");
return;
});
@ -64,7 +64,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/rule/delete')}",
url: "/home/rule/delete",
type: 'post',
data: { id: obj.data.id },
success: function (e) {

View File

@ -82,8 +82,8 @@ user-select: none;}
ids: ids,
names: names,
type: 0,
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
callback: function (ids, names, dids, departments) {
uid = ids;
that.val(names);
@ -216,7 +216,7 @@ user-select: none;}
}
console.log(detail);
$.ajax({
url:"{:url('home/schedule/add')}",
url: "/home/schedule/add",
type:'post',
data:detail,
success:function(e){
@ -285,7 +285,7 @@ user-select: none;}
return false;
}
$.ajax({
url:"{:url('home/schedule/detail')}",
url: "/home/schedule/detail",
type:'post',
data:{id:id},
success:function(res){
@ -389,7 +389,7 @@ user-select: none;}
events: function(fetchInfo, successCallback, failureCallback ){
$.ajax({
type:"POST",
url:"{:url('home/schedule/calendar')}",
url: "/home/schedule/calendar",
dataType:"json",
data:{start:fetchInfo.startStr,end:fetchInfo.endStr,uid:uid},
success:function(result){

View File

@ -28,7 +28,7 @@
elem: '#test',
title: '工作类型列表',
toolbar: '#toolbarDemo',
url: "{:url('home/schedule/cate')}",
url: "/home/schedule/cate",
page: true, //开启分页
limit: 20,
cols: [
@ -51,7 +51,7 @@
//表头工具栏事件
table.on('toolbar(test)', function(obj){
if (obj.event === 'add') {
rightpage.open("{:url('home/schedule/cate_add')}");
rightpage.open("/home/schedule/cate_add");
return;
}
});
@ -65,7 +65,7 @@
if (obj.event === 'del') {
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
$.ajax({
url: "{:url('home/schedule/delete')}",
url: "/home/schedule/delete",
data: { id: data.id },
success: function (e) {
layer.msg(e.msg);

View File

@ -81,7 +81,7 @@
//监听提交
form.on('submit(webform)', function (data) {
$.ajax({
url: "{:url('home/schedule/cate_add')}",
url: "/home/schedule/cate_add",
type: 'post',
data: data.field,
success: function (e) {

View File

@ -71,8 +71,8 @@
ids: ids,
names: names,
type: 0,
department_url:"{:url('/home/api/get_department_tree')}",
employee_url:"{:url('/home/api/get_employee')}",
department_url: "/home/api/get_department_tree",
employee_url: "/home/api/get_employee",
callback: function (ids, names, dids, departments) {
$('[name="uid"]').val(ids);
that.val(names);
@ -92,7 +92,7 @@
elem: '#test'
,toolbar: '#toolbarDemo'
,title:'工作记录列表'
,url:"{:url('home/schedule/index')}"
,url: "/home/schedule/index"
,page: true //开启分页
,limit: 20
,cellMinWidth: 80
@ -212,7 +212,7 @@
return;
}
$.ajax({
url:"{:url('home/schedule/update_labor_time')}",
url: "/home/schedule/update_labor_time",
type:'post',
data:{
id:data.id,
@ -237,7 +237,7 @@
}
else if(obj.event === 'edit'){
$.ajax({
url:"{:url('home/schedule/detail')}",
url: "/home/schedule/detail",
data:{
id:data.id
},
@ -250,7 +250,7 @@
}
else if(obj.event === 'view'){
$.ajax({
url:"{:url('home/schedule/detail')}",
url: "/home/schedule/detail",
data:{
id:data.id
},
@ -325,7 +325,7 @@
}
console.log(detail);
$.ajax({
url:"{:url('home/schedule/add')}",
url: "/home/schedule/add",
type:'post',
data:detail,
success:function(e){
@ -522,7 +522,7 @@
}
console.log(detail);
$.ajax({
url:"{:url('home/schedule/add')}",
url: "/home/schedule/add",
type:'post',
data:detail,
success:function(e){

View File

@ -36,7 +36,7 @@
</tr>
</table>
<div class="layui-form-item" style="padding-top:10px;">
<a class="layui-btn layui-btn-primary" href="{:url('home/schedule/list')}">返回</a>
<a class="layui-btn layui-btn-primary" href="/home/schedule/list">返回</a>
</div>
</form>
<!-- /主体 -->