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
06f78268
Commit
06f78268
authored
Dec 14, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整
parent
aa8f9d25
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
4 deletions
+78
-4
Finance.php
application/index/controller/Finance.php
+67
-4
OPayLogAdjustment.php
application/model/OPayLogAdjustment.php
+10
-0
route.php
application/route.php
+1
-0
No files found.
application/index/controller/Finance.php
View file @
06f78268
...
...
@@ -2424,8 +2424,8 @@ class Finance extends Basic
$m_agent_house
=
new
GHousesToAgents
();
$m_agent
=
new
AAgents
();
foreach
(
$list
as
$k
=>
$v
)
{
$source_id
=
$m_pay_adjustment
->
getField
Value
(
'id'
,
[
'paylog_id'
=>
$v
[
'id'
]]);
$list
[
$k
][
'source_id'
]
=
empty
(
$source_id
)
?
0
:
$source_id
;
$source_id
=
$m_pay_adjustment
->
getField
Column
(
'id'
,
[
'paylog_id'
=>
$v
[
'id'
]]);
$list
[
$k
][
'source_id'
]
=
empty
(
$source_id
)
?
0
:
implode
(
','
,
$source_id
)
;
$bargain_id
=
$this
->
m_bargain
->
selectBargainByOrderNo
(
'id'
,
[
'order_id'
,
$v
[
'order_id'
]]);
$list
[
$k
][
'bargain_id'
]
=
$bargain_id
[
0
][
'id'
];
...
...
@@ -2780,6 +2780,8 @@ class Finance extends Basic
}
/**
* 编辑收款详情
*
* @return \think\Response
*/
public
function
getCollectionEdit
()
{
...
...
@@ -2814,7 +2816,66 @@ class Finance extends Basic
return
$this
->
response
(
$code
,
$msg
,
[]);
}
/**
/**
* 收款
*
* @return \think\Response
* @throws \think\Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
collectingBill
()
{
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"agent_id"
])
||
!
isset
(
$params
[
"report_id"
])
||
!
isset
(
$params
[
"order_id"
])
||
!
isset
(
$params
[
"order_no"
])
|
!
isset
(
$params
[
"collecting_bill"
])
||
!
isset
(
$params
[
"house_number"
])
||
!
isset
(
$params
[
"industry_type"
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
/* $params = array(
"agent_id" => 1,//收款经纪人id
"agent_name" => 1,//收款经纪人id
"report_id" => 111,//报备id
"order_id" => 2, //关联order表id
"order_no" => "123123123", //订单no
// `type` '付款类型 10意向金 20定金 30保管金 40押金 50 租金 60 进场费 70转让费 80其他',
//`pay_type` '支付方式 10支付宝 20 微信 30pos机器 40转账 50现金',
// `money` '入账金额',
"collecting_bill" => [ { "type" : 10, "pay_type" : 10, "money" : 1100 }, { "type" :10, "pay_type" : 10, "money": 1200 } ],
"house_number" => "3301号",
"industry_type" => "asdasdasd",
"remark" => "没什么备注",
"transfer_img" => "12312312312",
"is_dividend" => 1, //是否分红 1否 0是
"last_transfer_time" => "2018-10-18", //最后转定时间
"pay_id" => 1,
);*/
$params
[
"collecting_bill"
]
=
json_decode
(
$params
[
"collecting_bill"
],
true
);
$remark
=
isset
(
$params
[
"remark"
])
?
$params
[
"remark"
]
:
""
;
$transfer_img
=
isset
(
$params
[
"transfer_img"
])
?
json_decode
(
$params
[
"transfer_img"
]
,
true
)
:
""
;
$income_time
=
isset
(
$params
[
"income_time"
])
?
$params
[
"income_time"
]
:
""
;
$pay_id
=
isset
(
$params
[
"pay_id"
])
?
$params
[
"pay_id"
]
:
0
;
$source
=
$params
[
"source"
]
?
$params
[
"source"
]
:
0
;
if
(
$pay_id
>
0
){
$source
=
2
;
}
$service_
=
new
OrderLogService
();
$is_ok
=
$service_
->
addCollectingBill
(
$params
[
"agent_id"
],
$params
[
"agent_name"
],
$params
[
"report_id"
],
$params
[
"order_id"
],
$params
[
"order_no"
],
$params
[
"collecting_bill"
],
$params
[
"house_number"
],
$params
[
"industry_type"
],
$remark
,
$transfer_img
,
$source
,
$income_time
,
$params
[
"is_dividend"
],
$params
[
"last_transfer_time"
],
$pay_id
);
if
(
$is_ok
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[
"bill_id"
=>
$is_ok
]);
}
elseif
(
$is_ok
==
-
1
){
return
$this
->
response
(
"101"
,
"付款类型或支付方式错误"
);
}
return
$this
->
response
(
"101"
,
"request faild"
);
}
/**
* 获取收款入账
*
* @return \think\Response
...
...
@@ -2828,7 +2889,9 @@ class Finance extends Basic
* @return \think\Response
*/
public
function
adjustment
()
{
return
view
(
"adjustment"
);
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
"adjustment"
);
}
}
public
function
dailyList
()
{
...
...
application/model/OPayLogAdjustment.php
View file @
06f78268
...
...
@@ -78,6 +78,16 @@ class OPayLogAdjustment extends Model{
->
value
(
$field
);
}
/**
* @param $field
* @param $params
* @return int|mixed
*/
public
function
getFieldColumn
(
$field
,
$params
)
{
return
$this
->
db_
->
where
(
$params
)
->
column
(
$field
);
}
public
function
addAdjustment
(
$params
){
Db
::
startTrans
();
try
{
...
...
application/route.php
View file @
06f78268
...
...
@@ -275,6 +275,7 @@ Route::group('index', [
'receiptImgList'
=>
[
'index/Finance/receiptImgList'
,
[
'method'
=>
'post|get'
]],
//收款列表-收款图片列表
'getCollectionDetail'
=>
[
'index/Finance/getCollectionDetail'
,
[
'method'
=>
'post|get'
]],
//收款详情
'getCollectionEdit'
=>
[
'index/Finance/getCollectionEdit'
,
[
'method'
=>
'post'
]],
//收款修改保存
'collectingBill'
=>
[
'index/Finance/collectingBill'
,
[
'method'
=>
'post'
]],
//收款
'performanceInfo'
=>
[
'index/PerformanceInfo/performanceInfo'
,
[
'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