Commit 57ce75b9 authored by agping's avatar agping

1

parent 72b9252e
...@@ -26,6 +26,15 @@ ...@@ -26,6 +26,15 @@
width:100%; width:100%;
line-height: 30px; line-height: 30px;
} }
.user-ul-office,.user-ul-store{
float: right;
position: relative;
overflow-y:scroll ;
height:100px;
left: 8px;
width:100%;
line-height: 30px;
}
.user-ul li,.user-ul-office li,.user-ul-store li{ .user-ul li,.user-ul-office li,.user-ul-store li{
list-style: none; list-style: none;
line-height: 20px; line-height: 20px;
...@@ -247,7 +256,7 @@ ...@@ -247,7 +256,7 @@
<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">
<select class="form-control left-width" id="cost_type_add"> <select class="form-control left-width" id="cost_type_add">
<option value="">费用类型</option> <option value="-1">费用类型</option>
<option value="0">办公室成本</option> <option value="0">办公室成本</option>
<option value="1">总部成本</option> <option value="1">总部成本</option>
<option value="2">分部成本</option> <option value="2">分部成本</option>
...@@ -265,7 +274,7 @@ ...@@ -265,7 +274,7 @@
<option value="101" class="choose_office_add">水电费</option> <option value="101" class="choose_office_add">水电费</option>
<option value="102" class="choose_office_add">其他费用</option> <option value="102" class="choose_office_add">其他费用</option>
<!--总部成本类型--> <!--总部成本类型-->
<option value="102" class="choose_total_add">其他费用</option> <option value="202" class="choose_total_add">其他费用</option>
<!--分部成本类型--> <!--分部成本类型-->
<option value="10002" class="choose_siteID_add">杭州</option> <option value="10002" class="choose_siteID_add">杭州</option>
...@@ -387,7 +396,7 @@ ...@@ -387,7 +396,7 @@
</div> </div>
<!-- 费用详情审核 编辑 --> <!-- 费用详情审核 编辑 -->
<div class="modal fade" id="modal-addPic" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="modal-addPic" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog modal-body-width-du" style="width: 920px;"> <div class="modal-dialog modal-body-width-du" style="width: 900px;">
<div class="modal-content"> <div class="modal-content">
<iframe src="" frameborder="0" class="publicCostDetails" style="width: 900px;height: 680px;"></iframe> <iframe src="" frameborder="0" class="publicCostDetails" style="width: 900px;height: 680px;"></iframe>
</div> </div>
......
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
#container_body_img_area>div, #container_body_img_area>div,
#container_body_img_area2>div { #container_body_img_area2>div {
float: left; float: left;
width: 216px; width: 140px;
} }
.active { .active {
...@@ -36,25 +36,14 @@ ...@@ -36,25 +36,14 @@
ul { ul {
-webkit-padding-start: 0px !important; -webkit-padding-start: 0px !important;
} }
.img-pre-ul>li {
list-style: no;
float: left;
width: 210px;
height: 170px;
overflow: hidden;
margin-right: 10px;
margin-top: 10px;
}
.hide { .hide {
display: none !important; display: none !important;
} }
.result>img, .result>img,
.result2>img { .result2>img,
width: 120px; .result-beizhu>img {
height: 120px; width: 80px;
height: 80px;
margin-top: 8px; margin-top: 8px;
} }
...@@ -64,7 +53,8 @@ ...@@ -64,7 +53,8 @@
} }
.span-del2, .span-del2,
.span-del { .span-del,
.span-del-beizhu {
color: red; color: red;
} }
/*控制放大镜的 收款图片显示*/ /*控制放大镜的 收款图片显示*/
...@@ -84,6 +74,10 @@ ...@@ -84,6 +74,10 @@
input { input {
width: 50%; width: 50%;
} }
.modal-backdrop {
opacity: 0 !important;
filter: alpha(opacity=0) !important;
}
</style> </style>
<div id="page-content-wrapper" style="width: 900px;height: 680px;"> <div id="page-content-wrapper" style="width: 900px;height: 680px;">
<div class="container"> <div class="container">
...@@ -92,8 +86,8 @@ ...@@ -92,8 +86,8 @@
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-body" style="overflow:hidden;"> <div class="panel-body" style="overflow:hidden;">
<div class="" id="modal-addPic" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false"> <div class="" id="modal-addPic" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="false">
<div class="modal-body-width-du" style="width: 850px;"> <div>
<div class=""> <div>
<div class="modal-header"> <div class="modal-header">
<h4 class="modal-title tit_con active shoukuanxiangqing" style="width:auto!important;float:left">费用详情</h4> <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> <h4 class="modal-title tit_con" style="width:auto!important;float:left;margin-left:20px;">费用图片</h4>
...@@ -102,22 +96,18 @@ ...@@ -102,22 +96,18 @@
<ul class="list-group "> <ul class="list-group ">
<li class="list-group-item"> <li class="list-group-item">
<div class="form-group full-width-100 full-pic-area"> <div class="form-group full-width-100 full-pic-area">
<div id="container_body_du"> <div id="container_body_du" style="height: 420px;">
<button type="button btn2" class="btn btn-default">上传图片</button> <button type="button btn2" class="btn btn-default">上传图片</button>
<input type="file" id="file_input_pic" /> <input type="file" id="file_input_pic" />
<div id="container_body_img_area_du"></div> <div id="container_body_img_area"></div>
</div> </div>
</div> </div>
<ul class="img-pre-ul" id="xiangqing_pic_ul">
</ul>
</li> </li>
</ul> </ul>
</div> </div>
<div class="modal-footer pic-con1"> <div class="modal-footer pic-con1">
<button type="button btn2" class="btn btn-primary" id="saveBtn" data-dismiss="modal"> <button type="button btn2" class="btn btn-primary save_cost" id="" data-dismiss="modal">保存</button>
保存
</button>
</div> </div>
<div class="modal-body modal-body-height pic-con2" style="overflow: hidden;"> <div class="modal-body modal-body-height pic-con2" style="overflow: hidden;">
<form class=""> <form class="">
...@@ -125,13 +115,13 @@ ...@@ -125,13 +115,13 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">费用总ID:</span></strong> <strong><span class="col-xs-4 ld-Marheight">费用总ID:</span></strong>
<span id="tijiaoren" class="col-xs-6 ld-Marheight">45122</span> <span id="cost_id" class="col-xs-6 ld-Marheight"></span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">提交人:</span></strong> <strong><span class="col-xs-4 ld-Marheight">提交人:</span></strong>
<span id="address" class="col-xs-6 ld-Marheight">周晓明</span> <span id="tijiaoren" class="col-xs-6 ld-Marheight"></span>
</div> </div>
</div> </div>
</div> </div>
...@@ -139,13 +129,13 @@ ...@@ -139,13 +129,13 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">提交时间:</span></strong> <strong><span class="col-xs-4 ld-Marheight">提交时间:</span></strong>
<span id="tijiaoren" class="col-xs-6 ld-Marheight">2018.12.12 10:00:00</span> <span id="tijiaotime" class="col-xs-6 ld-Marheight">2018.12.12 10:00:00</span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">费用总金额:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">费用总金额:</span></strong>
<span id="address" class="col-xs-6 ld-Marheight"><input class="form-control" type="text" value="" id="shouxu"></span> <span id="" class="col-xs-6 ld-Marheight"><input class="form-control" type="text" value="" id="total_fee"></span>
</div> </div>
</div> </div>
</div> </div>
...@@ -154,22 +144,44 @@ ...@@ -154,22 +144,44 @@
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">费用类型:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">费用类型:</span></strong>
<span id="tijiaoren" class="col-xs-6 ld-Marheight"> <span id="tijiaoren" class="col-xs-6 ld-Marheight">
<select class="form-control" id="payType"> <select class="form-control" id="payType">
<option value="10" class="shanghai">施总支付宝</option> <option value="">费用类型</option>
<option value="11" class="shanghai">林老师支付宝</option> <option value="0">办公室成本</option>
</select> <option value="1">总部成本</option>
</span> <option value="2">分部成本</option>
<option value="3">门店独有成本</option>
</select>
</span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">费用项目:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">费用项目:</span></strong>
<span id="address" class="col-xs-6 ld-Marheight"> <span id="address" class="col-xs-6 ld-Marheight">
<select class="form-control" id="payType"> <select class="form-control" id="payItem">
<option value="10" class="shanghai">施总支付宝</option> <option value="">费用项目</option>
<option value="11" class="shanghai">林老师支付宝</option> <!--办公室类型-->
</select> <option value="101" class="choose_office_add">水电费</option>
</span> <option value="102" class="choose_office_add">其他费用</option>
<!--总部成本类型-->
<option value="102" 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>
</select>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -178,16 +190,15 @@ ...@@ -178,16 +190,15 @@
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">费用用途:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">费用用途:</span></strong>
<span id="tijiaoren" class="col-xs-6 ld-Marheight"> <span id="tijiaoren" class="col-xs-6 ld-Marheight">
<input class="form-control" type="text" value="" id="shouxu"> <input class="form-control" type="text" value="" id="yongtu">
</span> </span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">来源:</span></strong> <strong><span class="col-xs-4 ld-Marheight">来源:</span></strong>
<span id="address" class="col-xs-6 ld-Marheight"> <span id="laiyuan" class="col-xs-6 ld-Marheight">
app </span>
</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -195,17 +206,17 @@ ...@@ -195,17 +206,17 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">状态:</span></strong> <strong><span class="col-xs-4 ld-Marheight">状态:</span></strong>
<span id="tijiaoren" class="col-xs-6 ld-Marheight"> <span id="zhuangtai" class="col-xs-6 ld-Marheight">
666
</span> </span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">转账卡号:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">转账卡号:</span></strong>
<span id="address" class="col-xs-6 ld-Marheight"> <span id="" class="col-xs-6 ld-Marheight">
<input class="form-control" type="text" value="" id="shouxu"> <input class="form-control" type="text" value="" id="card_no">
</span> </span>
</div> </div>
</div> </div>
</div> </div>
...@@ -213,17 +224,17 @@ ...@@ -213,17 +224,17 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">收款卡户名:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">收款卡户名:</span></strong>
<span id="tijiaoren" class="col-xs-6 ld-Marheight"> <span id="" class="col-xs-6 ld-Marheight">
<input class="form-control" type="text" value="" id="shouxu"> <input class="form-control" type="text" value="" id="card_name">
</span> </span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">收款卡开户行:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">收款卡开户行:</span></strong>
<span id="address" class="col-xs-6 ld-Marheight"> <span id="" class="col-xs-6 ld-Marheight">
<input class="form-control" type="text" value="" id="shouxu"> <input class="form-control" type="text" value="" id="bank">
</span> </span>
</div> </div>
</div> </div>
</div> </div>
...@@ -231,57 +242,44 @@ ...@@ -231,57 +242,44 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight top-5">计入月份:</span></strong> <strong><span class="col-xs-4 ld-Marheight top-5">计入月份:</span></strong>
<span id="tijiaoren" class="col-xs-6 ld-Marheight"> <span id="" class="col-xs-6 ld-Marheight">
<input class="form-control" type="text" value="" id="shouxu"> <input id="count_time" class="form-control" type="text" placeholder="请选择" onclick="WdatePicker({el:this,dateFmt:'yyyy-MM',readOnly:'readonly' })">
</span> </span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">7月门店所在办公室考勤:</span></strong> <strong><span class="col-xs-4 ld-Marheight">7月门店所在办公室考勤:</span></strong>
<span id="address" class="col-xs-6 ld-Marheight"> <span id="kaoqin" class="col-xs-6 ld-Marheight">
666 10
</span> </span>
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-12" style="padding: 0 30px;"> <div class="col-xs-12" style="padding: 0 30px;">
成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元 <p style="font-size: 16px;font-weight: 600;">成本明细</p>
<br /> 成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元 <div class="">
<p>审核记录:</p> <table class="table">
<p>刘丹丹 2018.12.12 10:00:00</p> <tbody class="text-left" id="mingxi_list">
<p>刘丹丹 2018.12.12 10:00:00</p>
成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元 </tbody>
<br /> 成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元 </table>
<p>审核记录:</p> </div>
<p>刘丹丹 2018.12.12 10:00:00</p> <p style="font-size: 16px;font-weight: 600;">审核记录</p>
<p>刘丹丹 2018.12.12 10:00:00</p> <div class="">
成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元 <table class="table">
<br /> 成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元 <tbody class="text-left" id="check_list">
<p>审核记录:</p>
<p>刘丹丹 2018.12.12 10:00:00</p> </tbody>
<p>刘丹丹 2018.12.12 10:00:00</p> </table>
成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元 </div>
<br /> 成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元
<p>审核记录:</p>
<p>刘丹丹 2018.12.12 10:00:00</p>
<p>刘丹丹 2018.12.12 10:00:00</p>
成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元
<br /> 成本明细ID:2745 费用承担门店:南京东路店(5人) 费用承担金额:120元
<p>审核记录:</p>
<p>刘丹丹 2018.12.12 10:00:00</p>
<p>刘丹丹 2018.12.12 10:00:00</p>
</div> </div>
</form> </form>
</div> </div>
<div class="modal-footer pic-con2"> <div class="modal-footer pic-con2">
<button type="button btn2" class="btn btn-primary" id="save_cost" data-dismiss="modal"> <button type="button btn2" class="btn btn-primary save_cost" id="" data-dismiss="modal">保存</button>
保存 <button type="button" class="btn btn-primary pass_check" href="#modal_pass" data-toggle="modal" style="">审核通过</button>
</button>
<button type="button btn2" class="btn btn-primary" id="pass_check" data-dismiss="modal">
审核通过
</button>
</div> </div>
</div> </div>
<!-- /.modal-content --> <!-- /.modal-content -->
...@@ -295,4 +293,42 @@ ...@@ -295,4 +293,42 @@
</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>
<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> </div>
\ No newline at end of file
...@@ -9,6 +9,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -9,6 +9,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
checkUrl: '',//审核url checkUrl: '',//审核url
agent_id_phone:'', agent_id_phone:'',
agent_id_office:'', agent_id_office:'',
agent_site_office:'',
main_index:0, main_index:0,
init: function() { init: function() {
...@@ -213,6 +214,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -213,6 +214,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$(document).on("input", "#comit_office", function() { $(document).on("input", "#comit_office", function() {
if($("#comit_office").val() == '') { if($("#comit_office").val() == '') {
that.agent_id_office=''; that.agent_id_office='';
that.agent_site_office='';
$(".user-ul-office").html(''); $(".user-ul-office").html('');
} else { } else {
that.search_office(); that.search_office();
...@@ -225,6 +228,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -225,6 +228,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$(document).on("input", "#comit_store", function() { $(document).on("input", "#comit_store", function() {
if($("#comit_name_store").val() == '') { if($("#comit_name_store").val() == '') {
that.agent_id_store=''; that.agent_id_store='';
that.agent_site_office='';
$(".user-ul-store").html(''); $(".user-ul-store").html('');
} else { } else {
that.search_store(); that.search_store();
...@@ -269,9 +274,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -269,9 +274,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
} }
}); });
}); });
$(document).on('click','.add-pic',function(e){ $(document).on('click','.checkCost',function(e){//点击审核按钮 调整审核页面
var id = e.target.dataset.id; var id = e.target.dataset.id;
$(".publicCostDetails").attr('src','/index/publicCostDetails?cost_id='+ id + '&cost_status=' + cost.main_index) $(".publicCostDetails").attr('src','/index/publicCostDetails?cost_id='+ id + '&is_self=0')
}); });
}, },
...@@ -338,13 +343,13 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -338,13 +343,13 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
var user_ul = ""; var user_ul = "";
if(data.data.list){ if(data.data.list){
$.each(data.data.list, function(i, item) { $.each(data.data.list, function(i, item) {
user_ul += '<li class="addphoneOffice" data-id="' + item.id + '">' + item.office_address + ';-ID:' + item.id + '</li>'; user_ul += '<li class="addphoneOffice" data-site="' + item.site_id + '" data-id="' + item.id + '">' + item.office_address + ';-ID:' + item.id + '</li>';
}); });
} }
$(".user-ul-office").html(user_ul); $(".user-ul-office").html(user_ul);
$(".user-ul-office").show(); $(".user-ul-office").show();
} else { } else {
alert(data.msg); // alert(data.msg);
} }
} }
...@@ -352,37 +357,23 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -352,37 +357,23 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
}, },
search_store: function() { //搜索门店 search_store: function() { //搜索门店
$.ajax({ $.ajax({
url: '/index/getOfficeList', url: '/index/getStoreOffice',
type: 'POST', type: 'GET',
async: true, async: true,
data: { data: {
"pageNo": 1, "store_name": $("#comit_store").val(),
"pageSize": 100,
"pageNo": $("#comit_name_office").val(),
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
var user_ul = ""; var user_ul = "";
$.each(data.data, function(i, item) { $.each(data.data, function(i, item) {
if(item.status == 0 || item.status == 4){ user_ul += '<li class="addphoneStore" data-site="' + item.site_id + '" data-id="' + item.id + '">' + item.store_name + ';-ID:' + item.id + '</li>';
var status=' ';
};
if(item.status == 1){
var status='-长假';
};
if(item.status == 2){
var status='-离职';
};
if(item.status == 3){
var status='-转勤';
}
user_ul += '<li class="addphone" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + status + '</li>';
}); });
$(".user-ul").html(user_ul); $(".user-ul-store").html(user_ul);
$(".user-ul").show(); $(".user-ul-store").show();
} else { } else {
alert(data.msg); // alert(data.msg);
} }
} }
...@@ -396,6 +387,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -396,6 +387,8 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$(".user-ul-office").html(''); $(".user-ul-office").html('');
$(".user-ul-office").hide(); $(".user-ul-office").hide();
that.agent_id_office = $(obj).attr("data-id"); that.agent_id_office = $(obj).attr("data-id");
that.agent_site_office = $(obj).attr("data-site");
}, },
//将li里的值 赋给input(门店) //将li里的值 赋给input(门店)
addphoneStore: function(obj) {//新增客户 input赋值 addphoneStore: function(obj) {//新增客户 input赋值
...@@ -404,7 +397,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -404,7 +397,9 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$("#comit_store").val(user_ht); $("#comit_store").val(user_ht);
$(".user-ul-store").html(''); $(".user-ul-store").html('');
$(".user-ul-store").hide(); $(".user-ul-store").hide();
that.agent_id_phone = $(obj).attr("data-id"); that.agent_id_store = $(obj).attr("data-id");
that.agent_site_office = $(obj).attr("data-site");
}, },
getDistrict: function(fn) { getDistrict: function(fn) {
$.ajax({ $.ajax({
...@@ -468,22 +463,49 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -468,22 +463,49 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
//新增报销 //新增报销
addCost: function() { addCost: function() {
var params = {}; var params = {};
//默认 办公室 门店 id=0
params.store_id = 0;
params.office_id = 0;
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存 var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
//费用项目 切换
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();
} }
//门店 办公室 传递参数
if($('#cost_type_add').val() == 0){//办公室
if($('#comit_office').val()){
params.office_id = cost.agent_id_office;
params.site_id = cost.agent_site_office;//办公室所在城市
}else{
alert("请选择办公室地址")
}
}else if($('#cost_type_add').val() == 3){//门店
if($('#comit_store').val()){
params.store_id = cost.agent_id_store;
params.site_id = cost.agent_site_office;//门店所在城市
}else{
alert("请选择门店")
}
}else if($('#cost_type_add').val() == 1){//总部
params.site_id = 10001;//默认上海
}
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.join(',');
params.img_arr = imgname; params.img_arr = JSON.stringify(imgname);
if($('#total_fee').val()){ if($('#total_fee').val()){
params.total_fee = $('#total_fee').val(); params.total_fee = $('#total_fee').val();
...@@ -491,7 +513,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -491,7 +513,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
alert('请选择费用总金额'); alert('请选择费用总金额');
return; return;
} }
if($('#cost_type_add').val()){ if($('#cost_type_add').val() != -1){
params.type = $('#cost_type_add').val(); params.type = $('#cost_type_add').val();
}else{ }else{
alert('请选择费用类型'); alert('请选择费用类型');
...@@ -503,7 +525,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -503,7 +525,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
return; return;
} }
if($('#count_time_add').val()){ if($('#count_time_add').val()){
params.count_time = $('#count_time_add').val(); params.count_time = $('#count_time_add').val()+'-01';
}else{ }else{
alert('请选择计入月份'); alert('请选择计入月份');
return; return;
...@@ -513,10 +535,12 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -513,10 +535,12 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
alert('请选择图片'); alert('请选择图片');
return; return;
} }
params.card_name = $('#card_name_cost').val(); params.card_name = $('#card_name_cost').val();
params.bank = $('#bank_cost').val(); params.bank = $('#bank_cost').val();
params.card_no = $('#card_no_cost').val(); params.card_no = $('#card_no_cost').val();
params.purpose = $('#yongtu').val(); params.purpose = $('#yongtu').val();
params.agent_id = user_info_obj.id;
$.ajax({ $.ajax({
url: '/index/addApplyFor', url: '/index/addApplyFor',
...@@ -526,7 +550,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -526,7 +550,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
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('提交成功');
$(".modal").modal('hide');//新增成功 关闭弹窗 $(".modal").modal('hide');//新增成功 关闭弹窗
cost.getList(cost.pageNo);//重新获取列表 cost.getList(cost.pageNo);//重新获取列表
} else { } else {
...@@ -549,17 +573,6 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -549,17 +573,6 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
var temp = document.getElementById('cost_check_template_tpl').innerHTML; var temp = document.getElementById('cost_check_template_tpl').innerHTML;
var doTtmpl = doT.template(temp); var doTtmpl = doT.template(temp);
$("#order_list").html(doTtmpl(data.data.list)); $("#order_list").html(doTtmpl(data.data.list));
//列表 按钮显示隐藏
if(cost.url == '/index/getCostList'){//全部
$('.add-pic').hide();
$('.is_del').hide();
}else if(cost.url == '/index/getCostListFive/4'){//三审
$('.add-pic').show();
$('.is_del').hide();
}else{
$('.add-pic').show();
$('.is_del').show();
}
/*分页代码*/ /*分页代码*/
add_page(data.data.total, no, that.pageSize, that.getList); add_page(data.data.total, no, that.pageSize, that.getList);
} else { } else {
...@@ -588,6 +601,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -588,6 +601,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$('#comit_office').val(""); $('#comit_office').val("");
that.agent_id_office=""; that.agent_id_office="";
that.agent_id_store=""; that.agent_id_store="";
that.agent_site_office="";
}, },
//重置搜索条件 //重置搜索条件
......
...@@ -343,6 +343,8 @@ function switchFeeItem(str){ ...@@ -343,6 +343,8 @@ function switchFeeItem(str){
return '其他费用'; return '其他费用';
case '201': case '201':
return '总部固定成本'; return '总部固定成本';
case '202':
return '其他费用';
case '301': case '301':
return '分部固定成本'; return '分部固定成本';
case '401': case '401':
......
...@@ -9,45 +9,52 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -9,45 +9,52 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
cost.getList(1);
cost.event(); cost.event();
}, },
event: function() { event: function() {
var that = cost; var that = cost;
var _doc = $(document); var _doc = $(document);
//从连接拿数据 //从连接拿报销id
cost.id = getUrlParam('cost_id'); cost.id = getUrlParam('cost_id');
var status = getUrlParam('cost_status'); cost.is_self = getUrlParam('is_self');
if(status == 4){ cost.getDetails(cost.id , cost.is_self);//获取详情
cost.checkUrl = '/index/checkCostTwo/1'
}else if(status == 0){
cost.checkUrl = '/index/checkCostThree/2'
}else if(status == 1){
cost.checkUrl = '/index/checkCostFour/3'
}else if(status == 2){
cost.checkUrl = '/index/checkCostFive/4'
}
//初始化 //初始化
$('.pic-con2').show(); $('.pic-con2').show();
$('.pic-con1').hide(); $('.pic-con1').hide();
//搜索
$(document).on('click','#search',function(e){
that.getList(1);
});
//重置搜索条件
$(document).on('click','#reset',function(e){
that.resetAll();
});
//导出报表
$(document).on('click','#export',function(e){
that.exportExcel();
});
//审核通过 //审核通过
$(document).on('click','#pass_check',function(e){ $(document).on('click','#pass_ok_btn',function(e){
that.checkCost(); that.checkCost();
}); });
//新增报销 上传图片 //编辑 费用类型切换
$("#cost_type_add").change(function() {
$("#fee_item_add").val('');//置空费用项目
if($('#cost_type_add').val() == 0 ){//办公室
$('.choose_office_add').show();
$('.choose_total_add').hide();
$('.choose_siteID_add').hide();
$('.choose_store_add').hide();
}else if($('#cost_type_add').val() == 1 ){//总部
$('.choose_office_add').hide();
$('.choose_total_add').show();
$('.choose_siteID_add').hide();
$('.choose_store_add').hide();
}else if($('#cost_type_add').val() == 2 ){//分部
$('.choose_office_add').hide();
$('.choose_total_add').hide();
$('.choose_siteID_add').show();
$('.choose_store_add').hide();
}else if($('#cost_type_add').val() == 3 ){//门店
$('.choose_office_add').hide();
$('.choose_total_add').hide();
$('.choose_siteID_add').hide();
$('.choose_store_add').show();
};
});
//编辑报销 上传图片
$('#file_input_pic').on('change', function(){ $('#file_input_pic').on('change', function(){
var _this = $(this); var _this = $(this);
var formData = new FormData(); var formData = new FormData();
...@@ -83,7 +90,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -83,7 +90,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
} }
}); });
}); });
//新增报销 上传图片 //备注 上传图片
$('#file_input_pic2').on('change', function(){ $('#file_input_pic2').on('change', function(){
var _this = $(this); var _this = $(this);
var formData = new FormData(); var formData = new FormData();
...@@ -100,7 +107,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -100,7 +107,7 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
beforeSend: function() {}, beforeSend: function() {},
success: function(_data) { success: function(_data) {
if(_data.code == 200) { if(_data.code == 200) {
$('#container_body_img_area2').append('<div class="result"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del">删除</span></div>'.stringFormatObj({ $('#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, '0': _data.data.img_path,
'1': _data.data.internet_img_name?urlDeal(_data.data.internet_img_name):_data.data.internet_img_name '1': _data.data.internet_img_name?urlDeal(_data.data.internet_img_name):_data.data.internet_img_name
})); }));
...@@ -119,6 +126,34 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -119,6 +126,34 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
} }
}); });
}); });
//备注 图片删除
_doc.on('click', '.span-del-beizhu', function(e) {
var _this = $(this);
e.preventDefault();
e.stopPropagation();
if(confirm('确认删除吗?')){
_this.parent().remove();
};
});
//图片删除
_doc.on('click', '.span-del3', 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();
});
$('.tit_con').unbind('click').bind('click',function(e){ $('.tit_con').unbind('click').bind('click',function(e){
$(this).parent('div').find('h4.active').removeClass("active"); $(this).parent('div').find('h4.active').removeClass("active");
$(this).addClass("active"); $(this).addClass("active");
...@@ -130,33 +165,105 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -130,33 +165,105 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
$('.pic-con1').hide(); $('.pic-con1').hide();
} }
}); });
$(document).on('click','.add-pic',function(e){
var id = e.target.dataset.id;
});
_doc.on('click','.choose_btn',function(e){
var befor = that.check_status
$(this).removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
if ( befor != e.target.dataset.value) {
that.check_status = e.target.dataset.value;
cost.getList(1);
}
})
}, },
//审核通过 //获取报销详情
checkCost: function() { getDetails: function(id,isSelf) {
$.ajax({ $.ajax({
url: cost.checkUrl, url: "/index/getDetailCost",
type: 'POST', type: 'GET',
async: true, async: true,
data: { data: {
"id": cost.id "id": id,
"is_self": isSelf
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
cost.getList(cost.pageNo); //字段显示
alert(data.msg); $('#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);//考勤
//根据费用类型 显示费用项目
if(data.data.type == 0 ){//办公室
$('.choose_office_add').show();
$('.choose_total_add').hide();
$('.choose_siteID_add').hide();
$('.choose_store_add').hide();
}else if(data.data.type == 1 ){//总部
$('.choose_office_add').hide();
$('.choose_total_add').show();
$('.choose_siteID_add').hide();
$('.choose_store_add').hide();
}else if(data.data.type == 2 ){//分部
$('.choose_office_add').hide();
$('.choose_total_add').hide();
$('.choose_siteID_add').show();
$('.choose_store_add').hide();
}else if(data.data.type == 3 ){//门店
$('.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));
//显示图片
$('#container_body_img_area').html('');//每回先清空所有图片
if(data.data.images_data){
for(i = 0; i < data.data.images_data.length; i++) {
$('#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();
$('.pass_check').hide();
}else{
$('.save_cost').show();
$('.pass_check').show();
}
} else { } else {
alert(data.msg); alert(data.msg);
} }
...@@ -164,166 +271,117 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', ' ...@@ -164,166 +271,117 @@ define(['doT', 'text!temp/cost_check_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
//获取列表 //删除图片
getList : function(no){ spandelList: function(id) {
var that = cost; $.ajax({
that.pageNo = no; url: "/index/delStoreFeeImage",
var params = that.buildSearchParams(0); type: 'POST',
params.pageNo = that.pageNo; async: true,
params.pageSize = that.pageSize ; data: {
$.get('/index/refundList',params,function(data){ "id_string": id
if(typeof data === 'object') { },
dataType: 'json',
success: function(data) {
if(data.code == 200) { if(data.code == 200) {
that.listData = data.data.list; alert(data.msg);
var temp = document.getElementById('cost_check_template_tpl').innerHTML;
var doTtmpl = doT.template(temp);
$("#order_list").html(doTtmpl(data.data.list));
$('#money_total').text((data.data.total_money-0 > 0) ? (data.data.total_money+"元"): "0元" )
/*分页代码*/
add_page(data.data.total, no, that.pageSize, that.getList);
} else { } else {
alert(data['msg']); alert(data.msg);
}; }
} else {
alert('数据错误'); }
}; });
},'json');
},
/**
* 重置查询条件
*/
resetAll : function(){
var that = cost;
$('#comit_time_start').val("");
$('#comit_time_end').val("");
$('#into_time_start').val("");
$('#into_time_end').val("");
$('#changed_type').val("");
$('#changed_id').val("");
$('#back_id').val("");
$('#get_id').val("");
$('#shoped_id').val("");
$('#shoped_addr').val("");
$('#commit_home').val("");
$('#commit_shop').val("");
$('#comit_name').val("");
$('#comit_phone').val("");
$('#is_type').val("");
$('#is_open').val("-1");
$('#back_id_money').val("");
that.agent_id_phone="";
},
//退款 审核
exportExcel: function() {
var _url = '/index/costListExcel?';
window.open(_url + cost.buildSearchParams(1));
}, },
/** //编辑费用详情
* 获取查询参数 saveCost: function(id) {
*/
buildSearchParams : function(is_excel){
var that = cost;
var commite_time_start = $('#comit_time_start').val();
var commite_time_end = $('#comit_time_end').val();
var into_time_start = $('#into_time_start').val();
var into_time_end = $('#into_time_end').val();
var changed_type = $('#changed_type').val();
var changed_id = $('#changed_id').val();
var back_id_money = $('#back_id_money').val();
var shoped_id = $('#shoped_id').val();
var shoped_addr = $('#shoped_addr').val();
var commit_home = $('#commit_home').val();
var commit_shop = $('#commit_shop').val();
var comit_name = that.agent_id_phone;//$('#comit_name').val();
var comit_phone = $('#comit_phone').val();
// var choose_type = $('.btn-group').find('.btn-info').html();
var is_selt = $('#is_type').val();
var get_id = $('#get_id').val();
var is_open = $('#is_open').val();
var params = {}; var params = {};
var paramsStr = "" ; var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
if ( get_id) { if($('#cost_type_add').val() == 2){
params.pay_log_id = get_id ; params.site_id = $('#fee_item_add').val();
paramsStr += "pay_log_id=" + get_id +'&'; }else{
} params.fee_item = $('#fee_item_add').val();
if ( commite_time_start ) {
params.start_time = commite_time_start;
paramsStr += "start_time=" + commite_time_start +'&';
}
if ( commite_time_end ) {
params.end_time = commite_time_end;
paramsStr += "end_time=" + commite_time_end +'&';
}
if ( into_time_start ) {
params.income_start_time = into_time_start;
paramsStr += "income_start_time=" + into_time_start +'&';
}
if ( into_time_end ) {
params.income_end_time = into_time_end;
paramsStr += "income_end_time=" + into_time_end +'&';
}
if ( changed_type ) {
params.type = changed_type;
paramsStr += "type=" + changed_type +'&';
}
if ( changed_id ) {
params.order_id = changed_id;
paramsStr += "order_id=" + changed_id +'&';
}
if ( back_id_money ) {
params.id = back_id_money;
paramsStr += "id=" + back_id_money +'&';
}
if ( shoped_id ) {
params.house_id = shoped_id;
paramsStr += "house_id=" + shoped_id +'&';
}
if ( shoped_addr) {
params.address = shoped_addr;
paramsStr += "address=" + shoped_addr +'&';
}
if ( commit_home ) {
params.district_id = commit_home;
paramsStr += "district_id=" + commit_home +'&';
}
if ( commit_shop ) {
params.store_id = commit_shop;
paramsStr += "store_id=" + commit_shop +'&';
}
if ( comit_name ) {
params.agent_id = comit_name;
paramsStr += "agent_id=" + comit_name +'&';
}
if ( comit_phone ) {
if ( comit_phone[0] == "1" && comit_phone.length == 11) {
params.phone = comit_phone;
paramsStr += "phone=" + comit_phone +'&';
}else {
alert("请输入正确的手机号码")
} }
} var imgname = [];//图片
if ( is_selt ){ for(var i = 0; i < $('.result').length; i++) {
params.is_self = is_selt; imgname[i] = $('.result>img').eq(i).attr('data-imgname');
paramsStr += "is_self=" + is_selt +'&'; };
} params.img_arr = imgname;
if ( is_open > -1) { if($('#total_fee').val()){
params.is_open = is_open; params.total_fee = $('#total_fee').val();
paramsStr += "is_open=" + is_open +'&'; }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;
}
if(imgname.length){
}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;
$.ajax({
url: "/index/editApplyFor",
type: 'POST',
async: true,
data: params,
dataType: 'json',
success: function(data) {
if(data.code == 200) {
} else {
alert(data.msg);
}
params.status = that.check_status; }
paramsStr += "status=" + that.check_status; });
if (is_excel) { },
return paramsStr; //报销审核通过
} else { checkCost: function() {
return params; 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": imgname,
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
alert(data.msg);
$(".modal").modal('hide');//新增成功 关闭弹窗
} else {
alert(data.msg);
}
}
});
}, },
}; };
return cost; return cost;
......
...@@ -56,8 +56,10 @@ ...@@ -56,8 +56,10 @@
[% } %] [% } %]
<td> <td>
<a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-status='[%= it[item]["status"] %]'>审核</a> <a class="btn1 btn-success checkCost" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-status='[%= it[item]["status"] %]'>审核</a>
[% if(it[item]['status'] != 4) { %]
<a class="btn1 btn-success is_del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a> <a class="btn1 btn-success is_del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
[% } %]
</td> </td>
</tr> </tr>
[% } %] [% } %]
...@@ -67,3 +69,34 @@ ...@@ -67,3 +69,34 @@
</tr> </tr>
[% } %] [% } %]
</script> </script>
<!--详情 门店明细-->
<script id="mingxi_template_tpl" type="text/template">
[% if(it && it.length) { %]
[% for(var item in it){ %]
<tr class="text-left">
<td style="border: 0;">成本明细ID[%= it[item]['id'] %]
费用承担门店:[%= it[item]['store_name'] %] ([%= it[item]['store_attendance_num'] %])
费用承担金额:[%= it[item]['assume_fee'] %] </td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="15" style="text-align:left;border: 0;"> 暂无数据</td>
</tr>
[% } %]
</script>
<!--详情 审核记录-->
<script id="check_template_tpl" type="text/template">
[% if(it && it.length) { %]
[% for(var item in it){ %]
<tr class="text-left">
<td style="border: 0;">[%= it[item]['name'] %] [%= it[item]['create_time'] %] 备注:[%= it[item]['remark'] %]</td>
</tr>
[% } %]
[% }else{ %]
<tr>
<td colspan="15" style="text-align:left;border: 0;"> 暂无数据</td>
</tr>
[% } %]
</script>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment