Commit a6d7126d authored by agping's avatar agping

666

parent 29708ad5
......@@ -1268,17 +1268,14 @@
<th class="text-center">客户ID</th>
<th class="text-center">客户手机号</th>
</tr>
</thead>
<tbody class="text-center" id="maintable_envelope_list">
</tbody>
</table>
</div>
<div class="envelope-details" style="margin-bottom: 30px;">注:确认分佣后系统会立即返现500元现金给客户</div>
<div class="envelope-details" style="margin-bottom: 10px;">邀请成交奖励:</div>
<div>成交客户: 客户ID:45123,周小雨 139****5642</div>
<div>成交客户的邀请人:客户ID:4512,洛可可 138****3214</div>
<div class="envelope-details" style="margin-top: 10px;">注:确认分佣后系统会立即返现500元现金给客户</div>
<div class="envelope-details" style="margin-bottom: 30px;">注:确认分佣后系统会立即返现现金到对应的客户账户上</div>
</div>
<div class="modal-footer">
......
......@@ -18,6 +18,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
house_fatherid:'',
detailTabIndexLiu:0,//查看 弹出框 tab切换 初始化
report_id_liu:0,
report_id_show:0,
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -174,6 +175,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
bargain.detailTabIndex = 0;
$('.detail-modal-body-sec:nth-of-type(1)').show().siblings().hide();
bargain.bargaininfoShow();
bargain.bargaininfoShowLiu();
});
//详情弹出框里的tab点击事件,成交信息,分佣提成,开票税费
......@@ -955,6 +957,52 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
}
});
},
bargaininfoShowLiu: function() { //获取report_id
$.ajax({
'type': 'GET',
'url': '/index/bargainInfo',
data: {
"id": bargain.bargain_id
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
if(data.data) {
bargain.report_id_liu = data.data.report_id;
bargain.bargaininfoShowRed();
}
} else {
alert('获取失败!');
}
}
});
},
//隐藏显示 红包列表
bargaininfoShowRed: function() {
$.ajax({
'type': 'GET',
'url': '/index/checkReferrer',
data: {
"report_id": bargain.report_id_liu
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
if(data.data.is_show == 1) {
$('.envelope-list').show();
bargain.report_id_show = 1;
}else{
$('.envelope-list').hide();
bargain.report_id_show = 0;
}
} else {
alert('获取失败!');
}
}
});
},
bargaininfoSave: function() { //修改报告详情
if(!bargain.isBargaininfoSaveIngFlag){
bargain.isBargaininfoSaveIngFlag = true;
......@@ -1382,11 +1430,20 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
var _role = _$v.attr('data-role');//盘方等类型
var _scaleVal = $.trim(_$v.find('.detail-modal-maid-span-scale').html());//分佣比例
var _shouldCommissionVal = $.trim(_$v.find('.detail-modal-maid-td-should-commission').html());//应分佣金
if(bargain.report_id_show == 1){
var _dataTemp = {
'report_id': bargain.report_id_liu,
'bargain_id': _$v.attr('data-id'),//成交报告id
'last_commission_id': _$v.attr('lastid')?_$v.attr('lastid'):0,//最后一个提交的记录id
'is_account_commission': type//0是保存,1是确认分佣
};
}
}else{
var _dataTemp = {
'bargain_id': _$v.attr('data-id'),//成交报告id
'last_commission_id': _$v.attr('lastid')?_$v.attr('lastid'):0,//最后一个提交的记录id
'is_account_commission': type//0是保存,1是确认分佣
}
}
if((type == '1') && (_scaleVal == '' || _shouldCommissionVal == '')){
//如果是确认分佣,则每项必填。保存,则不加限制
_stopFlag = true;
......
......@@ -234,11 +234,11 @@
[% for(var item in it){ %]
<tr class="text-center">
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['bargain_id'] %]</td>
<td>[%= it[item]['income_time'] %]</td>
<td>[%= it[item]['name'] %]</td>
<td>[%= it[item]['current_agent_name'] %]</td>
<td>[%= it[item]['store_name'] %]</td>
<td>[%= it[item]['user_type'] %]</td>
<td>[%= it[item]['title'] %]</td>
<td>[%= it[item]['validity'] %]</td>
<td>[%= it[item]['id'] %]</td>
<td>[%= it[item]['phone'] %]</td>
</tr>
[% } %]
[% }else{ %]
......
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