Commit 12106b39 authored by xishifeng's avatar xishifeng

成交信息编辑1

parent 513c16f3
......@@ -143,7 +143,7 @@
<div class="detail-modal-body-sec">
<div class="detail-modal-maid-top-btn-area oh">
<a class="btn btn-success" href="#modal_new_maid" data-toggle="modal">新增</a>
<a id="maid_new_btn" class="btn btn-success" href="javascript:;" data-toggle="modal">增加实收</a>
<a id="maid_new_btn" class="btn btn-primary" data-toggle="modal">增加实收</a>
</div>
<table class="table table-striped table-bordered table-hover table-condensed" id="maid_table_main">
<thead>
......@@ -166,8 +166,8 @@
<td>盘方</td>
<td>刘丹丹-13918937741</td>
<td>同联一部南京东路店</td>
<td>30%</td>
<td>350000</td>
<td contenteditable>30%</td>
<td contenteditable>350000</td>
<td colspan="6" class="detail-modal-maid-mix-td oh">
<div class="oh">
<span contenteditable></span>
......@@ -177,29 +177,30 @@
<span contenteditable></span>
<span></span>
</div>
<!--<div class="oh">
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span></span>
</div>-->
<!--<div class="oh">
</td>
</tr>
<tr>
<td>盘方</td>
<td>刘丹丹-13918937741</td>
<td>同联一部南京东路店</td>
<td contenteditable>30%</td>
<td contenteditable>350000</td>
<td colspan="6" class="detail-modal-maid-mix-td oh">
<div class="oh">
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span contenteditable></span>
<span></span>
</div>-->
</div>
</td>
</tr>
</tbody>
</table>
<div>
<a id="maid_ok_btn" class="btn btn-success" href="javascript:;" data-toggle="modal">确认分佣</a>
<a id="maid_ok_btn" class="btn btn-primary" data-toggle="modal">确认分佣</a>
</div>
<!--分佣提成-->
</div>
......
......@@ -133,18 +133,18 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
$(this).parent().remove();
});
//点击成交信息确定
//详情弹出框,点击成交信息确定
_doc.delegate("#bargaininfo_btn_save", "click", function() {
bargain.bargaininfoSave();
});
// 点击新增分佣提成
//详情弹出框,点击新增分佣提成
_doc.delegate("#new-commission", "click", function() {
bargain.newCommission();
bargain.Caozuo();
});
//点击开票税费下的新增税费,弹出框出来
//详情弹出框,点击开票税费下的新增税费,弹出框出来
_doc.on('click', '[href=\"#modal_new_tax\"]', function(e){
e.preventDefault();
e.stopPropagation();
......@@ -155,7 +155,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
});
});
//新增开票税费,金额输入框输入后,自动计算税费
//详情弹出框,新增开票税费,金额输入框输入后,自动计算税费
_doc.on('input', '#addtax_commission_input', function(e){
e.preventDefault();
e.stopPropagation();
......@@ -166,12 +166,26 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
});
});
//新增开票税费,点击确定时的提交
//详情弹出框,新增开票税费,点击确定时的提交
_doc.on('click', '#addtax_commission_addok', function(e){
e.preventDefault();
e.stopPropagation();
bargain.newAddTaxOk();
});
//详情弹出框,分佣提成里,点击增加实收按钮
_doc.on('click', '#maid_new_btn', function(e){
e.preventDefault();
e.stopPropagation();
layer.open({
content: '确认增加吗?',
btn: ['确定', '取消'],
yes: function(_index){
$('.detail-modal-maid-mix-td').append('<div class="oh"><span contenteditable=""></span><span contenteditable=""></span><span contenteditable=""></span><span contenteditable=""></span><span contenteditable=""></span><span></span></div>');
layer.close(_index);
}
});
});
},
Timeline: function() { //获取时间轴
$.ajax({
......@@ -242,12 +256,11 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
'trade_type': $('.left-deal').val()
};
$.each($('.detail-modal-bargaininfo-commission-sec'), function(i, v) {
var _tempData = {
_data['practical_fee['+i+']'] = {
'fee_id': v.getAttribute('data-id')?v.getAttribute('data-id'):0,
'fee': $.trim($(v).find('input').eq(0).val()),
'operation_date': $.trim($(v).find('input').eq(1).val())
};
console.log(_tempData);
_data['practical_fee['+i+']'] = _tempData;
});
$.ajax({
'type': 'POST',
......@@ -266,6 +279,38 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}
});
},
maidShow: function() {
$.ajax({
type: 'GET',
url: '/index/commissionList',
data: {
'id': bargain.bargain_id
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
//通过
pass: function() { //点击通过
var a_url = '';
......@@ -305,38 +350,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}
});
},
maidShow: function() {
$.ajax({
type: 'GET',
url: '/index/commissionList',
data: {
'id': bargain.bargain_id
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
// 开票税费
taxShow: function() {
$.ajax({
......@@ -450,6 +464,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
'role': v.getAttribute('data-role'),
'scale': v.childNodes[2].innerHTML.split('%')[0]
};
if(_tempTableObj.attr('data-type') === 'edit'){
_data['tax['+i+']']['fee_id'] = v.getAttribute('data-id');
};
});
$.ajax({
type: 'POST',
......
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