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
00a30979
Commit
00a30979
authored
Jan 28, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
恢复成交报告
parent
1f3ba80f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
56 additions
and
11 deletions
+56
-11
Finance.php
application/index/controller/Finance.php
+37
-0
OBargainModel.php
application/model/OBargainModel.php
+18
-11
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Finance.php
View file @
00a30979
...
@@ -3896,4 +3896,41 @@ class Finance extends Basic
...
@@ -3896,4 +3896,41 @@ class Finance extends Basic
$data
[
'log'
]
=
$m_refund_log
->
getListAll
(
'operation_name,create_time,status'
,
[
'refund_id'
=>
$this
->
params
[
'refund_id'
],
'is_del'
=>
0
]);
$data
[
'log'
]
=
$m_refund_log
->
getListAll
(
'operation_name,create_time,status'
,
[
'refund_id'
=>
$this
->
params
[
'refund_id'
],
'is_del'
=>
0
]);
return
$this
->
response
(
$code
,
$msg
,
$data
);
return
$this
->
response
(
$code
,
$msg
,
$data
);
}
}
/**
* 撤销列表-恢复成交报告
*
* @return \think\Response
*/
public
function
recoveryBargain
()
{
$code
=
101
;
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
response
(
$code
,
'参数错误'
);
}
$msg
=
''
;
$where
[]
=
[
'EXP'
,
'a.id ='
.
$this
->
params
[
'id'
]
.
' OR a.father_id='
.
$this
->
params
[
'id'
]];
$agent_arr
=
$this
->
m_bargain
->
agentBargainAll
(
'a.create_time,a.agent_id,b.store_id,b.district_id'
,
$where
);
foreach
(
$agent_arr
as
$k
=>
$v
)
{
try
{
$this
->
totalOfficialReceipts
(
$v
[
'agent_id'
],
$v
[
'district_id'
],
$v
[
'store_id'
],
$v
[
'create_time'
]);
$code
=
200
;
}
catch
(
\Exception
$e
)
{
$msg
=
'恢复失败:'
.
$e
->
getMessage
();
break
;
}
}
if
(
$code
==
200
)
{
$data
[
'status'
]
=
10
;
$data
[
'audit_level'
]
=
0
;
$where_2
[]
=
[
'EXP'
,
'id ='
.
$this
->
params
[
'id'
]
.
' OR father_id='
.
$this
->
params
[
'id'
]];
$is_ok
=
$this
->
m_bargain
->
updateBargainByWhere
(
$data
,
$where_2
);
if
(
!
$is_ok
)
{
$code
=
101
;
$msg
=
'恢复成交报告状态失败'
;
}
}
return
$this
->
response
(
$code
,
$msg
);
}
}
}
application/model/OBargainModel.php
View file @
00a30979
...
@@ -1572,19 +1572,17 @@ class OBargainModel extends Model
...
@@ -1572,19 +1572,17 @@ class OBargainModel extends Model
/**
/**
* @param $field
* @param $field
* @param $where
* @param $where
* @return array|false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
agentBargainAll
(
$field
,
$where
)
{
public
function
agentBargainAll
(
$field
,
$where
)
{
try
{
return
$this
->
db_
->
alias
(
'a'
)
$data
=
$this
->
db_
->
alias
(
'a'
)
->
field
(
$field
)
->
field
(
$field
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
join
(
'a_agents b'
,
'a.agent_id = b.id'
,
'left'
)
->
where
(
$where
)
->
where
(
$where
)
->
select
();
->
select
();
}
catch
(
\Exception
$e
)
{
$data
=
[];
}
return
$data
;
}
}
/**
/**
...
@@ -1596,6 +1594,15 @@ class OBargainModel extends Model
...
@@ -1596,6 +1594,15 @@ class OBargainModel extends Model
return
$this
->
db_
->
where
(
$where
)
->
value
(
$field
);
return
$this
->
db_
->
where
(
$where
)
->
value
(
$field
);
}
}
/**
* @param $field
* @param $where
* @return mixed
*/
public
function
getFieldColumn
(
$field
,
$where
)
{
return
$this
->
db_
->
where
(
$where
)
->
column
(
$field
);
}
/**
/**
* @param $field
* @param $field
* @param $where
* @param $where
...
...
application/route.php
View file @
00a30979
...
@@ -282,6 +282,7 @@ Route::group('index', [
...
@@ -282,6 +282,7 @@ Route::group('index', [
'refundPayLog'
=>
[
'index/Finance/refundPayLog'
,
[
'method'
=>
'POST'
]],
//退款
'refundPayLog'
=>
[
'index/Finance/refundPayLog'
,
[
'method'
=>
'POST'
]],
//退款
'checkRefund'
=>
[
'index/Finance/checkRefund'
,
[
'method'
=>
'POST'
]],
//退款审核
'checkRefund'
=>
[
'index/Finance/checkRefund'
,
[
'method'
=>
'POST'
]],
//退款审核
'refundDetail'
=>
[
'index/Finance/refundDetail'
,
[
'method'
=>
'GET'
]],
//退款详情
'refundDetail'
=>
[
'index/Finance/refundDetail'
,
[
'method'
=>
'GET'
]],
//退款详情
'recoveryBargain'
=>
[
'index/Finance/recoveryBargain'
,
[
'method'
=>
'POST'
]],
//撤销列表-恢复成交报告
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'method'
=>
'post|get'
]],
//业绩明细
'getPerformanceInfoExcel'
=>
[
'index/PerformanceInfo/getPerformanceInfoExcel'
,
[
'method'
=>
'post|get'
]],
//业绩明细
...
...
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