This commit is contained in:
parent
7447fd56cb
commit
75ce246939
|
|
@ -68,6 +68,20 @@
|
||||||
"target": "_self"
|
"target": "_self"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"title": "配件管理",
|
||||||
|
"href": "",
|
||||||
|
"icon": "fa fa-home",
|
||||||
|
"target": "_self",
|
||||||
|
"child": [
|
||||||
|
{
|
||||||
|
"title": "配件入库",
|
||||||
|
"href": "page/accessory/accessory_store_list.html",
|
||||||
|
"icon": "fa fa-tachometer",
|
||||||
|
"target": "_self"
|
||||||
|
}
|
||||||
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,204 @@
|
||||||
|
let form, table, element;
|
||||||
|
let tableIns;
|
||||||
|
let pageNum = 1; // 定义分页
|
||||||
|
layui.use(["form", "table"], function () {
|
||||||
|
form = layui.form;
|
||||||
|
table = layui.table;
|
||||||
|
element = layui.element;
|
||||||
|
element.render();
|
||||||
|
initTable();
|
||||||
|
});
|
||||||
|
|
||||||
|
// 查询/重置
|
||||||
|
function queryTable(type) {
|
||||||
|
if (type === 1) {
|
||||||
|
reloadTable(1);
|
||||||
|
} else if (type === 2) {
|
||||||
|
$('#proName').val('');
|
||||||
|
$('#status').val('0');
|
||||||
|
layui.form.render();
|
||||||
|
reloadTable(1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
// 刷新页面数据
|
||||||
|
function reloadData() {
|
||||||
|
reloadData(pageNum);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 重载表格
|
||||||
|
function reloadTable(pageNum) {
|
||||||
|
table.reload("currentTableId", {
|
||||||
|
page: {
|
||||||
|
curr: pageNum ? pageNum : 1,
|
||||||
|
},
|
||||||
|
where: {
|
||||||
|
encryptedData: JSON.stringify({
|
||||||
|
'proName': $('#proName').val(),
|
||||||
|
'status': $('#status').val()
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
},
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 初始化表格
|
||||||
|
function initTable() {
|
||||||
|
tableIns = table.render({
|
||||||
|
elem: "#currentTableId",
|
||||||
|
id: 'currentTableId',
|
||||||
|
headers: {
|
||||||
|
authorization: sessionStorage.getItem("gz-token"),
|
||||||
|
},
|
||||||
|
height: "full-170",
|
||||||
|
url: dataUrl + "backstage/planOut/getProPlanPage",
|
||||||
|
where: {
|
||||||
|
encryptedData: JSON.stringify({
|
||||||
|
'proName': $('#proName').val(),
|
||||||
|
'status': $('#status').val()
|
||||||
|
}),
|
||||||
|
},
|
||||||
|
request: {
|
||||||
|
pageName: 'pageNum',
|
||||||
|
limitName: 'pageSize'
|
||||||
|
},
|
||||||
|
parseData: function (res) { // res 即为原始返回的数据
|
||||||
|
return {
|
||||||
|
"code": 0, // 解析接口状态
|
||||||
|
"msg": '获取成功', // 解析提示文本
|
||||||
|
"count": res.total, // 解析数据长度
|
||||||
|
"data": res.list // 解析数据列表
|
||||||
|
};
|
||||||
|
},
|
||||||
|
cols: [
|
||||||
|
[
|
||||||
|
{
|
||||||
|
width: '5%',
|
||||||
|
title: "序号",
|
||||||
|
align: "center",
|
||||||
|
templet: function (d) {
|
||||||
|
return d.LAY_NUM;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "proName",
|
||||||
|
width: '15%',
|
||||||
|
title: "入库编号",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "proName",
|
||||||
|
width: '10%',
|
||||||
|
title: "入库人",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "proName",
|
||||||
|
width: '10%',
|
||||||
|
title: "入库数量",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "lastDay",
|
||||||
|
width: '10%',
|
||||||
|
title: "成本价格(元)",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "lastDay",
|
||||||
|
width: '10%',
|
||||||
|
title: "入库时间",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "lastDay",
|
||||||
|
width: '19.9%',
|
||||||
|
title: "备注",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
field: "lastDay",
|
||||||
|
width: '10%',
|
||||||
|
title: "单价是否录入",
|
||||||
|
unresize: true,
|
||||||
|
align: "center",
|
||||||
|
templet: function (d) {
|
||||||
|
return setStatusColor(d.status);
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: "操作",
|
||||||
|
width: '10%',
|
||||||
|
align: "center",
|
||||||
|
unresize: true,
|
||||||
|
templet: function (d) {
|
||||||
|
let html = "";
|
||||||
|
html += "<a onclick='deliveryDetail(" + JSON.stringify(d) + ")'>详情</a>";
|
||||||
|
html += "<div class='splitLine'>|</div><a onclick='sendGoods(" + 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;
|
||||||
|
element.render();
|
||||||
|
table.resize("currentTableId");
|
||||||
|
},
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 状态颜色
|
||||||
|
function setStatusColor(value) {
|
||||||
|
value = value ? parseInt(value) : 0;
|
||||||
|
let color = "";
|
||||||
|
let name = ''
|
||||||
|
if (value === 0) {
|
||||||
|
color = "#f56c6c";
|
||||||
|
}
|
||||||
|
return '<span style="color:' + color + '">' + name + "</span>";
|
||||||
|
}
|
||||||
|
|
||||||
|
// 导出
|
||||||
|
function exportExcel() {
|
||||||
|
let params = {
|
||||||
|
'proName': $('#proName').val(),
|
||||||
|
'status': $('#status').val()
|
||||||
|
}
|
||||||
|
let url = dataUrl + "backstage/export/exportFhList";
|
||||||
|
exportExcelUtil(url, '机具公司发货数据', JSON.stringify(params));
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发货详情
|
||||||
|
function deliveryDetail(obj) {
|
||||||
|
openIframeByParamObj("deliveryDetail", "详情", "../demandPlan/child/delivery_detail_list.html", "92%", "95%", obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 发货
|
||||||
|
function sendGoods(obj) {
|
||||||
|
openIframeByParamObj("sendGoods", "发货", "../demandPlan/child/send_goods_form.html", "92%", "95%", obj);
|
||||||
|
}
|
||||||
|
|
||||||
|
// type 1.总需求量 2.待发货量 3.已发货量
|
||||||
|
function openViewData(type) {
|
||||||
|
openIframeByParam("viewData", "数据概览", "../demandPlan/child/view_data_list.html", "92%", "95%", type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// type 1.超库存量 2.计划外量
|
||||||
|
function earlyInfo(type) {
|
||||||
|
openIframeByParam("viewData", "预警信息", "../demandPlan/child/early_info_list.html", "92%", "95%", type);
|
||||||
|
}
|
||||||
|
|
||||||
|
// 需求计划
|
||||||
|
function view_plan(obj) {
|
||||||
|
openIframeByParamObj("view_plan", "需求计划", "../demandPlan/child/demand_plan_detail_list.html", "92%", "95%", obj);
|
||||||
|
}
|
||||||
|
|
@ -6,6 +6,7 @@ function setParams(obj) {
|
||||||
if (objParam.type === 2) { // 修改
|
if (objParam.type === 2) { // 修改
|
||||||
$('#id').val(objParam.nodeId);
|
$('#id').val(objParam.nodeId);
|
||||||
$('#parentId').val(objParam.parentId);
|
$('#parentId').val(objParam.parentId);
|
||||||
|
getDetailById();
|
||||||
} else if (objParam.type === 1) { // 新增
|
} else if (objParam.type === 1) { // 新增
|
||||||
$('#parentName').val(objParam.context);
|
$('#parentName').val(objParam.context);
|
||||||
$('#parentId').val(objParam.nodeId);
|
$('#parentId').val(objParam.nodeId);
|
||||||
|
|
@ -27,7 +28,7 @@ function getDetailById() {
|
||||||
let encryptedData = {
|
let encryptedData = {
|
||||||
id: objParam.nodeId
|
id: objParam.nodeId
|
||||||
};
|
};
|
||||||
let url = dataUrl + 'backstage/paType/getTypeDataById?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData));
|
let url = dataUrl + 'backstage/paType/getTypeDetails?encryptedData=' + encodeURIComponent(JSON.stringify(encryptedData));
|
||||||
ajaxRequest(url, "GET", null, true, function () {
|
ajaxRequest(url, "GET", null, true, function () {
|
||||||
}, function (result) {
|
}, function (result) {
|
||||||
console.log(result);
|
console.log(result);
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,67 @@
|
||||||
|
<!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="proName" autocomplete="off"
|
||||||
|
class="layui-input" lay-affix="clear" placeholder="输入工程名称" maxlength="30">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="layui-inline">
|
||||||
|
<div class="layui-input-inline">
|
||||||
|
<select id="status">
|
||||||
|
<option value="">请选择状态</option>
|
||||||
|
<option value="0">未发货</option>
|
||||||
|
<option value="1">部分发货</option>
|
||||||
|
<option value="2">全部发货</option>
|
||||||
|
</select>
|
||||||
|
</select>
|
||||||
|
</select>
|
||||||
|
</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="queryTable(2)"><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_store_list.js" charset="utf-8"></script>
|
||||||
|
<script src="../../js/openIframe.js" charset="utf-8"></script>
|
||||||
|
</body>
|
||||||
|
|
||||||
|
</html>
|
||||||
|
|
@ -45,7 +45,8 @@
|
||||||
</div>
|
</div>
|
||||||
</fieldset>
|
</fieldset>
|
||||||
<div id="main-box">
|
<div id="main-box">
|
||||||
<ul id="fitTypeTree" class="dtree" style="height: calc(100vh - 180px);overflow: auto;" data-id="-1">
|
<p style="color: red;height: 30px;font-size: 15px;">提示:层级最多3级,一级配件类型,二级配件名称,三级规格型号</p>
|
||||||
|
<ul id="fitTypeTree" class="dtree" style="height: calc(100vh - 210px);overflow: auto;" data-id="-1">
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue