From 1a2994783ad71be0e42bcfdaefcbfd6fef551389 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Wed, 15 Mar 2023 07:59:56 +0800 Subject: [PATCH 1/2] 1 --- .../Chfee_InvoiceapplicationDAL.cs | 32 ++++--- .../Chfee_Invoiceapplication.cs | 3 + .../ChInvoiceapplicationAdd.js | 25 ++++- .../ChInvoiceapplicationModel.js | 1 + .../ChInvoiceapplicationNewEdit.js | 20 +++- .../DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs | 94 +++++++++++++++---- .../Viewsjs/MsOpSeae/MsOpSeaeEdit.js | 60 ++++++++++-- 7 files changed, 193 insertions(+), 42 deletions(-) diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs index 09c252b2..4d2aacc6 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs @@ -403,7 +403,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication var strSql = new StringBuilder(); strSql.Append(" SELECT GID,LINKGID,BILLSTATUS,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR "); strSql.Append(",EMAIL,GOODSNAME,(Select GOODNAME from code_goods_inv where GID=ch_fee_invoiceapplication_detail.GOODSNAME) AS GOODSNAMEREF"); - strSql.Append(",(SELECT TOP 1 INVOICENO FROM ch_fee_invoice WHERE BILLNO = ch_fee_invoiceapplication_detail.INVBILLNO) INVOICENO "); + strSql.Append(",(SELECT TOP 1 INVOICENO FROM ch_fee_invoice WHERE BILLNO = ch_fee_invoiceapplication_detail.INVBILLNO) INVOICENO,INVOICELINE "); strSql.Append(" FROM ch_fee_invoiceapplication_detail "); if (!string.IsNullOrEmpty(strCondition)) @@ -457,7 +457,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication data.GOODSNAME = Convert.ToString(reader["GOODSNAME"]); data.GOODSNAMEREF = Convert.ToString(reader["GOODSNAMEREF"]); data.INVOICENO = Convert.ToString(reader["INVOICENO"]); - + data.INVOICELINE = Convert.ToString(reader["INVOICELINE"]); + #endregion headList.Add(data); } @@ -483,13 +484,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication var cmdInsert = db.GetSqlStringCommand( - @"insert into ch_fee_invoiceapplication_detail (GID,BILLSTATUS,LINKGID,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR,EMAIL,GOODSNAME) - values (@GID,@BILLSTATUS,@LINKGID,@CUSTOMERNAME,@INVOICECUSTNAME,@AMOUNT,@CURRENCY,@REMARK,@CUSTRATENO,@CUSTADDRTEL,@CUSTBANK,@CUSTTEL,@CUSTADDR,@EMAIL,@GOODSNAME) "); + @"insert into ch_fee_invoiceapplication_detail (GID,BILLSTATUS,LINKGID,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR,EMAIL,GOODSNAME,INVOICELINE) + values (@GID,@BILLSTATUS,@LINKGID,@CUSTOMERNAME,@INVOICECUSTNAME,@AMOUNT,@CURRENCY,@REMARK,@CUSTRATENO,@CUSTADDRTEL,@CUSTBANK,@CUSTTEL,@CUSTADDR,@EMAIL,@GOODSNAME,@INVOICELINE) "); var cmdUpdate = db.GetSqlStringCommand( @"update ch_fee_invoiceapplication_detail set CUSTOMERNAME=@CUSTOMERNAME,INVOICECUSTNAME=@INVOICECUSTNAME,AMOUNT=@AMOUNT,CURRENCY=@CURRENCY,REMARK=@REMARK,CUSTRATENO=@CUSTRATENO - ,CUSTADDRTEL=@CUSTADDRTEL,CUSTBANK=@CUSTBANK,CUSTTEL=@CUSTTEL,CUSTADDR=@CUSTADDR,EMAIL=@EMAIL,GOODSNAME=@GOODSNAME + ,CUSTADDRTEL=@CUSTADDRTEL,CUSTBANK=@CUSTBANK,CUSTTEL=@CUSTTEL,CUSTADDR=@CUSTADDR,EMAIL=@EMAIL,GOODSNAME=@GOODSNAME,INVOICELINE=@INVOICELINE WHERE GID=@GID "); @@ -516,6 +517,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication db.AddInParameter(cmdInsert, "@CUSTADDR", DbType.String, enumValue.CUSTADDR); db.AddInParameter(cmdInsert, "@EMAIL", DbType.String, enumValue.EMAIL); db.AddInParameter(cmdInsert, "@GOODSNAME", DbType.String, enumValue.GOODSNAME); + db.AddInParameter(cmdInsert, "@INVOICELINE", DbType.String, enumValue.INVOICELINE); db.ExecuteNonQuery(cmdInsert, tran); } else { @@ -534,6 +536,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication db.AddInParameter(cmdUpdate, "@CUSTADDR", DbType.String, enumValue.CUSTADDR); db.AddInParameter(cmdUpdate, "@EMAIL", DbType.String, enumValue.EMAIL); db.AddInParameter(cmdUpdate, "@GOODSNAME", DbType.String, enumValue.GOODSNAME); + db.AddInParameter(cmdUpdate, "@INVOICELINE", DbType.String, enumValue.INVOICELINE); db.ExecuteNonQuery(cmdUpdate, tran); } @@ -695,7 +698,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication head.DbOperationType = DbOperationType.DbotIns; head.CURRENCY = "RMB"; head.RECVCURR = body.CURRENCY; - head.INVOICELINE = "p"; + head.INVOICELINE = body.INVOICELINE; foreach (var bank in banklist) { if (bank.CURRENCY == body.CURRENCY && bank.ISDEF == "True") { head.ACCOUNT = bank.BANKACCOUNT; @@ -1876,7 +1879,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); - strSql.Append(" and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } else { @@ -1889,7 +1892,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" FROM CH_FEE f "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) "); - strSql.Append(" where f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } @@ -1905,10 +1908,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" and " + strCondition); } - if (INVISNOTSTL.PARAMVALUE == "1") - { + strSql.Append(" and ISNULL(f.AMOUNT,0)<>ISNULL(f.SETTLEMENT,0) "); - } + var isopen = MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid); if (isopen == false) { @@ -1995,7 +1997,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" FROM CH_FEE f "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); - strSql.Append(" and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } else @@ -2003,7 +2005,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append("SELECT COUNT(*) FROM (select b.BSNO,f.CUSTOMERNAME "); strSql.Append(" FROM CH_FEE f "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); - strSql.Append(" where f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } if (!string.IsNullOrEmpty(strCondition)) @@ -2576,7 +2578,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName"); strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,d.DEBITAMOUNT from ch_fee f "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); - strSql.Append(" and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } else @@ -2587,7 +2589,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(",f.feeName,f.customerName,f.amount,f.amount-isnull(f.INVOICE,0)-isnull(f.ORDERINVOICE,0)+isnull(f.ORDERINVSETTLEMENT,0) as balamount,f.currency,f.exChangerate,f.AccTaxRate,f.remark"); strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName"); strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,0 DEBITAMOUNT from ch_fee f "); - strSql.Append(" where f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } var InvAppFeeStatus = MsSysParamSetDAL.GetData("PARAMNAME='InvAppFeeStatus'"); if (InvAppFeeStatus.PARAMVALUE != "2") diff --git a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs index 2af04544..f0cd0746 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs @@ -437,6 +437,9 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoiceapplication public string EMAIL { get; set; } [ModelDB] public string GOODSNAME { get; set; } + + [ModelDB] + public string INVOICELINE { get; set; } public string GOODSNAMEREF { get; set; } public string INVBILLNO { get; set; } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js index 3aa06a04..e2546f18 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js @@ -844,6 +844,23 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { displayField: 'CURR' }); + + this.StoreINVOICELINE = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsExtEnumModel', + proxy: { url: '/CommMng/PubSys/GetEnumValueList' } + }); + this.StoreINVOICELINE.load({ params: { enumTypeId: 80003 } }); + + + this.comboxINVOICELINE = Ext.create('DsExt.ux.RefTableCombox', { + store: this.StoreINVOICELINE, + forceSelection: true, + name: 'INVOICELINE', + valueField: 'EnumValueName', + displayField: 'EnumValueName' + }); + + this.GridAppDetailCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); //明细表-数据集 this.storeAppDetailList = Ext.create('Ext.data.Store', { @@ -946,7 +963,13 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { header: '发票抬头', editor: this.comboxINVOICECUSTNAME2, width: 180 - }, { + }, { + sortable: false, + dataIndex: 'INVOICELINE', + header: '发票种类', + editor: this.comboxINVOICELINE, + width: 80 + }, { sortable: false, dataIndex: 'REMARK', header: '发票备注', diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js index d23d6462..c60e0ac8 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js @@ -193,6 +193,7 @@ Ext.define('ChInvoiceapplicationDetail', { { name: 'GID', type: 'string' }, { name: 'LINKGID', type: 'string' }, { name: 'BILLSTATUS', type: 'string' }, + { name: 'INVOICELINE', type: 'string' }, { name: 'INVOICECUSTNAME', type: 'string' }, { name: 'CUSTOMERNAME', type: 'string' }, { name: 'AMOUNT', type: 'string' }, diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js index 5634d888..7ad18d9a 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js @@ -1409,6 +1409,12 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { }); + this.comboxINVOICELINE = getEnumcombox({ + NAME: 'INVOICELINE', + enumTypeId: 80003 + }); + + this.gridAppDetailList = new Ext.grid.GridPanel({ store: this.storeAppDetailList, enableHdMenu: false, @@ -1471,11 +1477,17 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { align: 'right', width: 80 }, { - sortable: false, + sortable: false, dataIndex: 'INVOICECUSTNAME', - header: '发票抬头', - editor:this.comboxINVOICECUSTNAME2, - width: 180 + header: '发票抬头', + editor: this.comboxINVOICECUSTNAME2, + width: 180 + }, { + sortable: false, + dataIndex: 'INVOICELINE', + header: '发票种类', + editor: this.comboxINVOICELINE, + width: 80 }, { sortable: false, dataIndex: 'REMARK', diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index 4b1a3b81..f9cad92b 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -4326,6 +4326,20 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL } else { + if (ctnlist.Count != 0) + { + foreach (var ctn in ctnlist) + { + if (GetCtnEDICode(ctn.CTNALL, "INTTR") == "") + { error = error + "
提单号:" + bill.MBLNO + " 集装箱箱型EDI代码不能为空"; } + + if (ctn.CTNNUM == 0) + { error = error + "
提单号:" + bill.MBLNO + " 集装箱箱量不能为空"; } + + } + } + + } if (carrier == "YML") @@ -5140,9 +5154,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL } if (!string.IsNullOrEmpty(bill.PKGTYPE)) - r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":CEL+" + bill.PKGTYPE + "'"); + r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":+" + bill.PKGTYPE + "'"); else - r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":CEL'"); + r.WriteLine("DGS+IMD+" + bill.DCLASS + "+" + bill.DUNNO + "+" + tmp + ":'"); if (string.IsNullOrEmpty(billams.ATTN)) { @@ -7069,6 +7083,33 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL } #endregion } + else { + + var bsno = ""; + if (isbill != 1) + bsno = bill.BSNO; + else + bsno = OpBill.AS_ID; + var ctnlist = MsOpSeaeDAL.MsOpSeaeDAL.GetBodyList("BSNO='" + bsno + "'"); + if (ctnlist.Count == 0) { error = error + "
提单号:" + bill.MBLNO + " 集装箱信息不能为空"; } + else + { + Decimal dlPKGS = 0; + Decimal dlKGS = 0; + Decimal dlCBM = 0; + foreach (var ctn in ctnlist) + { + if (GetCtnEDICode(ctn.CTNALL, "HANJIN") == "") + { error = error + "
提单号:" + bill.MBLNO + " 集装箱箱型EDI代码不能为空"; } + + if (ctn.CTNNUM == 0) + { error = error + "
提单号:" + bill.MBLNO + " 集装箱箱量不能为0"; } + } + } + + + + } #region (收货人、通知人)邮编、国家代码、税号,货物NCM编码 if (filetype == "E") { @@ -11037,7 +11078,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL } if (ctn.CTNALL == null || ctn.CTNALL == "") { error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; } - + + if (ctn.CTNNUM == 0) + { error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; } if (filetype != "B") { if (ctn.CNTRNO == null || ctn.CNTRNO == "") @@ -12419,6 +12462,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL if (ctn.CTNALL == null || ctn.CTNALL == "") { error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; } + if (ctn.CTNNUM == 0) + { error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; } + if (filetype != "B") { if (ctn.CNTRNO == null || ctn.CNTRNO == "") @@ -13288,7 +13334,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL if (string.IsNullOrEmpty(GetCtnEDICode(ctn.CTNALL, type))) { error = error + "|提单号:" + bill.MBLNO + "箱型代码不能为空!"; } - + if (ctn.CTNNUM==0) + { error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; } if (filetype != "B") { @@ -16648,14 +16695,16 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL tempstr += GetSpaceStr("", 4);//12 //SCAC Code//O//X(4)//233 //236 // tempstr += GetSpaceStr("", 14);//13 //Filler//M//X(14)//237 //250 //Spaces tempstr = GetSpaceStr(tempstr, 236); - //if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付 - //{ - // tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code - //} - //else - //{ - // tempstr += GetSpaceStr("CN900160", 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填 - //} + + tempstr += GetSpaceStr(OpAms.SalesRepCode, 14);//13 //Filler//M//X(14)//237 //250 //Spaces + if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付 + { + tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code + } + else + { + tempstr += GetSpaceStr("CN900160", 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填 + } r.WriteLine(GetSpaceStr(tempstr, 250)); #endregion @@ -17510,11 +17559,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL } if (OpAms.BYCOUNTRY == "USA") { - tempstr += GetSpaceStr(bill.CONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运 + tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运 } else { - tempstr += GetSpaceStr(bill.CONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运 + tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//10//Service Contract #//C//X(10)//31//40//Applicable to US shipments only//"mandtory for US shpts---Service Contract Nbr/TAA Nbr"//美国线的S/C,TAA//服务合同#//只适用于美国装运 } tempstr += GetSpaceStr("", 5);//11//Prepaid at (Port code)//M//X(5)//41//45//Ocean Freight Payment Location//预付(港码)//海运付款地点 tempstr += GetSpaceStr("", 5);//12//Payable at (Port Code)//M//X(5)//46//50//1st Collect Charge Payment Location//按(港口代码)支付//第一收取缴费地点 @@ -17611,8 +17660,18 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL tempstr += GetSpaceStr("", 6);//6//Filler//M//X(6)//36//41// tempstr += DateTime.Now.ToString("yyyyMMddHHmm");//7//File Send time//M//9(12)//42//53//YYYYMMDDHHMM tempstr += GetSpaceStr("", 1);//8//Filler//M//X(1)//54//54//Spaces - tempstr += portload;//9//Sender Port Code//M//X(5)//55//59// - tempstr += GetSpaceStr(GetPortEDICode(headData[0].PORTDISCHARGEID, "PIL"), 5);//10//Receiver Port Code//M//X(5)//60//64// + + if (headData[0].BLFRT == "FREIGHT PREPAID") + { + tempstr += portload;//9//Sender Port Code//M//X(5)//55//59// + tempstr += portload;//10//Receiver Port Code//M//X(5)//60//64// + + } + else + { + tempstr += portload;//9//Sender Port Code//M//X(5)//55//59// + tempstr += GetSpaceStr(GetPortEDICode(headData[0].PORTDISCHARGEID, "PIL"), 5);//10//Receiver Port Code//M//X(5)//60//64// + } if (filetype == "E") { tempstr += "4.02";//11//EDI Version//M//X(4) //65//68//Default to "PBK" / esi:4.01 @@ -20435,6 +20494,9 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL if (ctn.CTNALL == null || ctn.CTNALL == "") { error = error + "|提单号:" + bill.MBLNO + "箱型不能为空"; } + if (ctn.CTNNUM == 0) + { error = error + "|提单号:" + bill.MBLNO + "箱量不能为空!"; } + if (filetype != "B") { if (ctn.CNTRNO == null || ctn.CNTRNO == "") diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index a6f1c9be..6bff4444 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -1519,14 +1519,38 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { }] }, this.comboxOP, { fieldLabel: Zi.LAN.CONTRACTNO, - name: 'CONTRACTNO' + name: 'CONTRACTNO', + listeners: { + scope: this, + blur: function (field, The, eOpts) { + _this.formHead.getForm().findField('CONTRACTNO') + .setValue(field.rawValue.toUpperCase()); + + } + } }, { fieldLabel: Zi.LAN.SERVICECONTRACTNO, //'服务合同号', //flex: 0.5, - name: 'SERVICECONTRACTNO' + name: 'SERVICECONTRACTNO', + listeners: { + scope: this, + blur: function (field, The, eOpts) { + _this.formHead.getForm().findField('SERVICECONTRACTNO') + .setValue(field.rawValue.toUpperCase()); + + } + } }, { fieldLabel: Zi.LAN.APPLYNO, //'申请放箱号', - name: 'APPLYNO' + name: 'APPLYNO', + listeners: { + scope: this, + blur: function (field, The, eOpts) { + _this.formHead.getForm().findField('APPLYNO') + .setValue(field.rawValue.toUpperCase()); + + } + } }, this.comboxDept ] }, { @@ -1538,12 +1562,28 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { fieldLabel: Zi.LAN.OPERATORTEL, //'TEL', //labelWidth: 25, //flex: 0.6, - name: 'OPERATORTEL' + name: 'OPERATORTEL', + listeners: { + scope: this, + blur: function (field, The, eOpts) { + _this.formHead.getForm().findField('OPERATORTEL') + .setValue(field.rawValue.toUpperCase()); + + } + } }, { fieldLabel: 'EMAIL', //'发票号', //labelWidth: 30, //flex: 0.6, - name: 'MAILPROJECT' + name: 'MAILPROJECT', + listeners: { + scope: this, + blur: function (field, The, eOpts) { + _this.formHead.getForm().findField('MAILPROJECT') + .setValue(field.rawValue.toUpperCase()); + + } + } }] }, { xtype: 'container', @@ -1588,7 +1628,15 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { }] }, this.comboxBLFRT, { fieldLabel: Zi.LAN.INSPECTIONNO, //'商检单号', - name: 'INSPECTIONNO' + name: 'INSPECTIONNO', + listeners: { + scope: this, + blur: function (field, The, eOpts) { + _this.formHead.getForm().findField('INSPECTIONNO') + .setValue(field.rawValue.toUpperCase()); + + } + } } //, { From 4e444ebbb263cbca8bda0836cd209819485cdf67 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Wed, 15 Mar 2023 14:03:09 +0800 Subject: [PATCH 2/2] 1 --- .../Chfee_recvapplicationController.cs | 10 +- .../Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs | 4 +- .../Chfee_InvoiceapplicationDAL.cs | 17 +- .../Chfee_RecvapplicationDAL.cs | 36 +- .../Models/Chfee_invoice/Chfee_Invoice.cs | 2 +- .../Chfee_Invoiceapplication.cs | 1 + .../Chfee_invoice_HangXin/ChInvoiceAppEdit.js | 319 ++++++++++-------- .../Chfee_invoice_HangXin/ChInvoiceModel.js | 3 +- .../ChInvoiceapplicationAdd.js | 20 +- .../ChInvoiceapplicationAudit.js | 20 +- .../ChInvoiceapplicationModel.js | 2 + .../ChInvoiceapplicationNewEdit.js | 54 ++- .../ChRecvapplicationDdEdit.js | 6 +- .../DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs | 17 +- .../Viewsjs/MsInfoClient/MsInfoClientEdit.js | 10 + .../Viewsjs/MsInfoClient/Zi_en-us.js | 3 +- .../Viewsjs/MsInfoClient/Zi_zh-cn.js | 1 + .../Viewsjs/MsOpSeae/MsOpSeaeIndex.js | 190 ++++++----- 18 files changed, 439 insertions(+), 276 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_recvapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_recvapplicationController.cs index 845640c2..f37b9392 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_recvapplicationController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_recvapplicationController.cs @@ -231,12 +231,12 @@ namespace DSWeb.Areas.Account.Controllers } - public ContentResult AddDetail(string bill, string data, string curr) + public ContentResult AddDetail(string bill, string data, string curr,string isdd="0") { var bodyList = JsonConvert.Deserialize>(data); var modb = new ModelObjectDB(); - DBResult result = ChrecvapplicationDAL.AddDetail(bill, bodyList, curr, Convert.ToString(Session["COMPANYID"])); + DBResult result = ChrecvapplicationDAL.AddDetail(bill, bodyList, curr, Convert.ToString(Session["COMPANYID"]), isdd); if (result.Success) { ChrecvapplicationDAL.p_update_Amount(bill); } @@ -244,7 +244,7 @@ namespace DSWeb.Areas.Account.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } - public ContentResult AddBill(string billno, string billcust, string billcurr, string feesql, string storeCurrExrate, bool custgroup = false) + public ContentResult AddBill(string billno, string billcust, string billcurr, string feesql, string storeCurrExrate, bool custgroup = false, string isdd = "0") { var exrateList = JsonConvert.Deserialize>(storeCurrExrate); @@ -255,7 +255,7 @@ namespace DSWeb.Areas.Account.Controllers if ((exrateList == null) || (exrateList.Count == 0)) { var modb = new ModelObjectDB(); - DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), custgroup); + DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]), custgroup, isdd); if (result.Success) { ChrecvapplicationDAL.p_update_Amount(billno); } var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; @@ -276,7 +276,7 @@ namespace DSWeb.Areas.Account.Controllers { var modb = new ModelObjectDB(); - DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"])); + DBResult result = ChrecvapplicationDAL.AddBill(billno, billcust, billcurr, feesql, exrateList, Convert.ToString(Session["COMPANYID"]), Convert.ToString(Session["USERID"]), Convert.ToString(Session["SHOWNAME"]),false,isdd); if (result.Success) { ChrecvapplicationDAL.p_update_Amount(billno); } var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs index 1979b57c..1a1f690f 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoice_HangXin/Chfee_InvoiceDAL.cs @@ -96,6 +96,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin strSql.Append(",(select ADDRESS from [company] where gid=cm.SALECORPID) ADDRESS"); strSql.Append(",(select BILLRISES from [company] where gid=cm.SALECORPID) BILLRISES"); strSql.Append(",PAYEE,CHECKER,SETRED,INVITERFACE"); + strSql.Append(",(select top 1 REMARK from [info_client_inv] where CUSTNAME=cm.CUSTOMERNAME) INVREMARK"); strSql.Append(" FROM ch_fee_invoice cm where 1=1 "); if (!string.IsNullOrEmpty(strCondition)) @@ -184,7 +185,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin strSql.Append(",(select OFFICEPHONE from [company] where gid=cm.SALECORPID) OFFICEPHONE"); strSql.Append(",(select ADDRESS from [company] where gid=cm.SALECORPID) ADDRESS"); strSql.Append(",(select BILLRISES from [company] where gid=cm.SALECORPID) BILLRISES"); - + strSql.Append(",(select top 1 REMARK from [info_client_inv] where CUSTNAME=cm.CUSTOMERNAME) INVREMARK"); strSql.Append(",PAYEE,CHECKER,SETRED,INVITERFACE"); strSql.Append(" FROM ch_fee_invoice cm where 1=1 "); @@ -336,6 +337,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoice_HangXin data.CREATEUSERREF = Convert.ToString(reader["CREATEUSERREF"]); if (reader["CREATETIME"] != DBNull.Value) data.CREATETIME = Convert.ToDateTime(reader["CREATETIME"]).ToString("yyyy-MM-dd HH:mm:ss"); + data.INVREMARK= Convert.ToString(reader["INVREMARK"]); #endregion headList.Add(data); } diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs index 4d2aacc6..d2103821 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs @@ -404,6 +404,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" SELECT GID,LINKGID,BILLSTATUS,CUSTOMERNAME,INVOICECUSTNAME,AMOUNT,CURRENCY,REMARK,CUSTRATENO,CUSTADDRTEL,CUSTBANK,CUSTTEL,CUSTADDR "); strSql.Append(",EMAIL,GOODSNAME,(Select GOODNAME from code_goods_inv where GID=ch_fee_invoiceapplication_detail.GOODSNAME) AS GOODSNAMEREF"); strSql.Append(",(SELECT TOP 1 INVOICENO FROM ch_fee_invoice WHERE BILLNO = ch_fee_invoiceapplication_detail.INVBILLNO) INVOICENO,INVOICELINE "); + strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=80003 and EnumValueID=ch_fee_invoiceapplication_detail.INVOICELINE) as INVOICELINEREF"); strSql.Append(" FROM ch_fee_invoiceapplication_detail "); if (!string.IsNullOrEmpty(strCondition)) @@ -1879,7 +1880,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); - strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } else { @@ -1892,7 +1893,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" FROM CH_FEE f "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" LEFT JOIN v_op_gain_cust_sum g ON (g.BSNO=B.BSNO and g.CUSTOMERNAME=f.CUSTOMERNAME) "); - strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" where f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } @@ -1909,7 +1910,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication } + + if (INVISNOTSTL.PARAMVALUE == "1") + { strSql.Append(" and ISNULL(f.AMOUNT,0)<>ISNULL(f.SETTLEMENT,0) "); + } var isopen = MsBaseInfoDAL.GetUserModuleEnable("modFeenotopen", userid); if (isopen == false) @@ -1997,7 +2002,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(" FROM CH_FEE f "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); - strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } else @@ -2005,7 +2010,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append("SELECT COUNT(*) FROM (select b.BSNO,f.CUSTOMERNAME "); strSql.Append(" FROM CH_FEE f "); strSql.Append(" INNER JOIN V_OP_BILL B ON (F.BSNO=B.BSNO) "); - strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" where f.ISINVOICE<>1 and f.FEESTATUS IN (0,8,9) and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } if (!string.IsNullOrEmpty(strCondition)) @@ -2578,7 +2583,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName"); strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,d.DEBITAMOUNT from ch_fee f "); strSql.Append(" left join ch_dui_detail d on (d.CH_ID=f.GID) WHERE D.DUINO='" + duino + "' AND ISNULL(D.INVNO,'')='' "); - strSql.Append(" and (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } else @@ -2589,7 +2594,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication strSql.Append(",f.feeName,f.customerName,f.amount,f.amount-isnull(f.INVOICE,0)-isnull(f.ORDERINVOICE,0)+isnull(f.ORDERINVSETTLEMENT,0) as balamount,f.currency,f.exChangerate,f.AccTaxRate,f.remark"); strSql.Append(",(select ShowName from [user] where GID=f.EnteroPerator) as OpName"); strSql.Append(",f.INPUTMODE,f.UNIT,f.UNITPRICE,f.QUANTITY,0 DEBITAMOUNT from ch_fee f "); - strSql.Append(" where (f.AMOUNT-f.ORDERAMOUNT)<>0 and f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); + strSql.Append(" where f.ISINVOICE<>1 and (f.AMOUNT<>(ISNULL(f.INVOICE,0)+ISNULL(f.ORDERINVOICE,0)-ISNULL(f.ORDERINVSETTLEMENT,0))) and ISNULL(f.INVLINKGID,'')='' "); } var InvAppFeeStatus = MsSysParamSetDAL.GetData("PARAMNAME='InvAppFeeStatus'"); if (InvAppFeeStatus.PARAMVALUE != "2") diff --git a/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs index 52123f95..a2960330 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs @@ -1200,7 +1200,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication - public static DBResult AddDetail(string billno, List bodyList, string curr, string companyid) + public static DBResult AddDetail(string billno, List bodyList, string curr, string companyid, string isdd = "0") { var result = new DBResult(); @@ -1228,6 +1228,14 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication @"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0) OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))"); + if (isdd == "1") + { + cmdUpdate = + db.GetSqlStringCommand( + @"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT,ORDERINVOICE=isnull(ORDERINVOICE,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0) + OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))"); + + } if (bodyList != null) { @@ -1310,7 +1318,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication } - public static DBResult AddBill(string billno, string billcust, string billcurr, string feesql, List exratelist, string companyid,string userid,string username, bool custgroup = false) + public static DBResult AddBill(string billno, string billcust, string billcurr, string feesql, List exratelist, string companyid,string userid,string username, bool custgroup = false, string isdd = "0") { var result = new DBResult(); var recapp = GetData("BILLNO='"+billno+"'"); @@ -1346,7 +1354,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication @"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0) OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))"); + if (isdd == "1") { + cmdUpdate = + db.GetSqlStringCommand( + @"UPDATE CH_FEE SET ORDERAMOUNT=ISNULL(ORDERAMOUNT,0)+@ORDERAMOUNT,ORDERINVOICE=isnull(ORDERINVOICE,0)+@ORDERAMOUNT WHERE GID=@GID AND ((AMOUNT>=0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT2)>=0) + OR (AMOUNT<0 AND ((AMOUNT-SETTLEMENT)-@ORDERAMOUNT3)<=0))"); + } if (feelist != null) { @@ -1472,6 +1486,13 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication public static DBResult DelFeeDo(List boday) { var result = new DBResult(); + if (boday == null || boday.Count == 0) { + result.Success = true; + result.Message = "成功"; + return result; + } + + var headdata = GetData("BILLNO='"+ boday[0].BILLNO + "'"); Database db = DatabaseFactory.CreateDatabase(); using (var conn = db.CreateConnection()) @@ -1487,6 +1508,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication { var cmdupdate = db.GetSqlStringCommand("update ch_fee set ORDERAMOUNT=isnull((select sum(Amount) from ch_fee_do where GID<>@FEEDOID and feeid=ch_fee.gid and CATEGORY in(2,5) ),0) where GID=@GID"); + if (headdata.SETTLEMODE == 3) { + cmdupdate = db.GetSqlStringCommand("update ch_fee set ORDERAMOUNT=isnull((select sum(Amount) from ch_fee_do where GID<>@FEEDOID and feeid=ch_fee.gid and CATEGORY in(2,5) ),0),ORDERINVOICE=ORDERINVOICE-@ORDERINVOICE where GID=@GID"); + + } + var cmddelete = db.GetSqlStringCommand("delete from ch_fee_do where GID=@FEEDOID"); @@ -1497,7 +1523,11 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication cmdupdate.Parameters.Clear(); db.AddInParameter(cmdupdate, "@FEEDOID", DbType.String, enumValue.FEEDOID); db.AddInParameter(cmdupdate, "@GID", DbType.String, enumValue.FEEID); - db.ExecuteNonQuery(cmdupdate, tran); + if (headdata.SETTLEMODE == 3) + { + db.AddInParameter(cmdupdate, "@ORDERINVOICE", DbType.Decimal, enumValue.ORIGAMOUNT); + } + db.ExecuteNonQuery(cmdupdate, tran); cmddelete.Parameters.Clear(); db.AddInParameter(cmddelete, "@FEEDOID", DbType.String, enumValue.FEEDOID); diff --git a/DSWeb/Areas/Account/Models/Chfee_invoice/Chfee_Invoice.cs b/DSWeb/Areas/Account/Models/Chfee_invoice/Chfee_Invoice.cs index 47751f48..8a869cba 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoice/Chfee_Invoice.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoice/Chfee_Invoice.cs @@ -104,7 +104,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoice } public string CREATEUSERREF { get; set; } - + public string INVREMARK { get; set; } [ModelDB(MDBType = ModelDBOprationType.Insert)] public string CREATETIME diff --git a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs index f0cd0746..f3cacb91 100644 --- a/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs +++ b/DSWeb/Areas/Account/Models/Chfee_invoiceapplication/Chfee_Invoiceapplication.cs @@ -440,6 +440,7 @@ namespace DSWeb.Areas.Account.Models.Chfee_Invoiceapplication [ModelDB] public string INVOICELINE { get; set; } + public string INVOICELINEREF { get; set; } public string GOODSNAMEREF { get; set; } public string INVBILLNO { get; set; } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js index d50d1426..f55a96aa 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js @@ -1237,6 +1237,14 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { }] }] + }, { + xtype: 'textareafield', + grow: true, + name: 'INVREMARK', + readOnly: true, + height: 61, + fieldLabel: '客户发票备注', + anchor: '100%' }, ////// { @@ -2165,7 +2173,152 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { } }); + this.initappgirdcolums = [{ + sortable: false, + dataIndex: 'BILLNO', + header: '申请单号', + width: 120 + }, { + sortable: false, + dataIndex: 'BILLSTATUSREF', + header: '状态', + width: 80 + }, { + sortable: true, + dataIndex: 'INVTYPE', + header: '开票方式', + width: 60 + }, { + sortable: true, + dataIndex: 'APPLYAMOUNT', + header: '人民币金额', + align: 'right', + width: 100, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + } + }, { + sortable: true, + dataIndex: 'OTCURRAMOUNT', + header: '美元金额', + align: 'right', + width: 100, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + } + }, { + sortable: true, + dataIndex: 'CURRENCY', + header: '开票币别', + width: 60 + }, { + sortable: true, + dataIndex: 'AMOUNT', + header: '折合金额', + align: 'right', + width: 100, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + } + }, { + sortable: true, + dataIndex: 'INVAMOUNT', + header: '开票金额', + align: 'right', + width: 100, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + } + }, { + sortable: false, + dataIndex: 'APPLYTIME', + header: '申请日期', + width: 100 + }, { + sortable: false, + dataIndex: 'APPLICANTNAME', + header: '申请人', + width: 100 + }, { + sortable: false, + dataIndex: 'INVOICENO', + header: '发票号', + width: 120 + }, { + sortable: false, + dataIndex: 'INVOICECUSTNAME', + header: '发票抬头', + width: 160 + }, { + sortable: true, + dataIndex: 'REMARK', + header: '备注', + width: 360 + }, { + sortable: true, + dataIndex: 'SHENREMARK', + header: '开票要求', + width: 360 + } + ]; + this.appgirdcolums=this.initappgirdcolums; this.gridAppList = new Ext.grid.GridPanel({ store: this.storeBodyAppList, enableHdMenu: false, @@ -2177,158 +2330,28 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { viewConfig: { enableTextSelection: true }, - //tbar: [{ - // text: '删除申请明细', - // tooltip: '删除申请明细', - // iconCls: "btndeletedetail", - // id: "btndeldetail", - // handler: function (button, event) { - // this.onDeleteClick(button, event); - // }, - // scope: this - //}], - columns: [{ - sortable: false, - dataIndex: 'BILLNO', - header: '申请单号', - width: 120 - }, { - sortable: false, - dataIndex: 'BILLSTATUSREF', - header: '状态', - width: 80 - }, { - sortable: true, - dataIndex: 'INVTYPE', - header: '开票方式', - width: 60 - }, { - sortable: true, - dataIndex: 'APPLYAMOUNT', - header: '人民币金额', - align: 'right', - width: 100, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; - } - } - else { - return value; - } - } - catch (e) { - return value; - } - return value; - } - }, { - sortable: true, - dataIndex: 'OTCURRAMOUNT', - header: '美元金额', - align: 'right', - width: 100, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; - } - } - else { - return value; - } - } - catch (e) { - return value; - } - return value; - } - }, { - sortable: true, - dataIndex: 'CURRENCY', - header: '开票币别', - width: 60 - }, { - sortable: true, - dataIndex: 'AMOUNT', - header: '折合金额', - align: 'right', - width: 100, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; - } - } - else { - return value; - } - } - catch (e) { - return value; - } - return value; - } - }, { - sortable: true, - dataIndex: 'INVAMOUNT', - header: '开票金额', - align: 'right', - width: 100, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; - } - } - else { - return value; - } + tbar: [{ + text: "保存列表样式", + id: "btntest", + menu: [ + { + text: "保存", + handler: function (button, event) { + this.appgirdcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppList.columns, _this.appgirdcolums, 1, true); } - catch (e) { - return value; + }, { + text: "初始化", + handler: function (menu, event) { + _this.appgirdcolums = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppList.columns, _this.initappgirdcolums, 1, true); } - return value; - } - }, { - sortable: false, - dataIndex: 'APPLYTIME', - header: '申请日期', - width: 100 - }, { - sortable: false, - dataIndex: 'APPLICANTNAME', - header: '申请人', - width: 100 - }, { - sortable: false, - dataIndex: 'INVOICENO', - header: '发票号', - width: 120 - }, { - sortable: false, - dataIndex: 'INVOICECUSTNAME', - header: '发票抬头', - width: 160 - }, { - sortable: false, - dataIndex: 'REMARK', - header: '备注', - width: 260 - } - ] + }], + scope: this + }], + columns: this.appgirdcolums }); - + this.appgirdcolums = DsTruck.GetGridPanel(USERID, this.formname+'app', this.appgirdcolums, 1); //使用者id,表名,中间column数组,跳过一开始的几列 + this.gridAppList.reconfigure(this.storeBodyAppList, this.appgirdcolums); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceModel.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceModel.js index 17d0ed5c..91d74afa 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceModel.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceModel.js @@ -81,7 +81,8 @@ { name: 'PUSHMODEREF', type: 'string' }, { name: 'INVOICELINEREF', type: 'string' }, { name: 'EINVOICESTATEREF', type: 'string' }, - { name: 'SETRED', type: 'string' } + { name: 'SETRED', type: 'string' }, + { name: 'INVREMARK', type: 'string' } ] diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js index e2546f18..eba36812 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js @@ -181,6 +181,10 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { trackMouseOver: true, disableSelection: false, selModel: this.GridCheckBoxModel, + viewConfig: { + enableTextSelection: true, + autoFill: true + }, columns: this.girdcolums , // paging bar on the bottom bbar: [Ext.create('Ext.PagingToolbar', { @@ -856,7 +860,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { store: this.StoreINVOICELINE, forceSelection: true, name: 'INVOICELINE', - valueField: 'EnumValueName', + valueField: 'EnumValueId', displayField: 'EnumValueName' }); @@ -968,6 +972,9 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { dataIndex: 'INVOICELINE', header: '发票种类', editor: this.comboxINVOICELINE, + renderer: function (value, p, record) { + return record.data.INVOICELINEREF; + }, width: 80 }, { sortable: false, @@ -1512,9 +1519,20 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { } + } else if (e.field == 'INVOICELINE') { + var records = DsStoreQueryBy(this.StoreINVOICELINE, 'EnumValueId', e.value); + if (records.getCount() > 0) { + var data = records.getAt(0).data; + var CLIENTNAME = data.EnumValueName; + e.record.set('INVOICELINEREF', CLIENTNAME); + } } }, + + + + onAddInvAppDetailClick: function () { var selections = this.gridList.getSelectionModel().getSelection(); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js index 692423a7..66dcfd3b 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js @@ -297,7 +297,15 @@ Ext.extend(Shipping.ChInvoiceapplicationAudit, Ext.Panel, { displayField: 'NAME', forceSelection: true, name: 'DC', - value: '1' + value: '1', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); this.storeCustCode = Ext.create('DsExt.ux.RefTableStore', { @@ -340,7 +348,15 @@ Ext.extend(Shipping.ChInvoiceapplicationAudit, Ext.Panel, { forceSelection: true, name: 'APPLICANT', valueField: 'GID', - displayField: 'CodeAndName' + displayField: 'CodeAndName', + enableKeyEvents: true, + listeners: { + keyup: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } }); this.formSearch = Ext.widget('form', { diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js index c60e0ac8..cae39295 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationModel.js @@ -194,6 +194,8 @@ Ext.define('ChInvoiceapplicationDetail', { { name: 'LINKGID', type: 'string' }, { name: 'BILLSTATUS', type: 'string' }, { name: 'INVOICELINE', type: 'string' }, + + { name: 'INVOICELINEREF', type: 'string' }, { name: 'INVOICECUSTNAME', type: 'string' }, { name: 'CUSTOMERNAME', type: 'string' }, { name: 'AMOUNT', type: 'string' }, diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js index 7ad18d9a..4d4233dd 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js @@ -1409,12 +1409,21 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { }); - this.comboxINVOICELINE = getEnumcombox({ - NAME: 'INVOICELINE', - enumTypeId: 80003 + this.StoreINVOICELINE = Ext.create('DsExt.ux.RefTableStore', { + model: 'DsExtEnumModel', + proxy: { url: '/CommMng/PubSys/GetEnumValueList' } }); + this.StoreINVOICELINE.load({ params: { enumTypeId: 80003 } }); + this.comboxINVOICELINE = Ext.create('DsExt.ux.RefTableCombox', { + store: this.StoreINVOICELINE, + forceSelection: true, + name: 'INVOICELINE', + valueField: 'EnumValueId', + displayField: 'EnumValueName' + }); + this.gridAppDetailList = new Ext.grid.GridPanel({ store: this.storeAppDetailList, enableHdMenu: false, @@ -1487,6 +1496,9 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { dataIndex: 'INVOICELINE', header: '发票种类', editor: this.comboxINVOICELINE, + renderer: function (value, p, record) { + return record.data.INVOICELINEREF; + }, width: 80 }, { sortable: false, @@ -3704,6 +3716,13 @@ gridListDetailAfterEdit: function (editor, e, eOpts) { e.record.set('GOODSNAMEREF', ''); } + } else if (e.field == 'INVOICELINE') { + var records = DsStoreQueryBy(this.StoreINVOICELINE, 'EnumValueId', e.value); + if (records.getCount() > 0) { + var data = records.getAt(0).data; + var CLIENTNAME = data.EnumValueName; + e.record.set('INVOICELINEREF', CLIENTNAME); + } } }, @@ -3866,12 +3885,18 @@ onUpKeyClick: function (col) { var bodyDatas = []; for (var i = 0; i < selectedRecords.length; i++) { var rec = selectedRecords[i]; - if (rec.GID == "" || rec.PID == "*") //如果是新增但没有保存的数据,没有必要提交到后台 - { - this.storeAppDetailList.remove(selectedRecords[i]); + if (rec.data.BILLSTATUS != '已开') { + if (rec.GID == "" || rec.PID == "*") //如果是新增但没有保存的数据,没有必要提交到后台 + { + this.storeAppDetailList.remove(selectedRecords[i]); + } else { + + bodyDatas.push(rec); + } } else { + Ext.Msg.show({ title: '提示', msg: '已开发票不允许删除!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; - bodyDatas.push(rec); } } var jsonBody = ConvertRecordsToJsonAll(bodyDatas); @@ -6231,15 +6256,22 @@ NextRecord: function () { //合计选中的费用数字和 onSelectFee: function (button, event) { //Ext.getCmp("zongshu").setText("1234"); - + var rmbsum = 0; + var usdsum = 0; var selectedRecords = this.gridAddFeeList.selModel.getSelection(); var sum = 0; for (var i = 0; i < selectedRecords.length; i++) { var rec = selectedRecords[i]; - sum = sum + rec.get("StlAmount"); + if (rec.get('Currency') == 'RMB') { + rmbsum = rmbsum + rec.get("StlAmount"); + } else if (rec.get('Currency') == 'USD') { + usdsum = usdsum + rec.get("StlAmount"); + } + } - sum = sum.toFixed(2); - Ext.getCmp("zongshu").setText(" 选中金额:" + sum); + rmbsum = rmbsum.toFixed(2); + usdsum = usdsum.toFixed(2); + Ext.getCmp("zongshu").setText(" 选中金额 RMB:" + rmbsum + " USD:" + usdsum); }, diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationDdEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationDdEdit.js index b9d16172..95af2d08 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationDdEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationDdEdit.js @@ -2485,7 +2485,8 @@ Ext.extend(Shipping.MsChRecvapplicationDdEdit, Ext.Panel, { params: { bill: billno, data: jsonbodyAddDatas, - curr: billcurr + curr: billcurr, + isdd:'1' }, callback: function (options, success, response) { if (success) { @@ -2773,7 +2774,8 @@ Ext.extend(Shipping.MsChRecvapplicationDdEdit, Ext.Panel, { billcurr: billcurr, feesql: sql, storeCurrExrate: currBody, - custgroup: true + custgroup: true, + isdd: '1' }, callback: function (options, success, response) { if (success) { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index f9cad92b..bb691067 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -16150,6 +16150,8 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL dlPKGS += ctn.PKGS; dlKGS += ctn.KGS; dlCBM += ctn.CBM; + if (ctn.CNTRNO == "") + { error = error + "
提单号:" + bill.MBLNO + "集装箱箱号不能为空!"; } } } @@ -16161,6 +16163,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL { error = error + "
提单号:" + bill.MBLNO + " 集装箱重量合计数必须等于委托单总重量数"; } if (dlCBM != Convert.ToDecimal(bill.CBM)) { error = error + "
提单号:" + bill.MBLNO + " 集装箱尺码合计数必须等于委托单总尺码数"; } + } } @@ -16696,7 +16699,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL tempstr += GetSpaceStr("", 14);//13 //Filler//M//X(14)//237 //250 //Spaces tempstr = GetSpaceStr(tempstr, 236); - tempstr += GetSpaceStr(OpAms.SalesRepCode, 14);//13 //Filler//M//X(14)//237 //250 //Spaces + if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付 { tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code @@ -17875,9 +17878,15 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL // tempstr += GetSpaceStr("", 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填 //} //else - //{ - tempstr += GetSpaceStr(OpAms.ShipperEdiCode, 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填 - //} + if (filetype == "E") + { + tempstr += GetSpaceStr(ftpset.ALIASSENDCODE, 10); + } + else { + tempstr += GetSpaceStr(OpAms.ShipperEdiCode, 10); + } + + //} tempstr += GetSpaceStr("", 3);//4//Shipper Code//O//X(3)//16//18//webcsm Partner Subcode tempstr += GetSpaceStr("", 4);//5//Filler//M//X(4)//19//22//Spaces var Shipping = ""; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js index f2bb3520..caf3326d 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/MsInfoClientEdit.js @@ -2044,6 +2044,16 @@ Ext.extend(Shipping.MsInfoClientEdit, Ext.Panel, { selectOnFocus: true, enableKeyEvents: true } + }, { + sortable: true, + dataIndex: 'REMARK', + width: 200, + header: Zi.LAN.INVREMARK, //'汇率', + editor: { + xtype: 'textfield', + selectOnFocus: true, + enableKeyEvents: true + } } ] }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js index 94cf3d02..4a7466e5 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_en-us.js @@ -309,4 +309,5 @@ Zi.LAN.CARRIER = "船公司"; Zi.LAN.STLREMARK = "结算描述"; Zi.LAN.INVOICECUSTNAME = "发票抬头"; Zi.LAN.CUSTBANK = "人民币银行账号"; -Zi.LAN.CUSTUSDBANK = "美元银行账号"; \ No newline at end of file +Zi.LAN.CUSTUSDBANK = "美元银行账号"; +Zi.LAN.INVREMARK = "开票备注"; \ No newline at end of file diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js index 07cdcd20..f25ca800 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsInfoClient/Zi_zh-cn.js @@ -311,3 +311,4 @@ Zi.LAN.STLREMARK = "结算描述"; Zi.LAN.INVOICECUSTNAME = "发票抬头"; Zi.LAN.CUSTBANK = "人民币银行账号"; Zi.LAN.CUSTUSDBANK = "美元银行账号"; +Zi.LAN.INVREMARK = "开票备注"; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index 827582b1..e2e349d8 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -631,7 +631,15 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { dataIndex: 'VESSEL', header: Zi.LAN.VESSEL, //'船名', width: 100, - filter: true + filter: true, + renderer: function (value, meta) { + + meta.tdCls = 'mblno'; + + btnurl = getGridCopyButton(value); + + return btnurl + value; + } }, { sortable: true, @@ -7862,99 +7870,101 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { icount = icount + 1; } } - - var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); - Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); - Ext.Ajax.request({ - waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, - url: '/MvcShipping/MsOpSeae/IsDeleteList', - params: { - data: jsonbodyAddDatas - }, - callback: function (options, success, response) { - if (success) { - var jsonresult = Ext.JSON.decode(response.responseText); - if (jsonresult.Success) { - Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); - Ext.Ajax.request({ - waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, - url: '/MvcShipping/MsOpSeae/DeleteList', - params: { - data: jsonbodyAddDatas - }, - callback: function (options, success, response) { - if (success) { - var jsonresult = Ext.JSON.decode(response.responseText); - if (jsonresult.Success) { - this.onDsQuery(); - if (jsonresult.Message != '') - Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - else - Ext.Msg.hide(); - } - else { - Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); - } - } - }, - failure: function (response, options) { - Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - }, - success: function (response, options) { }, - scope: this - }); //end Ext.Ajax.request - } - else { - if (jsonresult.Message!='') { - Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); - } else { - Ext.MessageBox.confirm(Zi.LAN.TiShi, jsonresult.Message2 +"确定删除吗?", function (btn) { - if (btn == 'yes') { - - var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); - Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); - Ext.Ajax.request({ - waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, - url: '/MvcShipping/MsOpSeae/DeleteList', - params: { - data: jsonbodyAddDatas - }, - callback: function (options, success, response) { - if (success) { - var jsonresult = Ext.JSON.decode(response.responseText); - if (jsonresult.Success) { - this.onDsQuery(); - if (jsonresult.Message != '') - Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - else - Ext.Msg.hide(); - } - else { - Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); - } + Ext.MessageBox.confirm(Zi.LAN.TiShi, "确定删除吗?", function (btn) { + if (btn == 'yes') { + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsOpSeae/IsDeleteList', + params: { + data: jsonbodyAddDatas + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsOpSeae/DeleteList', + params: { + data: jsonbodyAddDatas + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + _thisopseaeindex.onDsQuery(); + if (jsonresult.Message != '') + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + else + Ext.Msg.hide(); } - }, - failure: function (response, options) { - Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - }, - success: function (response, options) { }, - scope: this - }); //end Ext.Ajax.request - } - }, this); + else { + Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + } + }, + failure: function (response, options) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { }, + scope: this + }); //end Ext.Ajax.request + } + else { + if (jsonresult.Message != '') { + Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } else { + Ext.MessageBox.confirm(Zi.LAN.TiShi, jsonresult.Message2 + "确定删除吗?", function (btn) { + if (btn == 'yes') { + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); + Ext.Ajax.request({ + waitMsg: Zi.LAN.ZhengZaiCaoZuoShuJu, + url: '/MvcShipping/MsOpSeae/DeleteList', + params: { + data: jsonbodyAddDatas + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + _thisopseaeindex.onDsQuery(); + if (jsonresult.Message != '') + Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + else + Ext.Msg.hide(); + } + else { + Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + } + }, + failure: function (response, options) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { }, + scope: this + }); //end Ext.Ajax.request + } + }, this); - } - } - } - }, - failure: function (response, options) { - Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); - }, - success: function (response, options) { }, - scope: this - }); //end Ext.Ajax.request + } + } + } + }, + failure: function (response, options) { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: Zi.LAN.FuWuQiXiangYingChuCuo, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { }, + scope: this + }); //end Ext.Ajax.request + } + });