You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
106 lines
5.7 KiB
Plaintext
106 lines
5.7 KiB
Plaintext
2 years ago
|
<%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<dynamic>" %>
|
||
|
<!DOCTYPE html>
|
||
|
<style>
|
||
|
.nav-tabs .nav-link {
|
||
|
border-right: 1px solid #eee !important;
|
||
|
}
|
||
|
</style>
|
||
|
<link type="text/css" href="/Areas/SoftMng/Content/bootstrap-4.1.1-dist/css/bootstrap.min.css" rel="stylesheet" />
|
||
|
<div class="gray-bg">
|
||
|
<ul class="nav nav-tabs" id="myTab" role="tablist"></ul>
|
||
|
<div class="tab-content" id="myTabContent"></div>
|
||
|
</div>
|
||
|
<script type="text/javascript" src="/Areas/SoftMng/Content/jquery-3.3.1-dist/js/jquery.min.js-v=2.1.4.js"></script>
|
||
|
<script type="text/javascript" src="/Areas/SoftMng/Content/bootstrap-4.1.1-dist/js/popper.min.js"></script>
|
||
|
<script type="text/javascript" src="/Areas/SoftMng/Content/bootstrap-4.1.1-dist/js/bootstrap.min.js"></script>
|
||
|
<script type="text/javascript" src="/Areas/SoftMng/Content/common-js/common.js"></script>
|
||
|
<script type="text/javascript" >
|
||
|
var _bsno = parent.window._this == undefined ? "" : (parent.window._this.editRecord == undefined ? "" : parent.window._this.editRecord.get('BSNO'));
|
||
|
/*
|
||
|
function GetQueryString(name)
|
||
|
{
|
||
|
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
|
||
|
var r = window.location.search.substr(1).match(reg);
|
||
|
if (r != null) return unescape(r[2]); return null;
|
||
|
}
|
||
|
if (_bsno == '') {
|
||
|
_bsno = GetQueryString('bsno');
|
||
|
|
||
|
}
|
||
|
*/
|
||
|
var navTabs = '';
|
||
|
var tabContent = '';
|
||
|
var ietype = 'I';
|
||
|
var copyData = new Object();
|
||
|
var oldModel = new Object();
|
||
|
if (_bsno != "")
|
||
|
{
|
||
|
CommonAjax.Post("/SoftMng/Export/GetSingleList", {
|
||
|
bsno: _bsno
|
||
|
}, function (res)
|
||
|
{
|
||
|
if (res.model != null)
|
||
|
{
|
||
|
oldModel.BillNo = res.model.MBLNO;
|
||
|
oldModel.TrafName = res.model.VESSEL;
|
||
|
oldModel.NativeVoyageNo = res.model.VOYNO;
|
||
|
oldModel.PackNo = res.model.PKGS;
|
||
|
oldModel.GrossWet = res.model.KGS;
|
||
|
oldModel.NetWt = res.model.NETWEIGHT;
|
||
|
oldModel.ContrNo = res.model.CONTRACTNO;
|
||
|
oldModel.TradeMode = res.model.TRADEMODE;//从报关业务的 贸易方式 设置单一窗口的 监管方式
|
||
|
oldModel.TransMode = res.model.TRADETERM;
|
||
|
var BSTYPE = res.model.BSTYPEREF;
|
||
|
if (BSTYPE.indexOf('出口') > 0) ietype = 'E';
|
||
|
}
|
||
|
if (res.list.length > 0)
|
||
|
{
|
||
|
for (var i = 0; i < res.list.length; i++)
|
||
|
{
|
||
|
navTabs = navTabs.concat('<li class="nav-item"><a class="nav-link ' + (i == 0 ? "active" : "") + '" id="home-tab_' + i + '" data-toggle="tab" href="#home-content_' + i + '" role="tab" aria-controls="home-content_' + i + '" aria-selected="' + (i == 0 ? "true" : "false") + '">' + res.list[i].BillNo + '</a></li>');
|
||
|
tabContent = tabContent.concat('<div class="tab-pane fade ' + (i == 0 ? "show active" : "") + '" id="home-content_' + i + '" role="tabpanel"><iframe src="/SoftMng/Export/Single?gid=' + res.list[i].GID + '&tabIndex='+i+'&ietype='+ietype+'" frameborder=0 scrolling=no width="100%" height="1080"></iframe></div>');
|
||
|
}
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
navTabs = navTabs.concat('<li class="nav-item"><a class="nav-link active" id="home-tab_0" data-toggle="tab" href="#home-content_0" role="tab" aria-controls="home-content_0" aria-selected="true">无标题</a></li>');
|
||
|
tabContent = tabContent.concat('<div class="tab-pane fade show active" id="home-content_0" role="tabpanel"><iframe src="/SoftMng/Export/Single?gid=-1&bsno=' + _bsno + '&tabIndex=0&ietype='+ietype+'" frameborder=0 scrolling=no width="100%" height="1080"></iframe></div>');
|
||
|
}
|
||
|
$("#myTab").html(navTabs);
|
||
|
$("#myTabContent").html(tabContent);
|
||
|
});
|
||
|
}
|
||
|
else
|
||
|
{
|
||
|
navTabs = navTabs.concat('<li class="nav-item"><a class="nav-link active" id="home-tab_0" data-toggle="tab" href="#home-content_0" role="tab" aria-controls="home-content_0" aria-selected="true">无标题</a></li>');
|
||
|
tabContent = tabContent.concat('<div class="tab-pane fade show active" id="home-content_0" role="tabpanel"><iframe src="/SoftMng/Export/Single?gid=-1&bsno=-1&tabIndex=0&ietype='+ietype+'" frameborder=0 scrolling=no width="100%" height="1080"></iframe></div>');
|
||
|
$("#myTab").html(navTabs);
|
||
|
$("#myTabContent").html(tabContent);
|
||
|
}
|
||
|
function addTab(data)
|
||
|
{
|
||
|
copyData = data;
|
||
|
var copy = 0;
|
||
|
if (data != undefined)
|
||
|
{
|
||
|
copyData.GID = "";
|
||
|
copy = 1;
|
||
|
}
|
||
|
var index = CommonJson.NewGuid();
|
||
|
var navTabs = '<li class="nav-item"><a class="nav-link" id="home-tab_'+index+'" data-toggle="tab" href="#home-content_'+index+'" role="tab" aria-controls="home-content_'+index+'" aria-selected="false">无标题</a></li>';
|
||
|
var tabContent = '<div class="tab-pane fade" id="home-content_'+index+'" role="tabpanel"><iframe src="/SoftMng/Export/Single?gid=-1&bsno=' + _bsno + '&tabIndex='+index+'©='+copy+'&ietype='+ietype+'" frameborder=0 scrolling=no width="100%" height="1080"></iframe></div>';
|
||
|
$("#myTab").append(navTabs);
|
||
|
$("#myTabContent").append(tabContent);
|
||
|
$('#home-tab_' + index).tab('show');
|
||
|
}
|
||
|
function delTab(index)
|
||
|
{
|
||
|
$("#myTab").find("#home-tab_" + index).parent().remove();
|
||
|
$("#myTabContent").find("#home-content_" + index).remove();
|
||
|
if ($(".nav-item").length == 0)
|
||
|
addTab();
|
||
|
else
|
||
|
$(".nav-item a:last").tab('show');
|
||
|
}
|
||
|
</script>
|