问题修复
This commit is contained in:
parent
d9f578b336
commit
d2a1945443
|
|
@ -39,17 +39,17 @@ function reloadData() {
|
|||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'auditStatus': $('#auditStatus').val(),
|
||||
applyType:'0'
|
||||
}),
|
||||
},
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'auditStatus': $('#auditStatus').val(),
|
||||
applyType:'0'
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -248,3 +248,7 @@ function editApplyPlan(obj) {
|
|||
function applyPlanDetail(obj) {
|
||||
openIframeByParamObj("apply_plan_detail", "详情", "./child/apply_plan_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
||||
function showHelp(type){
|
||||
openIframeByParamObj("show_help", "功能说明", "../show_help.html", "50%", "75%", type);
|
||||
}
|
||||
|
|
@ -1,8 +1,13 @@
|
|||
let objParam;
|
||||
let form, table, element, tableIns, layer, util;
|
||||
let pageNum = 1;
|
||||
let proType;
|
||||
let applyType;
|
||||
function setParams(obj) {
|
||||
objParam = JSON.parse(obj);
|
||||
proType=objParam.proType;
|
||||
applyType = objParam.applyType;
|
||||
console.log(applyType)
|
||||
layui.use(["form", "table", 'element', 'layer', 'util'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
|
|
@ -15,7 +20,9 @@ function setParams(obj) {
|
|||
} else {
|
||||
initTable2();
|
||||
$('#nameBox').removeAttr('style');
|
||||
$('#whiteBox').removeAttr('style');
|
||||
if (proType!=='变电工程' && applyType!=='1'){
|
||||
$('#whiteBox').removeAttr('style');
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
|
@ -61,13 +68,13 @@ function reloadTable(pageNum) {
|
|||
params.isWhiteList = $('#isWhiteList').val();
|
||||
}
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify(params),
|
||||
},
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify(params),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -160,6 +167,12 @@ function initTable() {
|
|||
|
||||
// 驾驶员表格数据
|
||||
function initTable2() {
|
||||
let isWhiteList;
|
||||
if (proType==='变电工程' || applyType==='1'){
|
||||
isWhiteList = 1;
|
||||
} else {
|
||||
isWhiteList = $('#isWhiteList').val();
|
||||
}
|
||||
let url = dataUrl + "backstage/carDriver/getDriverListBySup";
|
||||
tableIns = table.render({
|
||||
elem: "#currentTableId",
|
||||
|
|
@ -173,7 +186,7 @@ function initTable2() {
|
|||
encryptedData: JSON.stringify({
|
||||
name: $('#name').val(),
|
||||
supId: objParam.supId,
|
||||
isWhiteList: $('#isWhiteList').val()
|
||||
isWhiteList: isWhiteList
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
|
|
|
|||
|
|
@ -96,7 +96,7 @@ function setPlanTables(list) {
|
|||
'<td>' + item.model + '</td>' +
|
||||
'<td>' + item.unit + '</td>' +
|
||||
'<td>' + item.needNum + '</td>' +
|
||||
'<td>' + item.needDay + '</td>' +
|
||||
'<td>' + (item.needDay !== null ? item.needDay : '') + '</td>' +
|
||||
'<td>' + handleRemark(item.remark) + '</td>' +
|
||||
'</tr>';
|
||||
})
|
||||
|
|
|
|||
|
|
@ -76,17 +76,17 @@ function reloadData() {
|
|||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'code': $('#code').val(),
|
||||
'status': $('#status').val(),
|
||||
'proId': objParam.proId
|
||||
}),
|
||||
},
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'code': $('#code').val(),
|
||||
'status': $('#status').val(),
|
||||
'proId': objParam.proId
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -258,6 +258,10 @@ function initTable() {
|
|||
html += "<a onclick='dispatchCarDetail(" + JSON.stringify(d) + ",1)'>详情</a>";
|
||||
if (!d.supId) {
|
||||
html += "<div class='splitLine'>|</div><a onclick='dispatchCarAllocation(" + JSON.stringify(d) + ")'>派车分配</a>";
|
||||
} else {
|
||||
if (d.statusName === '待派车'){
|
||||
html += "<div class='splitLine'>|</div><a style='color:#f56c6c;' onclick='delData(" + JSON.stringify(d) + ")'>删除</a>";
|
||||
}
|
||||
}
|
||||
if (d.statusName !== '待派车') {
|
||||
if (d.statusName!=='已派车'){
|
||||
|
|
@ -308,6 +312,33 @@ function dispatchCarDetail(obj, type) {
|
|||
openIframeByParamObj2("dispatchCarDetail", title, "../car_demand_plan/child/dispatch_car_detail.html", "92%", "95%", obj, 2);
|
||||
}
|
||||
|
||||
// 删除
|
||||
function delData(data) {
|
||||
layer.confirm("确定删除派车分配数据吗?", { 'title': '操作提示', move: false }, function () {
|
||||
let loadingMsg = layer.msg('数据删除中,请稍候...', { icon: 16, scrollbar: false, time: 0 });
|
||||
let url = dataUrl + "backstage/dispatchCar/deleteData"
|
||||
let obj = {
|
||||
'id': data.id,
|
||||
}
|
||||
let params = {
|
||||
encryptedData: JSON.stringify(obj)
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
layer.msg(result.msg, { icon: 1 })
|
||||
queryTable(1);
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2 })
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
error(xhr)
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
// 修改记录
|
||||
function editRecord(obj) {
|
||||
let flag = isExistData(3, obj);
|
||||
|
|
|
|||
|
|
@ -157,7 +157,7 @@ function setPlanTables(list) {
|
|||
"<td>" + item.model + "</td>" +
|
||||
"<td>" + item.unit + "</td>" +
|
||||
"<td>" + item.needNum + "</td>" +
|
||||
"<td>" + item.needDay + "</td>" +
|
||||
"<td>" + (item.needDay !== null ? item.needDay : '') + "</td>" +
|
||||
"<td>" + handleRemark(item.remark) + "</td>" +
|
||||
"</tr>";
|
||||
})
|
||||
|
|
@ -508,7 +508,9 @@ function chooseCarOrUser(type, formName) {
|
|||
let params = {
|
||||
type: type,
|
||||
formName: formName,
|
||||
supId:objParam.supId
|
||||
supId:objParam.supId,
|
||||
proType:objParam.proType,
|
||||
applyType:objParam.applyType
|
||||
};
|
||||
openIframeByParamObj("chooseCarOrUser", title, "./choose_car_or_user_list.html", '92%', '95%', params);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -38,15 +38,15 @@ function reloadData() {
|
|||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
|
|
@ -83,7 +83,7 @@ function initTable() {
|
|||
cols: [
|
||||
[
|
||||
{
|
||||
width: '5.9%',
|
||||
width: '4%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
|
|
@ -92,7 +92,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "typeName",
|
||||
width: '7%',
|
||||
width: '6.9%',
|
||||
title: "计划类型",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
|
|
@ -146,7 +146,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
field: "statusName",
|
||||
width: '8%',
|
||||
width: '7.5%',
|
||||
title: "派车状态",
|
||||
unresize: true,
|
||||
sort: true,
|
||||
|
|
@ -211,7 +211,7 @@ function initTable() {
|
|||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: '9%',
|
||||
width: '11.5%',
|
||||
align: "center",
|
||||
unresize: true,
|
||||
templet: function (d) {
|
||||
|
|
@ -225,6 +225,9 @@ function initTable() {
|
|||
} else if (parseInt(dispatchNum) === 0) {
|
||||
html += "<div class='splitLine'>|</div><a onclick='dispatchInput(" + JSON.stringify(d) + ")'>派车录入</a>";
|
||||
}
|
||||
if (auditStatus=== '待审核'){
|
||||
html += "<div class='splitLine'>|</div><a style='color:#f56c6c;' onclick='delData(" + JSON.stringify(d) + ")'>删除</a>";
|
||||
}
|
||||
return html;
|
||||
},
|
||||
},
|
||||
|
|
@ -274,6 +277,34 @@ function dispatchInput(obj) {
|
|||
openIframeByParamObj("dispatchInput", "派车录入", "./child/dispatch_input_form.html", "92%", "95%", obj);
|
||||
}
|
||||
|
||||
// 删除
|
||||
function delData(data) {
|
||||
layer.confirm("确定删除派车数据吗?", { 'title': '操作提示', move: false }, function () {
|
||||
let loadingMsg = layer.msg('数据删除中,请稍候...', { icon: 16, scrollbar: false, time: 0 });
|
||||
let url = dataUrl + "backstage/supDispatchCar/deleteData"
|
||||
let obj = {
|
||||
'id': data.id,
|
||||
'supId': data.supId
|
||||
}
|
||||
let params = {
|
||||
encryptedData: JSON.stringify(obj)
|
||||
}
|
||||
ajaxRequest(url, "POST", params, true, function () {
|
||||
}, function (result) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
if (result.code === 200) {
|
||||
layer.msg(result.msg, { icon: 1 })
|
||||
queryTable(1);
|
||||
} else {
|
||||
layer.msg(result.msg, { icon: 2 })
|
||||
}
|
||||
}, function (xhr) {
|
||||
layer.close(loadingMsg); // 关闭提示层
|
||||
error(xhr)
|
||||
});
|
||||
})
|
||||
}
|
||||
|
||||
// 详情
|
||||
function applyPlanDetail(obj) {
|
||||
let flag = isExistData(obj, 1);
|
||||
|
|
|
|||
|
|
@ -19,14 +19,17 @@
|
|||
<legend>搜索信息</legend>
|
||||
<div style="margin: 10px 10px 10px 10px">
|
||||
<form class="layui-form layui-form-pane" action="#" onsubmit="return false;">
|
||||
<div class="layui-form-item">
|
||||
<div class="layui-inline">
|
||||
<div class="layui-form-item" style="display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap;">
|
||||
|
||||
<!-- 左侧的搜索输入框 -->
|
||||
<div class="layui-inline" style="margin-right: 10px;">
|
||||
<div class="layui-input-inline" style="width: 310px;">
|
||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入关键字(计划编号/工程名称/申请人)" maxlength="30">
|
||||
class="layui-input" lay-affix="clear" placeholder="输入关键字(计划编号/工程名称/申请人)" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
|
||||
<div class="layui-inline" style="margin-right: 10px;">
|
||||
<div class="layui-input-inline" style="width: 200px;">
|
||||
<select class="layui-select" id="status">
|
||||
<option value="">请选择审核状态</option>
|
||||
|
|
@ -36,18 +39,37 @@
|
|||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline">
|
||||
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)"><i
|
||||
class="layui-icon"></i> 搜 索</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="queryTable(2)"><i
|
||||
class="layui-icon layui-icon-refresh"></i> 重 置</button>
|
||||
<button class="layui-btn layui-bg-blue" onclick="applyPlan({})"><i
|
||||
class="layui-icon layui-icon-file"></i> 需 求 计 划 申 请</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="exportExcel()"><i
|
||||
class="layui-icon layui-icon-download-circle"></i> 导 出</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="showProcess()"><i
|
||||
class="layui-icon layui-icon-spread-left"></i> 查 看 流 程</button>
|
||||
|
||||
<!-- 按钮组和问号按钮统一放在一个 flex 容器里 -->
|
||||
<div class="layui-inline" style="display: flex; align-items: center; flex: 1; justify-content: space-between;">
|
||||
|
||||
<!-- 按钮组 -->
|
||||
<div style="white-space: nowrap;">
|
||||
<button class="layui-btn layui-bg-blue" onclick="queryTable(1)">
|
||||
<i class="layui-icon"></i> 搜 索
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="queryTable(2)">
|
||||
<i class="layui-icon layui-icon-refresh"></i> 重 置
|
||||
</button>
|
||||
<button class="layui-btn layui-bg-blue" onclick="applyPlan({})">
|
||||
<i class="layui-icon layui-icon-file"></i> 需 求 计 划 申 请
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="exportExcel()">
|
||||
<i class="layui-icon layui-icon-download-circle"></i> 导 出
|
||||
</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="showProcess()">
|
||||
<i class="layui-icon layui-icon-spread-left"></i> 查 看 流 程
|
||||
</button>
|
||||
</div>
|
||||
|
||||
<!-- 问号按钮 -->
|
||||
<div>
|
||||
<button class="layui-btn layui-btn-normal" title="功能说明" onclick="showHelp(1)">
|
||||
<i class="layui-icon layui-icon-help"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,117 @@
|
|||
<!DOCTYPE html>
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<title>功能说明</title>
|
||||
<meta name="renderer" content="webkit">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
|
||||
<link rel="stylesheet" href="../lib/layui-v2.9.18/layui/css/layui.css" media="all">
|
||||
<link rel="stylesheet" href="../css/font.css" media="all">
|
||||
<link rel="stylesheet" href="../css/public.css" media="all">
|
||||
<style>
|
||||
/* 增加全局字体大小 */
|
||||
body {
|
||||
font-size: 16px; /* 默认字体大小 */
|
||||
}
|
||||
|
||||
/* 针对 legend 和内容区域的字体大小调整 */
|
||||
.table-search-fieldset legend {
|
||||
font-size: 18px; /* 调整标题大小 */
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
#content {
|
||||
font-size: 16px; /* 调整内容字体大小 */
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<fieldset class="table-search-fieldset">
|
||||
<!-- 动态 legend -->
|
||||
<legend id="fieldLegend">功能说明</legend>
|
||||
<div style="padding: 20px;">
|
||||
<!-- 动态内容区域 -->
|
||||
<div id="content" style="line-height: 1.5em; color: #333;"></div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- JS 引入 -->
|
||||
<script src="../lib/jquery-3.4.1/jquery-3.4.1.min.js" charset="utf-8"></script>
|
||||
<script src="../js/public.js" charset="utf-8"></script>
|
||||
<script src="../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
||||
<script src="../js/openIframe.js" charset="utf-8"></script>
|
||||
|
||||
<script>
|
||||
function setParams(obj) {
|
||||
console.log(obj);
|
||||
let objParam = JSON.parse(obj);
|
||||
console.log(objParam);
|
||||
|
||||
// 初始化 Layui 模块
|
||||
layui.use(['form', 'layer', 'laydate', 'upload', 'table'], function () {
|
||||
const form = layui.form;
|
||||
const layer = layui.layer;
|
||||
form.render();
|
||||
});
|
||||
|
||||
// 获取 DOM 元素
|
||||
const contentDiv = document.getElementById('content');
|
||||
const fieldLegend = document.getElementById('fieldLegend');
|
||||
|
||||
// 定义标题和内容映射关系
|
||||
const helpContentMap = {
|
||||
1: {
|
||||
title: '需求计划申请说明',
|
||||
content: `
|
||||
<p><strong>需求计划申请</strong>:用于项目初期提出物资采购或使用计划。</p>
|
||||
<p>用户填写相关信息后提交,由相关负责人进行审批。</p>
|
||||
<p>注意事项:</p>
|
||||
<ul>
|
||||
<li>请确保所填信息真实有效;</li>
|
||||
<li>上传附件需为PDF格式,大小不超过10MB;</li>
|
||||
<li>审批流程最长不超过3个工作日。</li>
|
||||
</ul>
|
||||
`
|
||||
},
|
||||
2: {
|
||||
title: '查看流程说明',
|
||||
content: `
|
||||
<p><strong>查看流程</strong>:展示当前单据的审批流程图及处理记录。</p>
|
||||
<p>支持查看每一步审批人、审批意见及时间。</p>
|
||||
<p>如流程异常,请联系管理员。</p>
|
||||
`
|
||||
},
|
||||
3: {
|
||||
title: '导出功能说明',
|
||||
content: `
|
||||
<p><strong>导出功能</strong>:将当前查询结果导出为 Excel 文件。</p>
|
||||
<p>导出数据包含所有字段信息,便于离线分析与存档。</p>
|
||||
<p>注意:数据量过大时建议分页导出。</p>
|
||||
`
|
||||
}
|
||||
};
|
||||
|
||||
// 默认内容
|
||||
const defaultContent = {
|
||||
title: '功能说明',
|
||||
content: '<p>暂无与当前参数匹配的功能说明。</p>'
|
||||
};
|
||||
|
||||
// 获取对应内容
|
||||
const selected = helpContentMap[objParam] || defaultContent;
|
||||
|
||||
// 设置标题和内容
|
||||
fieldLegend.textContent = selected.title;
|
||||
contentDiv.innerHTML = selected.content;
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue