Commit 93f45068 authored by agping's avatar agping

商铺列表 锁盘

parent 946028ad
...@@ -227,7 +227,44 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin ...@@ -227,7 +227,44 @@ define(['doT', 'text!temp/house_template_tpl.html', 'css!style/home.css', 'ckfin
} }
}); });
}); });
//锁盘 接口 //锁盘 取消锁盘
$(document).delegate(".is_show_lock_plate", "click", function() { //点击禁用
if(!confirm('是否继续?')) {
return;
}
business.house_id = $(this).attr("data-id");
var params = {
};
params.id = $(this).attr("data-id");
var str = $.trim($(this).html());
if(str == "锁盘") {
$(this).attr('class', 'btn1 btn-default is_show_lock_plate');
params.type = 1;
$(this).html('已锁盘');
} else if(str == "已锁盘") {
$(this).attr('class', 'btn1 btn-info is_show_lock_plate');
params.type = 0;
$(this).html('锁盘');
} else {
}
checkLogin();
var user_info_obj = JSON.parse(decodeURIComponent(localStorage.getItem('pcUserInfo'))); //读取缓存
$.ajax({ //禁用
'type': 'POST',
'url': '/index/lockHouse',//商铺锁盘,取消锁盘
data: {
"is_lock": params.type,
"house_id": business.house_id
},
dataType: "json",
success: function(data) {
if(data.code != 200) {
alert(data.msg)
}
}
});
});
//城市 区域 二级联动 筛选 //城市 区域 二级联动 筛选
_doc.on('input', '#user_city_choose', function() { _doc.on('input', '#user_city_choose', function() {
......
<script id="house_list_tpl" type="text/template"> <script id="house_list_tpl" type="text/template">
[% var sw=function(s){switch(Number(s)){case 2:return"btn-info";case 1:return"btn-default"}}; %] [% var sw=function(s){switch(Number(s)){case 2:return"btn-info";case 1:return"btn-default"}}; %]
[% var sw2=function(s){switch(Number(s)){case 0:return"btn-info";case 1:return"btn-default"}}; %]
[% if(it) { %] [% if(it) { %]
[% for(var item in it){ %] [% for(var item in it){ %]
<tr class="text-center"> <tr class="text-center">
...@@ -91,8 +93,12 @@ ...@@ -91,8 +93,12 @@
<a class="btn1 btn-success anch" data-target="#modal-anch" data-toggle="modal" data-id='[%= it[item]["id"] %]'>设置案场权限人</a> <a class="btn1 btn-success anch" data-target="#modal-anch" data-toggle="modal" data-id='[%= it[item]["id"] %]'>设置案场权限人</a>
[% } %]--> [% } %]-->
<a class="btn1 btn-success is_show_lock_plate btn-default-hide-display" data-toggle="modal" data-id='[%= it[item]["id"] %]'> <a class="btn1 is_show_lock_plate btn-default-hide-display [%= sw2(it[item]['is_lock']) %]" data-toggle="modal" data-id='[%= it[item]["id"] %]'>
[%if(it[item]["is_lock"] == 0) { %]
锁盘 锁盘
[% }else if(it[item]["is_lock"] == 1 ) { %]
已锁盘
[% } %]
</a> </a>
[% if(check_auth("index/editExclusive") || it[item]["is_exclusive_type"] == 0 || it[item]["auth_edit_exclusive"] == 1) { %] [% if(check_auth("index/editExclusive") || it[item]["is_exclusive_type"] == 0 || it[item]["auth_edit_exclusive"] == 1) { %]
......
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