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,26 +82,33 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css', ...@@ -81,26 +82,33 @@ define(['doT', 'text!temp/cost_details_template_tpl.html', 'css!style/home.css',
}, },
totalFee: function() { //一键生成 totalFee: function() { //一键生成
$.ajax({ if(!cost.isAjaxSaving){
url: '/index/creationStoreFee', cost.isAjaxSaving = true;
type: 'post', $.ajax({
async: true, url: '/index/creationStoreFee',
data: { type: 'post',
"setting_date": $("#comit_time_start").val() + '-01', async: true,
"agent_id": user_info_obj.id, data: {
"setting_date": $("#comit_time_start").val() + '-01',
}, "agent_id": user_info_obj.id,
dataType: 'json', },
success: function(data) { dataType: 'json',
if(data.code == 200) { success: function(data) {
alert(data.msg); if(data.code == 200) {
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