Commit 3c2b0397 authored by agping's avatar agping

全部约带看

parent 8c2c5bb8
......@@ -54,6 +54,13 @@
<table class="table table-striped table-bordered table-hover table-condensed">
<thead>
<!--同步app-->
<tr>
<td colspan="14" class="maintable-top-sub-tr">
<a class="btn btn-info liudan_pic_btn">全部</a>
<a class="btn btn-default liudan_pic_btn">部门</a>
<a class="btn btn-default liudan_pic_btn">门店</a>
</td>
</tr>
<tr>
<td colspan="10">
<form id="form_search">
......
......@@ -11,6 +11,7 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
ajaxObj: '',
stopstatus: true,
boxphoto: '',
mainTabIndex: 0,
init: function() {
//初始化dot
$(document.body).append(template);
......@@ -94,8 +95,29 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
document.getElementById("form_search").reset();
$('#guest_stores').html('');
});
_doc.on('click', '.maintable-top-sub-tr>a', function(e){
e.preventDefault();
e.stopPropagation();
var _this = $(this);
_this.removeClass('btn-default').addClass('btn-info').siblings().removeClass('btn-info').addClass('btn-default');
record.mainTabIndex = _this.index();
record.getList(1);
});
},
//获取一级审核,二级审核,三级审核,结单不同的ajax请求url
switchUrl: function(){
switch (Number(this.mainTabIndex)){
case 0:
return 'inspectionRecordAll/3';
case 1:
return 'inspectionRecordDistrict/2';
case 2:
return 'inspectionRecordStore/1';
default:
return '';
}
},
getList: function(pageNo) { //获取约带看记录列表
record.pageNo = pageNo;//接收参数
var params = {};
......@@ -122,7 +144,7 @@ define(['doT', 'text!temp/inspectionRecordAll_list_template_tpl.html', 'css!styl
params.pageSize = record.pageSize;
$.ajax({
type: 'GET',
url: '/index/inspectionRecordAll', //约带看记录 对接接口(2.9.6 有权限的人 才能看到)
url: record.switchUrl(), //约带看记录 对接接口(2.9.6 有权限的人 才能看到)
data: params,
timeout: 30000,
dataType: 'json',
......
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