配件报废
This commit is contained in:
parent
c5973f1874
commit
51ce7fe67a
|
|
@ -98,6 +98,12 @@
|
|||
"href": "page/accessory/inventory_count_list.html",
|
||||
"icon": "fa fa-tachometer",
|
||||
"target": "_self"
|
||||
},
|
||||
{
|
||||
"title": "配件报废",
|
||||
"href": "page/accessory/accessory_scrap_list.html",
|
||||
"icon": "fa fa-tachometer",
|
||||
"target": "_self"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,178 @@
|
|||
let form, table, laydate;
|
||||
let tableIns;
|
||||
let pageNum = 1; // 定义分页
|
||||
layui.use(["form", "table", 'laydate'], function () {
|
||||
form = layui.form;
|
||||
table = layui.table;
|
||||
laydate = layui.laydate;
|
||||
laydate.render({
|
||||
elem: '#ID-laydate-rangeLinked',
|
||||
range: ['#startDate', '#endDate'],
|
||||
rangeLinked: true
|
||||
});
|
||||
initTable();
|
||||
});
|
||||
|
||||
// 查询/重置
|
||||
function queryTable(type) {
|
||||
if (type === 1) {
|
||||
reloadTable(1);
|
||||
} else if (type === 2) {
|
||||
$('#keyWord').val('');
|
||||
$('#startDate').val('');
|
||||
$('#endDate').val('');
|
||||
layui.form.render();
|
||||
reloadTable(1);
|
||||
}
|
||||
}
|
||||
|
||||
// 刷新页面数据
|
||||
function reloadData() {
|
||||
reloadData(pageNum);
|
||||
}
|
||||
|
||||
// 重载表格
|
||||
function reloadTable(pageNum) {
|
||||
table.reload("currentTableId", {
|
||||
page: {
|
||||
curr: pageNum ? pageNum : 1,
|
||||
},
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'startDate': $('#startDate').val(),
|
||||
'endDate': $('#endDate').val()
|
||||
}),
|
||||
},
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
// 初始化表格
|
||||
function initTable() {
|
||||
tableIns = table.render({
|
||||
elem: "#currentTableId",
|
||||
id: 'currentTableId',
|
||||
headers: {
|
||||
authorization: sessionStorage.getItem("gz-token"),
|
||||
},
|
||||
height: "full-170",
|
||||
url: dataUrl + "backstage/partInput/findByPage",
|
||||
where: {
|
||||
encryptedData: JSON.stringify({
|
||||
'keyWord': $('#keyWord').val(),
|
||||
'startDate': $('#startDate').val(),
|
||||
'endDate': $('#endDate').val()
|
||||
}),
|
||||
},
|
||||
request: {
|
||||
pageName: 'pageNum',
|
||||
limitName: 'pageSize'
|
||||
},
|
||||
parseData: function (res) { // res 即为原始返回的数据
|
||||
return {
|
||||
"code": 0, // 解析接口状态
|
||||
"msg": '获取成功', // 解析提示文本
|
||||
"count": res.total, // 解析数据长度
|
||||
"data": res.list // 解析数据列表
|
||||
};
|
||||
},
|
||||
cols: [
|
||||
[
|
||||
{
|
||||
width: '9.9%',
|
||||
title: "序号",
|
||||
align: "center",
|
||||
templet: function (d) {
|
||||
return d.LAY_NUM;
|
||||
},
|
||||
},
|
||||
{
|
||||
field: "code",
|
||||
width: '15%',
|
||||
title: "报废编号",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "inputUser",
|
||||
width: '15%',
|
||||
title: "报废人",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "inputNum",
|
||||
width: '15%',
|
||||
title: "报废数量",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "allPrice",
|
||||
width: '15%',
|
||||
title: "报废时间",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
field: "remark",
|
||||
width: '20%',
|
||||
title: "备注",
|
||||
unresize: true,
|
||||
align: "center",
|
||||
},
|
||||
{
|
||||
title: "操作",
|
||||
width: '10%',
|
||||
align: "center",
|
||||
unresize: true,
|
||||
templet: function (d) {
|
||||
let html = "";
|
||||
html += "<a onclick='accessoryScrapDetail(" + JSON.stringify(d) + ",1)'>详情</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 setCheckStatus(status) {
|
||||
if (status === '1') {
|
||||
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待审核";
|
||||
} else if (status === '2') {
|
||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:16px;'>●</span>审核通过";
|
||||
} else if (status === '3') {
|
||||
return "<span style='color:#F56C6C;margin:0 5px 0 5px;font-size:16px'>●</span>审核驳回";
|
||||
}
|
||||
return "<span style='color:#FF9900;margin:0 5px 0 5px;font-size:16px'>●</span>待审核";
|
||||
}
|
||||
|
||||
// 导出
|
||||
function exportExcel() {
|
||||
let params = {
|
||||
'proName': $('#proName').val(),
|
||||
'status': $('#status').val()
|
||||
}
|
||||
let url = dataUrl + "backstage/export/exportFhList";
|
||||
exportExcelUtil(url, '配件入库数据', JSON.stringify(params));
|
||||
}
|
||||
|
||||
// 详情 配件报废
|
||||
function accessoryScrapDetail(obj) {
|
||||
openIframeByParamObj("accessory_scrap_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
||||
// 配件报废
|
||||
function accessoryScrap(obj) {
|
||||
openIframeByParamObj("accessory_scrap", "配件报废", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj);
|
||||
}
|
||||
|
|
@ -0,0 +1,68 @@
|
|||
<!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="proName" 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">
|
||||
<input type="text" autocomplete="off" id="startDate" class="layui-input"
|
||||
placeholder="开始日期">
|
||||
</div>
|
||||
<div class="layui-form-mid">-</div>
|
||||
<div class="layui-input-inline">
|
||||
<input type="text" autocomplete="off" id="endDate" class="layui-input"
|
||||
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>
|
||||
<button class="layui-btn layui-bg-blue" onclick="accessoryScrap({})"><i
|
||||
class="layui-icon layui-icon-file"></i> 配 件 报 废</button>
|
||||
<button class="layui-btn layui-btn-primary" onclick="exportExcel()"><i
|
||||
class="layui-icon layui-icon-download-circle"></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/accessory_scrap_list.js" charset="utf-8"></script>
|
||||
<script src="../../js/openIframe.js" charset="utf-8"></script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Loading…
Reference in New Issue