Commit 5a611602 authored by hujun's avatar hujun

修改独家方

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