Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
e78dd105
Commit
e78dd105
authored
Dec 19, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
收款删除
parent
9e4445d9
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
9 deletions
+25
-9
Finance.php
application/index/controller/Finance.php
+23
-7
adjustment.js
public/resource/js/adjustment.js
+1
-1
getCollection.js
public/resource/js/getCollection.js
+1
-1
No files found.
application/index/controller/Finance.php
View file @
e78dd105
...
...
@@ -3211,6 +3211,9 @@ class Finance extends Basic
* 撤销调整
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
delAdjustment
()
{
$code
=
101
;
...
...
@@ -3219,17 +3222,23 @@ class Finance extends Basic
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$pay_adjustment
=
$m_pay_adjustment
->
getAdjustmentList
(
'new_paylog_id,paylog_id'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
$new_paylog_id
=
$m_pay_adjustment
->
getFieldValue
(
'new_paylog_id'
,
[
'id'
=>
$this
->
params
[
'id'
]]);
if
(
empty
(
$new_paylog_id
))
{
if
(
empty
(
$pay_adjustment
[
0
][
'new_paylog_id'
]))
{
return
$this
->
response
(
$code
,
'无调整信息'
);
}
$pay_log_id
=
$m_pay_adjustment
->
getAdjustmentList
(
'paylog_id'
,
[
'paylog_id'
=>
$pay_adjustment
[
0
][
'paylog_id'
]]);
if
(
count
(
$pay_log_id
)
>
1
)
{
return
$this
->
response
(
$code
,
'存在多次调整,不能删除'
);
}
$num
=
$m_pay_adjustment
->
editData
([
'is_del'
=>
1
],
$this
->
params
[
'id'
]);
if
(
$num
>
0
)
{
$m_pay
=
new
OPayLogModel
();
$save_data
[
'id'
]
=
$
new_paylog_id
;
$save_data
[
'id'
]
=
$
pay_adjustment
[
0
][
'new_paylog_id'
]
;
$save_data
[
'is_del'
]
=
1
;
$m_pay
->
updatePayLog
(
$save_data
);
$code
=
200
;
...
...
@@ -3360,14 +3369,21 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
'参数错误'
);
}
$m_pay
=
new
OPayLogModel
();
$num
=
$m_pay
->
getTotal
(
'id'
,
[
'id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
empty
(
$num
))
{
return
$this
->
response
(
$code
,
'无收款信息'
);
}
$m_pay_adjustment
=
new
OPayLogAdjustment
();
$
pay_id
=
$m_pay_adjustment
->
getFieldValue
(
'id'
,
[
'new_paylog
_id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$
pay_id
)
{
return
$this
->
response
(
$code
,
'
该收款有调整信息
,不能删除'
);
$
adjustment_num
=
$m_pay_adjustment
->
getAdjustmentList
(
'id'
,
[
'pay
_id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$
adjustment_num
>
1
)
{
return
$this
->
response
(
$code
,
'
存在多次调整
,不能删除'
);
}
$m_pay
=
new
OPayLogModel
();
$num
=
$m_pay
->
updatePayLog
([
'is_del'
=>
1
,
'id'
=>
$this
->
params
[
'pay_id'
]]);
if
(
$num
>
0
)
{
$m_pay_adjustment
->
editData
([
'is_del'
=>
1
],
$adjustment_num
[
0
][
'id'
]);
$code
=
200
;
}
else
{
$code
=
101
;
...
...
public/resource/js/adjustment.js
View file @
e78dd105
...
...
@@ -47,7 +47,7 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
});
//搜索
$
(
document
).
on
(
'click'
,
'#search'
,
function
(
e
){
that
.
getList
(
that
.
pageNo
);
that
.
getList
(
1
);
});
//重置搜索条件
...
...
public/resource/js/getCollection.js
View file @
e78dd105
...
...
@@ -198,7 +198,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
});
//搜索
$
(
document
).
on
(
'click'
,
'#search'
,
function
(
e
){
that
.
getList
(
that
.
pageNo
);
that
.
getList
(
1
);
});
//重置搜索条件
$
(
document
).
on
(
'click'
,
'#reset'
,
function
(
e
){
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment