From 06fea483cf9d5d3b0226df29de03c03cd1dfa40a Mon Sep 17 00:00:00 2001 From: ddlucky Date: Mon, 27 Mar 2023 14:13:14 +0800 Subject: [PATCH] =?UTF-8?q?=E8=A7=A3=E5=86=B33=E6=9C=8823=E6=97=A5?= =?UTF-8?q?=E9=97=AE=E9=A2=981-7=EF=BC=9B1=E3=80=81=E8=88=B1=E5=8D=95?= =?UTF-8?q?=E7=9A=84=E8=BF=9930=E5=9D=97=E9=92=B1=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E4=BB=98=E8=88=B9=E4=BB=A3=E5=90=97=EF=BC=9F2=E3=80=81?= =?UTF-8?q?=E5=BA=94=E4=BB=98=E8=B4=B9=E7=94=A8=E9=87=8C=E4=B9=9F=E6=83=B3?= =?UTF-8?q?=E5=8A=A0=E4=B8=8A=E5=88=86=E5=8D=95=E5=8F=B7=EF=BC=8C3?= =?UTF-8?q?=E3=80=81=E6=94=B6=E4=BB=98=E5=88=86=E5=8D=95=E5=8F=B7=E7=9A=84?= =?UTF-8?q?=E5=8F=96=E5=80=BC=E5=A6=82=E6=9E=9C=E6=B2=A1=E6=9C=89=E5=88=86?= =?UTF-8?q?=E5=8D=95=E5=8F=B7=E6=94=BE=E4=B8=BB=E5=8D=95=E5=8F=B7=EF=BC=8C?= =?UTF-8?q?4=E3=80=81=E8=88=B1=E5=8D=95=E7=9A=84=E8=BF=99=E9=83=A8?= =?UTF-8?q?=E5=88=86=E4=BF=A1=E6=81=AF=E6=83=B3=E9=9A=90=E8=97=8F=EF=BC=8C?= =?UTF-8?q?=E6=98=AF=E4=B8=8D=E6=98=AF=E5=B0=B1=E5=BE=97=E5=8D=95=E7=8B=AC?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=EF=BC=8C=EF=BC=88=E6=9A=82=E6=97=B6=E4=B8=8D?= =?UTF-8?q?=E7=94=A8=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=88=91=E5=85=88=E9=97=AE?= =?UTF-8?q?=E9=97=AE=EF=BC=895=E3=80=81=E4=B8=9A=E5=8A=A1=E6=9D=A5?= =?UTF-8?q?=E6=BA=90=E5=8F=AF=E4=BB=A5=E6=A0=B9=E6=8D=AE=E5=A7=94=E6=89=98?= =?UTF-8?q?=E5=8D=95=E4=BD=8D=E7=9A=84=E4=BF=A1=E6=81=AF=E5=B8=A6=E8=BF=87?= =?UTF-8?q?=E6=9D=A5=E5=90=97=EF=BC=9F6=E3=80=81=E5=A4=A7=E7=AE=80?= =?UTF-8?q?=E4=BA=91=E4=B8=8A=E8=AE=A2=E8=88=B1=E7=BC=96=E5=8F=B7=E5=BD=95?= =?UTF-8?q?=E5=85=A5=E5=8F=AF=E4=BB=A5=E4=B9=8B=E5=BD=95=E6=B5=B7=E8=BF=90?= =?UTF-8?q?=E9=83=A8=EF=BC=8C=E6=88=96=E8=80=85,mkt1=E5=90=A7=EF=BC=8C?= =?UTF-8?q?=E7=B3=BB=E7=BB=9F=E4=BC=9A=E8=A7=A3=E6=9E=90=E7=9A=84=E5=90=A7?= =?UTF-8?q?7=E3=80=81=E5=8D=95=E4=BB=B7=E7=9A=84=E5=8F=96=E5=80=BC?= =?UTF-8?q?=E7=8E=B0=E5=9C=A8=E6=98=AF=E6=A0=B9=E6=8D=AE=E5=AE=9E=E9=99=85?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=9D=A5=E6=8F=90=E5=8F=96=E7=9A=84=EF=BC=8C?= =?UTF-8?q?=E5=A6=82=E6=9E=9C=E5=AE=9E=E9=99=85=E5=AE=A2=E6=88=B7=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E7=BB=B4=E6=8A=A4=E5=8D=95=E4=BB=B7=E5=8F=AF=E4=BB=A5?= =?UTF-8?q?=E5=8F=96=E5=A7=94=E6=89=98=E5=8D=95=E4=BD=8D=E7=9A=84=E5=90=97?= =?UTF-8?q?=EF=BC=9F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DSWeb.Service.Output.DS7/DS7Service.cs | 44 ++++++++++++++----- .../MsOpOther/MsOpOther_CangDanEdit.js | 37 ++++++++++------ 2 files changed, 57 insertions(+), 24 deletions(-) diff --git a/DSWeb.Service.Output.DS7/DS7Service.cs b/DSWeb.Service.Output.DS7/DS7Service.cs index 7ff8d6f8..c43a0475 100644 --- a/DSWeb.Service.Output.DS7/DS7Service.cs +++ b/DSWeb.Service.Output.DS7/DS7Service.cs @@ -612,6 +612,7 @@ namespace DSWeb.Service.Output.DS7 var SOURCEOP = ""; var 费用标准结算对象 = ""; + var 船代 = ""; var custEdi = dS7Data.CodeCustEdi.AsNoTracking().FirstOrDefault(x => x.EDINAME == "DJY_OUTPUT" && x.EDICODE == WeiTuoFaSongFang); if (custEdi != null) @@ -619,7 +620,10 @@ namespace DSWeb.Service.Output.DS7 费用标准结算对象 = custEdi.CUST; } - + var 船代Edi= dS7Data.CodeCustEdi.AsNoTracking().FirstOrDefault(x => x.EDINAME == "DJY_OUTPUT" && x.EDICODE == _edi.FORWARDER); + if (船代Edi != null) { + 船代 = 船代Edi.CUST; + } //如果大简云业务中的【订舱编号】空着,则用大简云舱单界面的【委托发送方】 ,寻找EDI代码设置中的EDICODE =【委托发送方】 EDINAME = 大简云的客户 填入【委托单位】字段的内容 @@ -666,6 +670,8 @@ namespace DSWeb.Service.Output.DS7 SOURCEOP = orderinfo[1]; } + var 委托单位 = dS7Data.InfoClient.FirstOrDefault(x => x.SHORTNAME == CUSTOMERNAME); + if (op_other == null || op_other.BSNO == null || op_other.BSNO == "") { @@ -699,12 +705,12 @@ namespace DSWeb.Service.Output.DS7 FEESTATUS = false, MBLNO = MBLNO, HBLNO = "", - CUSTOMERNAME = CUSTOMERNAME, - CUSTOMERNAME2=WeiTuoFaSongFang,//20230313-大简云舱单界面的【委托发送方】录入东胜系统的实际客户, + CUSTOMERNAME = 委托单位.SHORTNAME, + CUSTOMERNAME2 = WeiTuoFaSongFang,//20230313-大简云舱单界面的【委托发送方】录入东胜系统的实际客户, //CARRIER BSDATE = DateTime.Today, ACCDATE = DateTime.Now.ToString("yyyy-MM"), - BSSOURCE = "", + BSSOURCE = 委托单位.BSSOURCE, OP = opUser.SHOWNAME, CUSTSERVICE = opUser.SHOWNAME, SALE = opUser.SHOWNAME, @@ -713,11 +719,12 @@ namespace DSWeb.Service.Output.DS7 //SR2023011000005 PORTLOAD = _edi.PORTLOAD,//装货港 PORTDISCHARGE = _edi.PORTDISCHARGE,//卸货港 - PKGS= PKGS, - KGS= KGS, - NETWEIGHT=0, - CBM= CBM, - SOURCEOP= SOURCEOP + PKGS = PKGS, + KGS = KGS, + NETWEIGHT = 0, + CBM = CBM, + SOURCEOP = SOURCEOP, + SHIPAGENT = 船代 }; //,DUIYUEHAO = 对账约号 //20230317 对账约号存于opLogic @@ -877,6 +884,10 @@ namespace DSWeb.Service.Output.DS7 //查询配置,生成应收 var fee = dS7Data.CustFeeTemplateDetail.AsNoTracking().FirstOrDefault(x => x.CUSTOMERNAME == 费用标准结算对象 && x.FEENAME == FeeShouName); + if (fee == null) { + fee = dS7Data.CustFeeTemplateDetail.AsNoTracking().FirstOrDefault(x => x.CUSTOMERNAME == 委托单位.SHORTNAME && x.FEENAME == FeeShouName); + } + if (fee != null ) { var feeShou = new ChFee(); @@ -943,6 +954,17 @@ namespace DSWeb.Service.Output.DS7 } } + if (FeePayCustomerType == "船代") { + //20230327 改为: + //如应付对象类型为船代 则结算对象改为该业务的船代公司 + + FeePayCustomer = 船代; + } + + var 分单号 = HBLNO; + if (string.IsNullOrWhiteSpace(HBLNO)) { + 分单号 = MBLNO; + } //应付 if (string.IsNullOrEmpty(HBLNO) && FeePayPrice>0) //主单才插入船代费用 { @@ -994,7 +1016,7 @@ namespace DSWeb.Service.Output.DS7 feeFu.ISACC = false; feeFu.CUSTDUI = false; - feeFu.BXGID = HBLNO; + feeFu.BXGID = 分单号; dS7Data.ChFee.Add(feeFu); dS7Data.SaveChanges(); @@ -1050,7 +1072,7 @@ namespace DSWeb.Service.Output.DS7 feeFuDJY.ISACC = false; feeFuDJY.CUSTDUI = false; - feeFuDJY.BXGID = HBLNO; + feeFuDJY.BXGID = 分单号; dS7Data.ChFee.Add(feeFuDJY); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js index e99b7605..3379a47d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOther_CangDanEdit.js @@ -630,7 +630,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { fieldLabel: '源操作', name: 'SOURCEOP' } - , { xtype: 'hiddenfield', flex: 2 } + ,this.comboxBSSOURCE + , { xtype: 'hiddenfield', flex: 1 } ] } @@ -723,21 +724,26 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { defaults: { anchor: '100%' }, - items: [{ - xtype: 'container', - layout: 'hbox', - defaultType: 'textfield', - items: [this.comboxBSSOURCE, this.comboxBSSOURCEDETAIL, { + items: [ + { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + hidden: true, + items: [this.comboxBSSOURCEDETAIL//this.comboxBSSOURCE, + , { fieldLabel: '装货港', name: 'PORTLOAD' }, { fieldLabel: '卸货港', name: 'PORTDISCHARGE' }, this.comboxTRANSTYPE, this.comboxTRADETYPE] - }, { + }, + { xtype: 'container', layout: 'hbox', - defaultType: 'textfield', + defaultType: 'textfield', + hidden: true, items: [{ fieldLabel: '业务日期', format: 'Y-m-d', @@ -780,10 +786,12 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { } } }, this.comboxGOODSNAME] - }, { + }, + { xtype: 'container', layout: 'hbox', - defaultType: 'textfield', + defaultType: 'textfield', + hidden: true, items: [ { fieldLabel: '毛重', name: 'KGS', @@ -824,10 +832,12 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { regex: /^\d+(\.\d{1,4})?$/, regexText: '请输入正确的数值类型!' }, this.comboxCustWmsCode] - }, { + }, + { xtype: 'container', layout: 'hbox', - defaultType: 'textfield', + defaultType: 'textfield', + hidden: true, items: [{ fieldLabel: '订舱编号', name: 'ORDERNO' @@ -843,7 +853,8 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { fieldLabel: '手册号', name: 'BOOKNO' }, this.comboxCUSTOMSER, this.comboxCountry] - }, { + }, + { xtype: 'container', layout: 'hbox', defaultType: 'textfield',