diff --git a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs index 2b5b5b19..10fd95d2 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_invoice_HangXinController.cs @@ -153,11 +153,13 @@ namespace DSWeb.Areas.Account.Controllers var defaultPAYEE = MsSysParamSetDAL.GetData("PARAMNAME='INVSKR'").PARAMVALUE; var defaultCHECKER = MsSysParamSetDAL.GetData("PARAMNAME='INVFHR'").PARAMVALUE; - + var defaultINVKPR = MsSysParamSetDAL.GetData("PARAMNAME='INVKPR'").PARAMVALUE; if (!string.IsNullOrEmpty(defaultPAYEE)) head.PAYEE = defaultPAYEE; if (!string.IsNullOrEmpty(defaultCHECKER)) head.CHECKER = defaultCHECKER; + if (!string.IsNullOrEmpty(defaultINVKPR)) + head.OPERATORNAME = defaultINVKPR; if (isapp) { diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoice/Chfee_InvoiceDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoice/Chfee_InvoiceDAL.cs index 1922c84f..ec191ad9 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoice/Chfee_InvoiceDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoice/Chfee_InvoiceDAL.cs @@ -4257,6 +4257,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice var fhr = ""; var INVFHR = MsSysParamSetDAL.GetData("PARAMNAME='INVFHR'"); if (INVFHR.PARAMVALUE != "") fhr = INVFHR.PARAMVALUE; + var kpr = ""; + var INVKPR = MsSysParamSetDAL.GetData("PARAMNAME='INVKPR'"); + if (INVKPR.PARAMVALUE != "") kpr = INVKPR.PARAMVALUE; var INVEXPLOCK = MsSysParamSetDAL.GetData("PARAMNAME='INVEXPLOCK'"); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); @@ -4270,6 +4273,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice r.WriteLine(""); foreach (var bill in headList) { + var billkpr = bill.OPERATORNAME; + if (!string.IsNullOrEmpty(kpr)) billkpr = kpr; r.WriteLine(""); r.WriteLine("" + bill.BILLNO + ""); @@ -4278,7 +4283,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice r.WriteLine("" + bill.CUSTBANK + ""); r.WriteLine("" + bill.CUSTADDRTEL + ""); r.WriteLine("" + bill.REMARK + ""); - r.WriteLine("" + bill.OPERATORNAME + ""); + r.WriteLine("" + billkpr + ""); r.WriteLine("" + fhr + ""); r.WriteLine("" + skr + ""); r.WriteLine("12.0"); @@ -4352,6 +4357,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice var fhr = ""; var INVFHR = MsSysParamSetDAL.GetData("PARAMNAME='INVFHR'"); if (INVFHR.PARAMVALUE != "") fhr = INVFHR.PARAMVALUE; + var kpr = ""; + var INVKPR = MsSysParamSetDAL.GetData("PARAMNAME='INVKPR'"); + if (INVKPR.PARAMVALUE != "") kpr = INVKPR.PARAMVALUE; var INVEXPLOCK = MsSysParamSetDAL.GetData("PARAMNAME='INVEXPLOCK'"); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); @@ -4370,6 +4378,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice hjse = hjse+invdetail1.TAX; } hjje = bill.INVAMOUNT - hjse; + var billkpr = bill.OPERATORNAME; + if (!string.IsNullOrEmpty(kpr)) billkpr = kpr; + r.WriteLine(""); r.WriteLine("" + bill.BILLNO + ""); r.WriteLine("0"); @@ -4385,7 +4396,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice r.WriteLine("" + bill.INVOICECUSTNAME + ""); r.WriteLine("" + bill.CUSTADDRTEL + ""); r.WriteLine("" + bill.CUSTBANK + ""); - r.WriteLine("" + bill.OPERATORNAME + ""); + r.WriteLine("" + billkpr + ""); r.WriteLine("" + fhr + ""); r.WriteLine("" + skr + ""); r.WriteLine(""); diff --git a/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs index 387c35bd..8fdec34c 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs @@ -885,6 +885,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement var strSql = new StringBuilder(); + strSql.Append("SELECT * FROM ( "); strSql.Append("SELECT "); strSql.Append("b.BSNO,b.OPLB,b.OPLBNAME,b.BSSTATUS,b.ACCDATE,b.MBLNO,b.HBLNO,b.CUSTNO,b.ORDERNO"); strSql.Append(",b.CUSTOMERNAME"); @@ -922,6 +923,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement strSql.Append(",b.VESSEL,b.VOYNO,b.ETD,b.PORTLOAD"); strSql.Append(",b.PORTDISCHARGE,b.INPUTBY,b.OP,b.CUSTSERVICE,b.OPTYPE"); strSql.Append(",b.DOC,b.SALE,b.ENTERP,b.CUSTOMNO,f.CUSTOMERNAME,B.CORPID"); + strSql.Append(") AS T"); var sortstring = DatasetSort.Getsortstring(sort); @@ -929,12 +931,32 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement if (!string.IsNullOrEmpty(sortstring)) { - sortstring = sortstring.Replace("FEEOBJNAME", "F.CUSTOMERNAME"); + sortstring = sortstring.Replace("FEEOBJNAME", "CUSTNAME"); + sortstring = sortstring.Replace("RMBDrAmount", "RMBDR"); + sortstring = sortstring.Replace("RMBDrBalAmount", "BALRMBDR"); + sortstring = sortstring.Replace("RMBDrDoAmount", "BALRMBDR"); + sortstring = sortstring.Replace("RMBCrAmount", "RMBCR"); + sortstring = sortstring.Replace("RMBCrBalAmount", "BALRMBCR"); + sortstring = sortstring.Replace("RMBCrDoAmount", "BALRMBCR"); + sortstring = sortstring.Replace("USDDrAmount", "USDDR"); + sortstring = sortstring.Replace("USDDrBalAmount", "BALUSDDR"); + sortstring = sortstring.Replace("USDDrDoAmount", "BALUSDDR"); + sortstring = sortstring.Replace("USDCrAmount", "USDCR"); + sortstring = sortstring.Replace("USDCrBalAmount", "BALUSDCR"); + sortstring = sortstring.Replace("USDCrDoAmount", "BALUSDCR"); + sortstring = sortstring.Replace("OTDrAmount", "OTDR"); + sortstring = sortstring.Replace("OTDrBalAmount", "BALOTDR"); + sortstring = sortstring.Replace("OTDrDoAmount", "BALOTDR"); + sortstring = sortstring.Replace("OTCrAmount", "OTCR"); + sortstring = sortstring.Replace("OTCrBalAmount", "BALOTCR"); + sortstring = sortstring.Replace("OTCrDoAmount", "BALOTCR"); + + strSql.Append(" order by " + sortstring); } else { - strSql.Append(" order by b.BsNo"); + strSql.Append(" order by BSNO"); } return SetAddBillData(strSql); diff --git a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs index 9d71fd92..58c8d258 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs @@ -221,7 +221,8 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoiceapplication set { _INVDATE = value; } } - [ModelDB] + + [ModelDB(MDBType = ModelDBOprationType.Insert)] public DateTime? ENTERTIME { get { return _entertime; } diff --git a/DSWeb/Areas/Account/Views/Chfee_invoiceapplication/BLEdit.aspx b/DSWeb/Areas/Account/Views/Chfee_invoiceapplication/BLEdit.aspx index 56112dde..bd75ea34 100644 --- a/DSWeb/Areas/Account/Views/Chfee_invoiceapplication/BLEdit.aspx +++ b/DSWeb/Areas/Account/Views/Chfee_invoiceapplication/BLEdit.aspx @@ -2,7 +2,15 @@ + + diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js index f623c655..27001a3c 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js @@ -6514,7 +6514,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { this.worktype = this.comboxWorkType.getValue(); var form = this.formSearch.getForm(); - var sql = ''; + var sql = " ISCANCEL<>'1' "; /* var sqldata = form.getValues(); sql = Ext.JSON.encode(sqldata); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js index 03313447..08de2bb6 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lock.js @@ -29,6 +29,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { this.MsPeriod = null; Ext.Ajax.timeout = 12000000; this.sqlcontext = '1=1'; + this.billlocktype = locktype; this.storeModuleEnable = Ext.create('Ext.data.Store', { model: 'DsShipping.ux.ModuleModel', @@ -3534,7 +3535,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { ret[2] = this.SelectedRecord; ret[3] = this.SelectedRecord.data.BSNO; ret[4] = "chfee_lock"; - + ret[5] = locktype; return ret; }, @@ -3542,13 +3543,7 @@ Ext.extend(Shipping.MsChfeelock, Ext.Panel, { GridExportExcelPage(this.gridList); }, - OprationSwap: function () { - var ret = new Array(); - ret[0] = this.OprationStatus; - ret[1] = this.storeList; - ret[2] = this.SelectedRecord; - return ret; - }, + onExportClick: function (button, event) { GridExportExcelPage(this.gridList); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lockDetail.js b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lockDetail.js index 5c145d0d..955639fc 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lockDetail.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_lock/Chfee_lockDetail.js @@ -374,6 +374,7 @@ Ext.extend(Shipping.Chfee_lockDetail, Ext.Panel, { this.opStatus = ret[0]; this.StoreList = ret[1]; this.editRecord = ret[2]; + this.locktype = ret[5]; } var btnFeeLock = Ext.getCmp('btnFeeLock'); diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs index c1408679..d4f5158b 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs @@ -719,6 +719,7 @@ namespace DSWeb.MvcShipping.Controllers if (enumValue.FIELDNAME == "VESSELID2N") head.VESSELID2N = oldhead.VESSELID2N; if (enumValue.FIELDNAME == "SALECORPID") head.SALECORPID = oldhead.SALECORPID; if (enumValue.FIELDNAME == "PREPARDATID") head.PREPARDATID= oldhead.PREPARDATID; + if (enumValue.FIELDNAME == "SALEDEPT") head.SALEDEPT = oldhead.SALEDEPT; } if (copybill == "true") diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitMonthController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitMonthController.cs index 106d06f0..991e6116 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitMonthController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsRptOpProfitMonthController.cs @@ -92,7 +92,7 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append("SELECT B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,"); strSql.Append("B.ETD,B.PKGS,B.CBM"); - strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID"); + strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID,B.ORDERNO"); strSql.Append(",case B.CUSTOMDATE when '1900-01-01 00:00:00.000' then '' else CONVERT(varchar(100), B.CUSTOMDATE,23) end as CUSTOMDATE"); strSql.Append(",case B.FEESTATUS when 1 then '锁定' else '未锁定' end as FEESTATUSREF"); strSql.Append(",B.CUSTSERVICE,B.FRCUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE,B.DESTINATION, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.CNTRTOTAL,B.CORPID"); @@ -137,7 +137,7 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append(" GROUP BY B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,"); strSql.Append("B.ETD,B.PKGS,B.CBM,B.NETWEIGHT"); - strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID"); + strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID,B.ORDERNO"); strSql.Append(",B.CUSTOMDATE"); strSql.Append(",B.FEESTATUS"); strSql.Append(",B.CUSTSERVICE,B.FRCUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE,B.DESTINATION, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.NETWEIGHT,B.KGS,B.TEU,B.CNTRTOTAL,B.CORPID"); @@ -150,7 +150,7 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append("SELECT B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,"); strSql.Append("B.ETD,B.PKGS,B.CBM"); - strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID"); + strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID,B.ORDERNO"); strSql.Append(",case B.CUSTOMDATE when '1900-01-01 00:00:00.000' then '' else CONVERT(varchar(100), B.CUSTOMDATE,23) end as CUSTOMDATE"); strSql.Append(",case B.FEESTATUS when 1 then '锁定' else '未锁定' end as FEESTATUSREF"); strSql.Append(",B.CUSTSERVICE,B.FRCUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE,B.DESTINATION, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.CNTRTOTAL,B.CORPID"); @@ -195,7 +195,7 @@ namespace DSWeb.MvcShipping.Controllers strSql.Append(" GROUP BY B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,"); strSql.Append("B.ETD,B.PKGS,B.CBM,B.NETWEIGHT"); - strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID"); + strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.AGENTID,B.ORDERNO"); strSql.Append(",B.CUSTOMDATE"); strSql.Append(",B.FEESTATUS"); strSql.Append(",B.CUSTSERVICE,B.FRCUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE,B.DESTINATION, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.NETWEIGHT,B.KGS,B.TEU,B.CNTRTOTAL,B.CORPID"); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index 056a8572..344ccde2 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -2048,76 +2048,76 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL var seaefield = MsSoftSysTableDAL.GetDefTableDetailList("OP_SEAE"); foreach (var enumValue in seaefield) { - if (enumValue.FIELDNAME == "MBLNO" && headData.MBLNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "主提单号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "HBLNO" && headData.HBLNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "分提单号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "CUSTNO" && headData.CUSTNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "委托编号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "ORDERNO" && headData.ORDERNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "订舱编号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "SHIPPERID" && headData.SHIPPERID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "发货人代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "CONSIGNEEID" && headData.CONSIGNEEID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货人代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "NOTIFYPARTYID" && headData.NOTIFYPARTYID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "通知人代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "SHIPPER" && headData.SHIPPER.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "发货人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "CONSIGNEE" && headData.CONSIGNEE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "NOTIFYPARTY" && headData.NOTIFYPARTY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "通知人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "AGENTID" && headData.AGENTID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "代理名称超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "AGENT" && headData.AGENT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "代理超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "VESSEL" && headData.VESSEL.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "船名超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "VOYNO" && headData.VOYNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "航次超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PlACERECEIPT" && headData.PLACERECEIPT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货地超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PORTLOADID" && headData.PORTLOADID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "装货港代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PORTLOAD" && headData.PORTLOAD.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "装货港超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PORTDISCHARGEID" && headData.PORTDISCHARGEID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "卸货港代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PORTDISCHARGE" && headData.PORTDISCHARGE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "卸货港超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PLACEDELIVERYID" && headData.PLACEDELIVERYID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "交货地代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PLACEDELIVERY" && headData.PLACEDELIVERY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "交货地超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "DESTINATIONID" && headData.DESTINATIONID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "目的地代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "DESTINATION" && headData.DESTINATION.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "目的地超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "ISSUEPLACE" && headData.ISSUEPLACE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "签单地点超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "BLFRT" && headData.BLFRT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "付费方式超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PREPARDAT" && headData.PREPARDAT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "预付地点超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PAYABLEAT" && headData.PAYABLEAT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "到付地点超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "SERVICE" && headData.SERVICE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "运输条款超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "MARKS" && headData.MARKS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "唛头超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "NOPKGS" && headData.NOPKGS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "件数包装超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "DESCRIPTION" && headData.DESCRIPTION.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "货物描述超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "GOODSNAME" && headData.GOODSNAME.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "品名超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "KINDPKGS" && headData.KINDPKGS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "包装超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "LANE" && headData.LANE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "航线超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "INVNO" && headData.INVNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "发票号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "DCLASS" && headData.DCLASS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品类别超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "DUNNO" && headData.DUNNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品编号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "REEFERF" && headData.REEFERF.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "冷藏通风量超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "TEMPID" && headData.TEMPID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "温度单位超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "TEMPSET" && headData.TEMPSET.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "设置温度超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "TEMPMAX" && headData.TEMPMAX.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "最高温度超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "TEMPMIN" && headData.TEMPMIN.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "最低温度超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "CONTRACTNO" && headData.CONTRACTNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "运费协议号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "INSURANCEER" && headData.INSURANCEER.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "保险人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "INSURANCENO" && headData.INSURANCENO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "保险单号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "REMARK" && headData.REMARK.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "备注超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "STLNAME" && headData.STLNAME.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "结算方式超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "EDIREMARK" && headData.EDIREMARK.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "EDI备注超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "MNOTIFYPARTY" && headData.MNOTIFYPARTY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "主单通知人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "ENTERP" && headData.ENTERP.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "经营单位超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "SERVICECONTRACTNO" && headData.SERVICECONTRACTNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "服务合同号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "MNOTIFYPARTYID" && headData.MNOTIFYPARTYID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "签单地点超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "LINKMAN" && headData.LINKMAN.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "客户联系人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "INSPECTSERVICE" && headData.INSPECTSERVICE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "报检项目超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "APPLYNO" && headData.APPLYNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "申请放箱号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "MSHIPPERID" && headData.MSHIPPERID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER发货人代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "CUSTOMNO" && headData.CUSTOMNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "报关单号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "HSCODE" && headData.HSCODE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "HS代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "INSPECTIONNO" && headData.INSPECTIONNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "商检单号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "MSHIPPER" && headData.MSHIPPER.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER发货人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "PLACERECEIPTID" && headData.PLACERECEIPTID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货地代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "TRADETERM" && headData.TRADETERM.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "贸易条款超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "VESSELID" && headData.VESSELID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "船舶呼号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "DPAGE" && headData.DPAGE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品页号超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "MCONSIGNEEID" && headData.MCONSIGNEEID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER收货人代码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "MCONSIGNEE" && headData.MCONSIGNEE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER收货人超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "ENTERPID" && headData.ENTERPID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "单位编码超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "HUMIDITY" && headData.HUMIDITY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "湿度超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "TERMSDELIVERY" && headData.TERMSDELIVERY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "贸易方式超长,字段长度限制" + enumValue.FIELDLEN; } - if (enumValue.FIELDNAME == "DLABEL" && headData.DLABEL.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品标签超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MBLNO"&&headData.MBLNO!=null && headData.MBLNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "主提单号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "HBLNO" && headData.HBLNO != null && headData.HBLNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "分提单号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "CUSTNO" && headData.CUSTNO != null && headData.CUSTNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "委托编号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "ORDERNO" && headData.ORDERNO != null && headData.ORDERNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "订舱编号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "SHIPPERID" && headData.SHIPPERID != null && headData.SHIPPERID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "发货人代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "CONSIGNEEID" && headData.CONSIGNEEID != null && headData.CONSIGNEEID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货人代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "NOTIFYPARTYID" && headData.NOTIFYPARTYID != null && headData.NOTIFYPARTYID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "通知人代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "SHIPPER" && headData.SHIPPER != null && headData.SHIPPER.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "发货人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "CONSIGNEE" && headData.CONSIGNEE != null && headData.CONSIGNEE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "NOTIFYPARTY" && headData.NOTIFYPARTY != null && headData.NOTIFYPARTY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "通知人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "AGENTID" && headData.AGENTID != null && headData.AGENTID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "代理名称超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "AGENT" && headData.AGENT != null && headData.AGENT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "代理超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "VESSEL" && headData.VESSEL != null && headData.VESSEL.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "船名超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "VOYNO" && headData.VOYNO != null && headData.VOYNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "航次超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PlACERECEIPT" && headData.PLACERECEIPT != null && headData.PLACERECEIPT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货地超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PORTLOADID" && headData.PORTLOADID != null && headData.PORTLOADID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "装货港代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PORTLOAD" && headData.PORTLOAD != null && headData.PORTLOAD.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "装货港超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PORTDISCHARGEID" && headData.PORTDISCHARGEID != null && headData.PORTDISCHARGEID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "卸货港代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PORTDISCHARGE" && headData.PORTDISCHARGE != null && headData.PORTDISCHARGE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "卸货港超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PLACEDELIVERYID" && headData.PLACEDELIVERYID != null && headData.PLACEDELIVERYID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "交货地代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PLACEDELIVERY" && headData.PLACEDELIVERY != null && headData.PLACEDELIVERY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "交货地超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "DESTINATIONID" && headData.DESTINATIONID != null && headData.DESTINATIONID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "目的地代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "DESTINATION" && headData.DESTINATION != null && headData.DESTINATION.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "目的地超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "ISSUEPLACE" && headData.ISSUEPLACE != null && headData.ISSUEPLACE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "签单地点超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "BLFRT" && headData.BLFRT != null && headData.BLFRT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "付费方式超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PREPARDAT" && headData.PREPARDAT != null && headData.PREPARDAT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "预付地点超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PAYABLEAT" && headData.PAYABLEAT != null && headData.PAYABLEAT.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "到付地点超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "SERVICE" && headData.SERVICE != null && headData.SERVICE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "运输条款超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MARKS" && headData.MARKS != null && headData.MARKS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "唛头超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "NOPKGS" && headData.NOPKGS != null && headData.NOPKGS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "件数包装超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "DESCRIPTION" && headData.DESCRIPTION != null && headData.DESCRIPTION.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "货物描述超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "GOODSNAME" && headData.GOODSNAME != null && headData.GOODSNAME.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "品名超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "KINDPKGS" && headData.KINDPKGS != null && headData.KINDPKGS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "包装超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "LANE" && headData.LANE != null && headData.LANE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "航线超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "INVNO" && headData.INVNO != null && headData.INVNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "发票号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "DCLASS" && headData.DCLASS != null && headData.DCLASS.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品类别超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "DUNNO" && headData.DUNNO != null && headData.DUNNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品编号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "REEFERF" && headData.REEFERF != null && headData.REEFERF.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "冷藏通风量超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "TEMPID" && headData.TEMPID != null && headData.TEMPID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "温度单位超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "TEMPSET" && headData.TEMPSET != null && headData.TEMPSET.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "设置温度超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "TEMPMAX" && headData.TEMPMAX != null && headData.TEMPMAX.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "最高温度超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "TEMPMIN" && headData.TEMPMIN != null && headData.TEMPMIN.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "最低温度超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "CONTRACTNO" && headData.CONTRACTNO != null && headData.CONTRACTNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "运费协议号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "INSURANCEER" && headData.INSURANCEER != null && headData.INSURANCEER.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "保险人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "INSURANCENO" && headData.INSURANCENO != null && headData.INSURANCENO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "保险单号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "REMARK" && headData.REMARK != null && headData.REMARK.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "备注超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "STLNAME" && headData.STLNAME != null && headData.STLNAME.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "结算方式超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "EDIREMARK" && headData.EDIREMARK != null && headData.EDIREMARK.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "EDI备注超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MNOTIFYPARTY" && headData.MNOTIFYPARTY != null && headData.MNOTIFYPARTY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "主单通知人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "ENTERP" && headData.ENTERP != null && headData.ENTERP.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "经营单位超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "SERVICECONTRACTNO" && headData.SERVICECONTRACTNO != null && headData.SERVICECONTRACTNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "服务合同号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MNOTIFYPARTYID" && headData.MNOTIFYPARTYID != null && headData.MNOTIFYPARTYID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "签单地点超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "LINKMAN" && headData.LINKMAN != null && headData.LINKMAN.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "客户联系人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "INSPECTSERVICE" && headData.INSPECTSERVICE != null && headData.INSPECTSERVICE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "报检项目超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "APPLYNO" && headData.APPLYNO != null && headData.APPLYNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "申请放箱号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MSHIPPERID" && headData.MSHIPPERID != null && headData.MSHIPPERID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER发货人代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "CUSTOMNO" && headData.CUSTOMNO != null && headData.CUSTOMNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "报关单号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "HSCODE" && headData.HSCODE != null && headData.HSCODE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "HS代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "INSPECTIONNO" && headData.INSPECTIONNO != null && headData.INSPECTIONNO.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "商检单号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MSHIPPER" && headData.MSHIPPER != null && headData.MSHIPPER.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER发货人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "PLACERECEIPTID" && headData.PLACERECEIPTID != null && headData.PLACERECEIPTID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "收货地代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "TRADETERM" && headData.TRADETERM != null && headData.TRADETERM.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "贸易条款超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "VESSELID" && headData.VESSELID != null && headData.VESSELID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "船舶呼号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "DPAGE" && headData.DPAGE != null && headData.DPAGE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品页号超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MCONSIGNEEID" && headData.MCONSIGNEEID != null && headData.MCONSIGNEEID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER收货人代码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "MCONSIGNEE" && headData.MCONSIGNEE != null && headData.MCONSIGNEE.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "MASTER收货人超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "ENTERPID" && headData.ENTERPID != null && headData.ENTERPID.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "单位编码超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "HUMIDITY" && headData.HUMIDITY != null && headData.HUMIDITY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "湿度超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "TERMSDELIVERY" && headData.TERMSDELIVERY != null && headData.TERMSDELIVERY.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "贸易方式超长,字段长度限制" + enumValue.FIELDLEN; } + if (enumValue.FIELDNAME == "DLABEL" && headData.DLABEL != null && headData.DLABEL.Length > Convert.ToInt32(enumValue.FIELDLEN)) { isPost = false; errorstr = "危险品标签超长,字段长度限制" + enumValue.FIELDLEN; } } } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsSysBillNoSet/MsSysBillNoSetDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsSysBillNoSet/MsSysBillNoSetDAL.cs index 6f8a535e..cf38346e 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsSysBillNoSet/MsSysBillNoSetDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsSysBillNoSet/MsSysBillNoSetDAL.cs @@ -22,7 +22,7 @@ namespace DSWeb.MvcShipping.DAL.MsSysBillNoSet var strSql = new StringBuilder(); strSql.Append("SELECT "); - strSql.Append("GID,OPLBNAME,RULEBLNO,RULEDATETYPE,BILLTYPE,COMPANYID,ISEDIT,ISAUTO,CUSTOMHEAD"); + strSql.Append("GID,OPLBNAME,RULEBLNO,RULEDATETYPE,BILLTYPE,COMPANYID,ISEDIT,ISAUTO,ISOPADD,CUSTOMHEAD"); strSql.Append(",(select BillName from tSysBillType where BillCode=sys_billno_set.BILLTYPE) BILLTYPEREF"); strSql.Append(" from sys_billno_set where COMPANYID='" + companyid + "'"); @@ -119,6 +119,7 @@ namespace DSWeb.MvcShipping.DAL.MsSysBillNoSet data.ISEDIT = Convert.ToString(reader["ISEDIT"]); data.ISAUTO = Convert.ToString(reader["ISAUTO"]); data.CUSTOMHEAD = Convert.ToString(reader["CUSTOMHEAD"]); + data.ISOPADD = Convert.ToString(reader["ISOPADD"]); #endregion headList.Add(data); } @@ -144,12 +145,12 @@ namespace DSWeb.MvcShipping.DAL.MsSysBillNoSet var cmdInsert = db.GetSqlStringCommand( - @"insert into sys_billno_set (GID,OPLBNAME,RULEBLNO,RULEDATETYPE,BILLTYPE,COMPANYID,ISEDIT,ISAUTO,CUSTOMHEAD) - values (@GID,@OPLBNAME,@RULEBLNO,@RULEDATETYPE,@BILLTYPE,@COMPANYID,@ISEDIT,@ISAUTO,@CUSTOMHEAD) "); + @"insert into sys_billno_set (GID,OPLBNAME,RULEBLNO,RULEDATETYPE,BILLTYPE,COMPANYID,ISEDIT,ISAUTO,CUSTOMHEAD,ISOPADD) + values (@GID,@OPLBNAME,@RULEBLNO,@RULEDATETYPE,@BILLTYPE,@COMPANYID,@ISEDIT,@ISAUTO,@CUSTOMHEAD,@ISOPADD) "); var cmdUpdate = db.GetSqlStringCommand( - @"update sys_billno_set set OPLBNAME=@OPLBNAME,RULEBLNO=@RULEBLNO,RULEDATETYPE=@RULEDATETYPE,BILLTYPE=@BILLTYPE,COMPANYID=@COMPANYID,ISEDIT=@ISEDIT,ISAUTO=@ISAUTO,CUSTOMHEAD=@CUSTOMHEAD where GID=@GID "); + @"update sys_billno_set set OPLBNAME=@OPLBNAME,RULEBLNO=@RULEBLNO,RULEDATETYPE=@RULEDATETYPE,BILLTYPE=@BILLTYPE,COMPANYID=@COMPANYID,ISEDIT=@ISEDIT,ISAUTO=@ISAUTO,CUSTOMHEAD=@CUSTOMHEAD,ISOPADD=@ISOPADD where GID=@GID "); if (bodyList != null) { @@ -167,6 +168,7 @@ namespace DSWeb.MvcShipping.DAL.MsSysBillNoSet db.AddInParameter(cmdInsert, "@ISEDIT", DbType.String, enumValue.ISEDIT); db.AddInParameter(cmdInsert, "@ISAUTO", DbType.String, enumValue.ISAUTO); db.AddInParameter(cmdInsert, "@CUSTOMHEAD", DbType.String, enumValue.CUSTOMHEAD); + db.AddInParameter(cmdInsert, "@ISOPADD", DbType.String, enumValue.ISOPADD); db.AddInParameter(cmdInsert, "@COMPANYID", DbType.String, companyid); db.ExecuteNonQuery(cmdInsert, tran); } @@ -183,6 +185,8 @@ namespace DSWeb.MvcShipping.DAL.MsSysBillNoSet db.AddInParameter(cmdUpdate, "@ISEDIT", DbType.String, enumValue.ISEDIT); db.AddInParameter(cmdUpdate, "@ISAUTO", DbType.String, enumValue.ISAUTO); db.AddInParameter(cmdUpdate, "@CUSTOMHEAD", DbType.String, enumValue.CUSTOMHEAD); + db.AddInParameter(cmdUpdate, "@ISOPADD", DbType.String, enumValue.ISOPADD); + db.AddInParameter(cmdUpdate, "@COMPANYID", DbType.String, enumValue.COMPANYID); db.ExecuteNonQuery(cmdUpdate, tran); } diff --git a/DSWeb/Areas/MvcShipping/Models/MsSysBillNoSet/SysBillNoSet.cs b/DSWeb/Areas/MvcShipping/Models/MsSysBillNoSet/SysBillNoSet.cs index 1823a63a..10360953 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsSysBillNoSet/SysBillNoSet.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsSysBillNoSet/SysBillNoSet.cs @@ -97,7 +97,8 @@ namespace DSWeb.MvcShipping.Models.MsSysBillNoSet get { return _CUSTOMHEAD; } set { _CUSTOMHEAD = value; } } - + [ModelDB] + public string ISOPADD { get; set; } #endregion diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeOpTemplate/MsCodeOpTemplateEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeOpTemplate/MsCodeOpTemplateEdit.js index 71d23f0d..5a03ba89 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeOpTemplate/MsCodeOpTemplateEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeOpTemplate/MsCodeOpTemplateEdit.js @@ -435,6 +435,9 @@ Ext.extend(Shipping.MsCodeOpTemplateEdit, Ext.Panel, { if (data.BSTYPE == '海运出口') { this.StoreField.load({ params: { optable: "OP_SEAE" } }); } + if (combo.value == '海运出口AMS') { + this.StoreField.load({ params: { optable: "OP_SEAE_AMS" } }); + } if (data.BSTYPE == '海运进口') { this.StoreField.load({ params: { optable: "OP_SEAI" } }); } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientIndex.js index 0385a196..635ca027 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientIndex.js @@ -638,6 +638,7 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, { { text: Zi.LAN.btnPrint, //"打印", iconCls: 'btnprint', + id: "btnprint", menu: [ { text: Zi.LAN.PrintAll, //"全部", handler: function (menu, event) { @@ -750,6 +751,29 @@ Ext.extend(Shipping.MsInfoClientIndex, Ext.Panel, { }, scope: this }); + var btnExportExcel = Ext.getCmp('btnExportExcel'); + var btnprint = Ext.getCmp('btnprint'); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsBaseInfo/GetUserModuleEnable', + params: { + modulename: 'modInfoclientExport' + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success) { + btnExportExcel.show(); + btnprint.show(); + } else { + btnExportExcel.hide(); + btnprint.hide(); + } + } + }, + scope: this + }); + }, //end initUIComponents onRefreshClick: function (button, event) { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/AireReceipt.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/AireReceipt.js index 823e8b5d..7de84f3a 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/AireReceipt.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/AireReceipt.js @@ -21,6 +21,7 @@ Ext.extend(Shipping.AireReceipt, Ext.Panel, { //按钮Toolbar var mainform = window.parent.panelEdit; // Ext.getCmp('OpSeaiEdit'); + if (mainform == undefined) mainform = window.parent._this; EditRecord = mainform.editRecord; this.BSNO = EditRecord.get('BSNO'); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js index c81b8491..d53562ff 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js @@ -264,6 +264,24 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { BSSOURCEDETAIL.setValue(''); } } + if (this.SALEORDERDEPTBYOP == 0) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.SALE); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + + } + + } else if (this.SALEORDERDEPTBYOP == 1) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.OP); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + + } + } } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js index f81bea3d..2427798b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEditView.js @@ -1810,7 +1810,8 @@ Ext.extend(Shipping.MsOpAireView, Ext.Panel, { this.formHead.getForm().setValues(data); this.formEdit.getForm().reset(); this.formEdit.getForm().setValues(data); - this.editRecord = data; + var editp = Ext.create('MsOpAireModel', data); + this.editRecord = editp; this.Editdata = data; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/AiriReceipt.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/AiriReceipt.js index bc50b9d1..a2bf0a04 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/AiriReceipt.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/AiriReceipt.js @@ -21,6 +21,7 @@ Ext.extend(Shipping.AiriReceipt, Ext.Panel, { //按钮Toolbar var mainform = window.parent.panelEdit; // Ext.getCmp('OpSeaiEdit'); + if (mainform == undefined) mainform = window.parent._thisAiriView; EditRecord = mainform.editRecord; this.BSNO = EditRecord.get('BSNO'); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js index 2a3250e6..b5d42820 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js @@ -256,6 +256,24 @@ Ext.extend(Shipping.MsOpAiriEdit, Ext.Panel, { BSSOURCEDETAIL.setValue(''); } } + if (this.SALEORDERDEPTBYOP == 0) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.SALE); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + + } + + } else if (this.SALEORDERDEPTBYOP == 1) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.OP); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + + } + } } } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js index 336355e8..ea7f9f5c 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEditView.js @@ -24,7 +24,7 @@ Ext.extend(Shipping.MsOpAiriView, Ext.Panel, { this.bsno = getUrlParam('bsno'); - + _thisAiriView = this; //#region 信息加载 this.storeDefValue = Ext.create('Ext.data.Store', { model: 'DsShipping.ux.OpDefValue', @@ -1335,7 +1335,8 @@ Ext.extend(Shipping.MsOpAiriView, Ext.Panel, { this.formHead.getForm().setValues(data); this.formEdit.getForm().reset(); this.formEdit.getForm().setValues(data); - + var editp = Ext.create('MsOpAiriModel', data); + this.editRecord = editp; this.Editdata = data; @@ -1491,7 +1492,7 @@ Ext.extend(Shipping.MsOpAiriView, Ext.Panel, { var inputby = this.formHead.getForm().findField('INPUTBY').getValue(); var op = this.formHead.getForm().findField('OP').getValue(); - _this = this; + if (BSSTATUS == '锁定') { canedit = false; this.setSaveBtnStatus(canedit); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js index 86ab0e50..47406217 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js @@ -2323,6 +2323,7 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, { }); + }, //end initUIComponents diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js index 648265ef..62f33849 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js @@ -21,6 +21,7 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { this.accdatesameetd = 0; this.MsPeriod = null; this.SALEORDERDEPTBYOP = 0; + this.ENTERSAMEASCUSTOMER = 0; this.copyfee = false; this.bsno = getUrlParam('bsno'); this.storePLList = Ext.create('Ext.data.Store', { @@ -175,9 +176,11 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { 'select': function (combo, records, eOpts) { if (records.length > 0) { var basicForm = _this.formEdit.getForm(); - var ENTERP = basicForm.findField('ENTERP').getValue(); - if (ENTERP == '' || ENTERP == null) { - basicForm.findField('ENTERP').setValue(combo.value); + if (this.ENTERSAMEASCUSTOMER == 1) { + var ENTERP = basicForm.findField('ENTERP').getValue(); + if (ENTERP == '' || ENTERP == null) { + basicForm.findField('ENTERP').setValue(combo.value); + } } this.formHead.getForm().findField('SALECORPID').setValue(records[0].data.SALECORPID); this.formHead.getForm().findField('SALE').setValue(records[0].data.SALE); @@ -209,7 +212,24 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { BSSOURCEDETAIL.setValue(''); } } + if (this.SALEORDERDEPTBYOP == 0) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.SALE); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + + } + + } else if (this.SALEORDERDEPTBYOP == 1) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.OP); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + } + } } } } @@ -1166,6 +1186,33 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { scope: this }); + Ext.Ajax.request({ + waitMsg: '', + url: '/MvcShipping/MsSysParamSet/GetData', + params: { + condition: "PARAMNAME='ENTERSAMEASCUSTOMER'" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (result.Success != true) { + + } else { + var data = result.data; + if (data.PARAMVALUE == '1') { + this.ENTERSAMEASCUSTOMER = 1; + } else { + + } + + } + } else { + + } + }, + scope: this + }); + }, //end initUIComponents InitData: function () { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index eba2c9c0..c003d59e 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -20683,7 +20683,9 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { if (data.ISEDIT == '1') { var custno = _this.formHead.getForm().findField('CUSTNO'); custno.setReadOnly(false); - btnCUSTNO.setVisible(true); + if (data.ISOPADD=='1') + btnCUSTNO.setVisible(true); + else btnCUSTNO.setVisible(false); _this.GetFeeCustNoStatus(); } else { if (data.RULEBLNO == '') { @@ -20694,7 +20696,9 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { } else { var custno = _this.formHead.getForm().findField('CUSTNO'); custno.setReadOnly(true); - btnCUSTNO.setVisible(true); + if (data.ISOPADD == '1') + btnCUSTNO.setVisible(true); + else btnCUSTNO.setVisible(false); _this.GetFeeCustNoStatus(); } diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index 410e6552..86704d4c 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -252,8 +252,12 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { header: Zi.LAN.DRFEESTATUS, //'应收费用', align: 'center', width: 60, - renderer: function (value, meta) { - + renderer: function (value, meta, record) { + var openSet = "height=740, width=890, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2 + var openType = "_blank"; + var openUrl = ""; + openUrl = "../../MvcShipping/MsOpBill/MsFeeHistoryView?bsno=" + record.data.BSNO + "&oplb=op_Seae&type=1"; + var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')"; if (value == '审核通过') { meta.tdCls = 'feestatus_pass'; value = Zi.LAN.SHENHETONGGUO; @@ -282,6 +286,8 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { } else if (value == '部分录入') { value = Zi.LAN.BUFENLURU; } + if (value != Zi.LAN.WEILURU) + value = '' + value + '' return value; } }, @@ -292,11 +298,18 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { header: Zi.LAN.CRFEESTATUS, //'应付费用', align: 'center', width: 60, - renderer: function (value, meta) { + renderer: function (value, meta, record) { + + var openSet = "height=740, width=890, toolbar=no, menubar=no,scrollbars=1, resizable=1,location=no, status=no,Top= " + (screen.height - 250) / 2 + ",Left= " + (screen.width - 600) / 2 + var openType = "_blank"; + var openUrl = ""; + openUrl = "../../MvcShipping/MsOpBill/MsFeeHistoryView?bsno=" + record.data.BSNO + "&oplb=op_Seae&type=2"; + var winstr = "window.open(this.href,'" + openType + "','" + openSet + "')"; if (value == '审核通过') { meta.tdCls = 'feestatus_pass'; value = Zi.LAN.SHENHETONGGUO; + } else if (value == '录入状态') { value = Zi.LAN.LURUZHUAGNTAI; } else if (value == '提交审核') { @@ -322,6 +335,8 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { } else if (value == '部分录入') { value = Zi.LAN.BUFENLURU; } + if (value != Zi.LAN.WEILURU) + value = '' + value + '' return value; } }, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js index 51a0e198..16a5a338 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js @@ -24,7 +24,7 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { this.serialNo = 0; this.SALEORDERDEPTBYOP = 0; this.copyfee = false; - + var BLTYPEDFIELDNAME = 'EnumValueName'; if (strLANGUAGES == "en-us") { @@ -248,6 +248,24 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { BSSOURCEDETAIL.setValue(''); } } + if (this.SALEORDERDEPTBYOP == 0) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.SALE); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + + } + + } else if (this.SALEORDERDEPTBYOP == 1) { + var recs = DsStoreQueryBy(this.storeOpCode, 'UserName', records[0].data.OP); + if (recs.getCount() > 0) { + var data = recs.getAt(0).data; + this.formHead.getForm().findField('SALEDEPT').setValue(data.DEPTNAME); + } else { + + } + } } } } @@ -5307,7 +5325,9 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { if (data.ISEDIT == '1') { var custno = _this.formHead.getForm().findField('CUSTNO'); custno.setReadOnly(false); - btnCUSTNO.setVisible(true); + if (data.ISOPADD == '1') + btnCUSTNO.setVisible(true); + else btnCUSTNO.setVisible(false); _this.GetFeeCustNoStatus(); } else { @@ -5319,7 +5339,9 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { } else { var custno = _this.formHead.getForm().findField('CUSTNO'); custno.setReadOnly(true); - btnCUSTNO.setVisible(true); + if (data.ISOPADD == '1') + btnCUSTNO.setVisible(true); + else btnCUSTNO.setVisible(false); } _this.GetFeeCustNoStatus(); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsRptNoFeeDetail/MsRptNoFeeDetailIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsRptNoFeeDetail/MsRptNoFeeDetailIndex.js index b4f336df..049f36ee 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsRptNoFeeDetail/MsRptNoFeeDetailIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsRptNoFeeDetail/MsRptNoFeeDetailIndex.js @@ -230,7 +230,12 @@ Ext.extend(Shipping.MsRptNoFeeDetailIndex, Ext.Panel, { dataIndex: 'OP', header: '操作', width: 80 - }, { + }, { + sortable: true, + dataIndex: 'CUSTSERVICE', + header: '客服', + width: 80 + }, { sortable: true, dataIndex: 'PORTLOAD', header: '起运港', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsRptOpProfitMonth/MsRptOpProfitMonthIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsRptOpProfitMonth/MsRptOpProfitMonthIndex.js index bd9fa886..52b15f49 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsRptOpProfitMonth/MsRptOpProfitMonthIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsRptOpProfitMonth/MsRptOpProfitMonthIndex.js @@ -74,6 +74,7 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, { { name: 'PORTDISCHARGE', type: 'string' }, { name: 'DESTINATION', type: 'string' }, { name: 'CUSTOMNO', type: 'string' }, + { name: 'ORDERNO', type: 'string' }, { name: 'ACCDATE', type: 'string' }, { name: 'CARRIER', type: 'string' }, { name: 'BSSOURCE', type: 'string' }, @@ -354,7 +355,12 @@ Ext.extend(Shipping.MsRptOpProfitMonthIndex, Ext.Panel, { dataIndex: 'CONTRACTNO', text: Zi.LAN.CONTRACTNO, width: 80 - }, { + }, { + sortable: true, + dataIndex: 'ORDERNO', + text: Zi.LAN.ORDERNO, + width: 80 + }, { sortable: true, dataIndex: 'PORTLOAD', text: Zi.LAN.PORTLOAD, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetIndex.js index 221bf549..1ca710e9 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetIndex.js @@ -297,6 +297,20 @@ Ext.extend(Shipping.MsBillNoSetEdiIndex, Ext.Panel, { forceSelection: true }); + this.storeISOPADD = Ext.create('Ext.data.Store', { + fields: ['DC', 'NAME'] + }); + this.storeISOPADD.add({ "DC": "1", "NAME": "是" }); + this.storeISOPADD.add({ "DC": "0", "NAME": "否" }); + + + this.comboxISOPADD = Ext.create('DsExt.ux.RefTableCombox', { + store: this.storeISOPADD, + valueField: 'DC', + displayField: 'NAME', + forceSelection: true + }); + this.gridListCustCellEditing = Ext.create('Ext.grid.plugin.CellEditing', { clicksToEdit: 1 @@ -358,7 +372,20 @@ Ext.extend(Shipping.MsBillNoSetEdiIndex, Ext.Panel, { return "否"; } - }, { + }, { + sortable: true, + dataIndex: 'ISOPADD', + header: '禁止手动生成', + width: 100, + editor: this.comboxISOPADD, + renderer: function (value, p, record) { + if (value == "1") + return "是"; + else + return "否"; + + } + }, { sortable: true, dataIndex: 'ISAUTO', header: '自动生成', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetModel.js index 288357a1..4e2ba267 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsSysBillNoSet/MsSysBillNoSetModel.js @@ -9,6 +9,7 @@ { name: 'RULEBLNO', type: 'string' }, { name: 'RULEDATETYPE', type: 'string' }, { name: 'ISEDIT', type: 'string' }, + { name: 'ISOPADD', type: 'string' }, { name: 'ISAUTO', type: 'string' }, { name: 'CUSTOMHEAD', type: 'string' }, { name: 'COMPANYID', type: 'string' } diff --git a/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoEdit.js b/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoEdit.js index 43727917..9a747529 100644 --- a/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoEdit.js +++ b/DSWeb/Areas/OA/Viewsjs/Baoxiao2/BaoxiaoEdit.js @@ -1306,7 +1306,23 @@ Ext.extend(DsTruck.Chfee_managementEdit, Ext.Panel, { this.DoPrint(); }, scope: this - }, '-', { + }, '-', + { + // id: "saveandclose", + text: "提交审核", id: "Submit", + handler: function (button, event) { + this.onSubmitAuditClick(); + }, + scope: this + }, + { + // id: "saveandclose", + text: "撤回提交", id: "CallBack", + handler: function (button, event) { + this.onCallBackClick(); + }, + scope: this + }, '-', { text: "生成总账凭证", id: "btnAddCwVouchers", iconCls: "btnadd", @@ -2330,8 +2346,211 @@ Ext.extend(DsTruck.Chfee_managementEdit, Ext.Panel, { }); } + }, //end save + + onSubmitAuditClick: function () { + var Duino = this.formEdit.getForm().findField('BILLNO').getValue(); + + var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue(); + + if (Duino == '*') {//提示', msg: '请先保存付费申请,然后才能提交审核 + Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.baocunshenq, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + }; + + + if ((billstatus != 1) && (billstatus != 6)) { + //提示', msg: '当前状态无法提交审核 + Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.nowcanntsh, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + + } + + if (this.storeBodyList.getCount() == 0) {//提示', msg: '没有付费明细,无法提交审核 + Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.notmingxish, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + + _this = this; + + Ext.Ajax.request({ + waitMsg: Zi.LAN.addnumnow, //正在添加数据.. + url: '/Account/Chfee_payapplication/SubmitAudit', + params: { + bill: Duino + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.Msg.show({ + title: Zi.LAN.Prompt, //提示 + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } else { + + Ext.Ajax.request({ + waitMsg: Zi.LAN.onselect, //正在查询主表数据 + url: '/Account/Chfee_payapplication/GetData', + params: { + handle: 'edit', + condition: " BILLNO='" + Duino + "'" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.Msg.show({ + title: Zi.LAN.Prompt, + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } + + var data = result.data; + _this.formEdit.getForm().findField('BILLSTATUS').setDisabled(false); + _this.formEdit.getForm().reset(); + _this.formEdit.getForm().setValues(data); + _this.formEdit.getForm().findField('BILLSTATUS').setDisabled(true); + + var editp = Ext.create('MsChPayapplication', data); + + this.editRecord.fields.each(function (field) { + if (field.persist) { + name = field.name; + if (name != 'id') + this.editRecord.set(name, editp.get(name)); + } + }, this); + this.editRecord.commit(); + + _this.GetEditStatus(); + + } else {//请求出现错误,请重试 + Ext.MessageBox.alert(Zi.LAN.qqerror, response.responseText); + } + }, + scope: this + }); + + + } + + } else {//请求出现错误,请重试' + Ext.MessageBox.alert(Zi.LAN.qqerror, response.responseText); + } + }, + scope: this + }); + + + + }, + + onSubmitAuditBackClick: function () { + var Duino = this.formEdit.getForm().findField('BILLNO').getValue(); + + var billstatus = this.formEdit.getForm().findField('BILLSTATUS').getValue(); + + if (Duino == '*') {//提示', msg: '请先保存付费申请,然后才能提交审核! + Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.baocunshenq, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + }; + + + if (billstatus != 2) { + //提示', msg: '当前状态无法撤销提交! + Ext.Msg.show({ title: Zi.LAN.Prompt, msg: Zi.LAN.wufachexiaotj, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + + } + _this = this; + + Ext.Ajax.request({//正在添加数据.. + waitMsg: Zi.LAN.addnumnow, + url: '/Account/Chfee_payapplication/SubmitAuditBack', + params: { + bill: Duino + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.Msg.show({//提示 + title: Zi.LAN.Prompt, + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } else { + + Ext.Ajax.request({//正在查询主表数据 + waitMsg: Zi.LAN.onselect, + url: '/Account/Chfee_payapplication/GetData', + params: { + handle: 'edit', + condition: " BILLNO='" + Duino + "'" + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.Msg.show({//提示 + title: Zi.LAN.Prompt, + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } + + var data = result.data; + _this.formEdit.getForm().findField('BILLSTATUS').setDisabled(false); + _this.formEdit.getForm().reset(); + _this.formEdit.getForm().setValues(data); + _this.formEdit.getForm().findField('BILLSTATUS').setDisabled(true); + var editp = Ext.create('MsChPayapplication', data); + + this.editRecord.fields.each(function (field) { + if (field.persist) { + name = field.name; + if (name != 'id') + this.editRecord.set(name, editp.get(name)); + } + }, this); + this.editRecord.commit(); + + _this.GetEditStatus(); + + + } else {//请求出现错误,请重试 + Ext.MessageBox.alert(Zi.LAN.qqerror, response.responseText); + } + }, + scope: this + }); + + + } + + } else {//请求出现错误,请重试' + Ext.MessageBox.alert(Zi.LAN.qqerror, response.responseText); + } + }, + scope: this + }); + + + }, - //end save + + onExportClick: function (button, event) { GridExportExcelPage(this.formFeeBody); diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js index 285de4e3..e9ce501f 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsWlBs/MsPcEdit_WFSDIndex.js @@ -1984,6 +1984,11 @@ Ext.extend(DsTruck.MsPcEditIndex, Ext.Panel, { } var record = selections[0]; + if (record.data.FEESTATUS == true) { + Ext.Msg.show({ title:'警告', msg:'已费用锁定不允许删除业务!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + return; + } + Ext.MessageBox.confirm('提示', '确定删除该记录吗?', function (btn) { if (btn == 'yes') { Ext.Msg.wait('正在删除数据...');