保险复制

master
wet 2 years ago
parent 65fc8d47f7
commit 6238f59ee8

@ -111,7 +111,8 @@ namespace DSWeb.MvcShipping.Controllers
return Content("<script>location.href='/MvcShipping/HuaiTaiInsurance/Error'</script>");
}
public ActionResult InsuranceOK(string id = null, string InsID = null)
public ActionResult InsuranceOK(string id = null, string InsID = null, bool copy = false)
{
string userid = Convert.ToString(Session["USERID"]);
//var str = GetRangDAStr("index", userid, Convert.ToString(Session["SHOWNAME"]), Convert.ToString(Session["COMPANYID"]));
@ -126,6 +127,8 @@ namespace DSWeb.MvcShipping.Controllers
{
var t = context.Insurance.Where(p => p.GID == InsID).FirstOrDefault();
var moneyType = context.CodeInsuranceCurrency.Select(p => p.Code).Distinct().ToList();
ViewData["moneyType"] = moneyType;
ViewData["MBLNO"] = t.BillNumber;//提单号
ViewData["Marks"] = t.Sign;//唛头
@ -142,16 +145,28 @@ namespace DSWeb.MvcShipping.Controllers
ViewData["PORTDISCHARGE"] = t.ToArea;//目的港
ViewData["beibaoren"] = t.BInsuredName;//被保人
ViewData["toubaoren"] = Convert.ToString(Session["COMNAME"]);//投保人
//var snumb = "QDDJY" + DateTime.Now.ToString("yyyyMMddHHmmss") + DateTime.Now.Millisecond;//流水号
//ViewData["liushui"] = snumb;
ViewData["sumAndb"] = t.PackAndQuantity;
var vnumb = context.TSysCountryCode.AsNoTracking().Where(c => c.parameterCode != null && c.parameterCode != "").OrderBy(c => c.CountryCode).Distinct().ToList();
ViewData["country"] = vnumb;
ViewData["StartPort"] = context.CodeLoadport.ToList();
ViewData["EndPort"] = context.CodeDisport.ToList();
//var chaka = CountryCode(context.TSysCountryCode.Where(p => p.CountryCode == t.ToContry).FirstOrDefault().CountryName);
ViewData["ChaK"] = context.TsysCountryCodeCheckone.Where(p => p.Nation == t.ToContry).ToList();
ViewData["CDid"] = id;
if (!copy)
{
ViewData["CDid"] = id;
ViewData["liushui"] = t.SerialNumber;//提单号;
ViewData["MBLNO"] = t.BillNumber;//提单号
}
else
{
var snumb = "QDDJY" + DateTime.Now.ToString("yyyyMMddHHmmss") + DateTime.Now.Millisecond;//流水号
ViewData["liushui"] = snumb;
ViewData["MBLNO"] = "";
}
ViewData["currency"] = GetMoneyName(t.AmtCurrency);
ViewData["letterOf"] = t.CreditNODesc;
ViewData["NewSpecialAgreement"] = t.NewSpecialAgreement;
@ -163,9 +178,8 @@ namespace DSWeb.MvcShipping.Controllers
ViewData["TransportDetail"] = t.TransportDetail;
ViewData["OriginalSum"] = t.OriginalSum;
ViewData["toubaoren"] = t.ApplicantName;
ViewData["liushui"] = t.SerialNumber;
ViewData["Premium"] = t.Premium;
ViewData["CargoType"] = t.CargoType;
ViewData["WarIns"] = t.WarIns.ToString();
ViewData["StrikeIns"] = t.StrikeIns.ToString();
ViewData["changeRate"] = t.ChargeRate;
@ -271,7 +285,6 @@ namespace DSWeb.MvcShipping.Controllers
}
public ActionResult InsuranceEdit(string id = null)
{
string userid = Convert.ToString(Session["USERID"]);

@ -28,6 +28,7 @@
<a class="btn btn-query" id="add"><span class="glyphicon glyphicon-plus"></span>新增</a>
<a class="btn btn-query" id="del"><span class="glyphicon glyphicon-remove"></span>删除</a>
<a class="btn btn-query" id="send"><span class="glyphicon glyphicon-send"></span>发送</a>
<a class="btn btn-query" id="copy"><span class="glyphicon glyphicon-duplicate"></span>复制保单</a>
<a class="btn btn-query" id="edit" style="display:none" ><span class="glyphicon glyphicon-pencil"></span>更新保单</a>
</div>
<a href="/Areas/MvcShipping/Contens/华泰未出险证明.doc" id="loadImTemp" title="下载未出险证明模板" style="float: right"><span class="glyphicon glyphicon-save"></span></a>
@ -122,6 +123,19 @@
</div>
</div>
</div>
<!-- Modal 保单详情-->
<div class="modal fade" id="policycopy" tabindex="-1" role="dialog" aria-labelledby="modalCtrnLabel">
<div class="modal-dialog" role="document" style="width:1200px;">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" id="Suscopy" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
<h4 class="modal-title" id="modalcopy">保单复制</h4>
</div>
<iframe id="detacopy" src="#" style="width: 100%; height: 1045px; border: none"></iframe>
</div>
</div>
</div>
<!-- Modal 保单更新-->
<div class="modal fade" id="editpdate" tabindex="-1" role="dialog" aria-labelledby="modalCtrnLabel">
<div class="modal-dialog" role="document" style="width:1200px;">
@ -348,7 +362,7 @@
autoclose: true,
format: "yyyy-mm-dd"
});
debugger
var flagedit = <%=ViewData["isedit"].ToString() %>;
if (flagedit) {
$("#edit").show();
@ -357,7 +371,7 @@
});
$("#edit").click(function () {
debugger
var check = $("#thisTab").bootstrapTable('getSelections');
if (check.length <= 0) {
$('#editpdate').modal('hide')
@ -504,6 +518,27 @@
location.reload();
})
});
$("#copy").click(function () {
var check = $("#thisTab").bootstrapTable('getSelections');
if (check.length <= 0) {
$('#exampleModal').modal('show')
$("#exampleModal").find('.modal-body').text("请选择一条记录");
return;
}
if (check.length > 1) {
$('#exampleModal').modal('show')
$("#exampleModal").find('.modal-body').text("暂不支持批量复制!");
return;
}
var id = check[0].GID;
$("#detacopy").attr("src", "/MvcShipping/HuaiTaiInsurance/InsuranceOK?id=&InsID=" + id + "&copy=true");
$("#policycopy").modal("show");
});
$("#del").click(function () {
var check = $("#thisTab").bootstrapTable('getSelections');
if (check.length <= 0) {
@ -613,7 +648,7 @@
onDblClickRow: function (row) {
var id = row.GID;
$("#deta").attr("src", "/MvcShipping/HuaiTaiInsurance/InsuranceOK?id=&InsID=" + id + "");
$("#deta").attr("src", "/MvcShipping/HuaiTaiInsurance/InsuranceOK?id=&InsID=" + id + "&copy=false");
$("#policyDetail").modal("show");
},
columns: [

@ -38,7 +38,7 @@
<div class="title">货物信息</div>
<div class="form-group">
<label class="control-label"><span style="color: red">*</span>提单号:</label>
<input type="text" value="<%=ViewData["MBLNO"] %>" name="BillNumber" id="BillNumber" readonly>
<input type="text" value="<%=ViewData["MBLNO"] %>" name="BillNumber" id="BillNumber" >
</div>
<div class="form-group">
<label class="control-label"><span style="color: red">*</span>币种:</label>
@ -395,6 +395,15 @@
<script>
var usd = "";
$(function () {
debugger
var copy = <%=Request.QueryString["copy"]%>;
if (copy) {
$("#InsID").val("");
} else {
$("#BillNumber").prop('readonly', true);
}
$("#AmtCurrency").change();
$("#SubtimS").datepicker({
autoclose: true,

Loading…
Cancel
Save