优化url地址,兼容php7.3,php7.4
This commit is contained in:
parent
a816e367d6
commit
2eba6eab5a
@ -102,6 +102,20 @@ function format_bytes($size, $delimiter = '')
|
|||||||
return round($size, 2) . $delimiter . $units[$i];
|
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
|
*数据处理成树形格式1
|
||||||
* @return array
|
* @return array
|
||||||
|
@ -205,7 +205,7 @@ class Admin extends BaseController
|
|||||||
add_log('view', get_params('id'));
|
add_log('view', get_params('id'));
|
||||||
return view();
|
return view();
|
||||||
}
|
}
|
||||||
//禁用,离职,恢复
|
//禁用,恢复
|
||||||
public function set()
|
public function set()
|
||||||
{
|
{
|
||||||
$type = get_params("type");
|
$type = get_params("type");
|
||||||
@ -224,11 +224,9 @@ class Admin extends BaseController
|
|||||||
}
|
}
|
||||||
foreach ($list as $key => $v) {
|
foreach ($list as $key => $v) {
|
||||||
if (Db::name('Admin')->update($v) !== false) {
|
if (Db::name('Admin')->update($v) !== false) {
|
||||||
if ($type = 0) {
|
if ($type == 0) {
|
||||||
add_log('disable', $v['id']);
|
add_log('disable', $v['id']);
|
||||||
} else if ($type = 1) {
|
} else if ($type == 1) {
|
||||||
add_log('leave', $v['id']);
|
|
||||||
} else if ($type = 2) {
|
|
||||||
add_log('recovery', $v['id']);
|
add_log('recovery', $v['id']);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@
|
|||||||
//头像上传
|
//头像上传
|
||||||
var uploadInst = upload.render({
|
var uploadInst = upload.render({
|
||||||
elem: "#test1",
|
elem: "#test1",
|
||||||
url: "{:url('home/api/upload')}",
|
url: "/home/api/upload",
|
||||||
done: function (e) {
|
done: function (e) {
|
||||||
//如果上传失败
|
//如果上传失败
|
||||||
if (e.code == 1) {
|
if (e.code == 1) {
|
||||||
@ -219,7 +219,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/admin/add')}",
|
url: "/home/admin/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -44,7 +44,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/api/edit_password')}",
|
url: "/home/api/edit_password",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -74,7 +74,7 @@
|
|||||||
//头像上传
|
//头像上传
|
||||||
var uploadInst = upload.render({
|
var uploadInst = upload.render({
|
||||||
elem: '#test1',
|
elem: '#test1',
|
||||||
url: "{:url('home/api/upload')}",
|
url: "/home/api/upload",
|
||||||
done: function (e) {
|
done: function (e) {
|
||||||
//如果上传失败
|
//如果上传失败
|
||||||
if (e.code == 1) {
|
if (e.code == 1) {
|
||||||
@ -91,7 +91,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/api/edit_personal')}",
|
url: "/home/api/edit_personal",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -71,7 +71,7 @@
|
|||||||
form = layui.form;
|
form = layui.form;
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/api/get_department_tree')}",
|
url: "/home/api/get_department_tree",
|
||||||
type:'post',
|
type:'post',
|
||||||
success:function(res){
|
success:function(res){
|
||||||
//仅节点左侧图标控制收缩
|
//仅节点左侧图标控制收缩
|
||||||
@ -100,7 +100,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '员工列表',
|
title: '员工列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/admin/index')}", //数据接口
|
url: "/home/admin/index", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -231,7 +231,7 @@
|
|||||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||||
var data = checkStatus.data;
|
var data = checkStatus.data;
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/admin/add')}");
|
rightpage.open("/home/admin/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.length==0){
|
if(data.length==0){
|
||||||
@ -258,7 +258,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/admin/set')}",
|
url: "/home/admin/set",
|
||||||
data: {
|
data: {
|
||||||
ids: uidArray.join(','),
|
ids: uidArray.join(','),
|
||||||
type:type
|
type:type
|
||||||
@ -320,7 +320,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/admin/reset_psw')}",
|
url: "/home/admin/reset_psw",
|
||||||
data: {
|
data: {
|
||||||
id: id
|
id: id
|
||||||
},
|
},
|
||||||
|
@ -35,7 +35,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '操作日志列表',
|
title: '操作日志列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/admin/log')}", //数据接口
|
url: "/home/admin/log", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
|
@ -27,7 +27,7 @@
|
|||||||
var page=1,limit=20;
|
var page=1,limit=20;
|
||||||
function getLogs() {
|
function getLogs() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/api/get_log_list')}",
|
url: "/home/api/get_log_list",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
page:page,
|
page:page,
|
||||||
|
@ -182,7 +182,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/admin/reset_psw')}",
|
url: "/home/admin/reset_psw",
|
||||||
data: {
|
data: {
|
||||||
id: id
|
id: id
|
||||||
},
|
},
|
||||||
|
@ -93,7 +93,7 @@ function init(layui) {
|
|||||||
, upload = layui.upload;
|
, upload = layui.upload;
|
||||||
|
|
||||||
var tags = new tagspicker({
|
var tags = new tagspicker({
|
||||||
'url': "{:url('home/api/get_keyword_cate')}",
|
'url': "/home/api/get_keyword_cate",
|
||||||
'target': 'keyword_name',
|
'target': 'keyword_name',
|
||||||
'tag_ids': 'keyword_id',
|
'tag_ids': 'keyword_id',
|
||||||
'tag_tags': 'keyword_name',
|
'tag_tags': 'keyword_name',
|
||||||
@ -104,7 +104,7 @@ function init(layui) {
|
|||||||
//封面上传
|
//封面上传
|
||||||
var uploadInst = upload.render({
|
var uploadInst = upload.render({
|
||||||
elem: '#test1'
|
elem: '#test1'
|
||||||
, url: "{:url('home/api/upload')}"
|
, url: "/home/api/upload"
|
||||||
, done: function (res) {
|
, done: function (res) {
|
||||||
//如果上传失败
|
//如果上传失败
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
@ -119,7 +119,7 @@ function init(layui) {
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/article/add')}",
|
url: "/home/article/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
id:'treeTable'
|
id:'treeTable'
|
||||||
,elem: '#treeTable'
|
,elem: '#treeTable'
|
||||||
,idField:'id'
|
,idField:'id'
|
||||||
,url:"{:url('home/article/cate')}"
|
,url: "/home/article/cate"
|
||||||
,cellMinWidth: 100
|
,cellMinWidth: 100
|
||||||
,treeId:'id'//树形id字段名称
|
,treeId:'id'//树形id字段名称
|
||||||
,treeUpId:'pid'//树形父id字段名称
|
,treeUpId:'pid'//树形父id字段名称
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
$('.add-menu').on('click', function(){
|
$('.add-menu').on('click', function(){
|
||||||
rightpage.open("{:url('home/article/cate_add')}");
|
rightpage.open("/home/article/cate_add");
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -66,7 +66,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/article/cate_delete')}",
|
url: "/home/article/cate_delete",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: { id: obj.data.id },
|
data: { id: obj.data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function(data){
|
form.on('submit(webform)', function(data){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/article/cate_add')}",
|
url: "/home/article/cate_add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
|
@ -94,7 +94,7 @@
|
|||||||
, upload = layui.upload;
|
, upload = layui.upload;
|
||||||
|
|
||||||
var tags = new tagspicker({
|
var tags = new tagspicker({
|
||||||
'url': "{:url('home/api/get_keyword_cate')}",
|
'url': "/home/api/get_keyword_cate",
|
||||||
'target': 'keyword_name',
|
'target': 'keyword_name',
|
||||||
'tag_ids': 'keyword_id',
|
'tag_ids': 'keyword_id',
|
||||||
'tag_tags': 'keyword_name',
|
'tag_tags': 'keyword_name',
|
||||||
@ -104,9 +104,9 @@
|
|||||||
|
|
||||||
//封面上传
|
//封面上传
|
||||||
var uploadInst = upload.render({
|
var uploadInst = upload.render({
|
||||||
elem: '#test1'
|
elem: '#test1',
|
||||||
, url: "{:url('home/api/upload')}"
|
url: "/home/api/upload",
|
||||||
, done: function (res) {
|
done: function (res) {
|
||||||
//如果上传失败
|
//如果上传失败
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
return layer.msg('上传失败');
|
return layer.msg('上传失败');
|
||||||
@ -120,7 +120,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/article/add')}",
|
url: "/home/article/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -38,7 +38,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '文章列表',
|
title: '文章列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/article/index')}", //数据接口
|
url: "/home/article/index", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
|
@ -49,7 +49,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '文章列表',
|
title: '文章列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/article/list')}", //数据接口
|
url: "/home/article/list", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -103,7 +103,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/article/add')}");
|
rightpage.open("/home/article/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -124,7 +124,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function(index) {
|
}, function(index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/article/delete')}",
|
url: "/home/article/delete",
|
||||||
data: {
|
data: {
|
||||||
id: data.id
|
id: data.id
|
||||||
},
|
},
|
||||||
|
@ -85,8 +85,8 @@
|
|||||||
namesArray=names.split(',');
|
namesArray=names.split(',');
|
||||||
}
|
}
|
||||||
employeepicker.init({
|
employeepicker.init({
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
ids:idsArray,
|
ids:idsArray,
|
||||||
names:namesArray,
|
names:namesArray,
|
||||||
type:0,
|
type:0,
|
||||||
@ -103,7 +103,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/check/add')}",
|
url: "/home/check/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '配置列表',
|
title: '配置列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/check/index')}",
|
url: "/home/check/index",
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -62,7 +62,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/check/add')}");
|
rightpage.open("/home/check/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -76,7 +76,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/check/delete')}",
|
url: "/home/check/delete",
|
||||||
data: { id: data.id },
|
data: { id: data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
|
@ -50,7 +50,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/conf/add')}",
|
url: "/home/conf/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -82,7 +82,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/conf/edit')}",
|
url: "/home/conf/edit",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
@ -111,7 +111,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/api/email_test')}",
|
url: "/home/api/email_test",
|
||||||
data: { email: value },
|
data: { email: value },
|
||||||
type: "post",
|
type: "post",
|
||||||
beforeSend: function () {
|
beforeSend: function () {
|
||||||
|
@ -29,7 +29,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '配置列表',
|
title: '配置列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/conf/index')}",
|
url: "/home/conf/index",
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -80,7 +80,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/conf/delete')}",
|
url: "/home/conf/delete",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
id: obj.data.id
|
id: obj.data.id
|
||||||
@ -100,7 +100,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/conf/add')}");
|
rightpage.open("/home/conf/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/conf/edit')}",
|
url: "/home/conf/edit",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -55,7 +55,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/conf/edit')}",
|
url: "/home/conf/edit",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
@ -83,7 +83,7 @@
|
|||||||
headers: {
|
headers: {
|
||||||
Token: token
|
Token: token
|
||||||
},
|
},
|
||||||
url: "{:url('home/api/index/demo')}",
|
url: "/home/api/index/demo",
|
||||||
type: "get",
|
type: "get",
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
$('#res').html(JSON.stringify(res));
|
$('#res').html(JSON.stringify(res));
|
||||||
@ -128,7 +128,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/api/index/reg')}",
|
url: "/home/api/index/reg",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:{username:username,pwd:password},
|
data:{username:username,pwd:password},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
@ -172,7 +172,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/api/index/login')}",
|
url: "/home/api/index/login",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:{username:username,password:password},
|
data:{username:username,password:password},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
|
@ -96,7 +96,7 @@
|
|||||||
//logo上传
|
//logo上传
|
||||||
var uploadInst = upload.render({
|
var uploadInst = upload.render({
|
||||||
elem: '#test1',
|
elem: '#test1',
|
||||||
url: "{:url('home/api/upload')}",
|
url: "/home/api/upload",
|
||||||
done: function (res) {
|
done: function (res) {
|
||||||
//如果上传失败
|
//如果上传失败
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
@ -112,7 +112,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/conf/edit')}",
|
url: "/home/conf/edit",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -72,7 +72,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/database/del')}",
|
url: "/home/database/del",
|
||||||
data: {'id':id},
|
data: {'id':id},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '数据备份',
|
title: '数据备份',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/database/database')}", //数据接口
|
url: "/home/database/database", //数据接口
|
||||||
page: false,
|
page: false,
|
||||||
cols: [
|
cols: [
|
||||||
[ //表头
|
[ //表头
|
||||||
@ -98,7 +98,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/database/backup')}",
|
url: "/home/database/backup",
|
||||||
data: {'id':ids},
|
data: {'id':ids},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -115,7 +115,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/database/optimize')}",
|
url: "/home/database/optimize",
|
||||||
data: {'id':ids},
|
data: {'id':ids},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -132,7 +132,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/database/repair')}",
|
url: "/home/database/repair",
|
||||||
data: {'id':ids},
|
data: {'id':ids},
|
||||||
success: function (res) {
|
success: function (res) {
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
|
@ -78,7 +78,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function(data) {
|
form.on('submit(webform)', function(data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/department/add')}",
|
url: "/home/department/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function(e) {
|
success: function(e) {
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
id: 'treeTable'
|
id: 'treeTable'
|
||||||
, elem: '#treeTable'
|
, elem: '#treeTable'
|
||||||
, idField: 'id'
|
, idField: 'id'
|
||||||
, url: "{:url('home/department/index')}"
|
, url: "/home/department/index"
|
||||||
, cellMinWidth: 100
|
, cellMinWidth: 100
|
||||||
, treeId: 'id'//树形id字段名称
|
, treeId: 'id'//树形id字段名称
|
||||||
, treeUpId: 'pid'//树形父id字段名称
|
, treeUpId: 'pid'//树形父id字段名称
|
||||||
@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
$('.body-table').on('click','.add-menu', function(){
|
$('.body-table').on('click','.add-menu', function(){
|
||||||
rightpage.open("{:url('home/department/add')}");
|
rightpage.open("/home/department/add");
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -64,7 +64,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/department/delete')}",
|
url: "/home/department/delete",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: { id: obj.data.id },
|
data: { id: obj.data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -190,7 +190,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function(index) {
|
}, function(index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('/home/expense/add')}",
|
url: "/home/expense/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -234,7 +234,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function(index) {
|
}, function(index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/api/del_expense_interfix')}",
|
url: "/home/api/del_expense_interfix",
|
||||||
data: {
|
data: {
|
||||||
id: _id
|
id: _id
|
||||||
},
|
},
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
,title:'报销类别列表'
|
,title:'报销类别列表'
|
||||||
,url:"{:url('home/expense/cate')}"
|
,url: "/home/expense/cate"
|
||||||
,page: true //开启分页
|
,page: true //开启分页
|
||||||
,limit: 20
|
,limit: 20
|
||||||
,cellMinWidth: 80
|
,cellMinWidth: 80
|
||||||
@ -64,7 +64,7 @@
|
|||||||
if(obj.event === 'disable'){
|
if(obj.event === 'disable'){
|
||||||
layer.confirm('确定要禁用该类别吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定要禁用该类别吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/expense/cate_add')}",
|
url: "/home/expense/cate_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
id: obj.data.id,
|
id: obj.data.id,
|
||||||
@ -84,7 +84,7 @@
|
|||||||
if(obj.event === 'open'){
|
if(obj.event === 'open'){
|
||||||
layer.confirm('确定要启用该类别吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定要启用该类别吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/expense/cate_add')}",
|
url: "/home/expense/cate_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
id: obj.data.id,
|
id: obj.data.id,
|
||||||
@ -120,7 +120,7 @@
|
|||||||
var value = layero.find(".layui-layer-input").val();
|
var value = layero.find(".layui-layer-input").val();
|
||||||
if (value) {
|
if (value) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/expense/cate_add')}",
|
url: "/home/expense/cate_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
id: id,
|
id: id,
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '报销管理列表',
|
title: '报销管理列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/expense/index')}", //数据接口
|
url: "/home/expense/index", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -168,7 +168,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/expense/add')}");
|
rightpage.open("/home/expense/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -189,7 +189,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function(index) {
|
}, function(index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/expense/delete')}",
|
url: "/home/expense/delete",
|
||||||
data: {
|
data: {
|
||||||
id: data.id
|
id: data.id
|
||||||
},
|
},
|
||||||
|
@ -128,7 +128,7 @@ function init(layui) {
|
|||||||
}
|
}
|
||||||
layer.confirm('确定审核通过该报销申请?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定审核通过该报销申请?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/expense/check')}",
|
url: "/home/expense/check",
|
||||||
data:{id:id,check_status:2,pay_admin_id:pay_admin},
|
data:{id:id,check_status:2,pay_admin_id:pay_admin},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -153,7 +153,7 @@ function init(layui) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/expense/check')}",
|
url: "/home/expense/check",
|
||||||
data:{id:id,check_status:0,check_remark:text},
|
data:{id:id,check_status:0,check_remark:text},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -174,7 +174,7 @@ function init(layui) {
|
|||||||
var id=$('#id').val();
|
var id=$('#id').val();
|
||||||
layer.confirm('确定已经打款?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定已经打款?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/expense/check')}",
|
url: "/home/expense/check",
|
||||||
data:{id:id,check_status:3},
|
data:{id:id,check_status:3},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
|
@ -214,7 +214,7 @@ function init(layui) {
|
|||||||
var inid=that.data('inid');
|
var inid=that.data('inid');
|
||||||
layer.confirm('确定要删除该到账记录?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定要删除该到账记录?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/income/delete')}",
|
url: "/home/income/delete",
|
||||||
data:{id:id,inid:inid},
|
data:{id:id,inid:inid},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -237,7 +237,7 @@ function init(layui) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/income/add')}",
|
url: "/home/income/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(res){
|
success:function(res){
|
||||||
@ -257,7 +257,7 @@ function init(layui) {
|
|||||||
var inid=$('#inid').val();
|
var inid=$('#inid').val();
|
||||||
layer.confirm('确定要全部反到账?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定要全部反到账?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/income/add')}",
|
url: "/home/income/add",
|
||||||
data:{inid:inid,enter_type:3},
|
data:{inid:inid,enter_type:3},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -292,7 +292,7 @@ function init(layui) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/income/add')}",
|
url: "/home/income/add",
|
||||||
data:{inid:inid,enter_type:2,enter_time:enter_time},
|
data:{inid:inid,enter_type:2,enter_time:enter_time},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
|
@ -53,7 +53,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '到账列表',
|
title: '到账列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/income/index')}", //数据接口
|
url: "/home/income/index", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
<div class="layui-side ittab-bg-gray">
|
<div class="layui-side ittab-bg-gray">
|
||||||
<div class="ittab-menulist">
|
<div class="ittab-menulist">
|
||||||
<div class="ittab-menulist-top">
|
<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>
|
||||||
<div class="ittab-menulist-1">
|
<div class="ittab-menulist-1">
|
||||||
{foreach name="menu" item="a"}
|
{foreach name="menu" item="a"}
|
||||||
@ -87,7 +87,7 @@
|
|||||||
<div class="layui-icon layui-icon-next" id="right_button" title="向右滚动菜单"></div>
|
<div class="layui-icon layui-icon-next" id="right_button" title="向右滚动菜单"></div>
|
||||||
<div class="layui-tab-content" style="height: 100%;">
|
<div class="layui-tab-content" style="height: 100%;">
|
||||||
<div class="layui-tab-item layui-show">
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -106,12 +106,12 @@
|
|||||||
layer.confirm('确认注销登录吗?', { icon: 7, title: '警告' }, function (index) {
|
layer.confirm('确认注销登录吗?', { icon: 7, title: '警告' }, function (index) {
|
||||||
//注销
|
//注销
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/login/login_out')}",
|
url: "/home/login/login_out",
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
if (e.code == 0) {
|
if (e.code == 0) {
|
||||||
setTimeout(function () {
|
setTimeout(function () {
|
||||||
location.href = "{:url('home/login/index')}"
|
location.href = "/home/login/index"
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -123,7 +123,7 @@
|
|||||||
//轮循获取消息
|
//轮循获取消息
|
||||||
var getStatus = setInterval(function () {
|
var getStatus = setInterval(function () {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/index/index')}",
|
url: "/home/index/index",
|
||||||
type:'post',
|
type:'post',
|
||||||
success:function(e){
|
success:function(e){
|
||||||
if(e.code==0 && e.data!=''){
|
if(e.code==0 && e.data!=''){
|
||||||
|
@ -161,7 +161,7 @@
|
|||||||
<div class="table-title">员工动态</div>
|
<div class="table-title">员工动态</div>
|
||||||
<div class="layui-card-body">
|
<div class="layui-card-body">
|
||||||
<ul class="layui-timeline" id="logs"></ul>
|
<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>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@ -181,7 +181,7 @@
|
|||||||
//公告
|
//公告
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#Note'
|
elem: '#Note'
|
||||||
, url: "{:url('home/api/get_note_list')}" //数据接口
|
, url: "/home/api/get_note_list" //数据接口
|
||||||
, page: false //开启分页
|
, page: false //开启分页
|
||||||
, cols: [[ //表头
|
, cols: [[ //表头
|
||||||
{ field: 'cate_title', title: '公告分类', align: 'center','width': 90 },
|
{ field: 'cate_title', title: '公告分类', align: 'center','width': 90 },
|
||||||
@ -196,7 +196,7 @@
|
|||||||
//文章
|
//文章
|
||||||
table.render({
|
table.render({
|
||||||
elem: '#Article'
|
elem: '#Article'
|
||||||
, url: "{:url('home/api/get_article_list')}" //数据接口
|
, url: "/home/api/get_article_list" //数据接口
|
||||||
, page: false //开启分页
|
, page: false //开启分页
|
||||||
, cols: [[ //表头
|
, cols: [[ //表头
|
||||||
{ field: 'cate_title', title: '知识分类', align: 'center','width': 90 },
|
{ field: 'cate_title', title: '知识分类', align: 'center','width': 90 },
|
||||||
@ -234,7 +234,7 @@
|
|||||||
|
|
||||||
function get_logs() {
|
function get_logs() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/api/get_log_list')}",
|
url: "/home/api/get_log_list",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
page: 1,
|
page: 1,
|
||||||
@ -269,7 +269,7 @@
|
|||||||
var chartView = echarts.init(document.getElementById('chartView'));
|
var chartView = echarts.init(document.getElementById('chartView'));
|
||||||
function get_view_data() {
|
function get_view_data() {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/api/get_view_data')}",
|
url: "/home/api/get_view_data",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {},
|
data: {},
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -179,7 +179,7 @@
|
|||||||
form.on('submit(webform)', function(data){
|
form.on('submit(webform)', function(data){
|
||||||
|
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('/home/invoice/add')}",
|
url: "/home/invoice/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '发票列表',
|
title: '发票列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/invoice/index')}", //数据接口
|
url: "/home/invoice/index", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -196,7 +196,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/invoice/add')}");
|
rightpage.open("/home/invoice/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -217,7 +217,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function(index) {
|
}, function(index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/invoice/delete')}",
|
url: "/home/invoice/delete",
|
||||||
data: {
|
data: {
|
||||||
id: data.id
|
id: data.id
|
||||||
},
|
},
|
||||||
@ -237,7 +237,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function(index) {
|
}, function(index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/invoice/check')}",
|
url: "/home/invoice/check",
|
||||||
data: {
|
data: {
|
||||||
id: data.id,
|
id: data.id,
|
||||||
invoice_status:10
|
invoice_status:10
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
,title:'报销类别列表'
|
,title:'报销类别列表'
|
||||||
,url:"{:url('home/invoice/subject')}"
|
,url: "/home/invoice/subject"
|
||||||
,page: true //开启分页
|
,page: true //开启分页
|
||||||
,limit: 20
|
,limit: 20
|
||||||
,cellMinWidth: 80
|
,cellMinWidth: 80
|
||||||
@ -64,7 +64,7 @@
|
|||||||
if(obj.event === 'disable'){
|
if(obj.event === 'disable'){
|
||||||
layer.confirm('确定要禁用该发票主体吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定要禁用该发票主体吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/invoice/subject_add')}",
|
url: "/home/invoice/subject_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
id: obj.data.id,
|
id: obj.data.id,
|
||||||
@ -84,7 +84,7 @@
|
|||||||
if(obj.event === 'open'){
|
if(obj.event === 'open'){
|
||||||
layer.confirm('确定要启用该发票主体吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定要启用该发票主体吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/invoice/subject_add')}",
|
url: "/home/invoice/subject_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
id: obj.data.id,
|
id: obj.data.id,
|
||||||
@ -120,7 +120,7 @@
|
|||||||
var value = layero.find(".layui-layer-input").val();
|
var value = layero.find(".layui-layer-input").val();
|
||||||
if (value) {
|
if (value) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/invoice/subject_add')}",
|
url: "/home/invoice/subject_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: {
|
data: {
|
||||||
id: id,
|
id: id,
|
||||||
|
@ -143,7 +143,7 @@ function init(layui) {
|
|||||||
}
|
}
|
||||||
layer.confirm('确定审核通过该发票申请?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定审核通过该发票申请?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/invoice/check')}",
|
url: "/home/invoice/check",
|
||||||
data:{id:id,invoice_status:2,open_admin_id:open_admin},
|
data:{id:id,invoice_status:2,open_admin_id:open_admin},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -168,7 +168,7 @@ function init(layui) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/invoice/check')}",
|
url: "/home/invoice/check",
|
||||||
data:{id:id,invoice_status:0,check_remark:text},
|
data:{id:id,invoice_status:0,check_remark:text},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
@ -194,7 +194,7 @@ function init(layui) {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/invoice/check')}",
|
url: "/home/invoice/check",
|
||||||
data:{id:id,invoice_status:3,code:text},
|
data:{id:id,invoice_status:3,code:text},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
layer.msg(res.msg);
|
layer.msg(res.msg);
|
||||||
|
@ -45,7 +45,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/keywords/add')}",
|
url: "/home/keywords/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '关键字列表',
|
title: '关键字列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/keywords/index')}",
|
url: "/home/keywords/index",
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -91,7 +91,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/keywords/add')}");
|
rightpage.open("/home/keywords/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -105,7 +105,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/keywords/delete')}",
|
url: "/home/keywords/delete",
|
||||||
data: { id: data.id },
|
data: { id: data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
|
@ -83,7 +83,7 @@
|
|||||||
$ = layui.$;
|
$ = layui.$;
|
||||||
form.on('submit(login-submit)', function(data) {
|
form.on('submit(login-submit)', function(data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('/home/login/login_submit')}",
|
url: "/home/login/login_submit",
|
||||||
data: $('#gougu-login').serialize(),
|
data: $('#gougu-login').serialize(),
|
||||||
type: 'post',
|
type: 'post',
|
||||||
async: false,
|
async: false,
|
||||||
|
@ -195,14 +195,14 @@
|
|||||||
//监听保存到草稿并发送
|
//监听保存到草稿并发送
|
||||||
form.on('submit(webform)', function(data){
|
form.on('submit(webform)', function(data){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/save')}",
|
url: "/home/mail/save",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
if(e.code==0){
|
if(e.code==0){
|
||||||
layer.msg('消息保存成功,正在发送中...');
|
layer.msg('消息保存成功,正在发送中...');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/send')}",
|
url: "/home/mail/send",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:{'id':e.data},
|
data:{'id':e.data},
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -226,7 +226,7 @@
|
|||||||
//监听保存到草稿
|
//监听保存到草稿
|
||||||
form.on('submit(draftform)', function(data){
|
form.on('submit(draftform)', function(data){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/save')}",
|
url: "/home/mail/save",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -249,7 +249,7 @@
|
|||||||
var demoListView = $('#demoList')
|
var demoListView = $('#demoList')
|
||||||
,uploadListIns = upload.render({
|
,uploadListIns = upload.render({
|
||||||
elem: '#testList'
|
elem: '#testList'
|
||||||
,url: "{:url('home/api/upload')}"
|
,url: "/home/api/upload"
|
||||||
,accept: 'file'
|
,accept: 'file'
|
||||||
,multiple: true
|
,multiple: true
|
||||||
,auto: false
|
,auto: false
|
||||||
@ -356,8 +356,8 @@
|
|||||||
namesArray=names.split(',');
|
namesArray=names.split(',');
|
||||||
}
|
}
|
||||||
employeepicker.init({
|
employeepicker.init({
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
ids:idsArray,
|
ids:idsArray,
|
||||||
names:namesArray,
|
names:namesArray,
|
||||||
callback:function(ids,names){
|
callback:function(ids,names){
|
||||||
@ -379,7 +379,7 @@
|
|||||||
content:tpl,
|
content:tpl,
|
||||||
success:function(){
|
success:function(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('/home/api/get_department_tree')}",
|
url: "/home/api/get_department_tree",
|
||||||
type:'post',
|
type:'post',
|
||||||
success:function(res){
|
success:function(res){
|
||||||
dtree.render({
|
dtree.render({
|
||||||
@ -422,7 +422,7 @@
|
|||||||
success:function(){
|
success:function(){
|
||||||
tableid=table.render({
|
tableid=table.render({
|
||||||
elem: '#vaeservice'
|
elem: '#vaeservice'
|
||||||
,url:"{:url('/home/api/get_position')}"
|
,url: "/home/api/get_position"
|
||||||
,page: false //开启分页
|
,page: false //开启分页
|
||||||
,cols: [[
|
,cols: [[
|
||||||
{type:'checkbox',title: '选择'}
|
{type:'checkbox',title: '选择'}
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
title:'草稿箱',
|
title:'草稿箱',
|
||||||
url: "{:url('home/mail/draft')}", //数据接口
|
url: "/home/mail/draft", //数据接口
|
||||||
page: true ,//开启分页
|
page: true ,//开启分页
|
||||||
limit: 15,
|
limit: 15,
|
||||||
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
@ -80,7 +80,7 @@
|
|||||||
if(obj.event === 'del'){
|
if(obj.event === 'del'){
|
||||||
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data:{ids:data.id,type:2,source:2},
|
data:{ids:data.id,type:2,source:2},
|
||||||
success:function(e){
|
success:function(e){
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
@ -102,7 +102,7 @@
|
|||||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||||
var data = checkStatus.data;
|
var data = checkStatus.data;
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/mail/add')}");
|
rightpage.open("/home/mail/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.length==0){
|
if(data.length==0){
|
||||||
@ -125,7 +125,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data: {
|
data: {
|
||||||
ids: idArray.join(','),
|
ids: idArray.join(','),
|
||||||
type:type,
|
type:type,
|
||||||
|
@ -75,7 +75,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
title:'收件箱',
|
title:'收件箱',
|
||||||
url: "{:url('home/mail/inbox')}", //数据接口
|
url: "/home/mail/inbox", //数据接口
|
||||||
page: true ,//开启分页
|
page: true ,//开启分页
|
||||||
limit: 15,
|
limit: 15,
|
||||||
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
@ -104,7 +104,7 @@
|
|||||||
if(obj.event === 'del'){
|
if(obj.event === 'del'){
|
||||||
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data:{ids:data.id,type:2,source:3},
|
data:{ids:data.id,type:2,source:3},
|
||||||
success:function(e){
|
success:function(e){
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
@ -135,7 +135,7 @@
|
|||||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||||
var data = checkStatus.data;
|
var data = checkStatus.data;
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/mail/add')}");
|
rightpage.open("/home/mail/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.length==0){
|
if(data.length==0){
|
||||||
@ -162,7 +162,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data: {
|
data: {
|
||||||
ids: idArray.join(','),
|
ids: idArray.join(','),
|
||||||
type:type,
|
type:type,
|
||||||
|
@ -142,14 +142,14 @@
|
|||||||
//监听保存到草稿并发送
|
//监听保存到草稿并发送
|
||||||
form.on('submit(webform)', function(data){
|
form.on('submit(webform)', function(data){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/save')}",
|
url: "/home/mail/save",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
if(e.code==0){
|
if(e.code==0){
|
||||||
layer.msg('消息保存成功,正在发送中...');
|
layer.msg('消息保存成功,正在发送中...');
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/send')}",
|
url: "/home/mail/send",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:{'id':e.data},
|
data:{'id':e.data},
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -173,7 +173,7 @@
|
|||||||
//监听保存到草稿
|
//监听保存到草稿
|
||||||
form.on('submit(draftform)', function(data){
|
form.on('submit(draftform)', function(data){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/save')}",
|
url: "/home/mail/save",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -196,7 +196,7 @@
|
|||||||
var demoListView = $('#demoList')
|
var demoListView = $('#demoList')
|
||||||
,uploadListIns = upload.render({
|
,uploadListIns = upload.render({
|
||||||
elem: '#testList'
|
elem: '#testList'
|
||||||
,url: "{:url('home/api/upload')}"
|
,url: "/home/api/upload"
|
||||||
,accept: 'file'
|
,accept: 'file'
|
||||||
,multiple: true
|
,multiple: true
|
||||||
,auto: false
|
,auto: false
|
||||||
@ -303,8 +303,8 @@
|
|||||||
namesArray=names.split(',');
|
namesArray=names.split(',');
|
||||||
}
|
}
|
||||||
employeepicker.init({
|
employeepicker.init({
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
ids:idsArray,
|
ids:idsArray,
|
||||||
names:namesArray,
|
names:namesArray,
|
||||||
callback:function(ids,names){
|
callback:function(ids,names){
|
||||||
@ -326,7 +326,7 @@
|
|||||||
content:tpl,
|
content:tpl,
|
||||||
success:function(){
|
success:function(){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('/home/api/get_department_tree')}",
|
url: "/home/api/get_department_tree",
|
||||||
type:'post',
|
type:'post',
|
||||||
success:function(res){
|
success:function(res){
|
||||||
dtree.render({
|
dtree.render({
|
||||||
@ -369,7 +369,7 @@
|
|||||||
success:function(){
|
success:function(){
|
||||||
tableid=table.render({
|
tableid=table.render({
|
||||||
elem: '#vaeservice'
|
elem: '#vaeservice'
|
||||||
,url:"{:url('/home/api/get_position')}"
|
,url: "/home/api/get_position"
|
||||||
,page: false //开启分页
|
,page: false //开启分页
|
||||||
,cols: [[
|
,cols: [[
|
||||||
{type:'checkbox',title: '选择'}
|
{type:'checkbox',title: '选择'}
|
||||||
|
@ -60,7 +60,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
title:'垃圾箱',
|
title:'垃圾箱',
|
||||||
url: "{:url('home/mail/rubbish')}", //数据接口
|
url: "/home/mail/rubbish", //数据接口
|
||||||
page: true ,//开启分页
|
page: true ,//开启分页
|
||||||
limit: 15,
|
limit: 15,
|
||||||
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
@ -86,7 +86,7 @@
|
|||||||
if(obj.event === 'del'){
|
if(obj.event === 'del'){
|
||||||
layer.confirm('确定把该信息彻底删除吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定把该信息彻底删除吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data:{ids:data.id,type:4},
|
data:{ids:data.id,type:4},
|
||||||
success:function(e){
|
success:function(e){
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
@ -101,7 +101,7 @@
|
|||||||
if(obj.event === 'recover'){
|
if(obj.event === 'recover'){
|
||||||
layer.confirm('确定把该信息移出垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定把该信息移出垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data:{ids:data.id,type:3},
|
data:{ids:data.id,type:3},
|
||||||
success:function(e){
|
success:function(e){
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
@ -120,7 +120,7 @@
|
|||||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||||
var data = checkStatus.data;
|
var data = checkStatus.data;
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/mail/add')}");
|
rightpage.open("/home/mail/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.length==0){
|
if(data.length==0){
|
||||||
@ -147,7 +147,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data: {
|
data: {
|
||||||
ids: idArray.join(','),
|
ids: idArray.join(','),
|
||||||
type:type
|
type:type
|
||||||
|
@ -59,7 +59,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
title:'发件箱',
|
title:'发件箱',
|
||||||
url: "{:url('home/mail/sendbox')}", //数据接口
|
url: "/home/mail/sendbox", //数据接口
|
||||||
page: true ,//开启分页
|
page: true ,//开启分页
|
||||||
limit: 15,
|
limit: 15,
|
||||||
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
cellMinWidth: 80, //全局定义常规单元格的最小宽度,layui 2.2.1 新增
|
||||||
@ -80,7 +80,7 @@
|
|||||||
if(obj.event === 'del'){
|
if(obj.event === 'del'){
|
||||||
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
layer.confirm('确定该信息要放入垃圾箱吗?', {icon: 3, title:'提示'}, function(index){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data:{ids:data.id,type:2,source:1},
|
data:{ids:data.id,type:2,source:1},
|
||||||
success:function(e){
|
success:function(e){
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
@ -106,7 +106,7 @@
|
|||||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||||
var data = checkStatus.data;
|
var data = checkStatus.data;
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/mail/add')}");
|
rightpage.open("/home/mail/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if(data.length==0){
|
if(data.length==0){
|
||||||
@ -129,7 +129,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/mail/check')}",
|
url: "/home/mail/check",
|
||||||
data: {
|
data: {
|
||||||
ids: idArray.join(','),
|
ids: idArray.join(','),
|
||||||
type:type,
|
type:type,
|
||||||
|
@ -86,7 +86,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function(data) {
|
form.on('submit(webform)', function(data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/menu/add')}",
|
url: "/home/menu/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function(e) {
|
success: function(e) {
|
||||||
|
@ -25,7 +25,7 @@
|
|||||||
id: tableId
|
id: tableId
|
||||||
, elem: '#' + tableId
|
, elem: '#' + tableId
|
||||||
, idField: 'id'
|
, idField: 'id'
|
||||||
, url: "{:url('home/menu/index')}"
|
, url: "/home/menu/index"
|
||||||
, cellMinWidth: 100
|
, cellMinWidth: 100
|
||||||
, treeId: 'id'//树形id字段名称
|
, treeId: 'id'//树形id字段名称
|
||||||
, treeUpId: 'pid'//树形父id字段名称
|
, treeUpId: 'pid'//树形父id字段名称
|
||||||
@ -49,7 +49,7 @@
|
|||||||
|
|
||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
$('.add-menu').on('click',function(){
|
$('.add-menu').on('click',function(){
|
||||||
rightpage.open("{:url('home/menu/add')}");
|
rightpage.open("/home/menu/add");
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -66,7 +66,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/menu/delete')}",
|
url: "/home/menu/delete",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: { id: obj.data.id },
|
data: { id: obj.data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -98,7 +98,7 @@ function init(layui) {
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/note/add')}",
|
url: "/home/note/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -26,7 +26,7 @@
|
|||||||
id:'treeTable'
|
id:'treeTable'
|
||||||
,elem: '#treeTable'
|
,elem: '#treeTable'
|
||||||
,idField:'id'
|
,idField:'id'
|
||||||
,url:"{:url('home/note/cate')}"
|
,url: "/home/note/cate"
|
||||||
,cellMinWidth: 100
|
,cellMinWidth: 100
|
||||||
,treeId:'id'//树形id字段名称
|
,treeId:'id'//树形id字段名称
|
||||||
,treeUpId:'pid'//树形父id字段名称
|
,treeUpId:'pid'//树形父id字段名称
|
||||||
@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
$('.add-menu').on('click', function(){
|
$('.add-menu').on('click', function(){
|
||||||
rightpage.open("{:url('home/note/cate_add')}");
|
rightpage.open("/home/note/cate_add");
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -67,7 +67,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/note/cate_delete')}",
|
url: "/home/note/cate_delete",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: { id: obj.data.id },
|
data: { id: obj.data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -67,7 +67,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function(data){
|
form.on('submit(webform)', function(data){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/note/cate_add')}",
|
url: "/home/note/cate_add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:data.field,
|
data:data.field,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '公告列表',
|
title: '公告列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/note/index')}", //数据接口
|
url: "/home/note/index", //数据接口
|
||||||
cols: [
|
cols: [
|
||||||
[
|
[
|
||||||
{
|
{
|
||||||
@ -81,7 +81,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/note/add')}");
|
rightpage.open("/home/note/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@ -103,7 +103,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function(index) {
|
}, function(index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/note/delete')}",
|
url: "/home/note/delete",
|
||||||
data: {
|
data: {
|
||||||
id: data.id
|
id: data.id
|
||||||
},
|
},
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
var tableIns = table.render({
|
var tableIns = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
, toolbar: '#toolbarDemo'
|
, toolbar: '#toolbarDemo'
|
||||||
, url: "{:url('home/personal/change')}"
|
, url: "/home/personal/change"
|
||||||
, page: true //开启分页
|
, page: true //开启分页
|
||||||
, limit: 20
|
, limit: 20
|
||||||
, cols: [[
|
, cols: [[
|
||||||
@ -63,7 +63,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/personal/change_add')}");
|
rightpage.open("/home/personal/change_add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -119,8 +119,8 @@
|
|||||||
names:names,
|
names:names,
|
||||||
dids:dids,
|
dids:dids,
|
||||||
departments:departments,
|
departments:departments,
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
type:0,
|
type:0,
|
||||||
callback:function(ids,names,dids,departments){
|
callback:function(ids,names,dids,departments){
|
||||||
$('[name="uid"]').val(ids);
|
$('[name="uid"]').val(ids);
|
||||||
@ -143,7 +143,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/personal/change_add')}",
|
url: "/home/personal/change_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -30,7 +30,7 @@
|
|||||||
var tableIns = table.render({
|
var tableIns = table.render({
|
||||||
elem: '#test'
|
elem: '#test'
|
||||||
, toolbar: '#toolbarDemo'
|
, toolbar: '#toolbarDemo'
|
||||||
, url: "{:url('home/personal/leave')}"
|
, url: "/home/personal/leave"
|
||||||
, page: true //开启分页
|
, page: true //开启分页
|
||||||
, limit: 20
|
, limit: 20
|
||||||
, cols: [[
|
, cols: [[
|
||||||
@ -85,7 +85,7 @@
|
|||||||
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
var checkStatus = table.checkStatus(obj.config.id); //获取选中行状态
|
||||||
var data = checkStatus.data;
|
var data = checkStatus.data;
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/personal/leave_add')}");
|
rightpage.open("/home/personal/leave_add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -122,8 +122,8 @@
|
|||||||
ids:ids,
|
ids:ids,
|
||||||
names:names,
|
names:names,
|
||||||
departments:departments,
|
departments:departments,
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
type:0,
|
type:0,
|
||||||
callback:function(ids,names,dids,departments){
|
callback:function(ids,names,dids,departments){
|
||||||
$('[name="uid"]').val(ids);
|
$('[name="uid"]').val(ids);
|
||||||
@ -139,8 +139,8 @@
|
|||||||
employeepicker.init({
|
employeepicker.init({
|
||||||
ids:ids,
|
ids:ids,
|
||||||
names:names,
|
names:names,
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
type:0,
|
type:0,
|
||||||
callback:function(ids,names,dids,departments){
|
callback:function(ids,names,dids,departments){
|
||||||
$('[name="lead_admin_id"]').val(ids);
|
$('[name="lead_admin_id"]').val(ids);
|
||||||
@ -159,8 +159,8 @@
|
|||||||
employeepicker.init({
|
employeepicker.init({
|
||||||
ids:idsArray,
|
ids:idsArray,
|
||||||
names:namesArray,
|
names:namesArray,
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
callback:function(ids,names){
|
callback:function(ids,names){
|
||||||
$('[name="connect_uids"]').val(ids.join(',')),
|
$('[name="connect_uids"]').val(ids.join(',')),
|
||||||
$('[name="connect_names"]').val(names.join(','));
|
$('[name="connect_names"]').val(names.join(','));
|
||||||
@ -179,7 +179,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/personal/leave_add')}",
|
url: "/home/personal/leave_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -81,8 +81,8 @@ user-select: none;}
|
|||||||
ids: ids,
|
ids: ids,
|
||||||
names: names,
|
names: names,
|
||||||
type: 0,
|
type: 0,
|
||||||
department_url:"{:url('home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
callback: function (ids, names, dids, departments) {
|
callback: function (ids, names, dids, departments) {
|
||||||
uid = ids;
|
uid = ids;
|
||||||
that.val(names);
|
that.val(names);
|
||||||
@ -301,7 +301,7 @@ user-select: none;}
|
|||||||
}
|
}
|
||||||
console.log(detail);
|
console.log(detail);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/plan/add')}",
|
url: "/home/plan/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:detail,
|
data:detail,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -376,7 +376,7 @@ user-select: none;}
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/plan/detail')}",
|
url: "/home/plan/detail",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:{id:id},
|
data:{id:id},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
@ -447,7 +447,7 @@ user-select: none;}
|
|||||||
detail['end_time_b']=addZero(arg.end.getHours())+':'+addZero(arg.end.getMinutes());
|
detail['end_time_b']=addZero(arg.end.getHours())+':'+addZero(arg.end.getMinutes());
|
||||||
console.log(detail);
|
console.log(detail);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/plan/add')}",
|
url: "/home/plan/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:detail,
|
data:detail,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -469,7 +469,7 @@ user-select: none;}
|
|||||||
detail['end_time_b']=addZero(arg.end.getHours())+':'+addZero(arg.end.getMinutes());
|
detail['end_time_b']=addZero(arg.end.getHours())+':'+addZero(arg.end.getMinutes());
|
||||||
console.log(detail);
|
console.log(detail);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/plan/add')}",
|
url: "/home/plan/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:detail,
|
data:detail,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -532,7 +532,7 @@ user-select: none;}
|
|||||||
events: function(fetchInfo, successCallback, failureCallback ){
|
events: function(fetchInfo, successCallback, failureCallback ){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"{:url('home/plan/calendar')}",
|
url: "/home/plan/calendar",
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
data:{start:fetchInfo.startStr,end:fetchInfo.endStr,uid:uid},
|
data:{start:fetchInfo.startStr,end:fetchInfo.endStr,uid:uid},
|
||||||
success:function(result){
|
success:function(result){
|
||||||
|
@ -72,8 +72,8 @@
|
|||||||
ids: ids,
|
ids: ids,
|
||||||
names: names,
|
names: names,
|
||||||
type: 0,
|
type: 0,
|
||||||
department_url:"{:url('home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
callback: function (ids, names, dids, departments) {
|
callback: function (ids, names, dids, departments) {
|
||||||
$('[name="uid"]').val(ids);
|
$('[name="uid"]').val(ids);
|
||||||
that.val(names);
|
that.val(names);
|
||||||
@ -93,7 +93,7 @@
|
|||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
,title:'日程安排列表'
|
,title:'日程安排列表'
|
||||||
,url:"{:url('home/plan/index')}"
|
,url: "/home/plan/index"
|
||||||
,page: true //开启分页
|
,page: true //开启分页
|
||||||
,limit: 20
|
,limit: 20
|
||||||
,cellMinWidth: 80
|
,cellMinWidth: 80
|
||||||
@ -141,7 +141,7 @@
|
|||||||
var data = obj.data;
|
var data = obj.data;
|
||||||
if(obj.event === 'edit'){
|
if(obj.event === 'edit'){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/plan/detail')}",
|
url: "/home/plan/detail",
|
||||||
data:{
|
data:{
|
||||||
id:data.id
|
id:data.id
|
||||||
},
|
},
|
||||||
@ -164,7 +164,7 @@
|
|||||||
}
|
}
|
||||||
else if(obj.event === 'view'){
|
else if(obj.event === 'view'){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/plan/detail')}",
|
url: "/home/plan/detail",
|
||||||
data:{
|
data:{
|
||||||
id:data.id
|
id:data.id
|
||||||
},
|
},
|
||||||
@ -451,7 +451,7 @@
|
|||||||
}
|
}
|
||||||
console.log(detail);
|
console.log(detail);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/plan/add')}",
|
url: "/home/plan/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:detail,
|
data:detail,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
|
@ -87,7 +87,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/position/add')}",
|
url: "/home/position/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -32,7 +32,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '岗位列表',
|
title: '岗位列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/position/index')}", //数据接口
|
url: "/home/position/index", //数据接口
|
||||||
page: false, //开启分页
|
page: false, //开启分页
|
||||||
cols: [
|
cols: [
|
||||||
[
|
[
|
||||||
@ -77,7 +77,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/position/add')}");
|
rightpage.open("/home/position/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -108,7 +108,7 @@
|
|||||||
title: '提示'
|
title: '提示'
|
||||||
}, function (index) {
|
}, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/position/delete')}",
|
url: "/home/position/delete",
|
||||||
data: {
|
data: {
|
||||||
id: data.id
|
id: data.id
|
||||||
},
|
},
|
||||||
|
@ -127,7 +127,7 @@
|
|||||||
form.on('submit(webform)', function (obj) {
|
form.on('submit(webform)', function (obj) {
|
||||||
console.log(obj.field);
|
console.log(obj.field);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/role/add')}",
|
url: "/home/role/add",
|
||||||
data: obj.field,
|
data: obj.field,
|
||||||
type: 'post',
|
type: 'post',
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -33,7 +33,7 @@
|
|||||||
var tableIns = table.render({
|
var tableIns = table.render({
|
||||||
elem: '#test',
|
elem: '#test',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/role/index')}", //数据接口
|
url: "/home/role/index", //数据接口
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [[ //表头
|
cols: [[ //表头
|
||||||
@ -52,7 +52,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/role/add')}");
|
rightpage.open("/home/role/add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -66,7 +66,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除该权限角色吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除该权限角色吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/role/delete')}",
|
url: "/home/role/delete",
|
||||||
data: { id: data.id },
|
data: { id: data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
|
@ -79,7 +79,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/rule/add')}",
|
url: "/home/rule/add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -24,7 +24,7 @@
|
|||||||
id: tableId
|
id: tableId
|
||||||
, elem: '#' + tableId
|
, elem: '#' + tableId
|
||||||
, idField: 'id'
|
, idField: 'id'
|
||||||
, url: "{:url('home/rule/index')}"
|
, url: "/home/rule/index"
|
||||||
, cellMinWidth: 100
|
, cellMinWidth: 100
|
||||||
, treeId: 'id'//树形id字段名称
|
, treeId: 'id'//树形id字段名称
|
||||||
, treeUpId: 'pid'//树形父id字段名称
|
, treeUpId: 'pid'//树形父id字段名称
|
||||||
@ -47,7 +47,7 @@
|
|||||||
});
|
});
|
||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
$('.add-menu').on('click',function(){
|
$('.add-menu').on('click',function(){
|
||||||
rightpage.open("{:url('home/rule/add')}");
|
rightpage.open("/home/rule/add");
|
||||||
return;
|
return;
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -64,7 +64,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/rule/delete')}",
|
url: "/home/rule/delete",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: { id: obj.data.id },
|
data: { id: obj.data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -82,8 +82,8 @@ user-select: none;}
|
|||||||
ids: ids,
|
ids: ids,
|
||||||
names: names,
|
names: names,
|
||||||
type: 0,
|
type: 0,
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
callback: function (ids, names, dids, departments) {
|
callback: function (ids, names, dids, departments) {
|
||||||
uid = ids;
|
uid = ids;
|
||||||
that.val(names);
|
that.val(names);
|
||||||
@ -216,7 +216,7 @@ user-select: none;}
|
|||||||
}
|
}
|
||||||
console.log(detail);
|
console.log(detail);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/schedule/add')}",
|
url: "/home/schedule/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:detail,
|
data:detail,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -285,7 +285,7 @@ user-select: none;}
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/schedule/detail')}",
|
url: "/home/schedule/detail",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:{id:id},
|
data:{id:id},
|
||||||
success:function(res){
|
success:function(res){
|
||||||
@ -389,7 +389,7 @@ user-select: none;}
|
|||||||
events: function(fetchInfo, successCallback, failureCallback ){
|
events: function(fetchInfo, successCallback, failureCallback ){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
type:"POST",
|
type:"POST",
|
||||||
url:"{:url('home/schedule/calendar')}",
|
url: "/home/schedule/calendar",
|
||||||
dataType:"json",
|
dataType:"json",
|
||||||
data:{start:fetchInfo.startStr,end:fetchInfo.endStr,uid:uid},
|
data:{start:fetchInfo.startStr,end:fetchInfo.endStr,uid:uid},
|
||||||
success:function(result){
|
success:function(result){
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
elem: '#test',
|
elem: '#test',
|
||||||
title: '工作类型列表',
|
title: '工作类型列表',
|
||||||
toolbar: '#toolbarDemo',
|
toolbar: '#toolbarDemo',
|
||||||
url: "{:url('home/schedule/cate')}",
|
url: "/home/schedule/cate",
|
||||||
page: true, //开启分页
|
page: true, //开启分页
|
||||||
limit: 20,
|
limit: 20,
|
||||||
cols: [
|
cols: [
|
||||||
@ -51,7 +51,7 @@
|
|||||||
//表头工具栏事件
|
//表头工具栏事件
|
||||||
table.on('toolbar(test)', function(obj){
|
table.on('toolbar(test)', function(obj){
|
||||||
if (obj.event === 'add') {
|
if (obj.event === 'add') {
|
||||||
rightpage.open("{:url('home/schedule/cate_add')}");
|
rightpage.open("/home/schedule/cate_add");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@ -65,7 +65,7 @@
|
|||||||
if (obj.event === 'del') {
|
if (obj.event === 'del') {
|
||||||
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
layer.confirm('确定要删除吗?', { icon: 3, title: '提示' }, function (index) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/schedule/delete')}",
|
url: "/home/schedule/delete",
|
||||||
data: { id: data.id },
|
data: { id: data.id },
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
layer.msg(e.msg);
|
layer.msg(e.msg);
|
||||||
|
@ -81,7 +81,7 @@
|
|||||||
//监听提交
|
//监听提交
|
||||||
form.on('submit(webform)', function (data) {
|
form.on('submit(webform)', function (data) {
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url: "{:url('home/schedule/cate_add')}",
|
url: "/home/schedule/cate_add",
|
||||||
type: 'post',
|
type: 'post',
|
||||||
data: data.field,
|
data: data.field,
|
||||||
success: function (e) {
|
success: function (e) {
|
||||||
|
@ -71,8 +71,8 @@
|
|||||||
ids: ids,
|
ids: ids,
|
||||||
names: names,
|
names: names,
|
||||||
type: 0,
|
type: 0,
|
||||||
department_url:"{:url('/home/api/get_department_tree')}",
|
department_url: "/home/api/get_department_tree",
|
||||||
employee_url:"{:url('/home/api/get_employee')}",
|
employee_url: "/home/api/get_employee",
|
||||||
callback: function (ids, names, dids, departments) {
|
callback: function (ids, names, dids, departments) {
|
||||||
$('[name="uid"]').val(ids);
|
$('[name="uid"]').val(ids);
|
||||||
that.val(names);
|
that.val(names);
|
||||||
@ -92,7 +92,7 @@
|
|||||||
elem: '#test'
|
elem: '#test'
|
||||||
,toolbar: '#toolbarDemo'
|
,toolbar: '#toolbarDemo'
|
||||||
,title:'工作记录列表'
|
,title:'工作记录列表'
|
||||||
,url:"{:url('home/schedule/index')}"
|
,url: "/home/schedule/index"
|
||||||
,page: true //开启分页
|
,page: true //开启分页
|
||||||
,limit: 20
|
,limit: 20
|
||||||
,cellMinWidth: 80
|
,cellMinWidth: 80
|
||||||
@ -212,7 +212,7 @@
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/schedule/update_labor_time')}",
|
url: "/home/schedule/update_labor_time",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:{
|
data:{
|
||||||
id:data.id,
|
id:data.id,
|
||||||
@ -237,7 +237,7 @@
|
|||||||
}
|
}
|
||||||
else if(obj.event === 'edit'){
|
else if(obj.event === 'edit'){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/schedule/detail')}",
|
url: "/home/schedule/detail",
|
||||||
data:{
|
data:{
|
||||||
id:data.id
|
id:data.id
|
||||||
},
|
},
|
||||||
@ -250,7 +250,7 @@
|
|||||||
}
|
}
|
||||||
else if(obj.event === 'view'){
|
else if(obj.event === 'view'){
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/schedule/detail')}",
|
url: "/home/schedule/detail",
|
||||||
data:{
|
data:{
|
||||||
id:data.id
|
id:data.id
|
||||||
},
|
},
|
||||||
@ -325,7 +325,7 @@
|
|||||||
}
|
}
|
||||||
console.log(detail);
|
console.log(detail);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/schedule/add')}",
|
url: "/home/schedule/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:detail,
|
data:detail,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
@ -522,7 +522,7 @@
|
|||||||
}
|
}
|
||||||
console.log(detail);
|
console.log(detail);
|
||||||
$.ajax({
|
$.ajax({
|
||||||
url:"{:url('home/schedule/add')}",
|
url: "/home/schedule/add",
|
||||||
type:'post',
|
type:'post',
|
||||||
data:detail,
|
data:detail,
|
||||||
success:function(e){
|
success:function(e){
|
||||||
|
@ -36,7 +36,7 @@
|
|||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
<div class="layui-form-item" style="padding-top:10px;">
|
<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>
|
</div>
|
||||||
</form>
|
</form>
|
||||||
<!-- /主体 -->
|
<!-- /主体 -->
|
||||||
|
Loading…
x
Reference in New Issue
Block a user