Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
Jz-Php
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
Jz-Php
Commits
5f7dd2fc
提交
5f7dd2fc
authored
2月 24, 2020
作者:
chengye
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'release'
上级
e10a1c2c
49e3abea
全部展开
隐藏空白字符变更
内嵌
并排
正在显示
15 个修改的文件
包含
88 行增加
和
97 行删除
+88
-97
Copy.php
application/admin/controller/Copy.php
+0
-40
Login.php
application/admin/controller/Login.php
+16
-12
Upload.php
application/admin/controller/Upload.php
+1
-1
LoginValidate.php
application/admin/validate/LoginValidate.php
+4
-3
index.html
application/admin/view/login/index.html
+1
-1
UploadFile.php
application/em/controller/UploadFile.php
+40
-0
create.html
application/em/view/em/create.html
+11
-6
index.html
application/em/view/em/index.html
+0
-14
update.html
application/em/view/em/update.html
+0
-0
default.html
application/em/view/useage/default.html
+4
-5
detail.html
application/em/view/useage/detail.html
+2
-4
detail_special.html
application/em/view/useage/detail_special.html
+2
-6
special.html
application/em/view/useage/special.html
+5
-5
jquery.3.2.1.js
public/static/admin/js/jquery.3.2.1.js
+0
-0
admin.php
route/admin.php
+2
-0
没有找到文件。
application/admin/controller/Copy.php
浏览文件 @
5f7dd2fc
...
...
@@ -41,46 +41,6 @@ class Copy extends Base
parent
::
__construct
(
$app
);
}
// public function index(){
// //区域
// $regions = Region::field('id,region_name')->select()->toArray();
// //页码
// $pageNow = Request::get('pages');
// //抄表单列表
// $user = Session::get('user');
// $map = [];
// $identity = (new Staff)->getIdentity();
// if(!$user['is_admin'] && $identity != 5){
// if(config('admin.search_area') == 1){
// $staff = StaffModel::get($user['user_id']);
// //通过员工的部门id查询 员工所在部门以及下属部门的数据范围
// $dids = (new DepartmentModel)->getNodeIds($staff->d_id);
// $cpIds = CopyModel::field('copy.id')
// ->leftJoin(['staff'],'staff.id = copy.staff_id')
// ->where('staff.d_id','in',$dids)
// ->select()
// ->toArray();
// $copyArr = [];
// foreach ($cpIds as $copy){
// $copyArr[]= $copy['id'];
// }
// if($copyArr != '')
// $map[] = ['copy.id','in',$copyArr];
// }
// }
// $list = CopyModel::list($pageNow,'',$map);
// $page = $list->render();
// $this->assign('identity',$identity);
// $this->assign('regions',$regions);
// $this->assign('page',$page);
// $this->assign('data',$list);
// return $this->fetch();
// }
public
function
index
(){
$map
=
[];
//权限检测
...
...
application/admin/controller/Login.php
浏览文件 @
5f7dd2fc
...
...
@@ -60,10 +60,10 @@ class Login extends Controller
$captcha
->
useNoise
=
true
;
$captcha
->
imageH
=
0
;
$captcha
->
imageW
=
0
;
return
$captcha
->
entry
();
return
$captcha
->
entry
();
}
public
function
loginOut
()
{
session
(
null
);
...
...
@@ -83,14 +83,14 @@ class Login extends Controller
];
return
$data
;
}
$status
=
(
new
StaffModel
)
->
getStaffStatusByName
(
$email
);
if
(
!
$status
[
'status'
]
==
1
){
$data
=
[
'status'
=>
0
,
'message'
=>
'该账户当前禁用,请联系管理员开启'
];
return
$data
;
}
$status
=
(
new
StaffModel
)
->
getStaffStatusByName
(
$email
);
if
(
!
$status
[
'status'
]
==
1
){
$data
=
[
'status'
=>
0
,
'message'
=>
'该账户当前禁用,请联系管理员开启'
];
return
$data
;
}
if
(
decrypt
(
$passwd
)
==
$staff
->
passwd
->
passwd
){
$user
=
[
'name'
=>
$staff
->
name
,
...
...
@@ -117,7 +117,11 @@ class Login extends Controller
$admin
=
AdminModel
::
get
([
'name'
=>
$name
,
'password'
=>
$passwd
]);
if
(
!
$admin
){
$this
->
error
(
'用户名或密码错误'
);
$data
=
[
'status'
=>
0
,
'message'
=>
'用户名或密码错误'
];
return
$data
;
}
else
{
loginlog
(
$admin
->
name
,
$admin
->
id
,
'管理员用户成功登录系统'
,
1
);
$user
=
[
...
...
application/admin/controller/Upload.php
浏览文件 @
5f7dd2fc
...
...
@@ -31,7 +31,7 @@ class Upload extends Base
$info
=
$this
->
file
->
validate
([
'ext'
=>
'jpg,png,gif'
])
->
move
(
$this
->
images_dir
);
}
else
{
$info
=
$this
->
file
->
validate
([
'ext'
=>
'
doc,docx,xls,xlsx,ppt
,pdf'
])
$info
=
$this
->
file
->
validate
([
'ext'
=>
'
jpg,png,gif,doc,docx,xls,xlsx,zip,rar
,pdf'
])
->
move
(
$this
->
files_dir
);
}
...
...
application/admin/validate/LoginValidate.php
浏览文件 @
5f7dd2fc
...
...
@@ -15,8 +15,8 @@ class LoginValidate extends Validate
protected
$message
=
[
'name.require'
=>
'名称必须'
,
'name.max'
=>
'名称最多不能超过32个字符'
,
'name.token'
=>
'非法的请求'
,
'password.require'
=>
'
密码必填
'
,
'verify.require'
=>
'
验证码必填
'
'name.token'
=>
'非法的请求
,请重新登录
'
,
'password.require'
=>
'
请填写密码
'
,
'verify.require'
=>
'
请填写验证码
'
];
}
\ No newline at end of file
application/admin/view/login/index.html
浏览文件 @
5f7dd2fc
...
...
@@ -10,7 +10,7 @@
<link
rel=
"stylesheet"
href=
"__STATIC__/xadmin/css/font.css"
>
<link
rel=
"stylesheet"
href=
"__STATIC__/xadmin/css/login.css"
>
<link
rel=
"stylesheet"
href=
"__STATIC__/xadmin/css/xadmin.css"
>
<script
type=
"text/javascript"
src=
"https://c
dn.bootcss.com/jquery/3.2.1/jquery
.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://c
ode.jquery.com/jquery-3.2.1
.min.js"
></script>
<script
src=
"__STATIC__/xadmin/lib/layui/layui.js"
charset=
"utf-8"
></script>
</head>
<body
class=
"login-bg"
>
...
...
application/em/controller/UploadFile.php
0 → 100644
浏览文件 @
5f7dd2fc
<?php
/**
* Created by PhpStorm.
* User: chouchou
* Date: 2020-2-23
* Time: 23:30
*/
namespace
app\em\controller
;
use
app\admin\controller\Upload
;
use
app\em\model\Base
;
use
think\facade\Request
;
class
UploadFile
extends
Base
{
public
function
upPhoto
(){
$file
=
Request
::
file
(
'cp_photo'
);
$upload
=
new
Upload
(
$file
,
1
);
$result
=
$upload
->
upload
();
if
(
$result
){
return
jsonSuc
(
'照片上传成功'
,
$result
);
}
else
{
return
jsonErr
(
$result
);
}
}
public
function
upFile
(){
$file
=
Request
::
file
(
'up_file'
);
$upload
=
new
Upload
(
$file
,
2
);
$result
=
$upload
->
upload
();
if
(
$result
){
return
jsonSuc
(
'上传文件成功'
,
$result
);
}
else
{
return
jsonErr
(
$result
);
}
}
}
\ No newline at end of file
application/em/view/em/create.html
浏览文件 @
5f7dd2fc
...
...
@@ -554,22 +554,26 @@
//渲染date类型字段
laydate
.
render
({
elem
:
'#init_date'
,
// 第一次抄表
trigger
:
'click'
trigger
:
'click'
,
format
:
'yyyy-MM-dd HH:mm:ss'
});
laydate
.
render
({
elem
:
'#contract_confirm_date'
,
//合同确认时间
trigger
:
'click'
trigger
:
'click'
,
format
:
'yyyy-MM-dd HH:mm:ss'
});
laydate
.
render
({
elem
:
'#cycle_start_time'
,
//合同确认时间
trigger
:
'click'
trigger
:
'click'
,
format
:
'yyyy-MM-dd HH:mm:ss'
});
laydate
.
render
({
elem
:
'#cycle_finish_time'
,
//合同确认时间
trigger
:
'click'
trigger
:
'click'
,
format
:
'yyyy-MM-dd HH:mm:ss'
});
...
...
@@ -654,8 +658,9 @@
//上传电表照片
var
uploadEa
=
upload
.
render
({
elem
:
'#electric_annex_button'
,
url
:
'/upAnnex'
,
field
:
'annex_file'
,
url
:
'/upFile'
,
field
:
'up_file'
,
accept
:
'file'
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
//将电表照片的ID填写
...
...
application/em/view/em/index.html
浏览文件 @
5f7dd2fc
...
...
@@ -65,8 +65,6 @@
<th
lay-data=
"{field:'region_name',sort: true} "
>
区域
</th>
<th
lay-data=
"{field:'operator_name',sort: true}"
>
运营商
</th>
<th
lay-data=
"{field:'proj_number'}"
>
项目编号
</th>
<th
lay-data=
"{templet: '#account_id'}"
>
账户ID
</th>
<th
lay-data=
"{templet: '#amount'}"
>
账户余额
</th>
<th
lay-data=
"{field:'create_time',sort: true}"
>
创建时间
</th>
<th
lay-data=
"{fixed: 'right', width:'180', align:'center', toolbar: '#barDemo'}"
>
操作
</th>
</tr>
...
...
@@ -83,18 +81,6 @@
<script
type=
"text/html"
id=
"em_numb"
>
<
a
class
=
"layui-link"
href
=
"/em_edit/{{d.id}}"
>
{{
d
.
em_numb
}}
<
/a
>
</script>
<script
type=
"text/html"
id=
"account_id"
>
{{
#
if
(
d
.
account
){
}}
{{
d
.
account
.
account_id
}}
{{
#
}
}}
</script>
<script
type=
"text/html"
id=
"amount"
>
{{
#
if
(
d
.
account
){
}}
{{
d
.
account
.
amount
}}
{{
#
}
}}
</script>
<script
type=
"text/html"
id=
"barDemo"
>
<
div
class
=
"layui-text-left"
>
<
a
title
=
"抄表"
class
=
"layui-btn layui-btn-sm"
href
=
"/useage_add/{{d.id}}"
>
抄表
<
/a
>
...
...
application/em/view/em/update.html
浏览文件 @
5f7dd2fc
差异被折叠。
点击展开。
application/em/view/useage/default.html
浏览文件 @
5f7dd2fc
...
...
@@ -131,7 +131,7 @@
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
电表水印照片
<span
class=
"x-red"
>
*
</span>
抄表凭证
</label>
<div
class=
"layui-input-inline"
>
<button
type=
"button"
class=
"layui-btn"
id=
"up_photo"
>
...
...
@@ -238,8 +238,9 @@
//上传电表照片
var
upPhoto
=
upload
.
render
({
elem
:
'#up_photo'
,
url
:
'/up_photo'
,
field
:
'cp_photo'
,
url
:
'/upFile'
,
field
:
'up_file'
,
accept
:
'file'
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
layMsg
(
res
.
message
)
...
...
@@ -256,8 +257,6 @@
}
}
});
});
</script>
...
...
application/em/view/useage/detail.html
浏览文件 @
5f7dd2fc
...
...
@@ -129,7 +129,7 @@
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
电表水印照片
<span
class=
"x-red"
>
*
</span>
抄表凭证
</label>
<div
class=
"layui-input-inline"
>
<a
href=
"{$useage.photo.src}"
target=
"_blank"
class=
"layui-btn"
disabled=
"disabled"
>
...
...
@@ -183,9 +183,7 @@
function
()
{
$
=
layui
.
jquery
;
var
form
=
layui
.
form
,
layer
=
layui
.
layer
,
laydate
=
layui
.
laydate
,
upload
=
layui
.
upload
;
layer
=
layui
.
layer
;
//消息提示
...
...
application/em/view/useage/detail_special.html
浏览文件 @
5f7dd2fc
...
...
@@ -129,7 +129,7 @@
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
电表水印照片
<span
class=
"x-red"
>
*
</span>
抄表凭证
</label>
<div
class=
"layui-input-inline"
>
<a
href=
"{$useage.photo.src}"
target=
"_blank"
class=
"layui-btn"
disabled=
"disabled"
>
...
...
@@ -203,11 +203,7 @@
function
()
{
$
=
layui
.
jquery
;
var
form
=
layui
.
form
,
layer
=
layui
.
layer
,
laydate
=
layui
.
laydate
,
upload
=
layui
.
upload
;
layer
=
layui
.
layer
;
//消息提示
function
layMsg
(
msg
,
type
=
6
,
time
=
1000
){
layer
.
msg
(
msg
,{
...
...
application/em/view/useage/special.html
浏览文件 @
5f7dd2fc
...
...
@@ -140,7 +140,7 @@
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
账单
凭证
<span
class=
"x-red"
>
*
</span>
抄表
凭证
</label>
<div
class=
"layui-input-inline"
>
<button
type=
"button"
class=
"layui-btn"
id=
"up_photo"
>
...
...
@@ -239,7 +239,6 @@
laydate
.
render
({
elem
:
'#current_date'
,
value
:
new
Date
(),
trigger
:
'click'
,
})
...
...
@@ -267,9 +266,10 @@
//上传电表照片
var
upPhoto
=
upload
.
render
({
elem
:
'#up_photo'
,
url
:
'/up_photo'
,
field
:
'cp_photo'
,
elem
:
'#up_photo'
,
url
:
'/upFile'
,
field
:
'up_file'
,
accept
:
'file'
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
layMsg
(
res
.
message
)
...
...
public/static/admin/js/jquery.3.2.1.js
0 → 100644
浏览文件 @
5f7dd2fc
差异被折叠。
点击展开。
route/admin.php
浏览文件 @
5f7dd2fc
...
...
@@ -146,6 +146,8 @@ Route::get('useage/:useage_id','em/useage/detail');
Route
::
get
(
'useage_add/:id'
,
'em/useage/create'
);
Route
::
post
(
'useage_add'
,
'em/useage/store'
);
Route
::
post
(
'useage_del'
,
'em/useage/del'
);
Route
::
post
(
'upFile'
,
'em/UploadFile/upFile'
);
//账单
Route
::
get
(
'invoice'
,
'em/invoice/index'
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论