Commit d697f1a2 authored by agping's avatar agping

提醒

parent 786a5aea
...@@ -48,7 +48,9 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -48,7 +48,9 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
//点击一键生成 //点击一键生成
$(document).on('click','#key',function(e){ $(document).on('click','#key',function(e){
that.totalFee(); // 判断有没有产生数据
that.getCost();
// that.totalFee();
}); });
//点击考勤 //点击考勤
$(document).on('click','#kaoqin',function(e){ $(document).on('click','#kaoqin',function(e){
...@@ -80,6 +82,30 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -80,6 +82,30 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
}); });
},
//判断有没有产生数据
getCost : function(){
var that = cost;
var params = {};
params.setting_date = $('#comit_time_start').val() + '-01';
$.get('/index/getCost',params,function(data){
if(typeof data === 'object') {
if(data.code == 200) {
//确定再次生成数据 弹框
if(!confirm(data.msg)) {
return;
}else{
that.totalFee();//一键生成
}
} else {
that.totalFee();//一键生成
};
} else {
alert('数据错误');
};
},'json');
}, },
totalFee: function() { //一键生成 totalFee: function() { //一键生成
if(!cost.isAjaxSaving){ if(!cost.isAjaxSaving){
......
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