修改导入模板文件

master
zcstatham 2 years ago
parent 577c51d3a2
commit 60b38b2a73
  1. 1
      public/static/tpl.csv
  2. BIN
      public/static/tpl.xlsx
  3. 433
      runtime/temp/2c7bddf2602390fe3491ea487d866ef2.php
  4. 499
      runtime/temp/4a1403173de2fcfc7cfff92a06a360dc.php
  5. 185
      runtime/temp/dc3e3ddb370b0b9564cb52310d05c516.php

@ -1 +0,0 @@
税号,初登日期,车主,证件号,电话号码,车架号,车牌号,发动机号,车型,新车购置价
1 税号 初登日期 车主 证件号 电话号码 车架号 车牌号 发动机号 车型 新车购置价

Binary file not shown.

@ -1,433 +0,0 @@
<?php /*a:4:{s:52:"D:\htdocs_new\excel-handle\app\view\index\index.html";i:1613834390;s:54:"D:\htdocs_new\excel-handle\app\view\public\layout.html";i:1582189092;s:54:"D:\htdocs_new\excel-handle\app\view\public\header.html";i:1583504952;s:54:"D:\htdocs_new\excel-handle\app\view\public\script.html";i:1581330838;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="none">
<title>粮仓</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/static/css/default.css">
<!-- Core stylesheets -->
<style>
.layui-table-cell {
padding: 0 5px;
}
</style>
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<div class="layui-logo">车辆数据处理</div>
<ul class="layui-nav layui-layout-left">
<li class="layui-nav-item"><a href="<?php echo url('index/index'); ?>">数据中心</a></li>
<li class="layui-nav-item"><a href="<?php echo url('task/index'); ?>">任务中心</a></li>
</ul>
</div>
<div class="layui-container-fluid" id="layui-content">
<div class="layui-card">
<div class="layui-card-header layui-card-header-auto layui-form">
<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: 200px;">
<input type="text" name="car_no" id="car_no" autocomplete="off" class="layui-input"
value="<?php echo htmlentities((isset($params['car_no']) && ($params['car_no'] !== '')?$params['car_no']:'')); ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">车架号</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="car_frame_no" id="car_frame_no" autocomplete="off"
class="layui-input" value="<?php echo htmlentities((isset($params['car_frame_no']) && ($params['car_frame_no'] !== '')?$params['car_frame_no']:'')); ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">厂牌型号</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="factory_model" id="factory_model" autocomplete="off"
class="layui-input" value="<?php echo htmlentities((isset($params['factory_model']) && ($params['factory_model'] !== '')?$params['factory_model']:'')); ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">注册日期</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="register_date" id="register_date" autocomplete="off"
class="layui-input layui-date-elem" value="<?php echo htmlentities((isset($params['register_date']) && ($params['register_date'] !== '')?$params['register_date']:'')); ?>">
</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: 200px;">
<input type="text" name="car_man" id="car_man" autocomplete="off"
class="layui-input" value="<?php echo htmlentities((isset($params['car_man']) && ($params['car_man'] !== '')?$params['car_man']:'')); ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">身份证号</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="car_number" id="car_number" autocomplete="off"
class="layui-input" value="<?php echo htmlentities((isset($params['car_number']) && ($params['car_number'] !== '')?$params['car_number']:'')); ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">联系电话</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="car_phone" id="car_phone" autocomplete="off"
class="layui-input" value="<?php echo htmlentities((isset($params['car_phone']) && ($params['car_phone'] !== '')?$params['car_phone']:'')); ?>">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">导出文件名</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="export_name" id="export_name" autocomplete="off"
class="layui-input" value="<?php echo htmlentities((isset($params['export_name']) && ($params['export_name'] !== '')?$params['export_name']:'')); ?>">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline" style="width: 695px;">
<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">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="register_date2" id="register-date2" class="layui-input layui-date-elem">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">保险日期</label>
<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_day1" class="layui-input" style="display: inline-block; width: 60px;">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" name="insurer_month2" 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 class="layui-form-item">
<div class="layui-inline" style="width: 100%;">
<label class="layui-form-label" style="width: 100px;">数据状态</label>
<div class="layui-input-inline" style="width: 1100px;">
<table class="layui-table">
<tr>
<td colspan="3"><input type="checkbox" name="data_filter[]" value="bhx" title="已导出清洗"></td>
<td colspan="2"><input type="checkbox" name="data_filter[]" value="none" title="未处理"></td>
</tr>
<tr>
<td><input type="checkbox" name="data_filter[]" value="bhx_success" title="已清洗成功"></td>
<td><input type="checkbox" name="data_filter[]" value="bhx_failed" title="已清洗失败"></td>
<td><input type="checkbox" name="data_filter[]" value="bhx_none" title="未处理"></td>
<td><input type="checkbox" name="data_filter[]" value="none_bmc" title="已上传"></td>
<td><input type="checkbox" name="data_filter[]" value="none_none" title="未处理"></td>
</tr>
<tr>
<td><input type="checkbox" name="data_filter[]" value="bhx_success_bmc" title="已上传">
<input type="checkbox" name="data_filter[]" value="bhx_success_none" title="未上传"></td>
<td><input type="checkbox" name="data_filter[]" value="bhx_failed_bmc" title="已上传">
<input type="checkbox" name="data_filter[]" value="bhx_failed_bhx" title="已导出清洗">
<input type="checkbox" name="data_filter[]" value="bhx_failed_none" title="未处理"></td>
<td></td>
<td></td>
<td></td>
</tr>
</table>
</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>
<?php if($repeat_frame_count > 0): ?>
<input type="radio" class="layui-input" name="data_check" value="car_frame_check" title="车架号">
<?php endif; if($peer_phone_count > 0): ?>
<input type="radio" class="layui-input" name="data_check" value="car_phone_check" title="个人电话">
<?php endif; ?>
</div>
</div>
<div class="layui-input-block layui-text-right" id="tool-bar">
<button type="button" class="layui-btn" id="search-btn">搜索</button>
<a href="<?php echo url('index/index'); ?>" class="layui-btn" id="reset-btn">重置条件</a>
<button type="button" class="layui-btn layui-btn-danger" id="deletes-btn">批量删除</button>
<button type="button" class="layui-btn layui-btn-danger" id="clear-btn">清空数据</button>
</div>
</div>
</div>
<div class="layui-card-body layui-form">
<table class="layui-hide" id="car-info" lay-filter="car-info"></table>
</div>
</div>
</div>
<div class="layui-footer">
© zcstatham
</div>
</div>
<div id="lock-screen">
<div class="lock-screen">
<div class="layui-form-item">
<label class="layui-form-label">锁屏密码</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="password" name="password" id="password" class="layui-input">
</div>
<div class="layui-input-inline" style="width: auto;">
<button type="button" class="layui-btn" onclick="login(event)">解锁</button>
</div>
</div>
</div>
</div>
<!--Global Javascript -->
<script src="/static/plugins//layui/layui.all.js"></script>
<script src="/static/plugins/jquery/jquery.min.js"></script>
<script src="/static/js/default.js"></script>
<!--Core Javascript -->
<script type="text/html" id="table-bar">
<a class="layui-btn layui-btn-xs" lay-event="detail">详情</a>
<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a>
</script>
<script type="text/html" id="BmcNameTpl">
{{# if(d.bmc_download_times > 0){ }}
<span style="color: #01AAED;">{{ d.export_bmc_name }}</span>
{{# } else { }}
<span style="color: #ed0e1b;">{{ d.export_bmc_name }}</span>
{{# } }}
</script>
<script type="text/html" id="BhxNameTpl">
{{# if(d.bhx_download_times > 0){ }}
<span style="color: #01AAED;">{{ d.export_bhx_name }}</span>
{{# } else { }}
<span style="color: #ed0e1b;">{{ d.export_bhx_name }}</span>
{{# } }}
</script>
<script>
$(function () {
layui.form.on('checkbox(dataStatus)', function(data){
if(data.elem.checked){
if(data.value == 'is_none_handle'){
$(data.elem).siblings().attr('disabled',true);
}else{
if(data.value == 'is_update_success'){
$(data.elem).siblings('[value="is_update_failed"]').removeAttr('checked').attr('disabled',true);
}
if(data.value == 'is_update_failed'){
$(data.elem).siblings('[value="is_update_success"]').removeAttr('checked').attr('disabled',true);
}
$(data.elem).siblings('[value="is_none_handle"]').attr('disabled',true);
}
}else {
if(data.value == 'is_none_handle'){
$(data.elem).siblings().removeAttr('disabled');
}else{
if(data.value == 'is_update_success'){
$(data.elem).siblings('[value="is_update_failed"]').removeAttr('disabled');
}
if(data.value == 'is_update_failed'){
$(data.elem).siblings('[value="is_update_success"]').removeAttr('disabled');
}
if($(data.elem).siblings(':checked').length == 0){
$(data.elem).siblings('[value="is_none_handle"]').removeAttr('disabled');
}
}
}
});
var tableIns = layui.table.render({
id: 'carInfo',
elem: '#car-info',
title:'车辆信息',
url: '<?php echo url("/index/carInfo/"); ?>', //数据接口
where: getUrlParam('Object'),
page: true, //开启分页
limit: 20,
loading: true,
cols: [[ //表头
// {type: 'checkbox', fixed: 'left'},
{field: 'car_no', title: '车牌号', width: 100, edit: 'text', fixed: 'left'},
{field: 'car_frame_no', title: '车架号', width: 180, edit: 'text'},
{field: 'engine_no', title: '发动机号', width: 100, edit: 'text'},
{field: 'factory_model', title: '厂牌型号', width: 200, edit: 'text'},
{field: 'register_date', title: '注册日期', width: 100, edit: 'text'},
{field: 'car_man', title: '车主', width: 80, edit: 'text'},
{field: 'car_number', title: '车主证件号', width: 160, edit: 'text'},
{field: 'car_phone', title: '车主电话', width: 120, edit: 'text'},
{field: 'purchase_price', title: '新车购置价', width: 100, edit: 'text'},
{field: 'export_bhx_name', title: '导出清洗', width: 140, edit: 'text', templet:'#BhxNameTpl'},
{field: 'export_bmc_name', title: '导出上传', width: 140, edit: 'text', templet:'#BmcNameTpl'},
{fixed: 'right', width: 100, align:'center', toolbar: '#table-bar'}
]],
done: function (res, curr, count) {
if(res.code == -1){
$('#lock-screen').css('display','flex');
}
}
});
//监听行工具事件
layui.table.on('tool(car-info)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
var data = obj.data, //获得当前行数据
layEvent = obj.event; //获得 lay-event 对应的值
if(layEvent === 'clear_phone'){
layer.confirm('确定要清楚此项手机吗', function(index){
layer.close(index);
index = layer.load();
$.post('<?php echo url("index/clearPhone"); ?>', {id: data.id}, function (res) {
layer.close(index);
layer.msg(res.msg,function () {
layui.table.reload('carInfo');
});
})
});
} else if(layEvent === 'del'){
layer.confirm('真的删除行么', function(index){
layer.close(index);
index = layer.load();
//向服务端发送删除指令
$.post('<?php echo url("index/delete"); ?>', {id: data.id}, function (res) {
layer.close(index);
layer.msg(res.msg,function () {
obj.del(); //删除对应行(tr)的DOM结构
});
})
});
} else if(layEvent === 'detail'){
layer.open({
type: 2,
title: '车辆信息--' + data.car_no,
area: ['1100px','600px'],
shade: 0,
maxmin: true,
content: '<?php echo url("index/edit"); ?>?id=' + data.id,
zIndex: layer.zIndex,
success: function(layero){
layer.setTop(layero);
}
});
}
});
//监听单元格编辑
layui.table.on('edit(car-info)', function(obj){
var data = {
id : obj.data.id,
field: obj.field,
value: obj.value
};
if (data.value < 0) {
layer.msg('值不能为负数', {icon: 5});
layer.msg(res.msg,function () {
layui.table.reload('carInfo');
});
return false;
}
$.post('<?php echo url("index/update"); ?>', data, function (res) {
layer.msg(res.msg,function () {
layui.table.reload('carInfo');
});
});
});
var urlParams = getUrlParam('Object');
var jobId = 0;
if(urlParams.is_check_peer_phone > 0){
jobId = urlParams.is_check_peer_phone;
}else if(urlParams.is_check_repeat_frame > 0){
jobId = urlParams.is_check_repeat_frame;
}else if(urlParams.is_export_bhx > 0){
jobId = urlParams.is_export_bhx;
}
if(jobId > 0){
$.get('<?php echo url("task/taskBtn"); ?>?job_id=' + jobId,function(ret){
if(ret.code){
$('#tool-bar').prepend($.trim(ret.btns));
}
});
}
$('.layui-date-elem').each(function (i, d) {
layui.laydate.render({
elem: d,
});
});
$('#search-btn').on('click', function(){
var param = $('.layui-card-header').find(':input').serializeObject();
param['data_filter[]'] = param['data_filter[]']?param['data_filter[]']:'';
//执行重载
tableIns.reload({
page: {
curr: 1 //重新从第 1 页开始
},
where: param,
}, 'data');
});
$('#deletes-btn').on('click', function () {
layer.confirm('真的删除行么', function(index){
layer.close(index);
index = layer.load();
//向服务端发送删除指令
$.post('<?php echo url("index/deletes/"); ?>', $('.layui-card-header').find(':input').serialize(), function (ret) {
layer.close(index);
layer.msg(ret.msg, function () {
layui.table.reload('carInfo');
});
});
});
});
$('#clear-btn').on('click', function () {
layer.confirm('清空数据将不能恢复,确认清空车辆信息吗?', function(index){
layer.close(index);
index = layer.load();
//向服务端发送删除指令
$.post('<?php echo url("index/truncate/"); ?>', function (ret) {
layer.close(index);
layer.msg(ret.msg, function () {
layui.table.reload('carInfo');
});
});
});
});
});
function task_create(type,id = 0){
$.post('<?php echo url("task/save"); ?>', {task_type: type,source_id: id}, function (ret) {
layer.msg(ret['msg'],function(){
layui.table.reload('taskInfo');
});
});
}
</script>
</body>
</html>

@ -1,499 +0,0 @@
<?php /*a:4:{s:51:"D:\htdocs_new\excel-handle\app\view\task\index.html";i:1613836009;s:54:"D:\htdocs_new\excel-handle\app\view\public\layout.html";i:1582189092;s:54:"D:\htdocs_new\excel-handle\app\view\public\header.html";i:1583504952;s:54:"D:\htdocs_new\excel-handle\app\view\public\script.html";i:1581330838;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="none">
<title>粮仓</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/static/css/default.css">
<!-- Core stylesheets -->
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">
<div class="layui-header">
<div class="layui-logo">车辆数据处理</div>
<ul class="layui-nav layui-layout-left">
<li class="layui-nav-item"><a href="<?php echo url('index/index'); ?>">数据中心</a></li>
<li class="layui-nav-item"><a href="<?php echo url('task/index'); ?>">任务中心</a></li>
</ul>
</div>
<div class="layui-container-fluid" id="layui-content">
<div class="layui-card">
<div class="layui-card-header layui-card-header-auto layui-form">
<div id="task-model-add" class="layui-form">
<div class="layui-form-item active">
<label class="layui-form-label" style="width: 140px;">任务类型</label>
<div class="layui-input-block">
<input type="radio" lay-filter="task_type" name="task_type" value="1" title="导入处理" checked>
<input type="radio" lay-filter="task_type" name="task_type" value="2" title="导出处理">
<input type="radio" lay-filter="task_type" name="task_type" value="3" title="重复电话处理">
<input type="radio" lay-filter="task_type" name="task_type" value="4" title="重复车架处理">
<input type="radio" lay-filter="task_type" name="task_type" value="5" title="更新数据">
</div>
</div>
<div class="layui-form-item task-param active" id="task-import">
<label class="layui-form-label" style="width: 140px;">上传文件</label>
<div class="layui-input-inline" style="width: 405px;">
<input type="text" name="original_filename" id="original_filename" class="layui-input" readonly>
<input type="hidden" name="filename" id="filename" autocomplete="off" class="layui-input">
</div>
<div class="layui-input-inline" style="width: 200px;">
<button type="button" class="layui-btn" id="upload">
<i class="layui-icon">&#xe67c;</i>上传CSV文件
</button>
</div>
<a href="/static/tpl.csv" download="车辆信息导入模板.csv" style="color: #009688;">[下载车辆信息导入模板]</a>
</div>
<div class="task-param" id="task-export" style="display: none;">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">初登日期</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="export_date1" class="layui-input export-date1">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="export_date2" class="layui-input export-date2">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">保险日期</label>
<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_day1" class="layui-input" style="display: inline-block; width: 60px;">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline">
<input type="text" name="insurer_month2" 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 class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">导出类型</label>
<div class="layui-input-inline" style="width: 780px;">
<input type="radio" lay-filter="export_type" name="export_type" value="bhx" class="layui-input" title="导出清洗" checked>
<input type="radio" lay-filter="export_type" name="export_type" value="failed" class="layui-input" title="导出清洗失败">
<input type="radio" lay-filter="export_type" name="export_type" value="bmc" class="layui-input" title="导出清洗成功至上传">
<input type="radio" lay-filter="export_type" name="export_type" value="success_bmc" class="layui-input" title="导出清洗成功">
<!-- <input type="radio" lay-filter="export_type" name="export_type" value="failed_bmc" class="layui-input" title="导出清洗失败至上传">
<input type="radio" lay-filter="export_type" name="export_type" value="none_bmc" class="layui-input" title="导出未处理至上传">
-->
</div>
</div>
<div class="layui-inline" id="sub_export_type">
<label class="layui-form-label" style="width: 100px;">导出字段</label>
<div class="layui-input-inline" style="width: 210px;">
<input type="checkbox" name="export_field[]" lay-filter="export_field" value="car_no" title="车牌号">
<input type="checkbox" name="export_field[]" lay-filter="export_field" value="car_frame_no" title="车架号" checked>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">导出数量</label>
<div class="layui-input-inline">
<input type="text" name="export_limit" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 100px;">导出文件名</label>
<div class="layui-input-inline" style="width: 450px;">
<input type="text" name="queue" id="queue-name" class="layui-input" style="display:inline-block; width: 325px;">
<button type="button" class="layui-btn" onclick="getExportName(event)">生成文件名</button>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">导出总计:</label>
<div class="layui-input-inline" style="width: 120px;">
<input type="text" name="num" id="count" class="layui-input" disabled>
</div>
<div class="layui-input-inline">
<button type="button" class="layui-btn" onclick="export_num(event)">获取总数</button>
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">新车购置价</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: 140px;">空电话检测</label>
<div class="layui-input-inline" style="width: 80px;">
<input type="checkbox" name="empty_phone_check" lay-skin="switch" lay-filter="empty_phone_check" value="yes" lay-text="开启|关闭" checked>
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">是否EXCEL</label>
<div class="layui-input-inline" style="width: 80px;">
<input type="checkbox" name="is_excel" lay-skin="switch" value="yes" lay-text="开启|关闭" checked>
</div>
</div>
</div>
</div>
<div class="task-param" id="task-peer-phone" style="display: none;">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">初登日期</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="export_date1" class="layui-input export-date1">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="export_date2" class="layui-input export-date2">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">个人电话重复次数</label>
<div class="layui-input-inline">
<input type="number" name="peer_phone_number" required lay-verify="required" class="layui-input">
</div>
</div>
</div>
</div>
<div class="task-param" id="task-repeat_frame" style="display: none;">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label" style="width: 140px;">初登日期</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="export_date1" class="layui-input export-date1">
</div>
<div class="layui-form-mid">-</div>
<div class="layui-input-inline" style="width: 200px;">
<input type="text" name="export_date2" class="layui-input export-date2">
</div>
</div>
</div>
</div>
</div>
<div class="layui-form-item" style="margin:24px 0 -15px;">
<div class="layui-inline" style="float: left;position: relative;z-index: 999;">
<label class="layui-form-label" style="width: 65px;"></label>
<div class="layui-input-inline" style="width: 405px">
<input type="text" name="queue" id="queue" class="layui-input">
</div>
<div class="layui-input-inline" style="">
<button type="button" class="layui-btn" onclick="search(event)">查询</button>
</div>
</div>
<div class="layui-input-block layui-text-right">
<button type="button" class="layui-btn" onclick="task_add()">立即提交</button>
<button type="button" class="layui-btn layui-btn-danger" id="clear-btn">清空数据</button>
</div>
</div>
</div>
<div class="layui-card-body layui-form">
<table class="layui-hide" id="task-info" lay-filter="task-info"></table>
</div>
</div>
</div>
<div class="layui-footer">
© zcstatham
</div>
</div>
<div id="lock-screen">
<div class="lock-screen">
<div class="layui-form-item">
<label class="layui-form-label">锁屏密码</label>
<div class="layui-input-inline" style="width: 200px;">
<input type="password" name="password" id="password" class="layui-input">
</div>
<div class="layui-input-inline" style="width: auto;">
<button type="button" class="layui-btn" onclick="login(event)">解锁</button>
</div>
</div>
</div>
</div>
<!--Global Javascript -->
<script src="/static/plugins//layui/layui.all.js"></script>
<script src="/static/plugins/jquery/jquery.min.js"></script>
<script src="/static/js/default.js"></script>
<!--Core Javascript -->
<script type="text/html" id="table-bar">
{{#
var payload = JSON.parse(d.payload);
var export_date1 = payload['data']['params']['export_date1'];
var export_date2 = payload['data']['params']['export_date2'];
var ext = d.remark.split('.')[1];
}}
{{# if(d.type == 2){ }}
{{# if(payload['data']['params']['export_limit'] > 0){ }}
{{#
var arrParam = [];
var exportUrlParam = '';
exportUrlParam += 'export_date1=' + export_date1 + '&';
exportUrlParam += 'export_date2=' + export_date2 + '&';
exportUrlParam += 'insurer_month1=' + payload['data']['params']['insurer_month1'] + '&';
exportUrlParam += 'insurer_day1=' + payload['data']['params']['insurer_day1'] + '&';
exportUrlParam += 'insurer_month2=' + payload['data']['params']['insurer_month2'] + '&';
exportUrlParam += 'insurer_day2=' + payload['data']['params']['insurer_day2'] + '&';
exportUrlParam += 'is_export_' + payload['data']['params']['export_type'] + '=' + d.id;
}}
<a class="layui-btn layui-btn-xs" href="/index/index.html?{{exportUrlParam}}">查看</a>
{{# } }}
{{# if(d.download_times > 0){ }}
<buton class="layui-btn layui-btn-xs" onclick="layer.confirm('已下载过,是否继续',function(index){layer.close(index);window.open('<?php echo url('task/download'); ?>?id={{d.id}}');window.location.reload();});">下载文件</buton>
{{# }else { }}
<buton class="layui-btn layui-btn-xs" onclick="window.open('<?php echo url('task/download'); ?>?id={{d.id}}');window.location.reload();">下载文件</buton>
{{# } }}
{{# }else if(d.type == 3){ }}
<a class="layui-btn layui-btn-xs" href="/index/index.html?is_check_peer_phone={{d.id}}">查看</a>
{{# if(d.info_num > 0){ }}
<button type="button" class="layui-btn layui-btn-xs" onclick="task_create(2,{{d.id}})">导出</button>
<button type="button" class="layui-btn layui-btn-xs layui-btn-danger" onclick="task_create(6,{{d.id}})">清除重复</button>
{{# } }}
{{# }else if(d.type == 4){ }}
<a class="layui-btn layui-btn-xs" href="/index/index.html?is_check_repeat_frame={{d.id}}">查看</a>
{{# if(d.info_num > 0){ }}
<button type="button" class="layui-btn layui-btn-xs" onclick="task_create(2,{{d.id}})">导出</button>
<button type="button" class="layui-btn layui-btn-xs layui-btn-danger" onclick="task_create(7,{{d.id}})">删除重复</button>
{{# } }}
{{# }else if(d.type == 5){ }}
<a class="layui-btn layui-btn-xs" href="/index/index.html?is_update_bhx={{d.id}}">查看</a>
{{# }else if(d.type == 7){ }}
<a class="layui-btn layui-btn-xs" href="/index/index.html?is_delete_frame={{d.id}}">查看</a>
{{# }else if(d.type == 1){ }}
<a class="layui-btn layui-btn-xs" href="/index/index.html?source={{d.id}}">查看</a>
{{# } }}
</script>
<script type="text/html" id="process-tpl">
<div class="layui-progress layui-progress-big" lay-filter="process-{{d.id}}" lay-showPercent="yes">
<div class="layui-progress-bar layui-bg-green" lay-percent="{{d.process}}%"></div>
</div>
</script>
<script>
layui.form.on('radio(task_type)', function(data){
$('#task-model-add').find('.task-param').removeClass('active').hide();
switch (+data.value) {
case 1:
$('#task-import').addClass('active').show();
break;
case 2:
$('#task-export').addClass('active').show();
break;
case 3:
$('#task-peer-phone').addClass('active').show();
break;
case 4:
$('#task-repeat_frame').addClass('active').show();
break;
case 5:
$('#task-import').addClass('active').show();
break;
}
});
layui.form.on('radio(export_type)', function(data){
if(['bmc','failed_bmc','none_bmc'].indexOf(data.value) != -1){
$('#sub_export_type').hide();
$('#sub_export_type').find(':input').attr('disabled',true);
}else if(data.value == 'success_bmc'){
$('#sub_export_type').hide();
$('#sub_export_type').find(':input').attr('disabled',true);
}else {
$('#sub_export_type').show();
$('#sub_export_type').find(':input').removeAttr('disabled');
}
});
var tableIns = layui.table.render({
id: 'taskInfo',
elem: '#task-info',
title:'车辆信息',
url: '<?php echo url("/task/taskInfo/"); ?>', //数据接口
page: true, //开启分页
limit: 20,
loading: true,
cols: [[ //表头
// {type: 'checkbox', fixed: 'left'},
{field: 'id', title: '序号', fixed: 'left', width: 100},
{field: 'type_txt', title: '任务名称', sort: true, width: 400},
{field: 'process', title: '处理进度', templet: '#process-tpl'},
{field: 'remark', title: '任务结果', sort: true},
{field: 'create_timestamp', title: '创建时间', sort: true, width: 200},
{field: 'status', title: '任务状态', sort: true, width: 100},
{field: 'download_times', title: '下载次数', sort: true, width: 100},
{fixed: 'right', width: 240, align:'center', toolbar: '#table-bar'}
]],
done: function (res, curr, count) {
layui.element.render();
var timer = setInterval(function(){
$.get('<?php echo url("task/process"); ?>', function (ret) {
if(!ret.data || ret.data.length == 0 ){
clearInterval(timer);
delete timer;
}else {
$.each(ret.data,function(i,d){
d.process = d.process > 100 ? 100 : d.process;
layui.element.progress('process-' + d.id, +d.process + '%');
if(d.process >= 100){
layui.table.reload('taskInfo');
}
})
}
});
},3000)
}
});
//监听行工具事件
layui.table.on('tool(task-info)', function(obj){ //注:tool 是工具条事件名,test 是 table 原始容器的属性 lay-filter="对应的值"
var data = obj.data, //获得当前行数据
layEvent = obj.event; //获得 lay-event 对应的值
if(layEvent === 'detail'){
layer.confirm('确定要清楚此项手机吗', function(index){
layer.close(index);
index = layer.load();
$.post('<?php echo url("index/clearPhone"); ?>', {id: data.id}, function (res) {
layer.close(index);
layer.msg(res.msg,function () {
layui.table.reload('taskInfo');
});
})
});
}
});
layui.upload.render({
elem: '#upload', //绑定元素
accept: 'file',
url: '<?php echo url("task/upload"); ?>', //上传接口
data: {
task_type: function () {
return $("input[name='task_type']:checked").val();
}
},
done: function (res) {
if (res.code == -1) {
$('#lock-screen').css('display', 'flex');
} else if (res.code == 0) {
layer.alert(res.msg);
} else if (res.code == 1) {
$('#original_filename').val(res.original_filename);
$('#filename').val(res.filename);
return true;
}
},
error: function (res) {
//请求异常回调
layer.alert(res.msg);
}
});
$(function(){
$('.export-date1,.export-date2').each(function (i, d) {
layui.laydate.render({
elem: d,
});
});
$('#clear-btn').on('click', function () {
layer.confirm('清空数据将不能恢复,确认清空附属表吗?', function(index){
layer.close(index);
index = layer.load();
//向服务端发送删除指令
$.post('<?php echo url("task/clearSubTable/"); ?>', function (ret) {
layer.close(index);
layer.msg(ret.msg, function () {
layui.table.reload('taskInfo');
});
});
});
});
});
function export_num(){
if($('[name="export_date1"]').val() == '' && $('[name="export_date1"]').val() == ''){
layer.msg('请先填写初登日期');
return false;
}
$.post('<?php echo url("task/exportNum"); ?>', $('#task-export').find(':input').serialize(), function (ret) {
layer.msg(ret['msg']);
$('#count').val(ret.data);
});
}
function task_create(type,id = 0){
$.post('<?php echo url("task/save"); ?>', {task_type: type,source_id: id}, function (ret) {
layer.msg(ret['msg'],function(){
layui.table.reload('taskInfo');
});
});
}
function task_add() {
var task_type = $('[name="task_type"]:checked').val();
if (task_type == 5 || task_type == 2) {
var name = task_type == 5 ? $('#original_filename').val() : $('#queue-name').val();
var type = task_type == 5 ? 'update' : 'export';
$.get('<?php echo url("task/checkIsExistName"); ?>?name=' + name + '&type=' + type, function (ret) {
if (ret.code == 1) {
layer.confirm(ret.msg, function (index) {
layer.close(index);
submitForm();
});
}else if (ret.code == 0) {
layer.alert(ret.msg);
}else if (ret.code == 2) {
submitForm();
}
});
}else {
submitForm();
}
}
function submitForm(){
$.post('<?php echo url("task/save"); ?>', $('#task-model-add').find('.active :input').serialize(), function (ret) {
if(ret.code == 0){
layer.alert(ret.msg);
}else {
layer.msg(ret['msg'],function(){
layui.table.reload('taskInfo');
});
}
});
}
function search(event){
tableIns.reload({
page: {
curr: 1 //重新从第 1 页开始
},
where: {queue: $('#queue').val()},
}, 'data');
}
function getExportName(event) {
var target = event.target;
$.get('<?php echo url("task/exportName"); ?>', $('#task-export').find(':input').serialize(), function (ret) {
if(ret.code == 0){
layer.alert(ret.msg);
}else {
$(target).prev('input[name="queue"]').val(ret.name);
}
});
}
</script>
</body>
</html>

@ -1,185 +0,0 @@
<?php /*a:4:{s:51:"D:\htdocs_new\excel-handle\app\view\index\edit.html";i:1594302886;s:52:"D:\htdocs_new\excel-handle\app\view\public\base.html";i:1582187582;s:54:"D:\htdocs_new\excel-handle\app\view\public\header.html";i:1583504952;s:54:"D:\htdocs_new\excel-handle\app\view\public\script.html";i:1581330838;}*/ ?>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="description" content="">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="robots" content="none">
<title>粮仓</title>
<link rel="shortcut icon" href="favicon.ico">
<link rel="stylesheet" href="/static/plugins/layui/css/layui.css">
<link rel="stylesheet" href="/static/css/default.css">
<!-- Core stylesheets -->
<style>
.layui-form-label {
width: 100px;
}
.layui-badge {
height: 28px;
line-height: 28px;
font-size: 14px;
}
</style>
</head>
<body class="layui-layout-body">
<div class="layui-card">
<div class="layui-card-header"></div>
<div class="layui-card-body layui-form">
<input type="hidden" name="id" value="<?php echo htmlentities($info['id']); ?>">
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">车牌号</label>
<div class="layui-input-inline">
<input type="text" name="car_no" value="<?php echo htmlentities($info['car_no']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">车架号</label>
<div class="layui-input-inline">
<input type="text" name="car_frame_no" value="<?php echo htmlentities($info['car_frame_no']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">发动机号</label>
<div class="layui-input-inline">
<input type="text" name="engine_no" value="<?php echo htmlentities($info['engine_no']); ?>" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">厂牌型号</label>
<div class="layui-input-inline">
<input type="text" name="factory_model" value="<?php echo htmlentities($info['factory_model']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">初登日期</label>
<div class="layui-input-inline">
<input type="text" name="register_date" id="register_date" value="<?php echo htmlentities($info['register_date']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">新车购置价</label>
<div class="layui-input-inline">
<input type="text" name="purchase_price" value="<?php echo htmlentities($info['purchase_price']); ?>" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">车主姓名</label>
<div class="layui-input-inline">
<input type="text" name="car_man" value="<?php echo htmlentities($info['car_man']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">车主证件号</label>
<div class="layui-input-inline">
<input type="text" name="car_number" value="<?php echo htmlentities($info['car_number']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">车主联系方式</label>
<div class="layui-input-inline">
<input type="text" name="car_phone" value="<?php echo htmlentities($info['car_phone']); ?>" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">上年承保公司</label>
<div class="layui-input-inline">
<input type="text" name="company" value="<?php echo htmlentities($info['company']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">商业止保日期</label>
<div class="layui-input-inline">
<input type="text" name="insurer1_date" id="insurer1_date" value="<?php echo htmlentities($info['insurer1_date']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">交强止保日期</label>
<div class="layui-input-inline">
<input type="text" name="insurer2_date" id="insurer2_date" value="<?php echo htmlentities($info['insurer2_date']); ?>" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<div class="layui-inline">
<label class="layui-form-label">被保险人</label>
<div class="layui-input-inline">
<input type="text" name="id_man" value="<?php echo htmlentities($info['id_man']); ?>" class="layui-input">
</div>
</div>
<div class="layui-inline">
<label class="layui-form-label">被保险人证件号</label>
<div class="layui-input-inline">
<input type="text" name="id_number" value="<?php echo htmlentities($info['id_number']); ?>" class="layui-input">
</div>
</div>
</div>
<div class="layui-form-item">
<label class="layui-form-label">数据状态</label>
<div class="layui-input-block" style="height: 36px; line-height: 36px;">
<?php if($info['is_export_bhx'] == 0 && $info['is_update_bhx'] == 0 && $info['is_export_bmc'] == 0 &&
$info['is_export_failed'] == 0 && $info['is_export_none_bmc'] == 0 && $info['is_export_failed_bmc'] == 0): ?>
<span class="layui-badge layui-bg-green">未处理</span>
<?php endif; if($info['is_export_bhx'] > 0): ?>
<span class="layui-badge layui-bg-green">导出至清洗</span>
<?php endif; if($info['is_export_bhx'] > 0 && $info['is_update_bhx'] > 0): ?>
<span class="layui-badge layui-bg-green">清洗成功</span>
<?php endif; if($info['is_export_bhx'] > 0 && $info['is_update_bhx'] < 0): ?>
<span class="layui-badge layui-bg-green">清洗失败</span>
<?php endif; if($info['is_export_bhx'] > 0 && $info['is_export_failed'] > 0): ?>
<span class="layui-badge layui-bg-green">导出清洗失败</span>
<?php endif; if($info['is_export_bhx'] > 0 && $info['is_export_failed_bmc'] > 0): ?>
<span class="layui-badge layui-bg-green">导出清洗失败至上传</span>
<?php endif; if($info['is_export_bhx'] > 0 && $info['is_update_bhx'] > 0 && $info['is_export_bmc'] > 0): ?>
<span class="layui-badge layui-bg-green">导出清洗成功至上传</span>
<?php endif; if($info['is_export_none_bmc'] > 0): ?>
<span class="layui-badge layui-bg-green">导出未处理至上传</span>
<?php endif; ?>
</div>
</div>
<div class="layui-form-item" style="margin-top: 60px; text-align: center">
<button type="submit" class="layui-btn" lay-submit="" lay-filter="car-info">立即提交</button>
<button type="button" class="layui-btn layui-btn-danger" onclick="location.reload();">重置</button>
<button type="button" class="layui-btn layui-btn-danger" onclick="window.parent.layer.closeAll();">关闭</button>
</div>
</div>
</div>
<!--Global Javascript -->
<script src="/static/plugins//layui/layui.all.js"></script>
<script src="/static/plugins/jquery/jquery.min.js"></script>
<script src="/static/js/default.js"></script>
<script>
layui.laydate.render({
elem: '#register_date'
});
layui.form.on('submit(car-info)', function(data){
$.post('<?php echo url("index/edit"); ?>',data.field,function(ret){
layer.msg(ret['msg'],function(){
if(ret['code'] == 1){
window.parent.layer.closeAll();
window.parent.layui.table.reload('carInfo');
}
delete ret;
});
});
return false;
});
</script>
</body>
</html>
Loading…
Cancel
Save