Commit 028ff8ec authored by xishifeng's avatar xishifeng

成交报告1

parent 5cf069d6
......@@ -171,7 +171,7 @@
<div class="detail-modal-body-sec">
<div>
<div class="tc">
<a class="btn btn-success" href="#modal_new_shuifee" data-toggle="modal">新增开票</a>
<a class="btn btn-success" href="#modal_new_tax" data-toggle="modal">新增开票</a>
</div>
<div id="tax_main_box">
<!--内容为模板生成-->
......@@ -291,7 +291,7 @@
</div>
<!-- 弹出框 开票税费新增 -->
<div class="modal fade" id="modal_new_shuifee" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal fade" id="modal_new_tax" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
......@@ -303,17 +303,17 @@
<div class="modal-body">
<div>
<div>
<div class="form-group input-box-0521">
<div class="form-group detail-modal-tax-commission-sec">
<label class="">开票金额:</label>
<div class="input-group"><input type="number" class="form-control input-100-width" placeholder="请输入">
<div class="input-group"><input type="number" class="form-control" placeholder="请输入" id="">
<div class="input-group-addon"></div>
</div>
<label class="">开票日期:</label>
<div class="input-group"><input type="date" class="form-control input-100-width" placeholder="请输入"></div>
<div class="input-group"><input type="date" class="form-control" placeholder="请输入"></div>
</div>
<div>
<table class="table-haveborder table-new-shuifee">
<tr>
<table class="table-haveborder addtax-modal-tax-table">
<!--<tr>
<td>分佣方</td>
<td>业务员</td>
<td>分佣比例</td>
......@@ -324,7 +324,7 @@
<td></td>
<td></td>
<td></td>
</tr>
</tr>-->
</table>
</div>
</div>
......
......@@ -58,24 +58,29 @@ pass-modal-
clear: both;
}
.detail-modal-bargaininfo-commission-sec {
.detail-modal-bargaininfo-commission-sec,
.detail-modal-tax-commission-sec {
overflow: hidden;
}
.detail-modal-bargaininfo-commission-sec>label {
.detail-modal-bargaininfo-commission-sec>label,
.detail-modal-tax-commission-sec>label {
float: left;
}
.detail-modal-bargaininfo-commission-sec>label:nth-of-type(2) {
.detail-modal-bargaininfo-commission-sec>label:nth-of-type(2),
.detail-modal-tax-commission-sec>label:nth-of-type(2) {
margin-left: 50px;
}
.detail-modal-bargaininfo-commission-sec>div {
.detail-modal-bargaininfo-commission-sec>div,
.detail-modal-tax-commission-sec>div {
float: left;
width: 160px;
}
.detail-modal-bargaininfo-commission-sec>mark {
.detail-modal-bargaininfo-commission-sec>mark,
.detail-modal-tax-commission-sec>mark {
float: left;
overflow: hidden;
background-color: transparent;
......@@ -83,7 +88,8 @@ pass-modal-
padding-left: 10px;
}
.detail-modal-bargaininfo-commission-sec>mark>img {
.detail-modal-bargaininfo-commission-sec>mark>img,
.detail-modal-tax-commission-sec>mark>img {
float: left;
width: 20px;
}
......@@ -102,10 +108,10 @@ pass-modal-
/*详情弹出框,开票税费*/
.detail-modal-tax-table{
.addtax-modal-tax-table{
width:600px;
}
.detail-modal-tax-table td{
.addtax-modal-tax-table td{
line-height: 36px;
text-align: center;
}
......@@ -128,12 +134,12 @@ pass-modal-
padding-top: 50px;
}
.table-new-shuifee{
.addtax-modal-tax-table{
width: 500px;
margin: 0 auto;
}
.table-new-shuifee td{
.addtax-modal-tax-table td{
text-align: center;
line-height: 40px;
}
......
......@@ -47,6 +47,36 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
bargain.Timeline();
});
//转到一级审核
_doc.on('click', '.maintable-btn-trans-one', function(e){
e.preventDefault();
e.stopPropagation();
bargain.bargain_id = $(this).closest('tr').attr("data-id");
layer.open({
content: '确定转到一级审核?',
btn: ['确定', '取消'],
yes: function(_index){
bargain.transFirstExamine();
layer.close(_index);
}
});
});
//结单
_doc.on('click', '.maintable-btn-account', function(e){
e.preventDefault();
e.stopPropagation();
bargain.bargain_id = $(this).closest('tr').attr("data-id");
layer.open({
content: '确定结单?',
btn: ['确定', '取消'],
yes: function(_index){
bargain.account();
layer.close(_index);
}
});
});
//点击通过,修改全局bargain_id,弹出框出来
_doc.delegate("[href=\"#modal-pass\"]", "click", function() {
bargain.bargain_id = $(this).closest('tr').attr("data-id");
......@@ -74,13 +104,12 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
_this.removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
bargain.detailTabIndex = _this.index();
$('.detail-modal-body-sec:nth-of-type('+(bargain.detailTabIndex+1)+')').show().siblings().hide();
console.log(bargain.detailTabIndex);
if(bargain.detailTabIndex == 0){
bargain.bargaininfoShow();
}else if(bargain.detailTabIndex == 1){
bargain.Fees();
bargain.maidShow();
}else{
bargain.shuiFee();
bargain.taxShow();
}
});
......@@ -115,34 +144,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
bargain.Caozuo();
});
//转到一级审核
_doc.on('click', '.maintable-btn-trans-one', function(e){
e.preventDefault();
e.stopPropagation();
bargain.bargain_id = $(this).closest('tr').attr("data-id");
layer.open({
content: '确定转到一级审核?',
btn: ['确定', '取消'],
yes: function(_index){
bargain.transFirstExamine();
layer.close(_index);
}
});
});
//结单
_doc.on('click', '.maintable-btn-account', function(e){
e.preventDefault();
e.stopPropagation();
bargain.bargain_id = $(this).closest('tr').attr("data-id");
layer.open({
content: '确定结单?',
btn: ['确定', '取消'],
yes: function(_index){
bargain.account();
layer.close(_index);
}
});
//点击开票税费下的新增税费,弹出框出来
_doc.delegate("[href=\"#modal_new_tax\"]", "click", function() {
bargain.newAddTax();
});
},
Timeline: function() { //获取时间轴
......@@ -277,8 +281,40 @@ 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('请求超时,请重试');
};
}
});
},
// 开票税费
shuiFee: function() {
taxShow: function() {
$.ajax({
type: 'GET',
url: '/index/getTallAge',
......@@ -310,6 +346,51 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
}
});
},
newAddTax: function() {
$.ajax({
type: 'GET',
url: '/index/searchBargainAgents',
data: {
'bargain_id': bargain.bargain_id
},
timeout: 30000,
dataType: 'json',
beforeSend: function() {},
success: function(_data) {
if(typeof _data === 'object') {
if(_data['code'] == '200') {
if(_data['data'] && _data['data'].length && _data['data'].length>0){
var _htmlTemp = '<tr><td>分佣方</td><td>业务员</td><td>分佣比例</td><td>税费</td></tr>';
$.each(_data['data'], function(i, v) {
_htmlTemp += '<tr data-id="{id}"><td>{0}</td><td>{1}</td><td>{2}%</td><td contenteditable></td></tr>'.stringFormatObj({
'0': v.role_name,
'1': v.name+'-'+v.phone,
'2': v.scale,
'id': v.id
});
});
$('.addtax-modal-tax-table').html(_htmlTemp);
}else{
layerTipsX(_data['msg']);
};
} else {
layerTipsX(_data['msg']);
}
} else {
layerTipsX('数据错误');
};
},
error: function() {
layerTipsX('enter error');
},
complete: function(xhr, textStatus){
if(textStatus === 'timeout') {
//处理超时的逻辑
layerTipsX('请求超时,请重试');
};
}
});
},
newCommission: function() { //新增分佣提成
$.ajax({
'type': 'POST',
......@@ -420,7 +501,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'text!temp/reportList_s
},
//获取一级审核,二级审核,三级审核,结单不同的ajax请求url
switchUrl: function(){
console.log(this.mainTabIndex);
switch (Number(this.mainTabIndex)){
case 0:
return '/index/reportListOne/1';
......
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