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