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

View File

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

View File

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

View File

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