工器具个体管理
This commit is contained in:
parent
8b0c8b4d71
commit
d886a64846
|
|
@ -24,6 +24,11 @@ public class ToolsManageDto extends PageEntity {
|
|||
*/
|
||||
private String customName;
|
||||
|
||||
/**
|
||||
* 送样部门
|
||||
*/
|
||||
private String sampleDepartment;
|
||||
|
||||
/**
|
||||
* 送样人
|
||||
*/
|
||||
|
|
@ -57,6 +62,11 @@ public class ToolsManageDto extends PageEntity {
|
|||
/**
|
||||
* 设备编号
|
||||
*/
|
||||
private String devCode;
|
||||
|
||||
/**
|
||||
* 客户自编号
|
||||
*/
|
||||
private String devTypeCode;
|
||||
|
||||
/**
|
||||
|
|
@ -67,12 +77,37 @@ public class ToolsManageDto extends PageEntity {
|
|||
/**
|
||||
* 生产日期
|
||||
*/
|
||||
private String produceDate;
|
||||
private String manufactureDate;
|
||||
|
||||
/**
|
||||
* 设备规格
|
||||
*/
|
||||
private String devModule;
|
||||
|
||||
/**
|
||||
* 试验日期
|
||||
*/
|
||||
private String experTime;
|
||||
|
||||
/**
|
||||
* 下次试验日期
|
||||
*/
|
||||
private String nextExperTime;
|
||||
|
||||
/**
|
||||
* 试验人员
|
||||
*/
|
||||
private String experUser;
|
||||
|
||||
/**
|
||||
* 试验结论
|
||||
*/
|
||||
private String experConclu;
|
||||
|
||||
/**
|
||||
* 关键字
|
||||
*/
|
||||
private String keyWord;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,10 +45,10 @@ public class ToolsManageServiceImpl implements ToolsManageService {
|
|||
@Override
|
||||
public List<ToolsManageDto> list(ToolsManageDto bean) {
|
||||
List<ToolsManageDto> list = toolsManageDao.list(bean);
|
||||
for (ToolsManageDto dto : list){
|
||||
String sampleTools = toolsManageDao.getSampleTools(dto.getId());
|
||||
dto.setSampleTools(sampleTools);
|
||||
}
|
||||
// for (ToolsManageDto dto : list){
|
||||
// String sampleTools = toolsManageDao.getSampleTools(dto.getId());
|
||||
// dto.setSampleTools(sampleTools);
|
||||
// }
|
||||
return list;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,27 +3,38 @@
|
|||
<mapper namespace="com.bonus.aqgqj.basis.dao.ToolsManageDao">
|
||||
|
||||
<select id="list" resultType="com.bonus.aqgqj.basis.entity.dto.ToolsManageDto">
|
||||
SELECT ts.id,
|
||||
tc.custom_name as customName,
|
||||
ts.sample_user as sampleUser,
|
||||
ts.sample_time as sampleTime,
|
||||
su.user_name as collectSamplesUser,
|
||||
tsd.create_time as collectSamplesTime,
|
||||
tt.team_name as teamName
|
||||
FROM tb_sample ts
|
||||
LEFT JOIN tb_custom tc
|
||||
on tc.id = ts.custom_id
|
||||
LEFT JOIN tb_sample_device tsd on tsd.sample_id = ts.id
|
||||
LEFT JOIN sys_user su on su.id = tsd.create_user
|
||||
LEFT JOIN tb_team tt on tt.id = ts.team_id
|
||||
WHERE ts.del_flag = '0'
|
||||
<if test="collectSamplesUser != null and collectSamplesUser != ''">
|
||||
AND su.user_name like concat('%', #{collectSamplesUser}, '%')
|
||||
</if>
|
||||
SELECT
|
||||
tsd.id,
|
||||
tsd.dev_type_name as sampleTools,
|
||||
tsd.dev_code as devCode,
|
||||
tsd.dev_type_code as devTypeCode,
|
||||
tsd.dev_module as devModule,
|
||||
tc.custom_name as customName,
|
||||
ted.manufacture_date as manufactureDate,
|
||||
te.exper_time as experTime,
|
||||
te.next_exper_time as nextExperTime,
|
||||
te.exper_conclu as experConclu,
|
||||
su.user_name as experUser
|
||||
FROM
|
||||
tb_sample_device tsd
|
||||
LEFT JOIN tb_sample ts on ts.id=tsd.sample_id
|
||||
LEFT JOIN tb_custom tc on tc.id=ts.custom_id
|
||||
LEFT JOIN tb_exper te on te.sample_id=ts.id
|
||||
LEFT JOIN tb_exper_dev ted on ted.exper_id =te.id
|
||||
LEFT JOIN sys_user su on su.id=te.create_user
|
||||
WHERE
|
||||
tsd.del_falg=0
|
||||
<if test="sampleTools != null and sampleTools != ''">
|
||||
and tsd.dev_type_name like concat('%',#{sampleTools}, '%')
|
||||
</if>
|
||||
GROUP BY ts.id
|
||||
<if test="keyWord != null and keyWord != ''">
|
||||
AND (
|
||||
tsd.dev_code like concat('%', #{keyWord}, '%') OR
|
||||
tsd.dev_type_code like concat('%', #{keyWord}, '%') OR
|
||||
tsd.dev_module like concat('%', #{keyWord}, '%') OR
|
||||
tc.custom_name like concat('%', #{keyWord}, '%')
|
||||
)
|
||||
</if>
|
||||
</select>
|
||||
<select id="getSampleTools" resultType="java.lang.String">
|
||||
SELECT GROUP_CONCAT(aa.dev_type_name SEPARATOR '、') AS sampleTools
|
||||
|
|
|
|||
|
|
@ -151,7 +151,7 @@ function setFormData(data) {
|
|||
$("#password").removeAttr("lay-verify");
|
||||
$("#pwd").css("display","none");
|
||||
$('#id').val(data.id)
|
||||
$('#userCode').val(data.userCode)
|
||||
// $('#userCode').val(data.userCode)
|
||||
$('#username').val(data.username)
|
||||
$('#loginName').val(data.loginName)
|
||||
$('#phone').val(data.phone)
|
||||
|
|
|
|||
|
|
@ -127,7 +127,7 @@ function initTable(dataList, limit, page) {
|
|||
unresize: true,
|
||||
align: "center"
|
||||
},
|
||||
{field: "state", title: "启用状态", align: "center",templet: '#is-state'},
|
||||
{field: "state", title: "状态", align: "center",templet: '#is-state'},
|
||||
{
|
||||
title: "操作",
|
||||
unresize: true,
|
||||
|
|
|
|||
|
|
@ -97,7 +97,7 @@ function initTable(dataList, limit, page) {
|
|||
},
|
||||
{field: "loginName", title: "登录名", unresize: true, align: "center"},
|
||||
{field: "username", title: "用户名", unresize: true, align: "center"},
|
||||
{field: "userCode", title: "工号", unresize: true, align: "center"},
|
||||
// {field: "userCode", title: "工号", unresize: true, align: "center"},
|
||||
{field: "sex", title: "性别", unresize: true, align: "center",
|
||||
templet: function (d) {
|
||||
if (d.sex == 0) {
|
||||
|
|
|
|||
|
|
@ -85,27 +85,40 @@ function initTable(dataList, limit, page) {
|
|||
return (page - 1) * limit + d.LAY_INDEX;
|
||||
}
|
||||
},
|
||||
{field: "sampleTools", title: "设备类型", unresize: true, align: "center"},
|
||||
{field: "devCode", title: "设备编号", unresize: true, align: "center"},
|
||||
{field: "devTypeCode", title: "客户自编号", unresize: true, align: "center"},
|
||||
{field: "devModule", title: "设备规格", unresize: true, align: "center"},
|
||||
{field: "customName", title: "送样单位", unresize: true, align: "center"},
|
||||
{field: "sampleUser", title: "送样人", unresize: true, align: "center"},
|
||||
{field: "sampleTime", title: "送样时间", unresize: true, align: "center"},
|
||||
{field: "sampleTools", title: "送样设备", unresize: true, align: "center"},
|
||||
{field: "collectSamplesUser", title: "收样人", unresize: true, align: "center"},
|
||||
{field: "collectSamplesTime", title: "收样时间", unresize: true, align: "center"},
|
||||
{field: "teamName", title: "试验班组", unresize: true, align: "center"},
|
||||
{title: "操作", unresize: true, width: 85, align: "center",
|
||||
templet: function (d) {
|
||||
|
||||
let html = '';
|
||||
// let updaetpwd="<a class=\"layui-icon layui-icon-password\" style='cursor:pointer;' title='修改密码' onclick=\"resetPwd('" + d.id + "')\"></a>";
|
||||
// let del="<a class=\"layui-icon layui-icon-delete\" style='cursor:pointer;' title='删除' onclick=\"delData('" + d.id + "')\"></a>"
|
||||
let view="<a class=\"layui-icon layui-icon-form\" style='cursor:pointer;' title='查看' onclick=\"addData('" + d.id + "')\"></a>";
|
||||
html=view;
|
||||
if(d.delFlag==1){
|
||||
return '';
|
||||
}
|
||||
return html;
|
||||
{field: "sampleDepartment", title: "送样部门", unresize: true, align: "center"},
|
||||
{field: "manufactureDate", title: "生产日期", unresize: true, align: "center"},
|
||||
{field: "experTime", title: "试验日期", unresize: true, align: "center"},
|
||||
{field: "experConclu", title: "试验结果", unresize: true, align: "center"},
|
||||
{
|
||||
field: "certificate", title: "合格证", unresize: true, align: "center", templet: function (d) {
|
||||
console.log("d",d.id);
|
||||
return '<a href="#" style="color: blue;" onclick="handleClick1(\'' + d.sampleTools + '\',\'' + d.devModule + '\',\'' + d.devCode + '\',\'' + d.experTime + '\',\'' + d.nextExperTime + '\',\'' + d.experUser + '\',\'' + d.experConclu + '\',\'' + d.customName + '\')">查看</a>';
|
||||
}
|
||||
},
|
||||
{
|
||||
field: "qrCode", title: "二维码", unresize: true, align: "center", templet: function (d) {
|
||||
return '<a href="#" style="color: blue;" onclick="handleClick2(\'' + d + '\')">打印</a>';
|
||||
}
|
||||
},
|
||||
// {title: "操作", unresize: true, width: 85, align: "center",
|
||||
// templet: function (d) {
|
||||
//
|
||||
// let html = '';
|
||||
// // let updaetpwd="<a class=\"layui-icon layui-icon-password\" style='cursor:pointer;' title='修改密码' onclick=\"resetPwd('" + d.id + "')\"></a>";
|
||||
// // let del="<a class=\"layui-icon layui-icon-delete\" style='cursor:pointer;' title='删除' onclick=\"delData('" + d.id + "')\"></a>"
|
||||
// let view="<a class=\"layui-icon layui-icon-form\" style='cursor:pointer;' title='查看' onclick=\"addData('" + d.id + "')\"></a>";
|
||||
// html=view;
|
||||
// if(d.delFlag==1){
|
||||
// return '';
|
||||
// }
|
||||
// return html;
|
||||
// }
|
||||
// },
|
||||
],
|
||||
],
|
||||
done: function (res, curr, count) {
|
||||
|
|
@ -117,13 +130,32 @@ function initTable(dataList, limit, page) {
|
|||
});
|
||||
}
|
||||
|
||||
function handleClick1(sampleTools,devModule,devCode,experTime,nextExperTime,experUser,experConclu,customName) {
|
||||
title = '合格证';
|
||||
let param = {
|
||||
'sampleTools' : sampleTools,
|
||||
'devModule' : devModule,
|
||||
'devCode' : devCode,
|
||||
'experTime' : experTime,
|
||||
'nextExperTime' : nextExperTime,
|
||||
'experUser': experUser,
|
||||
'experConclu': experConclu,
|
||||
'customName': customName
|
||||
}
|
||||
openIframe2("addOrEditUser", title, "child/certificateView.html", '30%', '70%', param);
|
||||
}
|
||||
|
||||
function handleClick2(view1) {
|
||||
alert('Clicked on: ' + view1);
|
||||
}
|
||||
|
||||
|
||||
// 获取参数
|
||||
function getReqParams(page, limit, type) {
|
||||
var selectedValue =$('#sampleTools').val()
|
||||
// 2. 查找对应的选项文本
|
||||
var selectedText = $('#sampleTools option[value="' + selectedValue + '"]').text();
|
||||
if (selectedText=='请选择'){
|
||||
if (selectedText=='请选择设备类型'){
|
||||
selectedText=''
|
||||
}
|
||||
let obj = {};
|
||||
|
|
@ -132,13 +164,14 @@ function getReqParams(page, limit, type) {
|
|||
page: page + "",
|
||||
limit: limit + "",
|
||||
sampleTools: selectedText,
|
||||
collectSamplesUser:$('#collectSamplesUser').val()
|
||||
keyWord:$('#keyWord').val()
|
||||
};
|
||||
} else {
|
||||
obj = {
|
||||
page: '1',
|
||||
limit: '10',
|
||||
collectSamplesUser: ''
|
||||
sampleTools: '',
|
||||
keyWord: ''
|
||||
};
|
||||
}
|
||||
console.log(obj)
|
||||
|
|
@ -226,7 +259,7 @@ function resetPwd(id) {
|
|||
/*下拉选表单赋值*/
|
||||
function setSelectValue(list, selectName) {
|
||||
console.log("list",list)
|
||||
let html = '<option value="" selected>请选择</option>';
|
||||
let html = '<option value="" selected>请选择设备类型</option>';
|
||||
$.each(list, function (index, item) {
|
||||
html += '<option value="' + item.id + '">' + item.name + '</option>';
|
||||
})
|
||||
|
|
|
|||
|
|
@ -1,37 +1,69 @@
|
|||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<html lang="zh">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Dynamic Table</title>
|
||||
<script src="../../../js/libs/jquery-2.1.1.min.js" charset="UTF-8" type="text/javascript"></script>
|
||||
<script src="../../../js/tools/child/certificateView.js"></script>
|
||||
<title>表格布局示例</title>
|
||||
<style>
|
||||
table, th, td {
|
||||
border: 1px solid black;
|
||||
table {
|
||||
width: 100%;
|
||||
border-collapse: collapse;
|
||||
}
|
||||
th, td {
|
||||
padding: 10px;
|
||||
border: 1px solid #ddd;
|
||||
padding: 8px;
|
||||
text-align: left;
|
||||
}
|
||||
th {
|
||||
background-color: #f4f4f4;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<button onclick="fillTable()">Fill Table</button>
|
||||
<table id="dynamicTable">
|
||||
<div class="dynamic-text" id="address">xxxxxxxx</div>
|
||||
<table>
|
||||
<!-- 第一行 -->
|
||||
<tr>
|
||||
<th>序号</th>
|
||||
<th>名称</th>
|
||||
<th>规格型号</th>
|
||||
<th>唯一标识号</th>
|
||||
<th>检验日期</th>
|
||||
<th>下次检验日期</th>
|
||||
<th>试验人员</th>
|
||||
<th>送检单位</th>
|
||||
<td colspan="2" style="text-align: center;">试验结果</td>
|
||||
</tr>
|
||||
<!-- 第二行 -->
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">样品名称</td>
|
||||
<td id="sampleTools"></td>
|
||||
</tr>
|
||||
<!-- 第三行 -->
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">规格型号</td>
|
||||
<td id="devModule"></td>
|
||||
</tr>
|
||||
<!-- 第四行 -->
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">样品编号</td>
|
||||
<td id="devCode"></td>
|
||||
</tr>
|
||||
<!-- 第五行 -->
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">检验日期</td>
|
||||
<td id="experTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">下次检验日期</td>
|
||||
<td id="nextExperTime"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">试验人员</td>
|
||||
<td id="experUser"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">试验结果</td>
|
||||
<td id="experConclu"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 25%; text-align: center;">送检单位</td>
|
||||
<td id="customName"></td>
|
||||
</tr>
|
||||
<!-- 动态行将在这里插入 -->
|
||||
</table>
|
||||
|
||||
<script src="script.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -14,7 +14,7 @@
|
|||
<script src="../../js/openIframe.js"></script>
|
||||
<script src="../../js/my/aes.js"></script>
|
||||
<script src="../../js/ajaxRequest.js"></script>
|
||||
<title>用户管理</title>
|
||||
<title>工器具个体管理</title>
|
||||
</head>
|
||||
<body>
|
||||
<div id="content">
|
||||
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
<div class="layui-inline" style="padding: 0 0 0 10px;">
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" id="collectSamplesUser" maxlength="30" class="layui-input" autocomplete="off" placeholder="请输入收样人">
|
||||
<input type="text" id="keyWord" maxlength="30" class="layui-input" autocomplete="off" placeholder="请输入关键字">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@
|
|||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>登录名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="loginName" name="loginName" autocomplete="off"
|
||||
lay-verify="required" maxlength="30">
|
||||
lay-verify="required" maxlength="20">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
|
@ -32,19 +32,19 @@
|
|||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>用户名</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="username" name="username" autocomplete="off"
|
||||
lay-verify="required" maxlength="30">
|
||||
lay-verify="required" maxlength="10">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div class="layui-form-item" style="margin-top: 2%;">
|
||||
<label class="layui-form-label"><i style="padding: 0 10px;">*</i>工号</label>
|
||||
<div class="layui-input-inline">
|
||||
<input class="layui-input" id="userCode" name="userCode" autocomplete="off"
|
||||
lay-verify="required" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<!-- <div class="layui-form-item" style="margin-top: 2%;">-->
|
||||
<!-- <label class="layui-form-label"><i style="padding: 0 10px;">*</i>工号</label>-->
|
||||
<!-- <div class="layui-input-inline">-->
|
||||
<!-- <input class="layui-input" id="userCode" name="userCode" autocomplete="off"-->
|
||||
<!-- lay-verify="required" maxlength="30">-->
|
||||
<!-- </div>-->
|
||||
<!-- </div>-->
|
||||
|
||||
<div class="layui-form-item">
|
||||
<label class="layui-form-label"> <i style="padding: 0 10px;">*</i> 性别</label>
|
||||
|
|
|
|||
Loading…
Reference in New Issue