This commit is contained in:
jiang 2025-07-15 17:53:23 +08:00
parent f10f91eb19
commit 7f14ca723a
5 changed files with 133 additions and 84 deletions

View File

@ -29,6 +29,17 @@ body {
}
.fixed-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: white; /* 防止盖住内容后面透明 */
z-index: 999; /* 确保在最上层 */
padding: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 可选阴影 */
}
#plan-detail-box {
width: 100%;
height: 80px;
@ -44,6 +55,9 @@ body {
font-weight: bold;
}
#plan-detail-box>div {
margin: 0 20px;
}
#plan-basic-box {
width: 100%;
flex-direction: column;

View File

@ -1,7 +1,9 @@
var form, layer;
let objParam, idParam;
function setParams(params) {
objParam = JSON.parse(params);
console.log(objParam);
idParam = objParam.id;
layui.use(['form'], function () {
form = layui.form;
@ -13,9 +15,11 @@ function setParams(params) {
form.on('radio(auditStatus)', function (data) {
if (data.value === '2') { // 通过
$('#remark').removeAttr('lay-verify');
$('#remark').val("申请通过"); // textarea 设置内容用 val()
$('#auditRemarksLabel').removeClass('required');
} else if (data.value === '3') { // 不通过
$('#remark').attr('lay-verify', 'required');
$('#remark').val("申请驳回"); // textarea 设置内容用 val()
$('#auditRemarksLabel').addClass('required');
}
});
@ -61,7 +65,15 @@ function submitApply(data) {
$('.cancel').removeClass("layui-btn-disabled").attr("disabled", false);
if (result.code === 200) {
top.layer.msg(result.msg, {icon: 1});
if (objParam.token) {
// 如果没有 token直接关闭整个窗口
window.parent.open('', '_self');
window.parent.close();
return;
} else {
closePage(1);
}
} else {
layer.msg(result.msg, {icon: 2});
}
@ -77,6 +89,8 @@ function submitApply(data) {
// 关闭页面
function closePage(type) {
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
if (type == 1) {
if (objParam.checkType === '1') { // 派车录入审核
window.parent.reloadAuditData();

View File

@ -2,6 +2,7 @@ let objParam, dataObj;
let form, table, upload, tableIns, layer, element;
let pageNum = 1;
let checkNowValue = ''; // 当前选中的批次
let token;
// 获取 URL 参数
function getParamsFromUrl() {
@ -20,6 +21,7 @@ window.addEventListener("DOMContentLoaded", () => {
if (!params.token) {
return;
}
token = params.token;
sessionStorage.setItem('gz-token', params.token);
let url = dataUrl + `backstage/dispatchCar/getNeedPlanById/${params.id}`;
ajaxRequest(url, "GET", {}, true, function () {
@ -378,7 +380,7 @@ function getDispatchCarData(id) {
operData = '发起申请';
} else if (index !== 0 && parseInt(item.auditType) === 1) {
operData = '重新提交申请';
} else if (index !== 0 && parseInt(item.auditType) === 2 && parseInt(item.auditStatus) === 2) {
} else if (index !== 0 && parseInt(item.auditType) === 9 && parseInt(item.auditStatus) === 9) {
operData = '驳回-给发起人' + creator + ',共间隔:' + item.times + ' 原因备注:' + remark + '';
} else if (index !== 0 && parseInt(item.auditType) === 2 && parseInt(item.auditStatus) === 1) {
operData = '完结-审核确认通过,共耗时:' + item.times + ' 原因备注:' + remark + '';
@ -483,7 +485,8 @@ function auditData(id, type) {
checkType: '1',
planId: dataObj.planId,
contractId: dataObj.contractId,
supId: dataObj.supId
supId: dataObj.supId,
token: token
};
openIframeByParamObj("auditData", "审核", "./audit_form.html", "40%", "50%", obj, 1);
}
@ -507,6 +510,13 @@ function reloadAuditData() {
// 关闭页面
function closePage(type) {
if (token) {
// 如果没有 token直接关闭整个窗口
window.open('', '_self');
window.close();
return;
}
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
if (type == 1) {
let frameId = parent.document.getElementById('dispatchCarProDetail').getElementsByTagName("iframe")[0];

View File

@ -13,7 +13,7 @@
<body id="body">
<div id="main-box">
<div id="plan-detail-box" class="layout">
<div id="plan-detail-box" class="layout fixed-header">
<div class="layout">
<img src="../../../images/svg/u702.svg" width="40px" height="40px" style="margin-right: 10px;">
<div>
@ -29,7 +29,7 @@
</div>
</div>
<!--基本信息-->
<div id="plan-basic-box" class="layout">
<div id="plan-basic-box" class="layout" style="margin-top: 110px">
<div class="title layout">
<span style="font-weight:700;text-decoration:none;color:#409EFF;"></span>
<p>基本信息</p>

View File

@ -75,11 +75,22 @@
.layuimini-container {
height: 89%;
}
.fixed-header {
position: fixed;
top: 0;
left: 0;
width: 100%;
background-color: white; /* 防止盖住内容后面透明 */
z-index: 999; /* 确保在最上层 */
padding: 10px;
box-shadow: 0 2px 5px rgba(0,0,0,0.1); /* 可选阴影 */
}
</style>
<body id="body">
<div id="main-box">
<div class="layout" id="detail-box">
<div class="layout fixed-header" id="detail-box" >
<div class="layout">
<img src="../../../images/svg/u418.svg">
<div class="layout" style="flex-direction: column;align-items: start;margin-left: 10px;">
@ -96,7 +107,7 @@
<ul class="layui-tab-title" id="layui-tab-title">
</ul>
</div>
<div id="plan-box">
<div id="plan-box" style="margin-top: 40px">
<div class="title layout">
<span style="font-weight:700;text-decoration:none;color:#409EFF;"></span>
<p>需求计划申请明细</p>