From 6238f59ee8c451dd144ecf46ffe2859c7f9e4d4d Mon Sep 17 00:00:00 2001 From: wet <1034391973@qq.com> Date: Wed, 15 Mar 2023 10:52:38 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=9D=E9=99=A9=E5=A4=8D=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Controllers/HuaiTaiInsuranceController.cs | 33 ++++++++++----- .../Views/HuaiTaiInsurance/Index.aspx | 41 +++++++++++++++++-- .../Views/HuaiTaiInsurance/InsuranceOK.aspx | 11 ++++- 3 files changed, 71 insertions(+), 14 deletions(-) diff --git a/PingTai/DSWeb/Areas/MvcShipping/Controllers/HuaiTaiInsuranceController.cs b/PingTai/DSWeb/Areas/MvcShipping/Controllers/HuaiTaiInsuranceController.cs index d39b9e2..d5fd339 100644 --- a/PingTai/DSWeb/Areas/MvcShipping/Controllers/HuaiTaiInsuranceController.cs +++ b/PingTai/DSWeb/Areas/MvcShipping/Controllers/HuaiTaiInsuranceController.cs @@ -111,7 +111,8 @@ namespace DSWeb.MvcShipping.Controllers return Content(""); } - 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; @@ -201,7 +215,7 @@ namespace DSWeb.MvcShipping.Controllers } else { - + ViewData["changeRate"] = 0.00035; ViewData["state"] = ""; ViewData["WarIns"] = false; @@ -262,7 +276,7 @@ namespace DSWeb.MvcShipping.Controllers ViewData["ChaK"] = context.TsysCountryCodeCheckone.Where(p => p.Nation == chaka).ToList(); ViewData["CDid"] = id; - + } } @@ -271,7 +285,6 @@ namespace DSWeb.MvcShipping.Controllers } - public ActionResult InsuranceEdit(string id = null) { string userid = Convert.ToString(Session["USERID"]); diff --git a/PingTai/DSWeb/Areas/MvcShipping/Views/HuaiTaiInsurance/Index.aspx b/PingTai/DSWeb/Areas/MvcShipping/Views/HuaiTaiInsurance/Index.aspx index 0123d74..ef0c514 100644 --- a/PingTai/DSWeb/Areas/MvcShipping/Views/HuaiTaiInsurance/Index.aspx +++ b/PingTai/DSWeb/Areas/MvcShipping/Views/HuaiTaiInsurance/Index.aspx @@ -28,6 +28,7 @@ 新增 删除 发送 + 复制保单 @@ -122,6 +123,19 @@ + + +