diff --git a/js/accessory/accessory_out_bound_list.js b/js/accessory/accessory_out_bound_list.js index b51bc72..ac125a4 100644 --- a/js/accessory/accessory_out_bound_list.js +++ b/js/accessory/accessory_out_bound_list.js @@ -20,7 +20,7 @@ function queryTable(type) { let flag = checkValue(keyWord); if (flag) { $('#keyWord').val(''); - return layer.msg('关键字查询包含特殊字符,请重新输入', { icon: 2 }); + return layer.msg('关键字查询包含特殊字符,请重新输入', {icon: 2}); } reloadTable(1); } else if (type === 2) { @@ -32,6 +32,11 @@ function queryTable(type) { } } + +function reloadData2() { + table.reload("currentTableId", {}) +} + // 刷新页面数据 function reloadData() { reloadTable(1); @@ -40,18 +45,18 @@ function reloadData() { // 重载表格 function reloadTable(pageNum) { table.reload("currentTableId", { - page: { - curr: pageNum ? pageNum : 1, + page: { + 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' }, parseData: function (res) { // res 即为原始返回的数据 - if(res.code === 401){ + if (res.code === 401) { closeWindowOpen(); } return { @@ -103,7 +108,7 @@ function initTable() { width: '10%', title: "领料单编号", unresize: true, - sort:true, + sort: true, align: "center", }, { @@ -111,7 +116,7 @@ function initTable() { width: '10%', title: "领用类型", unresize: true, - sort:true, + sort: true, align: "center", templet: function (d) { let value = ''; @@ -128,7 +133,7 @@ function initTable() { width: '10%', title: "领用人", unresize: true, - sort:true, + sort: true, align: "center", }, { @@ -136,7 +141,7 @@ function initTable() { width: '6%', title: "电话", unresize: true, - sort:true, + sort: true, align: "center", }, { @@ -144,7 +149,7 @@ function initTable() { width: '8%', title: "领用数", unresize: true, - sort:true, + sort: true, align: "center", }, { @@ -153,7 +158,7 @@ function initTable() { title: "状态", unresize: true, align: "center", - sort:true, + sort: true, templet: function (d) { return setCheckStatus(d.status); }, @@ -164,7 +169,7 @@ function initTable() { title: "出库时间", unresize: true, align: "center", - sort:true, + sort: true, templet: function (d) { return d.createTime.substring(0, 10); }, @@ -175,7 +180,7 @@ function initTable() { title: "备注", unresize: true, align: "center", - sort:true, + sort: true, templet: function (d) { if (d.remark) { if (d.remark.length > 60) { @@ -247,4 +252,4 @@ function accessoryOutBoundDetail(obj, type) { obj.operType = type; // 1.工器具 0.设备 openIframeByParamObj("accessory_out_bound_detail", "配件出库记录", "../accessory/child/accessory_out_bound_detail.html", "92%", "95%", obj); -} \ No newline at end of file +} diff --git a/js/accessory/child/accessory_out_bound_detail.js b/js/accessory/child/accessory_out_bound_detail.js index a227556..9de2243 100644 --- a/js/accessory/child/accessory_out_bound_detail.js +++ b/js/accessory/child/accessory_out_bound_detail.js @@ -524,6 +524,6 @@ function check() { function closePage() { let index = parent.layer.getFrameIndex(window.name); // 先得到当前 iframe层的索引 - window.parent.queryTable(1); + window.parent.reloadData2(); parent.layer.close(index); // 再执行关闭 -} \ No newline at end of file +}