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
891d3674
Commit
891d3674
authored
Sep 17, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
费用报销-删除列表
parent
ea60ee9d
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
13 deletions
+14
-13
Cost.php
application/index/controller/Cost.php
+12
-11
delCost.js
public/resource/js/delCost.js
+1
-1
cost_check_template_tpl.html
public/resource/template/cost_check_template_tpl.html
+1
-1
No files found.
application/index/controller/Cost.php
View file @
891d3674
...
...
@@ -499,7 +499,7 @@ class Cost extends Basic
}
/**
*
删除费用报销
列表
*
费用报销-删除
列表
*
* @return \think\Response
*/
...
...
@@ -517,13 +517,13 @@ class Cost extends Basic
$field
.=
'b.name as agent_name,a.site_id'
;
$where
[
'is_del'
]
=
1
;
$list
=
$this
->
fee_model
->
getJoinAgentList
(
$pageNo
,
$pageSize
,
'a.id desc'
,
$field
,
$where
);
$
data
=
[]
;
foreach
(
$list
as
$v
)
{
$key
=
$fee_id
[]
=
$v
[
'id'
];
$
data
[
$key
]
=
$v
;
$
data
[
$key
][
'type_name'
]
=
$cost_service
->
getFeeType
(
$v
[
'type'
]);
$
data
[
$key
][
'fee_item_name'
]
=
$cost_service
->
getFeeItem
(
$v
[
'fee_item'
]);
$
data
[
$key
][
'del_name'
]
=
''
;
$
total
=
$this
->
fee_model
->
getJoinAgentListTotal
(
$where
)
;
foreach
(
$list
as
$k
=>
$v
)
{
$
fee_id
[]
=
$v
[
'id'
]
;
$
list
[
$k
][
'type_name'
]
=
$cost_service
->
getFeeType
(
$v
[
'type'
]);
$
list
[
$k
][
'fee_item_name'
]
=
$cost_service
->
getFeeItem
(
$v
[
'fee_item'
]);
$
list
[
$k
][
'del_name'
]
=
''
;
}
if
(
isset
(
$fee_id
))
{
...
...
@@ -531,10 +531,10 @@ class Cost extends Basic
$log_where
[
'apply_id'
]
=
[
'in'
,
$fee_id
];
$log_where
[
'type'
]
=
1
;
$log_data
=
$m_log
->
findColumn
(
'apply_id,name'
,
$log_where
);
foreach
(
$data
as
$k
=>
$v
)
{
$
data
[
$k
][
'del_name'
]
=
$log_data
[
$v
[
'id'
]];
foreach
(
$list
as
$k
=>
$v
)
{
$
list
[
$k
][
'del_name'
]
=
$log_data
[
$v
[
'id'
]];
}
}
return
$this
->
response
(
200
,
''
,
$data
);
return
$this
->
response
(
200
,
''
,
[
'list'
=>
$list
,
'total'
=>
$total
]
);
}
}
\ No newline at end of file
public/resource/js/delCost.js
View file @
891d3674
...
...
@@ -16,7 +16,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
var
params
=
{};
params
.
pageNo
=
that
.
pageNo
;
params
.
pageSize
=
that
.
pageSize
;
$
.
get
(
"/index/
get
CostList"
,
params
,
function
(
data
){
$
.
get
(
"/index/
del
CostList"
,
params
,
function
(
data
){
if
(
typeof
data
===
'object'
)
{
if
(
data
.
code
==
200
)
{
that
.
listData
=
data
.
data
.
list
;
...
...
public/resource/template/cost_check_template_tpl.html
View file @
891d3674
...
...
@@ -164,7 +164,7 @@
[
%
}
else
{
%
]
<
td
>--<
/td
>
[
%
}
%
]
<
td
>
[
%=
it
[
item
][
'
payee_agent
_name'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'
del
_name'
]
%
]
<
/td
>
<
/tr
>
[
%
}
%
]
[
%
}
else
{
%
]
...
...
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