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
e298e283
Commit
e298e283
authored
May 07, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改财务审核
parent
39b1a1ab
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
82 additions
and
84 deletions
+82
-84
Finance.php
application/index/controller/Finance.php
+81
-83
OBargainModel.php
application/model/OBargainModel.php
+1
-1
reportList.js
public/resource/js/reportList.js
+0
-0
No files found.
application/index/controller/Finance.php
View file @
e298e283
...
@@ -29,88 +29,9 @@ class Finance extends Basic
...
@@ -29,88 +29,9 @@ class Finance extends Basic
*/
*/
public
function
reportList
()
{
public
function
reportList
()
{
if
(
$this
->
request
->
isAjax
())
{
if
(
!
$this
->
request
->
isAjax
())
{
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$data
[
'data'
]
=
[];
if
(
$this
->
request
->
isGet
())
{
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$fields
=
'a.id,a.create_time,b.user_phone,b.user_name,d.internal_title,d.internal_address,a.commission,a.practical_fee,a.order_no,content'
;
$where
[
'a.father_id'
]
=
0
;
$where
[
'c.is_del'
]
=
0
;
$where
[
'e.audit_level'
]
=
0
;
$where
[
'a.status'
]
=
10
;
$check_status
=
[
0
,
1
,
2
,
3
,
4
];
if
(
in_array
(
$this
->
params
[
'check_status'
],
$check_status
))
{
switch
(
$this
->
params
[
'check_status'
])
{
case
1
:
//成交报告列表-专员审核
$where
[
'e.audit_level'
]
=
[
'NOT IN'
,
'0,2,3'
];
break
;
case
2
:
//成交报告列表-经理审核
$where
[
'e.audit_level'
]
=
[
'NOT IN'
,
'0,1,3'
];
break
;
case
3
:
//成交报告列表-总监审核
$where
[
'e.audit_level'
]
=
[
'NOT IN'
,
'0,1,2'
];
break
;
case
4
:
//成交报告列表-已结单
$where
[
'e.audit_level'
]
=
3
;
$where
[
'a.status'
]
=
11
;
if
(
!
empty
(
$this
->
params
[
'create_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'e.create_time'
]
=
[
'> time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'e.create_time'
]
=
[
'< time'
,
$this
->
params
[
'create_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'e.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'create_time'
]
.
' 23:59:59'
]];
}
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
$where
[
'd.internal_address'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'internal_address'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'user_phone'
]))
{
$where
[
'b.user_phone'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'user_phone'
]
.
'%'
];
}
break
;
case
5
:
//成交报告列表-待撤销
$where
[
'a.status'
]
=
20
;
break
;
case
6
:
//成交报告列表-已撤销
$where
[
'a.status'
]
=
21
;
break
;
default
:
$where
[
'e.audit_level'
]
=
[
'NULL'
];
}
}
else
{
$where
[
'e.audit_level'
]
=
[
'NULL'
];
}
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
$where
[
'a.status'
]
=
20
;
}
$bargain
=
new
OBargainModel
();
$data
[
'data'
][
'list'
]
=
$bargain
->
getBargain
(
$pageNo
,
$pageSize
,
'a.id DESC'
,
$fields
,
$where
);
$data
[
'data'
][
'total'
]
=
$bargain
->
getBargainTotal
(
$where
);
}
$result
=
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
else
{
$result
=
''
;
$result
=
''
;
switch
(
$this
->
params
[
'check_status'
])
{
switch
(
$this
->
params
[
'check_status'
])
{
case
0
:
case
0
:
//未结单
//未结单
...
@@ -125,9 +46,86 @@ class Finance extends Basic
...
@@ -125,9 +46,86 @@ class Finance extends Basic
//已撤销
//已撤销
$result
=
view
(
'finance/statement_backout'
);
break
;
$result
=
view
(
'finance/statement_backout'
);
break
;
}
}
return
$result
;
}
$data
[
'code'
]
=
200
;
$data
[
'msg'
]
=
""
;
$data
[
'data'
]
=
[];
$pageNo
=
empty
(
$this
->
params
[
'pageNo'
])
?
1
:
$this
->
params
[
'pageNo'
];
$pageSize
=
empty
(
$this
->
params
[
'pageSize'
])
?
15
:
$this
->
params
[
'pageSize'
];
$fields
=
'a.id,a.create_time,b.user_phone,b.user_name,d.internal_title,d.internal_address,a.commission,a.practical_fee,a.order_no,content'
;
$where
[
'a.father_id'
]
=
0
;
$where
[
'c.is_del'
]
=
0
;
$where
[
'a.status'
]
=
10
;
$order
=
'e.id desc'
;
switch
(
$this
->
params
[
'check_status'
])
{
case
1
:
//成交报告列表-经理审核
$where
[
'e.audit_level'
]
=
0
;
break
;
case
2
:
//成交报告列表-总监审核
$where
[
'e.audit_level'
]
=
1
;
break
;
case
3
:
//成交报告列表-出纳审核
$where
[
'e.audit_level'
]
=
2
;
break
;
case
4
:
//成交报告列表-已结单
$where
[
'e.audit_level'
]
=
3
;
$where
[
'a.status'
]
=
11
;
if
(
!
empty
(
$this
->
params
[
'create_time'
])
&&
empty
(
$this
->
params
[
'end_time'
]))
{
$where
[
'e.create_time'
]
=
[
'> time'
,
$this
->
params
[
'create_time'
]
.
' 00:00:00'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'e.create_time'
]
=
[
'< time'
,
$this
->
params
[
'create_time'
]
.
' 23:59:59'
];
}
if
(
!
empty
(
$this
->
params
[
'end_time'
])
&&
!
empty
(
$this
->
params
[
'create_time'
]))
{
$where
[
'e.create_time'
]
=
[
'between time'
,
[
$this
->
params
[
'create_time'
]
.
' 00:00:00'
,
$this
->
params
[
'create_time'
]
.
' 23:59:59'
]];
}
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
$where
[
'd.internal_address'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'internal_address'
]
.
'%'
];
}
if
(
!
empty
(
$this
->
params
[
'user_phone'
]))
{
$where
[
'b.user_phone'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'user_phone'
]
.
'%'
];
}
break
;
case
5
:
//成交报告列表-待撤销
$where
[
'a.status'
]
=
20
;
break
;
case
6
:
//成交报告列表-已撤销
$where
[
'a.status'
]
=
21
;
break
;
default
:
//成交报告列表-专员审核
$where
[
'e.audit_level'
]
=
NULL
;
$order
=
'a.id DESC'
;
}
if
(
!
empty
(
$this
->
params
[
'status'
]))
{
$where
[
'a.status'
]
=
20
;
}
}
return
$result
;
$bargain
=
new
OBargainModel
();
$data
[
'data'
][
'list'
]
=
$bargain
->
getBargain
(
$pageNo
,
$pageSize
,
$order
,
$fields
,
$where
);
$data
[
'data'
][
'total'
]
=
$bargain
->
getBargainTotal
(
$where
);
return
$this
->
response
(
$data
[
'code'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
/**
...
@@ -144,7 +142,7 @@ class Finance extends Basic
...
@@ -144,7 +142,7 @@ class Finance extends Basic
$data
[
'data'
]
=
[];
$data
[
'data'
]
=
[];
$bargain
=
new
OBargainModel
();
$bargain
=
new
OBargainModel
();
//dump($this->params);die;
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'source'
])
||
empty
(
$this
->
params
[
'status'
]))
{
if
(
empty
(
$this
->
params
[
'id'
])
||
empty
(
$this
->
params
[
'source'
])
||
empty
(
$this
->
params
[
'status'
]))
{
$data
[
'code'
]
=
101
;
$data
[
'code'
]
=
101
;
$data
[
'msg'
]
=
'Id is null'
;
$data
[
'msg'
]
=
'Id is null'
;
...
...
application/model/OBargainModel.php
View file @
e298e283
...
@@ -278,7 +278,7 @@ class OBargainModel extends Model
...
@@ -278,7 +278,7 @@ class OBargainModel extends Model
* @throws \think\exception\DbException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
* @throws \think\exception\PDOException
*/
*/
public
function
addCheckBargain
(
int
$id
,
array
$data
,
int
$source
,
int
$status
)
:
array
{
public
function
addCheckBargain
(
int
$id
,
array
$data
,
int
$source
,
int
$status
)
:
bool
{
$this
->
startTrans
();
$this
->
startTrans
();
$bargain_data
=
$this
->
field
(
'id,report_id,agent_id,order_no,order_id'
)
->
where
([
$bargain_data
=
$this
->
field
(
'id,report_id,agent_id,order_no,order_id'
)
->
where
([
'id'
=>
$id
,
'id'
=>
$id
,
...
...
public/resource/js/reportList.js
View file @
e298e283
This diff is collapsed.
Click to expand it.
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