Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
Jz-Php
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
Jz-Php
Commits
cf175255
提交
cf175255
authored
5月 06, 2020
作者:
fengzy
浏览文件
操作
浏览文件
下载
差异文件
jz.php
上级
94eaaf86
712dea44
隐藏空白字符变更
内嵌
并排
正在显示
21 个修改的文件
包含
778 行增加
和
111 行删除
+778
-111
.gitattributes
.gitattributes
+5
-0
.gitignore
.gitignore
+2
-0
Base.php
application/admin/controller/Base.php
+0
-3
Basestation.php
application/admin/controller/Basestation.php
+14
-14
Login.php
application/admin/controller/Login.php
+0
-1
SingleSign.php
application/admin/controller/SingleSign.php
+0
-13
role.html
application/admin/view/staff/role.html
+3
-50
role1.html
application/admin/view/staff/role1.html
+227
-0
common.php
application/em/common.php
+25
-0
Useage.php
application/em/controller/Useage.php
+95
-0
EmInvoice.php
application/em/model/EmInvoice.php
+3
-0
Useage.php
application/em/model/Useage.php
+6
-1
UseageGeneralInfoValidate.php
application/em/validate/UseageGeneralInfoValidate.php
+1
-1
index.html
application/em/view/invoice/index.html
+1
-1
default.html
application/em/view/useage/default.html
+1
-1
detail.html
application/em/view/useage/detail.html
+30
-8
index.html
application/em/view/useage/index.html
+35
-17
update.html
application/em/view/useage/update.html
+309
-0
jz.php
config/jz.php
+16
-0
getUserToken.js
public/dist/js/getUserToken.js
+1
-1
admin.php
route/admin.php
+4
-0
没有找到文件。
.gitattributes
0 → 100644
浏览文件 @
cf175255
config/cache.php merge=ours
config/admin.php merge=ours
config/session.php merge=ours
config/admin.php merge=ours
\ No newline at end of file
.gitignore
浏览文件 @
cf175255
...
...
@@ -19,3 +19,4 @@
/public/dist2
/public/static/uploads
/public/static/xadmin
/application/admin/view/staff/role.html
\ No newline at end of file
application/admin/controller/Base.php
浏览文件 @
cf175255
...
...
@@ -47,12 +47,9 @@ class Base extends Controller
private
function
authCheck
(
$user_id
){
//通过uid查询roleid通过roleid查询权限列表
$permissions
=
StaffRoleModel
::
getStaffRolesById
(
$user_id
);
$permissions
=
explode
(
','
,
$permissions
);
//获取当前访问路由
$path
=
Request
::
pathinfo
()
?:
'/'
;
if
(
$path
!==
'/'
){
//检测是否存在数字,如果存在数字则删除最后一个/之后的所有数据
if
(
preg_match
(
'/[0-9]+/'
,
$path
)){
...
...
application/admin/controller/Basestation.php
浏览文件 @
cf175255
...
...
@@ -484,13 +484,13 @@ class Basestation extends Base
public
function
basestation_map
(
Request
$request
){
$id
=
$request
->
get
(
'station_name'
);
$db
=
Db
::
connect
([
'type'
=>
'mysql'
,
'hostname'
=>
'127.0.0.1'
,
'database'
=>
'jzdb'
,
'username'
=>
'root'
,
'password'
=>
'pvv5718J0CwhNfn4B^8^H3igPj#oiQkX'
,
'hostport'
=>
'10036'
,
'charset'
=>
'utf8'
,
'type'
=>
config
(
'jz.jztype'
)
,
'hostname'
=>
config
(
'jz.jzhostname'
)
,
'database'
=>
config
(
'jz.jzdatabase'
)
,
'username'
=>
config
(
'jz.jzusername'
)
,
'password'
=>
config
(
'jz.jzpassword'
)
,
'hostport'
=>
config
(
'jz.jzhostport'
)
,
'charset'
=>
config
(
'jz.jzcharset'
)
,
]);
$data
=
$db
->
table
(
'jz_message'
)
->
field
(
'business_id'
)
->
where
([
'jz_name'
=>
$id
])
->
find
();
$this
->
assign
(
'data'
,
$data
[
'business_id'
]);
...
...
@@ -499,13 +499,13 @@ class Basestation extends Base
public
function
basestation_region
(
Request
$request
){
$db
=
Db
::
connect
([
'type'
=>
'mysql'
,
'hostname'
=>
'127.0.0.1'
,
'database'
=>
'jzdb'
,
'username'
=>
'root'
,
'password'
=>
'pvv5718J0CwhNfn4B^8^H3igPj#oiQkX'
,
'hostport'
=>
'10036'
,
'charset'
=>
'utf8'
,
'type'
=>
config
(
'jz.jztype'
)
,
'hostname'
=>
config
(
'jz.jzhostname'
)
,
'database'
=>
config
(
'jz.jzdatabase'
)
,
'username'
=>
config
(
'jz.jzusername'
)
,
'password'
=>
config
(
'jz.jzpassword'
)
,
'hostport'
=>
config
(
'jz.jzhostport'
)
,
'charset'
=>
config
(
'jz.jzcharset'
)
,
]);
$data
[
'business_id'
]
=
$request
->
get
(
'station_id'
);
if
(
empty
(
$data
[
'business_id'
])){
...
...
application/admin/controller/Login.php
浏览文件 @
cf175255
...
...
@@ -4,7 +4,6 @@ namespace app\admin\controller;
use
app\admin\model\AdminModel
;
use
app\admin\model\StaffModel
;
use
think\Config
;
use
think\Controller
;
use
think\facade\Cache
;
use
think\facade\Session
;
...
...
application/admin/controller/SingleSign.php
浏览文件 @
cf175255
...
...
@@ -5,20 +5,15 @@
* Date: 2020-3-22
* Time: 19:03
*/
namespace
app\admin\controller
;
use
app\admin\model\StaffModel
;
use
think\Exception
;
use
think\facade\Cookie
;
class
SingleSign
{
public
$instence
=
null
;
public
function
__construct
(){
if
(
$this
->
instence
===
null
){
$redis
=
new
\Redis
();
$res
=
$redis
->
connect
(
config
(
'admin.redis_host'
),
config
(
'admin.redis_port'
));
if
(
$res
)
$this
->
instence
=
$redis
;
...
...
@@ -30,19 +25,14 @@ class SingleSign {
public
function
getSid
(
$prex
=
'PHPREDIS_SESSION:'
){
$sid
=
Cookie
::
get
(
'PHPSESSID'
);
$sid
=
$prex
.
$sid
;
$str
=
$this
->
instence
->
get
(
$sid
);
if
(
!
$str
)
throw
new
Exception
(
"session info not found"
);
return
$str
;
}
//从session中读取信息
public
function
getUserInfo
(){
$str
=
$this
->
getSid
();
$pos
=
stripos
(
$str
,
'is_admin|b:'
)
+
11
;
$isAdmin
=
substr
(
$str
,
$pos
,
1
);
$user
[
'is_admin'
]
=
$isAdmin
;
...
...
@@ -51,7 +41,6 @@ class SingleSign {
$user
[
'username'
]
=
'gonnadmin'
;
}
else
{
preg_match
(
'/adminuser\|s\:(\d+)\:/'
,
$str
,
$match
);
if
(
$match
){
$pos
=
stripos
(
$str
,
'adminuser|s:'
)
+
strlen
(
'adminuser|s:'
);
$pos
+=
strlen
(
$match
[
1
])
+
2
;
...
...
@@ -59,14 +48,12 @@ class SingleSign {
}
}
$pos
=
stripos
(
$str
,
'ukey|s:10:'
)
+
11
;
$ukey
=
substr
(
$str
,
$pos
,
10
);
$user
[
'ukey'
]
=
$ukey
;
preg_match
(
'/[\x80-\xff]+/'
,
$str
,
$matchb
);
if
(
$matchb
)
$user
[
'name'
]
=
$matchb
[
0
];
return
$user
;
}
...
...
application/admin/view/staff/role.html
浏览文件 @
cf175255
...
...
@@ -27,7 +27,7 @@
<tbody>
{foreach $data as $item}
<tr>
<td>
{$item.name}
</td>
<td>
{$item.department.name|default='广厦网络'}
</td>
<td>
...
...
@@ -42,9 +42,7 @@
<a
title=
"设置数据权限"
onclick=
"xadmin.open('数据权限配置','/staff_role_department/{$item.id}')"
href=
"javascript:;"
>
<i
class=
"layui-icon iconfont"
>

</i>
</a>
<!-- <a title="删除" onclick="member_del(this,'{$item.id}')" href="javascript:;">
<i class="layui-icon"></i>
</a> -->
</td>
</tr>
{/foreach}
...
...
@@ -62,55 +60,10 @@
<script
src=
"dist/js/md5.js"
></script>
<script
src=
"dist/js/sha1.js"
></script>
<script
src=
"dist/js/util.js"
></script>
<
script
src=
"dist/js/getUserToken.js"
></script
>
<
!--<script src="dist/js/getUserToken.js"></script>--
>
<script>
layui
.
use
([
'laydate'
,
'form'
,
'upload'
],
function
(){
var
laydate
=
layui
.
laydate
;
var
form
=
layui
.
form
;
upload
=
layui
.
upload
;
//执行一个laydate实例
laydate
.
render
({
elem
:
'#start'
//指定元素
});
//执行一个laydate实例
laydate
.
render
({
elem
:
'#end'
//指定元素
});
var
EmImport
=
upload
.
render
({
elem
:
'#EmImport'
,
url
:
'/basestation_import'
,
accept
:
'file'
,
field
:
'file_name'
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
if
(
res
.
status
==
0
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
else
{
//layMsg(res.message,5)
return
;
}
}
});
});
...
...
application/admin/view/staff/role1.html
0 → 100644
浏览文件 @
cf175255
{extend name="public:form" /}
{block name="body"}
<div
class=
"layui-fluid"
>
<div
class=
"layui-row layui-col-space15"
>
<div
class=
"layui-col-md12"
>
<div
class=
"layui-card"
>
<div
class=
"layui-card-body"
>
<form
class=
"layui-form"
>
</form>
</div>
<div
class=
"layui-card-header"
>
<button
class=
"layui-btn"
onclick=
"synUser()"
id=
"sameIsadmin"
><i
class=
"layui-icon layui-icon-refresh"
></i>
同步
</button>
<button
class=
"layui-btn"
id=
"EmImport"
>
<i
class=
"layui-icon iconfont"
>

</i></button>
</div>
<div
class=
"layui-card-body "
>
<table
class=
"layui-table layui-form"
>
<thead>
<tr>
<th>
姓名
</th>
<th>
部门
</th>
<th>
角色权限
</th>
<th>
操作
</th>
</thead>
<tbody>
{foreach $data as $item}
<tr>
<td>
{$item.name}
</td>
<td>
{$item.department.name|default='广厦网络'}
</td>
<td>
{volist name="$item.roles" id="role" empty="$empty"}
[{$role.title}]
{/volist}
</td>
<td
class=
"td-manage"
>
<a
title=
"设置功能权限"
onclick=
"xadmin.open('设置功能权限','/staff_role_edit/{$item.id}')"
href=
"javascript:;"
>
<i
class=
"layui-icon"
>

</i>
</a>
<a
title=
"设置数据权限"
onclick=
"xadmin.open('数据权限配置','/staff_role_department/{$item.id}')"
href=
"javascript:;"
>
<i
class=
"layui-icon iconfont"
>

</i>
</a>
</td>
</tr>
{/foreach}
</tbody>
</table>
</div>
</div>
</div>
</div>
</div>
</body>
<script
src=
"dist/js/api.js"
></script>
<script
src=
"dist/js/layer.js"
></script>
<script
src=
"dist/js/md5.js"
></script>
<script
src=
"dist/js/sha1.js"
></script>
<script
src=
"dist/js/util.js"
></script>
<script
src=
"dist/js/getUserToken.js"
></script>
<script>
layui
.
use
([
'laydate'
,
'form'
,
'upload'
],
function
(){
var
laydate
=
layui
.
laydate
;
var
form
=
layui
.
form
;
upload
=
layui
.
upload
;
//执行一个laydate实例
laydate
.
render
({
elem
:
'#start'
//指定元素
});
//执行一个laydate实例
laydate
.
render
({
elem
:
'#end'
//指定元素
});
var
EmImport
=
upload
.
render
({
elem
:
'#EmImport'
,
url
:
'/basestation_import'
,
accept
:
'file'
,
field
:
'file_name'
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
if
(
res
.
status
==
0
){
layer
.
open
({
content
:
res
.
message
,
btn
:
[
'确定'
],
yes
:
function
()
{
layer
.
closeAll
();
window
.
location
.
reload
();
}
});
}
else
{
//layMsg(res.message,5)
return
;
}
}
});
});
/*用户-停用*/
function
member_stop
(
obj
,
id
){
layer
.
confirm
(
'确认要停用吗?'
,
function
(
index
){
if
(
$
(
obj
).
attr
(
'title'
)
==
'启用'
){
//发异步把用户状态进行更改
$
(
obj
).
attr
(
'title'
,
'停用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
addClass
(
'layui-btn-disabled'
).
html
(
'已停用'
);
layer
.
msg
(
'已停用!'
,{
icon
:
5
,
time
:
1000
});
}
else
{
$
(
obj
).
attr
(
'title'
,
'启用'
)
$
(
obj
).
find
(
'i'
).
html
(
''
);
$
(
obj
).
parents
(
"tr"
).
find
(
".td-status"
).
find
(
'span'
).
removeClass
(
'layui-btn-disabled'
).
html
(
'已启用'
);
layer
.
msg
(
'已启用!'
,{
icon
:
5
,
time
:
1000
});
}
});
}
/*用户-删除*/
function
member_del
(
obj
,
id
){
layer
.
confirm
(
'确认要删除吗?'
,
function
(
index
){
//发异步删除数据
var
url
=
'/staff_role_del'
;
$
.
ajax
({
url
:
url
,
method
:
"POST"
,
data
:
{
id
:
id
},
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
==
1
){
layer
.
msg
(
data
.
message
,{
icon
:
1
,
time
:
1000
});
location
.
reload
()
}
else
{
layer
.
alert
(
data
.
message
,
{
icon
:
5
});
}
},
error
:
function
(
XMLHttpRequest
,
textStatus
,
errorThrow
)
{
console
.
log
(
'AJAX 执行删除失败...'
);
}
});
});
}
function
delAll
(
argument
)
{
var
data
=
tableCheck
.
getData
();
layer
.
confirm
(
'确认要删除吗?'
+
data
,
function
(
index
){
//捉到所有被选中的,发异步进行删除
layer
.
msg
(
'删除成功'
,
{
icon
:
1
});
$
(
".layui-form-checked"
).
not
(
'.header'
).
parents
(
'tr'
).
remove
();
});
}
function
synUser
()
{
layer
.
confirm
(
'确定要同步吗?'
,
{
skin
:
'layui-layer-lan'
,
btn
:[
'取消'
,
'确认'
],
icon
:
3
,
title
:
'提示'
},
function
(
index
,
layero
){
layer
.
close
(
index
);
},
function
(
index
,
layero
){
var
indexload
=
layer
.
load
(
0
,
{
shade
:
[
0.7
,
'#fff'
]
//0.7透明度的白色背景
});
let
time
=
Math
.
round
(
new
Date
().
getTime
()
/
1000
);
let
app_secret
=
'4d8e605fa7ed546c4bcb33dee1381179'
;
let
serverAuthenticateStaticKey
=
'de5kio2f'
;
var
temp
=
hex_sha1
(
app_secret
+
time
+
serverAuthenticateStaticKey
);
var
sign
=
hex_md5
(
temp
);
util
.
ajax
({
type
:
'get'
,
dataType
:
'json'
,
url
:
util
.
interfaceUrl
+
interfacenName
.
synSuser
,
data
:
{
timestamp
:
time
,
sign
:
sign
},
success
:
(
res
)
=>
{
if
(
res
.
code
==
"200"
){
setTimeout
(
function
()
{
layer
.
close
(
indexload
)
},
1500
)
layer
.
msg
(
"同步成功"
)
}
else
{
setTimeout
(
function
()
{
layer
.
close
(
indexload
)
},
1500
)
layer
.
msg
(
res
.
message
)
}
},
error
:
function
(
err
)
{
layer
.
msg
(
'网络接口异常'
)
}
});
})
}
</script>
{/block}
\ No newline at end of file
application/em/common.php
浏览文件 @
cf175255
<?php
use
app\admin\model\PermissionModel
;
use
app\admin\model\StaffRoleModel
;
use
think\db
;
use
think\facade\Session
;
function
check_data
(){
$user
=
session
(
'user'
);
...
...
@@ -341,3 +345,23 @@ function getInvoicesStatusName($statusCode,$index=0){
}
}
}
//检测元素与按钮权限
function
check_ele_permission
(
$path
){
$user
=
Session
::
get
(
'user'
);
//获取当前用户的所有权限id
$permissions
=
StaffRoleModel
::
getStaffRolesById
(
$user
[
'user_id'
]);
$permissions
=
explode
(
','
,
$permissions
);
//查询$path所对应id
$permission
=
PermissionModel
::
field
(
'id,nav_url'
)
->
get
([
'nav_url'
=>
$path
]);
if
(
isset
(
$permission
->
id
)){
if
(
!
in_array
(
$permission
->
id
,
$permissions
)
||
$permission
==
null
){
return
false
;
}
return
true
;
}
return
false
;
}
\ No newline at end of file
application/em/controller/Useage.php
浏览文件 @
cf175255
...
...
@@ -119,11 +119,39 @@ class Useage extends Base
return
$this
->
fetch
(
'default'
);
}
public
function
update
(){
$useage_id
=
Request
::
param
(
'useage_id'
);
$uModel
=
(
new
\app\em\model\Useage
())
->
with
(
'photo'
)
->
get
([
'useage_id'
=>
$useage_id
]);
$em
=
(
new
\app\em\model\Em
)
->
getEmUseageInfoById
(
$uModel
->
em_id
,
false
);
//基站信息
$station_info
=
Station
::
getBaseInfoById
(
$em
->
station_id
);
$this
->
assign
(
'station'
,
$station_info
);
//当前用户
$user
=
Session
::
get
(
'user'
);
$this
->
assign
(
'uid'
,
$user
[
'user_id'
]);
//员工列表
$this
->
assign
(
'staffs'
,(
new
Staff
())
->
getStaffs
(
$user
[
'is_admin'
],
''
,
'useage'
));
$this
->
assign
(
'em'
,
$em
);
$step
=
1000000
;
$uModel
->
repo_numb
=
((
int
)(
$uModel
->
current_sum_numb
*
$step
)
-
(
int
)(
$uModel
->
last_sum_numb
*
$step
))
/
$step
;
$this
->
assign
(
'useage'
,
$uModel
);
return
$this
->
fetch
(
'update'
);
}
//保存抄表单
public
function
store
(
$useage_id
=
''
){
//获取表单数据
$data
=
Request
::
post
();
<<<<<<<
HEAD
=======
$useage_id
=
isset
(
$data
[
'useage_id'
])
?
$data
[
'useage_id'
]
:
''
;
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
$action
=
'新增'
;
//数据验证
$validate
=
new
UseageGeneralInfoValidate
();
...
...
@@ -149,6 +177,10 @@ class Useage extends Base
$this
->
checkEnd
(
$useage_id
);
$action
=
'修改'
;
$uModel
=
(
new
\app\em\model\Useage
())
->
get
([
'useage_id'
=>
$useage_id
]);
<<<<<<<
HEAD
=======
$uModel
->
status
=
1
;
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
}
//更新
$uModel
->
staff_id
=
$data
[
'staff_id'
];
...
...
@@ -162,6 +194,7 @@ class Useage extends Base
if
(
empty
(
$useage_id
)){
$udModel
=
new
UseageDetail
();
//抄表详情模型
<<<<<<<
HEAD
$udModel
->
type
=
$data
[
'type'
]
==
1
?
5
:
6
;
$uModel
->
current_numb
=
$data
[
'current_numb'
];
$uModel
->
last_numb
=
$data
[
'last_numb'
];
...
...
@@ -169,6 +202,16 @@ class Useage extends Base
$udModel
=
(
new
UseageDetail
())
->
get
([
'useage_id'
=>
$useage_id
]);;
//抄表详情模型
}
$udModel
->
current_numb
=
$data
[
'current_numb'
];
=======
$udModel
->
useage_id
=
$uModel
->
useage_id
;
$udModel
->
type
=
$data
[
'pricing_type'
]
==
1
?
5
:
6
;
$udModel
->
current_numb
=
$uModel
->
current_sum_numb
;
$udModel
->
last_numb
=
$uModel
->
last_sum_numb
;
}
else
{
$udModel
=
(
new
UseageDetail
())
->
get
([
'useage_id'
=>
$useage_id
]);
//抄表详情模型
}
$udModel
->
current_numb
=
$uModel
->
current_sum_numb
;
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
$udModel
->
price
=
$uModel
->
price
;
$udModel
->
save
();
...
...
@@ -188,6 +231,11 @@ class Useage extends Base
$checkType
=
Request
::
param
(
'checkType'
);
$this
->
verify
(
$useage_id
,
$checkType
);
//1是通过 2是驳回
if
(
$checkType
==
2
)
{
<<<<<<<
HEAD
=======
$res
=
$this
->
checkEnd
(
$useage_id
);
if
(
$res
!==
true
)
return
$res
;
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
$useage
->
status
=
3
;
//3代表被驳回
$useage
->
save
();
return
json
([
'status'
=>
1
,
'message'
=>
'单据已经驳回'
]);
...
...
@@ -249,6 +297,7 @@ class Useage extends Base
public
function
del
(){
$useage_id
=
Request
::
param
(
'uid'
);
<<<<<<<
HEAD
$this
->
checkEnd
(
$useage_id
);
$useage
=
(
new
\app\em\model\Useage
())
->
get
([
'useage_id'
=>
$useage_id
]);
$useage_details
=
(
new
UseageDetail
())
->
select
([
'useage_id'
=>
$useage_id
]);
...
...
@@ -265,6 +314,52 @@ class Useage extends Base
Db
::
rollback
();
return
json
([
'status'
=>
0
,
'message'
=>
"删除异常,单据删除失败,请联系管理员"
]);
}
=======
$res
=
$this
->
checkEnd
(
$useage_id
);
if
(
$res
!==
true
)
return
$res
;
//删除useage表数据
$useage
=
(
new
\app\em\model\Useage
())
->
get
([
'useage_id'
=>
$useage_id
]);
$useage
->
delete
();
//删除明细表数据
(
new
UseageDetail
())
->
where
(
'useage_id'
,
'='
,
$useage_id
)
->
delete
();
return
json
([
'status'
=>
1
,
'message'
=>
"删除单据成功"
]);
}
/**
* 判断useage_id是否是em_id的最后一条记录
* @param $useage_id
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
checkEnd
(
$useage_id
){
$uModel
=
(
new
\app\em\model\Useage
())
->
get
([
'useage_id'
=>
$useage_id
]);
if
(
!
$uModel
)
return
json
([
'status'
=>
0
,
'message'
=>
"不存在的抄表单号,请联系管理员"
]);
if
(
$uModel
->
status
==
2
)
return
json
([
'status'
=>
0
,
'message'
=>
"已审核过的单据无法操作,请联系管理员"
]);
//找出电表最后一条数据
$lastModel
=
(
new
\app\em\model\Useage
())
->
where
(
'em_id'
,
'='
,
$uModel
->
em_id
)
->
order
(
'id desc'
)
->
find
();
if
(
$lastModel
->
status
==
2
)
return
json
([
'status'
=>
0
,
'message'
=>
"单号不是最新的抄表记录且最新的抄表记录已经审核无法操作,请联系管理员"
]);
if
(
$uModel
->
id
!=
$lastModel
->
id
){
return
json
([
'status'
=>
0
,
'message'
=>
"抄表单号不是最新的抄表记录无法操作,请联系管理员"
]);
}
return
true
;
}
//审核
public
function
verify
(
$usage_id
,
$status
=
2
){
$user
=
Session
::
get
(
'user'
);
$cModel
=
new
EmCheckBill
();
$cModel
->
info
=
Request
::
param
(
'refuseInfo'
);
$cModel
->
uid
=
$user
[
'user_id'
];
$cModel
->
mode
=
'useage'
;
$cModel
->
mode_id
=
$usage_id
;
$cModel
->
status
=
$status
;
$cModel
->
save
();
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
}
/**
...
...
application/em/model/EmInvoice.php
浏览文件 @
cf175255
...
...
@@ -45,6 +45,7 @@ class EmInvoice extends Base
->
select
()
->
toarray
();
$step
=
100000
;
foreach
(
$data
as
&
$item
){
if
(
$item
[
'payment_balance'
]
==
0
){
...
...
@@ -58,6 +59,8 @@ class EmInvoice extends Base
}
else
{
$item
[
'sett_amount'
]
=
round
(
$item
[
'settle_amount'
]
-
$item
[
'settle_balance'
],
3
);
}
$item
[
'repo_numb'
]
=
(
$item
[
'current_sum_numb'
]
*
$step
-
$item
[
'last_sum_numb'
]
*
$step
)
*
$item
[
'rate'
]
/
$step
;
}
return
$data
;
}
...
...
application/em/model/Useage.php
浏览文件 @
cf175255
...
...
@@ -53,8 +53,13 @@ class Useage extends Base
foreach
(
$data
as
$k
=>
$v
){
$data
[
$k
][
'repo_numb'
]
=
round
(
round
(
$v
[
'current_sum_numb'
]
-
$v
[
'last_sum_numb'
],
2
)
*
$v
[
'rate'
],
2
);
if
(
$v
[
'status'
]
==
3
){
$info
=
(
new
EmCheckBill
())
->
field
(
'info'
)
->
get
([
'mode_id'
=>
$v
[
'useage_id'
]]);
$data
[
$k
][
'info'
]
=
$info
[
'info'
];
}
}
return
$data
;
return
$data
;
}
public
function
getCopyListCount
(
$map
){
$data
=
self
::
alias
(
'ue'
)
...
...
application/em/validate/UseageGeneralInfoValidate.php
浏览文件 @
cf175255
...
...
@@ -30,7 +30,7 @@ class UseageGeneralInfoValidate extends Validate
];
protected
$scene
=
[
's1'
=>
'em_id,last_numb,last_date,current_numb,current_date,photo_id,staff_id'
,
's1'
=>
'em_id,last_numb,last_date,current_numb,current_date,photo_id,staff_id
,price
'
,
's2'
=>
'em_id,last_numb,last_date,current_numb,current_date,photo_id,staff_id,price'
,
];
...
...
application/em/view/invoice/index.html
浏览文件 @
cf175255
...
...
@@ -75,7 +75,7 @@
<th
lay-data=
"{field:'station_name',sort: true}"
>
所属基站名
</th>
<th
lay-data=
"{templet:'#em_numb',sort: true} "
>
所属电表号
</th>
<th
lay-data=
"{templet: '#useage'}"
>
抄表度数
</th>
<th
lay-data=
"{
templet: '#
repo_numb'}"
>
用电量
</th>
<th
lay-data=
"{
field: '
repo_numb'}"
>
用电量
</th>
<th
lay-data=
"{templet:'#payment'}"
>
缴费金额
</th>
<th
lay-data=
"{templet:'#settle'}"
>
结算金额
</th>
<th
lay-data=
"{field: 'status'}"
>
账单状态
</th>
...
...
application/em/view/useage/default.html
浏览文件 @
cf175255
...
...
@@ -205,7 +205,7 @@
</div>
{if $detail == false}
<div
class=
"layui-form-item layui-col-md-offset4"
>
<a
href=
"/
em
"
class=
"layui-btn"
>
<a
href=
"/
useage/
"
class=
"layui-btn"
>
返回
</a>
<button
class=
"layui-btn"
lay-filter=
"save"
lay-submit=
""
>
...
...
application/em/view/useage/detail.html
浏览文件 @
cf175255
...
...
@@ -200,6 +200,7 @@
</div>
</div>
{if $useage.status
<
2
}
<<<<<<<
HEAD
<
div
class=
"layui-form-item layui-col-md-offset4"
>
<button
class=
"layui-btn"
lay-filter=
"pass"
lay-submit=
""
>
通过
...
...
@@ -208,6 +209,18 @@
驳回
</button>
</div>
=======
{if check_ele_permission('useage/check') }
<div
class=
"layui-form-item layui-col-md-offset4"
>
<button
class=
"layui-btn"
lay-filter=
"pass"
lay-submit=
""
>
通过
</button>
<button
class=
"layui-btn"
lay-filter=
"refuse"
lay-submit=
""
>
驳回
</button>
</div>
{/if}
>>>>>>> 712dea449184407dd0ea2cb79857be09da1c93cd
{/if}
</form>
</div>
...
...
@@ -217,13 +230,6 @@
{block name="js"}
<script>
//限制输入长度
function
sliceDom
(
dom
,
len
){
if
(
dom
.
value
.
length
>
len
)
return
dom
.
value
=
dom
.
value
.
slice
(
0
,
len
)
}
//初始化Layui控件
layui
.
use
([
'form'
,
'layer'
,
'laydate'
,
'upload'
],
function
()
{
...
...
@@ -251,11 +257,15 @@
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
==
1
)
{
layer
.
msg
(
data
.
message
,{
icon
:
6
,
time
:
2
000
},
function
(){
layer
.
msg
(
data
.
message
,{
icon
:
6
,
time
:
3
000
},
function
(){
window
.
location
.
href
=
'/useage'
;
})
}
else
{
<<<<<<<
HEAD
layer
.
msg
(
data
.
message
||
data
.
msg
,{
icon
:
5
,
time
:
1000
})
=======
layer
.
msg
(
data
.
message
||
data
.
msg
,{
icon
:
5
,
time
:
3000
})
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
window
.
location
.
href
=
'/useage'
;
}
}
...
...
@@ -272,7 +282,11 @@
layer
.
open
({
type
:
1
,
title
:
'填写驳回理由'
,
<<<<<<<
HEAD
content
:
'<div class="layui-form-item><div class="layui-input-block" style="padding:15px;"><textarea placeholder="驳回理由" class="layui-textarea" id="refuseInfo" name="refuseInfo"></textarea></div>'
,
=======
content
:
'<div class="layui-form-item"><div style="padding:15px;"><textarea placeholder="驳回理由" class="layui-textarea" id="refuseInfo" name="refuseInfo"></textarea></div>'
,
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
btn
:
"提交"
,
yes
:
function
(){
$data
.
field
.
checkType
=
2
;
...
...
@@ -284,12 +298,20 @@
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
==
1
)
{
<<<<<<<
HEAD
layer
.
msg
(
data
.
message
,{
icon
:
6
,
time
:
2000
},
function
(){
window
.
location
.
href
=
'/useage'
;
})
}
else
{
layer
.
msg
(
data
.
message
||
data
.
msg
,{
icon
:
5
,
time
:
1000
})
window
.
location
.
href
=
'/useage'
;
=======
layer
.
msg
(
data
.
message
,{
icon
:
6
,
time
:
4000
},
function
(){
window
.
location
.
href
=
'/useage'
;
})
}
else
{
layer
.
msg
(
data
.
message
||
data
.
msg
,{
icon
:
5
,
time
:
5000
})
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
}
}
});
...
...
application/em/view/useage/index.html
浏览文件 @
cf175255
...
...
@@ -57,19 +57,19 @@
<table
class=
"layui-table"
lay-filter=
"useage"
lay-data=
"{ url:'/useage', page:true, id:'idTest',where:{search_type:document.getElementById('search_type').value,search_text:document.getElementById('search_text').value,date_start:document.getElementById('date_start').value,date_end:document.getElementById('date_end').value,cp_date:document.getElementById('cp_date').value,status:document.getElementById('useage_status').value} }"
>
<thead>
<tr>
<th
lay-data=
"{templet: '#useage_id',sort: true} "
>
抄表单号
</th>
<th
lay-data=
"{field:'station_name'}"
>
所属基站名
</th>
<th
lay-data=
"{field:'em_numb'} "
>
所属电表号
</th>
<th
lay-data=
"{field:'last_date',sort: true}"
>
上次日期
</th>
<th
lay-data=
"{field:'current_date',sort: true}"
>
本次日期
</th>
<th
lay-data=
"{field:'last_sum_numb'}"
>
上次度数
</th>
<th
lay-data=
"{field:'current_sum_numb'}"
>
本次度数
</th>
<th
lay-data=
"{field:'repo_numb'}"
>
用电量
</th>
<th
lay-data=
"{templet: '#status',sort: true}"
>
状态
</th>
<th
lay-data=
"{templet: '#photo_id',sort: true}"
>
抄表凭证
</th>
<th
lay-data=
"{fixed: 'right', align:'center', toolbar: '#barDemo'}"
>
操作
</th>
<th
lay-data=
"{templet: '#useage_id',sort: true
,width:'12%'
} "
>
抄表单号
</th>
<th
lay-data=
"{field:'station_name'
,width:'12%'
}"
>
所属基站名
</th>
<th
lay-data=
"{field:'em_numb'
,width:'8%'
} "
>
所属电表号
</th>
<th
lay-data=
"{field:'last_date',sort: true
,width:'9%'
}"
>
上次日期
</th>
<th
lay-data=
"{field:'current_date',sort: true
,width:'9%'
}"
>
本次日期
</th>
<th
lay-data=
"{field:'last_sum_numb'
,width:'7%'
}"
>
上次度数
</th>
<th
lay-data=
"{field:'current_sum_numb'
,width:'7%'
}"
>
本次度数
</th>
<th
lay-data=
"{field:'repo_numb'
,width:'7%'
}"
>
用电量
</th>
<th
lay-data=
"{templet: '#status',sort: true
,width:'5%'
}"
>
状态
</th>
<th
lay-data=
"{templet: '#photo_id',sort: true
,width:'7%'
}"
>
抄表凭证
</th>
<th
lay-data=
"{fixed: 'right', align:'center', toolbar: '#barDemo'
,width:'16%'
}"
>
操作
</th>
</tr>
</thead>
</table>
...
...
@@ -95,22 +95,40 @@
{{
#
if
(
d
.
status
==
2
){
}}
<
span
class
=
"layui-bg-blue"
>
已审核
<
/span
>
{{
#
}
}}
<<<<<<<
HEAD
{{
#
if
(
d
.
status
==
3
)
{
}}
<
span
class
=
"layui-bg-orange"
title
=
"{{ d.info.info }}"
>
被驳回
<
/span
>
{{
#
}
}}
{{
#
if
(
d
.
status
<
2
)
{
}}
<
span
class
=
"layui-bg-green"
title
=
"{{ d.info.info }}"
>
未审核
<
/span
>
=======
{{
#
if
(
d
.
status
==
3
){
}}
<
span
class
=
"layui-bg-orange"
title
=
"{{ d.info }}"
>
被驳回
<
/span
>
{{
#
}
}}
{{
#
if
(
d
.
status
<
2
){
}}
<
span
class
=
"layui-bg-green"
>
未审核
<
/span
>
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
{{
#
}
}}
</script>
{if $admin == true}
<script
type=
"text/html"
id=
"barDemo"
>
<<<<<<<
HEAD
{{
#
if
(
d
.
status
==
1
||
d
.
status
==
3
){
}}
<
a
title
=
"删除"
class
=
"layui-btn layui-btn-sm layui-bg-green"
lay
-
event
=
"update"
>
编辑
<
/a
>
=======
{{
#
if
(
d
.
status
==
1
){
}}
<
a
title
=
"审核"
class
=
"layui-btn layui-btn-sm layui-bg-green"
href
=
"/useage/{{d.useage_id}}"
>
审核
<
/a
>
{{
#
}
}}
{{
#
if
(
d
.
status
==
1
||
d
.
status
==
3
){
}}
<
a
title
=
"编辑"
class
=
"layui-btn layui-btn-sm layui-bg-green"
href
=
"/useage_update/{{d.useage_id}}"
>
编辑
<
/a
>
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
<
a
title
=
"删除"
class
=
"layui-btn layui-btn-sm layui-btn-danger"
lay
-
event
=
"del"
>
删除
<
/a
>
{{
#
}
}}
</script>
{/if}
<script>
layui
.
use
([
'laydate'
,
'form'
,
'table'
],
function
(){
var
laydate
=
layui
.
laydate
,
...
...
@@ -138,13 +156,13 @@
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
==
1
){
layer
.
msg
(
data
.
message
,{
icon
:
6
,
time
:
2
000
},
function
(){
layer
.
msg
(
data
.
message
,{
icon
:
6
,
time
:
4
000
},
function
(){
obj
.
del
();
layer
.
close
(
index
);
location
.
reload
()
})
}
else
{
layer
.
msg
(
data
.
message
,{
icon
:
5
,
time
:
1
000
})
layer
.
msg
(
data
.
message
,{
icon
:
5
,
time
:
5
000
})
}
}
});
...
...
application/em/view/useage/update.html
0 → 100644
浏览文件 @
cf175255
{extend name="public:base" /}
{block name="body"}
<div
class=
"layui-row"
>
<div
class=
"layui-col-md12"
>
<div
class=
"layui-card"
>
<form
class=
"layui-form"
>
<div
class=
"layui-form-box"
>
<div
class=
"layui-form-head"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
基本信息
</label>
</div>
</div>
<div
class=
"layui-form-body"
>
<div
class=
"layui-row"
>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
基站编号
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"station_sp_code"
autocomplete=
"off"
class=
"layui-input"
value=
"{$station.station_sp_code|default=''}"
disabled=
"disabled"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
基站名称
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"station_name"
autocomplete=
"off"
class=
"layui-input"
value=
"{$station.station_name|default=''}"
disabled=
"disabled"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
电表类型
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"project_number"
autocomplete=
"off"
class=
"layui-input"
value=
"{$em.type.name|default=''}"
disabled=
"disabled"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
电表编号
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"project_number"
autocomplete=
"off"
class=
"layui-input"
value=
"{$em.em_numb|default=''}"
disabled=
"disabled"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
倍率
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"rate"
name=
"rate"
autocomplete=
"off"
class=
"layui-input"
value=
"{$em.rate}"
disabled=
"disabled"
>
</div>
</div>
</div>
</div>
</div>
</div>
</form>
<form
class=
"layui-form"
>
<input
type=
"hidden"
name=
"em_id"
value=
"{$em.id}"
>
<input
type=
"hidden"
name=
"charge_type"
value=
"{$em.rule.charge_type}"
>
<input
type=
"hidden"
name=
"pricing_type"
value=
"{$em.rule.pricing_type}"
>
<input
type=
"hidden"
name=
"useage_id"
value=
"{$useage.useage_id|default=''}"
>
<div
class=
"layui-form-box"
>
<div
class=
"layui-form-head"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
抄表信息
</label>
</div>
</div>
<div
class=
"layui-form-body"
>
<div
class=
"layui-row"
>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
上次抄表日期
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"last_date"
name=
"last_date"
autocomplete=
"off"
class=
"layui-input"
value=
"{$useage.last_date}"
disabled=
"disabled"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
本次抄表日期
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"current_date"
name=
"current_date"
autocomplete=
"off"
class=
"layui-input"
value=
"{$useage.current_date}"
{
if
$
useage
.
status
neq
3
}
disabled=
"disabled"
{/
if
}
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
上期度数
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"last_numb"
name=
"last_numb"
autocomplete=
"off"
class=
"layui-input"
disabled=
"disabled"
value=
"{$useage.last_sum_numb}"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
度
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
本期度数
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"current_numb"
name=
"current_numb"
autocomplete=
"off"
class=
"layui-input"
value=
"{$useage.current_sum_numb}"
{
if
$
useage
.
status
neq
3
}
disabled=
"disabled"
{/
if
}
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
度
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
用电量
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"repo_numb"
name=
"repo_numb"
autocomplete=
"off"
class=
"layui-input"
value=
"{$useage.repo_numb}"
disabled=
"disabled"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
度
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
单价
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
id=
"price"
name=
"price"
autocomplete=
"off"
class=
"layui-input"
{
if
$
useage
.
status
neq
3
}
disabled=
"disabled"
{/
if
}
value=
"{$useage.price}"
>
</div>
<div
class=
"layui-form-mid layui-word-aux"
>
元
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
抄表员
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"staff_id"
{
if
$
useage
.
status
neq
3
}
disabled=
"disabled"
{/
if
}
>
{foreach $staffs as $u}
<option
value=
"{$u['id']}"
{
if
$
u
['
id
']
==
$
uid
}
selected
{/
if
}
>
{$u['name']}
</option>
{/foreach}
</select>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label"
>
<span
class=
"x-red"
>
*
</span>
抄表凭证
</label>
<div
class=
"layui-input-inline"
>
<button
type=
"button"
class=
"layui-btn"
id=
"up_photo"
{
if
$
useage
.
status=
=2}
disabled=
"disabled"
{/
if
}
>
<i
class=
"layui-icon"
>
</i>
上传
</button>
<input
type=
"hidden"
name=
"photo_id"
value=
"{$useage.photo_id}"
>
<a
href=
"{$useage.photo.src}"
target=
"_blank"
class=
"layui-btn {if empty($useage.photo_id)} layui-hide {/if}"
>
<i
class=
"layui-icon"
>

</i>
预览
</a>
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item layui-col-md-offset4"
>
<a
href=
"/useage"
class=
"layui-btn"
>
返回
</a>
<button
class=
"layui-btn"
lay-filter=
"save"
lay-submit=
""
>
保存
</button>
</div>
</form>
</div>
</div>
</div>
{/block}
{block name="js"}
<script>
//初始化Layui控件
layui
.
use
([
'form'
,
'layer'
,
'laydate'
,
'upload'
],
function
()
{
$
=
layui
.
jquery
;
var
form
=
layui
.
form
,
layer
=
layui
.
layer
,
laydate
=
layui
.
laydate
,
upload
=
layui
.
upload
;
//消息提示
function
layMsg
(
msg
,
type
=
6
,
time
=
1000
){
layer
.
msg
(
msg
,{
icon
:
type
,
time
:
time
,
});
}
laydate
.
render
({
elem
:
'#current_date'
,
trigger
:
'click'
,
})
//保存抄表单,并且返回列表
form
.
on
(
'submit(save)'
,
function
(
data
)
{
$
.
ajax
({
url
:
'/useage_add'
,
method
:
"POST"
,
data
:
data
.
field
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
==
1
)
{
layer
.
msg
(
data
.
message
,{
icon
:
6
,
time
:
4000
},
function
(){
window
.
location
.
href
=
'/useage'
;
})
}
else
{
layer
.
msg
(
data
.
message
,{
icon
:
5
,
time
:
5000
})
}
}
});
return
false
;
});
//上传电表照片
var
upPhoto
=
upload
.
render
({
elem
:
'#up_photo'
,
url
:
'/upFile'
,
field
:
'up_file'
,
accept
:
'file'
,
size
:
10240
,
done
:
function
(
res
)
{
if
(
res
.
status
==
1
){
layMsg
(
res
.
message
)
//将电表照片的ID填写
var
$photoId
=
$
(
"input[name='photo_id']"
)
$photoId
.
val
(
res
.
data
.
id
)
var
$a
=
$photoId
.
next
(
'a'
);
$a
.
removeClass
(
'layui-hide'
)
$a
.
attr
(
'href'
,
res
.
data
.
src
);
}
else
{
layMsg
(
res
.
message
,
5
)
return
;
}
}
});
$
(
'#current_numb'
).
change
(
function
(){
var
$level
=
100000
;
var
$rate
=
$
(
'#rate'
).
val
();
var
$baseNum
=
$level
*
$rate
;
var
$rNum
=
$
(
this
).
val
()
*
$baseNum
-
$
(
'#last_numb'
).
val
()
*
$baseNum
;
if
(
$rNum
<
0
){
layMsg
(
'本次抄表必须大于上次抄表读数'
,
5
);
$
(
'#current_numb'
).
focus
();
}
else
{
$
(
'#repo_numb'
).
val
(
$rNum
/
$level
)
}
})
});
</script>
{/block}
\ No newline at end of file
config/jz.php
0 → 100644
浏览文件 @
cf175255
<?php
//配置文件
return
[
//加密串
'jztype'
=>
'mysql'
,
'jzhostname'
=>
'127.0.0.1'
,
'jzdatabase'
=>
'jzdb'
,
'jzusername'
=>
'root'
,
'jzpassword'
=>
'pvv5718J0CwhNfn4B^8^H3igPj#oiQkX'
,
'jzhostport'
=>
'10036'
,
'jzcharset'
=>
'utf8'
,
];
public/dist/js/getUserToken.js
浏览文件 @
cf175255
...
...
@@ -2,7 +2,7 @@ let userIdLocal = document.cookie.split('user=')[1]?(document.cookie.split('user
let
temp
=
sessionStorage
.
getItem
(
'userIdLocal'
)?
sessionStorage
.
getItem
(
'userIdLocal'
):
''
if
(
userIdLocal
==
''
)
top
.
location
.
href
=
"http://oa
.gonn.com.cn
/"
;
if
(
userIdLocal
==
''
)
top
.
location
.
href
=
"http://oa
-test.gonn.tech
/"
;
if
(
temp
!=
userIdLocal
||
!
sessionStorage
.
getItem
(
'userToken'
)){
sessionStorage
.
setItem
(
"userIdLocal"
,
userIdLocal
)
...
...
route/admin.php
浏览文件 @
cf175255
...
...
@@ -147,7 +147,11 @@ 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'
);
<<<<<<<
HEAD
Route
::
post
(
'useage_update'
,
'em/useage/update'
);
=======
Route
::
get
(
'useage_update/:useage_id'
,
'em/useage/update'
);
>>>>>>>
712
dea449184407dd0ea2cb79857be09da1c93cd
Route
::
post
(
'upFile'
,
'em/UploadFile/upFile'
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论