Commit 04939541 authored by xishifeng's avatar xishifeng

反签方数量限制

parent a03d0458
......@@ -71,7 +71,8 @@
<thead>
<tr>
<td colspan="12" class="maintable-top-sub-tr">
<a class="btn btn-info liudan_pic_btn">第一级审核</a>
<a class="btn btn-info liudan_pic_btn">全部</a>
<a class="btn btn-default liudan_pic_btn">第一级审核</a>
<a class="btn btn-default liudan_pic_btn">第二级审核</a>
<a class="btn btn-default liudan_pic_btn">第三级审核</a>
<a class="btn btn-default liudan_pic_btn">已结单</a>
......
......@@ -65,8 +65,8 @@
收款记录
view-->Collection-->getCollection.html
测绘路公交报告审核
view-->Finance-->toReportListOne.html
交报告审核
view-->Finance-->account_statement.html
审核撤销成交报告-第一级审核
view-->Collection-->getCollection.html
......
......@@ -29,7 +29,7 @@ define(['doT', 'jquery', 'text!temp/menu_template_tpl.html', 'layer'], function
//回调部分
//记录tab的点击状态,对应的标签内容展开,并高亮显示
var _hash = location.pathname.replace('/admin.php/', '/');
var _tempObj = $('[data-href="'+_hash+'"]');
var _tempObj = $('[href="'+_hash+'"]');
_tempObj.addClass('active-a').siblings().removeClass('active-a');
_tempObj.closest('.dropdown-menu').prev().attr('aria-expanded', true).parents().addClass('open').siblings().removeClass('open');
......
......@@ -656,7 +656,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
'industry_type': $.trim($('#bargaininfo_yetai').val()),
'price': $('#bargaininfo_chengjiao_price').val(),
'estimated_receipt_date': $('#bargaininfo_expect_payback_time').val(),
'step': bargain.mainTabIndex+1,
'step': bargain.mainTabIndex,
'house_number': $.trim($('#bargaininfo_shop_num').val())
};
......@@ -732,10 +732,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
//通过
pass: function() { //点击通过
var a_url = '';
if(bargain.mainTabIndex == 0) {
if(bargain.mainTabIndex == 1) {
a_url = "/index/checkReportAttache/1"
};
if(bargain.mainTabIndex == 1) {
if(bargain.mainTabIndex == 2) {
a_url = "/index/checkReportManager/2"
};
// if(bargain.mainTabIndex == 2) {
......@@ -754,7 +754,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
"source": 1,
"status": 10,
"remark": $.trim($("#pass_beizhu").val()),
'step': bargain.mainTabIndex+1
'step': bargain.mainTabIndex
},
dataType: "json",
success: function(data) {
......@@ -907,7 +907,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
'scale_fee': $('#addmaid_input_cash').val(),
'role': $('#addmaid_input_servant').val(),
'scale': $('#addmaid_input_ratio').val(),
'step': bargain.mainTabIndex+1,
'step': bargain.mainTabIndex,
'source': 1
},
timeout: 30000,
......@@ -1092,7 +1092,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
'charity_fund': _csjj,//慈善基金
'cash': _xjj,//现金奖
'practical_fee': _ssyj,//实收佣金,
'step': bargain.mainTabIndex+1
'step': bargain.mainTabIndex
};
}
});
......@@ -1103,6 +1103,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
_data.push(_dataTemp);
});
};
if(_parObj.find('td[data-role="3"]').length>1){
_stopFlag = true;
_errorTips = '反签方只能有一个';
};
$.each($('.detail-modal-maid-span-scale'), function(i, v) {
_scaleTotal += Number($.trim(v.innerHTML));
});
......@@ -1111,6 +1116,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
_stopFlag = true;
_errorTips = '分佣比例一定要是100%,否则无法提交';
};
return {
'flag': _stopFlag,
'tips': _errorTips,
......@@ -1118,48 +1124,58 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
}
},
maidConfirmOk: function(type){
var _back = bargain.maidTest(type);//获取处理的数据
if(!_back.flag){
var _len = _back.list.length;
! function funTemp(count) {
if(count >= _len) {
//如果递归执行完毕则执行这条
alert(type===0?'保存成功':'确认成功');
bargain.maidShow();
} else {
$.ajax({
type: 'POST',
url: '/index/addRealIncome',
data: _back.list[count],
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
funTemp(++count);
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
}
}(0);
if(!bargain.isSaving){
//上一次请求完成后再
var _back = bargain.maidTest(type);//获取处理的数据
if(!_back.flag){
var _len = _back.list.length;
! function funTemp(count) {
if(count >= _len) {
//如果递归执行完毕则执行这条
alert(type===0?'保存成功':'确认成功');
bargain.maidShow();
} else {
$.ajax({
type: 'POST',
url: '/index/addRealIncome',
data: _back.list[count],
timeout: 30000,
dataType: 'json',
beforeSend: function() {
bargain.isSaving = true;
},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
funTemp(++count);
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
bargain.isSaving = false;
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
}
}(0);
}else{
alert(_back.tips);
}
}else{
alert(_back.tips);
//上一次请求没有完成的时候直接退出
return false;
}
},
newAddTax: function(obj) {
var _tempTableObj = $('.addtax-modal-tax-table');
......@@ -1423,10 +1439,12 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
case 0:
return '/index/reportListOne/1';
case 1:
return '/index/reportListTwo/2';
return '/index/reportListOne/1';
case 2:
return '/index/reportListThree/3';
return '/index/reportListTwo/2';
case 3:
return '/index/reportListThree/3';
case 4:
return '/index/reportListStatement/4';
default:
return '';
......
......@@ -94,7 +94,7 @@
[% var dealT=function(g){if(g&&(g!="null")){return g}else{return""}}; %]
[% for(var i in it['data']){ %]
<tr class="text-center" data-id="[%= it['data'][i]['id'] %]" data-agentid="[%= it['data'][i]['agent_id'] %]" data-role="[%= it['data'][i]['role'] %]" data-lastid="[%= it['data'][i]['last_commission_id'] %]">
<td>[%= it['data'][i]['role_name'] %]</td>
<td data-role="[%= it['data'][i]['role'] %]">[%= it['data'][i]['role_name'] %]</td>
<td>[%= it['data'][i]['agent'] %]</td>
<td>[%= it['data'][i]['district_store'] %]</td>
<td><span contenteditable class="detail-modal-maid-span-scale">[%= it['data'][i]['scale'] %]</span><span>%</span></td>
......
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