Commit 013ec70a authored by hujun's avatar hujun

Merge remote-tracking branch 'origin/test' into test

parents db540187 f0eed555
...@@ -238,7 +238,7 @@ class PerformanceService ...@@ -238,7 +238,7 @@ class PerformanceService
} }
$params["house_ids"] = $ids; $params["house_ids"] = $ids;
} }
$condition['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) ); $params['create_time'] = array( 'between', array( $start_time . " 00:00:00", $end_time . " 23:59:59" ) );
break; break;
} }
......
...@@ -20,18 +20,35 @@ ...@@ -20,18 +20,35 @@
.left{ .left{
float: left; float: left;
width: 340px; width: 340px;
line-height: 30px; line-height: 36px;
} }
.right{ .right{
line-height: 30px; line-height: 36px;
} }
.btn_2{ .btn_2{
width: 60px; width: 60px;
display: inline-block; display: inline-block;
height: 26px; height: 26px;
padding: 3px 6px padding: 3px 6px
} }
.edit_new{
float: right;
margin-bottom: 5px;
margin-top: -10px;
}
.form-control-one{
display: inline-block;
width: 40%;
}
#form_search{
line-height: 48px;
}
.modal-body-two{
height: 500px;
overflow-y: scroll;
}
</style> </style>
<div id="page-content-wrapper"> <div id="page-content-wrapper">
<div class="container"> <div class="container">
...@@ -39,7 +56,7 @@ ...@@ -39,7 +56,7 @@
<div class="col-lg-10 col-lg-offset-0"> <div class="col-lg-10 col-lg-offset-0">
<div class="panel panel-default"> <div class="panel panel-default">
<div class="panel-heading breadcrumb"> <div class="panel-heading breadcrumb">
<li><a href="#">成交报告-未接单</a></li> <li><a href="#">成交报告-未接单8</a></li>
</div> </div>
<div class="panel-body"> <div class="panel-body">
<div class="table-responsive"> <div class="table-responsive">
...@@ -91,11 +108,11 @@ ...@@ -91,11 +108,11 @@
</button> </button>
<h4 class="modal-title"> <h4 class="modal-title">
<span class="btn btn-info" id="information">成交信息</span> <span class="btn btn-info" id="information">成交信息</span>
<span class="btn btn-info" id="fees">分佣提成</span> <span class="btn btn-default caozuo" id="fees">分佣提成</span>
<span class="btn btn-info" id="records">收款记录</span> <span class="btn btn-default" id="records">收款记录</span>
</h4> </h4>
</div> </div>
<div class="modal-body"> <div class="modal-body modal-body-two">
<div class="Tswitch"> <div class="Tswitch">
<div class="left"> <div class="left">
<span>商铺地址:</span><span class="internal_address"></span><br> <span>商铺地址:</span><span class="internal_address"></span><br>
...@@ -108,8 +125,27 @@ ...@@ -108,8 +125,27 @@
<span>客户电话:</span><span class="user_phone"></span><br> <span>客户电话:</span><span class="user_phone"></span><br>
<span>提交日期:</span><span class="create_time"></span><br> <span>提交日期:</span><span class="create_time"></span><br>
</div> </div>
<input type="hidden" class="page-pass"/>
</div> </div>
<div class="Tswitch Tswitch_one">分佣提成 <br> <div class="Tswitch Tswitch_one">
<!--分佣提成-->
<a class="btn btn-success edit_new" href="#modal-new" data-toggle="modal">新增</a>
<table class="table table-striped table-bordered table-hover table-condensed" id="caozuo_hide">
<thead>
<tr>
<th class="text-center">分佣方</th>
<th class="text-center">业务员</th>
<th class="text-center">所属门店</th>
<th class="text-center">分佣比例</th>
<th class="text-center">应分佣金(元)</th>
<th class="text-center">实分佣金</th>
<th class="text-center">备注</th>
</tr>
</thead>
<tbody class="text-center" id="caozuo_table">
</table>
<!--分佣提成-->
</div> </div>
<div class="Tswitch Tswitch_two">收款记录</div> <div class="Tswitch Tswitch_two">收款记录</div>
...@@ -201,13 +237,56 @@ ...@@ -201,13 +237,56 @@
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">关闭 <button type="button" class="btn btn-default" data-dismiss="modal">关闭
</button> </button>
<button type="button" class="btn btn-primary" id="confirm_delete"> <button type="button" class="btn btn-primary" id=" ">
删除 删除
</button> </button>
</div> </div>
</div><!-- /.modal-content --> </div><!-- /.modal-content -->
</div><!-- /.modal --> </div><!-- /.modal -->
</div> </div>
<!-- 分佣提成新增 -->
<div class="modal fade" id="modal-new" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">
×
</button>
<h4 class="modal-title">
新增分佣提成
</h4>
</div>
<div class="modal-body">
<div class="modal-body" id="">
<!-- 新增分佣提成 -->
<form id="form_search">
分佣方:&nbsp;&nbsp;&nbsp;<select class="form-control form-control-one" id="is_carefully_chosen">
<option value="0">请选择</option>
<option value="1">盘方</option>
<option value="2">客方</option>
<option value="3">反签</option>
<option value="4">独家</option>
<option value="5">合作方</option>
</select><br>
<span>业务员:&nbsp;&nbsp;&nbsp;</span><input class="form-control form-control-one" data-rule-phoneus="false" data-rule-required="false" id=" " placeholder="" type="text" value=""><br>
<span>所属门店:</span><input class="form-control form-control-one" data-rule-phoneus="false" data-rule-required="false" id=" " placeholder="" type="text" value=""><br>
<span>分佣比例:</span><input class="form-control form-control-one" data-rule-phoneus="false" data-rule-required="false" id="commission-rate" placeholder="" type="text" value=""><br>
<span>应分佣金:</span><input class="form-control form-control-one" data-rule-phoneus="false" data-rule-required="false" id="should-commission" placeholder="" type="text" value=""><br>
</form>
<!-- 新增分佣提成 -->
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-default" data-dismiss="modal">取消
</button>
<button type="button" class="btn btn-primary" data-dismiss="modal" id="new-commission">
确定
</button>
</div>
</div><!-- /.modal-content -->
</div><!-- /.modal -->
</div>
...@@ -565,8 +565,8 @@ ...@@ -565,8 +565,8 @@
<input type="text" class="form-control" id="yingyeTime" data-alert="请填写营业时间!"> <input type="text" class="form-control" id="yingyeTime" data-alert="请填写营业时间!">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="">开盘时间</label> <label for="">招商时间</label>
<input type="date" class="form-control" id="kaipanTime" data-alert="请开盘开盘时间!"> <input type="date" class="form-control" id="kaipanTime" data-alert="请开盘招商时间!">
</div> </div>
<div class="form-group"> <div class="form-group">
<label for="">开业时间</label> <label for="">开业时间</label>
......
...@@ -69,8 +69,8 @@ ...@@ -69,8 +69,8 @@
$(".shy_area").html(response.data.market_area + '㎡'); $(".shy_area").html(response.data.market_area + '㎡');
$(".b3_span2").html(response.data.industry_type); $(".b3_span2").html(response.data.industry_type);
$(".b3_spanhao").html(response.data.id); $(".b3_spanhao").html(response.data.id);
$(".b3_span3").html(response.data.traffic); $(".b3_span3").html(response.data.enter_num);
$(".b4_font_p1").html(response.data.enter_num); $(".b4_font_p1").html(response.item_advantage);
$(".b5_font_p1").html(response.data.sign_rule); $(".b5_font_p1").html(response.data.sign_rule);
b4_font = '<p class="b4_font_p">详细信息</p>' + b4_font = '<p class="b4_font_p">详细信息</p>' +
'<p class="b4_font2">营业时间:<span class="b4_span1 gw">' + response.data.do_business_date + '</span></p>' + '<p class="b4_font2">营业时间:<span class="b4_span1 gw">' + response.data.do_business_date + '</span></p>' +
......
...@@ -95,10 +95,12 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () { ...@@ -95,10 +95,12 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
var _data = data['data']; var _data = data['data'];
if (data.code == 200) { if (data.code == 200) {
_objThis.upload_id = _data['upload_id']; _objThis.upload_id = _data['upload_id'];
_shangpuTypeObj.val(_data['shop_type']).change().attr({ if(_data['shop_type'] !== undefined){
'disabled': 'disabled', _shangpuTypeObj.val(_data['shop_type']).change().attr({
'title': '商铺类型暂不支持修改' 'disabled': 'disabled',
}); 'title': '商铺类型暂不支持修改'
});
}
_showCdObj.val(_data['is_show']).change(); _showCdObj.val(_data['is_show']).change();
_exclusiveTypeObj.val(_data['is_exclusive_type']).change(); _exclusiveTypeObj.val(_data['is_exclusive_type']).change();
if(_data['shop_type'] == '0'){ if(_data['shop_type'] == '0'){
...@@ -174,10 +176,11 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () { ...@@ -174,10 +176,11 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
$.each(_yetaiObj, function(i, item) { $.each(_yetaiObj, function(i, item) {
~_data['industry_type'].indexOf(item.value) && (item.checked = 'checked'); ~_data['industry_type'].indexOf(item.value) && (item.checked = 'checked');
}); });
$.each(_roomTagObj, function(i, item) { _data['shop_sign'] && $.each(_roomTagObj, function(i, item) {
~_data['shop_sign'].indexOf(item.value) && (item.checked = 'checked'); ~_data['shop_sign'].indexOf(item.value) && (item.checked = 'checked');
}); });
//房东手机号 //房东手机号
var _landlordNum = 0; var _landlordNum = 0;
$.each(_data['landlord_phone'].split(','), function(i, item) { $.each(_data['landlord_phone'].split(','), function(i, item) {
...@@ -213,8 +216,8 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () { ...@@ -213,8 +216,8 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
_trafficObj.val(_data['traffic']);//交通 _trafficObj.val(_data['traffic']);//交通
_hasMovedObj.val(_data['enter_num']);//已入住 _hasMovedObj.val(_data['enter_num']);//已入住
_yingyeTimeObj.val(_data['do_business_date']);//营业时间 _yingyeTimeObj.val(_data['do_business_date']);//营业时间
_kaipanTimeObj.val(_data['opening_date'].split(' ')[0]);//开盘时间 _data['opening_date'] && _kaipanTimeObj.val(_data['opening_date'].split(' ')[0]);//开盘时间
_kaiyeTimeObj.val(_data['start_business_date'].split(' ')[0]);//开业时间 _data['start_business_date'] && _kaiyeTimeObj.val(_data['start_business_date'].split(' ')[0]);//开业时间
_hasGasObj.val(_data['is_has_gas']);//是否有燃气 _hasGasObj.val(_data['is_has_gas']);//是否有燃气
_yongjinRuleObj.val(_data['fee_rule']);//佣金规则 _yongjinRuleObj.val(_data['fee_rule']);//佣金规则
_internalYoushiObj.val(_data['internal_item_advantage']);//对内项目优势 _internalYoushiObj.val(_data['internal_item_advantage']);//对内项目优势
...@@ -242,7 +245,7 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () { ...@@ -242,7 +245,7 @@ define (['ckfinder','ckfinderStart', 'bootstrapJs'], function () {
}; };
//附件 //附件
_pdfUploadFujian.html('<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({ _data['file_path'] && _pdfUploadFujian.html('<li class="pdf-pre-li"><a class="pdf-pre-a" href="{0}" target="_blank" title="点击查看">{1}</a><a href="javascript:;" class="delet-pic-btn">删除</a></li>'.stringFormatObj({
'0': _urlCut + _data['file_path'], '0': _urlCut + _data['file_path'],
'1': dealFileName(decodeURI(_data['file_path'].slice(_data['file_path'].lastIndexOf('/')+1))) '1': dealFileName(decodeURI(_data['file_path'].slice(_data['file_path'].lastIndexOf('/')+1)))
})); }));
......
...@@ -36,10 +36,17 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -36,10 +36,17 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
follow.Edit(); follow.Edit();
}); });
$ (document).delegate ("#confirm_edit", "click", function () {//点击操作跟进详情 $ (document).delegate ("#confirm_edit", "click", function () {//点击操作跟进详情
follow.house_id = $ (this).attr ("data-id");
follow.confirmEdit(); follow.confirmEdit();
}); });
// =========三个按钮========= $ (document).delegate (".caozuo", "click", function () {//点击分佣提成
follow.Caozuo();
});
// 点击新增分佣提成
$ (document).delegate ("#new-commission", "click", function () {//点击分佣提成
follow.newCommission();
follow.Caozuo();
});
//table切换
$ (document).delegate ("#information", "click", function () {//点击操作跟进详情 $ (document).delegate ("#information", "click", function () {//点击操作跟进详情
follow.Information(); follow.Information();
}); });
...@@ -48,9 +55,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -48,9 +55,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
}); });
$ (document).delegate ("#records", "click", function () {//点击操作跟进详情 $ (document).delegate ("#records", "click", function () {//点击操作跟进详情
follow.Records(); follow.Records();
}); });
// ===================
$ (document).delegate (".submit_edit", "click", function () {//提交 $ (document).delegate (".submit_edit", "click", function () {//提交
follow.house_id = $ (this).attr ("data-id"); follow.house_id = $ (this).attr ("data-id");
follow.Submit_follow(); follow.Submit_follow();
...@@ -98,7 +103,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -98,7 +103,6 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
// 时间轴
Timeline:function(){//获取时间轴 Timeline:function(){//获取时间轴
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
...@@ -116,8 +120,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -116,8 +120,10 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
// 编辑 Edit:function(){//报告详情
Edit:function(){//报告详情 $(".Tswitch").eq(0).show();
$(".Tswitch").eq(1).hide();
$(".Tswitch").eq(2).hide();
$.ajax({ $.ajax({
'type': 'GET', 'type': 'GET',
'url' : '/index/bargainInfo', 'url' : '/index/bargainInfo',
...@@ -125,8 +131,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -125,8 +131,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
dataType: "json", dataType: "json",
success: function(data){ success: function(data){
if(data.code == 200){ if(data.code == 200){
if (data.data) { if (data.data) {
console.log(data.data.commission);
$(".create_time").html(data.data.create_time); $(".create_time").html(data.data.create_time);
$(".user_phone").html(data.data.user_phone); $(".user_phone").html(data.data.user_phone);
$(".user_name").html(data.data.user_name); $(".user_name").html(data.data.user_name);
...@@ -142,10 +147,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -142,10 +147,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
}); });
}, },
confirmEdit:function(){//修改报告详情 confirmEdit:function(){//修改报告详情
console.log(22);
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
'url' : '/index/bargainInfo', 'url' : '/index/editBargainInfo',
data: { "id":follow.house_id, data: { "id":follow.house_id,
"scale_fee":$(".commission").val(), "scale_fee":$(".commission").val(),
"practical_fee":$(".practical_fee").val() "practical_fee":$(".practical_fee").val()
...@@ -153,15 +157,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -153,15 +157,7 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
dataType: "json", dataType: "json",
success: function(data){ success: function(data){
if(data.code == 200){ if(data.code == 200){
if (data.data) { if (data.data) {
// console.log(data.data.commission);
// $(".create_time").html(data.data.create_time);
// $(".user_phone").html(data.data.user_phone);
// $(".user_name").html(data.data.user_name);
// $(".internal_address").html(data.data.internal_address);
// $(".internal_title").html(data.data.internal_title);
// $(".commission").val(data.data.commission);
// $(".practical_fee").val(data.data.practical_fee);
} }
} else { } else {
alert('获取失败!'); alert('获取失败!');
...@@ -169,28 +165,95 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -169,28 +165,95 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
Caozuo:function(){//分佣提成获取跟进详情的数据
$.ajax({
'type': 'GET',
'url' : '/index/commissionList',
data: {"id":follow.house_id},
dataType: "json",
success: function(data){
if(data.code == 200){
if (data.data) {
var caozuo_table="";
$.each(data['data'], function(i, item) {
caozuo_table +='<tr><td>'+item.role+'</td><td>'+item.agent_name+'</td><td>'+item.store_name
+'</td><td>'+item.scale+'</td><td>'+item.scale_fee+'</td><td>'+item.practical_fee+'</td><td>'+item.content+'</td></tr>';
});
$("#caozuo_table").html(caozuo_table);
$("#caozuo_table tr").each(function (e) { //不能为空
var temp = $("#caozuo_table").find("tr").eq(e).find("td").eq(6).html(); //获取一列的值
if(temp=='null'){
$("#caozuo_table").find("tr").eq(e).find("td").eq(6).html(" ")
}
});
}
} else {
alert('获取失败!');
}
}
});
},
// 新增分佣提成
newCommission:function(){//新增分佣提成
$.ajax({
'type': 'POST',
'url' : '/index/addBargain',
data: {"id":follow.house_id,
"role":$("#is_carefully_chosen").val(),
"scale":$("#commission-rate").val(),
"scale_fee":$("#should-commission").val(),
},
dataType: "json",
success: function(data){
if(data.code == 200){
if (data.data) {
console.log(666);
}
} else {
alert('获取失败!');
}
}
});
},
// 新增分佣提成
// table切换
// ===========666=========
Information:function(){ Information:function(){
$(".Tswitch").eq(0).show(); $(".Tswitch").eq(0).show();
$(".Tswitch").eq(1).hide(); $(".Tswitch").eq(1).hide();
$(".Tswitch").eq(2).hide(); $(".Tswitch").eq(2).hide();
$("#information").removeClass("btn-default");
$("#information").addClass("btn-info");
$("#fees").removeClass("btn-info");
$("#fees").addClass("btn-default");
$("#records").removeClass("btn-info");
$("#records").addClass("btn-default");
}, },
Fees:function(){ Fees:function(){
$(".Tswitch").eq(0).hide(); $(".Tswitch").eq(0).hide();
$(".Tswitch").eq(1).show(); $(".Tswitch").eq(1).show();
$(".Tswitch").eq(2).hide(); $(".Tswitch").eq(2).hide();
$("#information").removeClass("btn-info");
$("#information").addClass("btn-default");
$("#fees").removeClass("btn-default");
$("#fees").addClass("btn-info");
$("#records").removeClass("btn-info");
$("#records").addClass("btn-default");
}, },
Records:function(){ Records:function(){
$(".Tswitch").eq(0).hide(); $(".Tswitch").eq(0).hide();
$(".Tswitch").eq(1).hide(); $(".Tswitch").eq(1).hide();
$(".Tswitch").eq(2).show(); $(".Tswitch").eq(2).show();
$("#information").removeClass("btn-info");
$("#information").addClass("btn-default");
$("#fees").removeClass("btn-info");
$("#fees").addClass("btn-default");
$("#records").removeClass("btn-default");
$("#records").addClass("btn-info");
}, },
// =====================
Submit_follow: function() { //提交 Submit_follow: function() { //提交
$.ajax({ $.ajax({
'type': 'POST', 'type': 'POST',
...@@ -212,6 +275,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', ' ...@@ -212,6 +275,9 @@ define(['doT', 'text!temp/reportList_template_tpl.html', 'css!style/home.css', '
} }
}); });
}, },
// 提交新增分佣提成
//提交新增分佣提成
getList: function(pageNo) { getList: function(pageNo) {
follow.pageNo = pageNo; follow.pageNo = pageNo;
var params = {}; var params = {};
......
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