禅道bug修复

This commit is contained in:
马三炮 2026-02-03 17:42:31 +08:00
parent 72dd689bdc
commit b17e2b03eb
5 changed files with 27 additions and 32 deletions

View File

@ -21,12 +21,6 @@
"icon": "fa fa-cog",
"target": "_self",
"child": [
{
"title": "标段工程",
"href": "page/system/bid_pro_list.html",
"icon": "fa fa-list-ul",
"target": "_self"
},
{
"title": "安全用品物资类型",
"href": "page/aq_basic/type_list.html",

View File

@ -207,7 +207,7 @@ function getCheckStatus(statusType, status) {
if(statusType === '0' && status === '0'){
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>已撤回";
}
if (statusType === '1') {
if (statusType === '1' && status != '3') {
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
} else if (statusType === '2') {
company = "分公司";
@ -247,4 +247,4 @@ function applyPlanDetail(obj) {
function showHelp(type){
openIframeByParamObj("show_help", "功能说明", "../show_help.html", "50%", "75%", type);
}
}

View File

@ -14,9 +14,11 @@ function setParams(params) {
if (data.value === '2') { // 通过
$('#auditRemark').removeAttr('lay-verify');
$('#auditRemarksLabel').removeClass('required');
$('#auditRemark').val('审核通过'); // 自动填充审核通过意见
} else if (data.value === '3') { // 不通过
$('#auditRemark').attr('lay-verify', 'required');
$('#auditRemarksLabel').addClass('required');
$('#auditRemark').val('审核不通过'); // 自动填充审核不通过意见
}
});
form.render();
@ -78,4 +80,4 @@ function closePage(type) {
window.parent.closePage();
}
parent.layer.close(index); // 再执行关闭
}
}

View File

@ -106,7 +106,7 @@ function initTable() {
if (a.proName > b.proName) return 1;
return 0;
});
return {
"code": 0, // 解析接口状态
"msg": '获取成功', // 解析提示文本
@ -126,7 +126,7 @@ function initTable() {
},
{
field: "proName",
width: '9%',
width: '8%',
title: "工程名称",
unresize: true,
align: "center",
@ -166,7 +166,7 @@ function initTable() {
},
{
field: "needNum",
width: '6%',
width: '7%',
title: "需用量",
unresize: true,
align: "center",
@ -177,7 +177,7 @@ function initTable() {
},
{
field: "totalCg",
width: '6%',
width: '7%',
title: "采购量",
unresize: true,
align: "center",
@ -189,7 +189,7 @@ function initTable() {
{
field: "totalLk",
title: "利库量",
width: '6%',
width: '7%',
unresize: true,
align: "center",
sort: true,
@ -203,7 +203,7 @@ function initTable() {
},
{
field: "price",
width: '6%',
width: '5%',
title: "单价",
unresize: true,
align: "center",
@ -229,7 +229,7 @@ function initTable() {
},
{
field: "totalPrice",
width: '6%',
width: '5%',
title: "总价",
unresize: true,
align: "center",
@ -291,7 +291,7 @@ function initTable() {
done: function (res, curr, count) {
pageNum = tableIns.config.page.curr;
table.resize("currentTableId");
// 延迟执行合并操作,确保表格完全渲染
setTimeout(function() {
mergeProNameCells();
@ -308,29 +308,29 @@ function mergeProNameCells() {
console.error('找不到表格元素');
return;
}
// 获取表格的tbody
let tbody = tableElem.nextElementSibling.querySelector('.layui-table-body tbody');
if (!tbody) {
console.error('找不到表格tbody元素');
return;
}
// 获取所有行
let rows = tbody.querySelectorAll('tr');
if (rows.length <= 1) return;
console.log('开始合并工程名称相同的单元格,共' + rows.length + '行');
let startRow = 0;
let mergeCount = 1;
let currentProName = getProNameFromRow(rows[0]);
for (let i = 1; i < rows.length; i++) {
let nextProName = getProNameFromRow(rows[i]);
console.log('比较行 ' + i + ':当前=' + currentProName + ',下一个=' + nextProName);
if (currentProName === nextProName) {
mergeCount++;
console.log('行 ' + i + ' 与前一行工程名称相同,合并计数:' + mergeCount);
@ -340,20 +340,20 @@ function mergeProNameCells() {
console.log('合并行 ' + startRow + ' 到 ' + (i - 1) + ',共 ' + mergeCount + ' 行');
mergeCells(rows, startRow, 1, mergeCount); // 工程名称在第2列索引1
}
// 重置计数
startRow = i;
mergeCount = 1;
currentProName = nextProName;
}
}
// 合并最后一组
if (mergeCount > 1) {
console.log('合并最后一组:行 ' + startRow + ' 到 ' + (rows.length - 1) + ',共 ' + mergeCount + ' 行');
mergeCells(rows, startRow, 1, mergeCount); // 工程名称在第2列索引1
}
console.log('单元格合并完成');
}
@ -370,14 +370,14 @@ function getProNameFromRow(row) {
// 合并单元格
function mergeCells(rows, startRow, colIndex, rowspan) {
if (startRow < 0 || startRow >= rows.length) return;
// 获取起始行的单元格
let startCell = rows[startRow].querySelectorAll('td')[colIndex];
if (!startCell) return;
// 设置rowspan
startCell.rowSpan = rowspan;
// 隐藏被合并的单元格
for (let i = 1; i < rowspan; i++) {
let cell = rows[startRow + i].querySelectorAll('td')[colIndex];

View File

@ -125,7 +125,6 @@
</button>
</div>
</div>
</form>
</div>
</fieldset>
@ -141,4 +140,4 @@
<script src="../../js/openIframe.js" charset="utf-8"></script>
</body>
</html>
</html>