车架去重数据查询调试2

master
zcstatham 2 years ago
parent b14b06d6ad
commit b27b86929a
  1. 3
      app/controller/Index.php
  2. 13
      app/view/index/index.html

@ -63,7 +63,8 @@ class Index extends BaseController
$params['data_check'] = 'car_frame_check';
}
if(isset($params['data_check']) && $params['data_check'] == 'car_frame_check'){
$query = Db::table('repeat_data_t')->alias('car_info_t')->rightJoin('repeat_frame_t','repeat_frame_t.car_frame_no = car_info_t.car_frame_no')->field('car_info_t.*')->where($map)->order('repeat_frame_t.car_frame_no desc');
$query = Db::table('repeat_data_t')->alias('car_info_t')->field('car_info_t.*')
->order('repeat_data_t.car_frame_no desc');
if (isset($params['is_delete_frame']) && $params['is_delete_frame'] > 0) {
$query = $query->where('repeat_data_t.repeat_id', '=', $params['is_delete_frame']);
}

@ -351,6 +351,7 @@
$('#search-btn').on('click', function(){
var param = $('.layui-card-header').find(':input').serializeObject();
param['data_filter[]'] = param['data_filter[]']?param['data_filter[]']:'';
param = Object.assign(param, getUrlParam());
//执行重载
tableIns.reload({
page: {
@ -381,5 +382,17 @@
});
});
}
function getUrlParam(name) {
let query = window.location.search.substring(1);
let vars = query.split("&");
let params = [];
for (let i=0, len = vars.length;i< len;i++) {
let pair = vars[i].split("=");
params[pair[0]] = pair[1];
}
if (name) return params[name];
return params;
}
</script>
{/block}

Loading…
Cancel
Save