检测报告管理

This commit is contained in:
hayu 2024-07-29 10:47:08 +08:00
parent 6d4b69605d
commit ec5ee0b6e0
5 changed files with 63 additions and 30 deletions

View File

@ -97,35 +97,42 @@ function initTable(dataList, limit, page) {
return (page - 1) * limit + d.LAY_INDEX;
}
},
{field: "customName", width:260,title: "送样单位", unresize: true, align: "center"},
{field: "sampleUser", width:150,title: "送样人", unresize: true, align: "center"},
{field: "sampleTime", width:210,title: "送样时间", unresize: true, align: "center"},
{field: "sampleTools", width:280,title: "送样设备", unresize: true, align: "center"},
{field: "collectSamplesUser", width:140,title: "收样人", unresize: true, align: "center"},
{field: "collectSamplesTime", width:210,title: "收样时间", unresize: true, align: "center"},
{field: "customName", width:260,title: "送样单位", unresize: true, align: "center", templet: function (d) {
return `<div style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;" title="${d.customName}">${d.customName}</div>`;
}},
{field: "sampleUser", width:150,title: "送样人", unresize: true, align: "center", templet: function (d) {
return `<div style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;" title="${d.sampleUser}">${d.sampleUser}</div>`;
}},
{field: "sampleTime", width:210,title: "送样时间", unresize: true, align: "center", templet: function (d) {
return `<div style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;" title="${d.sampleTime}">${d.sampleTime}</div>`;
}},
{field: "sampleTools", width:280,title: "送样设备", unresize: true, align: "center", templet: function (d) {
return `<div style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;" title="${d.sampleTools}">${d.sampleTools}</div>`;
}},
{field: "collectSamplesUser", width:140,title: "收样人", unresize: true, align: "center", templet: function (d) {
return `<div style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;" title="${d.collectSamplesUser}">${d.collectSamplesUser}</div>`;
}},
{field: "collectSamplesTime", width:210,title: "收样时间", unresize: true, align: "center", templet: function (d) {
return `<div style="text-overflow: ellipsis; overflow: hidden; white-space: nowrap;" title="${d.collectSamplesTime}">${d.collectSamplesTime}</div>`;
}},
{
field: "teamName", width:210,title: "试验班组", unresize: true, align: "center", templet: function (d) {
let html = '';
let view = '';
if (d.teamName == null) {
view="<a style='cursor:pointer; background: #F2F3FF'' >未派工</a>";
view = "<a style='cursor:pointer; background: #F2F3FF;'>未派工</a>";
} else {
view="<a style='color: black;'>" + d.teamName + "</a>";
view = `<a style='color: black; text-overflow: ellipsis; overflow: hidden; white-space: nowrap;' title="${d.teamName}">${d.teamName}</a>`;
}
html=view;
return html;
return view;
}
},
{title: "操作", unresize: true, width: 80, align: "center",
templet: function (d) {
let html = '';
let view="<a style='cursor:pointer;' onclick=\"addData('" + d.id + "')\">详情</a>";
html=view;
let view = `<a style='cursor:pointer;' onclick="addData('${d.id}')">详情</a>`;
if(d.delFlag == 1){
return '';
}
return html;
return view;
}
},
],
@ -141,7 +148,7 @@ function initTable(dataList, limit, page) {
let index = suborders_data_arr[suborders_key]['LAY_TABLE_INDEX'];
$('tr[data-index=' + index + '] input[type="checkbox"]').prop('disabled', true).attr("name", "layTableCheckboxDisabled"); // 禁止部分选择
}
};
}
form.render('checkbox');
},
});

View File

@ -68,7 +68,6 @@ function saveData(data) {
if (!selectNodeId) {
return layer.msg('请选择上级组织', {icon: 7});
}
alert(data.field.phone)
console.log(data.field)
if (data.field.phone != "" && data.field.phone != '') {
if (!(/^1[3456789]\d{9}$/.test(data.field.phone))) {

View File

@ -87,7 +87,6 @@ function initTable(dataList, limit, page) {
limit: limit,
cols: [
[
//表头
{
title: "序号",
width: '10%',
@ -101,25 +100,37 @@ function initTable(dataList, limit, page) {
field: "name",
title: "角色名称",
unresize: true,
align: "center"
align: "center",
templet: function(d) {
return '<div class="ellipsis" title="' + d.name + '">' + d.name + '</div>';
}
},
{
field: "roleCode",
title: "角色编码",
unresize: true,
align: "center"
align: "center",
templet: function(d) {
return '<div class="ellipsis" title="' + d.roleCode + '">' + d.roleCode + '</div>';
}
},
{
field: "remarks",
title: "角色描述",
unresize: true,
align: "center"
align: "center",
templet: function(d) {
return '<div class="ellipsis" title="' + d.remarks + '">' + d.remarks + '</div>';
}
},
{
field: "orgName",
title: "上级组织",
unresize: true,
align: "center"
align: "center",
templet: function(d) {
return '<div class="ellipsis" title="' + d.orgName + '">' + d.orgName + '</div>';
}
},
{
field: "createTime",

View File

@ -46,6 +46,14 @@
.layui-table-init {
background-color: transparent !important;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 150px; /* 根据需要调整宽度 */
display: block;
}
</style>
<script src="../../js/system/role.js" charset="UTF-8" type="text/javascript"></script>

View File

@ -71,6 +71,14 @@
.layui-form-selected dl {
height: 150px !important;
}
.ellipsis {
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 150px; /* 根据需要调整宽度 */
display: block;
}
</style>
<script src="../../js/samples/samplesMge.js" charset="UTF-8" type="text/javascript"></script>