Skip to content
项目
群组
代码片段
帮助
当前项目
正在载入...
登录 / 注册
切换导航面板
J
Jz-Php
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
图表
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
日程
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
图像
聊天
创建新问题
作业
提交
问题看板
Open sidebar
PHP
Jz-Php
Commits
636c1dd7
提交
636c1dd7
authored
5月 27, 2020
作者:
chengye
浏览文件
操作
浏览文件
下载
差异文件
初始化 test
上级
0506eea7
ae3d6abf
全部展开
显示空白字符变更
内嵌
并排
正在显示
16 个修改的文件
包含
427 行增加
和
89 行删除
+427
-89
Login.php
application/admin/controller/Login.php
+1
-1
SingleSign.php
application/admin/controller/SingleSign.php
+7
-3
FkAddValidate.php
application/admin/validate/FkAddValidate.php
+27
-0
base_region.html
application/admin/view/basestation/base_region.html
+1
-5
role.html
application/admin/view/staff/role.html
+2
-1
common.php
application/em/common.php
+0
-6
Payment.php
application/em/controller/Payment.php
+175
-56
Region.php
application/em/controller/Region.php
+0
-4
Em.php
application/em/model/Em.php
+1
-1
EmPaymentFk.php
application/em/model/EmPaymentFk.php
+7
-0
detail.html
application/em/view/payment/detail.html
+16
-11
pay_oa.html
application/em/view/payment/pay_oa.html
+179
-0
region_list.html
application/em/view/region/region_list.html
+0
-1
region_list1.html
application/em/view/region/region_list1.html
+0
-0
oafk.php
config/oafk.php
+9
-0
admin.php
route/admin.php
+2
-0
没有找到文件。
application/admin/controller/Login.php
浏览文件 @
636c1dd7
...
@@ -70,7 +70,7 @@ class Login extends Controller
...
@@ -70,7 +70,7 @@ class Login extends Controller
session
(
null
);
session
(
null
);
cookie
(
null
);
cookie
(
null
);
(
new
SingleSign
())
->
clear
();
(
new
SingleSign
())
->
clear
();
$this
->
redirect
(
'/
login
'
);
$this
->
redirect
(
'/
index
'
);
}
}
private
function
checkStaff
(){
private
function
checkStaff
(){
...
...
application/admin/controller/SingleSign.php
浏览文件 @
636c1dd7
...
@@ -9,6 +9,7 @@ namespace app\admin\controller;
...
@@ -9,6 +9,7 @@ namespace app\admin\controller;
use
app\admin\model\StaffModel
;
use
app\admin\model\StaffModel
;
use
think\Exception
;
use
think\Exception
;
use
think\facade\Cookie
;
use
think\facade\Cookie
;
use
think\facade\Session
;
class
SingleSign
{
class
SingleSign
{
public
$instence
=
null
;
public
$instence
=
null
;
...
@@ -19,6 +20,8 @@ class SingleSign {
...
@@ -19,6 +20,8 @@ class SingleSign {
if
(
$res
)
$this
->
instence
=
$redis
;
if
(
$res
)
$this
->
instence
=
$redis
;
else
throw
new
Exception
(
"redis connect faild"
);
else
throw
new
Exception
(
"redis connect faild"
);
}
}
$sid
=
Cookie
::
get
(
'PHPSESSID'
);
if
(
!
empty
(
$sid
))
Cookie
::
set
(
'PHPSESSID'
,
$sid
,[
'expire'
=>
time
()
+
3600
]);
}
}
//获取session
//获取session
...
@@ -37,15 +40,14 @@ class SingleSign {
...
@@ -37,15 +40,14 @@ class SingleSign {
$isAdmin
=
substr
(
$str
,
$pos
,
1
);
$isAdmin
=
substr
(
$str
,
$pos
,
1
);
$user
[
'is_admin'
]
=
$isAdmin
;
$user
[
'is_admin'
]
=
$isAdmin
;
if
(
$user
[
'is_admin'
]
==
true
)
{
$user
[
'username'
]
=
'gonnadmin'
;
}
else
{
preg_match
(
'/adminuser\|s\:(\d+)\:/'
,
$str
,
$match
);
preg_match
(
'/adminuser\|s\:(\d+)\:/'
,
$str
,
$match
);
if
(
$match
){
if
(
$match
){
$pos
=
stripos
(
$str
,
'adminuser|s:'
)
+
strlen
(
'adminuser|s:'
);
$pos
=
stripos
(
$str
,
'adminuser|s:'
)
+
strlen
(
'adminuser|s:'
);
$pos
+=
strlen
(
$match
[
1
])
+
2
;
$pos
+=
strlen
(
$match
[
1
])
+
2
;
$user
[
'username'
]
=
substr
(
$str
,
$pos
,
$match
[
1
]
+
0
);
$user
[
'username'
]
=
substr
(
$str
,
$pos
,
$match
[
1
]
+
0
);
}
}
if
(
$user
[
'is_admin'
]
==
true
&&
$user
[
'username'
]
==
'admin'
)
{
$user
[
'username'
]
=
'gonnadmin'
;
}
}
$pos
=
stripos
(
$str
,
'ukey|s:10:'
)
+
11
;
$pos
=
stripos
(
$str
,
'ukey|s:10:'
)
+
11
;
...
@@ -81,6 +83,8 @@ class SingleSign {
...
@@ -81,6 +83,8 @@ class SingleSign {
public
function
clear
(
$prex
=
'PHPREDIS_SESSION:'
){
public
function
clear
(
$prex
=
'PHPREDIS_SESSION:'
){
$sid
=
Cookie
::
get
(
'PHPSESSID'
);
$sid
=
Cookie
::
get
(
'PHPSESSID'
);
$sid
=
$prex
.
$sid
;
$sid
=
$prex
.
$sid
;
Cookie
::
delete
(
$sid
);
if
(
$this
->
instence
->
set
(
$sid
,
''
))
return
true
;
if
(
$this
->
instence
->
set
(
$sid
,
''
))
return
true
;
return
false
;
return
false
;
}
}
...
...
application/admin/validate/FkAddValidate.php
0 → 100644
浏览文件 @
636c1dd7
<?php
namespace
app\admin\validate
;
use
think\Validate
;
class
FkAddValidate
extends
Validate
{
protected
$rule
=
[
'title'
=>
'require'
,
'payee'
=>
'require'
,
'payOrg'
=>
'require'
,
'date'
=>
'require|date'
,
'fkinfo'
=>
'require'
];
protected
$message
=
[
'title.require'
=>
'标题必填'
,
'payee.require'
=>
'收款方必填'
,
'payOrg.require'
=>
'付款组织必填'
,
'date.require'
=>
'日期必填'
,
'date.date'
=>
'日期格式错误'
];
}
\ No newline at end of file
application/admin/view/basestation/base_region.html
浏览文件 @
636c1dd7
...
@@ -20,9 +20,7 @@
...
@@ -20,9 +20,7 @@
<option
value=
"1"
{
if
$
search_type
eq
1
}
selected
{/
if
}
>
站名
</option>
<option
value=
"1"
{
if
$
search_type
eq
1
}
selected
{/
if
}
>
站名
</option>
<option
value=
"2"
{
if
$
search_type
eq
2
}
selected
{/
if
}
>
站号
</option>
<option
value=
"2"
{
if
$
search_type
eq
2
}
selected
{/
if
}
>
站号
</option>
<option
value=
"3"
{
if
$
search_type
eq
3
}
selected
{/
if
}
>
项目编号
</option>
<option
value=
"3"
{
if
$
search_type
eq
3
}
selected
{/
if
}
>
项目编号
</option>
<option
value=
"4"
{
if
$
search_type
eq
4
}
selected
{/
if
}
>
机房二维码
</option>
<option
value=
"4"
{
if
$
search_type
eq
4
}
selected
{/
if
}
>
机房二维码
</option>
</select>
</select>
</div>
</div>
<div
class=
"layui-input-inline layui-show-xs-block"
>
<div
class=
"layui-input-inline layui-show-xs-block"
>
...
@@ -44,11 +42,9 @@
...
@@ -44,11 +42,9 @@
{if $region.level == 0}
{if $region.level == 0}
<option
disabled=
'disabled'
class=
'layui-disabled'
>
{$region.region_name}
</option>
<option
disabled=
'disabled'
class=
'layui-disabled'
>
{$region.region_name}
</option>
{else /}
{else /}
<option
value=
"{$region.id}"
{
if
$
area_id
eq
$
region
.
id
}
selected
{/
if
}
>
{$region.region_name}
</option>
<option
value=
"{$region.id}"
{
if
$
area_id
eq
$
region
.
id
}
selected
{/
if
}
>
{$region.region_name}
</option>
{/if}
{/if}
{/volist}
{/volist}
</select>
</select>
</div>
</div>
...
...
application/admin/view/staff/role.html
浏览文件 @
636c1dd7
...
@@ -60,7 +60,8 @@
...
@@ -60,7 +60,8 @@
<script
src=
"dist/js/md5.js"
></script>
<script
src=
"dist/js/md5.js"
></script>
<script
src=
"dist/js/sha1.js"
></script>
<script
src=
"dist/js/sha1.js"
></script>
<script
src=
"dist/js/util.js"
></script>
<script
src=
"dist/js/util.js"
></script>
<!--<script src="dist/js/getUserToken.js"></script>-->
<script
src=
"dist/js/getUserToken.js"
></script>
<script>
<script>
layui
.
use
([
'laydate'
,
'form'
,
'upload'
],
function
(){
layui
.
use
([
'laydate'
,
'form'
,
'upload'
],
function
(){
upload
=
layui
.
upload
;
upload
=
layui
.
upload
;
...
...
application/em/common.php
浏览文件 @
636c1dd7
...
@@ -107,12 +107,6 @@ function createPass(){
...
@@ -107,12 +107,6 @@ function createPass(){
return
substr
(
md5
(
config
(
'admin.passwd_salt'
)
.
time
()),
0
,
10
);
return
substr
(
md5
(
config
(
'admin.passwd_salt'
)
.
time
()),
0
,
10
);
}
}
//生成10位的随机密码
//将密码返回给控制器
//控制器通过MD加密之后存储到数据库
/**
/**
* 基站状态递归实现无限极分类
* 基站状态递归实现无限极分类
* @param $array 分类数据
* @param $array 分类数据
...
...
application/em/controller/Payment.php
浏览文件 @
636c1dd7
...
@@ -5,18 +5,19 @@
...
@@ -5,18 +5,19 @@
*/
*/
namespace
app\em\controller
;
namespace
app\em\controller
;
use
app\admin\controller\Base
;
use
app\admin\controller\Base
;
use
app\admin\model\DepartmentModel
;
use
app\admin\model\ElectricMeter
;
use
app\admin\model\ElectricMeter
;
use
app\em\model\EmAccount
;
use
app\em\model\EmAccount
;
use
app\em\model\EmCert
;
use
app\em\model\EmCert
;
use
app\em\model\EmInvoice
;
use
app\em\model\EmInvoice
;
use
app\em\model\EmInvoiceHistory
;
use
app\em\model\EmPayment
;
use
app\em\model\EmPayment
;
use
app\em\model\EmPaymentFk
;
use
app\em\model\EmPaymentInvoice
;
use
app\em\model\EmPaymentInvoice
;
use
app\em\model\EmPaymentInvoiceBalance
;
use
app\em\model\EmPaymentInvoiceBalance
;
use
app\em\model\EmPaymentReceipt
;
use
app\em\model\EmPaymentReceipt
;
use
app\em\model\Staff
;
use
app\em\model\Staff
;
use
app\em\model\Station
;
use
app\em\validate\AddPaymentValidate
;
use
app\em\validate\AddPaymentValidate
;
use
function
Sodium
\library_version_major
;
use
think\Exception
;
use
think\Exception
;
use
think\facade\Request
;
use
think\facade\Request
;
use
think\facade\Session
;
use
think\facade\Session
;
...
@@ -219,60 +220,6 @@ class Payment extends Base
...
@@ -219,60 +220,6 @@ class Payment extends Base
return
$this
->
fetch
();
return
$this
->
fetch
();
}
}
//更新缴费数据 即保存缴费 记录一次缴费
// public function update(){
// $data = Request::post();
//
// //更新缴费信息
// $payment = EmPayment::get(['payment_id'=>$data['payment_id']]);
// $payment->amount = $data['paid_totle']; //记录凭证金额
// $payment->staff_id = $data['staff_id'];
// //等待审核1,2已审核 1阶段暂忽略
// //$payment->status = 1;
// $payment->status = 2;
// $payment->save();
//
// //更新账单状态
// //1.查询所有账单
// $invArr = [];
// foreach ($data['paid'] as $key => $item) {
// $invArr['invoice_id'] = $key;
// $invArr['paid_amount'] = $item['paid_amount'];
// }
// /*
// * 循环查询账单 并计算balance的数值 更新balance,并将当前的状态,同步到历史数据一份进行销账的追踪
// * 通过与balance的计算结果比较 如果balance=0,则账单状态更新为已缴费 如果不为0则更新为部分缴费
// * 账单与缴费凭证关系的建立 通过缴费单与凭证的关联关系获取,显示在账单详情中
// */
// foreach ($invArr as $item){
// $inv = EmInvoice::get(['invoice_id'=>$item['invoice_id']]);
//
// $balance = $inv->payment_balance - $inv['paid_amount'];
//
// //计算状态
// if($balance == 0){
// $inv->status = setInvoiceStatus($inv->status,self::PAYMENT_FULL_CODE,self::PAYMENT_STATUS_INDEX);
// } else {
// $inv->status = setInvoiceStatus($inv->status,self::PAYMENT_PARTIAL_CODE,self::PAYMENT_STATUS_INDEX);
// }
//
// $inv->payment_balance = $balance;
//
// //更新账单信息
// $inv->save();
// //保存销账明细,复制当前对象数据 到history表
//
// $invHistory = new EmInvoiceHistory();
//
// if(!$invHistory->save($inv->toarray())){
// throw new Exception('保存销账明细错误!');
// } else {
// return json(['status'=>1,'message'=>'缴费成功!']);
// }
// }
//
// }
//缴费单详情
//缴费单详情
public
function
detail
(){
public
function
detail
(){
$payment_id
=
Request
::
param
(
'payment_id'
);
$payment_id
=
Request
::
param
(
'payment_id'
);
...
@@ -280,6 +227,16 @@ class Payment extends Base
...
@@ -280,6 +227,16 @@ class Payment extends Base
//查询缴费单基本信息
//查询缴费单基本信息
$payment
=
$epModel
->
where
(
'payment_id'
,
'='
,
$payment_id
)
->
find
();
$payment
=
$epModel
->
where
(
'payment_id'
,
'='
,
$payment_id
)
->
find
();
if
(
isset
(
$payment
->
status_fk
)
&&
$payment
->
status_fk
!=
0
){
$fkModel
=
EmPaymentFk
::
get
([
'payment_id'
=>
$payment
->
payment_id
]);
$fkModel
->
link
=
config
(
'oafk.base_url'
)
.
config
(
'oafk.link'
)
.
$fkModel
->
oafk_id
;
}
else
{
$fkModel
=
new
EmPaymentFk
();
$fkModel
->
oafk_numb
=
''
;
$fkModel
->
link
=
''
;
}
$this
->
assign
(
'fk'
,
$fkModel
);
switch
(
$payment
->
status
){
switch
(
$payment
->
status
){
case
0
:
case
0
:
$payment
->
statusTitle
=
'未缴费'
;
$payment
->
statusTitle
=
'未缴费'
;
...
@@ -443,4 +400,165 @@ class Payment extends Base
...
@@ -443,4 +400,165 @@ class Payment extends Base
$this
->
assign
(
'data'
,
$eibs
);
$this
->
assign
(
'data'
,
$eibs
);
return
$this
->
fetch
();
return
$this
->
fetch
();
}
}
public
function
payoa
(){
$payment_id
=
Request
::
param
(
'payment_id'
);
$user
=
Session
::
get
(
'user'
);
if
(
$user
[
'is_admin'
]
==
1
){
if
(
$user
[
'username'
]
==
'admin'
||
$user
[
'username'
]
==
'gonnadmin'
){
$staff
=
[];
}
else
{
$staff
=
Staff
::
get
([
'name'
=>
$user
[
'name'
]]);
}
}
else
{
$staff
=
Staff
::
get
(
$user
[
'user_id'
]);
}
$this
->
assign
(
'payment_id'
,
$payment_id
);
$this
->
assign
(
'payee'
,
$this
->
getGys
(
$staff
->
email
));
$this
->
assign
(
'payOrg'
,
$this
->
getFkInfo
(
2
));
$this
->
assign
(
'payType'
,
$this
->
getFkInfo
(
1
));
return
$this
->
fetch
(
'pay_oa'
);
}
public
function
docnumb
(){
$user
=
Session
::
get
(
'user'
);
$staff
=
Staff
::
get
(
$user
[
'user_id'
]);
$dept
=
DepartmentModel
::
get
(
$staff
->
d_id
);
$post
=
Request
::
post
();
$payment
=
EmPayment
::
get
([
'payment_id'
=>
$post
[
'payment_id'
]]);
if
(
$this
->
checkFkStatus
(
$post
[
'payment_id'
]))
return
json
([
'status'
=>
0
,
'message'
=>
'该缴费单已经创建付款单无法再次创建.'
]);
if
(
$user
[
'is_admin'
])
$staffName
=
'admin'
;
else
$staffName
=
substr
(
$staff
->
email
,
0
,
strpos
(
$staff
->
email
,
'@'
));
$invs
=
(
new
EmPayment
())
->
getinvsInfo
(
$payment
->
payment_id
);
$details
=
[];
foreach
(
$invs
as
$k
=>
$inv
){
$details
[
$k
][
'chargeType'
]
=
"维护电费"
;
if
(
$inv
->
payment_balance
==
0
){
$details
[
$k
][
'amount'
]
=
0
;
}
else
if
(
$inv
->
payment_amount
==
$inv
->
payment_balance
){
$details
[
$k
][
'amount'
]
=
$inv
->
payment_amount
;
}
else
{
$details
[
$k
][
'amount'
]
=
$inv
->
payment_amount
-
$inv
->
payment_balance
;
}
$details
[
$k
][
'projectNumber'
]
=
$this
->
getDetailsFields
(
$inv
->
account_id
);
$details
[
$k
][
'contractNumber'
]
=
$this
->
getDetailsFields
(
$inv
->
account_id
,
true
);
$details
[
$k
][
'receipt'
]
=
''
;
}
$data
=
[
'title'
=>
$post
[
'title'
],
'uname'
=>
$staffName
,
'payType'
=>
$post
[
'payType'
],
'dept'
=>
$dept
->
name
,
'payee'
=>
$post
[
'payee'
],
'payOrg'
=>
$post
[
'payOrg'
],
'fkinfo'
=>
$post
[
'fkinfo'
],
'remarks'
=>
$post
[
'remark'
],
'type'
=>
2
,
'date'
=>
$post
[
'date'
],
'details'
=>
$details
];
foreach
(
$data
as
$k
=>
$v
){
if
(
$k
!=
'remarks'
){
switch
(
$k
){
case
'fkinfo'
:
$msg
=
'付款信息'
;
break
;
case
'date'
:
$msg
=
'付款日期'
;
break
;
case
'title'
:
$msg
=
'单据抬头'
;
break
;
}
if
(
empty
(
$v
))
return
json
([
'status'
=>
0
,
'message'
=>
'字段值'
.
$msg
.
'必填,请检查'
]);
}
if
(
$k
==
'details'
)
{
foreach
(
$v
as
$a
=>
$b
){
foreach
(
$b
as
$aa
=>
$bb
){
if
(
$aa
!=
'receipt'
&&
$aa
!=
'contractNumber'
){
if
(
empty
(
$bb
))
return
json
([
'status'
=>
0
,
'message'
=>
'金额为0,或成本中心编码不存在'
]);
}
}
}
}
}
$res
=
$this
->
createFkNumb
(
$data
);
$result
=
false
;
if
(
!
empty
(
$res
[
'data'
])){
$payment
->
status_fk
=
1
;
$fkModel
=
new
EmPaymentFk
();
$fkModel
->
payment_id
=
$payment
->
payment_id
;
$fkModel
->
oafk_id
=
$res
[
'data'
][
'id'
];
$fkModel
->
oafk_numb
=
$res
[
'data'
][
'numb'
];
$result
=
$payment
->
save
()
&&
$fkModel
->
save
();
}
if
(
$result
)
return
json
([
'status'
=>
1
,
'message'
=>
'创建单据成功'
]);
else
return
json
([
'status'
=>
0
,
'message'
=>
'创建单据失败'
]);
}
public
function
apiKey
(){
return
md5
(
config
(
'oafk.oa_key'
));
}
public
function
getGys
(
$email
)
{
$url
=
config
(
'oafk.base_url'
)
.
config
(
'oafk.gys'
)
.
$this
->
apiKey
();
$url
.=
'&email='
.
$email
;
$res
=
curlGet
(
$url
);
$res
=
json_decode
(
$res
,
true
);
foreach
(
$res
[
'data'
]
as
$k
=>
$v
){
if
(
!
empty
(
$v
[
'bank_info'
])){
foreach
(
$v
[
'bank_info'
]
as
$a
=>
$b
){
$temp
[
$a
]
=
'银行名称: '
.
$b
[
'open_bank_name'
]
.
'账号: '
.
$b
[
'bank_code'
];
}
$res
[
'data'
][
$k
][
'bankInfo'
]
=
json_encode
(
$temp
);
}
}
return
$res
[
'data'
];
}
public
function
getFkInfo
(
$type
){
$url
=
config
(
'oafk.base_url'
)
.
config
(
'oafk.type'
)
.
$this
->
apiKey
();
$data
=
[
'type'
=>
$type
];
$res
=
httpPOST
(
$url
,
$data
);
$res
=
json_decode
(
$res
,
true
);
return
$res
[
'data'
];
}
public
function
createFkNumb
(
$data
){
$url
=
config
(
'oafk.base_url'
)
.
config
(
'oafk.fk'
)
.
$this
->
apiKey
();
$res
=
httpPOST
(
$url
,
[
'data'
=>
json_encode
(
$data
)]);
dd
(
$res
);
$res
=
json_decode
(
$res
,
true
);
return
$res
;
}
public
function
checkFkStatus
(
$payment_id
){
$res
=
(
new
EmPaymentFk
())
->
get
([
'payment_id'
=>
$payment_id
]);
return
$res
?
true
:
false
;
}
public
function
getDetailsFields
(
$account_id
,
$contract
=
false
){
$account
=
EmAccount
::
get
([
'account_id'
=>
$account_id
]);
$em
=
\app\em\model\Em
::
get
(
$account
->
em_id
);
if
(
$contract
===
true
){
if
(
!
$em
)
return
json
([
'status'
=>
0
,
'message'
=>
'没有找到所属电表'
]);
return
$em
->
contract_numb
?:
''
;
}
$station
=
Station
::
get
([
'station_id'
=>
$em
->
station_id
]);
if
(
!
$station
)
return
json
([
'status'
=>
0
,
'message'
=>
'没有找到所属基站'
]);
return
$station
->
proj_number
?:
''
;
}
}
}
\ No newline at end of file
application/em/controller/Region.php
浏览文件 @
636c1dd7
...
@@ -6,12 +6,8 @@
...
@@ -6,12 +6,8 @@
namespace
app\em\controller
;
namespace
app\em\controller
;
use
app\admin\controller\Base
;
use
app\admin\controller\Base
;
use
app\admin\model\DepartmentModel
;
use
app\admin\model\ElectricMeter
;
use
app\admin\model\ElectricMeter
;
use
app\admin\model\ElectricMeterType
;
use
app\admin\model\OperatorModel
;
use
app\admin\model\OperatorModel
;
use
app\admin\model\StaffModel
;
use
app\admin\model\BaseStationModel
;
use
think\db
;
use
think\db
;
use
think\Exception
;
use
think\Exception
;
use
think\facade\Request
;
use
think\facade\Request
;
...
...
application/em/model/Em.php
浏览文件 @
636c1dd7
...
@@ -76,7 +76,7 @@ class Em extends Base
...
@@ -76,7 +76,7 @@ class Em extends Base
//获取电表信息与station信息
//获取电表信息与station信息
public
function
getBaseInfo
(
$em_id
){
public
function
getBaseInfo
(
$em_id
){
$data
=
self
::
field
(
'em.id,em.em_numb,em.em_type_id,em.rate'
)
$data
=
self
::
field
(
'em.id,em.em_numb,em.em_type_id,em.rate'
)
->
field
(
's.station_sp_code,s.station_name'
)
->
field
(
's.station_sp_code,s.station_name
,s.proj_number
'
)
->
field
(
'et.name as typeName'
)
->
field
(
'et.name as typeName'
)
->
leftJoin
([
'station_info'
=>
's'
],
's.station_id=em.station_id'
)
->
leftJoin
([
'station_info'
=>
's'
],
's.station_id=em.station_id'
)
->
leftJoin
([
'em_type'
=>
'et'
],
'et.id=em.em_type_id'
)
->
leftJoin
([
'em_type'
=>
'et'
],
'et.id=em.em_type_id'
)
...
...
application/em/model/EmPaymentFk.php
0 → 100644
浏览文件 @
636c1dd7
<?php
namespace
app\em\model
;
class
EmPaymentFk
extends
Base
{
protected
$table
=
'em_payment_fk'
;
}
\ No newline at end of file
application/em/view/payment/detail.html
浏览文件 @
636c1dd7
...
@@ -64,17 +64,13 @@
...
@@ -64,17 +64,13 @@
</div>
</div>
</div>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
<label
class=
"layui-form-label layui-text-left"
>
缴费凭证:
缴费凭证:
</label>
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<a
class=
"layui-btn layui-btn-normal layui-right"
lay-submit
lay-filter=
"showCert"
ο
nclick=
"return false;"
>
查看
</a>
<a
href=
"{$fk.link}"
>
{$fk.oafk_numb|default='无'}
</a>
{if $payment.status
<
=
3
}
<
button
class=
"layui-btn layui-btn-normal layui-right"
lay-submit
lay-filter=
"addCert"
ο
nclick=
"return false;"
><i
class=
"layui-icon layui-icon-add-circle-fine"
></i></button>
{/if}
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -85,9 +81,9 @@
...
@@ -85,9 +81,9 @@
发票凭证:
发票凭证:
</label>
</label>
<div
class=
"layui-input-inline"
>
<div
class=
"layui-input-inline"
>
<a
class=
"layui-btn layui-btn-normal layui-right"
lay-submit
lay-filter=
"showReceipt"
ο
nclick=
"return false;"
>
查看
</a>
<a
class=
"layui-btn layui-btn-normal layui-right"
lay-submit
lay-filter=
"showReceipt"
o
nclick=
"return false;"
>
查看
</a>
{if $payment.status
<
=
3
}
{if $payment.status
<
=
3
}
<
button
class=
"layui-btn layui-btn-normal layui-right"
lay-submit
lay-filter=
"addReceipt"
ο
nclick=
"return false;"
><i
class=
"layui-icon layui-icon-add-circle-fine"
></i></button>
<
button
class=
"layui-btn layui-btn-normal layui-right"
lay-submit
lay-filter=
"addReceipt"
o
nclick=
"return false;"
><i
class=
"layui-icon layui-icon-add-circle-fine"
></i></button>
{/if}
{/if}
</div>
</div>
</div>
</div>
...
@@ -131,7 +127,6 @@
...
@@ -131,7 +127,6 @@
</div>
</div>
{/if}
{/if}
<div
class=
"layui-form-item layui-col-md-offset4"
>
<div
class=
"layui-form-item layui-col-md-offset4"
>
{if $payment.status
<
=
3
}
{if $payment.status
<
=
3
}
<
button
class=
"layui-btn"
lay-filter=
"save"
lay-submit=
""
>
提交
</button>
<
button
class=
"layui-btn"
lay-filter=
"save"
lay-submit=
""
>
提交
</button>
...
@@ -141,6 +136,11 @@
...
@@ -141,6 +136,11 @@
审核
审核
</button>
</button>
{/if}
{/if}
{if $fk.oafk_numb == ''}
<button
class=
"layui-btn"
lay-filter=
"pay"
lay-submit=
""
>
创建付款
</button>
{/if}
</div>
</div>
</div>
</div>
</div>
</div>
...
@@ -178,8 +178,6 @@
...
@@ -178,8 +178,6 @@
time
:
time
,
time
:
time
,
});
});
}
}
form
.
on
(
'submit(submit)'
,
form
.
on
(
'submit(submit)'
,
function
(
data
)
{
function
(
data
)
{
$
.
ajax
({
$
.
ajax
({
...
@@ -235,6 +233,14 @@
...
@@ -235,6 +233,14 @@
}
}
);
);
form
.
on
(
'submit(pay)'
,
function
(
data
)
{
$url
=
'/payment/payoa/{$payment.payment_id}'
xadmin
.
open
(
'补充付款信息'
,
$url
)
return
false
;
}
);
//保存信息
//保存信息
form
.
on
(
'submit(save)'
,
form
.
on
(
'submit(save)'
,
function
(
data
)
{
function
(
data
)
{
...
@@ -278,7 +284,6 @@
...
@@ -278,7 +284,6 @@
return
false
;
return
false
;
});
});
//上传电表照片
//上传电表照片
var
upPhoto
=
upload
.
render
({
var
upPhoto
=
upload
.
render
({
elem
:
'#up_photo'
,
elem
:
'#up_photo'
,
...
...
application/em/view/payment/pay_oa.html
0 → 100644
浏览文件 @
636c1dd7
{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-body"
>
<div
class=
"layui-row"
>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
缴费单号:
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"payment_id"
autocomplete=
"off"
class=
"layui-input"
value=
"{$payment_id}"
disabled=
"disabled"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
单据抬头:
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"title"
autocomplete=
"off"
class=
"layui-input"
value=
"电费付款"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
汇款方式:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"payType"
id=
"payType"
>
{volist name="payType" id="item"}
<option
value=
"{$item.name}"
>
{$item.name}
</option>
{/volist}
</select>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
收款方:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"payee"
id=
"payee"
lay-filter=
"change"
>
{volist name="payee" id="item"}
<option
value=
"{$item.name}"
data-info=
'{$item.bankInfo|default='
'}'
>
{$item.name}
</option>
{/volist}
</select>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
付款组织:
</label>
<div
class=
"layui-input-inline"
>
<select
name=
"payOrg"
id=
"payOrg"
>
{volist name="payOrg" id="item"}
<option
value=
"{$item.name}"
>
{$item.name}
</option>
{/volist}
</select>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
付款日期:
</label>
<div
class=
"layui-input-inline"
>
<input
type=
"text"
name=
"date"
id=
"date"
autocomplete=
"off"
class=
"layui-input"
>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
付款信息:
</label>
<div
class=
"layui-input-inline"
>
<textarea
class=
"layui-textarea"
name=
"fkinfo"
id=
"fkinfo"
></textarea>
</div>
</div>
</div>
<div
class=
"layui-col-md5"
>
<div
class=
"layui-form-item"
>
<label
class=
"layui-form-label layui-text-left"
>
备注:
</label>
<div
class=
"layui-input-inline"
>
<textarea
class=
"layui-textarea"
name=
"remark"
id=
"remark"
></textarea>
</div>
</div>
</div>
</div>
<div
class=
"layui-form-item layui-col-md-offset4"
>
<button
class=
"layui-btn"
lay-filter=
"submit"
lay-submit=
""
>
创建
</button>
</div>
</div>
</div>
</form>
</div>
</div>
</div>
{/block}
{block name="js"}
<script
type=
"text/javascript"
>
//初始化Layui控件
layui
.
use
([
'form'
,
'layer'
,
'laydate'
,
'upload'
],
function
()
{
$
=
layui
.
jquery
;
var
form
=
layui
.
form
,
layer
=
layui
.
layer
,
laydate
=
layui
.
laydate
;
form
.
on
(
'select(change)'
,
function
(
data
)
{
var
that
=
$
(
data
.
elem
);
var
info
=
that
.
find
(
'option:selected'
).
data
(
'info'
);
$
(
"#fkinfo"
).
text
(
info
);
});
laydate
.
render
({
elem
:
'#date'
,
trigger
:
'click'
,
});
//消息提示
function
layMsg
(
msg
,
type
=
6
,
time
=
1000
)
{
layer
.
msg
(
msg
,
{
icon
:
type
,
time
:
time
,
});
}
//生成缴费单
form
.
on
(
'submit(submit)'
,
function
(
data
)
{
$
.
ajax
({
url
:
'/payment/docnumb'
,
method
:
"POST"
,
data
:
data
.
field
,
dataType
:
"json"
,
success
:
function
(
data
)
{
if
(
data
.
status
==
1
)
{
layer
.
msg
(
data
.
message
,
{
icon
:
6
,
time
:
3000
},
function
()
{
xadmin
.
close
();
// 可以对父窗口进行刷新
xadmin
.
father_reload
();
})
}
else
{
layer
.
msg
(
data
.
message
,
{
icon
:
5
,
time
:
3000
})
}
}
});
return
false
;
});
});
</script>
{/block}
application/em/view/region/region_list.html
浏览文件 @
636c1dd7
...
@@ -249,4 +249,3 @@
...
@@ -249,4 +249,3 @@
{/block}
{/block}
application/em/view/region/region_list1.html
0 → 100644
浏览文件 @
636c1dd7
差异被折叠。
点击展开。
config/oafk.php
0 → 100644
浏览文件 @
636c1dd7
<?php
return
[
'oa_key'
=>
'5bdfcedb618e1e03abf18e391278c1f4'
,
'base_url'
=>
'http://oa-test.gonn.tech'
,
'gys'
=>
'/api.php?m=opensupplier&a=list&openkey='
,
'type'
=>
'/api.php?m=openfkinfo&a=fkinfor&openkey='
,
'fk'
=>
'/api.php?m=openfk&a=create&openkey='
,
'link'
=>
'/task.php?a=p&num=oayfk&mid='
];
route/admin.php
浏览文件 @
636c1dd7
...
@@ -168,6 +168,8 @@ Route::post('payment/createAll','em/payment/createAll');
...
@@ -168,6 +168,8 @@ Route::post('payment/createAll','em/payment/createAll');
Route
::
post
(
'payment/update'
,
'em/payment/update'
);
Route
::
post
(
'payment/update'
,
'em/payment/update'
);
Route
::
post
(
'payment/save'
,
'em/payment/store'
);
Route
::
post
(
'payment/save'
,
'em/payment/store'
);
Route
::
post
(
'payment/confirm'
,
'em/payment/confirm'
);
Route
::
post
(
'payment/confirm'
,
'em/payment/confirm'
);
Route
::
get
(
'payment/payoa/:payment_id'
,
'em/payment/payoa'
);
Route
::
post
(
'payment/docnumb'
,
'em/payment/docnumb'
);
//结算
//结算
Route
::
get
(
'settle'
,
'em/settle/index'
);
Route
::
get
(
'settle'
,
'em/settle/index'
);
...
...
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论