Commit b3edea6a authored by agping's avatar agping

收款恢复

parent f53eab4c
...@@ -593,9 +593,9 @@ ...@@ -593,9 +593,9 @@
</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" id="saveBtn" data-dismiss="modal">
保存 保存
</button> </button>-->
</div> </div>
<div class="modal-body modal-body-height pic-con2"> <div class="modal-body modal-body-height pic-con2">
<div class="col-xs-12"> <div class="col-xs-12">
...@@ -627,7 +627,7 @@ ...@@ -627,7 +627,7 @@
<div class="form-group" style="margin-top: 3px;"> <div class="form-group" style="margin-top: 3px;">
<strong><span>成交报告ID:</span></strong> <strong><span>成交报告ID:</span></strong>
<span id="chengjiaobaogaoId">45122</span> <span id="chengjiaobaogaoId">45122</span>
<a class="btn btn-info btn-small modifyReport" href="#modifyReport_modal" data-toggle="modal">修改</a> <!--<a class="btn btn-info btn-small modifyReport" href="#modifyReport_modal" data-toggle="modal">修改</a> -->
</div> </div>
</div> </div>
...@@ -907,9 +907,9 @@ ...@@ -907,9 +907,9 @@
</div> </div>
</div> </div>
<div class="modal-footer pic-con2"> <div class="modal-footer pic-con2">
<button type="button btn2" class="btn btn-primary" id="savePayBtn"> <!--<button type="button btn2" class="btn btn-primary" id="savePayBtn">
保存 保存
</button> </button>-->
</div> </div>
</div> </div>
<!-- /.modal-content --> <!-- /.modal-content -->
...@@ -1280,9 +1280,9 @@ ...@@ -1280,9 +1280,9 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button btn2" class="btn btn-primary" id="saveBtnOpen"> <!--<button type="button btn2" class="btn btn-primary" id="saveBtnOpen">
保存 保存
</button> </button>-->
</div> </div>
</div> </div>
<!-- /.modal-content --> <!-- /.modal-content -->
......
...@@ -42,6 +42,9 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -42,6 +42,9 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
house_id_open:'', house_id_open:'',
house_address_open:'', house_address_open:'',
listUrl:'/index/getCollection', listUrl:'/index/getCollection',
listUrlRestore:'/index/recoverPayLog',//商铺恢复删除收款
listUrlCollection:'/index/getCollectionDetail',//商铺收款详情
listUrlCollectionImg:'/index/receiptImgList',//商铺收款详情图片
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -57,11 +60,18 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -57,11 +60,18 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
var _this = $(this); var _this = $(this);
_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');
receiv.mainTabIndex = $(this).index();//下标值 receiv.mainTabIndex = $(this).index();//下标值
if($(this).index() == 0){ if($(this).index() == 0){
receiv.listUrl = '/index/getCollection';//商铺 receiv.listUrl = '/index/getCollection';//商铺
receiv.listUrlRestore = '/index/recoverPayLog';//恢复收款
receiv.listUrlCollection = '/index/getCollectionDetail';//商铺收款详情
receiv.listUrlCollectionImg = '/index/receiptImgList';//商铺收款详情图片
}else if($(this).index() == 1){ }else if($(this).index() == 1){
receiv.listUrl = '/office_index/getCollection';//办公楼 receiv.listUrl = '/office_index/getCollection';//办公楼
receiv.listUrlRestore = '/office_index/recoverPayLog';//恢复收款
receiv.listUrlCollection = '/office_index/getCollectionDetail';//办公楼收款详情
receiv.listUrlCollectionImg = '/office_index/receiptImgList';//办公楼收款详情图片
} }
receiv.getList(1); receiv.getList(1);
...@@ -80,6 +90,15 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -80,6 +90,15 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
$('.reportArea').hide(); $('.reportArea').hide();
} }
}); });
//恢复收款
_doc.on('click', '.restore', function(e) {
e.preventDefault();
e.stopPropagation();
if(confirm('确认恢复收款吗?')){
receiv.restoreList($(this).attr('data-id'));
};
});
// 初始化界面 // 初始化界面
$('.pic-con2').show(); $('.pic-con2').show();
...@@ -911,7 +930,7 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -911,7 +930,7 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
$('.result2,.result').remove(); //删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的 $('.result2,.result').remove(); //删除之前存在的图片 显示从接口获取的数据 用来区分新添加的 和 已经保存的
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
'url': '/index/receiptImgList', 'url': receiv.listUrlCollectionImg,
data: { data: {
"id": id_pic, "id": id_pic,
}, },
...@@ -922,7 +941,7 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -922,7 +941,7 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
// <img src='[%= it[item]["agent_img"] %]' class="diagram-image J_preview" // <img src='[%= it[item]["agent_img"] %]' class="diagram-image J_preview"
// data-bimg='[%= it[item]["agent_img"] %]'> // data-bimg='[%= it[item]["agent_img"] %]'>
for(i = 0; i < data.data.length; i++) { for(i = 0; i < data.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({ $('#container_body_img_area').append('<div class="result2"><img data-imgid="{0}" src="{1}" alt="" class="diagram-image J_preview" data-bimg="{1}"/></div>'.stringFormatObj({
'0': data.data[i].id, '0': data.data[i].id,
'1': data.data[i].img_name?urlDeal(data.data[i].img_name):data.data[i].img_name '1': data.data[i].img_name?urlDeal(data.data[i].img_name):data.data[i].img_name
})); }));
...@@ -1593,7 +1612,9 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -1593,7 +1612,9 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
getList : function(no){ getList : function(no){
var that = receiv; var that = receiv;
that.pageNo = no; that.pageNo = no;
var params = that.buildSearchParams(false); // var params = that.buildSearchParams(false);
var params = {};
params.is_del = 1;//已删除的收款
params.pageNo = that.pageNo; params.pageNo = that.pageNo;
params.pageSize = that.pageSize ; params.pageSize = that.pageSize ;
$.ajax({ $.ajax({
...@@ -1649,7 +1670,7 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -1649,7 +1670,7 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
var params = { var params = {
'pay_id' : id 'pay_id' : id
}; };
$.post('/index/getCollectionDetail',params , function(data){ $.get(receiv.listUrlCollection,params , function(data){
if(data.code == 200) { if(data.code == 200) {
that.getValueFunction(data.data); that.getValueFunction(data.data);
} else { } else {
...@@ -1875,7 +1896,20 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c ...@@ -1875,7 +1896,20 @@ define(['doT', 'text!temp/delFinanceReport_template_tpl.html', 'css!style/home.c
} }
},'json') },'json')
}, },
//恢复收款
restoreList : function(id){
var that = receiv;
var params = {
'pay_id' : id
};
$.post(receiv.listUrlRestore,params , function(data){
if(data.code == 200) {
that.getList(1);
} else {
alert(data.msg);
}
},'json')
},
getBack : function(id){ getBack : function(id){
var that = receiv; var that = receiv;
var params = { var params = {
......
...@@ -30,7 +30,7 @@ ...@@ -30,7 +30,7 @@
被调整 被调整
[% } %] [% } %]
<td> <td>
<a class="btn1 btn-success timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>恢复</a> <a class="btn1 btn-success restore" href="" data-id='[%= it[item]["order_id"] %]'>恢复</a>
[% if(check_auth('index/getCollectionDetail')) { %] [% if(check_auth('index/getCollectionDetail')) { %]
<a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-report='[%= it[item]["report_id"] %]' data-order='[%= it[item]["order_id"] %]'>收款详情</a> <a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]' data-report='[%= it[item]["report_id"] %]' data-order='[%= it[item]["order_id"] %]'>收款详情</a>
......
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