This commit is contained in:
jiang 2025-07-13 21:50:36 +08:00
parent 8925513019
commit 4e3b4d8eec
2 changed files with 29 additions and 24 deletions

View File

@ -20,7 +20,7 @@ function queryTable(type) {
let flag = checkValue(keyWord); let flag = checkValue(keyWord);
if (flag) { if (flag) {
$('#keyWord').val(''); $('#keyWord').val('');
return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 }); return layer.msg('关键字查询包含特殊字符,请重新输入', {icon: 2});
} }
reloadTable(1); reloadTable(1);
} else if (type === 2) { } else if (type === 2) {
@ -32,6 +32,11 @@ function queryTable(type) {
} }
} }
function reloadData2() {
table.reload("currentTableId", {})
}
// 刷新页面数据 // 刷新页面数据
function reloadData() { function reloadData() {
reloadTable(1); reloadTable(1);
@ -40,18 +45,18 @@ function reloadData() {
// 重载表格 // 重载表格
function reloadTable(pageNum) { function reloadTable(pageNum) {
table.reload("currentTableId", { table.reload("currentTableId", {
page: { page: {
curr: pageNum ? pageNum : 1, curr: pageNum ? pageNum : 1,
},
where: {
encryptedData: JSON.stringify({
'status': $('#status').val(),
'keyWord': $('#keyWord').val(),
'startDay': $('#startDay').val(),
'endDay': $('#endDay').val()
}),
},
}, },
where: {
encryptedData: JSON.stringify({
'status': $('#status').val(),
'keyWord': $('#keyWord').val(),
'startDay': $('#startDay').val(),
'endDay': $('#endDay').val()
}),
},
},
); );
} }
@ -78,7 +83,7 @@ function initTable() {
limitName: 'pageSize' limitName: 'pageSize'
}, },
parseData: function (res) { // res 即为原始返回的数据 parseData: function (res) { // res 即为原始返回的数据
if(res.code === 401){ if (res.code === 401) {
closeWindowOpen(); closeWindowOpen();
} }
return { return {
@ -103,7 +108,7 @@ function initTable() {
width: '10%', width: '10%',
title: "领料单编号", title: "领料单编号",
unresize: true, unresize: true,
sort:true, sort: true,
align: "center", align: "center",
}, },
{ {
@ -111,7 +116,7 @@ function initTable() {
width: '10%', width: '10%',
title: "领用类型", title: "领用类型",
unresize: true, unresize: true,
sort:true, sort: true,
align: "center", align: "center",
templet: function (d) { templet: function (d) {
let value = ''; let value = '';
@ -128,7 +133,7 @@ function initTable() {
width: '10%', width: '10%',
title: "领用人", title: "领用人",
unresize: true, unresize: true,
sort:true, sort: true,
align: "center", align: "center",
}, },
{ {
@ -136,7 +141,7 @@ function initTable() {
width: '6%', width: '6%',
title: "电话", title: "电话",
unresize: true, unresize: true,
sort:true, sort: true,
align: "center", align: "center",
}, },
{ {
@ -144,7 +149,7 @@ function initTable() {
width: '8%', width: '8%',
title: "领用数", title: "领用数",
unresize: true, unresize: true,
sort:true, sort: true,
align: "center", align: "center",
}, },
{ {
@ -153,7 +158,7 @@ function initTable() {
title: "状态", title: "状态",
unresize: true, unresize: true,
align: "center", align: "center",
sort:true, sort: true,
templet: function (d) { templet: function (d) {
return setCheckStatus(d.status); return setCheckStatus(d.status);
}, },
@ -164,7 +169,7 @@ function initTable() {
title: "出库时间", title: "出库时间",
unresize: true, unresize: true,
align: "center", align: "center",
sort:true, sort: true,
templet: function (d) { templet: function (d) {
return d.createTime.substring(0, 10); return d.createTime.substring(0, 10);
}, },
@ -175,7 +180,7 @@ function initTable() {
title: "备注", title: "备注",
unresize: true, unresize: true,
align: "center", align: "center",
sort:true, sort: true,
templet: function (d) { templet: function (d) {
if (d.remark) { if (d.remark) {
if (d.remark.length > 60) { if (d.remark.length > 60) {
@ -247,4 +252,4 @@ function accessoryOutBoundDetail(obj, type) {
obj.operType = type; obj.operType = type;
// 1.工器具 0.设备 // 1.工器具 0.设备
openIframeByParamObj("accessory_out_bound_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj); openIframeByParamObj("accessory_out_bound_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj);
} }

View File

@ -524,6 +524,6 @@ function check() {
function closePage() { function closePage() {
let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引 let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引
window.parent.queryTable(1); window.parent.reloadData2();
parent.layer.close(index); // 再执行关闭 parent.layer.close(index); // 再执行关闭
} }