Commit a94bb451 authored by agping's avatar agping

对应业务员

parent f858ff16
...@@ -1350,7 +1350,7 @@ ...@@ -1350,7 +1350,7 @@
<tr> <tr>
<td colspan="2"> <td colspan="2">
<span class="span-width-90">对应业务员:</span> <span class="span-width-90">对应业务员:</span>
<span>101周小雨(反签40%),203洛可可(独家50%),203王小兔(合作方20%)</span> <span class="duiyingrole">101周小雨(反签40%),203洛可可(独家50%),203王小兔(合作方20%)</span>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -430,7 +430,7 @@ ...@@ -430,7 +430,7 @@
<tr> <tr>
<td colspan="2"> <td colspan="2">
<span class="span-width-90">对应业务员:</span> <span class="span-width-90">对应业务员:</span>
<span>101周小雨(反签40%),203洛可可(独家50%),203王小兔(合作方20%)</span> <span class="duiyingrole">101周小雨(反签40%),203洛可可(独家50%),203王小兔(合作方20%)</span>
</td> </td>
</tr> </tr>
<tr> <tr>
......
...@@ -956,7 +956,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -956,7 +956,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
success: function(data) { success: function(data) {
if(data.code == 200) { if(data.code == 200) {
alert('提交成功!') alert('提交成功!')
$("#modal-commission").modal('hide');
} else { } else {
alert(data.msg) alert(data.msg)
} }
...@@ -984,6 +984,41 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -984,6 +984,41 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
//获取业务员
getRole: function(fn) {
var userObj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo')));
$.ajax({
url: '/broker/getCommission',
type: 'GET',
async: true,
data: {
"bargain_id": bargain.bargainid_commission,
"AuthToken": userObj.AuthToken
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var imgname = [];
for(var i = 0; i < data.data.length; i++) {
imgname[i] = data.data[i].agent_id + data.data[i].name + "(" + bargain.roleSwitch(data.data[i].role) + data.data[i].scale+ "%" + ") ";
};
$('.duiyingrole').html(imgname.join(','));
}
}
});
},
roleSwitch:function(r) {
if(r*1 == 3){
return '反签'
}else if(r*1 == 4){
return '独家'
}else{
return '合作方'
}
},
resetInput: function(fn) { resetInput: function(fn) {
$(".commission-money").val(0); $(".commission-money").val(0);
$('.commission-pay-type').val(''); $('.commission-pay-type').val('');
...@@ -1004,7 +1039,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -1004,7 +1039,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
$('.fee-money-zhongjie').html(shouldMoney);//应收金额 $('.fee-money-zhongjie').html(shouldMoney);//应收金额
$('.fee-more-zhongjie').html(moreMoney);//多收金额 $('.fee-more-zhongjie').html(moreMoney);//多收金额
bargain.getNum(); bargain.getNum();
bargain.getRole();
}, },
Timeline: function() { //获取时间轴 Timeline: function() { //获取时间轴
$.ajax({ $.ajax({
......
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