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
961b8fdf
Commit
961b8fdf
authored
Jul 23, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增费用报销
parent
f138061c
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
98 additions
and
35 deletions
+98
-35
costCheck.html
application/index/view/cost/costCheck.html
+4
-5
costCheck.js
public/resource/js/costCheck.js
+94
-30
No files found.
application/index/view/cost/costCheck.html
View file @
961b8fdf
{layout name="global/frame_two_tpl" /}
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"costCheck"
/>
<input
type=
"hidden"
class=
"page-load"
id=
"costCheck"
/>
<style>
<style>
.choose_total
,
.choose_siteID
,
.choose_store
{
.choose_total
,
.choose_siteID
,
.choose_store
,
.choose_office
{
display
:
none
;
display
:
none
;
}
}
.user-ul2
{
.user-ul2
{
...
@@ -32,7 +32,6 @@
...
@@ -32,7 +32,6 @@
font-size
:
12px
;
font-size
:
12px
;
}
}
ul
{
ul
{
-webkit-padding-start
:
0px
!important
;
-webkit-padding-start
:
0px
!important
;
}
}
...
@@ -122,7 +121,7 @@
...
@@ -122,7 +121,7 @@
<div
class=
"pull-right"
>
<div
class=
"pull-right"
>
<ul
class=
"bread_btn"
>
<ul
class=
"bread_btn"
>
<li>
<li>
<a
href=
"#modal-check"
data-toggle=
"modal"
class=
"btn btn-info"
><i
class=
"icon-plus"
></i>
新增费用报销
<a
href=
"#modal-check"
data-toggle=
"modal"
class=
"btn btn-info
new-cost
"
><i
class=
"icon-plus"
></i>
新增费用报销
</a>
</a>
</li>
</li>
</ul>
</ul>
...
@@ -318,14 +317,14 @@
...
@@ -318,14 +317,14 @@
</div>
</div>
</div>
</div>
<div
style=
"clear: both;"
></div>
<div
style=
"clear: both;"
></div>
<div
class=
"form-group form-group-bottom col-sm-6"
>
<div
class=
"form-group form-group-bottom col-sm-6
is-hide-office
"
>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
选择费用承担办公室:
</label>
<label
for=
"inputEmail3"
class=
"col-sm-4 control-label"
>
选择费用承担办公室:
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<input
class=
"form-control ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_office"
placeholder=
"请输入办公室地址"
type=
"text"
value=
""
>
<input
class=
"form-control ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_office"
placeholder=
"请输入办公室地址"
type=
"text"
value=
""
>
<ul
class=
"user-ul-office"
style=
"display:none"
></ul>
<ul
class=
"user-ul-office"
style=
"display:none"
></ul>
</div>
</div>
</div>
</div>
<div
class=
"form-group form-group-bottom col-sm-6"
>
<div
class=
"form-group form-group-bottom col-sm-6
is-hide-store
"
>
<label
class=
"col-sm-4 control-label"
>
选择费用承担门店:
</label>
<label
class=
"col-sm-4 control-label"
>
选择费用承担门店:
</label>
<div
class=
"col-sm-8"
>
<div
class=
"col-sm-8"
>
<input
class=
"form-control ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_store"
placeholder=
"请输入门店名称"
type=
"text"
value=
""
>
<input
class=
"form-control ld-Marheight"
data-rule-phoneus=
"false"
data-rule-required=
"false"
id=
"comit_store"
placeholder=
"请输入门店名称"
type=
"text"
value=
""
>
...
...
public/resource/js/costCheck.js
View file @
961b8fdf
...
@@ -8,11 +8,13 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
...
@@ -8,11 +8,13 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
url
:
''
,
url
:
''
,
checkUrl
:
''
,
//审核url
checkUrl
:
''
,
//审核url
agent_id_phone
:
''
,
agent_id_phone
:
''
,
agent_id_office
:
''
,
main_index
:
0
,
main_index
:
0
,
init
:
function
()
{
init
:
function
()
{
//初始化dot
//初始化dot
$
(
document
.
body
).
append
(
template
);
$
(
document
.
body
).
append
(
template
);
//判断权限 总监
//判断权限 总监
if
(
check_auth
(
'index/getCostListTwo/1'
)){
if
(
check_auth
(
'index/getCostListTwo/1'
)){
$
(
'.choose_btn1'
).
show
();
$
(
'.choose_btn1'
).
show
();
...
@@ -73,11 +75,22 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
...
@@ -73,11 +75,22 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$
(
document
).
on
(
'click'
,
'#reset'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'#reset'
,
function
(
e
){
that
.
resetAll
();
that
.
resetAll
();
});
});
//新增报销
//点击新增报销
$
(
document
).
on
(
'click'
,
'.new-cost'
,
function
(
e
){
//初始化新增 费用项目 隐藏费用项目 门店 办公室
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.is-hide-store'
).
hide
();
$
(
'.is-hide-office'
).
hide
();
that
.
resetAdd
();
});
//新增报销 点击保存
$
(
document
).
on
(
'click'
,
'.add_cost'
,
function
(
e
){
$
(
document
).
on
(
'click'
,
'.add_cost'
,
function
(
e
){
that
.
addCost
();
that
.
addCost
();
});
});
//费用类型切换
//费用类型切换
$
(
"#cost_type"
).
change
(
function
()
{
$
(
"#cost_type"
).
change
(
function
()
{
$
(
"#fee_item"
).
val
(
''
);
//置空费用项目
$
(
"#fee_item"
).
val
(
''
);
//置空费用项目
...
@@ -110,29 +123,42 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
...
@@ -110,29 +123,42 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
//新增 费用类型切换
//新增 费用类型切换
$
(
"#cost_type_add"
).
change
(
function
()
{
$
(
"#cost_type_add"
).
change
(
function
()
{
$
(
"#fee_item_add"
).
val
(
''
);
//置空费用项目
$
(
"#fee_item_add"
).
val
(
''
);
//置空费用项目
if
(
$
(
'#cost_type_add'
).
val
()
==
0
){
if
(
$
(
'#cost_type_add'
).
val
()
==
0
){
//办公室
$
(
'.choose_office_add'
).
show
();
$
(
'.choose_office_add'
).
show
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
//隐藏门店 办公室
$
(
'.is-hide-office'
).
show
();
$
(
'.is-hide-store'
).
hide
();
}
else
if
(
$
(
'#cost_type_add'
).
val
()
==
1
){
}
else
if
(
$
(
'#cost_type_add'
).
val
()
==
1
){
//总部
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
show
();
$
(
'.choose_total_add'
).
show
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
//隐藏门店 办公室
$
(
'.is-hide-office'
).
hide
();
$
(
'.is-hide-store'
).
hide
();
}
else
if
(
$
(
'#cost_type_add'
).
val
()
==
2
){
}
else
if
(
$
(
'#cost_type_add'
).
val
()
==
2
){
//分部
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
show
();
$
(
'.choose_siteID_add'
).
show
();
$
(
'.choose_store_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
//隐藏门店 办公室
$
(
'.is-hide-office'
).
hide
();
$
(
'.is-hide-store'
).
hide
();
}
else
if
(
$
(
'#cost_type_add'
).
val
()
==
3
){
}
else
if
(
$
(
'#cost_type_add'
).
val
()
==
3
){
//门店
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
show
();
$
(
'.choose_store_add'
).
show
();
//隐藏门店 办公室
$
(
'.is-hide-office'
).
hide
();
$
(
'.is-hide-store'
).
show
();
};
};
});
});
...
@@ -362,16 +388,16 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
...
@@ -362,16 +388,16 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}
}
});
});
},
},
//将li里的值 赋给input(
分佣方姓名
)
//将li里的值 赋给input(
办公室
)
addphoneOffice
:
function
(
obj
)
{
//新增客户 input赋值
addphoneOffice
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
cost
;
var
that
=
cost
;
var
user_ht
=
$
(
obj
).
html
();
var
user_ht
=
$
(
obj
).
html
();
$
(
"#comit_office"
).
val
(
user_ht
);
$
(
"#comit_office"
).
val
(
user_ht
);
$
(
".user-ul-office"
).
html
(
''
);
$
(
".user-ul-office"
).
html
(
''
);
$
(
".user-ul-office"
).
hide
();
$
(
".user-ul-office"
).
hide
();
that
.
agent_id_
phon
e
=
$
(
obj
).
attr
(
"data-id"
);
that
.
agent_id_
offic
e
=
$
(
obj
).
attr
(
"data-id"
);
},
},
//将li里的值 赋给input(
分佣方姓名
)
//将li里的值 赋给input(
门店
)
addphoneStore
:
function
(
obj
)
{
//新增客户 input赋值
addphoneStore
:
function
(
obj
)
{
//新增客户 input赋值
var
that
=
cost
;
var
that
=
cost
;
var
user_ht
=
$
(
obj
).
html
();
var
user_ht
=
$
(
obj
).
html
();
...
@@ -446,40 +472,62 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
...
@@ -446,40 +472,62 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
//新增报销
//新增报销
addCost
:
function
()
{
addCost
:
function
()
{
var
params
=
{};
var
params
=
{};
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
if
(
$
(
'#fee_item_add'
).
val
()
)
{
//区分分部
if
(
$
(
'#cost_type_add'
).
val
()
==
2
){
if
(
$
(
'#cost_type_add'
).
val
()
==
2
){
params
.
site_id
=
$
(
'#fee_item_add'
).
val
();
params
.
site_id
=
$
(
'#fee_item_add'
).
val
();
}
else
{
}
else
{
params
.
fee_item
=
$
(
'#fee_item_add'
).
val
();
params
.
fee_item
=
$
(
'#fee_item_add'
).
val
();
}
}
var
imgname
=
[];
//图片
}
var
imgname
=
[];
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
};
// params.img_arr = imgname.join(',');
params
.
img_arr
=
imgname
;
params
.
img_arr
=
imgname
;
$
.
ajax
({
if
(
$
(
'#total_fee'
).
val
()){
params
.
total_fee
=
$
(
'#total_fee'
).
val
();
}
else
{
alert
(
'请选择费用总金额'
);
return
;
}
if
(
$
(
'#cost_type_add'
).
val
()){
params
.
type
=
$
(
'#cost_type_add'
).
val
();
}
else
{
alert
(
'请选择费用类型'
);
return
;
}
if
(
$
(
'#fee_item_add'
).
val
()){
}
else
{
alert
(
'请选择费用项目'
);
return
;
}
if
(
$
(
'#count_time_add'
).
val
()){
params
.
count_time
=
$
(
'#count_time_add'
).
val
();
}
else
{
alert
(
'请选择计入月份'
);
return
;
}
if
(
imgname
.
length
){
}
else
{
alert
(
'请选择图片'
);
return
;
}
params
.
card_name
=
$
(
'#card_name_cost'
).
val
();
params
.
bank
=
$
(
'#bank_cost'
).
val
();
params
.
card_no
=
$
(
'#card_no_cost'
).
val
();
params
.
purpose
=
$
(
'#yongtu'
).
val
();
$
.
ajax
({
url
:
'/index/addApplyFor'
,
url
:
'/index/addApplyFor'
,
type
:
'POST'
,
type
:
'POST'
,
async
:
true
,
async
:
true
,
data
:
{
data
:
params
,
'type'
:
$
(
'#cost_type_add'
).
val
(),
'total_fee'
:
$
(
'#total_fee'
).
val
(),
'agent_id'
:
user_info_obj
.
id
,
'store_id'
:
$
(
'#cost_type_add'
).
val
(),
'card_name'
:
$
(
'#card_name_cost'
).
val
(),
'bank'
:
$
(
'#bank_cost'
).
val
(),
'card_no'
:
$
(
'#card_no_cost'
).
val
(),
'count_time'
:
$
(
'#count_time_add'
).
val
()
+
"-01"
,
//计入月份
'img_arr'
:
$
(
'#cost_type_add'
).
val
(),
},
dataType
:
'json'
,
dataType
:
'json'
,
success
:
function
(
data
)
{
success
:
function
(
data
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
if
(
data
.
code
==
200
&&
data
.
data
!=
null
)
{
alert
(
data
.
msg
)
alert
(
data
.
msg
);
$
(
".modal"
).
modal
(
'hide'
);
//新增成功 关闭弹窗
cost
.
getList
(
cost
.
pageNo
);
//重新获取列表
cost
.
getList
(
cost
.
pageNo
);
//重新获取列表
}
else
{
}
else
{
alert
(
data
.
msg
)
alert
(
data
.
msg
)
...
@@ -524,8 +572,25 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
...
@@ -524,8 +572,25 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
},
},
/**
/**
* 重置查询条件
* 重置查询条件
新增报销
*/
*/
resetAdd
:
function
(){
var
that
=
cost
;
$
(
'#total_fee'
).
val
(
""
);
$
(
'#cost_type_add'
).
val
(
""
);
$
(
'#fee_item_add'
).
val
(
""
);
$
(
'#yongtu'
).
val
(
""
);
$
(
'#card_name_cost'
).
val
(
""
);
$
(
'#bank_cost'
).
val
(
""
);
$
(
'#card_no_cost'
).
val
(
""
);
$
(
'#count_time_add'
).
val
(
""
);
$
(
'#comit_store'
).
val
(
""
);
$
(
'#comit_office'
).
val
(
""
);
that
.
agent_id_office
=
""
;
that
.
agent_id_store
=
""
;
},
//重置搜索条件
resetAll
:
function
(){
resetAll
:
function
(){
var
that
=
cost
;
var
that
=
cost
;
$
(
'#count_time'
).
val
(
""
);
$
(
'#count_time'
).
val
(
""
);
...
@@ -544,7 +609,6 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
...
@@ -544,7 +609,6 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
},
},
//费用报销 导出
//费用报销 导出
exportExcel
:
function
()
{
exportExcel
:
function
()
{
if
(
cost
.
buildSearchParams
(
1
)){
//是否要&符号
if
(
cost
.
buildSearchParams
(
1
)){
//是否要&符号
...
...
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