From 16f65ee53bcdd2ef1cff0ad09f573f0a750c355c Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Mon, 26 Dec 2022 08:46:15 +0800 Subject: [PATCH 1/3] 1 --- DSWeb/DSWeb.csproj.user | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DSWeb/DSWeb.csproj.user b/DSWeb/DSWeb.csproj.user index a0e4fe14..4b503d3c 100644 --- a/DSWeb/DSWeb.csproj.user +++ b/DSWeb/DSWeb.csproj.user @@ -2,7 +2,7 @@ ShowAllFiles - H:\DS7_dev\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml + 配置文件1 true Debug|Any CPU From e1ef1d090ff718bdbc96a905814d7fbeb032d1a2 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Wed, 28 Dec 2022 12:00:45 +0800 Subject: [PATCH 2/3] 1 --- .../Chfee_payapplicationController.cs | 4 +- .../Controllers/WMSNewController.cs | 20 +++ .../MvcShipping/DAL/MsChFee/MsChFeeDAL.cs | 15 +- .../DAL/MsChFeeAutoDui/MsChFeeAutoDuiDAL.cs | 14 +- .../MsCodeFeeSetList/MsCodeFeeSetListDAL.cs | 8 + .../DAL/MsOpLetter/MsOpLetterDAL.cs | 2 + .../Areas/MvcShipping/DAL/WMSNew/WMSNewDAL.cs | 75 ++++++++++ .../MvcShipping/Models/MsChFee/MsChFee.cs | 2 + .../Models/MsChFeeAutoDui/MsChFeeAutoDui.cs | 5 +- .../Models/MsCodeFeeSetList/CodeFeeSetList.cs | 7 + .../Models/MsOpLetter/MsOpLetterYard.cs | 2 + .../Viewsjs/Comm/BasicDataRefModel.js | 4 +- .../Viewsjs/MsChFee/FeeAmendDrCrGrid.js | 8 +- .../Viewsjs/MsChFee/FeeDrCrGrid.js | 11 ++ .../Viewsjs/MsChFee/FeeDrCrGridView.js | 10 ++ .../MsChFeeAutoDui/MsChFeeAutoDuiEdit.js | 13 +- .../MsCodeFeeSetList/MsCodeFeeSetListEdit.js | 10 +- .../MsCodeFeeSetList/MsCodeFeeSetListModel.js | 2 + .../Viewsjs/MsCodeFeeSetList/Zi_en-us.js | 3 +- .../Viewsjs/MsCodeFeeSetList/Zi_zh-cn.js | 3 +- .../Viewsjs/MsOpAire/MsOpAireEdit.js | 8 +- .../Viewsjs/MsOpAiri/MsOpAiriEdit.js | 8 +- .../Viewsjs/MsOpLetter/MsOpLetterYardEdit.js | 21 ++- .../Viewsjs/MsOpLetter/MsOpLetterYardModel.js | 2 + .../Viewsjs/MsOpOther/MsOpOtherEdit.js | 8 +- .../Viewsjs/MsOpSeae/MsOpCtnDetailEdit.js | 28 ++-- .../Viewsjs/MsOpSeai/MsOpSeaiEdit.js | 8 +- .../MvcShipping/Viewsjs/WMSNew/WMSNewIndex.js | 141 ++++++++++++++++++ 28 files changed, 400 insertions(+), 42 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs index 9d8118f5..48d33088 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs @@ -983,7 +983,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; @@ -1005,7 +1005,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/WMSNewController.cs b/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs index 6be5524c..e817a14c 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/WMSNewController.cs @@ -722,6 +722,26 @@ namespace DSWeb.MvcShipping.Controllers var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = count, data1 = feejian,data2 =feeton }); return new ContentResult() { Content = json }; } + + + public ContentResult modify(string data, string modifydata) + { + var bodyList = JsonConvert.Deserialize>(data); + var amodifydata = JsonConvert.Deserialize(modifydata); + var result = new DBResult(); + + if (bodyList != null) + { + result = WMSNewDAL.Modify(bodyList, amodifydata, Convert.ToString(Session["COMPANYID"])); + } + var jsonRespose = new JsonResponse + { + Success = result.Success, + Message = result.Message, + }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + } + /// /// 导入 /// diff --git a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs index 62326fb5..8c50aa2f 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs @@ -3741,6 +3741,14 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL if (reader["ISADVANCEDPAY"] != DBNull.Value) { if (Convert.ToBoolean(reader["ISADVANCEDPAY"])) evData.ISADVANCEDPAY = "1"; } + if (reader["ISOPEN"] != DBNull.Value) + { + if (Convert.ToBoolean(reader["ISOPEN"])) evData.ISOPEN = "1"; + } + if (reader["ISINVOICE"] != DBNull.Value) + { + if (Convert.ToBoolean(reader["ISINVOICE"])) evData.ISINVOICE = "1"; + } if (reader["TAXRATE"] != DBNull.Value) evData.TAXRATE = Convert.ToDecimal(reader["TAXRATE"]); evList.Add(evData); @@ -3760,6 +3768,8 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL evData2.FEETYPE ="1"; evData2.FEEFRT = "PP"; evData2.ISADVANCEDPAY = "0"; + evData2.ISOPEN = "0"; + evData2.ISINVOICE = "0"; evData2.TAXRATE = 0; evList.Add(evData2); } @@ -3769,7 +3779,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL public static StringBuilder GetFeeTypeRefList_Sqlstr(string sCondition) { var strSql = new StringBuilder(); - strSql.Append("Select FeeCode,Name,FEECODE + '-' + NAME AS CodeAndName,DEFAULTCURR,DEFAULTDEBIT,DEFAULTCREDIT,feetype,Description,DefaultUnit,FeeFRT,ISADVANCEDPAY,TAXRATE "); + strSql.Append("Select FeeCode,Name,FEECODE + '-' + NAME AS CodeAndName,DEFAULTCURR,DEFAULTDEBIT,DEFAULTCREDIT,feetype,Description,DefaultUnit,FeeFRT,ISADVANCEDPAY,ISOPEN,ISINVOICE,TAXRATE "); strSql.Append(",isnull(CASE DEFAULTDEBIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTDEBITREF "); strSql.Append(",isnull(CASE DEFAULTCREDIT when 1 then '船公司' when 2 then '订舱代理' when 3 then '场站' when 4 then '车队' when 5 then '委托单位' when 6 then '报关行' when 7 then '代理' when 8 then '航空公司' when 9 then '发货人' when 10 then '收货人' when 11 then '通知人' when 12 then '船代' when 0 then '其他' end ,'') DEFAULTCREDITREF "); strSql.Append(" from code_fee "); @@ -5914,6 +5924,7 @@ 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()) @@ -5997,7 +6008,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/MsChFeeAutoDui/MsChFeeAutoDuiDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsChFeeAutoDui/MsChFeeAutoDuiDAL.cs index ba758697..f0429c1d 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsChFeeAutoDui/MsChFeeAutoDuiDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsChFeeAutoDui/MsChFeeAutoDuiDAL.cs @@ -208,7 +208,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL return SetBody(strSql); } - static public List GetLocalList ( string CUSTOMERNAME,string AutoDui_GID, string FEETYPE,string HAVEDEBIT,string FEEDC,string CURR,string FSTATUS,string FEEDUITYPE,string FEEDUITYPECONDIT,string SALECORP) + static public List GetLocalList ( string CUSTOMERNAME,string AutoDui_GID, string FEETYPE,string HAVEDEBIT,string FEEDC,string CURR,string FSTATUS,string FEEDUITYPE,string FEEDUITYPECONDIT,string SALECORP,string PS_OPLB) { var strSql = new StringBuilder(); @@ -245,6 +245,11 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL if ((FEEDC != "0") && (FEEDC.Trim()!= "")){ strSql.Append(" and f.FEETYPE="+FEEDC); } + if (!string.IsNullOrEmpty(PS_OPLB)) { + strSql.Append(" and B.OPLBNAME='" + PS_OPLB + "'"); + + } + if (CURR!= "") { strSql.Append(" and f.CURRENCY='" + CURR+"'"); @@ -312,6 +317,11 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL { strSql.Append(" and f.FEETYPE=" + FEEDC); } + if (!string.IsNullOrEmpty(PS_OPLB)) + { + strSql.Append(" and B.OPLBNAME='" + PS_OPLB + "'"); + + } if (CURR != "") { strSql.Append(" and f.CURRENCY='" + CURR + "'"); @@ -673,7 +683,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeAutoDuiDAL DetailList = GetBodyList("BSNO='" + head.GID + "'"); //var _DelDetailList = new List(); - var LocalDetailList = GetLocalList(head.CUSTOMERNAME,head.GID,head.FEETYPE,head.HAVEDEBIT,head.FEEDC,head.CURR,head.FSTATUS,head.FEEDUITYPE,head.FEEDUITYPECONDIT,head.SALECORP); + var LocalDetailList = GetLocalList(head.CUSTOMERNAME,head.GID,head.FEETYPE,head.HAVEDEBIT,head.FEEDC,head.CURR,head.FSTATUS,head.FEEDUITYPE,head.FEEDUITYPECONDIT,head.SALECORP,head.PS_OPLB); //var LocalDetailList = DetailList; //var result = new DBResult(); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsCodeFeeSetList/MsCodeFeeSetListDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsCodeFeeSetList/MsCodeFeeSetListDAL.cs index 56d4b4a1..d3e33bbd 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsCodeFeeSetList/MsCodeFeeSetListDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsCodeFeeSetList/MsCodeFeeSetListDAL.cs @@ -37,6 +37,8 @@ namespace DSWeb.MvcShipping.DAL.MsCodeFeeSetList ISTRUCKINGFIXED, ISWMS, ISADVANCEDPAY, + ISOPEN, + ISINVOICE, DEFAULTUNIT,ISNULL((case A.DEFAULTUNIT when 1 then '单票' when 2 then '重量' when 3 then '尺码' when 4 then '计费吨' @@ -90,6 +92,8 @@ namespace DSWeb.MvcShipping.DAL.MsCodeFeeSetList ISTRUCKINGFIXED, ISWMS, ISADVANCEDPAY, + ISOPEN, + ISINVOICE, DEFAULTUNIT,ISNULL((case A.DEFAULTUNIT when 1 then '单票' when 2 then '重量' when 3 then '尺码' when 4 then '计费吨' @@ -199,6 +203,10 @@ namespace DSWeb.MvcShipping.DAL.MsCodeFeeSetList data.ISWMS = Convert.ToBoolean(reader["ISWMS"]);//状态 if (reader["ISADVANCEDPAY"] != DBNull.Value) data.ISADVANCEDPAY = Convert.ToBoolean(reader["ISADVANCEDPAY"]);//状态 + if (reader["ISOPEN"] != DBNull.Value) + data.ISOPEN = Convert.ToBoolean(reader["ISOPEN"]);//状态 + if (reader["ISINVOICE"] != DBNull.Value) + data.ISINVOICE = Convert.ToBoolean(reader["ISINVOICE"]);//状态 data.DEFAULTUNIT = Convert.ToString(reader["DEFAULTUNIT"]); data.DEFAULTDEBIT = Convert.ToString(reader["DEFAULTDEBIT"]); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpLetter/MsOpLetterDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpLetter/MsOpLetterDAL.cs index b361d993..fc3350ef 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpLetter/MsOpLetterDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpLetter/MsOpLetterDAL.cs @@ -91,6 +91,7 @@ namespace DSWeb.Areas.MvcShipping.DAL strSql.Append("SELECT "); strSql.Append("LE_ID,MBLNO,PORTDISCHARGE,VESSELVOYNO,ETD,DESTINATION,PKC,CNTR,[DESCRIPTION],YARD,[Address],Tel,YARD2,Address2,Tel2,TiXiangTime,RuHuoTime,"); strSql.Append("DRQ,CLOSEDOCDATE,ExportCustoms,CustomsCode,DeclarationCode,REMARK,CLOSINGDATE,DOC,CHIEF,CHIEF2,DOCTEL,DOCFAX,DOCEMAIL,CLOSEVGMDATE,TXXPURL"); + strSql.Append(",(SELECT TOP 1 SHARE_LINK FROM op_seae_billtrace_share_link where BSNO IN (SELECT BSNO FROM op_letter where LE_ID=op_letter_yard.LE_ID)) TRACKSHARELINK"); strSql.Append(" from op_letter_yard "); if (!string.IsNullOrEmpty(strCondition)) @@ -161,6 +162,7 @@ namespace DSWeb.Areas.MvcShipping.DAL if (reader["CLOSEVGMDATE"] != DBNull.Value) data.CLOSEVGMDATE = Convert.ToDateTime(reader["CLOSEVGMDATE"]).ToString("yyyy-MM-dd HH:mm:ss");//截VGM日期 data.TXXPURL = Convert.ToString(reader["TXXPURL"]); + data.TRACKSHARELINK = Convert.ToString(reader["TRACKSHARELINK"]); #endregion headList.Add(data); } diff --git a/DSWeb/Areas/MvcShipping/DAL/WMSNew/WMSNewDAL.cs b/DSWeb/Areas/MvcShipping/DAL/WMSNew/WMSNewDAL.cs index 1fce29bf..87df3375 100644 --- a/DSWeb/Areas/MvcShipping/DAL/WMSNew/WMSNewDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/WMSNew/WMSNewDAL.cs @@ -1562,6 +1562,81 @@ namespace DSWeb.MvcShipping.DAL.WMSNewDAL return list; } + public static DBResult Modify(List bodyList, WMSNewList modifydata, string companyid) + { + var result = new DBResult(); + + var head = ChMonthCloseDAL.ChMonthCloseDAL.GetData("", companyid); + + string errstr = ""; + int i = 0; + Database db = DatabaseFactory.CreateDatabase(); + using (var conn = db.CreateConnection()) + { + conn.Open(); + var tran = conn.BeginTransaction(); + + try + { + var strSql = new StringBuilder(); + var strSqlBL = new StringBuilder(); + strSql.Append("update wms set GID=GID "); + if (modifydata.BLNO != "" && modifydata.BLNO != null) + strSql.Append(",BLNO=@BLNO"); + + strSql.Append(" where GID=@GID "); + + + var cmdupdate = + db.GetSqlStringCommand(strSql.ToString()); + + if (bodyList != null) + { + foreach (var enumValue in bodyList) + { + + var isPost = true; + + if (isPost) + { + + + cmdupdate.Parameters.Clear(); + if (modifydata.BLNO != "" && modifydata.BLNO != null) + db.AddInParameter(cmdupdate, "@BLNO", DbType.String, modifydata.BLNO); + db.AddInParameter(cmdupdate, "@GID", DbType.String, enumValue.GID); + db.ExecuteNonQuery(cmdupdate, tran); + i = i + 1; + } + + } + } + + tran.Commit(); + } + catch (Exception) + { + tran.Rollback(); + + result.Success = false; + result.Message = "修改出现错误,请重试或联系系统管理员"; + + return result; + } + } + + result.Success = true; + result.Message = "修改成功" + i.ToString() + "票"; + if (errstr != "") + { + result.Message = result.Message + "(其中" + errstr + " 无法修改)"; + } + + return result; + } + + + #region 权限范围 public static string GetRangDAStr(string tb, string userid, string username, string companyid) diff --git a/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs b/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs index 92f702cd..c1dc742d 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsChFee/MsChFee.cs @@ -930,6 +930,8 @@ namespace DSWeb.MvcShipping.Models.MsChFee get { return _ISADVANCEDPAY; } set { _ISADVANCEDPAY = value; } } + public string ISOPEN { get; set; } + public string ISINVOICE { get; set; } public decimal TAXRATE { get { return _TAXRATE; } diff --git a/DSWeb/Areas/MvcShipping/Models/MsChFeeAutoDui/MsChFeeAutoDui.cs b/DSWeb/Areas/MvcShipping/Models/MsChFeeAutoDui/MsChFeeAutoDui.cs index 887ffb91..a29355bb 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsChFeeAutoDui/MsChFeeAutoDui.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsChFeeAutoDui/MsChFeeAutoDui.cs @@ -28,7 +28,7 @@ namespace DSWeb.MvcShipping.Models.MsChFeeAutoDui private string _CURR = string.Empty; private string _DUITYPE = string.Empty; private string _FEEDUITYPE = string.Empty; - private string _FEEDUITYPECONDIT ="等于"; + private string _FEEDUITYPECONDIT = "等于"; #endregion @@ -132,6 +132,9 @@ namespace DSWeb.MvcShipping.Models.MsChFeeAutoDui get { return _DUITYPE; } set { _DUITYPE = value; } } + + [ModelDB] + public string PS_OPLB { get;set;} public string STATUS_REF { get { return _STATUS_REF; } diff --git a/DSWeb/Areas/MvcShipping/Models/MsCodeFeeSetList/CodeFeeSetList.cs b/DSWeb/Areas/MvcShipping/Models/MsCodeFeeSetList/CodeFeeSetList.cs index 349f9a94..3017de26 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsCodeFeeSetList/CodeFeeSetList.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsCodeFeeSetList/CodeFeeSetList.cs @@ -127,6 +127,13 @@ namespace DSWeb.MvcShipping.Models.MsCodeFeeSetList [ModelDB] public bool ISADVANCEDPAY { get; set; } + [ModelDB] + public bool ISOPEN { get; set; } + + [ModelDB] + public bool ISINVOICE { get; set; } + + [ModelDB] public string CREATEUSER { get; set; } public string CREATEUSERREF { get; set; } diff --git a/DSWeb/Areas/MvcShipping/Models/MsOpLetter/MsOpLetterYard.cs b/DSWeb/Areas/MvcShipping/Models/MsOpLetter/MsOpLetterYard.cs index 98c208b4..628eb814 100644 --- a/DSWeb/Areas/MvcShipping/Models/MsOpLetter/MsOpLetterYard.cs +++ b/DSWeb/Areas/MvcShipping/Models/MsOpLetter/MsOpLetterYard.cs @@ -148,6 +148,8 @@ namespace DSWeb.MvcShipping.Models.MsOpLetter [ModelDB] public string TXXPURL { get; set; } + public string TRACKSHARELINK { get; set; } + #endregion public MsOpLetterYard() diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js index c5833279..d0cd5426 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/BasicDataRefModel.js @@ -308,7 +308,9 @@ Ext.define('DsShipping.ux.FeeTypeRefModel', { { name: 'FEETYPE', type: 'string' }, { name: 'FEEFRT', type: 'string' }, { name: 'TAXRATE', type: 'number' }, - { name: 'ISADVANCEDPAY', type: 'string' } + { name: 'ISADVANCEDPAY', type: 'string' }, + { name: 'ISOPEN', type: 'string' }, + { name: 'ISINVOICE', type: 'string' } ] }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js index 2fac520d..ac335fea 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js @@ -5749,9 +5749,11 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { if (this.MsPeriod.CLOSEDAY != 0) { var myday = Ext.util.Format.date(oDate1, 'd'); if (myday > this.MsPeriod.CLOSEDAY) { - var mymonth = Ext.util.Format.date(oDate1, 'm'); - var myyear = Ext.util.Format.date(oDate1, 'Y'); - mymonth = parseInt(mymonth) + 1; + var lastMonthDate = new Date(oDate1); //上月日期 + 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; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js index af768a6e..00f45f42 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js @@ -8935,6 +8935,8 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { e.record.set('Remark', Gddata.REMARK); e.record.set('FeeFrt', Gddata.FEEFRT); e.record.set('IsAdvancedpay', Gddata.ISADVANCEDPAY); + e.record.set('IsOpen', Gddata.ISOPEN); + e.record.set('IsInvoice', Gddata.ISINVOICE); var TaxUnitPrice = e.record.data['TaxUnitPrice']; var quantity = e.record.data['Quantity']; @@ -9116,6 +9118,12 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { if (ISADVANCEDPAY != '') { e.record.set('IsAdvancedpay', ISADVANCEDPAY); } + if (data.ISOPEN != '') + e.record.set('IsOpen', data.ISOPEN); + if (data.ISINVOICE != '') + e.record.set('IsInvoice', data.ISINVOICE); + + if (DefTaxRate!=0){ e.record.set('TaxRate', DefTaxRate); if (_thisfee.ACCTAXRATESAMETAXRATE == 1) e.record.set('AccTaxRate', DefTaxRate); @@ -9272,6 +9280,9 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { e.record.set('Remark', Gddata.REMARK); e.record.set('FeeFrt', Gddata.FEEFRT); e.record.set('IsAdvancedpay', Gddata.ISADVANCEDPAY); + e.record.set('IsOpen', Gddata.ISOPEN); + e.record.set('IsInvoice', Gddata.ISINVOICE); + var taxrate = e.record.data['TaxRate']; TaxUnitPrice = Gddata.UNITPRICE; if (taxrate != null) { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js index 68c4b3a8..6a6dba02 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGridView.js @@ -428,6 +428,11 @@ Ext.extend(Shipping.FeeViewGrid, Ext.Panel, { return record.data.MANAGERREF; }, width: 100 + }, { + sortable: true, + dataIndex: 'SALECORP', + header: '核算单位', //'MANAGER', + width: 100 } ]; @@ -865,6 +870,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/MsChFeeAutoDui/MsChFeeAutoDuiEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFeeAutoDui/MsChFeeAutoDuiEdit.js index 45a27c9c..3a72065c 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFeeAutoDui/MsChFeeAutoDuiEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFeeAutoDui/MsChFeeAutoDuiEdit.js @@ -314,7 +314,18 @@ displayField: 'CodeAndName' }); + this.StoreOpLb = Ext.create('DsExt.ux.RefEnumStore', {}); + this.StoreOpLb.load({ params: { enumTypeId: 96005 } }); + this.comboxOpLb = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '业务类型', + store: this.StoreOpLb, + forceSelection: true, + name: 'PS_OPLB', + valueField: 'EnumValueName', + displayField: 'EnumValueName', + enableKeyEvents: true + }); //#endregion @@ -396,7 +407,7 @@ labelWidth: 75, renderer: Ext.util.Format.dateRenderer('Y-m-d H:i:s'), name: 'OPDATE' - }, { xtype: 'hiddenfield' } + }, this.comboxOpLb ] }, { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListEdit.js index 86a59399..fc7d54ec 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListEdit.js @@ -168,7 +168,15 @@ Ext.extend(Shipping.MsCodeFeeSetListEdit, Ext.Panel, { boxLabel: Zi.LAN.ISADVANCEDPAY, //'是否垫付费用', inputValue: true, name: 'ISADVANCEDPAY' - }] + }, { + boxLabel: Zi.LAN.ISOPEN, //'是否仓储费用', + inputValue: true, + name: 'ISOPEN' + }, { + boxLabel: Zi.LAN.ISINVOICE, //'是否垫付费用', + inputValue: true, + name: 'ISINVOICE' + }] }); this.storeDUITYPE = Ext.create('DsExt.ux.RefEnumStore', {}); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListModel.js index d1dcfc79..9323c313 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/MsCodeFeeSetListModel.js @@ -13,6 +13,8 @@ { name: 'ISTRUCKINGFIXED', type: 'boolean' }, { name: 'ISWMS', type: 'boolean' }, { name: 'ISADVANCEDPAY', type: 'boolean' }, + { name: 'ISOPEN', type: 'boolean' }, + { name: 'ISINVOICE', type: 'boolean' }, { name: 'DEFAULTUNIT', type: 'string' }, { name: 'DEFAULTDEBIT', type: 'string' }, { name: 'DEFAULTCREDIT', type: 'string' }, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_en-us.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_en-us.js index 46073c06..45e13a59 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_en-us.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_en-us.js @@ -44,7 +44,8 @@ Zi.LAN.QingXianXuanZeXinXi = "Please choose first!";//请先选择要操作的 Zi.LAN.ChaXunTiaoJianFuZhiCuoWu = "Inquiry condition is wrong, please check!";//查询条件赋值错误,请检查! Zi.LAN.DUITYPE = "Fee Group"; Zi.LAN.INVGOODNAME = "Inoice Fee Name"; - +Zi.LAN.ISOPEN = "Is Open"; +Zi.LAN.ISINVOICE = "Not Invoice"; //#endregion diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_zh-cn.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_zh-cn.js index bdcc0612..2b4e3fad 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_zh-cn.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsCodeFeeSetList/Zi_zh-cn.js @@ -46,7 +46,8 @@ Zi.LAN.QingXianXuanZeXinXi = "请先选择要操作的信息!"; Zi.LAN.ChaXunTiaoJianFuZhiCuoWu = "查询条件赋值错误,请检查!"; Zi.LAN.DUITYPE = "对账类别"; Zi.LAN.INVGOODNAME = "发票商品名称"; - +Zi.LAN.ISOPEN = "机密费用"; +Zi.LAN.ISINVOICE = "禁开发票"; //#endregion diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js index dd92e055..3e439936 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAire/MsOpAireEdit.js @@ -3308,9 +3308,11 @@ Ext.extend(Shipping.MsOpAireEdit, Ext.Panel, { 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; + 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; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js index 336c5db8..968af47c 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpAiri/MsOpAiriEdit.js @@ -2270,9 +2270,11 @@ Ext.extend(Shipping.MsOpAiriEdit, Ext.Panel, { 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; + 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; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardEdit.js index b3addf64..bf2838d0 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardEdit.js @@ -357,7 +357,26 @@ Ext.extend(Shipping.MsOpLetterYardEdit, Ext.Panel, { }, scope: this }] - },{ + }, { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [{ + fieldLabel: '运踪地址', + labelWidth: 90, + name: 'TRACKSHARELINK' + }, { + xtype: 'button', + width: 90, + text: '复制链接', //"执行查询", + iconCls: "btnrefresh", + handler: function (button, event) { + var url = _this.formEdit.getForm().findField('TRACKSHARELINK').getValue(); + copyToClipboard(url); + }, + scope: this + }] + },{ xtype: 'container', layout: 'hbox', defaultType: 'textfield', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardModel.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardModel.js index 3d153429..954bbe5e 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardModel.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpLetter/MsOpLetterYardModel.js @@ -30,6 +30,8 @@ { name: 'DOCFAX', type: 'string' }, { name: 'DOCEMAIL', type: 'string' }, { name: 'REMARK', type: 'string' }, + { name: 'TXXPURL', type: 'string' }, + { name: 'TRACKSHARELINK', type: 'string' }, { name: 'CLOSEVGMDATE', type: 'string' } ] }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js index cc656ea8..8f323626 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpOther/MsOpOtherEdit.js @@ -1622,9 +1622,11 @@ Ext.extend(Shipping.MsOpOtherEdit, Ext.Panel, { 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; + 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; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpCtnDetailEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpCtnDetailEdit.js index 9cf1a988..4e2f8930 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpCtnDetailEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpCtnDetailEdit.js @@ -488,20 +488,20 @@ Ext.extend(Shipping.MsOpCtnDetailEdit, Ext.Panel, { bodydatas.push(member); } var jsonBody = ConvertRecordsToJsonAll(bodydatas); - // - //if (iPKGS2 > iPKGS) { - // Ext.Msg.show({ title: '错误', msg: "多品名中 件数总和 超出 集装箱件数!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); - // return; - //} - //if (dKGS2 > dKGS) { - // Ext.Msg.show({ title: '错误', msg: "多品名中 重量总和 超出 集装箱重量!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); - // return; - //} - //if (dCBM2 > dCBM) { - // Ext.Msg.show({ title: '错误', msg: "多品名中 立方数总 超出 集装箱立方数!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); - // return; - //} - // + + if (iPKGS2 != iPKGS) { + Ext.Msg.show({ title: '错误', msg: "多品名中 件数总和与集装箱件数不一致!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + return; + } + if (dKGS2 != dKGS) { + Ext.Msg.show({ title: '错误', msg: "多品名中 重量总和与集装箱重量不一致!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + return; + } + if (dCBM2 != dCBM) { + Ext.Msg.show({ title: '错误', msg: "多品名中 立方数总和与集装箱立方数不一致!", icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + return; + } + Ext.Msg.wait('正在保存数据, 请稍侯..'); Ext.Ajax.request({ waitMsg: '正在保存数据...', diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js index 6bce275b..37e18827 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js @@ -4361,9 +4361,11 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { 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; + 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; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/WMSNew/WMSNewIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/WMSNew/WMSNewIndex.js index e1712df2..cfe94ceb 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/WMSNew/WMSNewIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/WMSNew/WMSNewIndex.js @@ -800,6 +800,11 @@ Ext.extend(Shipping.WMSNewIndex, Ext.Panel, { }, scope: this + }, { + text: "业务批量修改", + handler: function (menu, event) { + _this.winModifyShow.show(); + } } ] }); @@ -818,6 +823,78 @@ Ext.extend(Shipping.WMSNewIndex, Ext.Panel, { this.InitData(); + this.formModify = Ext.widget('form', { + region: 'north', + frame: true, + bodyPadding: 5, + fieldDefaults: { + margins: '2 2 2 2', + labelAlign: 'right', + flex: 1, + labelWidth: 70, + msgTarget: 'qtip' + }, + + items: [ + {//fieldset 1 + xtype: 'fieldset', + defaultType: 'textfield', + layout: 'anchor', + defaults: { + anchor: '100%' + }, + items: [{ + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [{ + fieldLabel: '提单号', + name: 'BLNO' + }, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' } + ] + } + ]//end items(fieldset 1) + }//end fieldset 1 + ]//end root items + }); //end this.formEdit + me = this; + + + this.winModifyShow = Ext.create('Ext.window.Window', { + title: "批量修改", + width: 820, + //height : 120, + //plain : true, + iconCls: "addicon", + resizable: false, + // 是否可以拖动 + // draggable:false, + collapsible: true, // 允许缩放条 + closeAction: 'close', + closable: true, + modal: 'true', + buttonAlign: "center", + bodyStyle: "padding:0 0 0 0", + items: [this.formModify], + buttons: [{ + text: "确认修改", + minWidth: 70, + handler: function () { + + me.onModifyClick() + + + } + }, { + text: "关闭", + minWidth: 70, + handler: function () { + me.winModifyShow.close(); + } + }] + }); + + }, //end initUIComponents @@ -939,6 +1016,70 @@ Ext.extend(Shipping.WMSNewIndex, Ext.Panel, { }, this); }, //onDeleteClick + + onModifyClick: function (menu, event) { + + var GidStr = ''; + var records = this.gridList.getSelectionModel().getSelection(); + if (records.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请先选择要修改的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + + + var bodyAddDatas = []; + for (var i = 0; i < records.length; i++) { + var rec = records[i]; + bodyAddDatas.push(rec); + } + + var data = this.formModify.getForm().getValues(); + + _this = this; + if (bodyAddDatas.length == 0) { + Ext.Msg.show({ title: '提示', msg: '没有要修改的业务!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + + } else { + + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); + Ext.Ajax.request({ + waitMsg: '正在修改...', + url: '/MvcShipping/WMSNew/modify', + params: { + data: jsonbodyAddDatas, + modifydata: Ext.JSON.encode(data) + }, + callback: function (options, success, response) { + if (success) { + var result = Ext.JSON.decode(response.responseText); + if (!result.Success) { + Ext.Msg.show({ + title: '提示', + msg: result.Message, + icon: Ext.MessageBox.ERROR, + buttons: Ext.Msg.OK + }); + return; + } else { + + Ext.Msg.show({ title: '提示', msg: result.Message, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + _this.storeList.reload(); + _this.winModifyShow.close(); + + } + + } else { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } + }, + scope: this + }); + } + + }, + + getCondition: function () { var form = this.formSearch.getForm(); if (!form.isValid()) { From 403f7d0602da8570d6fc20029b97a7bec5514352 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Thu, 29 Dec 2022 14:03:44 +0800 Subject: [PATCH 3/3] 1 --- JobAutoCreateFee/JobGetMhData.cs | 41 ++++++++++++++++++++++++++++---- 1 file changed, 36 insertions(+), 5 deletions(-) diff --git a/JobAutoCreateFee/JobGetMhData.cs b/JobAutoCreateFee/JobGetMhData.cs index fb654c41..738517dc 100644 --- a/JobAutoCreateFee/JobGetMhData.cs +++ b/JobAutoCreateFee/JobGetMhData.cs @@ -1,5 +1,4 @@ using log4net; -using Newtonsoft.Json; using Quartz; using System; using System.Collections.Generic; @@ -104,7 +103,9 @@ namespace JobCreateFee string Voyage = ""; string POL = ""; string POD = ""; - string TermsCode = ""; + string POLID = ""; + string PODID = ""; + string TermsCode = ""; string PaymentTypeDescription = ""; string ShipperDescription = ""; string MarksNumbers = ""; @@ -114,6 +115,7 @@ namespace JobCreateFee string CONSIGNEE = ""; string NOTIFYPARTY = ""; string FinalDest = ""; + string FinalDestID = ""; string FinalDestCountry = ""; string ETD = ""; string MhLane = ""; @@ -163,9 +165,12 @@ namespace JobCreateFee if (string.IsNullOrEmpty(rowmhdata["BLNotify1Contact"].ToString())) NOTIFYPARTY = NOTIFYPARTY + Environment.NewLine + rowmhdata["BLNotify1Contact"].ToString(); ETD = GETETD(Vessel, Voyage, dbcon); MhLane = GetMHLane(BOOKID,dbmh); + POLID = GetMHPortid(POL, dbmh); + PODID = GetMHPortid(POD, dbmh); + FinalDestID = GetMHPortid(FinalDest, dbmh); - } + } pkgs = pkgs + Convert.ToInt32(rowmhdata["Quantity"]); cbm = cbm + Convert.ToDecimal(rowmhdata["Measurement"]); @@ -377,7 +382,8 @@ namespace JobCreateFee strSqlUpdateD6.Append("update t_op_seae_assistant set 运费协议号=@ServiceContract,备注=@Comment,船名=@Vessel,航次=@Voyage,装货港=@POL"); strSqlUpdateD6.Append(",卸货港=@POD,目的地=@DEST,运输条款=@TermsCode,付费方式=@PaymentTypeDescription,货物描述=@ShipperDescription,唛头=@MarksNumbers"); strSqlUpdateD6.Append(",件数=@PKGS,重量=@KGS,尺码=@CBM,运输方式=@HarmonizedCode,包装=@PackageType,件数包装=@PKGSKIND,货物重量=@GOODKGS,货物尺码=@GOODCBM,集装箱=@CTNSTR"); - strSqlUpdateD6.Append(",发货人代码=@SHIPPER,收货人代码=@CONSIGNEE,通知人代码=@NOTIFYPARTY,开船日期=@ETD,船公司航线=@MHLANE where AS_ID='" + BSNO + "'"); + strSqlUpdateD6.Append(",装港代码=@POLID,卸货代码=@PODID,目的地代码=@FinalDestID"); + strSqlUpdateD6.Append(",发货人代码=@SHIPPER,收货人代码=@CONSIGNEE,通知人代码=@NOTIFYPARTY,开船日期=@ETD,船公司航线=@MHLANE where AS_ID='" + BSNO + "'"); } else @@ -385,7 +391,9 @@ namespace JobCreateFee strSqlUpdateD6.Append("update t_op_seae set 运费协议号=@ServiceContract,备注=@Comment,船名=@Vessel,航次=@Voyage,装货港=@POL"); strSqlUpdateD6.Append(",卸货港=@POD,目的地=@DEST,运输条款=@TermsCode,付费方式=@PaymentTypeDescription,货物描述=@ShipperDescription,唛头=@MarksNumbers"); strSqlUpdateD6.Append(",件数=@PKGS,重量=@KGS,尺码=@CBM,运输方式=@HarmonizedCode,包装=@PackageType,件数包装=@PKGSKIND,货物重量=@GOODKGS,货物尺码=@GOODCBM,集装箱=@CTNSTR"); - strSqlUpdateD6.Append(",发货人代码=@SHIPPER,收货人代码=@CONSIGNEE,通知人代码=@NOTIFYPARTY,开船日期=@ETD,船公司航线=@MHLANE "+ ctnUpdatestr + " where 编号='" + BSNO + "'"); + strSqlUpdateD6.Append(",装港代码=@POLID,卸货代码=@PODID,目的地代码=@FinalDestID"); + + strSqlUpdateD6.Append(",发货人代码=@SHIPPER,收货人代码=@CONSIGNEE,通知人代码=@NOTIFYPARTY,开船日期=@ETD,船公司航线=@MHLANE "+ ctnUpdatestr + " where 编号='" + BSNO + "'"); } dbcon.Open(); log.Debug($"更新业务信息{strSqlUpdateD6.ToString()}"); @@ -398,6 +406,9 @@ namespace JobCreateFee cmdUpdateD6.Parameters.AddWithValue("@POL", POL); cmdUpdateD6.Parameters.AddWithValue("@POD", POD); cmdUpdateD6.Parameters.AddWithValue("@DEST", FinalDest); + cmdUpdateD6.Parameters.AddWithValue("@POLID", POLID); + cmdUpdateD6.Parameters.AddWithValue("@PODID", PODID); + cmdUpdateD6.Parameters.AddWithValue("@FinalDestID", FinalDestID); cmdUpdateD6.Parameters.AddWithValue("@TermsCode", TermsCode); cmdUpdateD6.Parameters.AddWithValue("@PaymentTypeDescription", PaymentTypeDescription); cmdUpdateD6.Parameters.AddWithValue("@ShipperDescription", ShipperDescription); @@ -560,7 +571,27 @@ namespace JobCreateFee return result; } + static public string GetMHPortid(string port, SqlConnection dbcon) + { + var result = ""; + if (string.IsNullOrEmpty(port)) return result; + var strSql = new StringBuilder(); + strSql.Append("select top 1 LocationCode from uLocation where Location ='" + port + "'"); + SqlDataAdapter adapter = new SqlDataAdapter(strSql.ToString(), dbcon); + DataTable table = new DataTable(); + adapter.Fill(table); + if (table.Rows.Count > 0) + { + foreach (DataRow row in table.Rows) + { + result = row["LocationCode"].ToString(); + } + + } + + return result; + } } }