Commit efb01840 authored by agping's avatar agping

开业申请

parent e1c7b05a
......@@ -101,7 +101,7 @@
color: red;
cursor: pointer;
}
.span-del2-du,.span-del-du{
.span-del2-du,.span-del-du,.span-del-open{
color: red;
cursor: pointer;
}
......@@ -253,18 +253,28 @@
height: 35px;
width: 80px;
}
#file_input_pic_open {
opacity: 0;
position: absolute;
top: 0;
left: 0;
height: 35px;
width: 80px;
}
.hide {
display: none !important;
}
.result-du {
.result-du ,.result-du-open{
width:130px;
height:auto;
float:left;
text-align:center;
color:red;
}
.result-du>img,.result2-du>img,.result-du-l>img{
.result-du>img,.result2-du>img,.result-du-l>img,.result-du-open>img{
width: 120px;
height: 120px;
margin-top: 8px;
......@@ -887,6 +897,48 @@
</div>
<!-- /.modal -->
</div>
<!--申请开业-->
<div class="modal fade" id="modal_open" 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">
×
</button>
<h4 class="modal-title">
申请开业
</h4>
</div>
<div class="modal-body modal-body-height">
<ul class="list-group">
<li class="list-group-item">
<div class="form-group full-width-100 full-pic-area">
<span style="position: relative;top: -50px;">开业说明:</span><textarea name="" rows="" cols=""style="width: 430px;height: 100px;" class="remark-financial"></textarea>
</div>
<div class="form-group full-width-100 full-pic-area">
<!--input上传图片-->
<div id="container_body">
<button type="button btn2" class="btn btn-default">上传图片</button>
<input type="file" id="file_input_pic_open"/>
<div id="container_body_img_open"></div>
</div>
</div>
</li>
</ul>
</div>
<div class="modal-footer">
<button type="button btn2" class="btn btn-primary" id="saveBtnLiu" data-dismiss="modal">
保存
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
<!--审核通过 备注-->
<div class="modal fade" id="modal_financialremark" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
......
......@@ -132,6 +132,13 @@ define(['doT','html2canvas','text!temp/financial_manager_daily_list_template_tpl
bargain.recordid = $(this).attr("data-recordid");
bargain.getPic();
});
//点击开业申请 显示图片
_doc.on('click', '.apply-open', function(e) {
e.preventDefault();
e.stopPropagation();
bargain.recordid = $(this).attr("data-recordid");
bargain.getPicOpen();
});
//收款详情页面
$(document).on('click','.add-pic',function(e){
// 初始化界面
......@@ -231,6 +238,48 @@ define(['doT','html2canvas','text!temp/financial_manager_daily_list_template_tpl
}
});
});
//申请开业
$('#file_input_pic_open').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_open').append('<div class="result-du-open"><img data-imgname="{0}" src="{1}" alt=""/> <span class="span-del-open">删除</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-open', function(e) {
e.preventDefault();
e.stopPropagation();
$(this).parent().remove();
});
//图片删除事件
_doc.on('click', '.span-del-du', function(e) {
e.preventDefault();
......@@ -253,6 +302,16 @@ define(['doT','html2canvas','text!temp/financial_manager_daily_list_template_tpl
bargain.spandelList(_this.prev().attr('data-imgid'));
};
});
//开业申请图片删除,已有的则调用接口删除
_doc.on('click', '.span-del-open2', function(e) {
var _this = $(this);
e.preventDefault();
e.stopPropagation();
if(confirm('确认删除吗?')){
_this.parent().remove();
bargain.spandelList(_this.prev().attr('data-imgid'));
};
});
//保存收款信息
// $("#modal-addPic").on("shown.bs.modal", function(event){
// $('#savePayBtn').click(function(){
......@@ -1221,6 +1280,35 @@ define(['doT','html2canvas','text!temp/financial_manager_daily_list_template_tpl
}
});
},
//获取申请开业图片
getPicOpen: function() {
$('.result-du-open,.result-du-open2').remove(); //删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的
$.ajax({
url: '/index/getPayLogImg',
type: 'GET',
async: true,
data: {
'pay_log_id': bargain.recordid,
'AuthToken':user_info_obj.AuthToken,
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
//渲染已经有的列表
if(!(Array.isArray(data.data)) && data.data){
for(i = 0; i < data.data.img_info.length; i++) {
$('#container_body_img_open').append('<div class="result-du-open2"><img data-imgid="" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}"/> <span class="span-del-open2">删除</span></div>'.stringFormatObj({
'1': urlDeal(data.data.img_path+data.data.img_info[i].img_name)
}));
};
}else{
$('#container_body_img_area').append('<div class="result-du-open2">暂无图片</div>');
}
}
}
});
},
//财务审核通过 转到已审核
submitPassReport: function() {
var params = {};
......
......@@ -34,6 +34,7 @@
<td>
<a class="btn1 btn-info record-pic" href="#modal_financial" data-recordid="[%= it[item]['id'] %]" data-toggle="modal">资料</a>
<a class="btn1 btn-info apply-open" href="#modal_open" data-recordid="[%= it[item]['id'] %]" data-toggle="modal">申请开业</a>
<a class="btn1 btn-info add-pic" href="#modal-addPic" data-recordid="[%= it[item]['id'] %]" data-toggle="modal">编辑</a>
<a class="btn1 btn-info money_back" href="#modal-back" data-toggle="modal" data-id='[%= it[item]["id"]%]' data-income_time='[%= it[item]['income_time'] %]' data-real_money='[%= it[item]['real_money'] %]' data-addr="[%= it[item]['house_address'] %]" data-report_id='[%= it[item]['report_id'] %]' data-order_id='[%= it[item]['order_id'] %]' data-order_no='[%= it[item]['order_no'] %]' data-agent_id='[%= it[item]['agent_id'] %]' data-agent_name='[%= it[item]['current_agent_name'] %]' data-type='中介费'>退款</a>
......@@ -47,7 +48,7 @@
[% } %]
[% }else{ %]
<tr>
<td colspan="15" style="text-align:center;"> 暂无数据</td>
<td colspan="18" style="text-align:center;"> 暂无数据</td>
</tr>
[% } %]
</script>
......@@ -83,7 +84,7 @@
[% } %]
[% }else{ %]
<tr>
<td colspan="15" style="text-align:center;"> 暂无数据</td>
<td colspan="16" style="text-align:center;"> 暂无数据</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