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
4c61d167
Commit
4c61d167
authored
Jul 25, 2019
by
agping
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
0ee1e675
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
963 additions
and
4 deletions
+963
-4
RealTimePerformance.php
application/index/controller/RealTimePerformance.php
+7
-0
publicCostDetailsStore.html
application/index/view/cost/publicCostDetailsStore.html
+369
-0
route.php
application/route.php
+1
-0
accountingTable.js
public/resource/js/accountingTable.js
+1
-1
costDetails.js
public/resource/js/costDetails.js
+1
-1
publicCostDetailsStore.js
public/resource/js/publicCostDetailsStore.js
+574
-0
accountingTable_list_template_tpl.html
.../resource/template/accountingTable_list_template_tpl.html
+10
-2
No files found.
application/index/controller/RealTimePerformance.php
View file @
4c61d167
...
...
@@ -80,6 +80,13 @@ class RealTimePerformance extends Basic
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'cost/publicCostDetails'
);
}
}
//成本明细详情
public
function
publicCostDetailsStore
()
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'cost/publicCostDetailsStore'
);
}
}
//门店成本核算表
public
function
accountingTable
()
...
...
application/index/view/cost/publicCostDetailsStore.html
0 → 100644
View file @
4c61d167
{layout name="global/frame_two_tpl" /}
<input
type=
"hidden"
class=
"page-load"
id=
"publicCostDetailsStore"
/>
<style>
.is_hide_details
{
display
:
none
;
}
div
{
outline
:
none
!important
;
}
.margain-10
{
/*margin-bottom: 2px;*/
}
.top-5
{
position
:
relative
;
top
:
5px
;
}
#file_input_pic
,
#file_input_pic2
{
opacity
:
0
;
position
:
absolute
;
top
:
0
;
left
:
0px
;
height
:
35px
;
width
:
80px
;
}
#container_body_img_area
>
div
,
#container_body_img_area2
>
div
{
float
:
left
;
width
:
140px
;
}
.active
{
color
:
dodgerblue
;
}
ul
{
-webkit-padding-start
:
0px
!important
;
}
.hide
{
display
:
none
!important
;
}
.result
>
img
,
.result2
>
img
,
.result-beizhu
>
img
{
width
:
80px
;
height
:
80px
;
margin-top
:
8px
;
}
#container_body
{
position
:
relative
;
overflow
:
hidden
;
}
.span-del2
,
.span-del
,
.span-del-beizhu
{
color
:
red
;
}
/*控制放大镜的 收款图片显示*/
#preview
{
z-index
:
9999
!important
;
}
#preview
img
{
width
:
600px
;
}
.clear
{
clear
:
both
;
}
input
{
width
:
50%
;
}
.modal-backdrop
{
opacity
:
0
!important
;
filter
:
alpha
(
opacity
=
0
)
!important
;
}
</style>
<div
id=
"page-content-wrapper"
style=
"width: 900px;height: 680px;"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
""
>
<div
class=
"panel panel-default"
>
<div
class=
"panel-body"
style=
"overflow:hidden;"
>
<div
class=
""
id=
"modal-addPic"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"false"
>
<div>
<div>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title tit_con active shoukuanxiangqing"
style=
"width:auto!important;float:left"
>
费用详情
</h4>
<h4
class=
"modal-title tit_con"
style=
"width:auto!important;float:left;margin-left:20px;"
>
费用图片
</h4>
</div>
<!--图片显示-->
<div
class=
"modal-body modal-body-height pic-con1"
style=
"overflow: hidden;"
>
<ul
class=
"list-group "
>
<li
class=
"list-group-item"
>
<div
class=
"form-group full-width-100 full-pic-area"
>
<div
id=
"container_body_du"
style=
"height: 420px;"
>
<button
type=
"button btn2"
class=
"btn btn-default"
>
上传图片
</button>
<input
type=
"file"
id=
"file_input_pic"
/>
<div
id=
"container_body_img_area"
></div>
</div>
</div>
</li>
</ul>
</div>
<div
class=
"pic-con1"
style=
"text-align-last: right; margin-right: 20px;"
>
<button
type=
"button btn2"
class=
"btn btn-primary save_cost_pic is_hide_details"
id=
""
data-dismiss=
"modal"
>
保 存
</button>
</div>
<!--费用详情-->
<div
class=
"modal-body modal-body-height pic-con2"
style=
"overflow:auto;height: 530px;"
>
<form
class=
""
>
<div
class=
"col-xs-12 margain-10"
>
<div
class=
"col-xs-6 is_hide_costID"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
费用总ID:
</span></strong>
<span
id=
"cost_id"
class=
"col-xs-6 ld-Marheight"
></span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
提交人:
</span></strong>
<span
id=
"tijiaoren"
class=
"col-xs-6 ld-Marheight"
></span>
</div>
</div>
</div>
<div
class=
"col-xs-12 margain-10"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
提交时间:
</span></strong>
<span
id=
"tijiaotime"
class=
"col-xs-6 ld-Marheight"
>
2018.12.12 10:00:00
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
费用总金额:
</span></strong>
<span
id=
""
class=
"col-xs-6 ld-Marheight"
><input
class=
"form-control"
type=
"text"
value=
""
id=
"total_fee"
></span>
</div>
</div>
</div>
<div
class=
"col-xs-12 margain-10"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
费用类型:
</span></strong>
<span
id=
"tijiaoren"
class=
"col-xs-6 ld-Marheight"
>
<select
class=
"form-control"
id=
"payType"
>
<option
value=
""
>
费用类型
</option>
<option
value=
"1"
>
办公室成本
</option>
<option
value=
"2"
>
上海总部成本
</option>
<option
value=
"3"
>
分部成本
</option>
<option
value=
"5"
>
门店独有成本
</option>
</select>
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
费用项目:
</span></strong>
<span
id=
"address"
class=
"col-xs-6 ld-Marheight"
>
<select
class=
"form-control"
id=
"payItem"
>
<option
value=
""
>
费用项目
</option>
<!--办公室类型-->
<option
value=
"101"
class=
"choose_office_add"
>
水电费
</option>
<option
value=
"102"
class=
"choose_office_add"
>
其他费用
</option>
<!--总部成本类型-->
<option
value=
"202"
class=
"choose_total_add"
>
其他费用
</option>
<!--分部成本类型-->
<option
value=
"10002"
class=
"choose_siteID_add"
>
杭州
</option>
<option
value=
"10003"
class=
"choose_siteID_add"
>
深圳
</option>
<option
value=
"10004"
class=
"choose_siteID_add"
>
广州
</option>
<option
value=
"10005"
class=
"choose_siteID_add"
>
北京
</option>
<!--门店独有成本类型-->
<option
value=
"506"
class=
"choose_store_add"
>
区域经理基本工资
</option>
<option
value=
"504"
class=
"choose_store_add"
>
区域秘书基薪
</option>
<option
value=
"505"
class=
"choose_store_add"
>
招聘成本
</option>
<option
value=
"507"
class=
"choose_store_add"
>
宿舍成本
</option>
<option
value=
"508"
class=
"choose_store_add"
>
宿舍亏损
</option>
<option
value=
"510"
class=
"choose_store_add"
>
员工工资成本
</option>
<option
value=
"511"
class=
"choose_store_add"
>
网络报销
</option>
<option
value=
"512"
class=
"choose_store_add"
>
离职员工网络
</option>
<option
value=
"102"
class=
"choose_store_add"
>
其他费用
</option>
</select>
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12 margain-10"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
费用用途:
</span></strong>
<span
id=
"tijiaoren"
class=
"col-xs-6 ld-Marheight"
>
<input
class=
"form-control"
type=
"text"
value=
""
id=
"yongtu"
>
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
来源:
</span></strong>
<span
id=
"laiyuan"
class=
"col-xs-6 ld-Marheight"
>
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12 margain-10"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight"
>
状态:
</span></strong>
<span
id=
"zhuangtai"
class=
"col-xs-6 ld-Marheight"
>
</span>
</div>
</div>
<div
class=
"col-xs-6 is_hide_bank"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
转账卡号:
</span></strong>
<span
id=
""
class=
"col-xs-6 ld-Marheight"
>
<input
class=
"form-control"
type=
"text"
value=
""
id=
"card_no"
>
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12 margain-10 is_hide_bank"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
收款卡户名:
</span></strong>
<span
id=
""
class=
"col-xs-6 ld-Marheight"
>
<input
class=
"form-control"
type=
"text"
value=
""
id=
"card_name"
>
</span>
</div>
</div>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
收款卡开户行:
</span></strong>
<span
id=
""
class=
"col-xs-6 ld-Marheight"
>
<input
class=
"form-control"
type=
"text"
value=
""
id=
"bank"
>
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12 margain-10"
>
<div
class=
"col-xs-6"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight top-5"
>
计入月份:
</span></strong>
<span
id=
""
class=
"col-xs-6 ld-Marheight"
>
<input
id=
"count_time"
class=
"form-control"
type=
"text"
placeholder=
"请选择"
onclick=
"WdatePicker({el:this,dateFmt:'yyyy-MM',readOnly:'readonly' })"
>
</span>
</div>
</div>
<div
class=
"col-xs-6 is_hide_kaoqin"
>
<div
class=
"form-group"
>
<strong><span
class=
"col-xs-4 ld-Marheight kaoqin_con"
>
当月门店所在办公室考勤:
</span></strong>
<span
id=
"kaoqin"
class=
"col-xs-6 ld-Marheight"
>
10
</span>
</div>
</div>
</div>
<div
class=
"col-xs-12"
style=
"padding: 0 30px;"
>
<p
style=
"font-size: 16px;font-weight: 600;"
>
成本明细
</p>
<div
class=
""
>
<table
class=
"table"
style=
"margin-bottom: 6px;"
>
<tbody
class=
"text-left"
id=
"mingxi_list"
>
</tbody>
</table>
</div>
<p
style=
"font-size: 16px;font-weight: 600;"
>
审核记录
</p>
<!--费用报销 审核记录-->
<div
class=
"check_jilu"
>
<table
class=
"table"
style=
"margin-bottom: 6px;"
>
<tbody
class=
"text-left"
id=
"check_list"
>
</tbody>
</table>
</div>
<!--详情 审核记录-->
<div
class=
"detail_jilu"
>
<div
style=
"font-size: 16px;margin-bottom: 20px;font-weight: 600;"
>
核对记录:
</div>
<div
style=
"margin-bottom: 10px;"
>
门店考勤:
<span
class=
"kaoqin1"
></span></div>
<div
style=
"margin-bottom: 10px;"
>
社保报销:
<span
class=
"kaoqin2"
></span></div>
<div
style=
"margin-bottom: 10px;"
>
门店手续费:
<span
class=
"kaoqin3"
></span>
</div>
<div
style=
"margin-bottom: 10px;"
>
总部成本+发展基金+总经理基薪:
<span
class=
"kaoqin4"
></span></div>
<div
style=
"margin-bottom: 10px;"
>
办公室房租+当月办公门店:
<span
class=
"kaoqin5"
></span></div>
</div>
<!--转账截图-->
<div
class=
"pic_jilu"
>
<p
style=
"font-size: 16px;font-weight: 600;"
>
转账截图
</p>
<div
class=
""
>
<table
class=
"table"
>
<tbody
class=
"text-left"
id=
"checkPic_list"
>
</tbody>
</table>
</div>
</div>
</div>
</form>
</div>
<div
class=
"pic-con2"
style=
"text-align: right;"
>
<button
type=
"button btn2"
class=
"btn btn-primary save_cost is_hide_details"
id=
""
data-dismiss=
"modal"
>
保存
</button>
<button
type=
"button"
class=
"btn btn-primary pass_check is_hide_details"
href=
"#modal_pass"
data-toggle=
"modal"
style=
""
>
审核通过
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<!-- 弹出框 通过 -->
<div
class=
"modal fade"
id=
"modal_pass"
tabindex=
"-1"
role=
"dialog"
aria-labelledby=
"myModalLabel"
aria-hidden=
"true"
>
<div
class=
"modal-dialog button-center-bargain"
>
<div
class=
"modal-content"
>
<div
class=
"modal-header"
>
<button
type=
"button"
class=
"close"
data-dismiss=
"modal"
aria-hidden=
"true"
>
×
</button>
<h4
class=
"modal-title"
>
通过
</h4>
</div>
<div
class=
"modal-body"
>
<label
class=
"control-label"
>
备注(选填)
</label>
<textarea
class=
"form-control"
rows=
"2"
id=
"pass_beizhu"
></textarea>
<!--<span class="use-span text-danger">(必填)</span>-->
<!--图片 选填-->
<br
/>
<br
/>
<div
class=
"is_hide_pic"
>
<p>
转账截图(选填)
</p>
<div
class=
"form-group full-width-100 full-pic-area"
style=
"position: relative;"
>
<div
id=
"container_body_du"
style=
"height: 120px;"
>
<button
type=
"button btn2"
class=
"btn btn-default"
>
上传图片
</button>
<input
type=
"file"
id=
"file_input_pic2"
/>
<div
id=
"container_body_img_area2"
></div>
</div>
</div>
</div>
</div>
<div
class=
"modal-footer text-center"
>
<button
type=
"button"
class=
"btn btn-default"
data-dismiss=
"modal"
>
取消
</button>
<button
type=
"button"
class=
"btn btn-info"
data-dismiss=
"modal"
class=
"pass-modal-btn-pass"
id=
"pass_ok_btn"
>
确定
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
application/route.php
View file @
4c61d167
...
...
@@ -367,6 +367,7 @@ Route::group('index', [
'attendanceList'
=>
[
'index/RealTimePerformance/attendanceList'
,
[
'method'
=>
'GET'
]],
//门店考勤 liu
'costParameters'
=>
[
'index/RealTimePerformance/costParameters'
,
[
'method'
=>
'GET'
]],
//成本参数 liu
'publicCostDetails'
=>
[
'index/RealTimePerformance/publicCostDetails'
,
[
'method'
=>
'GET'
]],
//费用报销详情 liu
'publicCostDetailsStore'
=>
[
'index/RealTimePerformance/publicCostDetailsStore'
,
[
'method'
=>
'GET'
]],
//成本明细详情 liu
'accountingTable'
=>
[
'index/RealTimePerformance/accountingTable'
,
[
'method'
=>
'GET'
]],
//成本核算表 liu
'shopinspectionLog'
=>
[
'index/ShopInspectionLog/shopinspectionLogList'
,
[
'method'
=>
'POST|GET'
]],
//商铺查看日志liu
...
...
public/resource/js/accountingTable.js
View file @
4c61d167
...
...
@@ -54,7 +54,7 @@ define(['doT','html2canvas','text!temp/accountingTable_list_template_tpl.html',
//点击详情
$
(
document
).
on
(
'click'
,
'.checkCost'
,
function
(
e
){
//点击审核按钮 调整审核页面
var
id
=
e
.
target
.
dataset
.
id
;
$
(
".publicCostDetails"
).
attr
(
'src'
,
'/index/publicCostDetails?cost_id='
+
id
+
'&is_self=1'
)
$
(
".publicCostDetails"
).
attr
(
'src'
,
'/index/publicCostDetails
Store
?cost_id='
+
id
+
'&is_self=1'
)
});
//打印功能
_doc
.
on
(
'click'
,
'.is-print'
,
function
(
e
)
{
...
...
public/resource/js/costDetails.js
View file @
4c61d167
...
...
@@ -32,7 +32,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
//点击详情
$
(
document
).
on
(
'click'
,
'.checkCost'
,
function
(
e
){
//点击审核按钮 调整审核页面
var
id
=
e
.
target
.
dataset
.
id
;
$
(
".publicCostDetails"
).
attr
(
'src'
,
'/index/publicCostDetails?cost_id='
+
id
+
'&is_self=1'
)
$
(
".publicCostDetails"
).
attr
(
'src'
,
'/index/publicCostDetails
Store
?cost_id='
+
id
+
'&is_self=1'
)
});
//费用类型切换
$
(
"#cost_type"
).
change
(
function
()
{
...
...
public/resource/js/publicCostDetailsStore.js
0 → 100644
View file @
4c61d167
define
([
'doT'
,
'text!temp/cost_check_template_tpl.html'
,
'css!style/home.css'
,
'ckfinder'
,
'ckfinderStart'
,
"datetimepicker"
,
'pagination'
,
'bootstrapJs'
,
'blow-up'
],
function
(
doT
,
template
)
{
cost
=
{
pageNo
:
1
,
/*第几页*/
pageSize
:
10
,
/*每页显示多少条*/
checkUrl
:
''
,
id
:
''
,
site_id
:
''
,
office_id
:
''
,
store_id
:
''
,
main_index
:
''
,
init
:
function
()
{
//初始化dot
$
(
document
.
body
).
append
(
template
);
cost
.
event
();
},
event
:
function
()
{
var
that
=
cost
;
var
_doc
=
$
(
document
);
//从连接拿报销id
cost
.
id
=
getUrlParam
(
'cost_id'
);
//费用报销id
cost
.
is_self
=
getUrlParam
(
'is_self'
);
//费用报销0 门店明细1
cost
.
main_index
=
getUrlParam
(
'main_index'
);
//费用报销审核 全部 5
//初始化 显示隐藏详情tab切换
$
(
'.pic-con2'
).
show
();
$
(
'.pic-con1'
).
hide
();
cost
.
getDetails
(
cost
.
id
,
cost
.
is_self
);
//获取详情
//审核通过
$
(
document
).
on
(
'click'
,
'#pass_ok_btn'
,
function
(
e
){
that
.
checkCost
();
});
//点击关闭按钮
$
(
document
).
on
(
'click'
,
'.close'
,
function
(
e
){
$
(
parent
.
document
).
find
(
'.close'
).
click
();
});
//编辑 费用类型切换
$
(
"#payType"
).
change
(
function
()
{
$
(
"#payItem"
).
val
(
''
);
//置空费用项目
if
(
$
(
'#payType'
).
val
()
==
1
){
//办公室
$
(
'.choose_office_add'
).
show
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
}
else
if
(
$
(
'#payType'
).
val
()
==
2
){
//总部
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
show
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
}
else
if
(
$
(
'#payType'
).
val
()
==
3
){
//分部
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
show
();
$
(
'.choose_store_add'
).
hide
();
}
else
if
(
$
(
'#payType'
).
val
()
==
5
){
//门店
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
show
();
};
});
//编辑报销 上传图片
$
(
'#file_input_pic'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'chat'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area'
).
append
(
'<div class="result"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'1'
:
_data
.
data
.
internet_img_name
?
urlDeal
(
_data
.
data
.
internet_img_name
):
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//备注 上传图片
$
(
'#file_input_pic2'
).
on
(
'change'
,
function
(){
var
_this
=
$
(
this
);
var
formData
=
new
FormData
();
formData
.
append
(
'type'
,
'chat'
);
formData
.
append
(
'image'
,
_this
[
0
].
files
[
0
]);
$
.
ajax
({
type
:
'post'
,
url
:
ServerHostImageLiu
+
'/index/uploadImg'
,
data
:
formData
,
dataType
:
'json'
,
contentType
:
false
,
cache
:
false
,
processData
:
false
,
beforeSend
:
function
()
{},
success
:
function
(
_data
)
{
if
(
_data
.
code
==
200
)
{
$
(
'#container_body_img_area2'
).
append
(
'<div class="result-beizhu"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del-beizhu">删除</span></div>'
.
stringFormatObj
({
'0'
:
_data
.
data
.
img_path
,
'1'
:
_data
.
data
.
internet_img_name
?
urlDeal
(
_data
.
data
.
internet_img_name
):
_data
.
data
.
internet_img_name
}));
}
else
{
alert
(
_data
.
msg
);
};
},
error
:
function
()
{
alert
(
'enter error'
);
},
complete
:
function
(
xhr
,
textStatus
)
{
if
(
textStatus
===
'timeout'
)
{
//处理超时的逻辑
alert
(
'请求超时,请重试'
);
};
}
});
});
//备注 图片删除
_doc
.
on
(
'click'
,
'.span-del-beizhu,.span-del'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
if
(
confirm
(
'确认删除吗?'
)){
_this
.
parent
().
remove
();
};
});
//图片删除
_doc
.
on
(
'click'
,
'.span-del2'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
// if(confirm('确认删除吗?')){
_this
.
parent
().
remove
();
that
.
spandelList
(
_this
.
prev
().
attr
(
'data-imgid'
));
// };
});
//编辑费用详情 点击保存
_doc
.
on
(
'click'
,
'.save_cost'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
that
.
saveCost
();
});
//保存图片
_doc
.
on
(
'click'
,
'.save_cost_pic'
,
function
(
e
)
{
var
_this
=
$
(
this
);
e
.
preventDefault
();
e
.
stopPropagation
();
that
.
saveCostPic
();
});
$
(
'.tit_con'
).
unbind
(
'click'
).
bind
(
'click'
,
function
(
e
){
$
(
this
).
parent
(
'div'
).
find
(
'h4.active'
).
removeClass
(
"active"
);
$
(
this
).
addClass
(
"active"
);
if
(
e
.
currentTarget
.
innerHTML
==
"费用图片"
){
$
(
'.pic-con1'
).
show
();
$
(
'.pic-con2'
).
hide
();
}
else
{
$
(
'.pic-con2'
).
show
();
$
(
'.pic-con1'
).
hide
();
}
});
},
//获取报销详情
getDetails
:
function
(
id
,
isSelf
)
{
$
.
ajax
({
url
:
"/index/getDetailCost"
,
type
:
'GET'
,
async
:
true
,
data
:
{
"id"
:
id
,
"is_self"
:
isSelf
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
//字段显示
cost
.
site_id
=
data
.
data
.
site_id
;
//站点
cost
.
store_id
=
data
.
data
.
store_id
;
//门店id
cost
.
office_id
=
data
.
data
.
office_id
;
//办公室id
$
(
'#cost_id'
).
html
(
data
.
data
.
id
);
$
(
'#tijiaoren'
).
html
(
data
.
data
.
agent_name
);
//提交人
$
(
'#tijiaotime'
).
html
(
data
.
data
.
create_time
);
$
(
'#total_fee'
).
val
(
data
.
data
.
total_fee
);
$
(
'#payType'
).
val
(
data
.
data
.
type
);
$
(
'#yongtu'
).
val
(
data
.
data
.
purpose
);
$
(
'#laiyuan'
).
html
(
data
.
data
.
source_name
);
$
(
'#zhuangtai'
).
html
(
data
.
data
.
status_name
);
$
(
'#card_name'
).
val
(
data
.
data
.
card_name
);
$
(
'#card_no'
).
val
(
data
.
data
.
card_no
);
$
(
'#bank'
).
val
(
data
.
data
.
bank
);
$
(
'#count_time'
).
val
(
data
.
data
.
count_time
);
$
(
'#kaoqin'
).
html
(
data
.
data
.
office_attendance_num
);
//考勤
//根据费用类型 显示费用项目
// 费用类型 1办公室成本 2上海总部成本 3分部成本 4同联发展基金 5门店单独成本。
if
(
data
.
data
.
type
==
1
){
//办公室
$
(
'.choose_office_add'
).
show
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'#payItem'
).
val
(
data
.
data
.
fee_item
);
//费用项目
}
else
if
(
data
.
data
.
type
==
2
){
//总部
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
show
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
hide
();
$
(
'#payItem'
).
val
(
data
.
data
.
fee_item
);
//费用项目
}
else
if
(
data
.
data
.
type
==
3
){
//分部
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
show
();
$
(
'.choose_store_add'
).
hide
();
$
(
'#payItem'
).
val
(
data
.
data
.
site_id
);
//费用项目
}
else
if
(
data
.
data
.
type
==
5
){
//门店
$
(
'.choose_office_add'
).
hide
();
$
(
'.choose_total_add'
).
hide
();
$
(
'.choose_siteID_add'
).
hide
();
$
(
'.choose_store_add'
).
show
();
$
(
'#payItem'
).
val
(
data
.
data
.
fee_item
);
//费用项目
};
//门店明细显示
var
temp
=
document
.
getElementById
(
'mingxi_template_tpl'
).
innerHTML
;
var
doTtmpl
=
doT
.
template
(
temp
);
$
(
"#mingxi_list"
).
html
(
doTtmpl
(
data
.
data
.
store_cost_data
));
//审核记录显示 费用报销
var
temp2
=
document
.
getElementById
(
'check_template_tpl'
).
innerHTML
;
var
doTtmpl2
=
doT
.
template
(
temp2
);
$
(
"#check_list"
).
html
(
doTtmpl2
(
data
.
data
.
check_log
));
//审核记录显示 门店明细
var
str1
=
''
;
var
str2
=
''
;
var
str3
=
''
;
var
str4
=
''
;
var
str5
=
''
;
// 审核类型, 1考勤审核 2社保审核 3手续费审核 4办公室房租+当月办公门店审核 5费用参数审核
$
.
each
(
data
.
data
,
function
(
i
,
item
)
{
if
(
data
.
data
[
i
].
type
==
1
){
str1
+=
data
.
data
[
i
].
operator_name
+
'、'
;
}
else
if
(
data
.
data
[
i
].
type
==
2
){
str2
+=
data
.
data
[
i
].
operator_name
+
'、'
;
}
else
if
(
data
.
data
[
i
].
type
==
3
){
str3
+=
data
.
data
[
i
].
operator_name
+
'、'
;
}
else
if
(
data
.
data
[
i
].
type
==
5
){
str4
+=
data
.
data
[
i
].
operator_name
+
'、'
;
}
else
if
(
data
.
data
[
i
].
type
==
4
){
str5
+=
data
.
data
[
i
].
operator_name
+
'、'
;
}
});
$
(
".kaoqin1"
).
html
(
str1
);
$
(
".kaoqin2"
).
html
(
str2
);
$
(
".kaoqin3"
).
html
(
str3
);
$
(
".kaoqin4"
).
html
(
str4
);
$
(
".kaoqin5"
).
html
(
str5
);
//审核图片显示
var
temp3
=
document
.
getElementById
(
'checkPic_template_tpl'
).
innerHTML
;
var
doTtmpl3
=
doT
.
template
(
temp3
);
$
(
"#checkPic_list"
).
html
(
doTtmpl3
(
data
.
data
.
images_data
));
//报销图片显示
$
(
'#container_body_img_area'
).
html
(
''
);
//每回先清空所有图片
if
(
data
.
data
.
images_data
){
for
(
i
=
0
;
i
<
data
.
data
.
images_data
.
length
;
i
++
)
{
if
(
data
.
data
.
images_data
[
i
].
img_type
==
1
){
$
(
'#container_body_img_area'
).
append
(
'<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}"/> <span class="span-del2">删除</span></div>'
.
stringFormatObj
({
'0'
:
data
.
data
.
images_data
[
i
].
id
,
'1'
:
ServerHostImageLiu
+
"/static/chat_image/"
+
data
.
data
.
images_data
[
i
].
img_name
}));
}
};
}
//处理审核 状态
if
(
data
.
data
.
status
==
0
){
//0申请中
cost
.
checkUrl
=
'/index/checkCostTwo/1'
}
else
if
(
data
.
data
.
status
==
1
){
//1总监通过
cost
.
checkUrl
=
'/index/checkCostThree/2'
}
else
if
(
data
.
data
.
status
==
2
){
//2一审通过
cost
.
checkUrl
=
'/index/checkCostFour/3'
}
else
if
(
data
.
data
.
status
==
3
){
//3二审通过
cost
.
checkUrl
=
'/index/checkCostFive/4'
}
//三审通过 隐藏保存 审核通过按钮
if
(
data
.
data
.
status
==
4
){
$
(
'.save_cost'
).
hide
();
$
(
'.save_cost_pic'
).
hide
();
$
(
'.pass_check'
).
hide
();
}
else
{
$
(
'.save_cost'
).
show
();
$
(
'.save_cost_pic'
).
show
();
$
(
'.pass_check'
).
show
();
}
//备注 图片上传
if
(
data
.
data
.
status
==
3
){
$
(
'.is_hide_pic'
).
show
();
}
else
{
$
(
'.is_hide_pic'
).
hide
();
}
//is_self == 1 隐藏 保存 审核按钮
if
(
cost
.
is_self
==
1
||
cost
.
main_index
==
5
){
$
(
'.is_hide_details'
).
hide
();
}
//区分明细详情 和 报销详情 字段显示
//费用类型 1办公室成本 2上海总部成本 3分部成本 4同联发展基金 5门店单独成本。
if
(
cost
.
is_self
==
1
){
//明细详情
if
(
data
.
data
.
type
==
1
){
//办公室
$
(
'.pic_jilu'
).
show
();
//转账图片
$
(
'.check_jilu'
).
show
();
//报销审核记录
$
(
'.detail_jilu'
).
hide
();
//明细审核记录
$
(
'.is_hide_kaoqin'
).
show
();
//考勤
$
(
'kaoqin_con'
).
html
(
'当月门店所在办公室考勤:'
);
$
(
'.is_hide_bank'
).
show
();
//收款账户
$
(
'.is_hide_costID'
).
show
();
//费用id
}
else
if
(
data
.
data
.
type
==
2
){
//上海总部
$
(
'.pic_jilu'
).
hide
();
//转账图片
$
(
'.check_jilu'
).
hide
();
//报销审核记录
$
(
'.detail_jilu'
).
show
();
//明细审核记录
$
(
'.is_hide_kaoqin'
).
show
();
//考勤
$
(
'kaoqin_con'
).
html
(
'当月公司考勤总人数:'
);
$
(
'.is_hide_bank'
).
hide
();
//收款账户
$
(
'.is_hide_costID'
).
hide
();
//费用id
}
else
if
(
data
.
data
.
type
==
3
){
//分部成本
$
(
'.pic_jilu'
).
hide
();
//转账图片
$
(
'.check_jilu'
).
hide
();
//报销审核记录
$
(
'.detail_jilu'
).
show
();
//明细审核记录
$
(
'.is_hide_kaoqin'
).
show
();
//考勤
$
(
'kaoqin_con'
).
html
(
'当月门店所在城市考勤:'
);
$
(
'.is_hide_bank'
).
hide
();
//收款账户
$
(
'.is_hide_costID'
).
hide
();
//费用id
}
else
if
(
data
.
data
.
type
==
4
){
//同联基金
$
(
'.pic_jilu'
).
hide
();
//转账图片
$
(
'.check_jilu'
).
hide
();
//报销审核记录
$
(
'.detail_jilu'
).
show
();
//明细审核记录
$
(
'.is_hide_kaoqin'
).
show
();
//考勤
$
(
'kaoqin_con'
).
html
(
'当月门店考勤人数:'
);
$
(
'.is_hide_bank'
).
hide
();
//收款账户
$
(
'.is_hide_costID'
).
hide
();
//费用id
}
else
if
(
data
.
data
.
type
==
5
){
//门店单独成本
$
(
'.pic_jilu'
).
show
();
//转账图片
$
(
'.check_jilu'
).
show
();
//报销审核记录
$
(
'.detail_jilu'
).
hide
();
//明细审核记录
$
(
'.is_hide_kaoqin'
).
hide
();
//考勤
$
(
'.is_hide_bank'
).
show
();
//收款账户
$
(
'.is_hide_costID'
).
show
();
//费用id
}
}
else
{
//报销详情
$
(
'.pic_jilu'
).
show
();
//转账图片
$
(
'.check_jilu'
).
show
();
//报销审核记录
$
(
'.detail_jilu'
).
hide
();
//明细审核记录
$
(
'.is_hide_bank'
).
show
();
//收款账户
$
(
'.is_hide_costID'
).
show
();
//费用id
if
(
data
.
data
.
type
==
1
){
$
(
'.is_hide_kaoqin'
).
show
();
//考勤
$
(
'kaoqin_con'
).
html
(
'当月门店所在办公室考勤:'
);
}
else
{
$
(
'.is_hide_kaoqin'
).
hide
();
//考勤
}
}
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//删除图片
spandelList
:
function
(
id
)
{
$
.
ajax
({
url
:
"/index/delStoreFeeImage"
,
type
:
'POST'
,
async
:
true
,
data
:
{
"id_string"
:
id
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
'删除成功'
);
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//保存新增图片
saveCostPic
:
function
(
id
)
{
params
=
{};
var
imgname
=
[];
//图片
for
(
var
i
=
0
;
i
<
$
(
'.result'
).
length
;
i
++
)
{
imgname
[
i
]
=
$
(
'.result>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
params
.
id
=
cost
.
id
;
params
.
img_arr
=
JSON
.
stringify
(
imgname
);
if
(
imgname
.
length
){
}
else
{
alert
(
'请上传图片'
);
return
;
}
$
.
ajax
({
url
:
"/index/addFeeImage"
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
data
.
msg
);
$
(
parent
.
document
).
find
(
'.close'
).
click
();
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//编辑费用详情
saveCost
:
function
(
id
)
{
var
params
=
{};
var
user_info_obj
=
JSON
.
parse
(
decodeURIComponent
(
localStorage
.
getItem
(
'pcUserInfo'
)));
//读取缓存
params
.
site_id
=
cost
.
site_id
;
if
(
$
(
'#payType'
).
val
()
==
3
){
params
.
site_id
=
$
(
'#payItem'
).
val
();
}
else
{
params
.
fee_item
=
$
(
'#payItem'
).
val
();
}
if
(
$
(
'#total_fee'
).
val
()){
params
.
total_fee
=
$
(
'#total_fee'
).
val
();
}
else
{
alert
(
'请选择费用总金额'
);
return
;
}
if
(
$
(
'#payType'
).
val
()){
params
.
type
=
$
(
'#payType'
).
val
();
}
else
{
alert
(
'请选择费用类型'
);
return
;
}
if
(
$
(
'#payItem'
).
val
()){
}
else
{
alert
(
'请选择费用项目'
);
return
;
}
if
(
$
(
'#count_time'
).
val
()){
params
.
count_time
=
$
(
'#count_time'
).
val
();
}
else
{
alert
(
'请选择计入月份'
);
return
;
}
params
.
card_name
=
$
(
'#card_name'
).
val
();
params
.
bank
=
$
(
'#bank'
).
val
();
params
.
card_no
=
$
(
'#card_no'
).
val
();
params
.
purpose
=
$
(
'#yongtu'
).
val
();
params
.
id
=
cost
.
id
;
params
.
agent_id
=
user_info_obj
.
id
;
params
.
store_id
=
cost
.
store_id
;
// params.office_id = cost.office_id;
$
.
ajax
({
url
:
"/index/editApplyFor"
,
type
:
'POST'
,
async
:
true
,
data
:
params
,
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
data
.
msg
);
$
(
parent
.
document
).
find
(
'.close'
).
click
();
$
(
parent
.
document
).
find
(
'#search_moni'
).
click
();
}
else
{
alert
(
data
.
msg
);
}
}
});
},
//报销审核通过
checkCost
:
function
()
{
var
imgname
=
[];
//图片
for
(
var
i
=
0
;
i
<
$
(
'.result-beizhu'
).
length
;
i
++
)
{
imgname
[
i
]
=
$
(
'.result-beizhu>img'
).
eq
(
i
).
attr
(
'data-imgname'
);
};
$
.
ajax
({
url
:
cost
.
checkUrl
,
type
:
'POST'
,
async
:
true
,
data
:
{
"id"
:
cost
.
id
,
"remark"
:
$
(
'#pass_beizhu'
).
val
(),
"img_name"
:
JSON
.
stringify
(
imgname
),
},
dataType
:
'json'
,
success
:
function
(
data
)
{
if
(
data
.
code
==
200
)
{
alert
(
data
.
msg
);
$
(
parent
.
document
).
find
(
'.close'
).
click
();
$
(
parent
.
document
).
find
(
'#search_moni'
).
click
();
}
else
{
alert
(
data
.
msg
);
}
}
});
},
};
return
cost
;
});
\ No newline at end of file
public/resource/template/accountingTable_list_template_tpl.html
View file @
4c61d167
...
...
@@ -5,7 +5,11 @@
<
tr
>
<
td
>
[
%=
countTime
()
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'apply_for_id'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'apply_for_id'
]
!=
0
)
{
%
]
[
%=
it
[
item
][
'apply_for_id'
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'apply_for_time'
]
%
]
<
/td
>
<
td
>
[
%=
switchFeeType
(
it
[
item
][
'type'
])
%
]
<
/td
>
<
td
>
[
%=
switchFeeItem
(
it
[
item
][
'fee_item'
])
%
]
<
/td
>
...
...
@@ -109,7 +113,11 @@
<
tr
>
<
td
>
[
%=
countTime
()
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'id'
]
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'apply_for_id'
]
%
]
<
/td
>
<
td
>
[
%
if
(
it
[
item
][
'apply_for_id'
]
!=
0
)
{
%
]
[
%=
it
[
item
][
'apply_for_id'
]
%
]
[
%
}
%
]
<
/td
>
<
td
>
[
%=
it
[
item
][
'apply_for_time'
]
%
]
<
/td
>
<
td
>
[
%=
switchFeeType
(
it
[
item
][
'type'
])
%
]
<
/td
>
<
td
>
[
%=
switchFeeItem
(
it
[
item
][
'fee_item'
])
%
]
<
/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