提交 2f3fa46f 编写于 作者: Skyeye云's avatar Skyeye云

车辆管理--所有车辆车牌号查询优化

上级 17e0fbf5
......@@ -18,20 +18,12 @@ layui.config({
$("#accidentTitle").html("车辆事故登记单-" + userName + "-" + (new Date()).getTime()) + Math.floor(Math.random()*100);
});
// 车牌号
showGrid({
id: "licensePlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#licensePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
form.render('select');
});
// 事故时间
laydate.render({
elem: '#accidentTime',
......
var rowId = "";
// 事故管理
layui.config({
base: basePath,
version: skyeyeVersion
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table,
......@@ -17,22 +16,13 @@ layui.config({
// 新增车辆事故
authBtn('1597468393714');
// 事故管理开始
// 车牌号
showGrid({
id: "accidentPlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
showAccidentList();
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#accidentPlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
form.render('select');
});
showAccidentList();
function showAccidentList(){
table.render({
id: 'accidentTable',
......
......@@ -18,20 +18,12 @@ layui.config({
$("#inspectionTitle").html("车辆年检登记单-" + userName + "-" + (new Date()).getTime()) + Math.floor(Math.random() * 100);
});
// 车牌号
showGrid({
id: "licensePlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#licensePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
form.render('select');
});
// 本次年检时间
laydate.render({
elem: '#thisInspectionTime',
......
......@@ -6,9 +6,7 @@ layui.config({
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table,
......@@ -16,19 +14,11 @@ layui.config({
// 新增车辆年检
authBtn('1597470685417');
// 车牌号
showGrid({
id: "inspectionPlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#inspectionPlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
form.render('select');
});
showInspectionList();
......
......@@ -35,20 +35,12 @@ layui.config({
}
}});
//车牌号
showGrid({
id: "licensePlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#licensePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
form.render('select');
});
//投保有效期时间
laydate.render({
elem: '#validityTime',
......
......@@ -6,9 +6,7 @@ layui.config({
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table,
......@@ -16,19 +14,11 @@ layui.config({
// 新增车辆保险
authBtn('1597479769139');
// 车牌号
showGrid({
id: "insurancePlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#insurancePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
form.render('select');
});
showInsuranceList();
......
......@@ -19,20 +19,12 @@ layui.config({
$("#maintenanceTitle").html("车辆维修保养登记单-" + userName + "-" + (new Date()).getTime()) + Math.floor(Math.random()*100);
});
// 车牌号
showGrid({
id: "licensePlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#licensePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
form.render('select');
});
// 维修保养时间段选择
laydate.render({
elem: '#maintenanceTime',
......
......@@ -7,7 +7,6 @@ layui.config({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table,
......@@ -15,19 +14,11 @@ layui.config({
// 新增车辆维修保养
authBtn('1597478766486');
//车牌号
showGrid({
id: "maintenancePlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#maintenancePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
form.render('select');
});
showMaintenanceList();
......
......@@ -19,20 +19,12 @@ layui.config({
$("#oilTitle").html("车辆加油登记单-" + userName + "-" + (new Date()).getTime()) + Math.floor(Math.random() * 100);
});
// 车牌号
showGrid({
id: "licensePlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option-must.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#licensePlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option-must.tpl'), data));
form.render('select');
});
// 加油日期
laydate.render({
elem: '#oilTime',
......
......@@ -6,9 +6,7 @@ layui.config({
}).extend({
window: 'js/winui.window'
}).define(['window', 'table', 'jquery', 'winui', 'form', 'laydate'], function (exports) {
winui.renderColor();
var $ = layui.$,
form = layui.form,
table = layui.table,
......@@ -16,21 +14,13 @@ layui.config({
// 新增车辆加油
authBtn('1597469406320');
// 车牌号
showGrid({
id: "oilPlate",
url: flowableBasePath + "vehicle010",
params: {},
pagination: false,
template: getFileContent('tpl/template/select-option.tpl'),
ajaxSendLoadBefore: function(hdb){
},
ajaxSendAfter:function(json){
form.render('select');
}
// 查询所有的车牌号用于下拉选择框
adminAssistantUtil.queryAllVehicleList(function (data){
$("#oilPlate").html(getDataUseHandlebars(getFileContent('tpl/template/select-option.tpl'), data));
form.render('select');
});
laydate.render({
elem: '#oilTime',
type: 'datetime',
......
......@@ -19,4 +19,21 @@ var adminAssistantUtil = {
}, async: false});
},
/**
* 车辆管理---查询所有的车牌号用于下拉选择框
*
* @param callback 回执函数
*/
queryAllVehicleList: function (callback){
AjaxPostUtil.request({url: flowableBasePath + "vehicle010", params: {}, type: 'json', method: "GET", callback: function(json) {
if(json.returnCode == 0) {
if(typeof(callback) == "function") {
callback(json);
}
} else {
winui.window.msg(json.returnMessage, {icon: 2, time: 2000});
}
}, async: false});
},
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册