From 955d619f3819fc403ecd7ad53ec0d1bfae83f6da Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Tue, 27 Dec 2022 15:23:44 +0800 Subject: [PATCH] 1 --- .../Chfee_payapplicationController.cs | 4 +- .../Controllers/MsOpSeaeController.cs | 6 +- .../MvcShipping/DAL/MsChFee/MsChFeeDAL.cs | 4 +- .../MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs | 58 +++++++++---------- .../DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs | 14 +++-- .../Viewsjs/MsChFee/FeeDrCrGrid.js | 46 +++++++++------ .../Viewsjs/MsChFee/FeeDrCrGridView.js | 10 ++++ .../Viewsjs/MsOpSeae/MsOpSeaeEdit.js | 31 +++++----- .../Viewsjs/MsOpSeae/MsOpSeaeIndex.js | 2 +- 9 files changed, 103 insertions(+), 72 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs index 112dcdfb..fa9ad5f0 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs @@ -967,7 +967,7 @@ namespace DSWeb.Areas.Account.Controllers T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); - string blUpSQL = " update ch_fee_payapplication set ISPRINT='1',PRINTCOUNT=ISNULL(PRINTCOUNT,0)+1 where BILLNO IN (" + billnos + ")"; + string blUpSQL = " update ch_fee_payapplication set ISPRINT='1',PRINTCOUNT=ISNULL(PRINTCOUNT,0)+1,PRINTTIME=GETDATE() where BILLNO IN (" + billnos + ")"; bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); result.Success = true; @@ -989,7 +989,7 @@ namespace DSWeb.Areas.Account.Controllers T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); - string blUpSQL = " update ch_fee_payapplication set ISPRINT='0' where BILLNO IN (" + billnos + ")"; + string blUpSQL = " update ch_fee_payapplication set ISPRINT='0',PRINTTIME=NULL where BILLNO IN (" + billnos + ")"; bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); result.Success = true; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs index 5c40a43a..8a8fd9fc 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs @@ -1734,9 +1734,9 @@ namespace DSWeb.MvcShipping.Controllers } } - if (detailpkgs > pkgs) errorstr = errorstr + " 多品名中 件数总和 超出 集装箱件数!"; - if (detailkgs > kgs) errorstr = errorstr + " 多品名中 重量总和 超出 集装箱重量!"; - if (detailcbm > cbm) errorstr = errorstr + " 多品名中 立方数总和 超出 集装箱立方!"; + if (detailpkgs !=pkgs) errorstr = errorstr + " 多品名中 件数总和与集装箱件数不一致!"; + if (detailkgs !=kgs) errorstr = errorstr + " 多品名中 重量总和与集装箱重量不一致!"; + if (detailcbm !=cbm) errorstr = errorstr + " 多品名中 立方数总和与集装箱立方不一致!"; if (errorstr != "") { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs index 97fa27d0..35050ef0 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs @@ -6054,6 +6054,8 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL } + var YJFEENAME = MsSysParamSetDAL.GetData("PARAMNAME='DZLXFeeCustName'"); + T_ALL_DA T_ALL_DA = new T_ALL_DA(); Database db = DatabaseFactory.CreateDatabase(); using (var conn = db.CreateConnection()) @@ -6137,7 +6139,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL else { db.AddInParameter(cmdInsert, "@fee_type", DbType.Int16, 2); - db.AddInParameter(cmdInsert, "@customer_name", DbType.String, "青岛鼎程供应链"); + db.AddInParameter(cmdInsert, "@customer_name", DbType.String, YJFEENAME.PARAMVALUE); } db.AddInParameter(cmdInsert, "@unit", DbType.String, "票"); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs index b31266d2..27855eaf 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeDAL.cs @@ -1798,34 +1798,34 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL if (headData.HBLNO.Trim() == "" || headData.HBLNO == null) { - var billnosethblno = MsSysBillNoSetDAL.GetData("OPLBNAME='海运出口' AND RULEBLNO='分提单号' ", companyid); - if (billnosethblno.BILLTYPE != "" && billnosethblno.ISAUTO == "1") - { - if (billnosethblno.CUSTOMHEAD != "") - { - var HBLCUSTOMHEAD = billnosethblno.CUSTOMHEAD; - var bssource = BasicDataRefDAL.GetSourceData("SOURCENAME='" + headData.BSSOURCE + "'"); - var lanelist = BasicDataRefDAL.GetCodeLaneList(); - var lane = lanelist.Find(x => x.LANE == headData.LANE); - var bstypelist = PubSysDAL.GetEnumValueList(97042, ""); - var bstype = bstypelist.Find(x => x.EnumValueName == headData.BLTYPE); - HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BS]", bssource.SOURCECODE); - if (lane != null) - HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[LN]", lane.LANEID); - if (bstype != null) - HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BT]", bstype.EnumValueName_2); - // HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BS]", bssource.SOURCECODE); - // HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BS]", bssource.SOURCECODE); - - var hblno = MsSysBillNoSetDAL.GetBillNoHblno(billnosethblno, headData.ETD.ToString().Trim(), headData.ACCDATE.ToString().Trim(), HBLCUSTOMHEAD); - headData.HBLNO = hblno; - } - else - { - var hblno = MsSysBillNoSetDAL.GetBillNo(billnosethblno, headData.ETD.ToString().Trim(), headData.ACCDATE.ToString().Trim(), "", headData.OP, headData.SALECORPID); - headData.HBLNO = hblno; - } - } + //var billnosethblno = MsSysBillNoSetDAL.GetData("OPLBNAME='海运出口' AND RULEBLNO='分提单号' ", companyid); + //if (billnosethblno.BILLTYPE != "" && billnosethblno.ISAUTO == "1") + //{ + // if (billnosethblno.CUSTOMHEAD != "") + // { + // var HBLCUSTOMHEAD = billnosethblno.CUSTOMHEAD; + // var bssource = BasicDataRefDAL.GetSourceData("SOURCENAME='" + headData.BSSOURCE + "'"); + // var lanelist = BasicDataRefDAL.GetCodeLaneList(); + // var lane = lanelist.Find(x => x.LANE == headData.LANE); + // var bstypelist = PubSysDAL.GetEnumValueList(97042, ""); + // var bstype = bstypelist.Find(x => x.EnumValueName == headData.BLTYPE); + // HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BS]", bssource.SOURCECODE); + // if (lane != null) + // HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[LN]", lane.LANEID); + // if (bstype != null) + // HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BT]", bstype.EnumValueName_2); + // // HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BS]", bssource.SOURCECODE); + // // HBLCUSTOMHEAD = HBLCUSTOMHEAD.Replace("[BS]", bssource.SOURCECODE); + + // var hblno = MsSysBillNoSetDAL.GetBillNoHblno(billnosethblno, headData.ETD.ToString().Trim(), headData.ACCDATE.ToString().Trim(), HBLCUSTOMHEAD); + // headData.HBLNO = hblno; + // } + // else + // { + // var hblno = MsSysBillNoSetDAL.GetBillNo(billnosethblno, headData.ETD.ToString().Trim(), headData.ACCDATE.ToString().Trim(), "", headData.OP, headData.SALECORPID); + // headData.HBLNO = hblno; + // } + //} } else { @@ -2254,7 +2254,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeDAL } } } - var strall = Encoding.Default.GetString(t).Replace("’", "'").Replace("‐", "-"); + var strall = Encoding.Default.GetString(t).Replace("’", "'").Replace("‐", "-").Replace("–", "-"); return strall; } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index 4ea907ed..95fe3394 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -1680,15 +1680,20 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL public static bool IsChinese(char c) { - return (int)c > 0x80; + if (c != '–') + return false; + else + return (int)c > 0x80; } public static bool StringIsChinese(string str) { var result = false; + var tmpstr = ""; for (int i = 1; i < str.Length; i++) { if (IsChinese(str[i])) { + tmpstr = str[i].ToString(); result = true; return result; } @@ -1699,6 +1704,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL int ilen = System.Text.Encoding.Default.GetByteCount(stemp); if (ilen == 2) { + tmpstr = stemp; result = true; return result; } @@ -25432,13 +25438,13 @@ 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 (bill.BLFRT.IndexOf("FREIGHT PREPAID") > -1)//运费预付 + if (!string.IsNullOrEmpty(bill.SERVICECONTRACTNO))//运费预付 { - tempstr += GetSpaceStr(OpAms.ShipperEdiCode, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code + tempstr += GetSpaceStr(bill.SERVICECONTRACTNO, 10);//3 //Booking Party Code//O//X(10)//6 //15 //webcsm Partner Code } else { - tempstr += GetSpaceStr(OpAms.ConsigneeEdiCode, 10);//3//Shipper Code//O//X(10)//6//15//webcsm Partner Code//mandtory for CIF shpts,预付必填 + 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 diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js index dd8c7d10..4640a339 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js @@ -5331,14 +5331,19 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { if (CustomerName!=''){ - var recordCustCode = Ext.create('DsShipping.ux.CustomRefModel', { - GId:NewGuid(), - CustCode: CustomerName, - CustName: CustomerName, - CodeAndName: CustomerName, - DESCRIPTION:CustomerName - }); - _thisfee.storeCustomerNameRefM.add(recordCustCode); + + var selectrecords = DsStoreQueryBy(_thisfee.storeCustomerNameRefM, 'CustName', CustomerName); + if (selectrecords.getCount() == 0) { + var recordCustCode = Ext.create('DsShipping.ux.CustomRefModel', { + GId: NewGuid(), + CustCode: CustomerName, + CustName: CustomerName, + CodeAndName: CustomerName, + DESCRIPTION: CustomerName + }); + _thisfee.storeCustomerNameRefM.add(recordCustCode); + } + } @@ -5430,14 +5435,17 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { if (isEmptyObject(recchange)) memberyf.commit(); }; if (CustomerName!=''){ - var recordCustCode = Ext.create('DsShipping.ux.CustomRefModel', { - GId:NewGuid(), - CustCode: CustomerName, - CustName: CustomerName, - CodeAndName: CustomerName, - DESCRIPTION:CustomerName - }); - _thisfee.storeCustomerNameRefM.add(recordCustCode); + var selectrecords = DsStoreQueryBy(_thisfee.storeCustomerNameRefM, 'CustName', CustomerName); + if (selectrecords.getCount() == 0) { + var recordCustCode = Ext.create('DsShipping.ux.CustomRefModel', { + GId: NewGuid(), + CustCode: CustomerName, + CustName: CustomerName, + CodeAndName: CustomerName, + DESCRIPTION: CustomerName + }); + _thisfee.storeCustomerNameRefM.add(recordCustCode); + } } @@ -5458,8 +5466,8 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { DRSELECTSTR.setText('', false); } else { var rec = selections[0]; - - var selectrecords = DsStoreQueryBy(_thisfee.storeCustomerNameRefDr, 'CustName', strCustomerName); + var custname = rec.data.CustomerName; + var selectrecords = DsStoreQueryBy(_thisfee.storeCustomerNameRefDr, 'CustName', custname); if (selectrecords.getCount() == 0) { var custname = rec.data.CustomerName; var recordCustCode = Ext.create('DsShipping.ux.CustomRefModel', { @@ -5536,7 +5544,7 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { } else { var rec = selections[0]; var custname = rec.data.CustomerName; - var selectrecords = DsStoreQueryBy(_thisfee.storeCustomerNameRefCr, 'CustName', strCustomerName); + var selectrecords = DsStoreQueryBy(_thisfee.storeCustomerNameRefCr, 'CustName', custname); if (selectrecords.getCount() == 0) { var recordCustCode = Ext.create('DsShipping.ux.CustomRefModel', { GId: NewGuid(), diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js index 52cf68e6..ab02e994 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js @@ -405,6 +405,11 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, { return record.data.MANAGERREF; }, width: 100 + }, { + sortable: true, + dataIndex: 'SALECORP', + header: '核算单位', //'MANAGER', + width: 100 } ]; @@ -819,6 +824,11 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, { return record.data.MANAGERREF; }, width: 100 + }, { + sortable: true, + dataIndex: 'SALECORP', + header: '核算单位', //'MANAGER', + width: 100 } ]; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index 097e1ec3..34bf0dc2 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -4440,14 +4440,17 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { if ((_this.accdatesameetd == 1) && (FEESTATUSREF=='未锁定')) { var mydatestr = Ext.util.Format.date(ETD, 'Y-m'); if (_this.MsPeriod.CLOSEDAY != 0) { - var lastMonthDate = new Date(ETD); //上月日期 - lastMonthDate.setDate(1); - lastMonthDate.setMonth(lastMonthDate.getMonth() + 1); - var mymonth = Ext.util.Format.date(lastMonthDate, 'm'); - var myyear = Ext.util.Format.date(lastMonthDate, 'Y'); - var mymonthstr = mymonth.toString(); - if (mymonthstr.length == 1) mymonthstr = '0' + mymonthstr; - mydatestr = myyear.toString() + '-' + mymonthstr; + var myday = Ext.util.Format.date(ETD, 'd'); + if (myday > _this.MsPeriod.CLOSEDAY) { + var lastMonthDate = new Date(ETD); //上月日期 + lastMonthDate.setDate(1); + lastMonthDate.setMonth(lastMonthDate.getMonth() + 1); + var mymonth = Ext.util.Format.date(lastMonthDate, 'm'); + var myyear = Ext.util.Format.date(lastMonthDate, 'Y'); + var mymonthstr = mymonth.toString(); + if (mymonthstr.length == 1) mymonthstr = '0' + mymonthstr; + mydatestr = myyear.toString() + '-' + mymonthstr; + } } else { } field = _this.formHead.getForm().findField('ACCDATE'); @@ -13291,10 +13294,12 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { var mydatestr = Ext.util.Format.date(ETD, 'Y-m'); if (this.MsPeriod.CLOSEDAY != 0) { var myday = Ext.util.Format.date(ETD, 'd'); - if (myday > this.MsPeriod.CLOSEDAY) { - var mymonth = Ext.util.Format.date(ETD, 'm'); - var myyear = Ext.util.Format.date(ETD, 'Y'); - mymonth = parseInt(mymonth) + 1; + if (myday > _this.MsPeriod.CLOSEDAY) { + var lastMonthDate = new Date(ETD); //上月日期 + lastMonthDate.setDate(1); + lastMonthDate.setMonth(lastMonthDate.getMonth() + 1); + var mymonth = Ext.util.Format.date(lastMonthDate, 'm'); + var myyear = Ext.util.Format.date(lastMonthDate, 'Y'); var mymonthstr = mymonth.toString(); if (mymonthstr.length == 1) mymonthstr = '0' + mymonthstr; mydatestr = myyear.toString() + '-' + mymonthstr; @@ -14761,7 +14766,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { var KINDPKGS = this.formEdit.getForm().findField('KINDPKGS').getValue(); this.formEdit.getForm().findField('NOPKGS').setValue(PKGS + KINDPKGS); this.formEdit.getForm().findField('TOTALNO').setValue('SAY:' + ToEn(PKGS).toUpperCase() + ' ' + KINDPKGS + ' ONLY.'); - + Ext.Msg.hide(); //Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); } else { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index 10dbeecc..6c89c660 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -7955,7 +7955,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { var jsonresult = Ext.JSON.decode(response.responseText); if (jsonresult.Success) { this.onDsQuery(); - //Ext.Msg.show({ title: Zi.LAN.TiShi, msg: jsonresult.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + Ext.Msg.hide(); } else { Ext.Msg.show({ title: Zi.LAN.ChuoWu, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK });