Commit 5a611602 authored by hujun's avatar hujun

修改独家方

parent 0adefbf3
......@@ -248,8 +248,8 @@
</div>
<div class="form-group">
<label class="col-sm-3 control-label">独家方:</label>
<input class="form-control btn6" data-rule-buga="false" data-rule-required="true" name="exclusive" placeholder="请输入姓名或手机号码" type="text" value="" id="exclusive">
<input class="form-control btn7 phone_jia" data-rule-buga="false" data-rule-required="true" name="exclusive" placeholder="请输入姓名或手机号码" type="text" value="" id="exclusive">
<ul class="phone_list"></ul>
</div>
</form>
......
......@@ -425,9 +425,13 @@ class GHouses extends BaseModel
$result = $this->field('id,is_exclusive_type')->where('id', $houses_id)->where('status', '<>', 3)->find();
if ($result->id) {
$house_ext = $this->table('g_houses_ext')->where('house_id', $houses_id)->field('agent_start_time,agent_end_time')->find();
$agents = $this->table('g_houses_to_agents')->field('b.id,b.name,b.phone')->alias('a')
$agents = $this->table('g_houses_to_agents')
->field('b.id,b.name,b.phone')
->alias('a')
->join('a_agents b', 'a.agents_id=b.id', 'left')
->where('a.is_del', '<>', 1)
->where('a.houses_id', $houses_id)
->where('a.type', 3)
->where('b.status', 0)->find();
$img = $this->table('g_houses_imgs')
......@@ -437,12 +441,12 @@ class GHouses extends BaseModel
->where('img_status', 0)
->select();
$return['id'] = $agents->id;
$return['name'] = $agents['name'] . '-' . $agents['phone'];
$return['id'] = $agents['id'];
$return['name'] = empty($agents['name']) ? '' : $agents['name'] . '-' . $agents['phone'];
$return['agent_start_time'] = $house_ext['agent_start_time'];
$return['agent_end_time'] = $house_ext['agent_end_time'];
$return['exclusive_img'] = $img;
$return['is_exclusive_type'] = $result->is_exclusive_type;
$return['is_exclusive_type'] = $result['is_exclusive_type'];
} else {
$return = false;
}
......
......@@ -222,3 +222,7 @@ body{
height: 40px;
line-height: 40px;
}
.btn7 {
width: 30% !important;
float: left;
}
\ No newline at end of file
......@@ -14,6 +14,7 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin
stopstatus:true,
ldHtml: $('.phone_list'),
boxphoto:'',
exclusive_id : 0,
init: function () {
//初始化dot
$ ("body").append (template);
......@@ -169,7 +170,7 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin
$("#start_date_dujia").val(data.data.agent_start_time);//上传时间
$("#end_date_dujia").val(data.data.agent_end_time);
$("#exclusive").val(data.data.name);
exclusive_id=data.data.id;
business.exclusive_id=data.data.id;
var img_url="";
$.each(data['data']['exclusive_img'], function(i, item) {
var local_img=location.origin+'/resource/lib/Attachments/images/'+item.img_name;
......@@ -194,7 +195,7 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin
'url' : '/index/editExclusive',
data: {"houses_id":business.house_id,//楼盘Id
"is_exclusive_type":$("#sel_dujia").val(),//是否独家
"exclusive_id":exclusive_id,//经纪人id
"exclusive_id":business.exclusive_id,//经纪人id
"agent_start_time":$("#start_date_dujia").val(),//开始时间
"agent_end_time":$("#end_date_dujia").val(),//结束时间
"exclusive_img":images//图片
......@@ -300,14 +301,14 @@ define (['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css','ckfin
},
addphone:function (obj){//list消失
var phone_name=$(obj).find(".phone_name").html();
console.log(phone_name);
var phone_phone=$(obj).find(".phone-phone").html();
var phone_span=$(obj).find(".phone_span").html();
var id= $(obj).find(".id").html();
business.exclusive_id = id.substr(0, id.length - 1);
$(obj).parent().prev().val(id+phone_name+phone_span+phone_phone);
$(obj).parent().hide();
business.ldHtml.html('');
return false;
return ;
},
jiabox:function () {//加输入框
business.boxphoto = '<input name="ues_id" placeholder="请输入" type="tel" style="margin-left: 10px;float: left" class="phone_add">' +
......
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