Commit 3e00816c authored by duxinyuan's avatar duxinyuan

commite

parent d027eeb1
...@@ -406,7 +406,7 @@ ...@@ -406,7 +406,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">调整后商铺ID:</span></strong> <strong><span class="col-xs-4 ld-Marheight">调整后商铺ID:</span></strong>
<span id="shop_id_change" class="col-xs-6 ld-Marheight">123456</span> <span id="shop_id_change" class="col-xs-6 ld-Marheight"></span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
...@@ -420,12 +420,12 @@ ...@@ -420,12 +420,12 @@
<strong><span class="col-xs-4 ld-Marheight">调整为:</span></strong> <strong><span class="col-xs-4 ld-Marheight">调整为:</span></strong>
<div class="col-xs-6"> <div class="col-xs-6">
<select class="form-control" id="change_type"> <select class="form-control" id="change_type">
<option class="yixiangjin" value="0">中介费</option> <option class="yixiangjin" value="91">中介费</option>
<option class="yixiangjin" value="1">案场费</option> <option class="yixiangjin" value="92">案场费</option>
<option class="yixiangjin" value="2">意向金</option> <option class="yixiangjin" value="10">意向金</option>
<option class="baoguanjin" value="0">中介费</option> <option class="baoguanjin" value="91">中介费</option>
<option class="baoguanjin" value="1">案场费</option> <option class="baoguanjin" value="92">案场费</option>
<option class="baoguanjin" value="2">保管金</option> <option class="baoguanjin" value="30">保管金</option>
</select> </select>
</div> </div>
</div> </div>
...@@ -433,21 +433,22 @@ ...@@ -433,21 +433,22 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">调整金额(元):</span></strong> <strong><span class="col-xs-4 ld-Marheight">调整金额(元):</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="change_price" /></div> <div class="col-xs-6"><input class="form-control" type="text" value="0" id="change_price" /></div>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>--> <!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div> </div>
</div> </div>
<div class="col-xs-12"> <div class="col-xs-12">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-2 ld-Marheight">成交报告ID:</span></strong> <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="2018" id="report_id_change" /> <div class="col-xs-9" style="padding:0px 10px 0px 5px;"><input class="form-control" type="text" value="" id="report_id_change" />
<ul class="reportArea" style="display:none"></ul></div> <ul class="reportArea" style="display:none"></ul></div>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">调整后带看ID:</span></strong> <strong><span class="col-xs-4 ld-Marheight">调整后带看ID:</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="into_id_change" /></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> </div>
<div class="col-xs-6 choose_topic_1"> <div class="col-xs-6 choose_topic_1">
...@@ -461,10 +462,18 @@ ...@@ -461,10 +462,18 @@
</div> </div>
</div> </div>
</div> </div>
<div class="col-xs-6 choose_topic_2">
<div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">商铺号:</span></strong>
<span id="shop_id_change_shop" class="col-xs-6 ld-Marheight"></span>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="" /></div>-->
</div>
</div>
<div class="col-xs-6 choose_topic_2"> <div class="col-xs-6 choose_topic_2">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-4 ld-Marheight">最后转定时间:</span></strong> <strong><span class="col-xs-4 ld-Marheight">最后转定时间:</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="change_time" /></div> <div class="col-xs-6"><input class="form-control" type="text" value="" id="change_time"
onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',minDate:'#F{ $dp.$D(\'comit_time_start\' )}',maxDate:'%y-%M-%d',readOnly:'readonly'})" /></div>
</div> </div>
</div> </div>
<!--上传图片--> <!--上传图片-->
...@@ -550,7 +559,7 @@ ...@@ -550,7 +559,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">提交时间:</span></strong> <strong><span class="col-xs-3 ld-Marheight">提交时间:</span></strong>
<span id="comit_time" class="col-xs-6 ld-Marheight">2018.12.12 10:00:00</span> <span id="comit_time" class="col-xs-6 ld-Marheight"></span>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
...@@ -578,7 +587,7 @@ ...@@ -578,7 +587,7 @@
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">入账日期:</span></strong> <strong><span class="col-xs-3 ld-Marheight">入账日期:</span></strong>
<div class="col-xs-6"> <div class="col-xs-6">
<input class="form-control" type="text" value="2018.12.12" id="intoDate" <input class="form-control" type="text" value="" id="intoDate"
onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',readOnly:true})"/> onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',readOnly:true})"/>
</div> </div>
</div> </div>
...@@ -589,7 +598,7 @@ ...@@ -589,7 +598,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">入账金额:</span></strong> <strong><span class="col-xs-3 ld-Marheight">入账金额:</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="intoPrice" /></div> <div class="col-xs-6"><input class="form-control" type="text" value="" id="intoPrice" /></div>
<strong><span class="col-xs-2 ld-Marheight"></span></strong> <strong><span class="col-xs-2 ld-Marheight"></span></strong>
</div> </div>
</div> </div>
...@@ -597,14 +606,14 @@ ...@@ -597,14 +606,14 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">手续费:</span></strong> <strong><span class="col-xs-3 ld-Marheight">手续费:</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="shouxu" /></div> <div class="col-xs-6"><input class="form-control" type="text" value="" id="shouxu" /></div>
<strong><span class="col-xs-2 ld-Marheight"></span></strong> <strong><span class="col-xs-2 ld-Marheight"></span></strong>
</div> </div>
</div> </div>
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">实付金额:</span></strong> <strong><span class="col-xs-3 ld-Marheight">实付金额:</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="realPrice" /></div> <div class="col-xs-6"><input class="form-control" type="text" value="" id="realPrice" /></div>
<strong><span class="col-xs-2 ld-Marheight"></span></strong> <strong><span class="col-xs-2 ld-Marheight"></span></strong>
</div> </div>
</div> </div>
...@@ -612,7 +621,7 @@ ...@@ -612,7 +621,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">应收金额:</span></strong> <strong><span class="col-xs-3 ld-Marheight">应收金额:</span></strong>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="getPrice" /></div>--> <!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="getPrice" /></div>-->
<span id="getPrice" class=" col-xs-6 ld-Marheight"></span> <span id="getPrice" class=" col-xs-6 ld-Marheight"></span>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>--> <!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div> </div>
...@@ -620,7 +629,7 @@ ...@@ -620,7 +629,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">多收金额:</span></strong> <strong><span class="col-xs-3 ld-Marheight">多收金额:</span></strong>
<!--<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="morePrice" /></div>--> <!--<div class="col-xs-6"><input class="form-control" type="text" value="" id="morePrice" /></div>-->
<span id="morePrice" class=" col-xs-6 ld-Marheight"></span> <span id="morePrice" class=" col-xs-6 ld-Marheight"></span>
<!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>--> <!--<strong><span class="col-xs-2 ld-Marheight">元</span></strong>-->
</div> </div>
...@@ -648,7 +657,7 @@ ...@@ -648,7 +657,7 @@
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">最后转定时间:</span></strong> <strong><span class="col-xs-3 ld-Marheight">最后转定时间:</span></strong>
<div class="col-xs-6"> <div class="col-xs-6">
<input class="form-control" type="text" value="2018" id="lastTime" <input class="form-control" type="text" value="" id="lastTime"
onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',readOnly:true})"/> onClick="WdatePicker({el:this,dateFmt:'yyyy-MM-dd',maxDate:'%y-%M-%d',readOnly:true})"/>
</div> </div>
</div> </div>
...@@ -677,7 +686,7 @@ ...@@ -677,7 +686,7 @@
<div class="col-xs-6"> <div class="col-xs-6">
<div class="form-group"> <div class="form-group">
<strong><span class="col-xs-3 ld-Marheight">转账户名:</span></strong> <strong><span class="col-xs-3 ld-Marheight">转账户名:</span></strong>
<div class="col-xs-6"><input class="form-control" type="text" value="2018" id="payNo" /></div> <div class="col-xs-6"><input class="form-control" type="text" value="" id="payNo" /></div>
</div> </div>
</div> </div>
</div> </div>
......
...@@ -14,6 +14,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -14,6 +14,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
order_id : '' , order_id : '' ,
order_no : '', order_no : '',
report_id : '' , report_id : '' ,
pay_type : '' ,
type_num : '' ,
houseNmuber : '' ,
init: function() { init: function() {
//初始化dot //初始化dot
$(document.body).append(template); $(document.body).append(template);
...@@ -41,17 +44,20 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -41,17 +44,20 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$(document).on('click','.money_change',function(e){ $(document).on('click','.money_change',function(e){
var id = e.target.dataset.id; var id = e.target.dataset.id;
var type = e.target.dataset.type ; var type = e.target.dataset.type ;
// var item = e.target.dataset.item ;
var order_id = e.target.dataset.order_id ; var order_id = e.target.dataset.order_id ;
that.type_num = e.target.dataset.type_num
that.order_id = order_id ; that.order_id = order_id ;
that.order_no = e.target.dataset.order_no ; that.order_no = e.target.dataset.order_no ;
that.report_id = e.target.dataset.report_id; that.report_id = e.target.dataset.report_id;
that.agent_id = e.target.dataset.agent_id; that.agent_id = e.target.dataset.agent_id;
that.pay_type = e.target.dataset.pay_type;
that.getAllPrice(id); that.getAllPrice(id);
if ( type == "意向金" ){ if ( type == "意向金" ){
$('#change_type').val(91);
$('.baoguanjin').hide(); $('.baoguanjin').hide();
$('.yixiangjin').show(); $('.yixiangjin').show();
} else { } else {
$('#change_type').val(91);
$('.yixiangjin').hide(); $('.yixiangjin').hide();
$('.baoguanjin').show(); $('.baoguanjin').show();
} }
...@@ -91,7 +97,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -91,7 +97,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
//initMoadalData //initMoadalData
that.change_show_hide($('#change_type option:selected').text()); that.change_show_hide($('#change_type option:selected').text());
$('#saveChangeBtn').one('click',function(e){ $('#saveChangeBtn').unbind('click').bind('click',function(e){
that.saveChange(); that.saveChange();
}); });
...@@ -176,6 +182,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -176,6 +182,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
$(".reportArea").html(''); $(".reportArea").html('');
$('.reportArea').hide(); $('.reportArea').hide();
$('#shop_addr_change').text($(obj).attr("data-addr")); $('#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"));
that.houseNmuber = $(obj).attr("data-house_number");
}, },
search_phone : function(){ search_phone : function(){
...@@ -198,7 +207,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -198,7 +207,7 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
if(data.code == 200) { if(data.code == 200) {
var user_ul = ""; var user_ul = "";
$.each(data.data.result, function(i, item) { $.each(data.data.result, function(i, item) {
user_ul += '<li class="reportIdBuild" data-addr="'+item.internal_address+'" data-id="' + item.id + '">' + item.internal_address + ',商铺ID:' + item.house_id + ',成交报告ID' + item.id + ',成交价:' + item.price + ',佣金'+ item.commission +'</li>'; user_ul += '<li class="reportIdBuild" data-house_number="'+item.house_number+'"data-order_id="'+item.order_id+'" data-addr="'+item.internal_address+'" data-id="' + item.id + '">' + item.internal_address + ',商铺ID:' + item.house_id + ',成交报告ID' + item.id + ',成交价:' + item.price + ',佣金'+ item.commission +'</li>';
}); });
$('.reportArea').show(); $('.reportArea').show();
$(".reportArea").html(user_ul); $(".reportArea").html(user_ul);
...@@ -330,31 +339,51 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -330,31 +339,51 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
'report_id' : that.report_id_a ? that.report_id_a : that.report_id, 'report_id' : that.report_id_a ? that.report_id_a : that.report_id,
'industry_type' : that.yetai 'industry_type' : that.yetai
}; };
var jsonArray = [] ;
if ($('#shop_id_change').text()){//商铺ID
params.house_number = $('#shop_id_change').text()
};
var obj = { var obj = {
'pay_type' :10 'pay_type' : that.pay_type
}; };
if ($('#change_type').val()){//调整类型 if ($('#change_type').val()){//调整类型
obj.type = $('#change_type').val() obj.type = that.type_num;
//$('#change_type').val()
}; };
//拼接jsonArray to jsonObject
if ($('#change_price').val()){//调整金额 if ($('#change_price').val()){//调整金额
if ( $('#change_price').val() > 0 ){ if ( $('#change_price').val() > 0 ){
if ($('#change_price').val() -$('#could_price').text() > 0 ){ if ($('#change_price').val() -$('#could_price').text() > 0 ){
alert("超出最大限额"); alert("超出最大限额");
return false;
} else { obj.money = $('#change_price').val();}
} else { } else {
obj.money = $('#change_price').val() alert('请选择调整金额');
return false;
} }
};
var jsonArray = [] ;
jsonArray.push(obj);
params.collecting_bill = JSON.stringify(jsonArray) ;
//条件验证
params.house_number = that.houseNmuber;
if ( $('#change_type').val() == 10 || $('#change_type').val() == 30 ){
if ($('#change_time').val()){//最后转定时间
params.last_transfer_time = $('#change_time').val()
};
// if ($('#shop_id_change_shop').text()){//商铺号
//
// };
} else { } else {
alert('请选择调整金额') if ($('#change_fenhong').text()){//分红
params.is_dividend = $('#change_fenhong').val()
};
} }
if ($('#into_id_change').val()){//带看id
params.into_id_change = $('#into_id_change').val()
}; };
jsonArray.push(obj);
params.collecting_bill = jsonArray ;
//图片数据处理
var pictures = $('.img_area').find('.pictures'); var pictures = $('.img_area').find('.pictures');
var picName = ""; var picName = "";
pictures.each(function(i,event){ pictures.each(function(i,event){
...@@ -364,15 +393,13 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -364,15 +393,13 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
alert("请选择图片"); alert("请选择图片");
return false ; return false ;
} else { } else {
params.picName = picName.substr(0,picName.length-1); params.picName = JSON.stringify(picName.substr(0,picName.length-1).split(","));
} }
console.log(picName.substr(0,picName.length-1));
console.log(params);
//上传数据
$.post('/index/collectingBill',params,function( data ){ $.post('/index/collectingBill',params,function( data ){
console.log(data); console.log(data);
$('modal-linetime').modal('hide'); $('#modal-linetime').modal('hide');
},'json'); },'json');
}, },
...@@ -662,9 +689,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css', ...@@ -662,9 +689,9 @@ define(['doT', 'text!temp/receivables_template_tpl.html', 'css!style/home.css',
var that = receiv; var that = receiv;
console.log("delete the row from the table while id = " + id ); console.log("delete the row from the table while id = " + id );
var params = { var params = {
'id' : id 'pay_id' : id
}; };
$.post('/index/delAdjustment',params , function(data){ $.post('/index/delPayLog',params , function(data){
console.log(data); console.log(data);
that.getList(1); that.getList(1);
},'json') },'json')
......
...@@ -26,9 +26,10 @@ ...@@ -26,9 +26,10 @@
<td> <td>
<a class="btn1 btn-success timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a> <a class="btn1 btn-success timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>时间轴</a>
<a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]'>收款详情</a> <a class="btn1 btn-success add-pic" href="#modal-addPic" data-toggle="modal" data-id='[%= it[item]["id"] %]'>收款详情</a>
[% if( it[item]['type'] == "意向金" || it[item]['type'] == "保管金" ) { %] [% if( it[item]['type_num'] == 10 || it[item]['type_num'] == 30 ) { %]
<a class="btn1 btn-success money_change" href="#modal-linetime" data-toggle="modal" data-order_id=[%= it[item]['order_id'] %] <a class="btn1 btn-success money_change" href="#modal-linetime" data-toggle="modal" data-order_id='[%= it[item]['order_id'] %]'
data-agent_id = '[%= it[item]['agent_id'] %]' data-report_id='[%= it[item]['report_id'] %]' data-agent_id = '[%= it[item]['agent_id'] %]' data-report_id='[%= it[item]['report_id'] %]' data-pay_type='[%= it[item]['pay_type_num'] %]'
data-type_num = '[%= it[item]['type_num'] %]'
data-industry_type='[%= it[item]['industry_type'] %]' data-report='[%= it[item]['report_id'] %]' data-order_no = '[%= it[item]['order_no'] %]' data-industry_type='[%= it[item]['industry_type'] %]' data-report='[%= it[item]['report_id'] %]' data-order_no = '[%= it[item]['order_no'] %]'
data-type='[%= it[item]['type'] %]' data-id='[%= it[item]["id"]%]'>调整</a> data-type='[%= it[item]['type'] %]' data-id='[%= it[item]["id"]%]'>调整</a>
[% } %] [% } %]
......
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