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
291cfd2b
Commit
291cfd2b
authored
Sep 17, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
批量审核
parent
b37faab8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
4 deletions
+78
-4
costCheck.html
application/index/view/cost/costCheck.html
+5
-2
costCheck.js
public/resource/js/costCheck.js
+70
-2
cost_check_template_tpl.html
public/resource/template/cost_check_template_tpl.html
+3
-0
No files found.
application/index/view/cost/costCheck.html
View file @
291cfd2b
...
...
@@ -219,8 +219,8 @@
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"search"
style=
"float:left"
>
搜索
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"reset"
style=
"float:left"
>
重置
</span>
<span
class=
"btn btn-info btn3 ld-Marheight"
id=
"export"
style=
"float: left;"
>
导出报表
</span>
<
!--<span class="btn btn-info btn3 ld-Marheight" id="" style="float: left;">批量上传</span>--
>
<div
class=
"input_caozuo ld-Marheight btn3 file_input_div"
style=
"float: left;width: 80px;position: relative;
display: none;
"
>
<
span
class=
"btn btn-info btn3 ld-Marheight batchCheckHide"
id=
"batchCheck"
style=
"float: left;display: none;"
>
批量审核
</span
>
<div
class=
"input_caozuo ld-Marheight btn3 file_input_div"
style=
"float: left;width: 80px;position: relative;"
>
<span
class=
"btn btn-info"
id=
""
style=
"width: 80px;"
>
批量上传
</span>
<input
type=
"file"
id=
"file_input"
style=
"width: 80px;opacity: 0;position: absolute;left: 0;top: 0;cursor: pointer;height: 35px;"
class=
""
/>
</div>
...
...
@@ -229,6 +229,9 @@
</td>
</tr>
<tr>
<th
class=
"text-center batchCheckHide"
style=
"display: none;"
>
<input
style=
"width:20px;"
class=
"chooseAll"
type=
"checkbox"
/>
</th>
<th
class=
"text-center"
>
费用ID
</th>
<th
class=
"text-center"
>
计入月份
</th>
<th
class=
"text-center"
>
提交时间
</th>
...
...
public/resource/js/costCheck.js
View file @
291cfd2b
...
...
@@ -13,6 +13,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
agent_site_office
:
''
,
agent_id_store_pay
:
''
,
//新增报销 收款人
main_index
:
0
,
vaules
:[],
batchCheckUrl
:
''
,
batchCheckHide
:
0
,
init
:
function
()
{
//初始化dot
...
...
@@ -71,11 +74,20 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
this
).
removeClass
(
'btn-default'
).
addClass
(
'btn-info'
).
siblings
().
removeClass
(
'btn-info'
).
addClass
(
'btn-default'
);
//显示隐藏批量上传
if
(
$
(
this
).
html
()
==
'财务一审'
||
$
(
this
).
html
()
==
'财务二审'
){
$
(
".file_input_div"
).
show
();
$
(
".batchCheckHide"
).
show
();
cost
.
batchCheckHide
=
1
;
}
else
{
$
(
".file_input_div"
).
hide
();
$
(
".batchCheckHide"
).
hide
();
cost
.
batchCheckHide
=
0
;
};
//批量审核的url
if
((
$
(
this
).
html
()
==
'财务一审'
)){
cost
.
batchCheckUrl
=
'/index/checkCostThree/2'
;
}
else
if
(
$
(
this
).
html
()
==
'财务二审'
){
cost
.
batchCheckUrl
=
'/index/checkCostFour/3'
;
}
cost
.
url
=
e
.
target
.
dataset
.
value
;
cost
.
getList
(
1
);
});
...
...
@@ -87,6 +99,27 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
document
).
on
(
'click'
,
'.all_btn'
,
function
(
e
){
cost
.
main_index
=
5
;
});
//费用报销审核 全选
$
(
document
).
on
(
'click'
,
'.chooseAll'
,
function
(
e
){
if
(
$
(
this
).
is
(
":checked"
))
{
$
(
'[name=tableCheck]'
).
prop
(
"checked"
,
'checked'
);
}
else
{
$
(
'[name=tableCheck]'
).
prop
(
"checked"
,
""
);
}
cost
.
vaules
=
[]
;
$
(
'[name=tableCheck]'
).
each
(
function
(
e
,
i
){
cost
.
vaules
[
i
]
=
this
.
value
});
})
//批量审核 费用报销审核
$
(
document
).
on
(
'click'
,
'#batchCheck'
,
function
(
e
){
cost
.
vaules
=
[]
;
$
(
'[name=tableCheck]:checked'
).
each
(
function
(
i
,
e
){
cost
.
vaules
.
push
(
this
.
value
);
});
that
.
batchCheck
();
});
//搜索
$
(
document
).
on
(
'click'
,
'#search'
,
function
(
e
){
that
.
getList
(
1
);
...
...
@@ -798,6 +831,36 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}
});
},
//批量审核
batchCheck
:
function
()
{
var
params
=
{};
cost
.
vaules
.
forEach
((
v
,
i
)
=>
{
// params[`id_array[${i}]`] = v;
params
[
'id_array['
+
i
+
']'
]
=
v
;
})
if
(
cost
.
vaules
.
length
){
}
else
{
alert
(
"请选择报销审核"
);
return
;
}
$
.
ajax
({
url
:
cost
.
batchCheckUrl
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
alert
(
'审核成功'
);
cost
.
vaules
=
[];
cost
.
getList
(
cost
.
pageNo
);
//重新获取列表
}
else
{
alert
(
data
.
msg
)
}
}
});
},
//获取列表
getList
:
function
(
no
){
var
that
=
cost
;
...
...
@@ -812,6 +875,11 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
var
temp
=
document
.
getElementById
(
'cost_check_template_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#order_list"
).
html
(
doTtmpl
(
data
.
data
.
list
));
if
(
cost
.
batchCheckHide
){
$
(
".batchCheckHideL"
).
show
();
}
else
{
$
(
".batchCheckHideL"
).
hide
();
}
if
(
cost
.
main_index
==
5
){
$
(
'.checkCost'
).
html
(
'详情'
);
}
else
{
...
...
public/resource/template/cost_check_template_tpl.html
View file @
291cfd2b
...
...
@@ -3,6 +3,9 @@
[
%
if
(
it
&&
it
.
length
)
{
%
]
[
%
for
(
var
item
in
it
){
%
]
<
tr
class
=
"text-center"
>
<
td
class
=
"batchCheckHideL"
style
=
"display: none;"
>
<
input
style
=
"width:20px;"
type
=
"checkbox"
name
=
"tableCheck"
value
=
"[%= it[item]['id'] %]"
data
-
dazhe
=
"[%= it[item]["
is_discounts
"] %]"
/>
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'count_time'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'create_time'
]
%
]
<
/td
>
...
...
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