This commit is contained in:
parent
b61aecb994
commit
4b3aca38f1
|
|
@ -1,11 +1,15 @@
|
||||||
let form, table, element;
|
let form, table, laydate;
|
||||||
let tableIns;
|
let tableIns;
|
||||||
let pageNum = 1; // 定义分页
|
let pageNum = 1; // 定义分页
|
||||||
layui.use(["form", "table"], function () {
|
layui.use(["form", "table", 'laydate'], function () {
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
element = layui.element;
|
laydate = layui.laydate;
|
||||||
element.render();
|
laydate.render({
|
||||||
|
elem: '#ID-laydate-rangeLinked',
|
||||||
|
range: ['#startDate', '#endDate'],
|
||||||
|
rangeLinked: true
|
||||||
|
});
|
||||||
initTable();
|
initTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
@ -14,8 +18,9 @@ function queryTable(type) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
} else if (type === 2) {
|
} else if (type === 2) {
|
||||||
$('#proName').val('');
|
$('#keyWord').val('');
|
||||||
$('#status').val('0');
|
$('#startDate').val('');
|
||||||
|
$('#endDate').val('');
|
||||||
layui.form.render();
|
layui.form.render();
|
||||||
reloadTable(1);
|
reloadTable(1);
|
||||||
}
|
}
|
||||||
|
|
@ -34,8 +39,9 @@ function reloadTable(pageNum) {
|
||||||
},
|
},
|
||||||
where: {
|
where: {
|
||||||
encryptedData: JSON.stringify({
|
encryptedData: JSON.stringify({
|
||||||
'proName': $('#proName').val(),
|
'keyWord': $('#keyWord').val(),
|
||||||
'status': $('#status').val()
|
'startDate': $('#startDate').val(),
|
||||||
|
'endDate': $('#endDate').val()
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
|
@ -51,11 +57,12 @@ function initTable() {
|
||||||
authorization: sessionStorage.getItem("gz-token"),
|
authorization: sessionStorage.getItem("gz-token"),
|
||||||
},
|
},
|
||||||
height: "full-170",
|
height: "full-170",
|
||||||
url: dataUrl + "backstage/planOut/getProPlanPage",
|
url: dataUrl + "backstage/partInput/findByPage",
|
||||||
where: {
|
where: {
|
||||||
encryptedData: JSON.stringify({
|
encryptedData: JSON.stringify({
|
||||||
'proName': $('#proName').val(),
|
'keyWord': $('#keyWord').val(),
|
||||||
'status': $('#status').val()
|
'startDate': $('#startDate').val(),
|
||||||
|
'endDate': $('#endDate').val()
|
||||||
}),
|
}),
|
||||||
},
|
},
|
||||||
request: {
|
request: {
|
||||||
|
|
@ -81,55 +88,55 @@ function initTable() {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "proName",
|
field: "code",
|
||||||
width: '15%',
|
width: '15%',
|
||||||
title: "入库编号",
|
title: "入库编号",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "proName",
|
field: "inputUser",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "入库人",
|
title: "入库人",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "proName",
|
field: "inputNum",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "入库数量",
|
title: "入库数量",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "lastDay",
|
field: "allPrice",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "成本价格(元)",
|
title: "成本价格(元)",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "lastDay",
|
field: "inputDay",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "入库时间",
|
title: "入库时间",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "lastDay",
|
field: "remark",
|
||||||
width: '19.9%',
|
width: '19.9%',
|
||||||
title: "备注",
|
title: "备注",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
field: "lastDay",
|
field: "isFlag",
|
||||||
width: '10%',
|
width: '10%',
|
||||||
title: "单价是否录入",
|
title: "单价是否录入",
|
||||||
unresize: true,
|
unresize: true,
|
||||||
align: "center",
|
align: "center",
|
||||||
templet: function (d) {
|
templet: function (d) {
|
||||||
return setStatusColor(d.status);
|
return setStatusColor(d.isFlag);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
@ -151,7 +158,6 @@ function initTable() {
|
||||||
page: true,
|
page: true,
|
||||||
done: function (res, curr, count) {
|
done: function (res, curr, count) {
|
||||||
pageNum = tableIns.config.page.curr;
|
pageNum = tableIns.config.page.curr;
|
||||||
element.render();
|
|
||||||
table.resize("currentTableId");
|
table.resize("currentTableId");
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
@ -162,7 +168,7 @@ function setStatusColor(value) {
|
||||||
value = value ? parseInt(value) : 0;
|
value = value ? parseInt(value) : 0;
|
||||||
let color = "";
|
let color = "";
|
||||||
let name = ''
|
let name = ''
|
||||||
if (value === 0) {
|
if (value === '0') {
|
||||||
color = "#f56c6c";
|
color = "#f56c6c";
|
||||||
}
|
}
|
||||||
return '<span style="color:' + color + '">' + name + "</span>";
|
return '<span style="color:' + color + '">' + name + "</span>";
|
||||||
|
|
|
||||||
|
|
@ -22,20 +22,21 @@
|
||||||
<div class="layui-form-item">
|
<div class="layui-form-item">
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
<div class="layui-input-inline" style="width: 300px;">
|
<div class="layui-input-inline" style="width: 300px;">
|
||||||
<input type="text" name="proName" id="proName" autocomplete="off"
|
<input type="text" name="proName" id="keyWord" autocomplete="off"
|
||||||
class="layui-input" lay-affix="clear" placeholder="输入工程名称" maxlength="30">
|
class="layui-input" lay-affix="clear" placeholder="请输入关键字" maxlength="30">
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline" style="margin-bottom: 0;">
|
||||||
<div class="layui-input-inline">
|
<div class="layui-inline" id="ID-laydate-rangeLinked">
|
||||||
<select id="status">
|
<div class="layui-input-inline">
|
||||||
<option value="">请选择状态</option>
|
<input type="text" autocomplete="off" id="startDate" class="layui-input"
|
||||||
<option value="0">未发货</option>
|
placeholder="开始日期">
|
||||||
<option value="1">部分发货</option>
|
</div>
|
||||||
<option value="2">全部发货</option>
|
<div class="layui-form-mid">-</div>
|
||||||
</select>
|
<div class="layui-input-inline">
|
||||||
</select>
|
<input type="text" autocomplete="off" id="endDate" class="layui-input"
|
||||||
</select>
|
placeholder="结束日期">
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="layui-inline">
|
<div class="layui-inline">
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue