BUG修复

This commit is contained in:
cwchen 2024-11-21 09:36:23 +08:00
parent bd9b696a11
commit 55e2ee20a6
4 changed files with 40 additions and 22 deletions

View File

@ -16,6 +16,12 @@ layui.use(["form", "table", 'laydate'], function () {
// 查询/重置
function queryTable(type) {
if (type === 1) {
let keyWord = $('#keyWord').val();
let flag = checkValue(keyWord);
if (flag) {
$('#keyWord').val('');
return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 });
}
reloadTable(1);
} else if (type === 2) {
$('#keyWord').val('');
@ -128,7 +134,7 @@ function initTable() {
title: "备注",
unresize: true,
align: "center",
},
{
field: "remark",
@ -137,7 +143,7 @@ function initTable() {
unresize: true,
align: "center",
templet: function (d) {
return getCheckStatus(d.statusType,d.status);
return getCheckStatus(d.statusType, d.status);
},
},
{
@ -176,28 +182,28 @@ function exportExcel() {
//审核状态
function getCheckStatus(statusType, status) {
var company = "";
if (statusType === '1') {
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
} else if (statusType === '2') {
company = "分公司";
} else if (statusType === '3') {
company = "项目管理中心";
} else if (statusType === '4') {
company = "机具公司";
}
if (status === '1') {
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待" + company + "审核";
} else if (status === '2') {
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
} else if (status === '3') {
return "<span style='color:#F56C6C;margin:0 5px 0 5px;font-size:16px'>●</span>"+company + "审核驳回";
}
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待审核";
var company = "";
if (statusType === '1') {
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
} else if (statusType === '2') {
company = "分公司";
} else if (statusType === '3') {
company = "项目管理中心";
} else if (statusType === '4') {
company = "机具公司";
}
if (status === '1') {
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待" + company + "审核";
} else if (status === '2') {
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
} else if (status === '3') {
return "<span style='color:#F56C6C;margin:0 5px 0 5px;font-size:16px'>●</span>" + company + "审核驳回";
}
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待审核";
}
// 查询流程
function showProcess(){
function showProcess() {
openIframeByParamObj("show_process", "流程说明", "./child/show_process.html", "70%", "65%", null);
}

View File

@ -70,6 +70,12 @@ function getStatistics() {
// 查询/重置
function queryTable(type) {
if (type === 1) {
let proName = $('#proName').val();
let flag = checkValue(proName);
if (flag) {
$('#proName').val('');
return layer.msg('工程名称查询包含特殊字符,请重新输入', { icon: 2 });
}
reloadTable(1);
} else if (type === 2) {
$('#proName').val('');

View File

@ -17,6 +17,12 @@ layui.use(["form", "table", 'element'], function () {
// 查询/重置
function queryTable(type) {
if (type === 1) {
let keyWord = $('#keyWord').val();
let flag = checkValue(keyWord);
if (flag) {
$('#keyWord').val('');
return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 });
}
reloadTable(1);
} else if (type === 2) {
$('#keyWord').val('');

View File

@ -246,7 +246,7 @@ const useBase64 = {
/* 校验查询关键字是否包含特殊字符 */
function checkValue(value) {
if (value) {
let pattern = new RegExp("[%<>]");
let pattern = new RegExp("[%_<>]");
if (pattern.test(value)) {
return true;
}