diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index 0c132439..f513ec06 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -2363,10 +2363,17 @@ namespace DSWeb.Common.DB COMPOP = username; } - public void SetCompStatus(string username, string status) + public void SetISOPEN(string _ISOPEN) + { + ISOPEN = _ISOPEN; + } + + public void SetCompStatus(string username, string status,string ISOPEN=null) { SetStatus(username, status); SetComp(username); + + SetISOPEN(ISOPEN); } } @@ -3499,4 +3506,62 @@ namespace DSWeb.Common.DB public string CREATEUSER { get; set; } public DateTime? CREATETIME { get; set; } } + + + [Table("DJY_SYNC_BC")] + public class DJY_SYNC_BC_md + { + [Key] + public string GID { get; set; } + public string BSNO { get; set; } + public string MBLNO { get; set; } + public DateTime? EDI_TIME { get; set; } + public DateTime? VGM_TIME { get; set; } + public string VESSEL { get; set; } + public string VOYNO { get; set; } + public DateTime? ATD { get; set; } + public string CARRIER { get; set; } + public string TRANSNO { get; set; } + + public bool USED { get; set; } + public DateTime CREATETIME { get; set; } + + public DJY_SYNC_BC_md() { } + + public DJY_SYNC_BC_md(string BSNO) + { + GID = Guid.NewGuid().ToString(); + this.BSNO = BSNO; + CREATETIME = DateTime.Now; + USED = false; + } + } + + [Table("sys_log")] + public class sys_log_md + { + [Key] + public string GID { get; set; } + public string NAME { get; set; } + public string LOGTYPE { get; set; } + public DateTime? LOGTIME { get; set; } + public string LOGCONTENT { get; set; } + public string CREATEUSER { get; set; } + + + + public sys_log_md() { } + + public sys_log_md(string NAME,string LOGTYPE,string LOGCONTENT,string createuser="") + { + GID = Guid.NewGuid().ToString(); + this.NAME = NAME; + this.LOGCONTENT= LOGCONTENT; + this.LOGTYPE = LOGTYPE; + this.CREATEUSER= createuser; + LOGTIME = DateTime.Now; + } + } + + } \ No newline at end of file diff --git a/DSWeb.Common/DB/CommonDataContext.cs b/DSWeb.Common/DB/CommonDataContext.cs index 5425cfaf..7a16e4c6 100644 --- a/DSWeb.Common/DB/CommonDataContext.cs +++ b/DSWeb.Common/DB/CommonDataContext.cs @@ -123,6 +123,11 @@ namespace DSWeb.Common.DB public DbSet v_op_blissuelist_Detail { get; set; } public DbSet CodeCustEdi { get; set; } + + public DbSet DJY_SYNC_BC { get; set; } + + public DbSet sys_log { get; set; } + } diff --git a/DSWeb.Common/Helper/EnumHelper.cs b/DSWeb.Common/Helper/EnumHelper.cs index ae861f4a..4e2dfdb8 100644 --- a/DSWeb.Common/Helper/EnumHelper.cs +++ b/DSWeb.Common/Helper/EnumHelper.cs @@ -2,8 +2,10 @@ using System; using System.Collections.Generic; using System.ComponentModel; +using System.Data.Entity.Migrations; using System.Linq; using System.Text; +using System.Threading; using System.Threading.Tasks; namespace DSWeb.Common.Helper @@ -83,4 +85,134 @@ namespace DSWeb.Common.Helper return feeShou; } } + + public static class LogHelper { + + public static void SaveLog(string NAME, string LOGTYPE, string LOGCONTENT, string createuser = "") + { + var sys_log = new sys_log_md(NAME, LOGTYPE, LOGCONTENT, createuser); + var cdc = new CommonDataContext(); + cdc.sys_log.AddOrUpdate(sys_log); + cdc.SaveChanges(); + } + } + + public static class DJY_SYNC_BC_Helper + { + private static List WorkingBSNOList = new List(); + + private static bool addworking(string BSNO) { + if (WorkingBSNOList.Exists(x => x == BSNO)) + { + return false; + } + else { + return true; + } + } + + private static void delworking(string BSNO) + { + if (WorkingBSNOList.Exists(x => x == BSNO)) + { + WorkingBSNOList.RemoveAll(x => x == BSNO); + } + } + + public static void Add(DJY_SYNC_BC_md addrec) + { + var cando = addworking(addrec.BSNO); + if (!cando) { + Thread.Sleep(500); + Add(addrec); + } + + try + { + + var cdc = new CommonDataContext(); + + var currlist = cdc.DJY_SYNC_BC.Where(x => x.BSNO == addrec.BSNO).ToList(); + + if (currlist == null || currlist.Count == 0) + { + cdc.DJY_SYNC_BC.Add(addrec); + cdc.SaveChanges(); + } + else + { + if (currlist.Exists(x => x.USED == false)) + { + var updrec = currlist.First(x => x.USED == false); + updrec.MBLNO = addrec.MBLNO; + updrec.EDI_TIME = addrec.EDI_TIME; + updrec.VGM_TIME = addrec.VGM_TIME; + updrec.VESSEL = addrec.VESSEL; + updrec.VOYNO = addrec.VOYNO; + updrec.ATD = addrec.ATD; + updrec.CARRIER = addrec.CARRIER; + updrec.TRANSNO = addrec.TRANSNO; + //updrec.MBLNO = addrec.MBLNO; + updrec.CREATETIME = addrec.CREATETIME; + + cdc.DJY_SYNC_BC.AddOrUpdate(updrec); + cdc.SaveChanges(); + } + else { + cdc.DJY_SYNC_BC.Add(addrec); + cdc.SaveChanges(); + } + } + } + catch(Exception ex) + { + LogHelper.SaveLog("接收大简云订舱同步信息", "错误", ex.Message, "DS7"); + + } + finally { + delworking(addrec.BSNO); + } + } + + public static void UseRecord(DJY_SYNC_BC_md usedRec) + { + var cando = addworking(usedRec.BSNO); + if (!cando) + { + Thread.Sleep(500); + UseRecord(usedRec); + } + + try + { + + var cdc = new CommonDataContext(); + + var currlist = cdc.DJY_SYNC_BC.Where(x => x.GID == usedRec.GID).ToList(); + + if (currlist == null || currlist.Count == 0) + { + LogHelper.SaveLog("BC同步操作", "错误", $"未找到GID{usedRec.GID}"); + return; + } + else + { + + var updrec = currlist.First(x => x.USED == false); + updrec.USED = true; + cdc.DJY_SYNC_BC.AddOrUpdate(updrec); + cdc.SaveChanges(); + } + } + catch (Exception ex) + { + LogHelper.SaveLog("BC同步操作", "错误", ex.Message, "DS7"); + + } + finally + { + delworking(usedRec.BSNO); + } + } + } } diff --git a/DSWeb/Areas/Account/Controllers/Chfee_ForeignsettlementController.cs b/DSWeb/Areas/Account/Controllers/Chfee_ForeignsettlementController.cs index 2854b4cc..e9530669 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_ForeignsettlementController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_ForeignsettlementController.cs @@ -25,6 +25,7 @@ using DSWeb.Common.DB; using DSWeb.MvcShipping.DAL.MsInfoClient; using Microsoft.Practices.EnterpriseLibrary.Data; using System.Web.UI.WebControls; +using DSWeb.Areas.Account.Models.Chfee_do; //20150906 复制自Chfee_settlement //为了应对进口贸易的外币付费申请的购汇结算 @@ -517,6 +518,14 @@ namespace DSWeb.Areas.Account.Controllers public ContentResult DeleteRecv(string data, int settlemode) { var headData = JsonConvert.Deserialize(data); + + + var cdc = new CommonDataContext(); + //var paybody = new List(); + var feedolist = cdc.ch_fee_do.Where(x => x.BILLNO == headData.BILLNO).ToList(); + var username = Convert.ToString(Session["SHOWNAME"]); + + DBResult result; if (settlemode == 1) { @@ -526,26 +535,26 @@ namespace DSWeb.Areas.Account.Controllers var PAYBILLNOListStr ="'"+ string.Join("','", PAYBILLNOList)+ "'"; - var paybody = new List(); + //Database db = DatabaseFactory.CreateDatabase(); + //using (var conn = db.CreateConnection()) + //{ + // conn.Open(); + // var tran = conn.BeginTransaction(); - Database db = DatabaseFactory.CreateDatabase(); - using (var conn = db.CreateConnection()) - { - conn.Open(); - var tran = conn.BeginTransaction(); - - paybody= ChsettlementDAL.GetPayBodyList(" p.BILLNO='" + headData.BILLNO + "' and p.PAYBILLNO in (" + PAYBILLNOListStr + ")",db,tran); + //paybody= ChsettlementDAL.GetPayBodyList(" p.BILLNO='" + headData.BILLNO + "' and p.PAYBILLNO in (" + PAYBILLNOListStr + ")",db,tran); //var username = Convert.ToString(Session["SHOWNAME"]); //InfoClientLimitHelper.处理结算单更改欠款额度_删除结算明细(headData.BILLNO, paybody, username); - } - + + //var feeidlist = paybody.Select(s => s.FEEID).ToList(); + + //} result = ChsettlementDAL.DelRecvAppStl(dataList, headData.BILLNO); if (result.Success) { - var username = Convert.ToString(Session["SHOWNAME"]); - InfoClientLimitHelper.处理结算单更改欠款额度_删除结算明细(headData.BILLNO, paybody, username); + + InfoClientLimitHelper.处理结算单更改欠款额度("取消结算", feedolist, username); } } @@ -556,13 +565,20 @@ namespace DSWeb.Areas.Account.Controllers //InfoClientLimitHelper.处理结算单更改欠款额度_删除结算明细(headData.BILLNO, feedolist, username); result = ChsettlementDAL.DelRecvInvAppStl(dataList, headData.BILLNO); - - + if (result.Success) + { + InfoClientLimitHelper.处理结算单更改欠款额度("取消结算", feedolist, username); + } } else { var dataList = ChsettlementDAL.GetBodyList("BILLNO='" + headData.BILLNO + "'"); result = ChsettlementDAL.DelFeeDo(dataList); + + if (result.Success) + { + InfoClientLimitHelper.处理结算单更改欠款额度("取消结算", feedolist, username); + } } if (result.Success == true) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs b/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs index 37796e25..cde0d80b 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs @@ -733,6 +733,10 @@ namespace DSWeb.Areas.Account.Controllers if (result.Success == true) { var username = Convert.ToString(Session["SHOWNAME"]); + var cdc = new CommonDataContext(); + var feedolist = cdc.ch_fee_do.Where(x => x.BILLNO == headData.BILLNO).ToList(); + + if (settlemode == 1) { var dataList = ChsettlementDAL.GetRecvDetailList(headData.BILLNO); @@ -741,26 +745,25 @@ namespace DSWeb.Areas.Account.Controllers //var PAYBILLNOListStr = $"'{string.Join("','", PAYBILLNOList)}'"; //var paybody = ChsettlementDAL.GetPayBodyList(" p.BILLNO='" + headData.BILLNO + "' and p.PAYBILLNO in (" + PAYBILLNOListStr + ")", db, tran); - var paybody = new List(); - Database db = DatabaseFactory.CreateDatabase(); - using (var conn = db.CreateConnection()) - { - conn.Open(); - var tran = conn.BeginTransaction(); + //var paybody = new List(); + //Database db = DatabaseFactory.CreateDatabase(); + //using (var conn = db.CreateConnection()) + //{ + // conn.Open(); + // var tran = conn.BeginTransaction(); - paybody = ChsettlementDAL.GetPayBodyList(" p.BILLNO='" + headData.BILLNO + "' ", db, tran); + // paybody = ChsettlementDAL.GetPayBodyList(" p.BILLNO='" + headData.BILLNO + "' ", db, tran); - //var username = Convert.ToString(Session["SHOWNAME"]); - //InfoClientLimitHelper.处理结算单更改欠款额度_删除结算明细(billno, paybody, username); - } + // //var username = Convert.ToString(Session["SHOWNAME"]); + // //InfoClientLimitHelper.处理结算单更改欠款额度_删除结算明细(billno, paybody, username); + //} result = ChsettlementDAL.DelRecvAppStl(dataList, headData.BILLNO); - if (result.Success) { - InfoClientLimitHelper.处理结算单更改欠款额度_删除结算明细(headData.BILLNO, paybody, username); + InfoClientLimitHelper.处理结算单更改欠款额度("取消结算", feedolist, username); } } @@ -770,6 +773,10 @@ namespace DSWeb.Areas.Account.Controllers //InfoClientLimitHelper.处理结算单更改欠款额度(headData.BILLNO, 1, username,1); result = ChsettlementDAL.DelRecvInvAppStl(dataList, headData.BILLNO); + if (result.Success) + { + InfoClientLimitHelper.处理结算单更改欠款额度("取消结算", feedolist, username); + } } else { @@ -779,8 +786,7 @@ namespace DSWeb.Areas.Account.Controllers if (result.Success) { - //InfoClientLimitHelper.处理结算单更改欠款额度(headData.BILLNO, 1, username, 1); - InfoClientLimitHelper.处理结算单更改欠款额度_删除结算明细(headData.BILLNO, dataList, username); + InfoClientLimitHelper.处理结算单更改欠款额度("取消结算", feedolist, username); } } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js index e0a9ffe8..b162a339 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceBLEdit.js @@ -5655,7 +5655,7 @@ Ext.extend(Shipping.MsChInvoiceBLEdit, Ext.Panel, { var sql = ''; var customNo = form.findField('CustomNo').getValue(); - sql = sql + getAndConSql(sql, customNo, " isnull(b.CUSTNO,'')+' '+isnull(b.MBLNO,'')+' '+isnull(b.HBLNO,'')+' '+isnull(b.CUSTOMNO,'')+' '+isnull(b.ORDERNO,'') like '%" + customNo + "%')"); + sql = sql + getAndConSql(sql, customNo, " (isnull(b.CUSTNO,'')+' '+isnull(b.MBLNO,'')+' '+isnull(b.HBLNO,'')+' '+isnull(b.CUSTOMNO,'')+' '+isnull(b.ORDERNO,'')) like '%" + customNo + "%'"); var OPLBNAME = form.findField('OPLBNAME').getValue(); diff --git a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs index 090fac95..184018c7 100644 --- a/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs +++ b/DSWeb/Areas/CommMng/Controllers/BasicDataRefController.cs @@ -2404,7 +2404,7 @@ namespace DSWeb.Areas.CommMng.Controllers var hp = 大简云订舱邮件Helper.GetOpseae(BSNO,USERID, str,out canmake); if (!canmake.Success) { - return result; + return Json(canmake); } diff --git a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs index 21d5058c..b7d7a856 100644 --- a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs @@ -6584,16 +6584,16 @@ namespace DSWeb.Areas.CommMng.DAL { //给一个业务增加一条状态 - public static void AddOpStatus(string username, string bsno, string status) { + public static void AddOpStatus(string username, string bsno, string status, string ISOPEN = null) { var cdc = new Common.DB.CommonDataContext(); var newstatus = new op_status_md(bsno); - newstatus.SetCompStatus(username, status); + newstatus.SetCompStatus(username, status, ISOPEN); cdc.op_status.Add(newstatus); cdc.SaveChangesAsync(); } - public static void MakeOpStatus(string username, string bsno, string status) + public static void MakeOpStatus(string username, string bsno, string status, string ISOPEN = null) { var cdc = new Common.DB.CommonDataContext(); @@ -6601,7 +6601,7 @@ namespace DSWeb.Areas.CommMng.DAL if (oldstatus == null || oldstatus.Count == 0) { - AddOpStatus(username, bsno, status); + AddOpStatus(username, bsno, status, ISOPEN); } } @@ -7466,19 +7466,30 @@ namespace DSWeb.Areas.CommMng.DAL //5、运输方式映射,东胜下单前先要用当票的运输方式与映射表匹配出代码和名称,用匹配结果推送大简云接口。code_service_edi //6、付费方式映射,东胜下单前先要用当票的付费方式与映射表匹配出代码和名称,用匹配结果推送大简云接口。枚举类型81011 enumvaluename(原值) enumvaluename_2(对应值) + var DJYEDIID = "DJY"; + //1 - var 起始港 = result.OpseaeHead.PORTLOADID; - var 起始港映射 = MsOpSeaeEdiPortDAL.GetPortEDICode(result.OpseaeHead.PORTLOADID,"DJYID"); + var 起始港 = result.OpseaeHead.PORTLOAD; + var 起始港映射 = MsOpSeaeEdiPortDAL.GetPortEDICode2(result.OpseaeHead.PORTLOADID, DJYEDIID); result.OpseaeHead.PORTLOADID = 起始港映射; - result.OpseaeHead.PORTLOAD = 起始港映射; + //result.OpseaeHead.PORTLOAD = 起始港映射; if (string.IsNullOrWhiteSpace(起始港映射)) { canmake.SetErrorInfo($"没有设置起始港[{起始港}]的代码对应。"); } //2 - var 目的港 = result.OpseaeHead.PORTDISCHARGEID; - var 目的港映射 = MsOpSeaeEdiPortDAL.GetPortEDICode(result.OpseaeHead.PORTDISCHARGEID, "DJYID"); - result.OpseaeHead.PORTDISCHARGEID = 目的港映射; - result.OpseaeHead.PORTDISCHARGE = 目的港映射; + var 卸货港 = result.OpseaeHead.PORTDISCHARGE; + var 卸货港映射 = MsOpSeaeEdiPortDAL.GetPortEDICode2(result.OpseaeHead.PORTDISCHARGEID, DJYEDIID); + result.OpseaeHead.PORTDISCHARGEID = 卸货港映射; + //result.OpseaeHead.PORTDISCHARGE = 目的港映射; + if (string.IsNullOrWhiteSpace(卸货港映射)) + { + canmake.SetErrorInfo($"没有设置卸货港[{卸货港}]的代码对应。"); + } + + var 目的港 = result.OpseaeHead.DESTINATION; + var 目的港映射 = MsOpSeaeEdiPortDAL.GetPortEDICode2(result.OpseaeHead.DESTINATIONID, DJYEDIID); + result.OpseaeHead.DESTINATIONID = 目的港映射; + //result.OpseaeHead.PORTDISCHARGE = 目的港映射; if (string.IsNullOrWhiteSpace(目的港映射)) { canmake.SetErrorInfo($"没有设置目的港[{目的港}]的代码对应。"); @@ -7487,7 +7498,7 @@ namespace DSWeb.Areas.CommMng.DAL foreach (var ctn in result.CtnList) { - var 箱型映射 = MsOpSeaeEdiPortDAL.GetCtnEDICode(ctn.CTNALL, "DJYID"); + var 箱型映射 = MsOpSeaeEdiPortDAL.GetCtnEDICode(ctn.CTNALL, DJYEDIID); if (string.IsNullOrWhiteSpace(箱型映射)) { canmake.SetErrorInfo($"没有设置箱型[{ctn.CTNALL}]的代码对应。"); @@ -7499,14 +7510,14 @@ namespace DSWeb.Areas.CommMng.DAL ctn.CTNALL = 箱型映射; } //4 - var 船司映射 = MsOpSeaeEdiPortDAL.GetCustEDICode(result.OpseaeHead.CARRIER, "DJYID"); + var 船司映射 = MsOpSeaeEdiPortDAL.GetCustEDICode2(result.OpseaeHead.CARRIER, DJYEDIID); if (string.IsNullOrWhiteSpace(船司映射)) { canmake.SetErrorInfo($"没有设置船司[{result.OpseaeHead.CARRIER}]的代码对应。"); } result.OpseaeHead.CARRIER = 船司映射; //5 - var 运输方式映射 = MsOpSeaeEdiPortDAL.GetSERVICEEDICode(result.OpseaeHead.SERVICE, "DJYID"); + var 运输方式映射 = MsOpSeaeEdiPortDAL.GetSERVICEEDICode2(result.OpseaeHead.SERVICE, DJYEDIID); if (string.IsNullOrWhiteSpace(运输方式映射)) { canmake.SetErrorInfo($"没有设置运输方式[{result.OpseaeHead.SERVICE}]的代码对应。"); @@ -7567,13 +7578,18 @@ namespace DSWeb.Areas.CommMng.DAL { "CONSIGNEE", OpseaeHead.CONSIGNEE }, { "NOTIFYPARTY", OpseaeHead.NOTIFYPARTY }, //{ "NOTIFYPARTY2", OpseaeHead.NOTIFYPARTY2 }, - { "PORTLOADID", OpseaeHead.PORTLOADID }, + { "PORTLOADCODE", OpseaeHead.PORTLOADID }, { "PORTLOAD", OpseaeHead.PORTLOAD }, - { "PORTDISCHARGEID", OpseaeHead.PORTDISCHARGEID }, + { "PORTDISCHARGECODE", OpseaeHead.PORTDISCHARGEID }, { "PORTDISCHARGE", OpseaeHead.PORTDISCHARGE }, - { "SERVICE", OpseaeHead.SERVICE }, - { "BLFRT", OpseaeHead.BLFRT }, + { "SERVICECODE", OpseaeHead.SERVICE }, + //{ "BLFRT", OpseaeHead.BLFRT }, + { "FRTCODE", OpseaeHead.BLFRT }, { "HSCODE", OpseaeHead.HSCODE }, + { "DESTINATIONCODE", OpseaeHead.DESTINATIONID }, + { "DESTINATIONID", OpseaeHead.DESTINATIONID }, + { "DESTINATION", OpseaeHead.DESTINATION }, + { "DESCRIPTION", OpseaeHead.DESCRIPTION }, { "PKGS", OpseaeHead.PKGS }, { "KINDPKGS", OpseaeHead.KINDPKGS }, @@ -7601,13 +7617,12 @@ namespace DSWeb.Areas.CommMng.DAL //{ "CONSIGNEE", OpseaeHead.CtrnHeight }, { "SaleCode", OpseaeHead.SALE }, { "CZRemark", OpseaeHead.OPERATORFAX },//操作备注 - { "DESTINATIONID", OpseaeHead.DESTINATIONID }, - { "DESTINATION", OpseaeHead.DESTINATION }, + { "SOREMARK", 订舱要求 }, { "BOOKINGACCOUNT", 第三方账号 }, { "BOOKINGPASSWORD", 第三方密码 }, - - + { "LANECODE", OpseaeHead.LANE }//航线 + }; @@ -7632,8 +7647,8 @@ namespace DSWeb.Areas.CommMng.DAL var keyhead = $"input.CtnList[{_count}]."; - result.Add($"{keyhead}CTNCODE", ctn.CTNCODE); - result.Add($"{keyhead}CTNALL", ctn.CTNALL); + result.Add($"{keyhead}CTNCODE", ctn.CTNALL); + //result.Add($"{keyhead}CTNALL", ctn.CTNALL); result.Add($"{keyhead}CTNNUM", ctn.CTNNUM.ToString()); result.Add($"{keyhead}KGS", ctn.KGS.ToString()); result.Add($"{keyhead}REMARK", ctn.REMARK); diff --git a/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs b/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs index b9d35336..fbdb260c 100644 --- a/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/PubSysDAL.cs @@ -11,14 +11,17 @@ using System.Text.RegularExpressions; using System.Threading.Tasks; using System.Web; using DSWeb.Areas.CommMng.Models; +using DSWeb.Areas.MvcShipping.DB; using DSWeb.Areas.MvcShipping.Models.Message.VGM; using DSWeb.Common.DB; +using DSWeb.Common.Helper; using DSWeb.Dispatch.DAL; using DSWeb.EntityDA; using DSWeb.MvcShipping.Models.MsOpSeae; using DSWeb.TruckMng.Comm.Cookie; using HcUtility.Comm; +using java.nio.file; using Microsoft.Practices.EnterpriseLibrary.Data; using Newtonsoft.Json; using Newtonsoft.Json.Linq; @@ -27,12 +30,12 @@ namespace DSWeb.Areas.CommMng.DAL { public class PubSysDAL { - public static List GetEnumValueList(decimal enumTypeId) + public static List GetEnumValueList(decimal enumTypeId) { return GetEnumValueList(enumTypeId, String.Empty); } - public static List GetEnumValueList(decimal enumTypeId, string sCondition) + public static List GetEnumValueList(decimal enumTypeId, string sCondition) { var strSql = new StringBuilder(); strSql.Append("Select LangId,EnumTypeId,EnumValueId,EnumValueName,EnumValueName_2,IsDefault,DispIndex,VerNo "); @@ -45,12 +48,12 @@ namespace DSWeb.Areas.CommMng.DAL strSql.Append(" order by EnumTypeID,dispindex,EnumValueID"); Database db = DatabaseFactory.CreateDatabase(); - var evList = new List(); + var evList = new List(); using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) { while (reader.Read()) { - var evData = new SysEnumValue(); + var evData = new Models.SysEnumValue(); evData.LangId = Convert.ToDecimal(reader["LangId"]); evData.EnumTypeId = Convert.ToDecimal(reader["EnumTypeId"]); evData.EnumValueId = Convert.ToString(reader["EnumValueId"]); @@ -65,7 +68,7 @@ namespace DSWeb.Areas.CommMng.DAL reader.Close(); } - var evDatanew = new SysEnumValue(); + var evDatanew = new Models.SysEnumValue(); evDatanew.LangId =100; evDatanew.EnumTypeId =100; evDatanew.EnumValueId =""; @@ -361,7 +364,7 @@ namespace DSWeb.Areas.CommMng.DAL var currentBill = DSWeb.MvcShipping.DAL.MsOpSeaeDAL.MsOpSeaeDAL.GetData($" (B.DJYID={head.Id} or B.BSNO='{head.bsno}')", OPUser.USERID); - if (currentBill != null && !string.IsNullOrWhiteSpace( currentBill.BSNO) ) + if (currentBill != null && !string.IsNullOrWhiteSpace( currentBill.BSNO) && currentBill.BSNO== head.bsno) { //更新业务 var updrec = currentBill; @@ -399,20 +402,58 @@ namespace DSWeb.Areas.CommMng.DAL } else { + BasicDataRefDAL.SaveLog(itemstr, "", "接收大简云订舱", "未找到BSNO"); //新增业务 - var ctnlist = head.GetCtnList("*"); + //var ctnlist = head.GetCtnList("*"); + + //newhead.BSNO = "topseae" + Guid.NewGuid().ToString(); + + //var _r = DSWeb.MvcShipping.DAL.MsOpSeaeDAL.MsOpSeaeDAL.DoSave( + // "add", + // newhead, + // ctnlist, + // OPUser.USERID, + // OPUser.SHOWNAME, + // OPUser.COMPANYID, + // OPUser.companyname); + WorkingDone(head.Id); + return; + } - newhead.BSNO = "topseae" + Guid.NewGuid().ToString(); + //20240403 保存完成后 保存附件信息 + //根据url判断是否重复 - var _r = DSWeb.MvcShipping.DAL.MsOpSeaeDAL.MsOpSeaeDAL.DoSave( - "add", - newhead, - ctnlist, - OPUser.USERID, - OPUser.SHOWNAME, - OPUser.COMPANYID, - OPUser.companyname); + var 附件List = cdc.Receipt_Doc.Where(x => x.BSNO == newhead.BSNO).ToList(); + + var newlist = new List(); + + foreach (var file in head.Files) { + if (!附件List.Exists(x => x.Driect_URL == file.FilePath)) + { + var newrec = new Receipt_Doc_md(newhead.BSNO); + newrec.RECEIPTTYPE = file.FileType; + newrec.URL = file.FileName; + newrec.Driect_URL = file.FilePath; + newrec.MODIFIEDUSER = "1BEC90E1-9780-472F-90C2-0C6390C044A4"; + newrec.MODIFIEDTIME = DateTime.Now; + + //在同一包中也判断地址是否重复 + if (newlist.Exists(x => x.Driect_URL == newrec.Driect_URL)) { + continue; + } + + newlist.Add(newrec); + + cdc.Receipt_Doc.Add(newrec); + cdc.SaveChanges(); + } + else + { + //已有此url的不做任何处理 + } } + + } catch (Exception e) { @@ -778,6 +819,8 @@ namespace DSWeb.Areas.CommMng.DAL public List childrens { get; set; } public List goodsStatus { get; set; } + public DateTime StartDatetime { get; set; } + public List Files { get; set; } class 箱型箱量item { @@ -1335,16 +1378,31 @@ namespace DSWeb.Areas.CommMng.DAL public void SetField(ref MsOpSeae updrec) { if (SyncType == "BC") { - updrec.MBLNO = mblno == null ? "" : mblno; - //updrec.MBLNO = custno == null ? "" : custno; - updrec.EDI_TIME = closedocdate==null?"": ((DateTime)closedocdate).ToString("yyyy-MM-dd HH:mm:ss"); - updrec.VGM_TIME = closevgmdate == null ? "" : ((DateTime)closevgmdate).ToString("yyyy-MM-dd HH:mm:ss"); - updrec.VESSEL = vessel==null?"": vessel; - updrec.VOYNO = voyno == null ? "" : voyno; - updrec.ATD = etd == null ? "" : ((DateTime)etd).ToString("yyyy-MM-dd"); - updrec.CARRIER = carrierid == null ? "" : carrierid; - updrec.TRANSNO = custno == null ? "" : custno; + //updrec.MBLNO = mblno == null ? "" : mblno; + ////updrec.MBLNO = custno == null ? "" : custno; + //updrec.EDI_TIME = closedocdate==null?"": ((DateTime)closedocdate).ToString("yyyy-MM-dd HH:mm:ss"); + //updrec.VGM_TIME = closevgmdate == null ? "" : ((DateTime)closevgmdate).ToString("yyyy-MM-dd HH:mm:ss"); + //updrec.VESSEL = vessel==null?"": vessel; + //updrec.VOYNO = voyno == null ? "" : voyno; + //updrec.ATD = etd == null ? "" : ((DateTime)etd).ToString("yyyy-MM-dd"); + //updrec.CARRIER = carrierid == null ? "" : carrierid; + //updrec.TRANSNO = custno == null ? "" : custno; //updrec.DJYID = Id; + + var saveinfo = new DJY_SYNC_BC_md(updrec.BSNO); + + saveinfo.MBLNO = mblno ; + saveinfo.EDI_TIME = closedocdate ; + saveinfo.VGM_TIME = closevgmdate ; + saveinfo.VESSEL = vessel ; + saveinfo.VOYNO = voyno ; + saveinfo.ATD = etd ; + saveinfo.CARRIER = carrierid ; + saveinfo.TRANSNO = custno ; + + DJY_SYNC_BC_Helper.Add(saveinfo); + + BasicDataRefDAL.OP_STATUSHelper.MakeOpStatus("系统管理员", updrec.BSNO, "已出号","1"); } } public List GetCtnList(string BSNO) @@ -2002,7 +2060,7 @@ namespace DSWeb.Areas.CommMng.DAL } - public DateTime StartDatetime { get; set; } + //public DingCangHead() { // StartDatetime=DateTime.Now; //} @@ -2084,7 +2142,12 @@ namespace DSWeb.Areas.CommMng.DAL public decimal? kingTareweight { get; set; } = 0M; } - + public class DownloadFile + { + public string FileName { get; set; } + public string FileType { get; set; } + public string FilePath { get; set; } + } /// /// 提单信息 diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs index da78f3e2..2e60b211 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs @@ -60,6 +60,7 @@ using DSWeb.Common.DB; using DSWeb.Areas.MvcShipping.Helper; using TruckMngCookie = DSWeb.TruckMng.Comm.Cookie; using DSWeb.SysMng.DAL.SysRoleTaskQuery; +using DSWeb.Common.Helper; //using Discuz.Common; @@ -8581,7 +8582,7 @@ namespace DSWeb.MvcShipping.Controllers var strJson = JsonConvert.Serialize(new { appcode = mycompany.APPCODE,appkey=mycompany.APPKEY, subcom = comp, op = op, custservice = custservice, data = bslist.ToList()}); - string rtn = WebRequestHelper.DoPost(company.DISPATCHURL, strJson); + string rtn = Areas.MvcShipping.Comm.WebRequestHelper.DoPost(company.DISPATCHURL, strJson); var blUpSQL = "insert into op_status(ST_ID,BSNO,STATUS,ISCOMP,COMPTIME,COMPOP,INPUTTIME,STTYPE) values(NEWID(),'" + opseae.BSNO + "','数据同步',1,'" + DateTime.Now.ToString() + "','" + Convert.ToString(Session["SHOWNAME"]) + "','" + DateTime.Now.ToString() + "','2')"; bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); @@ -8711,7 +8712,7 @@ namespace DSWeb.MvcShipping.Controllers var strJson = JsonConvert.Serialize(new { appcode = mycompany.APPCODE, appkey = mycompany.APPKEY,subcom=comp,op = opname, custservice = custservice, data = bsList.ToList() }); - string rtn = WebRequestHelper.DoPost(company.DISPATCHURL, strJson); + string rtn = Areas.MvcShipping.Comm.WebRequestHelper.DoPost(company.DISPATCHURL, strJson); if (bsList != null) { foreach (var headData in bsList) @@ -8846,7 +8847,7 @@ namespace DSWeb.MvcShipping.Controllers var strJson = JsonConvert.Serialize(new { appcode = mycompany.APPCODE, appkey = mycompany.APPKEY, subcom = comp }); - string rtn = WebRequestHelper.DoPost(company.DISPATCHURL.Replace("SubCompOrderDispatch", "SubCompUserDispatch"), strJson); + string rtn = Areas.MvcShipping.Comm.WebRequestHelper.DoPost(company.DISPATCHURL.Replace("SubCompOrderDispatch", "SubCompUserDispatch"), strJson); return new ContentResult() { Content = rtn }; } @@ -13052,7 +13053,7 @@ namespace DSWeb.MvcShipping.Controllers if (DsVgmUrl == "" || DsVgmUrl == null) DsVgmUrl = "http://47.104.73.97:8654/Interface/CustVGM.ashx"; - string rtn = WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000); + string rtn = Areas.MvcShipping.Comm.WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000); if (rtn == "操作太频繁" || rtn == "参数有误" || rtn == "参数有误!" || rtn == "身份验证错误!" || rtn == "箱号格式错误!" || rtn == "箱号重复" || rtn == "封号重复") { var json = JsonConvert.Serialize(new { Success = false, Message = rtn }); @@ -13108,7 +13109,7 @@ namespace DSWeb.MvcShipping.Controllers if (DsVgmUrl == "" || DsVgmUrl == null) DsVgmUrl = "http://myshipping.net:8654/Interface/CustVGM.ashx"; - string rtn = WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000); + string rtn = Areas.MvcShipping.Comm.WebRequestHelper.DoPost(DsVgmUrl, dict, 30 * 1000); if (rtn == "操作太频繁" || rtn == "参数有误" || rtn == "参数有误!" || rtn == "身份验证错误!" || rtn == "箱号格式错误!" || rtn == "箱号重复" || rtn == "封号重复") { var json = JsonConvert.Serialize(new { Success = false, Message = rtn }); @@ -13423,6 +13424,70 @@ namespace DSWeb.MvcShipping.Controllers dict.Add(errorMsg, null); return dict; } + + + public ContentResult GetSyncBCList(string BSNO) + { + if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + + var dataList = MsOpSeaeDAL.GetSyncBCList(BSNO); + int count = dataList.Count(); + var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data = dataList}); + return new ContentResult() { Content = json }; + } + + /// + /// 参数为DJY_SYNC_BC.GID + /// + /// + /// + public ContentResult DoSyncBC(string GID) + { + if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + + var result = new DBResult(); + + try + { + + var cdc = new CommonDataContext(); + + var usedata = cdc.DJY_SYNC_BC.FirstOrDefault(x => x.GID == GID); + + var head = MsOpSeaeDAL.GetData($" B.BSNO='{usedata.BSNO}'", CookieConfig.GetCookie_UserId(Request)); + + head.MBLNO = string.IsNullOrWhiteSpace(usedata.MBLNO) ? head.MBLNO : usedata.MBLNO; + head.EDI_TIME = usedata.EDI_TIME == null ? head.EDI_TIME : ((DateTime)usedata.EDI_TIME).ToString("yyyy-MM-dd HH:mm:ss"); + head.VGM_TIME = usedata.VGM_TIME == null ? head.EDI_TIME : ((DateTime)usedata.VGM_TIME).ToString("yyyy-MM-dd HH:mm:ss"); + head.VESSEL = string.IsNullOrWhiteSpace(usedata.VESSEL) ? head.VESSEL : usedata.VESSEL; + head.VOYNO = string.IsNullOrWhiteSpace(usedata.VOYNO) ? head.VOYNO : usedata.VOYNO; + head.ATD = usedata.ATD == null ? head.EDI_TIME : ((DateTime)usedata.ATD).ToString("yyyy-MM-dd HH:mm:ss"); + head.CARRIER = string.IsNullOrWhiteSpace(usedata.CARRIER) ? head.CARRIER : usedata.CARRIER; + head.TRANSNO = string.IsNullOrWhiteSpace(usedata.TRANSNO) ? head.TRANSNO : usedata.TRANSNO; + + + var modb = new ModelObjectDB(); + result = modb.Save(head); + + DJY_SYNC_BC_Helper.UseRecord(usedata); + } + catch (Exception ex) + { + result.SetErrorInfo(ex.Message); + } + finally { + + } + return BasicDataRefDAL.GetContentResult(result); + } } /// /// 箱货信息类 diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs index 708ab034..39d22bfb 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOp_BLISSUEController.cs @@ -1306,7 +1306,7 @@ namespace DSWeb.MvcShipping.Controllers if (feelist.Exists(x => x.FEETYPE==1 &&( x.FEESTATUS == 1 || x.FEESTATUS == 6 || x.FEESTATUS == 2))) { var _r = new DBResult(); - _r.SetErrorInfo("业务中存在 【录入状态、驳回提交、提交审核】 的费用,不能提交特殊放单申请"); + _r.SetErrorInfo("业务中存在 【录入状态、驳回提交、提交审核】 的费用,不能提交特殊放单申请。请将业务中的应收费用全部提交并审核通过。"); return BasicDataRefDAL.GetContentResult(_r); } @@ -2462,7 +2462,7 @@ namespace DSWeb.MvcShipping.Controllers else { //如果处于财务扣单状态 不允许提交 - var _r = MsOp_BLISSUEDAL.ISKDWithCW(_p.BSNO); + var _r = MsOp_BLISSUEDAL.ISKDWithCW("'"+_p.BSNO+"'"); if (_r.Success == true) { _r.Success = false; return BasicDataRefDAL.GetContentResult(_r); diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsSysThirdPartyAccountController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsSysThirdPartyAccountController.cs index cd703fbe..3df79f87 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsSysThirdPartyAccountController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsSysThirdPartyAccountController.cs @@ -148,7 +148,7 @@ namespace DSWeb.MvcShipping.Controllers var USERID = Convert.ToString(Session["USERID"]); - var condition = $" USERID='{USERID}' and CUSTOMERNAME='{headdata.CARRIER}' "; + var condition = $" USERID='{USERID}' and THIRDPARTY='{THIRDPARTY}' and CUSTOMERNAME='{headdata.CARRIER}' "; var evList = BasicDataRefDAL.GeneralSelect("sys_thidparty_account","ACCOUNT", "ACCOUNT", condition); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs index e64cd699..69859dfa 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsInfoClient/MsInfoClientDAL.cs @@ -3849,13 +3849,15 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient BSNOList = chfeeList.Select(s => s.BSNO).Distinct().ToList(); - foreach (var bsno in BSNOList) + var 所有关联业务 = cdc.v_op_bill.Where(x => BSNOList.Contains(x.BSNO)).Distinct().ToList(); + + foreach (var billitem in 所有关联业务) { - var 业务已特放审批通过 = MsOp_BLISSUEDAL.是否全部特放审核通过(bsno); + var 业务已特放审批通过 = MsOp_BLISSUEDAL.是否全部特放审核通过(billitem.PARENTID); if (!业务已特放审批通过.Success) { - chfeeList.RemoveAll(x => x.BSNO == bsno); + chfeeList.RemoveAll(x => x.BSNO == billitem.BSNO); } } BSNOList = chfeeList.Select(s => s.BSNO).Distinct().ToList(); @@ -3889,13 +3891,15 @@ namespace DSWeb.MvcShipping.DAL.MsInfoClient BSNOList = chfeeList.Select(s => s.BSNO).Distinct().ToList(); - foreach (var bsno in BSNOList) + var 所有关联业务 = cdc.v_op_bill.Where(x => BSNOList.Contains(x.BSNO)).Distinct().ToList(); + + foreach (var billitem in 所有关联业务) { - var 业务已特放审批通过 = MsOp_BLISSUEDAL.是否全部特放审核通过(bsno); + var 业务已特放审批通过 = MsOp_BLISSUEDAL.是否全部特放审核通过(billitem.PARENTID); if (!业务已特放审批通过.Success) { - chfeeList.RemoveAll(x => x.BSNO == bsno); + chfeeList.RemoveAll(x => x.BSNO == billitem.BSNO); } } BSNOList = chfeeList.Select(s => s.BSNO).Distinct().ToList(); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index 62a68c0a..fe270fbf 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -7837,5 +7837,14 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL } + + static public List GetSyncBCList(string BSNO) + { + var cdc = new CommonDataContext(); + + var result = cdc.DJY_SYNC_BC.Where(x => x.BSNO == BSNO && x.USED==false).ToList(); + + return result; + } } } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index 55c3a0bc..5c1af3ed 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -766,6 +766,25 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL return EDICODE; } + static public string GetSERVICEEDICode2(string SERVICE, string EDINAME) + { + string EDICODE = ""; + var strSql = new StringBuilder(); + strSql.Append("select EDICODE from code_service_edi where SERVICE='" + SERVICE + "' AND EDINAME='" + EDINAME + "'"); + Database db = DatabaseFactory.CreateDatabase(); + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) + { + while (reader.Read()) + { + EDICODE = Convert.ToString(reader["EDICODE"]); + } + reader.Close(); + } + if (string.IsNullOrEmpty(EDICODE)) EDICODE = ""; + + return EDICODE; + } + static public string GetPackageEDICode(string Package) { string EDICODE = ""; @@ -806,6 +825,29 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL return EDICODE; } + static public string GetPortEDICode2(string port, string EDINAME = "") + { + string EDICODE = ""; + + var strSql = new StringBuilder(); + if (EDINAME == "") + return port; + else + strSql.Append("select EDICODE from code_disport_edi where PORTID='" + port.Replace("'", "''") + "' AND EDINAME='" + EDINAME + "'"); + Database db = DatabaseFactory.CreateDatabase(); + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) + { + while (reader.Read()) + { + EDICODE = Convert.ToString(reader["EDICODE"]).Trim(); + } + reader.Close(); + } + + return EDICODE; + } + + static public string GetPortEDICodeByEname(string port, string EDINAME = "") { string EDICODE = ""; @@ -938,6 +980,25 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL return EDICODE; } + static public string GetCustEDICode2(string CUST, string EDINAME) + { + string EDICODE = ""; + CUST = CUST.Replace("'", "''"); + var strSql = new StringBuilder(); + strSql.Append("select EDICODE from code_cust_edi where CUST='" + CUST + "' AND EDINAME='" + EDINAME + "'"); + Database db = DatabaseFactory.CreateDatabase(); + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) + { + while (reader.Read()) + { + EDICODE = Convert.ToString(reader["EDICODE"]).Trim(); + } + reader.Close(); + } + + return EDICODE; + } + static public string GetCtnEDICode(string Ctn) { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs index 2daa0ae9..459121c2 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOp_BLISSUE/MsOp_BLISSUEDAL.cs @@ -678,9 +678,9 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE //data.VOYNO = Convert.ToString(reader["VOYNO"]); //data.OP = Convert.ToString(reader["OP"]); - //data.RMBNODR = Convert.ToString(reader["RMBNODR"]); - //data.USDNODR = Convert.ToString(reader["USDNODR"]); - //data.TTLNODR = Convert.ToString(reader["TTLNODR"]); + data.RMBNODR = Convert.ToString(reader["RMBNODR"]); + data.USDNODR = Convert.ToString(reader["USDNODR"]); + data.TTLNODR = Convert.ToString(reader["TTLNODR"]); data.RMBNODR_ALL = Convert.ToString(reader["RMBNODR_ALL"]); data.USDNODR_ALL = Convert.ToString(reader["USDNODR_ALL"]); @@ -912,25 +912,27 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE { var strSql = new StringBuilder(); - strSql.Append(" update OP_BLISSUEList set RMBNODR= "); + strSql.Append(" update OP_BLISSUEList set "); + + strSql.Append(" RMBNODR= "); strSql.Append(" (select sum(RMBDR-STLRMBDR) RMBNODR from v_op_gain_billcustomer "); - strSql.Append(" where BSNO in(select BSNO from OP_BLISSUEList_detail where linkgid='" + GID + "') and CUSTOMERNAME_DR='"+ headdata.CUSTOMERNAME + "' ), "); + strSql.Append(" where BSNO in(select BSNO from OP_BLISSUEList_detail where linkgid='" + GID + "') ), "); strSql.Append(" USDNODR= "); strSql.Append(" (select sum(USDDR-STLUSDDR) USDNODR from v_op_gain_billcustomer "); - strSql.Append(" where BSNO in(select BSNO from OP_BLISSUEList_detail where linkgid='" + GID + "') and CUSTOMERNAME_DR='"+ headdata.CUSTOMERNAME + "' ), "); + strSql.Append(" where BSNO in(select BSNO from OP_BLISSUEList_detail where linkgid='" + GID + "') ), "); strSql.Append(" TTLNODR= "); strSql.Append(" (select sum(TTLDR-STLTTLDR) TTLNODR from v_op_gain_billcustomer "); - strSql.Append(" where BSNO in(select BSNO from OP_BLISSUEList_detail where linkgid='" + GID + "') and CUSTOMERNAME_DR='"+ headdata.CUSTOMERNAME + "' ), "); + strSql.Append(" where BSNO in(select BSNO from OP_BLISSUEList_detail where linkgid='" + GID + "') ), "); strSql.Append(" RMBNODR_ALL= "); strSql.Append(" (select sum(RMBDR-STLRMBDR) RMBNODR_ALL from v_op_gain_billcustomer "); - strSql.Append(" where CUSTOMERNAME_DR='" + headdata.CUSTOMERNAME + "'), "); + strSql.Append(" where CUSTOMERNAME='" + headdata.CUSTOMERNAME + "'), "); strSql.Append(" USDNODR_ALL= "); strSql.Append(" (select sum(USDDR-STLUSDDR) USDNODR_ALL from v_op_gain_billcustomer "); - strSql.Append(" where CUSTOMERNAME_DR='" + headdata.CUSTOMERNAME + "'), "); + strSql.Append(" where CUSTOMERNAME='" + headdata.CUSTOMERNAME + "'), "); strSql.Append(" TTLNODR_ALL= "); strSql.Append(" (select sum(TTLDR-STLTTLDR) TTLNODR_ALL from v_op_gain_billcustomer "); - strSql.Append(" where CUSTOMERNAME_DR='" + headdata.CUSTOMERNAME + "') "); + strSql.Append(" where CUSTOMERNAME='" + headdata.CUSTOMERNAME + "') "); strSql.Append(" where GID='"+GID+"' "); var _count = 0; @@ -4741,6 +4743,7 @@ namespace DSWeb.Areas.MvcShipping.DAL.MsOp_BLISSUE /// 是否财务扣单 /// 由财务扣单的业务 不可以申请特放; /// 如有财务扣单 返回true,如无返回false + /// 注意参数为sql条件形式的bsno字符串,需带单引号 /// /// /// diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs index 365b3d2d..1ac5f058 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpSeae/MsOpSeae.cs @@ -2221,6 +2221,18 @@ namespace DSWeb.MvcShipping.Models.MsOpSeae } } + + //[JsonObject] + //public class MsOpSeae_DJY : MsOpSeae + //{ + // public string CARRIERID { get; set; } + // public string PORTLOADCODE { get; set; } + // public string PORTDISCHARGECODE { get; set; } + // public string DESTINATIONCODE { get; set; } + // public string SERVICECODE { get; set; } + // public string FRTCODE { get; set; } + //} + [JsonObject] public class MsOpSeaeSum : ModelObjectBillHead { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js index 82425b2b..ca85b24b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js @@ -1733,8 +1733,229 @@ ShowPublicINFO = function (title, model, proxyUrl,condition, columns, width = 55 //#endregion +//海运出口业务当中 小窗口 "同步BC信息" +//#region + +Ext.define('DJY_SYNC_BC', { + extend: 'Ext.data.Model', + idProperty: 'GID', + fields: [ + { name: 'GID', type: 'string' }, //GID + { name: 'BSNO', type: 'string' }, // + { name: 'MBLNO', type: 'string' }, + { name: 'EDI_TIME', type: 'string' }, + { name: 'VGM_TIME', type: 'string' }, + { name: 'VESSEL', type: 'string' }, + { name: 'VOYNO', type: 'string' }, + { name: 'ATD', type: 'string' }, + { name: 'CARRIER', type: 'string' }, + { name: 'TRANSNO', type: 'string' }, + { name: 'USED', type: 'string' }, + { name: 'CREATETIME', type: 'string' } + + ] +}); +ShowSyncBcForm = function (BSNO) +{ + + me = this; + + this.storeSyncBC = Ext.create('Ext.data.Store', { + model: 'DJY_SYNC_BC', + remoteSort: true, + proxy: { + type: 'ajax', + url: '/MvcShipping/MsOpSeae/GetSyncBCList', + reader: { + id: 'GID', + root: 'data', + totalProperty: 'totalCount' + } + } + }); + + this.storeSyncBC.load({ + params: { BSNO: BSNO }, + callback: function (options, success, response) { + if (success) { + + //var result = Ext.JSON.decode(response.responseText); + + me.formSyncBC = Ext.widget('form', { + region: 'center', + frame: true, + bodyPadding: 5, + collapsed: false, + collapsible: true, + trackResetOnLoad: true, + fieldDefaults: { + margins: '2 2 2 2', + labelAlign: 'right', + flex: 1, + labelWidth: 70, + msgTarget: 'qtip' + }, + items: [ + { + xtype: 'fieldset', + defaultType: 'textfield', + layout: 'anchor', + readOnly: true, + defaults: { + anchor: '100%' + }, + items: [ + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '主提单号', + name: 'MBLNO' + }, { + fieldLabel: 'CC号', + name: 'TRANSNO' + } + ] + }, + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '截单日期', + name: 'EDI_TIME' + }, + { + fieldLabel: '截VGM日期', + name: 'VGM_TIME' + } + ] + }, + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '船名', + name: 'VESSEL' + }, + { + fieldLabel: '航次', + name: 'VOYNO' + } + ] + }, + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '船公司', + name: 'CARRIER' + }, + { + fieldLabel: '预抵日期', + name: 'ATD' + } + ] + } + ] + } + ] + }); + + if (me.storeSyncBC.getCount() > 0) + { + SyncBcRecord = me.storeSyncBC.getAt(0).data; + + //GID = SyncBcRecord.GID; + + winUserInfoShow = Ext.create('Ext.window.Window', { + title: "引入BC数据", + width: 550, + //height : 120, + //plain : true, + iconCls: "addicon", + resizable: false, + // 是否可以拖动 + // draggable:false, + collapsible: true, // 允许缩放条 + closeAction: 'close', + closable: true, + modal: 'true', + buttonAlign: "center", + bodyStyle: "padding:0 0 0 0", + items: [ + me.formSyncBC + ], + buttons: [ + { + text: "确认同步", + minWidth: 70, + handler: function () { + //执行同步 + Ext.Ajax.request({ + waitMsg: '正在查询数据...', + url: '/MvcShipping/MsOpSeae/DoSyncBC', + async: false, + params: { + GID: SyncBcRecord.GID + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } else { + + MsgTip("提示", "同步完成", 1500); + winUserInfoShow.close(); + + } + + } else { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } + }, + scope: this + }); + } + }, + { + text: "关闭", + minWidth: 70, + handler: function () { + me.winUserInfoShow.close(); + } + } + ] + }); + + me.formSyncBC.getForm().setValues(SyncBcRecord); + winUserInfoShow.show(); + } else { + Ext.MessageBox.alert('提示', "没有找到BC数据"); + } + + + } else { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } + }, + scope: this + }); + + +} + +//#endregion function GetPublicStore(pubstorename) { this.storeResult = Ext.create('DsExt.ux.RefTableStore', { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index 9a34a2ff..9be75505 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -5215,6 +5215,11 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { handler: function (menu, event) { _this.onSendDjyOrderClick(); } + }, { + text: '引入BC数据', + handler: function (menu, event) { + _this.onSyncBCClick(); + } } ] @@ -22045,6 +22050,227 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { } } + , onSyncBCClick() { + var BSNO = this.Editdata.BSNO; + + condition = "BSNO='" + BSNO + "'"; + + Ext.define('DJY_SYNC_BC', { + extend: 'Ext.data.Model', + idProperty: 'GID', + fields: [ + { name: 'GID', type: 'string' }, //GID + { name: 'BSNO', type: 'string' }, // + { name: 'MBLNO', type: 'string' }, + { name: 'EDI_TIME', type: 'string' }, + { name: 'VGM_TIME', type: 'string' }, + { name: 'VESSEL', type: 'string' }, + { name: 'VOYNO', type: 'string' }, + { name: 'ATD', type: 'string' }, + { name: 'CARRIER', type: 'string' }, + { name: 'TRANSNO', type: 'string' }, + { name: 'USED', type: 'string' }, + { name: 'CREATETIME', type: 'string' } + + ] + }); + + me = this; + + this.storeSyncBC = Ext.create('Ext.data.Store', { + model: 'DJY_SYNC_BC', + remoteSort: true, + proxy: { + type: 'ajax', + url: '/MvcShipping/MsOpSeae/GetSyncBCList', + reader: { + id: 'GID', + root: 'data', + totalProperty: 'totalCount' + } + } + }); + + this.storeSyncBC.load({ + params: { BSNO: BSNO }, + callback: function (options, success, response) { + if (success) { + + //var result = Ext.JSON.decode(response.responseText); + + me.formSyncBC = Ext.widget('form', { + region: 'center', + frame: true, + bodyPadding: 5, + collapsed: false, + collapsible: true, + trackResetOnLoad: true, + fieldDefaults: { + margins: '2 2 2 2', + labelAlign: 'right', + flex: 1, + labelWidth: 70, + msgTarget: 'qtip' + }, + items: [ + { + xtype: 'fieldset', + defaultType: 'textfield', + layout: 'anchor', + readOnly: true, + defaults: { + anchor: '100%' + }, + items: [ + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '主提单号', + name: 'MBLNO' + }, { + fieldLabel: 'CC号', + name: 'TRANSNO' + } + ] + }, + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '截单日期', + name: 'EDI_TIME' + }, + { + fieldLabel: '截VGM日期', + name: 'VGM_TIME' + } + ] + }, + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '船名', + name: 'VESSEL' + }, + { + fieldLabel: '航次', + name: 'VOYNO' + } + ] + }, + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + { + fieldLabel: '船公司', + name: 'CARRIER' + }, + { + fieldLabel: '预抵日期', + name: 'ATD' + } + ] + } + ] + } + ] + }); + + if (me.storeSyncBC.getCount() > 0) { + SyncBcRecord = me.storeSyncBC.getAt(0).data; + + //GID = SyncBcRecord.GID; + + winUserInfoShow = Ext.create('Ext.window.Window', { + title: "引入BC数据", + width: 550, + //height : 120, + //plain : true, + iconCls: "addicon", + resizable: false, + // 是否可以拖动 + // draggable:false, + collapsible: true, // 允许缩放条 + closeAction: 'close', + closable: true, + modal: 'true', + buttonAlign: "center", + bodyStyle: "padding:0 0 0 0", + items: [ + me.formSyncBC + ], + buttons: [ + { + text: "确认同步", + minWidth: 70, + handler: function () { + //执行同步 + Ext.Ajax.request({ + waitMsg: '正在查询数据...', + url: '/MvcShipping/MsOpSeae/DoSyncBC', + async: false, + params: { + GID: SyncBcRecord.GID + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } else { + + me.LoadData("edit", condition); + + me.ShowMsgTip("提示","同步完成",2500); + winUserInfoShow.close(); + + } + + } else { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } + }, + scope: this + }); + } + }, + { + text: "关闭", + minWidth: 70, + handler: function () { + me.winUserInfoShow.close(); + } + } + ] + }); + + me.formSyncBC.getForm().setValues(SyncBcRecord); + + winUserInfoShow.show(); + } else { + Ext.MessageBox.alert('提示', "没有找到BC数据"); + } + + + + } else { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } + }, + scope: this + }); + } + , GetLogic() { let _bsno = this.editRecord.get('BSNO'); SetBsnoLogicInfo(_bsno, this.formHead, "大简云订舱邮件", "DJYMAILINFO"); @@ -22479,6 +22705,11 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { }); } + , ShowMsgTip(title,content,delay) { + MsgTip(title, content, delay); + } + + , DoSendDjyOrder: function () { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index 7c98d4cf..ccc1fffc 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -2153,12 +2153,15 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { this.StoreISCANCEL = Ext.create('Ext.data.Store', { fields: ['ID', 'NAME'] }); - this.StoreISCANCEL.add({ "ID": "1", "NAME": "是" }); - this.StoreISCANCEL.add({ "ID": "0", "NAME": "否" }); + + this.StoreISCANCEL.add({ "ID": "0", "NAME": "正常" }); + //this.StoreISCANCEL.add({ "ID": "1", "NAME": "删单" }); + this.StoreISCANCEL.add({ "ID": "3", "NAME": "退舱" }); this.comboxISCANCEL = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '是否退舱', //'是否删单', store: this.StoreISCANCEL, forceSelection: true, - name: 'ISINSPECTION', + name: 'ISCANCEL', valueField: 'ID', displayField: 'NAME' }); @@ -2998,7 +3001,15 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { _this.subordertype = "SEAE"; _this.winSubCompOrder.show(); } - }, { + } + + , { + text: '引入BC数据', + handler: function (menu, event) { + _this.onSyncBCClick(); + } + } + , { text: Zi.LAN.UpOpStatus, //"批量状态更新", handler: function (menu, event) { _this.onUpOpStatusClick(menu, event, 1); @@ -8983,6 +8994,17 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { }, + onSyncBCClick: function (button, event) { + var selections = this.gridList.getSelectionModel().getSelection(); + if (selections.length != 1) { + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: "请选择一个业务", icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + + var rec = selections[0]; + ShowSyncBcForm(rec.data.BSNO); + }, + confirmDelete() { this.formDelete = Ext.widget('form', { @@ -9307,14 +9329,14 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { sql = sql + getAndConSql(sql, CNTRNO, "exists(select 1 from op_ctn where bsno=B.bsno and cntrno like '%" + CNTRNO + "')"); - //var ISCANCEL = form.findField('ISCANCEL').getValue(); - //if (ISCANCEL) { - // if (ISCANCEL == "-1") { - // sql = sql + getAndConSql(sql, ISCANCEL, "B.ISCANCEL = '0'"); - // } else { - // sql = sql + getAndConSql(sql, ISCANCEL, "B.ISCANCEL = '" + ISCANCEL +"'"); - // } - //} + var ISCANCEL = form.findField('ISCANCEL').getValue(); + if (ISCANCEL) { + if (ISCANCEL == "-1") { + sql = sql + getAndConSql(sql, ISCANCEL, "B.ISCANCEL = '0'"); + } else { + sql = sql + getAndConSql(sql, ISCANCEL, "B.ISCANCEL = '" + ISCANCEL +"'"); + } + } // //装货港 // var PORTLOAD = form.findField('PORTLOAD').getValue(); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeModel.js index da6caf22..1a0d34a7 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeModel.js @@ -531,4 +531,6 @@ Ext.define('MsCompanysEntity', { { name: 'DBNAME', type: 'string' }, { name: 'LOGOURL', type: 'string' } ] -}); \ No newline at end of file +}); + + diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js index 2d983ac6..2c74c643 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOp_BLISSUE/MsOp_BLISSUESPEdit.js @@ -149,13 +149,15 @@ Ext.extend(Shipping.MsOp_BLISSUESPEdit, Ext.Panel, { items: [ {//fieldset 1 - xtype: 'fieldset', + xtype: 'container', defaultType: 'textfield', layout: 'anchor', defaults: { anchor: '100%' }, - items: [{ + items: [ + + { xtype: 'container', layout: 'hbox', defaultType: 'textfield', @@ -194,7 +196,9 @@ Ext.extend(Shipping.MsOp_BLISSUESPEdit, Ext.Panel, { name: 'MNGBLSTATUS' }, this.comboxAUDITOPERATOR ] - }, { + } + + , { xtype: 'container', layout: 'hbox', defaultType: 'textfield', @@ -234,7 +238,9 @@ Ext.extend(Shipping.MsOp_BLISSUESPEdit, Ext.Panel, { name: 'SALE', readOnly: true } ] - }, { + } + + , { xtype: 'container', layout: 'hbox', defaultType: 'textfield', @@ -248,57 +254,81 @@ Ext.extend(Shipping.MsOp_BLISSUESPEdit, Ext.Panel, { //}, { // fieldLabel: Zi.LAN.DEPTTTLDR, // name: 'DEPTTTLDR', readOnly: true - //} - ] - }, { - xtype: 'container', - layout: 'hbox', - defaultType: 'textfield', - items: [ + //} + { - fieldLabel: '客户欠费_RMB', - name: 'RMBNODR_ALL', readOnly: true + fieldLabel: '本次特放_RMB欠款', + name: 'RMBNODR', readOnly: true }, { - fieldLabel: '客户欠费_USD', - name: 'USDNODR_ALL', readOnly: true + fieldLabel: '本次特放_USD欠款', + name: 'USDNODR', readOnly: true }, { - fieldLabel: '客户欠费_全部', - name: 'TTLNODR_ALL', readOnly: true + fieldLabel: '本次特放_总欠款', + name: 'TTLNODR', readOnly: true }, { - fieldLabel: '客户总额度(RMB)', - name: 'TOTALLIMIT', readOnly: true + fieldLabel: '委托单位业务欠费_RMB', + name: 'RMBNODR_ALL', readOnly: true }, { - fieldLabel: '客户放单前已用额度', - name: 'CURRENTDEBT', readOnly: true + fieldLabel: '委托单位业务欠费_USD', + name: 'USDNODR_ALL', readOnly: true }, { - fieldLabel: '客户放单前剩余额度', - name: 'REMAINLIMIT', readOnly: true + fieldLabel: '委托单位业务欠费_全部', + name: 'TTLNODR_ALL', readOnly: true } ] - }, { + } + + , { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + + + + { + fieldLabel: '委托单位总额度(RMB)', + flex:1, + name: 'TOTALLIMIT', readOnly: true + }, { + fieldLabel: '委托单位放单前已用额度', + flex: 1, + name: 'CURRENTDEBT', readOnly: true + }, { + fieldLabel: '委托单位放单前剩余额度', + flex: 1, + name: 'REMAINLIMIT', readOnly: true + }, { + xtype: 'datefield', + flex: 1, + //grow: true, + fieldLabel: '承诺付款日期', + format: 'Y-m-d', + //height: 40, + name: 'COMMITREMARK', + anchor: '100%' + }, { + xtype: 'textareafield', + //grow: true, + flex: 2, + fieldLabel: '申请说明', + height: 40, + name: 'REMARK', + anchor: '100%' + } + ] + } + + , { xtype: 'container', layout: 'hbox', defaultType: 'numberfield', items: [ - { - xtype: 'datefield', - //grow: true, - fieldLabel: '承诺付款日期', - format: 'Y-m-d', - //height: 40, - name: 'COMMITREMARK', - anchor: '100%' - }, { - xtype: 'textareafield', - //grow: true, - flex: 3, - fieldLabel: '申请说明', - height: 40, - name: 'REMARK', - anchor: '100%' - } + ] - }, { + } + + , { xtype: 'container', layout: 'hbox', defaultType: 'textfield', @@ -1924,7 +1954,7 @@ Ext.extend(Shipping.MsOp_BLISSUESPEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 185, + height: 180, items: [this.panelBtn, this.formEdit] });