Commit 66660d81 authored by agping's avatar agping

收款记录 添加删除按钮

parent 7c6c94d6
......@@ -407,4 +407,33 @@
</div>
<div id="img_mask_area" title="点击任意位置可关闭">
<img />
</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">
删除
</button>
</div>
</div>
<!-- /.modal-content -->
</div>
<!-- /.modal -->
</div>
\ No newline at end of file
......@@ -7,6 +7,7 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
id: '',
house_id: '',
house_fatherid: '',
collection_del_id:'',
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -61,7 +62,20 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
follow.getaddPicList();//获取已经上传的图片信息
});
//确认 删除 弹出框
$("#confirm_delete").click(function(){
var params = {};
params.id = follow.collection_del_id;
if(!params.id || params.id == null){
alert ("要删除的id不能为空");
return false;
}
follow.delete_collection(params);
});
//删除 收款记录
$(document).delegate (".collection-del", "click", function () {
follow.collection_del_id = $ (this).attr ("data-id");
});
//重置按钮的事件
$("#reset").click(function() { //重置
document.getElementById("form_search").reset();
......@@ -424,6 +438,19 @@ define(['doT', 'text!temp/get_collection_template_tpl.html', 'css!style/home.css
}
});
},
// 删除收款记录
delete_collection: function(params) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'POST',
async: true,
data: params,
dataType: 'json',
success: function(data) {
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
......
......@@ -17,6 +17,7 @@
<a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' father-id='[%= it[item]["father_id"] %]'>收款图片</a>
<a class="btn1 btn-success timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
<a class="btn1 btn-success submit_edit2" href="#modal-linetime" data-toggle="modal" data-id='[%= it[item]["id"]%]' data-fee='[%= it[item]["transaction_fee"]%]' data-money='[%= it[item]["real_money"] %]'>实付金额</a>
<a class="btn1 btn-danger collection-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
</td>
</tr>
[% } %]
......
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