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
d324cc71
Commit
d324cc71
authored
Jul 22, 2019
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
ae31c006
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
18 additions
and
60 deletions
+18
-60
StoreFee.php
application/api_broker/controller/StoreFee.php
+10
-56
StoreFeeValidate.php
application/api_broker/validate/StoreFeeValidate.php
+2
-4
AStore.php
application/model/AStore.php
+6
-0
No files found.
application/api_broker/controller/StoreFee.php
View file @
d324cc71
...
@@ -6,6 +6,7 @@ use app\api_broker\extend\Basic;
...
@@ -6,6 +6,7 @@ use app\api_broker\extend\Basic;
use
app\api_broker\service\StoreFeeService
;
use
app\api_broker\service\StoreFeeService
;
use
app\index\service\UserService
;
use
app\index\service\UserService
;
use
app\model\AAgents
;
use
app\model\AAgents
;
use
app\model\AStore
;
use
app\model\FollowUpLogModel
;
use
app\model\FollowUpLogModel
;
/**
/**
...
@@ -64,7 +65,7 @@ class StoreFee extends Basic
...
@@ -64,7 +65,7 @@ class StoreFee extends Basic
$total_fee
=
$params
[
"total_fee"
];
$total_fee
=
$params
[
"total_fee"
];
$agent_id
=
$params
[
"agent_id"
];
$agent_id
=
$params
[
"agent_id"
];
$store_id
=
$params
[
"store_id"
];
$store_id
=
$params
[
"store_id"
];
$purpose
=
$params
[
"purpose"
];
$purpose
=
$params
[
"purpose"
];
$site_id
=
$params
[
"site_id"
];
$site_id
=
$params
[
"site_id"
];
$card_name
=
$params
[
"card_name"
];
$card_name
=
$params
[
"card_name"
];
$bank
=
$params
[
"bank"
];
$bank
=
$params
[
"bank"
];
...
@@ -75,7 +76,7 @@ class StoreFee extends Basic
...
@@ -75,7 +76,7 @@ class StoreFee extends Basic
return
$this
->
response
(
"101"
,
"请上传图片"
);
return
$this
->
response
(
"101"
,
"请上传图片"
);
}
}
$if_verify
=
$this
->
service_
->
verifyType
(
$type
,
$fee_item
);
$if_verify
=
$this
->
service_
->
verifyType
(
$type
,
$fee_item
);
if
(
!
$if_verify
)
{
if
(
!
$if_verify
)
{
return
$this
->
response
(
"101"
,
"类型选择错误"
);
return
$this
->
response
(
"101"
,
"类型选择错误"
);
}
}
$is_ok
=
$this
->
service_
->
addApplyFor
(
$type
,
$fee_item
,
$total_fee
,
$agent_id
,
$store_id
,
$purpose
,
$site_id
,
$card_name
,
$is_ok
=
$this
->
service_
->
addApplyFor
(
$type
,
$fee_item
,
$total_fee
,
$agent_id
,
$store_id
,
$purpose
,
$site_id
,
$card_name
,
...
@@ -86,61 +87,13 @@ class StoreFee extends Basic
...
@@ -86,61 +87,13 @@ class StoreFee extends Basic
return
$this
->
response
(
"101"
,
"save exception"
);
return
$this
->
response
(
"101"
,
"save exception"
);
}
}
}
}
public
function
getApplyForFeeStore
(){
/**
* 获取报备列表
* @return \think\Response
* @throws \think\db\exception\BindParamException
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
* @throws \think\exception\PDOException
*/
public
function
reportList
()
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/* $params = array(
$params
=
array
(
"agent_id" =>6562,
"store_id"
=>
1
"type" => 1,//1表示全部 2表示进场 3 表示收款 4成交报告
);
"is_all"=>0,//0搜索我自己的,1全部
$storeModel
=
new
AStore
();
"page_no"=>1,
$storeModel
->
getStore
();
"page_size"=>15
);*/
$checkResult
=
$this
->
validate
(
$params
,
"StoreFeeValidate.addApplyFor"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"101"
,
$checkResult
);
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$field
=
"a.id,a.user_id,a.user_phone,a.user_name,a.predict_see_time,a.create_time,b.id as order_id,b.order_no,
b.house_id,b.house_title"
;
$params
[
"report_agent_id"
]
=
$params
[
"agent_id"
];
$result
=
[];
$agentModel
=
new
AAgents
();
$agents_data
=
$agentModel
->
getAgentInfo
(
'id,level'
,
$this
->
agentId
);
if
(
isset
(
$params
[
"is_all"
])
&&
$params
[
"is_all"
]
==
1
)
{
$check_type
=
1
;
if
(
$agents_data
[
"level"
]
<
30
)
{
$check_type
=
$this
->
service_
->
getCheckType
(
$this
->
agentId
);
if
(
$check_type
==
0
)
{
return
$this
->
response
(
101
,
"暂无权限"
);
}
}
$result
=
$this
->
service_
->
orderListAll
(
$field
,
$params
,
$pageNo
,
$pageSize
,
$check_type
);
}
else
{
$result
=
$this
->
service_
->
orderList
(
$field
,
$params
,
$pageNo
,
$pageSize
);
}
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"200"
,
"request null"
);
}
}
}
}
}
\ No newline at end of file
application/api_broker/validate/StoreFeeValidate.php
View file @
d324cc71
...
@@ -19,7 +19,6 @@ class StoreFeeValidate extends Validate
...
@@ -19,7 +19,6 @@ class StoreFeeValidate extends Validate
'total_fee'
=>
'require|number'
,
'total_fee'
=>
'require|number'
,
'agent_id'
=>
'require|number'
,
'agent_id'
=>
'require|number'
,
'store_id'
=>
'require|number'
,
'store_id'
=>
'require|number'
,
'assume_fee'
=>
'require|number'
,
'site_id'
=>
'require|number'
,
'site_id'
=>
'require|number'
,
];
];
...
@@ -34,14 +33,12 @@ class StoreFeeValidate extends Validate
...
@@ -34,14 +33,12 @@ class StoreFeeValidate extends Validate
'agent_id.number'
=>
'申请人只能为数字'
,
'agent_id.number'
=>
'申请人只能为数字'
,
'store_id.require'
=>
'门店不能为空'
,
'store_id.require'
=>
'门店不能为空'
,
'store_id.number'
=>
'状门店只能为数字'
,
'store_id.number'
=>
'状门店只能为数字'
,
'assume_fee.require'
=>
'费用承担金额不能为空'
,
'assume_fee.number'
=>
'费用承担金额只能为数字'
,
'site_id.require'
=>
'站点不能为空'
,
'site_id.require'
=>
'站点不能为空'
,
'site_id.number'
=>
'站点只能为数字'
,
'site_id.number'
=>
'站点只能为数字'
,
];
];
protected
$scene
=
[
protected
$scene
=
[
'addApplyFor'
=>
[
'type'
,
'fee_item'
,
'total_fee'
,
'agent_id'
,
'store_id'
,
'
assume_fee'
,
'
site_id'
],
'addApplyFor'
=>
[
'type'
,
'fee_item'
,
'total_fee'
,
'agent_id'
,
'store_id'
,
'site_id'
],
];
];
}
}
\ No newline at end of file
application/model/AStore.php
View file @
d324cc71
...
@@ -347,4 +347,9 @@ class AStore extends BaseModel
...
@@ -347,4 +347,9 @@ class AStore extends BaseModel
{
{
return
Db
::
table
(
$this
->
table
)
->
update
(
$params
);
return
Db
::
table
(
$this
->
table
)
->
update
(
$params
);
}
}
public
function
getStoreAndOffice
(
$params
){
$where_
=
[];
}
}
}
\ No newline at end of file
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