Commit 1346ac7b authored by clone's avatar clone

Merge branch 'chat_0705' of https://gitee.com/zwyjjc/tl_estate into chat_0705

parents d647ed52 daa22e69
......@@ -214,7 +214,7 @@
×
</button>
<h4 class="modal-title">
绑定手机
绑定手机/电脑
</h4>
</div>
<div class="modal-body">
......@@ -223,9 +223,10 @@
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<tr>
<th>绑定手机</th>
<th>请求时间</th>
<th>手机绑定状态</th>
<th class="text-center">设备类型</th>
<th class="text-center">设备型号</th>
<th class="text-center">请求时间</th>
<th class="text-center">绑定状态</th>
</tr>
</thead>
<tbody id='agent_phone_binding'>
......
......@@ -110,8 +110,8 @@
<input class="form-control btn4 ld-Marheight" value="" data-rule-phoneus="false" data-rule-required="false" id="end_date" name="end_date" type="date">
<span class="btn btn-default btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-default btn3 ld-Marheight" id="reset">重置</span>
<span class="btn btn-info btn3 ld-Marheight" id="search">搜索</span>
<span class="btn btn-info btn3 ld-Marheight" id="reset">重置</span>
<!-- 批量修改客方 -->
<a href="#modal_modify_user" data-toggle="modal" class="btn btn-info btn3 margin-top-ld"><i class="icon-plus"></i>
批量修改盘方</a>
......
define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_template_tpl.html','text!temp/pcBinding_template_tpl.html', 'css!style/home.css', 'pagination', 'bootstrapJs', 'ckfinder', 'ckfinderStart', 'blow-up'], function(doT, template, template_binding,pctemplate_binding) {
define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_template_tpl.html', 'text!temp/pcBinding_template_tpl.html', 'css!style/home.css', 'pagination', 'bootstrapJs', 'ckfinder', 'ckfinderStart', 'blow-up'], function(doT, template, template_binding, pctemplate_binding) {
var agent = {
pageNo: 1,
pageSize: 15,
......@@ -16,7 +16,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
_doc.on('input', '[name=district_id],#district_id2', function() {
var _this = $(this);
var _id = _this.val();
_this.next().html('');//先清空
_this.next().html(''); //先清空
//新增 编辑
var _objTemp = _this.parent().next().find('select');
_objTemp.html(''); //先清空
......@@ -30,31 +30,70 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
_objTemp.html(_str);
_this.next().html(_str);
});
} else {};
});
});
//新增 编辑
// agent.getDistrict(function(){
// _doc.on('input', '[name=district_id]', function(){
// var _this = $(this);
// var _id = _this.val();
// var _objTemp = _this.parent().next().find('select');
// _objTemp.html('');//先清空
// if(_id && _id != '0'){
// agent.getDistrictStoreList(_id, function(_data){
//// var _str = '';
// var _str = '<option value="0">全部</option>';
// $.each(_data, function(i,item) {
// _str += '<option value="'+item.id+'">'+item.store_name+'</option>';
// });
// _objTemp.html(_str);
// });
// }else{
// };
// });
// })
var NV = {};
var UA = navigator.userAgent.toLowerCase();
try {
NV.name = !-[1, ] ? 'ie' :
(UA.indexOf("firefox") > 0) ? 'firefox' :
(UA.indexOf("chrome") > 0) ? 'chrome' :
window.opera ? 'opera' :
window.openDatabase ? 'safari' :
'unkonw';
} catch(e) {};
try {
NV.version = (NV.name == 'ie') ? UA.match(/msie ([\d.]+)/)[1] :
(NV.name == 'firefox') ? UA.match(/firefox\/([\d.]+)/)[1] :
(NV.name == 'chrome') ? UA.match(/chrome\/([\d.]+)/)[1] :
(NV.name == 'opera') ? UA.match(/opera.([\d.]+)/)[1] :
(NV.name == 'safari') ? UA.match(/version\/([\d.]+)/)[1] :
'0';
} catch(e) {};
try {
NV.shell = (UA.indexOf('360ee') > -1) ? '360极速浏览器' :
(UA.indexOf('360se') > -1) ? '360安全浏览器' :
(UA.indexOf('qqbrowser') > -1) ? 'QQ浏览器' :
(UA.indexOf('se') > -1) ? '搜狗浏览器' :
(UA.indexOf('aoyou') > -1) ? '遨游浏览器' :
(UA.indexOf('theworld') > -1) ? '世界之窗浏览器' :
(UA.indexOf('worldchrome') > -1) ? '世界之窗极速浏览器' :
(UA.indexOf('greenbrowser') > -1) ? '绿色浏览器' :
(UA.indexOf('baidu') > -1) ? '百度浏览器' :
NV.name;
} catch(e) {};
//判断 谷歌 360 application/vnd.chromium.remoting-viewer 可能为360特有
if(NV.name=='chrome'){
var is360 = _mime("type", "application/vnd.chromium.remoting-viewer");
if(isChrome() && is360) {
NV.shell='360浏览器'
}
//检测是否是谷歌内核(可排除360及谷歌以外的浏览器)
function isChrome() {
var ua = navigator.userAgent.toLowerCase();
return ua.indexOf("chrome") > 1;
}
//测试mime
function _mime(option, value) {
var mimeTypes = navigator.mimeTypes;
for(var mt in mimeTypes) {
if(mimeTypes[mt][option] == value) {
return true;
}
}
return false;
}
}
// alert('浏览器UA=' + UA +
// '\n\n浏览器名称=' + NV.name +
// '\n\n浏览器版本=' + NV.version +
// //'\n\n浏览器版本='+parseInt(NV.version)+
// '\n\n浏览器外壳=' + NV.shell);
var browser_version=NV.shell+'/'+NV.version;
// alert(browser_version)
$('#search').click(function(pageNo) {
agent.getList(1);
});
......@@ -84,11 +123,11 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
$(this).val('').attr('type', 'password');
});
$(document).on("click", ".phone-bundling", function() {//点击绑定手机
$(document).on("click", ".phone-bundling", function() { //点击绑定手机
agent.agent_id = $(this).attr("data-id");
agent.getPhoneBindingList();
agent.getPhoneBindingList(browser_version);
});
$(document).on("click", ".pc-bundling", function() {//点击绑定电脑
$(document).on("click", ".pc-bundling", function() { //点击绑定电脑
agent.agent_id = $(this).attr("data-id");
agent.getPcBindingList();
});
......@@ -152,7 +191,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj);
var params = {
};
......@@ -192,7 +230,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
}
agent.id = $(this).attr("data-id");
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
// console.log(user_info_obj);
var params = {
};
......@@ -236,8 +273,7 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
},
dataType: "json",
success: function(data) {
if(data.code == 200) {
} else {
if(data.code == 200) {} else {
alert("重复提交");
}
}
......@@ -373,16 +409,12 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
data: params,
dataType: 'json',
success: function(data) {
console.log(666);
console.log(data.data.list.length);
//获取对应的id
agent.idArray = new Array();
for(var m = 0; m < data.data.list.length; m++) {
agent.idArray[m] = data.data.list[m].id;
}
// console.log(agent.idArray);
//获取对应的id
var temp = document.getElementById('agent_tpl').innerHTML;
var doTempl = doT.template(temp);
$("#agentlist").html(doTempl(data.data.list));
......@@ -395,10 +427,10 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
});
},
//手机绑定权限
getPhoneBindingList: function(pageNo) {
getPhoneBindingList: function(v,pageNo) {
var params = {};
params.agent_id = agent.agent_id;
console.log(agent.agent_id);
params.model = v;
$.ajax({
url: '/index/deviceList',
type: 'GET',
......@@ -419,9 +451,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
getPcBindingList: function(pageNo) {
var params = {};
params.agent_id = agent.agent_id;
console.log(agent.agent_id);
$.ajax({
url: '/index/deviceList',//电脑绑定权限
url: '/index/deviceList', //电脑绑定权限
type: 'GET',
async: true,
data: params,
......@@ -451,10 +482,8 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
User_add += '<option value="' + item.id + '">' + item.title + '</option>';
if(item.title == tempval) {
_tempid = item.id;
console.log(item.id);
};
});
console.log(_tempid);
$("#edit_role").html(User_add).val(_tempid);
}
......@@ -501,15 +530,9 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
});
},
getEvaluationList: function(n) {
console.log(n);
// var _data={};
// for(var i=0;i<n.length;i++){
// _data['agents_id['+i+']']=n[i];
// }
var _data = {
'agents_id': n.join(',')
}
console.log('经纪人列表加载完成');
$.ajax({
url: '/index/agentEvaluateNumAndFraction',
type: 'GET',
......@@ -518,7 +541,6 @@ define(['doT', 'text!temp/agent_template_tpl.html', 'text!temp/phoneBinding_temp
dataType: 'json',
success: function(data) {
if(data.code == 200 && data.data != null) {
// console.log(data.data[0].agent_evaluate_num);
$("#agentlist tr").each(function(e) {
//e代表索引 从0开始 eq(0)就是第一行
$("#agentlist").find("tr").eq(e).find("td").eq(9).html(data.data[e].agent_evaluate_num); //获取一列的值
......
......@@ -43,14 +43,14 @@
[% } %]
[% if(check_auth('index/updateRole')) {%]
<a href="#modal-user" class="btn1 btn-danger" id='role' href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>角色设置</a>
<a href="#modal-user" class="btn1 btn-success" id='role' href="#modal-edit" data-toggle="modal" data-id='[%= it[item]["id"] %]'>角色设置</a>
[% } %]
<!--绑定手机权限-->
[% if(check_auth('index/updateDevice')) {%]
<a class="btn1 btn-success phone-bundling" href="#modal-phonebundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定手机</a>
<a class="btn1 btn-success phone-bundling" href="#modal-phonebundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定手机/电脑</a>
[% } %]
<a class="btn1 btn-success pc-bundling" href="#modal-pcbundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定电脑</a>
<!--<a class="btn1 btn-success pc-bundling" href="#modal-pcbundling" data-toggle="modal" data-id='[%= it[item]["id"] %]'>绑定电脑</a>-->
......
......@@ -7,7 +7,7 @@
<td>[%= it[item]['address'] %]</td>
<td>[%= it[item]['remark'] %]</td>
<td>
<a class="btn1 btn-info review-images" href="#modal-time" data-toggle="modal" data-img='[%= it[item]["supervise_img"] %]'>查看</a>
<a class="btn1 btn-success review-images" href="#modal-time" data-toggle="modal" data-img='[%= it[item]["supervise_img"] %]'>查看</a>
<!--<a class="btn1 btn-info timeline" href="#modal-time" data-toggle="modal" data-id='[%= it[item]["order_id"] %]'>查看</a>-->
</td>
......
......@@ -15,7 +15,7 @@
</a>
[% if(check_auth('index/delNotice')) { %]
<!--删除权限-->
<a class="btn1 btn-success announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
<a class="btn1 btn-danger announcement-del" href="#modal-delete" data-toggle="modal" data-id='[%= it[item]["id"] %]'>删除</a>
[% } %]
</td>
......
......@@ -2,6 +2,7 @@
[% if(it) { %]
[% for(var item in it){ %]
<tr class="text-center">
<td>[% if(it[item]["is_pc"] == 1) { %] 电脑端 [% }else if(it[item]["is_pc"] == 0) { %] 手机端 [% }else{ %] 无效 [% } %]</td>
<td>[%= it[item]["model"] %]</td>
<td>[%= it[item]["create_time"] %]</td>
<td>
......
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