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.

227 lines
9.4 KiB
Plaintext

@using BookingJieFeng.DB.Model
@{
var cfgData = ViewBag.ColumnConfigData;
var dicColMap = ViewBag.ColDic as Dictionary<string, string>;
}
<style type="text/css">
.table tbody tr td:first-child {
padding-left: 29px !important;
}
.table tbody tr td a.audit:last-child {
float: none;
margin: 0 auto;
}
</style>
<div class="top-navigation">
<div class="row">
<nav class="navbar">
<div class="navbar-collapse navbar-bottom collapse">
<ul class="nav navbar-nav orderlist-nav">
<li><a class="tabs" data-url="@Url.Action("Shipping")" data-title="新建舱单"><i></i>新建舱单</a><span></span></li>
</ul>
<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="ibox">
<div class="ibox-title">
<h5>舱单台账</h5>
</div>
<div class="ibox-content">
<form class="form-horizontal" id="formCond">
<div class="col-lg-2 col-md-3 form-group">
<input type="text" class="form-control" name="MBLNO" placeholder="主提单号" />
</div>
<div class="col-lg-2 col-md-3 form-group">
<input type="text" class="form-control" name="HBLNO" placeholder="分提单号" />
</div>
<div class="col-lg-2 col-md-3 form-group">
<input type="text" class="form-control date" name="ETD_START" id="ETD_START" placeholder="起始时间" />
</div>
<div class="col-lg-2 col-md-3 form-group">
<input type="text" class="form-control date" name="ETD_END" id="ETD_END" placeholder="结束时间" />
</div>
<div class="col-lg-2 col-md-3 form-group">
<input type="text" class="form-control" name="PORTDISCHARGE" placeholder="卸货港" />
</div>
<div class="col-lg-2 col-md-3 col-sm-12 form-group">
<a class="btn btn-resect" id="btn-reset">重置</a>
<a class="btn btn-query" id="btnSearch">搜索</a>
</div>
</form>
<!--状态-->
<div class="col-lg-12 col-md-12 state-tips">
<div class="col-lg-1 col-md-2 tit">状态:</div>
<div class="col-lg-1 col-md-2 nosubmit">
<i></i>创建
</div>
<div class="col-lg-1 col-md-2 yessubmit">
<i></i>提交
</div>
</div>
<!--
创建 class='nosubmit'
提交 class='yessubmit'
-->
<table id="table"
data-toggle="table"
data-show-refresh="false"
data-show-toggle="false"
data-show-columns="false"
data-url="@Url.Action("ShippingList")"
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="queryParams"
data-method="post">
<thead>
<tr>
<th data-checkbox="true"></th>
@if (cfgData == null)
{
<th data-field="MBLNO" data-sortable="true">主提单号</th>
<th data-field="HBLNO" data-sortable="true">分提单号</th>
<th data-field="ETD" data-sortable="true">开船日期</th>
<th data-field="CHUANDAI" data-sortable="true">船代</th>
<th data-field="PORTLOAD" data-sortable="true">装货港</th>
<th data-field="PORTDISCHARGE" data-sortable="true">卸货港</th>
<th data-field="BSSTATUS_NAME" data-formatter="fmtStatus" data-sortable="true">状态</th>
<th data-field="SENDSTATUS" data-sortable="true">发送状态</th>
}
else
{
foreach (var item in cfgData)
{
var vis = Convert.ToBoolean(item.visible);
string colName = item.colName.ToString();
string colTitle = dicColMap[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>
@section styles
{
<link type="text/css" rel="stylesheet" href="~/Content/css/orderlist.css" />
<link type="text/css" rel="stylesheet" href="~/Content/hplus/css/plugins/footable/footable.core.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/hplus/js/plugins/datapicker/bootstrap-datepicker.js"></script>
<script src="~/Content/js/validatorConfig.js"></script>
<script src="~/Content/js/jquery.form.js"></script>
<script src="~/Content/js/common.js"></script>
<script>
$(function () {
$("#btn-reset").click(function () {
$(".form-horizontal input").val('');
});
$('#table').bootstrapTable({ height: $(window).height() - 150 });
$("#btnSearch").click(function () {
$('#table').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.ModuleShipping&cate=@ConfigData.CateListColumn'
});
})
});
function queryParams(params) {
var cond = $("#formCond").serializeObject();
params.MBLNO = cond.MBLNO;
params.HBLNO = cond.HBLNO;
params.ETD_START = cond.ETD_START;
params.ETD_END = cond.ETD_END;
params.PORTDISCHARGE = cond.PORTDISCHARGE;
params.VESSEL = cond.VESSEL;
return params
} ``
function operateFormatter(value, row, index) {
var titleNO = row.MBLNO;
if (titleNO==null || titleNO.length == 0) {
titleNO = row.ORDERNO;
}
if (row.BSSTATUS == "@ShippingStatus.Create") {
return [
'<a class="audit tabs" data-url="@Url.Action("ShippingEdit")?shipid=' + row.SHIPPINGNO + '" data-title="' + titleNO+'舱单">',
'<i class="fa fa-edit"></i>编辑',
'</a>'
].join('');
} else if (row.BSSTATUS == "@ShippingStatus.Submit") {
return [
'<a class="audit tabs" data-url="@Url.Action("ShippingEdit")?shipid=' + row.SHIPPINGNO + '" data-title="' + titleNO+'舱单">',
'<i class="fa fa-eye"></i>查看',
'</a>'
].join('');
}
return '';
}
function fmtStatus(value, row, index) {
if (row.BSSTATUS == '@ShippingStatus.Create') {
return '<div class="nosubmit">' + row.BSSTATUS_NAME + '</div>'
}
else if (row.BSSTATUS == '@ShippingStatus.Submit') {
return '<div class="yessubmit">' + row.BSSTATUS_NAME + '</div>'
}
}
</script>
}