修改跳转页面
This commit is contained in:
parent
7b6c26a618
commit
6b7f6e5797
|
|
@ -1,9 +1,11 @@
|
|||
let objParam = JSON.parse(decodeURIComponent(getUrlParam('obj')));
|
||||
|
||||
let objParam ;
|
||||
//let objParam = JSON.parse(decodeURIComponent(getUrlParam('obj')));
|
||||
let layer, element;
|
||||
layui.use(["layer", 'element'], function () {
|
||||
layer = layui.layer;
|
||||
element = layui.element;
|
||||
const obj = window.contractObj || {};
|
||||
objParam= JSON.parse(obj);
|
||||
// tab 切换事件
|
||||
element.on('tab(demo-filter-tab)', function (data) {
|
||||
let value = $(this).attr('value');
|
||||
|
|
@ -12,6 +14,7 @@ layui.use(["layer", 'element'], function () {
|
|||
let supList = objParam.supList;
|
||||
getSupplierList(supList);
|
||||
});
|
||||
|
||||
// 厂家列表
|
||||
function getSupplierList(list) {
|
||||
let dataList = [];
|
||||
|
|
|
|||
|
|
@ -1,11 +1,10 @@
|
|||
let objParam, objParam2 = null;
|
||||
let form, table, upload, tableIns, layer, element;
|
||||
let pageNum = 1;
|
||||
|
||||
let nextObjParam;
|
||||
function setParams(params) {
|
||||
objParam = JSON.parse(params);
|
||||
console.log(objParam);
|
||||
|
||||
$('#code').html(objParam.code + '' + setContractStatus());
|
||||
$('#titleName').html(objParam.name);
|
||||
layui.use(["form", "table", 'upload', 'layer', 'element'], function () {
|
||||
|
|
@ -23,13 +22,19 @@ function setParams(params) {
|
|||
$.each(obj.child, function (index, item) {
|
||||
item.child = [];
|
||||
})
|
||||
$('#indexIframe').attr('src', 'contract_supplier_detail.html?obj=' + encodeURIComponent(JSON.stringify(obj)));
|
||||
nextObjParam=JSON.stringify(obj);
|
||||
$('#indexIframe').attr('src', 'contract_supplier_detail.html');
|
||||
//$('#indexIframe').attr('src', 'contract_supplier_detail.html?obj=' + encodeURIComponent(JSON.stringify(obj)));
|
||||
}
|
||||
})
|
||||
getCarContractDetail();
|
||||
});
|
||||
}
|
||||
|
||||
// 等待 iframe 加载完成后传递数据
|
||||
$('#indexIframe').on('load', function() {
|
||||
// 直接给子页面的 window 对象赋值
|
||||
this.contentWindow.contractObj = nextObjParam;
|
||||
});
|
||||
function setContractStatus() {
|
||||
if (objParam.status === '已生效') {
|
||||
return "<span style='color:#19BE6B;margin:0 5px 0 5px;font-size:14px'>●</span>" + "生效中";
|
||||
|
|
@ -70,14 +75,19 @@ function getCarContractDetail() {
|
|||
$.each(obj.supList, function (index, item) {
|
||||
item.carList = [];
|
||||
})
|
||||
$('#indexIframe2').attr('src', 'contract_supplier_detail.html?obj=' + encodeURIComponent(JSON.stringify(obj)));
|
||||
nextObjParam=JSON.stringify(obj);
|
||||
$('#indexIframe2').attr('src', 'contract_supplier_detail.html')
|
||||
// $('#indexIframe2').attr('src', 'contract_supplier_detail.html?obj=' + encodeURIComponent(JSON.stringify(obj)));
|
||||
} else if (obj.type === 2) {
|
||||
$('#crane').removeAttr('style');
|
||||
initTable();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$('#indexIframe2').on('load', function() {
|
||||
// 直接给子页面的 window 对象赋值
|
||||
this.contentWindow.contractObj = nextObjParam;
|
||||
});
|
||||
// 厂家信息赋值
|
||||
function setCjTable(supList) {
|
||||
$('#cj-table tbody tr:not(:first)').remove();
|
||||
|
|
|
|||
|
|
@ -186,6 +186,7 @@
|
|||
</div>
|
||||
</body>
|
||||
<script src="../../../lib/jquery-3.4.1/jquery-3.7.1.min.js" charset="utf-8"></script>
|
||||
<script src="../../../js/aes.js" charset="utf-8"></script>
|
||||
<script src="../../../js/public.js" charset="utf-8"></script>
|
||||
<script src="../../../js/jQuery.print.js" charset="utf-8"></script>
|
||||
<script src="../../../lib/layui-v2.9.18/layui/layui.js" charset="utf-8"></script>
|
||||
|
|
|
|||
Loading…
Reference in New Issue