领料出库

This commit is contained in:
cwchen 2024-11-14 13:31:08 +08:00
parent 5ba453bb7d
commit 2cab7d23cd
2 changed files with 35 additions and 21 deletions

View File

@ -7,7 +7,7 @@ layui.use(["form", "table", 'laydate'], function () {
laydate = layui.laydate;
laydate.render({
elem: '#ID-laydate-rangeLinked',
range: ['#startDate', '#endDate'],
range: ['#startDay', '#endDay'],
rangeLinked: true
});
initTable();
@ -19,8 +19,8 @@ function queryTable(type) {
reloadTable(1);
} else if (type === 2) {
$('#keyWord').val('');
$('#startDate').val('');
$('#endDate').val('');
$('#startDay').val('');
$('#endDay').val('');
layui.form.render();
reloadTable(1);
}
@ -40,8 +40,8 @@ function reloadTable(pageNum) {
where: {
encryptedData: JSON.stringify({
'keyWord': $('#keyWord').val(),
'startDate': $('#startDate').val(),
'endDate': $('#endDate').val()
'startDay': $('#startDay').val(),
'endDay': $('#endDay').val()
}),
},
},
@ -57,12 +57,12 @@ function initTable() {
authorization: sessionStorage.getItem("gz-token"),
},
height: "full-170",
url: dataUrl + "backstage/partInput/findByPage",
url: dataUrl + "backstage/partApply/findByPage",
where: {
encryptedData: JSON.stringify({
'keyWord': $('#keyWord').val(),
'startDate': $('#startDate').val(),
'endDate': $('#endDate').val()
'startDay': $('#startDay').val(),
'endDay': $('#endDay').val()
}),
},
request: {
@ -95,35 +95,44 @@ function initTable() {
align: "center",
},
{
field: "inputUser",
field: "devType",
width: '10%',
title: "领用类型",
unresize: true,
align: "center",
templet: function (d) {
let value = '';
if (d.devType === '1') {
value = '工器具';
} else if (d.devType === '2') {
value = '设备';
}
return '<span>' + value + '</span>'
},
},
{
field: "inputNum",
field: "userName",
width: '10%',
title: "领用人",
unresize: true,
align: "center",
},
{
field: "allPrice",
field: "phone",
width: '10%',
title: "联系电话",
unresize: true,
align: "center",
},
{
field: "inputDay",
field: "applyNum",
width: '10%',
title: "领用数量",
unresize: true,
align: "center",
},
{
field: "inputDay",
field: "status",
width: '10%',
title: "状态",
unresize: true,
@ -147,8 +156,11 @@ function initTable() {
templet: function (d) {
let html = "";
html += "<a onclick='accessoryOutBoundDetail(" + JSON.stringify(d) + ",1)'>详情</a>";
html += "<div class='splitLine'>|</div><a onclick='accessoryOutBoundDetail(" + JSON.stringify(d) + ",2)'>审核</a>";
html += "<div class='splitLine'>|</div><a onclick='accessoryOutBoundDetail(" + JSON.stringify(d) + ",3)'>出库</a>";
if (d.status === '1') { // 待审核
html += "<div class='splitLine'>|</div><a onclick='accessoryOutBoundDetail(" + JSON.stringify(d) + ",2)'>审核</a>";
} else if (d.status === '2') { // 审核通过待出库
html += "<div class='splitLine'>|</div><a onclick='accessoryOutBoundDetail(" + JSON.stringify(d) + ",3)'>出库</a>";
}
return html;
},
},
@ -169,9 +181,11 @@ 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>审核通过";
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:#F56C6C;margin:0 5px 0 5px;font-size:16px'>●</span>已驳回";
} else if (status === '4') {
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>待审核";
}

View File

@ -3,7 +3,7 @@
<head>
<meta charset="utf-8">
<title>配件出库</title>
<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">
@ -22,19 +22,19 @@
<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"
<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">
<input type="text" autocomplete="off" id="startDate" class="layui-input"
<input type="text" autocomplete="off" id="startDay" 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"
<input type="text" autocomplete="off" id="endDay" class="layui-input"
placeholder="结束日期">
</div>
</div>