列表展示美化

This commit is contained in:
Renpc-kilig 2021-05-12 10:43:56 +08:00
parent a0d2f355fc
commit 47f62c3960
4 changed files with 51 additions and 56 deletions

View File

@ -166,13 +166,13 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审批</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>'; rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
} }
if(rowData == '2') { if(rowData == '2') {
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>'; rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审批驳回</a>';
} }
return rowData; return rowData;
} }

View File

@ -166,13 +166,13 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">待审批</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审批</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>'; rowData = '<a class="layui-btn layui-btn-xs">审批通过</a>';
} }
if(rowData == '2') { if(rowData == '2') {
rowData = '<a class="layui-btn layui-btn-xs">审批驳回</a>'; rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审批驳回</a>';
} }
return rowData; return rowData;
} }
@ -184,7 +184,7 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">未分配</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>'; rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
@ -199,7 +199,7 @@
return '-'; return '-';
} }
if(rowData == '0') { if(rowData == '0') {
rowData = '<a class="layui-btn layui-btn-xs">未分配</a>'; rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">未分配</a>';
} }
if(rowData == '1') { if(rowData == '1') {
rowData = '<a class="layui-btn layui-btn-xs">已分配</a>'; rowData = '<a class="layui-btn layui-btn-xs">已分配</a>';
@ -437,6 +437,8 @@
[data.examId]), {}, null, function(code, resultData) { [data.examId]), {}, null, function(code, resultData) {
if(null != resultData && resultData.length > 0) { if(null != resultData && resultData.length > 0) {
top.dialog.msg('监考老师分配失败'); top.dialog.msg('监考老师分配失败');
}else {
top.dialog.msg('监考老师分配成功');
} }
reloadTable(); reloadTable();
}, function(code, data) { }, function(code, data) {

View File

@ -196,7 +196,7 @@
<div class="layui-form-item layui-layout-admin"> <div class="layui-form-item layui-layout-admin">
<div class="layui-input-block"> <div class="layui-input-block">
<div class="layui-footer" style="left: 0;"> <div class="layui-footer" style="left: 0;">
<button type="button" class="layui-btn" lay-submit lay-filter="submitForm">提交编辑</button> <button type="button" class="layui-btn" id="subBtn" lay-submit lay-filter="submitForm">提交编辑</button>
<button type="button" class="layui-btn layui-btn-primary close">返回上级</button> <button type="button" class="layui-btn layui-btn-primary close">返回上级</button>
</div> </div>
</div> </div>
@ -297,22 +297,39 @@
}); });
} }
// 初始化视频 // 初始化理论考试开始时间时间戳
function initVideo(fileName, data) { function initTheoryExamStartTimeDateTime() {
for(var i = 0, item; item = data[i++];) { laydate.render({
var player = new ckplayer({ elem: '#theoryExamStartTime',
container: '#'+ fileName + i, type: 'datetime',
variable: 'player', trigger: 'click',
flashplayer: false, done: function (value, date, endDate) {
video: { var startDate = new Date(value).getTime();
file: 'route/file/download/true/'+ item.fileId, var endTime = new Date($('#theoryExamEndTime').val()).getTime();
type: 'video/mp4' if (endTime <= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
} }
}); }
} });
} }
// 初始化理论考试开始时间时间戳 // 初始化理论考试结束时间时间戳
function initTheoryExamEndTimeDateTime() {
laydate.render({
elem: '#theoryExamEndTime',
type: 'datetime',
trigger: 'click',
done: function (value, date, endDate) {
var startDate = new Date(value).getTime();
var endTime = new Date($('#theoryExamStartTime').val()).getTime();
if (endTime >= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
}
}
});
}
// 初始化实操考试开始时间时间戳
function initPracticeExamStartTimeDateTime() { function initPracticeExamStartTimeDateTime() {
laydate.render({ laydate.render({
elem: '#practiceExamStartTime', elem: '#practiceExamStartTime',
@ -328,7 +345,7 @@
}); });
} }
// 初始化理论考试结束时间时间戳 // 初始化实操考试结束时间时间戳
function initPracticeExamEndTimeDateTime() { function initPracticeExamEndTimeDateTime() {
laydate.render({ laydate.render({
elem: '#practiceExamEndTime', elem: '#practiceExamEndTime',
@ -344,38 +361,6 @@
}); });
} }
// 初始化实操考试开始时间时间戳
function initTheoryExamStartTimeDateTime() {
laydate.render({
elem: '#theoryExamStartTime',
type: 'datetime',
trigger: 'click',
done: function (value, date, endDate) {
var startDate = new Date(value).getTime();
var endTime = new Date($('#theoryExamEndTime').val()).getTime();
if (endTime >= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
}
}
});
}
// 初始化实操考试结束时间时间戳
function initTheoryExamEndTimeDateTime() {
laydate.render({
elem: '#theoryExamEndTime',
type: 'datetime',
trigger: 'click',
done: function (value, date, endDate) {
var startDate = new Date(value).getTime();
var endTime = new Date($('#theoryExamStartTime').val()).getTime();
if (endTime >= startDate) {
layer.msg('理论考试结束时间不能早于等于开始时间');
}
}
});
}
// 初始化缴费凭证图片上传 // 初始化缴费凭证图片上传
function initPaymentVoucherUploadFile() { function initPaymentVoucherUploadFile() {
var files = $('#paymentVoucher').val(); var files = $('#paymentVoucher').val();
@ -438,6 +423,11 @@
for(var i in data) { for(var i in data) {
dataFormData[i] = data[i] +''; dataFormData[i] = data[i] +'';
} }
/*if (null == data.status || '' == data.status || typeof (data.status) == 'undefined') {
$('#subBtn').show();
} else {
$('#subBtn').hide();
}*/
form.val('dataForm', dataFormData); form.val('dataForm', dataFormData);
form.render(null, 'dataForm'); form.render(null, 'dataForm');
initPracticeExamAddressIdSelect(data['practiceExamAddressId']); initPracticeExamAddressIdSelect(data['practiceExamAddressId']);

View File

@ -165,14 +165,17 @@
{field: 'checkStatus', width: 180, title: '审核状态', align:'center', {field: 'checkStatus', width: 180, title: '审核状态', align:'center',
templet: function(row) { templet: function(row) {
var rowData = row[this.field]; var rowData = row[this.field];
if(typeof(rowData) === 'undefined' || rowData == null || rowData == '') { if(typeof(rowData) === 'undefined' || rowData === null || rowData === '') {
return '-'; return '-';
} }
if('0' == rowData) {
rowData = '<a class="layui-btn layui-btn-warm layui-btn-xs">待审核</a>';
}
if('2' == rowData) { if('2' == rowData) {
rowData = '审核通过'; rowData = '<a class="layui-btn layui-btn-xs">审核通过</a>';
} }
if('3' == rowData) { if('3' == rowData) {
rowData = '审核驳回'; rowData = '<a class="layui-btn layui-btn-danger layui-btn-xs">审核驳回</a>';
} }
return rowData; return rowData;
} }