设备工程领用配件统计
This commit is contained in:
parent
3f26c2a106
commit
1bae911c36
|
|
@ -0,0 +1,169 @@
|
|||
let form, table, laydate;
|
||||
let tableIns;
|
||||
let pageNum = 1; // 定义分页
|
||||
|
||||
|
||||
function setParams(params) {
|
||||
objParam = JSON.parse(params);
|
||||
layui.use(["form", "table", 'upload', 'layer', 'laydate'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
laydate = layui.laydate;
|
||||
laydate.render({
|
||||
elem: '#ID-laydate-rangeLinked',
|
||||
range: ['#startDay', '#endDay'],
|
||||
rangeLinked: true
|
||||
});
|
||||
initTable();
|
||||
});
|
||||
}
|
||||
|
||||
// 查询/重置
|
||||
function queryTable(type) {
|
||||
if (type === 1) {
|
||||
let keyWord = $('#keyWord').val();
|
||||
let flag = checkValue(keyWord);
|
||||
if (flag) {
|
||||
$('#keyWord').val('');
|
||||
return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 });
|
||||
}
|
||||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
$('#keyWord').val('');
|
||||
$('#startDay').val('');
|
||||
$('#endDay').val('');
|
||||
layui.form.render();
|
||||
reloadTable(1);
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新页面数据
|
||||
function reloadData() {
|
||||
reloadTable(pageNum);
|
||||
}
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'deviceId': objParam.deviceId,
|
||||
'proId': objParam.proId,
|
||||
'startDay': $('#startDay').val(),
|
||||
'endDay': $('#endDay').val()
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
tableIns = table.render({
|
||||
elem: "#currentTableId",
|
||||
id: 'currentTableId',
|
||||
headers: {
|
||||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-170",
|
||||
url: dataUrl + "backstage/statistic/getPartList",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'deviceId': objParam.deviceId,
|
||||
'proId': objParam.proId,
|
||||
'startDay': $('#startDay').val(),
|
||||
'endDay': $('#endDay').val()
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
pageName: 'pageNum',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { // res 即为原始返回的数据
|
||||
if(res.code === 401){
|
||||
closeWindowOpen();
|
||||
}
|
||||
return {
|
||||
"code": 0, // 解析接口状态
|
||||
"msg": '获取成功', // 解析提示文本
|
||||
"count": res.total, // 解析数据长度
|
||||
"data": res.list // 解析数据列表
|
||||
};
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
width: '5%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return d.LAY_NUM;
|
||||
},
|
||||
},
|
||||
{
|
||||
width: '15%',
|
||||
title: "配件领用设备",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return objParam.module;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "proName",
|
||||
width: '15%',
|
||||
title: "领用工程",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "code",
|
||||
width: '14%',
|
||||
title: "领料单编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "partName",
|
||||
width: '15%',
|
||||
title: "配件名称",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "partModel",
|
||||
width: '12%',
|
||||
title: "配件规格",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "applyNum",
|
||||
width: '8%',
|
||||
title: "领用数量",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "createTime",
|
||||
width: '15%',
|
||||
title: "申请时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
],
|
||||
],
|
||||
limits: [10, 15, 20, 25, 50, 100],
|
||||
limit: 10,
|
||||
page: true,
|
||||
done: function (res, curr, count) {
|
||||
pageNum = tableIns.config.page.curr;
|
||||
table.resize("currentTableId");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
|
@ -0,0 +1,139 @@
|
|||
let form, table;
|
||||
let tableIns;
|
||||
let pageNum = 1; // 定义分页
|
||||
|
||||
|
||||
function setParams(params) {
|
||||
objParam = JSON.parse(params);
|
||||
layui.use(["form", "table", 'upload', 'layer'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
initTable();
|
||||
});
|
||||
}
|
||||
|
||||
// 查询/重置
|
||||
function queryTable(type) {
|
||||
if (type === 1) {
|
||||
let keyWord = $('#keyWord').val();
|
||||
let flag = checkValue(keyWord);
|
||||
if (flag) {
|
||||
$('#keyWord').val('');
|
||||
return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 });
|
||||
}
|
||||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
$('#keyWord').val('');
|
||||
// $('#proStatus').val('');
|
||||
layui.form.render();
|
||||
reloadTable(1);
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新页面数据
|
||||
function reloadData() {
|
||||
reloadTable(pageNum);
|
||||
}
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'id': objParam.id
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
tableIns = table.render({
|
||||
elem: "#currentTableId",
|
||||
id: 'currentTableId',
|
||||
headers: {
|
||||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-170",
|
||||
url: dataUrl + "backstage/statistic/getListDetails",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'id': objParam.id
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
pageName: 'pageNum',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { // res 即为原始返回的数据
|
||||
if(res.code === 401){
|
||||
closeWindowOpen();
|
||||
}
|
||||
return {
|
||||
"code": 0, // 解析接口状态
|
||||
"msg": '获取成功', // 解析提示文本
|
||||
"count": res.total, // 解析数据长度
|
||||
"data": res.list // 解析数据列表
|
||||
};
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
width: '20%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return d.LAY_NUM;
|
||||
},
|
||||
},
|
||||
{
|
||||
width: '30%',
|
||||
title: "配件领用设备",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return objParam.module;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "proName",
|
||||
width: '30%',
|
||||
title: "领用工程",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "领用配件详情",
|
||||
width: '20%',
|
||||
align: "center",
|
||||
unresize: true,
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
d.module=objParam.module;
|
||||
html += "<a onclick='partDetail(" + JSON.stringify(d) + ")'>查看领用配件</a>";
|
||||
return html;
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
limits: [10, 15, 20, 25, 50, 100],
|
||||
limit: 10,
|
||||
page: true,
|
||||
done: function (res, curr, count) {
|
||||
pageNum = tableIns.config.page.curr;
|
||||
table.resize("currentTableId");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
// 配件退料详情
|
||||
function partDetail(obj) {
|
||||
openIframeByParamObj("part_detail", "配件详情", "./part_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,157 @@
|
|||
let form, table;
|
||||
let tableIns;
|
||||
let pageNum = 1; // 定义分页
|
||||
layui.use(["form", "table"], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
initTable();
|
||||
});
|
||||
|
||||
// 查询/重置
|
||||
function queryTable(type) {
|
||||
if (type === 1) {
|
||||
let keyWord = $('#keyWord').val();
|
||||
let flag = checkValue(keyWord);
|
||||
if (flag) {
|
||||
$('#keyWord').val('');
|
||||
return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 });
|
||||
}
|
||||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
$('#keyWord').val('');
|
||||
// $('#proStatus').val('');
|
||||
layui.form.render();
|
||||
reloadTable(1);
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新页面数据
|
||||
function reloadData() {
|
||||
reloadTable(pageNum);
|
||||
}
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
// 'proStatus': $('#proStatus').val()
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
tableIns = table.render({
|
||||
elem: "#currentTableId",
|
||||
id: 'currentTableId',
|
||||
headers: {
|
||||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-170",
|
||||
url: dataUrl + "backstage/statistic/findListByPage",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
pageName: 'pageNum',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { // res 即为原始返回的数据
|
||||
if(res.code === 401){
|
||||
closeWindowOpen();
|
||||
}
|
||||
return {
|
||||
"code": 0, // 解析接口状态
|
||||
"msg": '获取成功', // 解析提示文本
|
||||
"count": res.total, // 解析数据长度
|
||||
"data": res.list // 解析数据列表
|
||||
};
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
width: '15%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return d.LAY_NUM;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "module",
|
||||
width: '24.5%',
|
||||
title: "配件领用设备",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
sort:true,
|
||||
},
|
||||
{
|
||||
field: "deviceCode",
|
||||
width: '20%',
|
||||
title: "设备编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "remark",
|
||||
width: '20%',
|
||||
title: "备注",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "领用工程",
|
||||
width: '20%',
|
||||
align: "center",
|
||||
unresize: true,
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
html += "<a onclick='proCountDetail(" + JSON.stringify(d) + ")'>" + d.num + "</a>";
|
||||
return html;
|
||||
},
|
||||
},
|
||||
],
|
||||
],
|
||||
limits: [10, 15, 20, 25, 50, 100],
|
||||
limit: 10,
|
||||
page: true,
|
||||
done: function (res, curr, count) {
|
||||
pageNum = tableIns.config.page.curr;
|
||||
table.resize("currentTableId");
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
// 导出
|
||||
function exportExcel() {
|
||||
let params = {
|
||||
'keyWord': $('#keyWord').val(),
|
||||
}
|
||||
let url = dataUrl + "backstage/statistic/exportProListPage";
|
||||
exportExcelUtil(url, '工程统计', JSON.stringify(params));
|
||||
}
|
||||
|
||||
// 配件退料详情
|
||||
function proCountDetail(obj) {
|
||||
openIframeByParamObj("pro_part_detail", "工程详情", "./child/pro_part_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
||||
// 工程状态
|
||||
function setProStatus(status) {
|
||||
if (status === '1') {
|
||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px'>●</span>在建";
|
||||
} else if (status === '2') {
|
||||
return "<span style='color:#999;margin:0 5px 0 5px;font-size:16px;'>●</span>完工";
|
||||
} else {
|
||||
return '/';
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,64 @@
|
|||
<!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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<fieldset class="table-search-fieldset">
|
||||
<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-input-inline" style="width: 300px;">
|
||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入关键字" maxlength="30">
|
||||
</div>
|
||||
</div>
|
||||
<div class="layui-inline" style="margin-bottom: 0;">
|
||||
<div class="layui-inline" id="ID-laydate-rangeLinked">
|
||||
<div class="layui-input-inline" style="width: 140px;">
|
||||
<input type="text" autocomplete="off" id="startDay" class="layui-input" readonly
|
||||
placeholder="开始日期">
|
||||
</div>
|
||||
<div class="layui-form-mid">-</div>
|
||||
<div class="layui-input-inline" style="width: 140px;">
|
||||
<input type="text" autocomplete="off" id="endDay" class="layui-input" readonly
|
||||
placeholder="结束日期">
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableId2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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/accessory/child/part_detail.js"></script>
|
||||
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<!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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<fieldset class="table-search-fieldset">
|
||||
<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-input-inline" style="width: 300px;">
|
||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入关键字" maxlength="30">
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableId2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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/accessory/child/pro_part_detail.js"></script>
|
||||
<script src="../../../js/openIframe.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
|
@ -0,0 +1,51 @@
|
|||
<!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">
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<div class="layuimini-container">
|
||||
<div class="layuimini-main">
|
||||
<fieldset class="table-search-fieldset">
|
||||
<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-input-inline" style="width: 300px;">
|
||||
<input type="text" name="keyWord" id="keyWord" autocomplete="off"
|
||||
class="layui-input" lay-affix="clear" placeholder="输入关键字" maxlength="30">
|
||||
</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>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</fieldset>
|
||||
<div class="table-box" table-responsive style="z-index: 1;">
|
||||
<table class="layui-hide" id="currentTableId" lay-filter="currentTableId2"></table>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<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/accessory/device_pro_list.js" charset="utf-8"></script>
|
||||
<script src="../../js/openIframe.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue