Commit 89584035 authored by duxinyuan's avatar duxinyuan

1

parent c94b80f4
...@@ -324,7 +324,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -324,7 +324,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
} else {} } else {
alert(data.msg)
}
} }
}); });
}, },
...@@ -353,7 +355,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -353,7 +355,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
})); }));
}; };
} else {} } else {
alert(data.msg)
}
} }
}); });
}, },
...@@ -484,6 +488,8 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -484,6 +488,8 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
}); });
$('#commit_home').append(str); $('#commit_home').append(str);
fn && fn(); fn && fn();
} else {
alert(data.msg);
} }
} }
}); });
...@@ -502,6 +508,8 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -502,6 +508,8 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
success: function(data) { success: function(data) {
if(data.code == 200 && data.data != null) { if(data.code == 200 && data.data != null) {
fn && fn(data.data); fn && fn(data.data);
} else {
alert(data.msg);
} }
} }
}); });
...@@ -521,7 +529,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -521,7 +529,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
getReportDataByDetail : function(val){ getReportDataByDetail : function(val){
$.post('',{'val':val},function(data){ $.post('',{'val':val},function(data){
if(data.code == 200) {
return data ; return data ;
} else {
alert(data.msg);
}
}) })
}, },
...@@ -650,14 +662,21 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -650,14 +662,21 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
//上传数据 //上传数据
$.post('/index/collectingBill',params,function( data ){ $.post('/index/collectingBill',params,function( data ){
console.log(data); if(data.code == 200) {
$('#modal-linetime').modal('hide'); $('#modal-linetime').modal('hide');
} else {
alert(data.msg);
}
},'json'); },'json');
}, },
getAllPrice : function(id){ getAllPrice : function(id){
$.get('/index/getAdjustment',{'pay_id':id},function(data){ $.get('/index/getAdjustment',{'pay_id':id},function(data){
if(data.code == 200) {
$('#could_price').text(data.data.residue_money); $('#could_price').text(data.data.residue_money);
} else {
alert(data.msg);
}
}) })
}, },
...@@ -666,7 +685,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -666,7 +685,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
var params = that.recervablesParams(); var params = that.recervablesParams();
console.log(params); console.log(params);
$.post('/index/getCollectionEdit',params,function(data){ $.post('/index/getCollectionEdit',params,function(data){
if(data.code == 200) {
that.getList(that.pageNo); that.getList(that.pageNo);
} else {
alert(data.msg);
}
},'json') },'json')
}, },
...@@ -738,7 +761,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -738,7 +761,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
var that = receiv; var that = receiv;
var params = that.buildSearchParams(true); var params = that.buildSearchParams(true);
$.post('',params, function(data){ $.post('',params, function(data){
console.log(data); if(data.code == 200) {
} else {
alert(data.msg);
}
}) })
window.open('/index/getCollection' +params); window.open('/index/getCollection' +params);
}, },
...@@ -888,9 +915,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -888,9 +915,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
'pay_id' : id 'pay_id' : id
}; };
$.post('/index/getCollectionDetail',params , function(data){ $.post('/index/getCollectionDetail',params , function(data){
console.log("12321321321321313213213") if(data.code == 200) {
console.log(data);
that.getValueFunction(data.data); that.getValueFunction(data.data);
} else {
alert(data.msg);
}
},'json') },'json')
}, },
...@@ -978,7 +1007,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -978,7 +1007,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
var that = receiv; var that = receiv;
$.get('/index/getBeForNum',{'order_id':id},function(data){ $.get('/index/getBeForNum',{'order_id':id},function(data){
// $('#shop_id_change').text(data.data.house_number); // $('#shop_id_change').text(data.data.house_number);
if(data.code == 200) {
that.yetai = data.data.industry_type; that.yetai = data.data.industry_type;
} else {
alert(data.msg);
}
},'json') },'json')
}, },
/** /**
...@@ -992,8 +1025,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -992,8 +1025,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
'pay_id' : id 'pay_id' : id
}; };
$.post('/index/delPayLog',params , function(data){ $.post('/index/delPayLog',params , function(data){
console.log(data); if(data.code == 200) {
that.getList(1); that.getList(1);
} else {
alert(data.msg);
}
},'json') },'json')
} }
}; };
......
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