Commit 305acadf authored by agping's avatar agping

1

parent be0e4932
...@@ -7,6 +7,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -7,6 +7,7 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
pageSize: 10, pageSize: 10,
/*每页显示多少条*/ /*每页显示多少条*/
id: '', id: '',
isAjaxSaving:false,//防重复提交
init: function() { init: function() {
//初始化时间 //初始化时间
var myDate = new Date(); var myDate = new Date();
...@@ -81,6 +82,8 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -81,6 +82,8 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
}, },
totalFee: function() { //一键生成 totalFee: function() { //一键生成
if(!cost.isAjaxSaving){
cost.isAjaxSaving = true;
$.ajax({ $.ajax({
url: '/index/creationStoreFee', url: '/index/creationStoreFee',
type: 'post', type: 'post',
...@@ -88,19 +91,24 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -88,19 +91,24 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
data: { data: {
"setting_date": $("#comit_time_start").val() + '-01', "setting_date": $("#comit_time_start").val() + '-01',
"agent_id": user_info_obj.id, "agent_id": user_info_obj.id,
}, },
dataType: 'json', dataType: 'json',
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
alert(data.msg); alert('提交成功');
} else { } else {
alert(data.msg); alert(data.msg);
} }
},
complete: function(xhr, textStatus){
cost.isAjaxSaving = false;//请求结束,再改为初始状态
if(textStatus === 'timeout'){
layerTipsX('请求超时');
};
} }
}); });
}
}, },
//获取审核记录 //获取审核记录
getList : function(){ getList : function(){
...@@ -117,7 +125,6 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -117,7 +125,6 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
var str4 = ''; var str4 = '';
var str5 = ''; var str5 = '';
// 审核类型, 1考勤审核 2社保审核 3手续费审核 4办公室房租+当月办公门店审核 5费用参数审核 // 审核类型, 1考勤审核 2社保审核 3手续费审核 4办公室房租+当月办公门店审核 5费用参数审核
$.each(data.data, function(i, item) { $.each(data.data, function(i, item) {
if(data.data[i].type == 1){ if(data.data[i].type == 1){
str1 += data.data[i].operator_name + '、'; str1 += data.data[i].operator_name + '、';
......
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