From cf6cc6c024aa79372968147fc64b2e01978ab0df Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Mon, 27 Nov 2023 17:43:30 +0800 Subject: [PATCH] 1 --- .../Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs | 68 ++++-- .../Viewsjs/Chfee_Audit/Chfee_Audit.js | 4 +- .../Controllers/MsOpSubSeaOrderController.cs | 21 ++ .../MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs | 1 + .../DAL/MsOpSubSeaOrder/MsOpSubSeaOrderDAL.cs | 95 ++++++++- .../DAL/MsUerAuthority/MsUerAuthorityDAL.cs | 178 +++++++++++----- .../Views/MsOpSubSeaOrder/AddFeePLIndex.aspx | 58 ++++++ .../Views/MsOpSubSeaOrder/Edit.aspx | 1 + .../MsOpSubSeaOrder/EditAgentExport.aspx | 1 + .../Views/MsOpSubSeaOrder/EditArrival.aspx | 1 + .../MsOpSubSeaOrder/FeeTemplatePLAdd.js | 4 +- .../MsOpSubSeaOrder/MsOpSubSeaImportAIndex.js | 197 +++++++++++++++++- .../RptCwGenlegAccitemsIndex.js | 1 + DSWeb/DSWeb.csproj | 1 + JobAutoCreateFee/JobD7CreateFee.cs | 2 +- 15 files changed, 559 insertions(+), 74 deletions(-) create mode 100644 DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/AddFeePLIndex.aspx diff --git a/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs index 6f0a7f2d..92a05894 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs @@ -178,7 +178,7 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL if (worktype== "SALEORDER") strSql.Append(" and ch_fee.IsCrmOrderFee=1 "); else if (worktype != "") strSql.Append(" and isnull(ch_fee.IsCrmOrderFee,0)=0 "); if (worktype == "BLAUDIT") strSql.Append(" and wu.TYPENO=602 "); - else if (worktype == "FEEAUDIT") strSql.Append(" and (wu.TYPENO=1 or wu.TYPENO=3 or wu.TYPENO=11 or wu.TYPENO=13 or wu.TYPENO=101 or wu.TYPENO=103 or wu.TYPENO=104 or wu.TYPENO=106 or wu.TYPENO=107 or wu.TYPENO=109 or wu.TYPENO=204 or wu.TYPENO=206 or wu.TYPENO=301 or wu.TYPENO=303 or wu.TYPENO=304 or wu.TYPENO=601) "); + else if (worktype == "FEEAUDIT") strSql.Append(" and (wu.TYPENO=1 or wu.TYPENO=3 or wu.TYPENO=11 or wu.TYPENO=13 or wu.TYPENO=101 or wu.TYPENO=103 or wu.TYPENO=104 or wu.TYPENO=106 or wu.TYPENO=107 or wu.TYPENO=109 or wu.TYPENO=111 or wu.TYPENO=112 or wu.TYPENO=204 or wu.TYPENO=206 or wu.TYPENO=301 or wu.TYPENO=303 or wu.TYPENO=304 or wu.TYPENO=601) "); } @@ -1017,10 +1017,14 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL { WorkFlowName = "BulkFeeAudit"; } - if (optype == "op_other" || optype == "tmswlpchead" || optype == "opctnbscard" || optype == "import_main") + if (optype == "op_other" || optype == "opctnbscard" || optype == "import_main") { WorkFlowName = "FeeOpOpOtherRecvPayAudit"; } + if (optype == "tmswlpchead") + { + WorkFlowName = "OpTruckRecvPayAudit"; + } if (optype == "op_railway") { WorkFlowName = "RailwayFeeAudit"; @@ -3018,10 +3022,15 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL } if (optype == "op_Bulk") { WorkFlowName = "BulkFeeModify"; - } if (optype == "op_other" || optype == "tMsWlPcHead" || optype == "OpCtnBsCard") + } if (optype == "op_other" || optype == "OpCtnBsCard") { WorkFlowName = "FeeOpOtherModifyAudit"; - } if (optype == "op_railway") + } + if (optype.ToLower() == "tmswlpchead") + { + WorkFlowName = "OpTruckModifyAudit"; + } + if (optype == "op_railway") { WorkFlowName = "RailwayFeeModify"; } @@ -3317,10 +3326,15 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL } if (optype == "op_Bulk") { WorkFlowName = "BulkFeeModify"; - } if (optype == "op_other" || optype == "tMsWlPcHead" || optype == "OpCtnBsCard") + } if (optype == "op_other"|| optype == "OpCtnBsCard") { WorkFlowName = "FeeOpOtherModifyAudit"; - } if (optype == "op_railway") + } + if (optype.ToLower() == "tmswlpchead") + { + WorkFlowName = "OpTruckModifyAudit"; + } + if (optype == "op_railway") { WorkFlowName = "RailwayFeeModify"; } @@ -3578,10 +3592,14 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL { WorkFlowName = "BulkFeeModify"; } - if (optype == "op_other" || optype == "tMsWlPcHead" || optype == "OpCtnBsCard") + if (optype == "op_other" || optype == "OpCtnBsCard") { WorkFlowName = "FeeOpOtherModifyAudit"; } + if (optype.ToLower() == "tmswlpchead") + { + WorkFlowName = "OpTruckModifyAudit"; + } if (optype == "op_railway") { WorkFlowName = "RailwayFeeModify"; @@ -3840,10 +3858,15 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL } if (optype == "op_Bulk") { WorkFlowName = "BulkFeeModify"; - } if (optype == "op_other" || optype == "tMsWlPcHead" || optype == "OpCtnBsCard") + } if (optype == "op_other" || optype == "OpCtnBsCard") { WorkFlowName = "FeeOpOtherModifyAudit"; - } if (optype == "op_railway") + } + if (optype.ToLower() == "tmswlpchead") + { + WorkFlowName = "OpTruckModifyAudit"; + } + if (optype == "op_railway") { WorkFlowName = "RailwayFeeModify"; } @@ -4002,10 +4025,15 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL } if (optype == "op_bulk") { WorkFlowName = "BulkFeeModify"; - } if (optype == "op_other" || optype == "tMsWlPcHead" || optype == "OpCtnBsCard") + } if (optype == "op_other" || optype == "OpCtnBsCard") { WorkFlowName = "FeeOpOtherModifyAudit"; - } if (optype == "op_railway") + } + if (optype.ToLower() == "tmswlpchead") + { + WorkFlowName = "OpTruckModifyAudit"; + } + if (optype == "op_railway") { WorkFlowName = "RailwayFeeModify"; } @@ -4192,10 +4220,15 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL } if (optype == "op_bulk") { WorkFlowName = "BulkFeeModify"; - } if (optype == "op_other" || optype == "tMsWlPcHead" || optype == "OpCtnBsCard") + } if (optype == "op_other"|| optype == "OpCtnBsCard") { WorkFlowName = "FeeOpOtherModifyAudit"; - } if (optype == "op_railway") + } + if (optype.ToLower() == "tmswlpchead") + { + WorkFlowName = "OpTruckModifyAudit"; + } + if (optype == "op_railway") { WorkFlowName = "RailwayFeeModify"; } @@ -4385,10 +4418,15 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL } if (optype == "op_bulk") { WorkFlowName = "BulkFeeModify"; - } if (optype == "op_other" || optype == "tMsWlPcHead" || optype == "OpCtnBsCard") + } if (optype == "op_other" || optype == "OpCtnBsCard") { WorkFlowName = "FeeOpOtherModifyAudit"; - } if (optype == "op_railway") + } + if (optype.ToLower() == "tmswlpchead") + { + WorkFlowName = "OpTruckModifyAudit"; + } + if (optype == "op_railway") { WorkFlowName = "RailwayFeeModify"; } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js index ae35a4aa..f98932dc 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_Audit.js @@ -4861,7 +4861,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { this.BillSql = this.BillSql + " and ch_fee.IsCrmOrderFee=1 " else if (this.worktype != '') this.BillSql = this.BillSql + " and isnull(ch_fee.IsCrmOrderFee,0)=0 " if (this.worktype == 'BLAUDIT') this.BillSql = this.BillSql + " and wu.TYPENO=602 " - else if (this.worktype == 'FEEAUDIT') this.BillSql = this.BillSql + " and (wu.TYPENO=1 or wu.TYPENO=3 or wu.TYPENO=11 or wu.TYPENO=13 or wu.TYPENO=101 or wu.TYPENO=103 or wu.TYPENO=104 or wu.TYPENO=106 or wu.TYPENO=107 or wu.TYPENO=109 or wu.TYPENO=204 or wu.TYPENO=206 or wu.TYPENO=301 or wu.TYPENO=303 or wu.TYPENO=304 or wu.TYPENO=601) " + else if (this.worktype == 'FEEAUDIT') this.BillSql = this.BillSql + " and (wu.TYPENO=1 or wu.TYPENO=3 or wu.TYPENO=11 or wu.TYPENO=13 or wu.TYPENO=101 or wu.TYPENO=103 or wu.TYPENO=104 or wu.TYPENO=106 or wu.TYPENO=107 or wu.TYPENO=109 or wu.TYPENO=111 or wu.TYPENO=112 or wu.TYPENO=204 or wu.TYPENO=206 or wu.TYPENO=301 or wu.TYPENO=303 or wu.TYPENO=304 or wu.TYPENO=601) " this.BillSql = this.BillSql+ " and isnull((power(2,(ST.STEPNO)) & wu.stepno),0)>0 and st.AUDITOR='" + userid + "' and (ch_fee.FEESTATUS=2 or ch_fee.FEESTATUS=3 or ch_fee.FEESTATUS=4)) "; @@ -6689,7 +6689,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { var StrAudit = " EXISTS (select 1 from ch_fee left join workflow_using wu on wu.bsno=ch_fee.GID left join workflow_step st " StrAudit = StrAudit + " on (st.WORKFLOWID=wu.WORKFLOWID and st.GROUPID=WU.CurrentID) where v_op_bill.BSNO=ch_fee.BSNO " if (this.worktype == 'BLAUDIT') StrAudit = StrAudit + " and wu.TYPENO=602 " - else if (this.worktype == 'FEEAUDIT') StrAudit = StrAudit + " and (wu.TYPENO=1 or wu.TYPENO=3 or wu.TYPENO=11 or wu.TYPENO=13 or wu.TYPENO=101 or wu.TYPENO=103 or wu.TYPENO=104 or wu.TYPENO=106 or wu.TYPENO=107 or wu.TYPENO=109 or wu.TYPENO=204 or wu.TYPENO=206 or wu.TYPENO=301 or wu.TYPENO=303 or wu.TYPENO=304 or wu.TYPENO=601) " + else if (this.worktype == 'FEEAUDIT') StrAudit = StrAudit + " and (wu.TYPENO=1 or wu.TYPENO=3 or wu.TYPENO=11 or wu.TYPENO=13 or wu.TYPENO=101 or wu.TYPENO=103 or wu.TYPENO=104 or wu.TYPENO=106 or wu.TYPENO=107 or wu.TYPENO=109 or wu.TYPENO=111 or wu.TYPENO=112 or wu.TYPENO=204 or wu.TYPENO=206 or wu.TYPENO=301 or wu.TYPENO=303 or wu.TYPENO=304 or wu.TYPENO=601) " StrAudit = StrAudit+ " and isnull((power(2,(ST.STEPNO)) & wu.stepno),0)>0 and st.AUDITOR='" + userid + "' and (ch_fee.FEESTATUS=2 or ch_fee.FEESTATUS=3 or ch_fee.FEESTATUS=4)" StrAudit = StrAudit+ feestr + " ) "; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs index b497872f..e95d35c8 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSubSeaOrderController.cs @@ -101,6 +101,11 @@ namespace DSWeb.MvcShipping.Controllers { return View(); } + public ActionResult AddFeePLIndex() + { + return View(); + } + public ContentResult GetDataList(int start, int limit, string sort, string condition, string billtype, int ortype) @@ -1068,7 +1073,23 @@ namespace DSWeb.MvcShipping.Controllers var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } + 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 = MsOpSubSeaOrderDAL.Modify(bodyList, amodifydata, Convert.ToString(Session["COMPANYID"])); + } + var jsonRespose = new JsonResponse + { + Success = result.Success, + Message = result.Message, + }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + } [HttpPost] public ContentResult ImportDetail() diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs index e94a312a..2fd2b067 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeai/MsOpSeaiDAL.cs @@ -471,6 +471,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaiDAL var strSql = new StringBuilder(); strSql.Append("SELECT * "); strSql.Append(",CASE WHEN ISNULL(TTLINVDR,0)=0 THEN '未开票' WHEN ISNULL(TTLINVDR,0)=ISNULL(TTLDR,0) THEN '已开票' WHEN ISNULL(TTLINVDR,0)!=ISNULL(TTLDR,0) THEN '部分开票' END DRINVSTATUS "); + strSql.Append(",CASE WHEN ISNULL(TTLINVCR,0)=0 THEN '未开票' WHEN ISNULL(TTLINVCR,0)=ISNULL(TTLCR,0) THEN '已开票' WHEN ISNULL(TTLINVCR,0)!=ISNULL(TTLCR,0) THEN '部分开票' END CRINVSTATUS "); strSql.Append(",CASE WHEN ISNULL(TTLDUIDR,0)=0 THEN '未对账' WHEN ISNULL(TTLDUIDR,0)=ISNULL(TTLDR,0) THEN '已对账' WHEN ISNULL(TTLDUIDR,0)!=ISNULL(TTLDR,0) THEN '部分对账' END DRDUISTATUS "); strSql.Append(",APPLYCOUNT ISAPPLY,AMENDCOUNT AMEND from ("); strSql.Append("SELECT "); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSubSeaOrder/MsOpSubSeaOrderDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSubSeaOrder/MsOpSubSeaOrderDAL.cs index 6d40bb42..8f0563a5 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSubSeaOrder/MsOpSubSeaOrderDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSubSeaOrder/MsOpSubSeaOrderDAL.cs @@ -90,7 +90,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSubSeaOrderDAL // var strSql = new StringBuilder(); - strSql.Append("SELECT ORDNO,BSNO,ORSTATUS,ORTYPE,ORREASON,BSDATE,MBLNO,HBLNO,CUSTOMERNAME"); + strSql.Append("SELECT ORDNO,B.BSNO,ORSTATUS,ORTYPE,ORREASON,BSDATE,MBLNO,HBLNO,CUSTOMERNAME"); strSql.Append(",SHIPPER,CONSIGNEE,NOTIFYPARTY,VESSEL,VOYNO,ETD,ETA,PlACERECEIPT,PORTLOADID,PORTLOAD,PORTDISCHARGEID,PORTDISCHARGE"); strSql.Append(",PLACEDELIVERYID,PLACEDELIVERY,DESTINATIONID,DESTINATION,NOBILL,ISSUETYPE,ISSUEDATE,ISSUEPLACE,BLFRT"); strSql.Append(",PREPARDAT,PAYABLEAT,[SERVICE],MARKS,NOPKGS,[DESCRIPTION],GOODSNAME,GROSSWEIGHT,MEASUREMENT,PKGS,KINDPKGS"); @@ -1439,8 +1439,101 @@ namespace DSWeb.MvcShipping.DAL.MsOpSubSeaOrderDAL return result; } + #region 批量修改 + public static DBResult Modify(List bodyList, MsOpSubSeaArrival modifydata, string companyid) + { + var result = new DBResult(); + + 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(); + strSql.Append("update op_sub_seaorder_arrival set bsno=bsno "); + + + if (modifydata.OFFICEADDR != "" && modifydata.OFFICEADDR != null) + strSql.Append(",OFFICEADDR=@OFFICEADDR"); + + strSql.Append(" where ORDNO=@ORDNO "); + + var cmdupdate = + db.GetSqlStringCommand(strSql.ToString()); + + if (bodyList != null) + { + foreach (var enumValue in bodyList) + { + if (modifydata.AMOUNTUSD !=0) + { + var cmdUpdateFee = db.GetSqlStringCommand("update ch_fee set EXCHANGERATE=" + modifydata.AMOUNTUSD.ToString() + " where CURRENCY='USD' AND BSNO='" + enumValue.ORDNO + "'"); + db.ExecuteNonQuery(cmdUpdateFee, tran); + + } + + + + + var isPost = true; + + + if (isPost) + { + + + cmdupdate.Parameters.Clear(); + + if (modifydata.OFFICEADDR != "" && modifydata.OFFICEADDR != null) + db.AddInParameter(cmdupdate, "@OFFICEADDR", DbType.String, modifydata.OFFICEADDR); + + //if (modifydata.AIRLINES != "" && modifydata.AIRLINES != null) + // db.AddInParameter(cmdupdate, "@AIRLINES", DbType.String, modifydata.AIRLINES); + + db.AddInParameter(cmdupdate, "@ORDNO", DbType.String, enumValue.ORDNO); + 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; + } + + #endregion + #region 集装箱动态 static public List GetCtnStatusList(string strCondition,string billtype,string companyid) { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsUerAuthority/MsUerAuthorityDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsUerAuthority/MsUerAuthorityDAL.cs index 311ddf78..fed3f752 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsUerAuthority/MsUerAuthorityDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsUerAuthority/MsUerAuthorityDAL.cs @@ -554,20 +554,20 @@ namespace DSWeb.MvcShipping.DAL.MsUerAuthority try { + var cmdInsertOp = +db.GetSqlStringCommand( +@"if (select GID from user_authority_range_op where USERID=@USERID and OPID=@OPID AND AUTHORITYID=@AUTHORITYID) is null " ++ " insert into user_authority_range_op (GID,USERID,AUTHORITYID,OPID,VISIBLERANGE,OPERATERANGE,CREATEUSER,CREATETIME)" ++ " values (@GID,@USERID,@AUTHORITYID,@OPID,@VISIBLERANGE,@OPERATERANGE,@CREATEUSER,@CREATETIME) else " ++ "update user_authority_range_op set OPERATERANGE=@OPERATERANGE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME where USERID=@USERID and OPID=@OPID AND AUTHORITYID=@AUTHORITYID"); - var cmdUpdate = - db.GetSqlStringCommand( - @"update user_authority_range_op set VISIBLERANGE=@VISIBLERANGE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME where GID=@GID "); - - var cmdUpdateop = - db.GetSqlStringCommand( - @"update user_authority_range_op set OPERATERANGE=@OPERATERANGE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME where GID=@GID "); - - var cmdInsert = - db.GetSqlStringCommand( - @"insert into user_authority_range_op (GID,USERID,AUTHORITYID,OPID,VISIBLERANGE,OPERATERANGE,CREATEUSER,CREATETIME) - values (@GID,@USERID,@AUTHORITYID,@OPID,@VISIBLERANGE,@OPERATERANGE,@CREATEUSER,@CREATETIME) "); + var cmdInsertVs = +db.GetSqlStringCommand( +@"if (select GID from user_authority_range_op where USERID=@USERID and OPID=@OPID AND AUTHORITYID=@AUTHORITYID) is null " ++ " insert into user_authority_range_op (GID,USERID,AUTHORITYID,OPID,VISIBLERANGE,OPERATERANGE,CREATEUSER,CREATETIME)" ++ " values (@GID,@USERID,@AUTHORITYID,@OPID,@VISIBLERANGE,@OPERATERANGE,@CREATEUSER,@CREATETIME) else " ++ "update user_authority_range_op set VISIBLERANGE=@VISIBLERANGE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME where USERID=@USERID and OPID=@OPID AND AUTHORITYID=@AUTHORITYID"); @@ -576,59 +576,133 @@ namespace DSWeb.MvcShipping.DAL.MsUerAuthority foreach (var enumValue in bodyList) { - if (enumValue.GID == "") + if (rtype == "OP") { - cmdInsert.Parameters.Clear(); - db.AddInParameter(cmdInsert, "@GID", DbType.String, Guid.NewGuid().ToString()); - db.AddInParameter(cmdInsert, "@USERID", DbType.String, enumValue.USERID); - db.AddInParameter(cmdInsert, "@AUTHORITYID", DbType.String, enumValue.AUTHORITYID); - db.AddInParameter(cmdInsert, "@OPID", DbType.String, enumValue.OPID); + + cmdInsertOp.Parameters.Clear(); + db.AddInParameter(cmdInsertOp, "@OPID", DbType.String, enumValue.OPID); + db.AddInParameter(cmdInsertOp, "@AUTHORITYID", DbType.String, enumValue.AUTHORITYID); + db.AddInParameter(cmdInsertOp, "@USERID", DbType.String, enumValue.USERID); + db.AddInParameter(cmdInsertOp, "@GID", DbType.String, Guid.NewGuid().ToString()); + if (enumValue.OPERATERANGE) + db.AddInParameter(cmdInsertOp, "@OPERATERANGE", DbType.String, "1"); + else + db.AddInParameter(cmdInsertOp, "@OPERATERANGE", DbType.String, "0"); if (enumValue.VISIBLERANGE) - db.AddInParameter(cmdInsert, "@VISIBLERANGE", DbType.String, "1"); + db.AddInParameter(cmdInsertOp, "@VISIBLERANGE", DbType.String, "1"); else - db.AddInParameter(cmdInsert, "@VISIBLERANGE", DbType.String, "0"); + db.AddInParameter(cmdInsertOp, "@VISIBLERANGE", DbType.String, "0"); + //db.AddInParameter(cmdInsertOp, "@VISIBLERANGE", DbType.String, "0"); + db.AddInParameter(cmdInsertOp, "@CREATEUSER", DbType.String, userid); + db.AddInParameter(cmdInsertOp, "@CREATETIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); + + db.AddInParameter(cmdInsertOp, "@MODIFIEDUSER", DbType.String, userid); + db.AddInParameter(cmdInsertOp, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); + db.ExecuteNonQuery(cmdInsertOp, tran); + } + else { + cmdInsertVs.Parameters.Clear(); + db.AddInParameter(cmdInsertVs, "@OPID", DbType.String, enumValue.OPID); + db.AddInParameter(cmdInsertVs, "@AUTHORITYID", DbType.String, enumValue.AUTHORITYID); + db.AddInParameter(cmdInsertVs, "@USERID", DbType.String, enumValue.USERID); + db.AddInParameter(cmdInsertVs, "@GID", DbType.String, Guid.NewGuid().ToString()); if (enumValue.OPERATERANGE) - db.AddInParameter(cmdInsert, "@OPERATERANGE", DbType.String, "1"); + db.AddInParameter(cmdInsertVs, "@OPERATERANGE", DbType.String, "1"); else - db.AddInParameter(cmdInsert, "@OPERATERANGE", DbType.String, "0"); - db.AddInParameter(cmdInsert, "@CREATEUSER", DbType.String, userid); - db.AddInParameter(cmdInsert, "@CREATETIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); - db.ExecuteNonQuery(cmdInsert, tran); + db.AddInParameter(cmdInsertVs, "@OPERATERANGE", DbType.String, "0"); + if (enumValue.VISIBLERANGE) + db.AddInParameter(cmdInsertVs, "@VISIBLERANGE", DbType.String, "1"); + else + db.AddInParameter(cmdInsertVs, "@VISIBLERANGE", DbType.String, "0"); + //db.AddInParameter(cmdInsertOp, "@VISIBLERANGE", DbType.String, "0"); + db.AddInParameter(cmdInsertVs, "@CREATEUSER", DbType.String, userid); + db.AddInParameter(cmdInsertVs, "@CREATETIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); - } - else - { - if (rtype == "OP") - { - cmdUpdateop.Parameters.Clear(); - db.AddInParameter(cmdUpdateop, "@GID", DbType.String, enumValue.GID); - if (enumValue.OPERATERANGE) - db.AddInParameter(cmdUpdateop, "@OPERATERANGE", DbType.String, "1"); - else - db.AddInParameter(cmdUpdateop, "@OPERATERANGE", DbType.String, "0"); - db.AddInParameter(cmdUpdateop, "@MODIFIEDUSER", DbType.String, userid); - db.AddInParameter(cmdUpdateop, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); - db.ExecuteNonQuery(cmdUpdateop, tran); - } - if (rtype == "VS") - { - cmdUpdate.Parameters.Clear(); - db.AddInParameter(cmdUpdate, "@GID", DbType.String, enumValue.GID); - if (enumValue.VISIBLERANGE) - db.AddInParameter(cmdUpdate, "@VISIBLERANGE", DbType.String, "1"); - else - db.AddInParameter(cmdUpdate, "@VISIBLERANGE", DbType.String, "0"); - db.AddInParameter(cmdUpdate, "@MODIFIEDUSER", DbType.String, userid); - db.AddInParameter(cmdUpdate, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); - db.ExecuteNonQuery(cmdUpdate, tran); + db.AddInParameter(cmdInsertVs, "@MODIFIEDUSER", DbType.String, userid); + db.AddInParameter(cmdInsertVs, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); + db.ExecuteNonQuery(cmdInsertVs, tran); - } } + } } + //var cmdUpdate = + // db.GetSqlStringCommand( + // @"update user_authority_range_op set VISIBLERANGE=@VISIBLERANGE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME where GID=@GID "); + + //var cmdUpdateop = + // db.GetSqlStringCommand( + // @"update user_authority_range_op set OPERATERANGE=@OPERATERANGE,MODIFIEDUSER=@MODIFIEDUSER,MODIFIEDTIME=@MODIFIEDTIME where GID=@GID "); + + + //var cmdInsert = + // db.GetSqlStringCommand( + // @"insert into user_authority_range_op (GID,USERID,AUTHORITYID,OPID,VISIBLERANGE,OPERATERANGE,CREATEUSER,CREATETIME) + // values (@GID,@USERID,@AUTHORITYID,@OPID,@VISIBLERANGE,@OPERATERANGE,@CREATEUSER,@CREATETIME) "); + + + + //if (bodyList != null) + //{ + // foreach (var enumValue in bodyList) + // { + + // if (enumValue.GID == "") + // { + // cmdInsert.Parameters.Clear(); + // db.AddInParameter(cmdInsert, "@GID", DbType.String, Guid.NewGuid().ToString()); + // db.AddInParameter(cmdInsert, "@USERID", DbType.String, enumValue.USERID); + // db.AddInParameter(cmdInsert, "@AUTHORITYID", DbType.String, enumValue.AUTHORITYID); + // db.AddInParameter(cmdInsert, "@OPID", DbType.String, enumValue.OPID); + // if (enumValue.VISIBLERANGE) + // db.AddInParameter(cmdInsert, "@VISIBLERANGE", DbType.String, "1"); + // else + // db.AddInParameter(cmdInsert, "@VISIBLERANGE", DbType.String, "0"); + // if (enumValue.OPERATERANGE) + // db.AddInParameter(cmdInsert, "@OPERATERANGE", DbType.String, "1"); + // else + // db.AddInParameter(cmdInsert, "@OPERATERANGE", DbType.String, "0"); + // db.AddInParameter(cmdInsert, "@CREATEUSER", DbType.String, userid); + // db.AddInParameter(cmdInsert, "@CREATETIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); + // db.ExecuteNonQuery(cmdInsert, tran); + + // } + // else + // { + // if (rtype == "OP") + // { + // cmdUpdateop.Parameters.Clear(); + // db.AddInParameter(cmdUpdateop, "@GID", DbType.String, enumValue.GID); + // if (enumValue.OPERATERANGE) + // db.AddInParameter(cmdUpdateop, "@OPERATERANGE", DbType.String, "1"); + // else + // db.AddInParameter(cmdUpdateop, "@OPERATERANGE", DbType.String, "0"); + // db.AddInParameter(cmdUpdateop, "@MODIFIEDUSER", DbType.String, userid); + // db.AddInParameter(cmdUpdateop, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); + // db.ExecuteNonQuery(cmdUpdateop, tran); + // } + // if (rtype == "VS") + // { + // cmdUpdate.Parameters.Clear(); + // db.AddInParameter(cmdUpdate, "@GID", DbType.String, enumValue.GID); + // if (enumValue.VISIBLERANGE) + // db.AddInParameter(cmdUpdate, "@VISIBLERANGE", DbType.String, "1"); + // else + // db.AddInParameter(cmdUpdate, "@VISIBLERANGE", DbType.String, "0"); + // db.AddInParameter(cmdUpdate, "@MODIFIEDUSER", DbType.String, userid); + // db.AddInParameter(cmdUpdate, "@MODIFIEDTIME", DbType.String, DateTime.Now.ToString("yyyy-MM-dd")); + // db.ExecuteNonQuery(cmdUpdate, tran); + + + // } + // } + + // } + //} + tran.Commit(); diff --git a/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/AddFeePLIndex.aspx b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/AddFeePLIndex.aspx new file mode 100644 index 00000000..414323ec --- /dev/null +++ b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/AddFeePLIndex.aspx @@ -0,0 +1,58 @@ +<%@ Page Title="" Language="C#" MasterPageFile="~/Areas/MvcShipping/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage" %> + + + + + + + + + + + <%-- --%> + + + + + + + +
+
diff --git a/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/Edit.aspx b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/Edit.aspx index b0d3402f..f5e92873 100644 --- a/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/Edit.aspx +++ b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/Edit.aspx @@ -33,6 +33,7 @@ DEPTNAME = '<%= Session["DEPTNAME"] %>'; } getSessgion5(); + var strLANGUAGES = "en-us"; diff --git a/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditAgentExport.aspx b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditAgentExport.aspx index 2913805a..7e995b7c 100644 --- a/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditAgentExport.aspx +++ b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditAgentExport.aspx @@ -33,6 +33,7 @@ DEPTNAME = '<%= Session["DEPTNAME"] %>'; } getSessgion5(); + var strLANGUAGES = "en-us"; diff --git a/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditArrival.aspx b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditArrival.aspx index a95bd312..000c8f7c 100644 --- a/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditArrival.aspx +++ b/DSWeb/Areas/MvcShipping/Views/MsOpSubSeaOrder/EditArrival.aspx @@ -33,6 +33,7 @@ DEPTNAME = '<%= Session["DEPTNAME"] %>'; } getSessgion5(); + var strLANGUAGES = "en-us"; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/FeeTemplatePLAdd.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/FeeTemplatePLAdd.js index 76d6a39f..a4bff9c1 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/FeeTemplatePLAdd.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/FeeTemplatePLAdd.js @@ -601,9 +601,11 @@ Ext.extend(Shipping.FeeTemplatePLAdd, Ext.Panel, { if (parentWin) { var ret = parentWin.OprationSwap(); + _thisfeetemppl.BillType = ret[4]; + _thisfeetemppl.OrType = ret[5]; _thisfeetemppl.strbsno = ret[6]; _thisfeetemppl.storeBodyAddList.load({ - params: { start: 0, limit: 1000, sort: '', condition: _thisfeetemppl.strbsno }, + params: { start: 0, limit: 1000, sort: '', condition: _thisfeetemppl.strbsno, billtype: _thisfeetemppl.BillType, ortype: _thisfeetemppl.OrType }, waitMsg: "正在查询数据...", callback: function (r, options, success) { if (success) { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/MsOpSubSeaImportAIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/MsOpSubSeaImportAIndex.js index 4f141ad9..3e4e858f 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/MsOpSubSeaImportAIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSubSeaOrder/MsOpSubSeaImportAIndex.js @@ -13,6 +13,7 @@ Ext.extend(Shipping.MsOpSubSeaeImportAIndex, Ext.Panel, { isShowAdvancedQuery: 0, //是否显示高级查询面板 IsAudit: false, BillType: 1, + sqlcontext: '', OrType:1, @@ -212,12 +213,13 @@ Ext.extend(Shipping.MsOpSubSeaeImportAIndex, Ext.Panel, { header: 'KINDPKGS', width: 60 }]; - + this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); //定义Grid this.gridList = new Ext.grid.GridPanel({ store: this.storeList, enableHdMenu: false, region: 'center', + selModel: this.GridCheckBoxModel, loadMask: { msg: "Loading,Wait..." }, trackMouseOver: true, disableSelection: false, @@ -420,6 +422,17 @@ Ext.extend(Shipping.MsOpSubSeaeImportAIndex, Ext.Panel, { }], scope: this + }, { + text: "Batch fee Add", + handler: function (button, event) { + this.onPiLiangAddFeeTemplate(); + }, + scope: this + }, { + text: "Batch Edit", //"业务批量修改", + handler: function (menu, event) { + _this.winModifyShow.show(); + } }, '-', { text: "Save Display List", id: "btntest", @@ -460,6 +473,123 @@ Ext.extend(Shipping.MsOpSubSeaeImportAIndex, Ext.Panel, { Ext.apply(store.proxy.extraParams, { condition: sql, billtype: this.BillType, ortype: this.OrType }); }, this); + + this.StoreOfficeAddr = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsSubSeaOrderYard', + proxy: { url: '/MvcShipping/MsOpSubSeaOrder/GetArrivalYardList' } + }); + this.StoreOfficeAddr.load({ params: { condition: "" } }); + + this.comboxOfficeAddr = Ext.create('DsExt.ux.RefTableCombox', { + store: this.StoreOfficeAddr, + name: 'OFFICEADDRID', + fieldLabel: '搬入場所', + valueField: 'YARDCODE', + displayField: 'YARDCODE', + listeners: { + scope: this, + 'select': function (combo, records, eOpts) { + if (records.length > 0) { + var selectrecords = DsStoreQueryBy(this.StoreOfficeAddr, 'YARDCODE', combo.value); + if (selectrecords.getCount() > 0) { + var selectdata = selectrecords.getAt(0).data; + this.formModify.getForm().findField('OFFICEADDR').setValue(selectdata.DESCRIP); + } else { + this.formModify.getForm().findField('OFFICEADDR').setValue(''); + } + } + } + } + }); + + 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: 'AMOUNTUSD' + } + ] + }, { + xtype: 'container', + layout: 'anchor', + flex: 1, + defaultType: 'textfield', + items: [ + this.comboxOfficeAddr, + { + xtype: 'textareafield', + fieldLabel: '  ', + grow: true, + height: 50, + name: 'OFFICEADDR', + anchor: '100%' + } + ] + } + ]//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 @@ -467,6 +597,7 @@ Ext.extend(Shipping.MsOpSubSeaeImportAIndex, Ext.Panel, { onRefreshClick: function (button, event) { //var girdcolums = this.gridList.getColumnMode(); var sql = this.getCondition(); + this.sqlcontext = sql; this.storeList.load({ params: { start: 0, limit: this.PageSize, sort: '', condition: sql, billtype: this.BillType, ortype: this.OrType }, waitMsg: "Data being queried...", @@ -627,8 +758,70 @@ Ext.extend(Shipping.MsOpSubSeaeImportAIndex, Ext.Panel, { }, + onModifyClick: function (menu, event) { + + var GidStr = ''; + var records = this.GridCheckBoxModel.selected.items; + 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); + - onPiLiangAddFeeTemplate: function (menu, event, type) { + } + + 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/MsOpSubSeaOrder/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.onRefreshClick(); + _this.winModifyShow.close(); + + } + + } else { + Ext.MessageBox.alert('请求出现错误,请重试', response.responseText); + } + }, + scope: this + }); + } + + }, + onPiLiangAddFeeTemplate: function () { var selections = this.GridCheckBoxModel.selected.items; if (selections.length == 0) { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/RptCwGenlegAccitems/RptCwGenlegAccitemsIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/RptCwGenlegAccitems/RptCwGenlegAccitemsIndex.js index 8300a57e..b63746d7 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/RptCwGenlegAccitems/RptCwGenlegAccitemsIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/RptCwGenlegAccitems/RptCwGenlegAccitemsIndex.js @@ -1539,6 +1539,7 @@ Ext.extend(Shipping.RptCwGenlegAccitemsIndex, Ext.Panel, { ACCDATEend: ACCDATEend, strCbHSKM: strCbHSKM, strCURRENCY: strCURRENCY, + strCbJZFS: strCbJZFS, printstr: 'true' }, callback: function (options, success, response) { diff --git a/DSWeb/DSWeb.csproj b/DSWeb/DSWeb.csproj index 165b5f3c..68e0dedc 100644 --- a/DSWeb/DSWeb.csproj +++ b/DSWeb/DSWeb.csproj @@ -2861,6 +2861,7 @@ + diff --git a/JobAutoCreateFee/JobD7CreateFee.cs b/JobAutoCreateFee/JobD7CreateFee.cs index 2facbd7b..e71e5ae1 100644 --- a/JobAutoCreateFee/JobD7CreateFee.cs +++ b/JobAutoCreateFee/JobD7CreateFee.cs @@ -55,7 +55,7 @@ namespace JobCreateFee var strSqlBs = new StringBuilder(); strSqlBs.Clear(); strSqlBs.Append("select B.BSNO,B.MBLNO,B.CUSTOMERNAME,B.CARRIER,B.FORWARDER,B.CUSTOMSER,B.SHIPAGENCY,B.YARD,B.AGENTID,B.OP "); - strSqlBs.Append(" from v_op_bs B where ISNULL(FEESTATUS,0)=0 "); + strSqlBs.Append(" from v_op_bs B where ISNULL(FEESTATUS,0)=0 AND OPLB='" + enumFeeproject.OPTYPE + "' "); if (!string.IsNullOrEmpty(enumFeeproject.PROJECTTYPE)) { strSqlBs.Append(" AND not EXISTS (SELECT 1 FROM op_auto_fee_detail D WHERE D.BSNO=B.BSNO AND D.FEEGROUP='" + enumFeeproject.PROJECTTYPE + "' AND D.FEETYPE=" + enumFeeproject.FEETYPE + ") ");