bug修复
This commit is contained in:
parent
a1cda8c01b
commit
58fa9d92fb
|
|
@ -1,7 +1,11 @@
|
||||||
let objParam = JSON.parse(decodeURIComponent(getUrlParam('obj')));
|
let objParam = JSON.parse(decodeURIComponent(getUrlParam('obj')));
|
||||||
|
let type = getUrlParam('type'); // type
|
||||||
let form, table, element, tableIns, layer;
|
let form, table, element, tableIns, layer;
|
||||||
let pageNum = 1;
|
let pageNum = 1;
|
||||||
layui.use(["form", "table", 'element', 'layer'], function () {
|
layui.use(["form", "table", 'element', 'layer'], function () {
|
||||||
|
if(type){
|
||||||
|
objParam = JSON.parse(objParam);
|
||||||
|
}
|
||||||
form = layui.form;
|
form = layui.form;
|
||||||
table = layui.table;
|
table = layui.table;
|
||||||
element = layui.element;
|
element = layui.element;
|
||||||
|
|
@ -9,6 +13,19 @@ layui.use(["form", "table", 'element', 'layer'], function () {
|
||||||
initTable();
|
initTable();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
function isJsonString(str) {
|
||||||
|
try {
|
||||||
|
JSON.parse(str);
|
||||||
|
} catch (e) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
function isJsonObject(obj) {
|
||||||
|
return obj && typeof obj === 'object' && !Array.isArray(obj) && !isJsonString(JSON.stringify(obj));
|
||||||
|
}
|
||||||
|
|
||||||
// 查询/重置
|
// 查询/重置
|
||||||
function queryTable(type) {
|
function queryTable(type) {
|
||||||
if (type === 1) {
|
if (type === 1) {
|
||||||
|
|
|
||||||
|
|
@ -13,7 +13,7 @@ function setParams(obj) {
|
||||||
element.on('tab(demo-filter-tab)', function (data) {
|
element.on('tab(demo-filter-tab)', function (data) {
|
||||||
let value = $(this).attr('value');
|
let value = $(this).attr('value');
|
||||||
if (value === '') { // 全部
|
if (value === '') { // 全部
|
||||||
$('#indexIframe').attr('src', 'delivery_all_list.html?obj=' + encodeURIComponent(JSON.stringify(obj)));
|
$('#indexIframe').attr('src', 'delivery_all_list.html?obj=' + encodeURIComponent(JSON.stringify(obj)) + '&type=' + 1);
|
||||||
} else if (value !== '0') {
|
} else if (value !== '0') {
|
||||||
let time = $(this).attr('tiem');
|
let time = $(this).attr('tiem');
|
||||||
$('#indexIframe').attr('src', 'delivery_batch_list.html?obj=' + encodeURIComponent(JSON.stringify(obj)) + '&id=' + value + '&time=' + time);
|
$('#indexIframe').attr('src', 'delivery_batch_list.html?obj=' + encodeURIComponent(JSON.stringify(obj)) + '&id=' + value + '&time=' + time);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue