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.

561 lines
33 KiB
Plaintext

@using BookingJieFeng.DB.Model
@{
var cfgData = ViewBag.ColumnConfigData;
var dicColMap = ViewBag.ColDic as Dictionary<string, string>;
var cfgDataOrder = ViewBag.ColumnConfigDataOrder;
var dicColMapOrder = ViewBag.ColDicOrder as Dictionary<string, string>;
}
<div class="top-navigation">
<div class="row">
<nav class="navbar">
<div class="navbar-collapse navbar-bottom collapse">
<div class="set-column">
<a id="btnSetCol">设置列</a>
</div>
</div>
</nav>
</div>
</div>
<div class="wrapper-content J_mainContent gray-bg-right">
<div class="row row-margin">
<div class="col-sm-12">
<div class="ibox float-e-margins">
<div class="ibox-title">
<h5>@Resources.LangOrder.LabelBookingAccount</h5>
</div>
<div class="ibox-content">
<form class="form-horizontal clearfix" id="formCond">
<div class="col-lg-2 col-md-3 form-group">
<input type="text" class="form-control" name="MBLNO" placeholder="@Resources.LangAll.LabelMBLNO" />
</div>
<div class="col-lg-2 col-md-2 form-group">
@*@Resources.LangAll.LabelETD*@
<input type="text" class="form-control date" name="ETD_START" id="ETD_START" placeholder="起始时间" />
</div>
<div class="col-lg-2 col-md-2 form-group">
<input type="text" class="form-control date" name="ETD_END" id="ETD_END" placeholder="结束时间" />
</div>
<div class="col-lg-2 col-md-2 form-group">
<input type="text" class="form-control" name="PORTDISCHARGE" placeholder="@Resources.LangAll.LabelPORTDISCHARGE" />
</div>
@*@Resources.LangAll.LabelVESSEL@Resources.LangAll.LabelVOYNO*@
<div class="col-lg-2 col-md-2 form-group">
<input type="text" class="form-control" name="VESSEL" placeholder="船名" />
</div>
<div class="col-lg-2 col-md-2 form-group">
<input type="text" class="form-control" name="VOYNO" placeholder="航次" />
</div>
<div class="form-group col-md-4">
<a id="btn-reset" href="javascript:;" class="btn btn-resect">@Resources.LangAll.BtnReset</a>
<a href="javascript:;" class="btn btn-query" id="btnSearch">@Resources.LangAll.BtnQuery</a>
</div>
</form>
<div class="tabs-container">
<ul class="nav nav-tabs" id="ulNavHead">
<li class="active" data-idx="0">
<a data-toggle="tab" href="#tab-1" aria-expanded="false">全部</a>
</li>
<li data-idx="10">
<a data-toggle="tab" href="#tab-2" aria-expanded="true">待截单</a>
</li>
<li data-idx="1">
<a data-toggle="tab" href="#tab-3" aria-expanded="true">未提交</a>
</li>
<li data-idx="2">
<a data-toggle="tab" href="#tab-4" aria-expanded="true">截单已提交</a>
</li>
<li data-idx="3">
<a data-toggle="tab" href="#tab-5" aria-expanded="true">截单确认</a>
</li>
</ul>
<div class="tab-content">
<div id="tab-1" class="tab-pane active">
<div class="panel-body">
<table id="tableAll"
data-idx="0"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-url="@Url.Action("ConfirmListData")"
data-content-type="application/x-www-form-urlencoded"
data-pagination="true"
data-side-pagination="server"
data-total-field="Total"
data-data-field="DataList"
data-page-number="1"
data-page-size="15"
data-query-params="queryParams"
data-method="post">
<thead>
<tr>
<th data-checkbox="true"></th>
@if (cfgData == null)
{
<th data-field="CARRIER" data-sortable="true">船公司</th>
<th data-field="YARD" data-sortable="true">场站</th>
<th data-field="CNTRTOTAL" data-sortable="true">集装箱</th>
<th data-field="PORTLOAD" data-sortable="true">装货港</th>
<th data-field="PORTDISCHARGE" data-sortable="true">卸货港</th>
<th data-field="CONTRACTNO" data-sortable="true">客户合同号</th>
<th data-field="VESSEL" data-sortable="true">船名</th>
<th data-field="VOYNO" data-sortable="true">航次</th>
<th data-field="MBLNO" data-sortable="true">提单号</th>
<th data-field="ETD" data-sortable="true">开船日期</th>
<th data-field="BSSTATUS_NAME" data-formatter="fmtStatus" data-sortable="true">状态</th>
}
else
{
foreach (var item in cfgData)
{
var vis = Convert.ToBoolean(item.visible);
string colName = item.colName.ToString();
string colTitle = dicColMap.ContainsKey(colName) ? dicColMap[colName] : colName;
if (vis)
{
<th data-field="@colName" data-sortable="true" @Html.Raw(colName == "BSSTATUS_NAME" ? "data-formatter='fmtStatus'" : "") @Html.Raw((item.width > 0 ? "data-width='" + item.width + "'" : ""))>
@colTitle
</th>
}
}
}
<th data-field="ORDNO" data-formatter="operateFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tab-2" class="tab-pane">
<div class="panel-body">
<table id="tableOrderConfirm"
data-idx="10"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-url="@Url.Action("OrderListData")"
data-content-type="application/x-www-form-urlencoded"
data-pagination="true"
data-side-pagination="server"
data-total-field="Total"
data-data-field="DataList"
data-page-number="1"
data-page-size="10"
data-query-params="queryParamsOrder"
data-method="post"
data-server-sort="true">
<thead>
<tr>
<th data-checkbox="true"></th>
@if (cfgDataOrder == null)
{
<th data-field="CARRIER" data-sortable="true">船公司</th>
<th data-field="CNTRTOTAL" data-sortable="true">集装箱</th>
<th data-field="PORTDISCHARGE" data-sortable="true">卸货港</th>
<th data-field="CONTRACTNO" data-sortable="true">约号</th>
<th data-field="VESSEL" data-sortable="true">船名</th>
<th data-field="VOYNO" data-sortable="true">航次</th>
<th data-field="MBLNO" data-sortable="true">提单号</th>
<th data-field="ETD" data-sortable="true">开船日期</th>
<th data-field="BSSTATUS_NAME" data-formatter="fmtStatus" data-sortable="true">状态</th>
<th data-field="SISTATUS_NAME" data-sortable="true">截单状态</th>
}
else
{
foreach (var item in cfgDataOrder)
{
var vis = Convert.ToBoolean(item.visible);
string colName = item.colName.ToString();
string colTitle = dicColMapOrder.ContainsKey(colName) ? dicColMapOrder[colName] : colName;
if (vis)
{
<th data-field="@colName" data-sortable="true" @Html.Raw(colName == "BSSTATUS_NAME" ? "data-formatter='fmtStatusOrder'" : "") @Html.Raw((item.width > 0 ? "data-width='" + item.width + "'" : ""))>
@colTitle
</th>
}
}
}
<th data-field="ORDNO" data-formatter="operateFormatterOrder">操作</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tab-3" class="tab-pane">
<div class="panel-body">
<table id="tableCreate"
data-idx="1"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-url="@Url.Action("ConfirmListData")"
data-content-type="application/x-www-form-urlencoded"
data-pagination="true"
data-side-pagination="server"
data-total-field="Total"
data-data-field="DataList"
data-page-number="1"
data-page-size="15"
data-query-params="queryParams"
data-method="post">
<thead>
<tr>
<th data-checkbox="true"></th>
@if (cfgData == null)
{
<th data-field="CARRIER" data-sortable="true">船公司</th>
<th data-field="YARD" data-sortable="true">场站</th>
<th data-field="CNTRTOTAL" data-sortable="true">集装箱</th>
<th data-field="PORTLOAD" data-sortable="true">装货港</th>
<th data-field="PORTDISCHARGE" data-sortable="true">卸货港</th>
<th data-field="CONTRACTNO" data-sortable="true">客户合同号</th>
<th data-field="VESSEL" data-sortable="true">船名</th>
<th data-field="VOYNO" data-sortable="true">航次</th>
<th data-field="MBLNO" data-sortable="true">提单号</th>
<th data-field="ETD" data-sortable="true">开船日期</th>
<th data-field="BSSTATUS_NAME" data-formatter="fmtStatus" data-sortable="true">状态</th>
}
else
{
foreach (var item in cfgData)
{
var vis = Convert.ToBoolean(item.visible);
string colName = item.colName.ToString();
string colTitle = dicColMap.ContainsKey(colName) ? dicColMap[colName] : colName;
if (vis)
{
<th data-field="@colName" data-sortable="true" @Html.Raw(colName == "BSSTATUS_NAME" ? "data-formatter='fmtStatus'" : "") @Html.Raw((item.width > 0 ? "data-width='" + item.width + "'" : ""))>
@colTitle
</th>
}
}
}
<th data-field="ORDNO" data-formatter="operateFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tab-4" class="tab-pane">
<div class="panel-body">
<table id="tableSubmit"
data-idx="2"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-url="@Url.Action("ConfirmListData")"
data-content-type="application/x-www-form-urlencoded"
data-pagination="true"
data-side-pagination="server"
data-total-field="Total"
data-data-field="DataList"
data-page-number="1"
data-page-size="15"
data-query-params="queryParams"
data-method="post">
<thead>
<tr>
<th data-checkbox="true"></th>
@if (cfgData == null)
{
<th data-field="CARRIER" data-sortable="true">船公司</th>
<th data-field="YARD" data-sortable="true">场站</th>
<th data-field="CNTRTOTAL" data-sortable="true">集装箱</th>
<th data-field="PORTLOAD" data-sortable="true">装货港</th>
<th data-field="PORTDISCHARGE" data-sortable="true">卸货港</th>
<th data-field="CONTRACTNO" data-sortable="true">客户合同号</th>
<th data-field="VESSEL" data-sortable="true">船名</th>
<th data-field="VOYNO" data-sortable="true">航次</th>
<th data-field="MBLNO" data-sortable="true">提单号</th>
<th data-field="ETD" data-sortable="true">开船日期</th>
<th data-field="BSSTATUS_NAME" data-formatter="fmtStatus" data-sortable="true">状态</th>
}
else
{
foreach (var item in cfgData)
{
var vis = Convert.ToBoolean(item.visible);
string colName = item.colName.ToString();
string colTitle = dicColMap.ContainsKey(colName) ? dicColMap[colName] : colName;
if (vis)
{
<th data-field="@colName" data-sortable="true" @Html.Raw(colName == "BSSTATUS_NAME" ? "data-formatter='fmtStatus'" : "") @Html.Raw((item.width > 0 ? "data-width='" + item.width + "'" : ""))>
@colTitle
</th>
}
}
}
<th data-field="ORDNO" data-formatter="operateFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
<div id="tab-5" class="tab-pane">
<div class="panel-body">
<table id="tableConfirm"
data-idx="3"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-url="@Url.Action("ConfirmListData")"
data-content-type="application/x-www-form-urlencoded"
data-pagination="true"
data-side-pagination="server"
data-total-field="Total"
data-data-field="DataList"
data-page-number="1"
data-page-size="15"
data-query-params="queryParams"
data-method="post">
<thead>
<tr>
<th data-checkbox="true"></th>
@if (cfgData == null)
{
<th data-field="CARRIER" data-sortable="true">船公司</th>
<th data-field="YARD" data-sortable="true">场站</th>
<th data-field="CNTRTOTAL" data-sortable="true">集装箱</th>
<th data-field="PORTLOAD" data-sortable="true">装货港</th>
<th data-field="PORTDISCHARGE" data-sortable="true">卸货港</th>
<th data-field="CONTRACTNO" data-sortable="true">客户合同号</th>
<th data-field="VESSEL" data-sortable="true">船名</th>
<th data-field="VOYNO" data-sortable="true">航次</th>
<th data-field="MBLNO" data-sortable="true">提单号</th>
<th data-field="ETD" data-sortable="true">开船日期</th>
<th data-field="BSSTATUS_NAME" data-formatter="fmtStatus" data-sortable="true">状态</th>
}
else
{
foreach (var item in cfgData)
{
var vis = Convert.ToBoolean(item.visible);
string colName = item.colName.ToString();
string colTitle = dicColMap.ContainsKey(colName) ? dicColMap[colName] : colName;
if (vis)
{
<th data-field="@colName" data-sortable="true" @Html.Raw(colName == "BSSTATUS_NAME" ? "data-formatter='fmtStatus'" : "") @Html.Raw((item.width > 0 ? "data-width='" + item.width + "'" : ""))>
@colTitle
</th>
}
}
}
<th data-field="ORDNO" data-formatter="operateFormatter">操作</th>
</tr>
</thead>
</table>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@section styles
{
<link type="text/css" rel="stylesheet" href="~/Content/css/orderlist.css" />
}
@section scripts{
<script src="~/Content/hplus/js/plugins/validate/jquery.validate.min.js"></script>
<script src="~/Content/hplus/js/plugins/suggest/bootstrap-suggest.min.js"></script>
<script src="~/Content/js/validatorConfig.js"></script>
<script src="~/Content/js/jquery.form.js"></script>
<script src="~/Content/hplus/js/contabs.min.js"></script>
<script>
$(function () {
$("#btn-reset").click(function () {
$(".form-horizontal input").val('');
});
$('#tableAll').bootstrapTable({ height: $(window).height() - 150 });
$('#tableCreate').bootstrapTable({ height: $(window).height() - 150 });
$('#tableSubmit').bootstrapTable({ height: $(window).height() - 150 });
$('#tableConfirm').bootstrapTable({ height: $(window).height() - 150 });
$("#btnSearch").click(function () {
var idx = $("#ulNavHead li.active").data("idx");
if (idx == "0") {
$('#tableAll').bootstrapTable('refresh')
} else if (idx == "1") {
$('#tableCreate').bootstrapTable('refresh')
} else if (idx == "2") {
$('#tableSubmit').bootstrapTable('refresh')
} else if (idx == "3") {
$('#tableConfirm').bootstrapTable('refresh')
}
})
$('#ETD_START,#ETD_END').datepicker({
autoclose: true,
format: "yyyy-mm-dd"
});
@*$("#btnCopy").click(function () {
var sel = $('#table').bootstrapTable('getSelections')
if (sel.length != 1) {
layer.alert('@Resources.LangOrder.MsgChooseOneToCopy');
return;
}
parent.addMenuTab("@Url.Action("Copy")?srcORDNO=" + sel[0].ORDNO, '@Resources.LangOrder.BtnCopy', 0)
})*@
$("#btnSetCol").click(function () {
layerIndex = layer.open({
type: 2,
title: '设置列',
area: ['800px', '700px'],
content: '@Url.Action("ColumnConfig")?module=@ConfigData.ModuleConfirm&cate=@ConfigData.CateListColumn'
});
})
});
function queryParams(params) {
var cond = $("#formCond").serializeObject();
params.MBLNO = cond.MBLNO;
params.ETD_START = cond.ETD_START;
params.ETD_END = cond.ETD_END;
params.PORTDISCHARGE = cond.PORTDISCHARGE;
params.VESSEL = cond.VESSEL;
params.VOYNO = cond.VOYNO;
var idx = this.idx
if (idx == "1") {
params.BSSTATUS = "Create";
} else if (idx == "2") {
params.BSSTATUS = "Submit";
} else if (idx == "3") {
params.BSSTATUS = "Confirm";
}
return params
}
function operateFormatter(value, row, index) {
if (row.BSSTATUS == "@OrderConfirmStatus.Create" || row.BSSTATUS == "@OrderConfirmStatus.Reject") {
return [
'<a class="audit tabs" data-url="@Url.Action("ConfirmEdit")?sino=' + row.SINO + '" data-title="' + row.MBLNO+'@Resources.LangAll.LinkTitleConfirm">',
'<i class="fa fa-edit"></i>@Resources.LangAll.BtnEdit',
'</a>'
].join('');
}
else
{
return [
'<a class="audit tabs" data-url="@Url.Action("ConfirmEdit")?sino=' + row.SINO + '" data-title="' + row.MBLNO+'@Resources.LangAll.LinkTitleConfirm">',
'<i class="fa fa-eye"></i>@Resources.LangAll.BtnView',
'</a>'
].join('');
}
return '';
}
function fmtStatus(value, row, index) {
if (row.BSSTATUS == '@OrderConfirmStatus.Create'||row.BSSTATUS == '@OrderConfirmStatus.Reject') {
return '<div class="nosubmit">' + row.BSSTATUS_NAME + '</div>'
}
else if (row.BSSTATUS == '@OrderConfirmStatus.Submit') {
return '<div class="yessubmit">' + row.BSSTATUS_NAME + '</div>'
}
else if (row.BSSTATUS == '@OrderConfirmStatus.Confirm') {
return '<div class="order-yes">' + row.BSSTATUS_NAME + '</div>'
}
else {
return row.BSSTATUS_NAME
}
}
function queryParamsOrder(params) {
var cond = $("#formCond").serializeObject();
params.MBLNO = cond.MBLNO;
params.ETD_START = cond.ETD_START;
params.ETD_END = cond.ETD_END;
params.PORTDISCHARGE = cond.PORTDISCHARGE;
params.VESSEL = cond.VESSEL;
params.VOYNO = cond.VOYNO;
params.SISTATUS = cond.SISTATUS;
params.BSSTATUS = "Confirm";
return params
}
function operateFormatterOrder(value, row, index) {
var titleNO = row.MBLNO;
if (titleNO == null || titleNO.length == 0) {
titleNO = row.ORDERNO;
}
if (row.BSSTATUS == "@OrderStatus.Create") {
return [
'<a class="audit tabs" data-url="@Url.Action("Order")?ordno=' + row.ORDNO + '" data-title="' + titleNO + '@Resources.LangAll.LinkTitleOrder">',
'<i class="fa fa-edit"></i>@Resources.LangAll.BtnEdit',
'</a>'
].join('');
} else if (row.BSSTATUS == "@OrderStatus.Submit") {
return [
'<a class="audit tabs" data-url="@Url.Action("Order")?ordno=' + row.ORDNO + '" data-title="' + titleNO + '@Resources.LangAll.LinkTitleOrder">',
'<i class="fa fa-eye"></i>@Resources.LangAll.BtnView',
'</a>'
].join('');
}
else if (row.BSSTATUS == "@OrderStatus.Confirm") {
return [
'<a class="audit tabs" data-url="@Url.Action("Confirm")?ordno=' + row.ORDNO + '" data-title="' + titleNO + '@Resources.LangAll.LinkTitleConfirm">',
'<i class="fa fa-edit"></i>@Resources.LangOrder.BtnConfirm',
'</a><br/>',
'<a class="audit tabs" data-url="@Url.Action("Order")?ordno=' + row.ORDNO + '" data-title="' + titleNO + '@Resources.LangAll.LinkTitleOrder">',
'<i class="fa fa-eye"></i>@Resources.LangAll.BtnView',
'</a>'
].join('');
} else {
return [
'<a class="audit tabs" data-url="@Url.Action("Order")?ordno=' + row.ORDNO + '" data-title="' + titleNO + '@Resources.LangAll.LinkTitleOrder">',
'<i class="fa fa-eye"></i>@Resources.LangAll.BtnView',
'</a>'
].join('');
}
return '';
}
function fmtStatusOrder(value, row, index) {
if (row.BSSTATUS == '@OrderStatus.Create') {
return '<div class="nosubmit">' + row.BSSTATUS_NAME + '</div>'
}
else if (row.BSSTATUS == '@OrderStatus.Submit') {
return '<div class="yessubmit">' + row.BSSTATUS_NAME + '</div>'
}
else if (row.BSSTATUS == '@OrderStatus.Confirm') {
return '<div class="order-yes">' + row.BSSTATUS_NAME + '</div>'
}
else {
return '<div class="order-yes">' + row.BSSTATUS_NAME + '</div>'
}
}
</script>
}