Commit bec0f762 authored by agping's avatar agping

开业审核

parent 842dbe9d
...@@ -496,75 +496,7 @@ ...@@ -496,75 +496,7 @@
</form> </form>
</div> </div>
<div class="modal-footer noprint" id="hiddenOr" > <div class="modal-footer noprint" id="hiddenOr" >
<button type="button" class="btn btn-primary pass" href="#modal_pass" data-toggle="modal">财务一级审核</button> <button type="button" class="btn btn-primary pass" href="#modal_pass" data-toggle="modal" style="display: none;">财务一级审核</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!-- /#删除模态框 -->
<div class="modal fade" id="modal-delete" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
&times;
</button>
<h4 class="modal-title">
删除
</h4>
</div>
<div class="modal-body">
<div class="modal-body">
<input type="hidden" value="" id="delete_id" /> 确认删除吗?
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="button" class="btn btn-primary" id="confirm_delete" data-dismiss="modal">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--退款-->
<div class="modal fade" id="tuikuan_modal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times; </button>
<h4 class="modal-title"> 转到已退款 </h4>
</div>
<div class="modal-body">
<div class="col-xs-12" style="margin-top:20px;">
<label class="col-xs-2">备注</label>
<div class="col-xs-10">
<textarea id="check_past_pict" class="form-control"></textarea>
</div>
<div class="col-xs-12" style="padding-left:30px;">
<label>上传转账图片和退款单手签版图片:</label>
</div>
<div class="col-xs-12">
<div class="file-upload-area p-a-0 ">
<ul class="img-pre-ul" id="fujian_ul"></ul>
<div class="btn-area">
<input class="btn btn-default" type="file" id="file_input3" data-limittop="1" /> <!--修改上传文件的最大数字-->
<button class="btn btn-default" style="margin-left : 144px;">选择图片</button>
</div>
<div class="col-xs-12 p-t-10" id="container_body_img_area3">
</div>
</div>
</div>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="check_back" >确定</button>
</div> </div>
</div> </div>
<!-- /.modal-content --> <!-- /.modal-content -->
...@@ -592,28 +524,8 @@ ...@@ -592,28 +524,8 @@
</div> </div>
<!-- /.modal --> <!-- /.modal -->
</div> </div>
<div class="modal fade" id="modal_false" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog"> <!--删除开业申请-->
<div class="modal-content">
<div class="modal-header" >
<button type="button" class="close" data-dismiss="modal" aria-hidden="true"> &times; </button>
<h4 class="modal-title"> 驳回 </h4>
</div>
<div class="modal-body" style="overflow:hidden;">
<label class="col-xs-2">备注</label>
<div class="col-xs-10">
<textarea id="check_bohui" class="form-control "></textarea>
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-primary" id="check_no">确定</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--时间轴-->
<div class="modal fade" id="modal-del" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"> <div class="modal fade" id="modal-del" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog"> <div class="modal-dialog">
<div class="modal-content"> <div class="modal-content">
......
...@@ -6,12 +6,8 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -6,12 +6,8 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
/*每页显示多少条*/ /*每页显示多少条*/
id: '', id: '',
house_id: '', house_id: '',
house_fatherid: '',
collection_del_id:'',
listData :"", listData :"",
moneyTotal : "" ,
agent_id_phone : '', agent_id_phone : '',
check_status : 1 ,
deleteRefundId:'', deleteRefundId:'',
url:'', url:'',
init: function() { init: function() {
...@@ -48,41 +44,13 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -48,41 +44,13 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
$('.choose_btn5').hide(); $('.choose_btn5').hide();
}; };
refund.url=$('.btn-group .choose_btn:nth-of-type(1)').attr('data-value'); refund.url=$('.btn-group .choose_btn:nth-of-type(1)').attr('data-value');
// console.log(refund.url);
refund.getList(1); refund.getList(1);
refund.event(); refund.event();
}, },
event: function() { event: function() {
var that = refund; var that = refund;
var _doc = $(document); var _doc = $(document);
$('#print').click(function(){
var header = window.document.head.innerHTML ;
var printHtml = document.getElementById('modal-check').innerHTML;
var wind = window.open("", "newwin", "toolbar=no,scrollbars=yes,menubar=no");
var ss = ''
+"<style>"
+".coversheet-pageBoder{"
+" padding: 10px;"
+" margin-top: 10px;"
+" border: 1px solid gray;"
+" page-break-after: always;"
+" border-radius: 5px;"
+" box-shadow: 0 1px 2px 1px rgba(0,0,0,.08), 0 3px 6px rgba(0,0,0,.08);"
+"}"
+".col-xs-12{ padding-left:15px;padding-right:15px;width:100%;position: relative;min-height: 1px;overflow:hidden;line-height:2}"
+".col-xs-6{ padding-left:15px;padding-right:15px;width:50%;position: relative;min-height: 1px;;overflow:hidden}"
+".l{line-height:2}"
+".noprint{display: none;}"
+"strong{font-weight:500}"
+".modal-header{min-height:20px;}"
+".down_page{position:fixed; bottom:0}"
+"</style>";
printHtml = ss + printHtml;
wind.document.body.innerHTML = printHtml;
wind.print();
})
//点击详情按钮事件,获取报告详情 //点击详情按钮事件,获取报告详情
$(document).on('click', '.details-btn', function() { $(document).on('click', '.details-btn', function() {
var _id = $(this).attr("data-id"); var _id = $(this).attr("data-id");
...@@ -109,16 +77,7 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -109,16 +77,7 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
refund.user_id = $(this).attr("data-id"); refund.user_id = $(this).attr("data-id");
refund.getGenjincon(); refund.getGenjincon();
}); });
//操作----删除 //点击删除 获取开业id
$(document).on('click','.list_delete',function(e){
var id = e.target.dataset.id;
that.deleteId = id ;
});
$(document).on('click','#confirm_delete',function(e){
var id = that.deleteId;
that.deleteTableRow(id);
});
//点击删除退款 获取退款id
$(document).on('click','.is_del',function(e){ $(document).on('click','.is_del',function(e){
refund.deleteRefundId = $(this).attr('data-id'); refund.deleteRefundId = $(this).attr('data-id');
}); });
...@@ -153,35 +112,13 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -153,35 +112,13 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
e.stopPropagation(); e.stopPropagation();
$('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id=' + house_id); $('.iframe-time-line').attr('src', '/app_broker/timeline_pc?order_id=' + house_id);
}); });
//操作----收款详情
$(document).on('click','.add-pic',function(e){
var id = e.target.dataset.id;
that.getAdjustmentDetail(id);
});
//审核通过 //审核通过
$(document).on('click','#check_yes',function(e){ $(document).on('click','#check_yes',function(e){
var text = $('#check_past').val(); var text = $('#check_past').val();
that.checkRefund(1,text); that.checkRefund(1,text);
}); });
//驳回
$(document).on('click','#check_no',function(e){
var text = $('#check_bohui').val();
that.checkRefund(4,text);
});
//已退款
$(document).on('click','#check_back',function(e){
var pictures = $('#container_body_img_area3').find('.result');
var text = $('#check_past_pict').val();
var picName = [];
pictures.each(function(i,event){
picName[i] = $(this).find("img").attr("id")
})
if ( !(pictures.length - 0 > 0) ){
alert("请选择图片");
return false ;
}
that.checkRefund(2,text,picName);
});
//二级联动 //二级联动
that.getDistrict(function() { that.getDistrict(function() {
...@@ -264,55 +201,12 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -264,55 +201,12 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
}); });
_doc.on('click','.choose_btn',function(e){ _doc.on('click','.choose_btn',function(e){
// var befor = that.check_status
// $('.btn-group').find("button").removeClass("btn-info")
// $(this).addClass("btn-info");
$(this).removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default'); $(this).removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
refund.url = e.target.dataset.value; refund.url = e.target.dataset.value;
refund.getList(1); refund.getList(1);
// if ( befor != e.target.dataset.value) {
// that.check_status = e.target.dataset.value;
// refund.getList(1);
// }
})
$("#changed_type").click(function () {
var type = $(this).val();
if (type == 4 || type == 5) {
$("#is_open").removeAttr("disabled");
} else {
$("#is_open").attr("disabled","disabled");
$("#is_open").val(-1);
}
}); });
}, },
smalltoBIG : function (n) {
var fraction = ['角', '分'];
var digit = ['零', '壹', '贰', '叁', '肆', '伍', '陆', '柒', '捌', '玖'];
var unit = [ ['元', '万', '亿'], ['', '拾', '佰', '仟'] ];
var head = n < 0? '欠': '';
n = Math.abs(n);
var s = '';
for (var i = 0; i < fraction.length; i++) {
s += (digit[Math.floor(n * 10 * Math.pow(10, i)) % 10] + fraction[i]).replace(/零./, '');
}
s = s || '整';
n = Math.floor(n);
for (var i = 0; i < unit[0].length && n > 0; i++) {
var p = '';
for (var j = 0; j < unit[1].length && n > 0; j++)
{
p = digit[n % 10] + unit[1][j] + p;
n = Math.floor(n / 10);
}
s = p.replace(/(零.)*零$/, '').replace(/^$/, '零') + unit[0][i] + s;
}
return head + s.replace(/(零.)*零元/, '元').replace(/(零.)+/g, '零').replace(/^整$/, '零元整');
},
checkRefund : function(status,remark,pic){ checkRefund : function(status,remark,pic){
var that = refund ; var that = refund ;
var params = { var params = {
...@@ -364,17 +258,21 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -364,17 +258,21 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
$('.check_person').append(tag); $('.check_person').append(tag);
var str = '' ; var str = '' ;
if (data.data.status == 1) { if (data.data.status == 1) {
str = '总监已审' str = '总监已审';
$(".pass").html("财务一级审核");
$(".pass").show();
} else if (data.data.status == 2) { } else if (data.data.status == 2) {
str = '财务一级审核通过' str = '财务一级审核通过';
$(".pass").html("财务二级审核");
$(".pass").show();
} else if (data.data.status == 3) { } else if (data.data.status == 3) {
str = '财务二级审核通过' str = '财务二级审核通过';
$(".pass").hide();
} else if (data.data.status == 0) { } else if (data.data.status == 0) {
str = '未审核' str = '未审核'
$(".pass").hide();
} }
$('#chech_status').text(str); $('#chech_status').text(str);
...@@ -486,8 +384,7 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -486,8 +384,7 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
getDistrictStoreList: function(id, fn) {
getDistrictStoreList: function(id, fn) {
$.ajax({ $.ajax({
url: '/index/getDistrictStoreList', url: '/index/getDistrictStoreList',
type: 'GET', type: 'GET',
...@@ -506,47 +403,6 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -506,47 +403,6 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
countValue : function(){
var that = refund ;
var data = that.listData ;
var value = 0 ;
for (var i = 0 ; i < data.length ; i++ ){
value = value + (data[i].money - 0);
}
$('#money_total').text(value+"元");
},
getAdjustmentDetail : function(id){
var that = refund ;
$.get('/index/getAdjustmentDetail',{'id' : id},function(data){
if(data.code == 200) {
that.setValue(data.data);
} else {
alert(data.msg);
}
},'json');
},
setValue : function(data){
var that = refund ;
$('#change_id').text(data.id);
// $('#change_price').text("");
$('#befor_into_id').text(data.adjustment_old[0].id);
$('#befor_order_id').text(data.adjustment_old[0].order_id);
$('#befor_house_id').text(data.adjustment_old[0].house_id);
$('#befor_house_addr').text(data.adjustment_old[0].internal_address);
$('#befor_into_date').text(data.adjustment_old[0].income_time);
$('#befor_into_type').text(data.adjustment_old[0].type);
$('#after_into_id').text(data.adjustment[0].id);
$('#after_order_id').text(data.adjustment[0].order_id);
$('#after_report_id').text(data.adjustment[0].bargain_id);
$('#after_house_id').text(data.adjustment[0].house_id);
$('#after_house_addr').text(data.adjustment[0].internal_address);
$('#after_into_date').text(data.adjustment[0].income_time);
$('#after_into_type').text(data.adjustment[0].type);
$('#after_into_price').text(data.money);
},
// 获取客户详情 // 获取客户详情
Caozuo: function() { //获取跟进详情的数据 Caozuo: function() { //获取跟进详情的数据
$.ajax({ $.ajax({
...@@ -669,7 +525,6 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -669,7 +525,6 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
var temp = document.getElementById('open_template_tpl').innerHTML; var temp = document.getElementById('open_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));
// that.moneyTotal = data.data.money_total;
$('#money_total').text((data.data.total_money-0 > 0) ? (data.data.total_money+"元"): "0元" ) $('#money_total').text((data.data.total_money-0 > 0) ? (data.data.total_money+"元"): "0元" )
/*分页代码*/ /*分页代码*/
...@@ -704,12 +559,8 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -704,12 +559,8 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
$('#comit_name').val(""); $('#comit_name').val("");
that.agent_id_phone=""; that.agent_id_phone="";
}, },
//导出开业申请
//退款 审核
exportExcel: function() { exportExcel: function() {
// var _url = '/index/refundListExcel?';
if(refund.buildSearchParams(1)){//是否要&符号 if(refund.buildSearchParams(1)){//是否要&符号
var _url = refund.url + "?excel=1&"; var _url = refund.url + "?excel=1&";
}else{ }else{
...@@ -802,24 +653,6 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', ' ...@@ -802,24 +653,6 @@ define(['doT', 'text!temp/open_check_template_tpl.html', 'css!style/home.css', '
} }
}, },
/**
* 删除收款记录
* @param {Object} id
*/
deleteTableRow : function(id){
var that = refund;
var params = {
'id' : id
};
$.post('/index/delAdjustment',params , function(data){
if(data.code == 200) {
that.getList(1);
} else {
alert(data.msg);
}
},'json')
}
}; };
return refund; return refund;
}); });
\ No newline at end of file
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