Commit e5f9e046 authored by duxinyuan's avatar duxinyuan

commite

parent dff99ddc
......@@ -282,20 +282,25 @@
onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'into_time_start\')}',maxDate:'%y-%M-%d',readOnly:'readonly'})">
<select class="form-control btn2 ld-Marheight" id="changed_type">
<option value="">调整类型</option>
<option value="10">意向金转意向金</option>
<option value="20">意向金转中介</option>
<option value="30">意向金转案场费</option>
<option value="40">保管金转保管金</option>
<option value="50">保管金转案场费</option>
<option value="60">保管金转案场费</option>
<option value="1">意向金转中介费</option>
<option value="2">意向金转案场</option>
<option value="3">意向金转意向金</option>
<option value="4">保管金转中介费</option>
<option value="5">保管金转案场费</option>
<option value="6">保管金转保管金</option>
</select>
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="changed_id" placeholder="调整ID" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="looked_id" placeholder="调整前带看ID" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shoped_id" placeholder="调整前商铺ID" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="shoped_addr" placeholder="调整前商铺地址" type="text" value="">
<select class="form-control btn2 ld-Marheight" id="commit_home">
<option value="">提交人所在部门</option>
</select>
<select class="form-control btn2 ld-Marheight" id="commit_shop">
<option value="">提交人所在门店</option>
</select>
<!--<select class="form-control btn2 ld-Marheight" id="commit_home">
<option value="">提交人所在部门</option>
<option value="0">一部</option>
<option value="1">二部</option>
</select>
......@@ -303,7 +308,7 @@
<option value="">提交人所在门店</option>
<option value="0">一店</option>
<option value="1">二店</option>
</select>
</select>-->
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="comit_name" placeholder="提交人姓名" type="text" value="">
<input class="form-control btn2 ld-Marheight" data-rule-phoneus="false" data-rule-required="false" id="comit_phone" placeholder="提交人手机号" type="text" value="">
<span class="btn btn-info btn3 ld-Marheight" id="search" style="float:left">搜索</span>
......@@ -384,7 +389,7 @@
<div class="col-xs-12">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">调整金额:</span></strong>
<span id="change_price" class="col-xs-6 ld-Marheight">上海市南京东路123号</span>
<span id="after_into_price" class="col-xs-6 ld-Marheight"></span>
</div>
</div>
</div>
......@@ -483,12 +488,12 @@
<span id="after_into_type" class="col-xs-6 ld-Marheight"></span>
</div>
</div>
<div class="col-xs-12">
<!--<div class="col-xs-12">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">入账金额:</span></strong>
<span id="after_into_price" class="col-xs-6 ld-Marheight"></span>
</div>
</div>
</div>-->
</div>
</div>
</form>
......
......@@ -14,6 +14,20 @@
list-style: none;
line-height: 20px;
}
.intoIdArea{
float: left;
position: relative;
overflow-y:scroll ;
height:100px;
left: 0px;
width:100%;
line-height: 30px;
}
.intoIdArea li{
list-style: none;
line-height: 20px;
}
ul {
-webkit-padding-start: 0px !important;
}
......@@ -447,25 +461,28 @@
<ul class="reportArea" style="display:none"></ul></div>
</div>
</div>
<div class="col-xs-6 rep">
<div class="col-xs-12">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">调整后商铺ID:</span></strong>
<span id="shop_id_change" class="col-xs-6 ld-Marheight"></span>
<strong><span class="col-xs-2 ld-Marheight">调整后带看ID:</span></strong>
<div class="col-xs-9" style="padding:0px 10px 0px 5px;"><input class="form-control" type="text" value="" id="into_id_change" />
<ul class="intoIdArea" style="display:none"></ul></div>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="into_id_change" readonly="true"/></div>-->
<!--<span id="into_id_change" class="col-xs-6 ld-Marheight"></span>-->
</div>
</div>
<div class="col-xs-6 rep">
<div class="col-xs-6">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">调整后商铺地址:</span></strong>
<span id="shop_addr_change" class="col-xs-6 ld-Marheight">123456</span>
<strong><span class="col-xs-4 ld-Marheight">调整后商铺ID:</span></strong>
<span id="shop_id_change" class="col-xs-6 ld-Marheight"></span>
</div>
</div>
<div class="col-xs-6">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">调整后带看ID:</span></strong>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="into_id_change" readonly="true"/></div>-->
<span id="into_id_change" class="col-xs-6 ld-Marheight"></span>
<strong><span class="col-xs-4 ld-Marheight">调整后商铺地址:</span></strong>
<span id="shop_addr_change" class="col-xs-6 ld-Marheight">123456</span>
</div>
</div>
<div class="col-xs-6 choose_topic_1">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">是否分红:</span></strong>
......@@ -730,7 +747,7 @@
</div>
</div>
<div class="col-xs-12">
<div class="col-xs-6">
<div class="col-xs-6 ky">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">是否开业:</span></strong>
<!--<div class="col-xs-6">-->
......@@ -753,6 +770,8 @@
</div>
</div>
</div>
</div>
<div class="col-xs-12">
<div class="col-xs-6">
<div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">来源:</span></strong>
......
......@@ -70,8 +70,66 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
$(document).on('click','#count',function(e){
that.countValue();
});
//二级联动
that.getDistrict(function() {
_doc.on('input', '#commit_home', function() {
var _this = $(this);
var _id = $('#commit_home').val();
$('#commit_shop').html(''); //先清空
if(_id && _id != '0') {
that.getDistrictStoreList(_id, function(_data) {
var _str = '<option value="0">全部</option>';
$.each(_data, function(i, item) {
_str += '<option value="' + item.id + '">' + item.store_name + '</option>';
});
$('#commit_shop').append(_str)
});
} else {};
});
});
},
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
type: 'GET',
async: true,
data: {
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
var str = '';
$.each(data.data, function(i, item) {
str += '<option value="' + item.id + '">' + item.district_name + '</option>';
});
$('#commit_home').append(str);
fn && fn();
}
}
});
},
getDistrictStoreList: function(id, fn) {
$.ajax({
url: '/index/getDistrictStoreList',
type: 'GET',
async: true,
data: {
'id': id,
"pageSize": 1000
},
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
fn && fn(data.data);
}
}
});
},
countValue : function(){
var that = adjustment ;
var data = that.listData ;
......@@ -95,7 +153,7 @@ define(['doT', 'text!temp/adjustment_template_tpl.html', 'css!style/home.css', '
setValue : function(data){
var that = adjustment ;
$('#change_id').text(data.id);
$('#change_price').text("");
// $('#change_price').text("");
console.log(data.adjustment_old)
$('#befor_into_id').text(data.adjustment_old[0].id);
$('#befor_order_id').text(data.adjustment_old[0].order_id);
......
......@@ -175,12 +175,10 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$('#change_type').val(91);
$('.baoguanjin').hide();
$('.yixiangjin').show();
} else {
$('#change_type').val(91);
$('.yixiangjin').hide();
$('.baoguanjin').show();
}
that.yetai = "" ;
that.changeType(order_id);
......@@ -250,11 +248,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
//todo list detail
});
//成交报告搜索
$(document).on("input", "#report_id_change", function() { //手机号新增搜索客方
var val = $('#report_id_change').val()
var data = that.getReportDataByDetail(val);
if($("#report_id_change").val() == '') {
$(".user-ul").html('');
var tag = "";
// tag += '<li class="hideLI" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + status + '</li>';
$('#reportArea').append(tag);
......@@ -262,10 +260,27 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
that.search_phone();
}
});
//带看id搜索
$(document).on("input", "#into_id_change", function() {
var val = $('#into_id_change').val()
var data = that.getReportDataByDetail(val);
if($("#into_id_change").val() == '') {
var tag = "";
// tag += '<li class="hideLI" data-id="' + item.id + '">' + item.id + '-' + item.name + '-' + item.phone + status + '</li>';
$('#intoIdArea').append(tag);
} else {
that.search_into();
}
});
//点击li 列表消失
$(document).delegate(".reportIdBuild", "click", function() { //list消失新增客户 点击li事件 获取id ul消失
$(document).delegate(".reportIdBuild", "click", function() {
that.reportIdBuild(this);
});
$(document).delegate(".intoIdBuild", "click", function() {
that.intoIdBuild(this);
});
});
......@@ -313,20 +328,34 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
},
//将li里的值 赋给input(分佣方姓名)
intoIdBuild: function(obj) {//新增客户 input赋值
var that = receiv ;
that.intoId_a = $(obj).attr("data-id");
$("#into_id_change").val($(obj).attr("data-id"));
$(".intoIdArea").html('');
$('.intoIdArea').hide();
$('#shop_addr_change').text($(obj).attr("data-addr"));
// $('#into_id_change').text($(obj).attr("data-order_id"));
$('#shop_id_change_shop').text($(obj).attr("data-house_number"));
$('#shop_id_change').text($(obj).attr("data-house_number"));
that.houseNmuber = $(obj).attr("data-house_number");
},
//将li里的值 赋给input(分佣方姓名)
reportIdBuild: function(obj) {//新增客户 input赋值
var that = receiv ;
that.report_id_a = $(obj).attr("data-id");
var user_ht = $(obj).html()+'';
var user_ht_str=user_ht.substring(0,user_ht.length-3);
$("#report_id_change").val($(obj).attr("data-id"));
$(".reportArea").html('');
$('.reportArea').hide();
$('#shop_addr_change').text($(obj).attr("data-addr"));
$('#into_id_change').text($(obj).attr("data-order_id"));
// $('#into_id_change').text($(obj).attr("data-order_id"));
$('#shop_id_change_shop').text($(obj).attr("data-house_number"));
$('#shop_id_change').text($(obj).attr("data-house_number"));
that.houseNmuber = $(obj).attr("data-house_number");
$('#into_id_change').attr("readonly","readonly");
$('#into_id_change').val(1)
},
search_phone : function(){
......@@ -361,6 +390,38 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
});
},
search_into : function(){
var that = receiv ;
$.ajax({
url: '/broker/searchOrder',
type: 'GET',
async: true,
data: {
"type" : 6,
"search_keyword": $("#into_id_change").val(),
"is_all":1,
'page_no' : 1,
'page_size' : 20 ,
'AuthToken' : JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))).AuthToken,
'agent_id' : JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))).id
},
dataType: 'json',
success: function(data) {
if(data.code == 200) {
var user_ul = "";
$.each(data.data, function(i, item) {
user_ul += '<li class="intoIdBuild" data-house_number="'+item.house_id+'"data-order_id="'+item.order_id+'" data-addr="'+item.house_address+'" data-id="' + item.id + '">' + item.house_address + ',商铺ID:+' + item.house_id + ',带看ID' + item.id+'</li>';
});
$('.intoIdArea').show();
$(".intoIdArea").html(user_ul);
} else {
alert(data.msg);
}
}
});
},
getDistrict: function(fn) {
$.ajax({
url: '/index/getDistrict',
......@@ -423,16 +484,15 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
if ( val == "意向金") {
$('.choose_topic_1').hide();
$('.choose_topic_2').show();
$('.rep').show();
$('.rep').hide();
} else if ( val == '保管金' ) {
$('.choose_topic_1').hide();
$('.choose_topic_2').show();
$('.rep').hide();
$('.rep').show();
} else {
$('.choose_topic_2').hide();
$('.choose_topic_1').show();
$('.rep').hide();
$('.rep').show();
}
},
......@@ -824,7 +884,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
doc.find("#shouxu").val(data.transaction_fee);
doc.find("#realPrice").val(data.real_money);
doc.find("#getPrice").text(((data.price-0)*0.7 )+ "元");
doc.find("#morePrice").text(data.money - ((data.price-0)*0.7) + "元");
doc.find("#morePrice").text(Math.floor((data.money - ((data.price-0)*0.7))*100)/100 + "元");
$("#person").text(data.current_agent_name);
$("#belongT").text(data.store_name);
doc.find("#payType").val(data.pay_type);
......@@ -846,6 +906,11 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
} else {
$('.xqac').hide();
}
if ( data.type == 10 || data.type == 30) {
$('.ky').hide();
} else {
$('.ky').show();
}
},
/**
* 调整
......
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