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
f138061c
Commit
f138061c
authored
Jul 23, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
name
parent
e6cf4947
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
7 deletions
+24
-7
Cost.php
application/index/controller/Cost.php
+24
-7
No files found.
application/index/controller/Cost.php
View file @
f138061c
...
@@ -256,7 +256,7 @@ class Cost extends Basic
...
@@ -256,7 +256,7 @@ class Cost extends Basic
if
(
empty
(
$this
->
params
[
'id'
]))
{
if
(
empty
(
$this
->
params
[
'id'
]))
{
return
$this
->
response
(
$code
,
'参数错误!'
);
return
$this
->
response
(
$code
,
'参数错误!'
);
}
}
$cost_service
=
new
CostService
();
$fee_model
=
new
FApplyForFee
();
$fee_model
=
new
FApplyForFee
();
$m_store
=
new
AStore
();
$m_store
=
new
AStore
();
$m_store_cost
=
new
FStoreCost
();
$m_store_cost
=
new
FStoreCost
();
...
@@ -268,15 +268,15 @@ class Cost extends Basic
...
@@ -268,15 +268,15 @@ class Cost extends Basic
$where
[
'id'
]
=
$this
->
params
[
'id'
];
$where
[
'id'
]
=
$this
->
params
[
'id'
];
$data
=
$fee_model
->
findByOne
(
$field
,
$where
);
$data
=
$fee_model
->
findByOne
(
$field
,
$where
);
$office_id
=
$m_store
->
getFieldOneValue
(
'office_id'
,
[
'id'
=>
$data
[
'store_id'
]]);
$office_id
=
$m_store
->
getFieldOneValue
(
'office_id'
,
[
'id'
=>
$data
[
'store_id'
]]);
if
(
$office_id
)
{
if
(
$office_id
)
{
$store_field
=
'a.id,a.store_name'
;
$store_field
=
'a.id,a.store_name'
;
$office_store
=
$m_store
->
getStoreCostAll
(
$store_field
,
[
'a.office_id'
=>
$office_id
,
'a.status'
=>
0
]);
$office_store
=
$m_store
->
getStoreCostAll
(
$store_field
,
[
'a.office_id'
=>
$office_id
,
'a.status'
=>
0
]);
$list
=
[];
$list
=
[];
$cost_ext_field
=
'a.id,b.store_attendance_num,b.assume_fee'
;
$cost_ext_field
=
'a.id,b.store_attendance_num,b.assume_fee'
;
$cost_ext_where
[
'setting_date'
]
=
$data
[
'count_time'
];
$cost_ext_where
[
'setting_date'
]
=
$data
[
'count_time'
];
foreach
(
$office_store
as
$k
=>
$v
)
{
foreach
(
$office_store
as
$k
=>
$v
)
{
$cost_ext_where
[
'store_id'
]
=
$v
[
'id'
];
$cost_ext_where
[
'store_id'
]
=
$v
[
'id'
];
$store_cost_data
=
$m_store_cost
->
getCostExt
(
$cost_ext_field
,
$cost_ext_where
);
$store_cost_data
=
$m_store_cost
->
getCostExt
(
$cost_ext_field
,
$cost_ext_where
);
if
(
empty
(
$store_cost_data
))
{
if
(
empty
(
$store_cost_data
))
{
...
@@ -297,11 +297,28 @@ class Cost extends Basic
...
@@ -297,11 +297,28 @@ class Cost extends Basic
}
}
$check_field
=
'b.name,a.create_time,a.remark'
;
$check_field
=
'b.name,a.create_time,a.remark'
;
$data
[
'check_log'
]
=
$m_check
->
findByAll
(
$check_field
,
[
'apply_for_id'
=>
$data
[
'id'
]]);
$data
[
'check_log'
]
=
$m_check
->
findByAll
(
$check_field
,
[
'apply_for_id'
=>
$data
[
'id'
]]);
$data
[
'images_data'
]
=
$m_img
->
findByAll
(
'id,img_name,img_type'
,
[
'img_id'
=>
$data
[
'id'
]]);
$data
[
'images_data'
]
=
$m_img
->
findByAll
(
'id,img_name,img_type'
,
[
'img_id'
=>
$data
[
'id'
]]);
$data
[
'store_cost_data'
]
=
$list
;
$data
[
'store_cost_data'
]
=
$list
;
$data
[
'image_base_url'
]
=
'static/chat_image/'
;
$data
[
'image_base_url'
]
=
'static/chat_image/'
;
$source
=
[
0
=>
'app申请'
,
1
=>
'excel导入'
];
$status
=
[
0
=>
'申请中'
,
1
=>
'总监通过'
,
2
=>
'一审通过'
,
3
=>
'二审通过'
,
4
=>
'三审通过'
,
];
$data
[
'source_name'
]
=
$source
[
$data
[
'source'
]];
$data
[
'status_name'
]
=
$status
[
$data
[
'status'
]];
$data
[
'type_name'
]
=
$cost_service
->
getFeeType
(
$data
[
'type'
]);
$data
[
'fee_item_name'
]
=
$cost_service
->
getFeeItem
(
$data
[
'fee_item'
]);
}
}
return
$this
->
response
(
200
,
''
,
$data
);
return
$this
->
response
(
200
,
''
,
$data
);
}
}
...
...
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