数据页样式调试

master
zhaocheng 2 years ago
parent bdd53f2ffa
commit 5c572970ed
  1. 2
      app/BaseController.php
  2. 9
      app/controller/Index.php
  3. 146
      app/view/index/index.html

@ -70,7 +70,7 @@ abstract class BaseController
protected function initialize() protected function initialize()
{ {
if($this->request->isAjax() && $this->request->action() != 'login'){ if($this->request->isAjax() && $this->request->action() != 'login'){
$lastAction = session('last_action'); $lastAction = session('last_action') ?: time();
if (session('login_time') === null || time() - $lastAction > 600) { if (session('login_time') === null || time() - $lastAction > 600) {
session('login_time', null); session('login_time', null);
$this->json_data['code'] = '-1'; $this->json_data['code'] = '-1';

@ -240,7 +240,14 @@ class Index extends BaseController
public function deletes() public function deletes()
{ {
// //
$params = $this->request->param(); $params = array_filter($this->request->param());
$params_1 = $params;
unset($params_1['car_phone_empty'], $params['data_check'], $params['car_frame_check']);
if (empty($params_1)) {
$this->json_data['code'] = 0;
$this->json_data['msg'] = '搜索条件不能为空';
return json($this->json_data);
}
$map = $this->getQueryCondition($params); $map = $this->getQueryCondition($params);
if($this->model->where($map)->delete()){ if($this->model->where($map)->delete()){
$this->json_data['msg'] = '删除成功'; $this->json_data['msg'] = '删除成功';

@ -8,80 +8,80 @@
{/block} {/block}
{block name="body"} {block name="body"}
<div class="layui-card"> <div class="layui-card">
<div class="layui-card-header layui-card-header-auto layui-form"> <div class="layui-card-body layui-form">
<div class="layui-form-item"> <div class="layui-collapse">
<div class="layui-inline"> <div class="layui-colla-item">
<label class="layui-form-label" style="width: 100px;">车牌号</label> <h2 class="layui-colla-title">筛选</h2>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-colla-content layui-form">
<div class="layui-row">
<div class="layui-form-item layui-col-md3" style="clear: none;">
<label class="layui-form-label">车牌号</label>
<div class="layui-input-block">
<input type="text" name="car_no" id="car_no" autocomplete="off" class="layui-input" <input type="text" name="car_no" id="car_no" autocomplete="off" class="layui-input"
value="{$params.car_no | default=''}"> value="{$params.car_no | default=''}">
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-form-item layui-col-md3" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">车架号</label> <label class="layui-form-label">车架号</label>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-input-block">
<input type="text" name="car_frame_no" id="car_frame_no" autocomplete="off" <input type="text" name="car_frame_no" id="car_frame_no" autocomplete="off"
class="layui-input" value="{$params.car_frame_no | default=''}"> class="layui-input" value="{$params.car_frame_no | default=''}">
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-form-item layui-col-md3" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">厂牌型号</label> <label class="layui-form-label">厂牌型号</label>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-input-inline">
<input type="text" name="factory_model" id="factory_model" autocomplete="off" <input type="text" name="factory_model" id="factory_model" autocomplete="off"
class="layui-input" value="{$params.factory_model | default=''}"> class="layui-input" value="{$params.factory_model | default=''}">
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-form-item layui-col-md3" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">注册日期</label> <label class="layui-form-label">注册日期</label>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-input-inline">
<input type="text" name="register_date" id="register_date" autocomplete="off" <input type="text" name="register_date" id="register_date" autocomplete="off"
class="layui-input layui-date-elem" value="{$params.register_date | default=''}"> class="layui-input layui-date-elem" value="{$params.register_date | default=''}">
</div> </div>
</div> </div>
</div> <div class="layui-form-item layui-col-md3" style="clear: none;">
<div class="layui-form-item"> <label class="layui-form-label">车主姓名</label>
<div class="layui-inline"> <div class="layui-input-inline">
<label class="layui-form-label" style="width: 100px;">车主姓名</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="car_man" id="car_man" autocomplete="off" <input type="text" name="car_man" id="car_man" autocomplete="off"
class="layui-input" value="{$params.car_man | default=''}"> class="layui-input" value="{$params.car_man | default=''}">
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-form-item layui-col-md3" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">身份证号</label> <label class="layui-form-label">身份证号</label>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-input-inline">
<input type="text" name="car_number" id="car_number" autocomplete="off" <input type="text" name="car_number" id="car_number" autocomplete="off"
class="layui-input" value="{$params.car_number | default=''}"> class="layui-input" value="{$params.car_number | default=''}">
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-form-item layui-col-md3" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">联系电话</label> <label class="layui-form-label">联系电话</label>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-input-inline">
<input type="text" name="car_phone" id="car_phone" autocomplete="off" <input type="text" name="car_phone" id="car_phone" autocomplete="off"
class="layui-input" value="{$params.car_phone | default=''}"> class="layui-input" value="{$params.car_phone | default=''}">
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-form-item layui-col-md3" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">导出文件名</label> <label class="layui-form-label">导出文件名</label>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-input-inline">
<input type="text" name="export_name" id="export_name" autocomplete="off" <input type="text" name="export_name" id="export_name" autocomplete="off"
class="layui-input" value="{$params.export_name | default=''}"> class="layui-input" value="{$params.export_name | default=''}">
</div> </div>
</div> </div>
</div> <div class="layui-form-item layui-col-md6" style="clear: none;">
<div class="layui-form-item"> <label class="layui-form-label">初登日期</label>
<div class="layui-inline" style="width: 695px;"> <div class="layui-input-inline">
<label class="layui-form-label" style="width: 100px;">初登日期</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="register_date1" id="register-date1" class="layui-input layui-date-elem"> <input type="text" name="register_date1" id="register-date1" class="layui-input layui-date-elem">
</div> </div>
<div class="layui-form-mid">-</div> <div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;"> <div class="layui-input-inline">
<input type="text" name="register_date2" id="register-date2" class="layui-input layui-date-elem"> <input type="text" name="register_date2" id="register-date2" class="layui-input layui-date-elem">
</div> </div>
</div> </div>
<div class="layui-inline"> <div class="layui-form-item layui-col-md6" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">保险日期</label> <label class="layui-form-label">保险日期</label>
<div class="layui-input-inline"> <div class="layui-input-inline">
<input type="text" name="insurer_month1" class="layui-input" style="display: inline-block; width: 60px;"> <input type="text" name="insurer_month1" class="layui-input" style="display: inline-block; width: 60px;">
<input type="text" name="insurer_day1" class="layui-input" style="display: inline-block; width: 60px;"> <input type="text" name="insurer_day1" class="layui-input" style="display: inline-block; width: 60px;">
@ -92,11 +92,39 @@
<input type="text" name="insurer_day2" class="layui-input" style="display: inline-block; width: 60px;"> <input type="text" name="insurer_day2" class="layui-input" style="display: inline-block; width: 60px;">
</div> </div>
</div> </div>
<div class="layui-form-item layui-col-md4" style="clear: none;">
<label class="layui-form-label">新车购置价</label>
<div class="layui-input-inline" style="width: 100px;">
<input type="text" name="price1" class="layui-input" placeholder="万">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 100px;">
<input type="text" name="price2" class="layui-input" placeholder="万">
</div> </div>
<div class="layui-form-item"> </div>
<div class="layui-inline" style="width: 100%;"> <div class="layui-form-item layui-col-md4" style="clear: none;">
<label class="layui-form-label" style="width: 100px;">数据状态</label> <label class="layui-form-label">电话检测</label>
<div class="layui-input-inline" style="width: 1100px;"> <div class="layui-input-inline" style="width: 300px;">
<input type="radio" class="layui-input" name="car_phone_empty" value="all" title="全部" checked>
<input type="radio" class="layui-input" name="car_phone_empty" value="yes" title="不为空">
<input type="radio" class="layui-input" name="car_phone_empty" value="no" title="空">
</div>
</div>
<div class="layui-form-item layui-col-md4" style="clear: none;">
<label class="layui-form-label">重复数据</label>
<div class="layui-input-inline">
<input type="radio" class="layui-input" name="data_check" value="no" title="否" checked>
{if $repeat_frame_count > 0 }
<input type="radio" class="layui-input" name="data_check" value="car_frame_check" title="车架号">
{/if}
{if $peer_phone_count > 0 }
<input type="radio" class="layui-input" name="data_check" value="car_phone_check" title="个人电话">
{/if}
</div>
</div>
<div class="layui-form-item layui-col-md12" style="clear: none;">
<label class="layui-form-label">数据状态</label>
<div class="layui-input-inline" style="min-width: 1100px;">
<table class="layui-table"> <table class="layui-table">
<tr> <tr>
<td colspan="3"><input type="checkbox" name="data_filter[]" value="bhx" title="已导出清洗"></td> <td colspan="3"><input type="checkbox" name="data_filter[]" value="bhx" title="已导出清洗"></td>
@ -123,37 +151,6 @@
</div> </div>
</div> </div>
</div> </div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">新车购置价</label>
<div class="layui-input-inline" style="width: auto;">
<input type="text" name="price1" class="layui-input" style="display: inline-block; width: 60px;">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: auto;">
<input type="text" name="price2" class="layui-input" style="display: inline-block; width: 60px;">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">电话检测</label>
<div class="layui-input-inline" style="width: 300px">
<input type="radio" class="layui-input" name="car_phone_empty" value="all" title="全部" checked>
<input type="radio" class="layui-input" name="car_phone_empty" value="yes" title="不为空">
<input type="radio" class="layui-input" name="car_phone_empty" value="no" title="空">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">重复数据检测</label>
<div class="layui-input-inline" style="width: 400px;">
<input type="radio" class="layui-input" name="data_check" value="no" title="否" checked>
{if $repeat_frame_count > 0 }
<input type="radio" class="layui-input" name="data_check" value="car_frame_check" title="车架号">
{/if}
{if $peer_phone_count > 0 }
<input type="radio" class="layui-input" name="data_check" value="car_phone_check" title="个人电话">
{/if}
</div>
</div>
<div class="layui-input-block layui-text-right" id="tool-bar"> <div class="layui-input-block layui-text-right" id="tool-bar">
<button type="button" class="layui-btn" id="search-btn">搜索</button> <button type="button" class="layui-btn" id="search-btn">搜索</button>
<a href="{:url('index/index')}" class="layui-btn" id="reset-btn">重置条件</a> <a href="{:url('index/index')}" class="layui-btn" id="reset-btn">重置条件</a>
@ -161,7 +158,7 @@
</div> </div>
</div> </div>
</div> </div>
<div class="layui-card-body layui-form"> </div>
<table class="layui-hide" id="car-info" lay-filter="car-info"></table> <table class="layui-hide" id="car-info" lay-filter="car-info"></table>
</div> </div>
</div> </div>
@ -226,6 +223,7 @@
url: '{:url("/index/carInfo/")}', //数据接口 url: '{:url("/index/carInfo/")}', //数据接口
where: getUrlParam('Object'), where: getUrlParam('Object'),
toolbar: true, toolbar: true,
height: 'full - 45',
page: true, //开启分页 page: true, //开启分页
limit: 20, limit: 20,
loading: true, loading: true,
@ -349,7 +347,7 @@
}); });
}); });
$('#search-btn').on('click', function(){ $('#search-btn').on('click', function(){
var param = $('.layui-card-header').find(':input').serializeObject(); var param = $('.layui-colla-content').find(':input').serializeObject();
param['data_filter[]'] = param['data_filter[]']?param['data_filter[]']:''; param['data_filter[]'] = param['data_filter[]']?param['data_filter[]']:'';
param = Object.assign(param, urlParams); param = Object.assign(param, urlParams);
//执行重载 //执行重载
@ -365,7 +363,7 @@
layer.close(index); layer.close(index);
index = layer.load(); index = layer.load();
//向服务端发送删除指令 //向服务端发送删除指令
$.post('{:url("index/deletes/")}', $('.layui-card-header').find(':input').serialize(), function (ret) { $.post('{:url("/index/deletes/")}', $('.layui-colla-content').find(':input').serialize(), function (ret) {
layer.close(index); layer.close(index);
layer.msg(ret.msg, function () { layer.msg(ret.msg, function () {
layui.table.reload('carInfo'); layui.table.reload('carInfo');

Loading…
Cancel
Save