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
a0dc1fca
Commit
a0dc1fca
authored
Apr 25, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
待撤销审核
parent
c39ecd75
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
9 deletions
+16
-9
Finance.php
application/index/controller/Finance.php
+2
-2
OBargainModel.php
application/model/OBargainModel.php
+14
-7
No files found.
application/index/controller/Finance.php
View file @
a0dc1fca
...
...
@@ -107,7 +107,7 @@ class Finance extends Basic
$data
[
'data'
]
=
[];
$bargain
=
new
OBargainModel
();
if
(
empty
(
$this
->
params
[
'id'
]))
{
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'source'
])
||
$this
->
params
[
'status'
]
)
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Id is null'
;
}
else
{
...
...
@@ -116,7 +116,7 @@ class Finance extends Basic
$params
[
'audit_id'
]
=
$this
->
userId
;
$params
[
'audit_level'
]
=
$this
->
params
[
'check_status'
];
$params
[
'remark'
]
=
$this
->
params
[
'remark'
];
$status
=
$bargain
->
addCheckBargain
(
$this
->
params
[
'id'
],
$params
);
$status
=
$bargain
->
addCheckBargain
(
$this
->
params
[
'id'
],
$params
,
$this
->
params
[
'source'
],
$this
->
params
[
'status'
]
);
if
(
empty
(
$status
))
{
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'审核失败'
;
...
...
application/model/OBargainModel.php
View file @
a0dc1fca
...
...
@@ -268,18 +268,21 @@ class OBargainModel extends Model
/**
* 成交报告审核
*
* @param $id
* @param $data
* @return bool|false|int
* @param int $id
* @param array $data
* @param int $source 审核来源 1成交报告申请结单 2退款 3申请撤销成交报告
* @param int $status 成交报告状态 10已提交 11审核成功 20待撤销 21已撤销 30删除
* @return array
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public
function
addCheckBargain
(
$id
,
$data
)
{
public
function
addCheckBargain
(
int
$id
,
array
$data
,
int
$source
,
int
$status
)
:
array
{
$this
->
startTrans
();
$bargain_data
=
$this
->
field
(
'id,report_id,agent_id,order_no,order_id'
)
->
where
([
'id'
=>
$id
,
'status'
=>
10
'status'
=>
$status
])
->
lock
(
true
)
->
find
();
if
(
$bargain_data
!=
''
)
{
...
...
@@ -290,7 +293,7 @@ class OBargainModel extends Model
$save_data
[
'agent_id'
]
=
$bargain_data
[
'agent_id'
];
$save_data
[
'order_no'
]
=
$bargain_data
[
'order_no'
];
$save_data
[
'order_id'
]
=
$bargain_data
[
'order_id'
];
$save_data
[
'source'
]
=
1
;
$save_data
[
'source'
]
=
$source
;
$save_data
[
'status'
]
=
1
;
$save_data
[
'remark'
]
=
$data
[
'remark'
];
$save_data
[
'audit_id'
]
=
$data
[
'audit_id'
];
...
...
@@ -315,10 +318,14 @@ class OBargainModel extends Model
if
(
$return
)
{
if
(
$data
[
'audit_level'
]
==
3
)
{
if
(
$data
[
'audit_level'
]
==
3
&&
$source
=
10
)
{
$this
->
where
(
'id'
,
$bargain_data
[
'id'
])
->
setField
(
'status'
,
11
);
}
if
(
$data
[
'audit_level'
]
==
3
&&
$source
=
20
)
{
$this
->
where
(
'id'
,
$bargain_data
[
'id'
])
->
setField
(
'status'
,
21
);
}
$this
->
commit
();
$result
=
true
;
}
else
{
...
...
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