From 4a10c2c51d17fb783f52ca5bb5b550c6c2cb199d Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Fri, 3 Feb 2023 10:30:13 +0800 Subject: [PATCH] 1 --- .../Controllers/Chfee_settlementController.cs | 25 ++++++- .../Chfee_PayapplicationDAL.cs | 10 +-- .../Chfee_settlement/Chfee_SettlementDAL.cs | 72 ++++++++++++++++++- .../Chfee_Payapplication.cs | 2 + .../Chfee_settlement/Chfee_settlement.cs | 5 ++ .../ChPayapplicationBLEdit.js | 67 ++++++++++++----- .../ChPayapplicationModel.js | 1 + .../Viewsjs/Chfee_payapplication/Zi_zh-cn.js | 1 + .../ChPayAppBLsettlementEdit.js | 45 +++++++++++- .../Chfee_settlement/ChPaysettlementIndex.js | 8 ++- .../Chfee_settlement/ChSettlementModel.js | 3 + .../Viewsjs/Chfee_settlement/Zi_zh-cn.js | 4 +- .../DAL/MsOpSeae/MsOpSeaeYardDAL.cs | 39 +++++++++- .../Viewsjs/MsOpSeae/MsOpSeaeEdit.js | 8 +++ 14 files changed, 254 insertions(+), 36 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs b/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs index 4251696d..59726d89 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_settlementController.cs @@ -661,10 +661,21 @@ namespace DSWeb.Areas.Account.Controllers #region 锁定和撤销锁定 - public ContentResult Lock(string bill, string remark) + public ContentResult Lock(string bill, string remark,string billtype="0") { - DBResult result = ChsettlementDAL.Lock(bill,remark); + DBResult result = ChsettlementDAL.Lock(bill,remark); + if (result.Success) { + if (billtype == "2") { + var headData = ChsettlementDAL.GetData("BILLNO='"+ bill + "'"); + if (!string.IsNullOrEmpty(headData.INVOICENO) || !string.IsNullOrEmpty(headData.INVOICEDATE) || !string.IsNullOrEmpty(headData.INVOICEAMOUNT)) + { + T_ALL_DA T_ALL_DA = new T_ALL_DA(); + var blUpSQL = " update ch_fee_payapplication SET INVNO='" + headData.INVOICENO + "',INVDATE='" + headData.INVOICEDATE + "',INVOICEAMOUNT='" + headData.INVOICEAMOUNT + "' where billno in (select PAYBILLNO FROM CH_FEE_DO_PAYAPPLICATION WHERE BILLNO='" + headData.BILLNO + "')"; + bool bl = T_ALL_DA.GetExecuteSqlCommand(blUpSQL); + } + } + } var json = JsonConvert.Serialize(result); return new ContentResult() { Content = json }; @@ -702,8 +713,16 @@ namespace DSWeb.Areas.Account.Controllers var json = JsonConvert.Serialize(result); return new ContentResult() { Content = json }; } + public ContentResult LockListNew(string data) + { + var headList = JsonConvert.Deserialize>(data); + DBResult result = ChsettlementDAL.LockListNew(headList); + + var json = JsonConvert.Serialize(result); + return new ContentResult() { Content = json }; + } - public ContentResult UnLockList(string bills) + public ContentResult UnLockList(string bills) { DBResult result = ChsettlementDAL.UnLockList(bills); diff --git a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs index 89efb5a8..065a5dda 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs @@ -74,7 +74,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication strSql.Append(" GID,BILLNO,BILLSTATUS,CUSTOMERNAME,CURR,CHEQUEPAYABLE,SETTLETYPE,PAYTYPE"); strSql.Append(" ,PAYABLETIME,AMOUNTRMB,RATE,AMOUNTUSD,AMOUNTOT,SETTLERMB,SETTLEUSD,SETTLEOT,SETTLERATE"); strSql.Append(" ,APPLICANT,APPLYTIME,ENTERTIME,SETTLEUSER,SETTLETIME,AUDITUSER,AUDITTIME "); - strSql.Append(" ,REMARK,COMPANYID,ISAPP,PAYAPPID,CHEQUENUMREMARK,INVDATE,INVNO, "); + strSql.Append(" ,REMARK,COMPANYID,ISAPP,PAYAPPID,CHEQUENUMREMARK,INVDATE,INVNO,INVOICEAMOUNT, "); strSql.Append("(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97005 and EnumValueID=cm.BILLSTATUS) as BILLSTATUSREF"); strSql.Append(",(select ShowName from [user] where GID=cm.APPLICANT) as APPLICANTNAME"); strSql.Append(",(select DEPTNAME from VW_user where userid=cm.APPLICANT) as APPLICANTDEPT"); @@ -156,7 +156,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication strSql.Append(" SELECT i.GID,i.BILLNO,i.BILLSTATUS,i.CUSTOMERNAME,i.CURR,i.CHEQUEPAYABLE,i.SETTLETYPE,i.PAYTYPE "); strSql.Append(" ,i.PAYABLETIME,i.AMOUNTRMB,i.RATE,i.AMOUNTUSD,i.AMOUNTOT,i.SETTLERMB as RMBDOAMOUNT,i.SETTLEUSD as USDDOAMOUNT,i.SETTLEOT as OTDOAMOUNT,i.SETTLERATE"); strSql.Append(" ,i.APPLICANT,i.APPLYTIME,i.ENTERTIME,i.SETTLEUSER,i.SETTLETIME,i.AUDITUSER,i.AUDITTIME "); - strSql.Append(" ,i.REMARK,i.COMPANYID,i.ISAPP,i.PAYAPPID,i.CHEQUENUMREMARK,INVDATE,INVNO, "); + strSql.Append(" ,i.REMARK,i.COMPANYID,i.ISAPP,i.PAYAPPID,i.CHEQUENUMREMARK,INVDATE,INVNO,INVOICEAMOUNT, "); strSql.Append("(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97005 and EnumValueID=i.BILLSTATUS) as BILLSTATUSREF"); strSql.Append(",(select ShowName from [user] where GID=i.APPLICANT) as APPLICANTNAME"); strSql.Append(",(select DEPTNAME from VW_user where userid=i.APPLICANT) as APPLICANTDEPT"); @@ -303,8 +303,10 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication data.PAYAPPID = Convert.ToString(reader["PAYAPPID"]); data.CHEQUENUMREMARK = Convert.ToString(reader["CHEQUENUMREMARK"]); data.INVNO = Convert.ToString(reader["INVNO"]); - if (reader["INVDATE"] != DBNull.Value) - data.INVDATE = Convert.ToDateTime(reader["INVDATE"]).ToString("yyyy-MM-dd"); + data.INVDATE = Convert.ToString(reader["INVDATE"]); + data.INVOICEAMOUNT = Convert.ToString(reader["INVOICEAMOUNT"]); + //if (reader["INVDATE"] != DBNull.Value) + // data.INVDATE = Convert.ToDateTime(reader["INVDATE"]).ToString("yyyy-MM-dd"); data.CUSTACCOUNTGID = Convert.ToString(reader["CUSTACCOUNTGID"]); data.CUSTBANKNAME = Convert.ToString(reader["CUSTBANKNAME"]); data.CUSTACCOUNT = Convert.ToString(reader["CUSTACCOUNT"]); diff --git a/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs index 79e76b8d..c042c9a8 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_settlement/Chfee_SettlementDAL.cs @@ -112,7 +112,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement //strSql.Append(",ISNULL((select sum((isnull(amount,0)-isnull(invoice,0))) as noinvoice from ch_fee where ISINVOICE<>1 AND CURRENCY='RMB' and gid in (select feeid from ch_fee_do where BILLNO=cm.BILLNO)),0) as NOINVOICE"); strSql.Append(",dbo.GetFeeNoInvByStlNo(cm.BILLNO) as NOINVOICE"); - strSql.Append(" ,cm.BS_CUSTOMERNAME,FEEAMOUNT,PAYBILLNO,INVOICENO"); + strSql.Append(" ,cm.BS_CUSTOMERNAME,FEEAMOUNT,PAYBILLNO,INVOICENO,INVOICEDATE,INVOICEAMOUNT"); strSql.Append(" ,SETTLENO,REMITTANCE,REMITTANCEAMOUNT,BUYRATE,SELLRATE,SETTLRATE,VOUCHERNO as VOUCHERNOREF "); strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP"); @@ -191,7 +191,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement strSql.Append(",(select BANKNAME from [sys_bank] where GID=cm.ACCOUNTUSD) as ACCOUNTUSDREF"); strSql.Append(",(select EnumValueName from tSysEnumValue where LangId=0 and EnumTypeID=97007 and EnumValueID=cm.SETTLEMODE) as SETTLEMODEREF"); strSql.Append(",dbo.GetFeeNoInvByStlNo(cm.BILLNO) as NOINVOICE"); - strSql.Append(" ,cm.BS_CUSTOMERNAME,FEEAMOUNT,PAYBILLNO,INVOICENO "); + strSql.Append(" ,cm.BS_CUSTOMERNAME,FEEAMOUNT,PAYBILLNO,INVOICENO,INVOICEDATE,INVOICEAMOUNT "); strSql.Append(" ,PAYBILLNO,SETTLENO,REMITTANCE,REMITTANCEAMOUNT,BUYRATE,SELLRATE,SETTLRATE "); strSql.Append(",SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP"); @@ -246,7 +246,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement //strSql.Append(",ISNULL((select sum((isnull(amount,0)-isnull(invoice,0))) as noinvoice from ch_fee where ISINVOICE<>1 AND CURRENCY='RMB' and gid in (select feeid from ch_fee_do where BILLNO=cm.BILLNO)),0) as NOINVOICE"); strSql.Append(",'' as NOINVOICE"); - strSql.Append(" ,cm.BS_CUSTOMERNAME,FEEAMOUNT,PAYBILLNO,INVOICENO"); + strSql.Append(" ,cm.BS_CUSTOMERNAME,FEEAMOUNT,PAYBILLNO,INVOICENO,INVOICEDATE,INVOICEAMOUNT"); strSql.Append(" ,SETTLENO,REMITTANCE,REMITTANCEAMOUNT,BUYRATE,SELLRATE,SETTLRATE,VOUCHERNO as VOUCHERNOREF "); strSql.Append(",SALECORPID,'' as SALECORP,'' INVNO"); @@ -411,6 +411,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement if (reader["ISNOTVOU"] != DBNull.Value) data.ISNOTVOU = Convert.ToBoolean(reader["ISNOTVOU"]); data.INVOICENO = Convert.ToString(reader["INVOICENO"]); + data.INVOICEDATE = Convert.ToString(reader["INVOICEDATE"]); + data.INVOICEAMOUNT = Convert.ToString(reader["INVOICEAMOUNT"]); #endregion headList.Add(data); } @@ -6135,7 +6137,71 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Settlement return result; } + public static DBResult LockListNew(List bodyList) + { + var result = new DBResult(); + + Database db = DatabaseFactory.CreateDatabase(); + using (var conn = db.CreateConnection()) + { + conn.Open(); + var tran = conn.BeginTransaction(); + + try + { + + foreach (var bill in bodyList) + { + + + + var cmdupdate = db.GetSqlStringCommand("update ch_fee_settlement set BILLSTATUS=1 where BILLNO=@BILLNO"); + + + cmdupdate.Parameters.Clear(); + db.AddInParameter(cmdupdate, "@BILLNO", DbType.String, bill.BILLNO); + db.ExecuteNonQuery(cmdupdate, tran); + + + var cmdupdatead = db.GetSqlStringCommand("update ch_fee_advance_payment set BLSTATUS='锁定' where BILLNO=@BILLNO"); + + + cmdupdatead.Parameters.Clear(); + db.AddInParameter(cmdupdatead, "@BILLNO", DbType.String, bill.BILLNO); + db.ExecuteNonQuery(cmdupdatead, tran); + if (bill.SETTLEMODE == 1) { + var cmdupdateAPP = db.GetSqlStringCommand("update ch_fee_payapplication SET INVNO='" + bill.INVOICENO + "',INVDATE='" + bill.INVOICEDATE + "',INVOICEAMOUNT='" + bill.INVOICEAMOUNT + "' where billno in (select PAYBILLNO FROM CH_FEE_DO_PAYAPPLICATION WHERE BILLNO=@BILLNO)"); + + + cmdupdateAPP.Parameters.Clear(); + db.AddInParameter(cmdupdateAPP, "@BILLNO", DbType.String, bill.BILLNO); + db.ExecuteNonQuery(cmdupdateAPP, tran); + + } + + + } + tran.Commit(); + + result = new DBResult(); + result.Success = true; + result.Message = "锁定成功"; + } + catch (Exception E) + { + tran.Rollback(); + result.Success = false; + result.Message = "锁定错误,请重试或联系系统管理员"+E.Message; + + return result; + } + } + + + + return result; + } public static DBResult UnLock(String bill) { var result = new DBResult(); diff --git a/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs b/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs index 8beb4ff1..abbc25d9 100644 --- a/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs +++ b/DSWeb/Areas/Account/Models/Chfee_payapplication/Chfee_Payapplication.cs @@ -426,6 +426,8 @@ namespace DSWeb.Areas.Account.Models.Chfee_Payapplication get { return _invno; } set { _invno = value; } } + [ModelDB] + public string INVOICEAMOUNT { get; set; } [ModelDB] public string CUSTACCOUNTGID diff --git a/DSWeb/Areas/Account/Models/Chfee_settlement/Chfee_settlement.cs b/DSWeb/Areas/Account/Models/Chfee_settlement/Chfee_settlement.cs index 23ac9d11..2d348b3c 100644 --- a/DSWeb/Areas/Account/Models/Chfee_settlement/Chfee_settlement.cs +++ b/DSWeb/Areas/Account/Models/Chfee_settlement/Chfee_settlement.cs @@ -578,6 +578,11 @@ namespace DSWeb.Areas.Account.Models.Chfee_Settlement [ModelDB] public string INVOICENO { get; set; } + [ModelDB] + public string INVOICEDATE { get; set; } + [ModelDB] + public string INVOICEAMOUNT { get; set; } + #endregion } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js index bb5f8662..5888d75a 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationBLEdit.js @@ -394,14 +394,21 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { fieldLabel: Zi.LAN.jhjies, //计划结算其他' name: 'PREAMOUNTOT' }, { - fieldLabel: Zi.LAN.weisq + 'RMB', //未申请RMB + fieldLabel: Zi.LAN.weisq + 'RMB', //未申请RMB + flex: 0.7, readOnly: true, name: 'BALAMOUNTRMB' }, { fieldLabel: Zi.LAN.weisq + 'USD', //未申请USD readOnly: true, + flex: 0.7, name: 'BALAMOUNTUSD' - } + }, { + fieldLabel: Zi.LAN.weisqOther, //未申请其他 + readOnly: true, + flex: 0.6, + name: 'BALAMOUNTOT' + } ] }, { @@ -429,22 +436,50 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { iconCls: "btnsearchBig", width: 20, handler: function (button, event) { - this.ShowBigEdit("INVNO", '发票备注(发票号、发票日期、发票金额)'); + this.ShowBigEdit("INVNO", '发票号'); }, scope: this }] - }, { - fieldLabel: Zi.LAN.fpdate, //发票日期 - flex: 1, - format: 'Y-m-d', - xtype: 'datefield', - name: 'INVDATE' - }, { - fieldLabel: Zi.LAN.weisqOther, //未申请其他 - readOnly: true, - name: 'BALAMOUNTOT' - }, this.comboxSaleCompany + }, { + xtype: 'container', + layout: 'hbox', + flex: 1, + defaultType: 'textfield', + items: [{ + fieldLabel: Zi.LAN.fpdate, //发票号 + flex: 1, + name: 'INVDATE' + }, { + xtype: 'button', + iconCls: "btnsearchBig", + width: 20, + handler: function (button, event) { + this.ShowBigEdit("INVDATE", '发票日期'); + }, + scope: this + }] + + }, { + xtype: 'container', + layout: 'hbox', + flex: 1, + defaultType: 'textfield', + items: [{ + fieldLabel: Zi.LAN.INVOICEAMOUNT, //发票号 + flex: 1, + name: 'INVOICEAMOUNT' + }, { + xtype: 'button', + iconCls: "btnsearchBig", + width: 20, + handler: function (button, event) { + this.ShowBigEdit("INVOICEAMOUNT", '发票金额'); + }, + scope: this + }] + + }, this.comboxSaleCompany ] }, { @@ -4633,7 +4668,7 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { Ext.getCmp("zongshu").setText(Zi.LAN.selectmoney + " :" + sumstr); }, onAddFileClick: function () { - if (BillState != '未提交') {//未提交 + if (BillState != '未提交' && BillState != '审核驳回') {//未提交 Ext.MessageBox.alert(Zi.LAN.Prompt, Zi.LAN.noallowxiugai); //提示', '当前状态不允许修改附件列表 return; } @@ -4645,7 +4680,7 @@ Ext.extend(Shipping.MsChPayapplicationBLEdit, Ext.Panel, { winAccess.BillNo = BillNo; winAccess.show(); }, onDelFileClick: function () { - if (BillState != '未提交') {//未提交 + if (BillState != '未提交' && BillState != '审核驳回') {//未提交 Ext.MessageBox.alert(Zi.LAN.Prompt, Zi.LAN.noallowxiugai); //提示', '当前状态不允许修改附件列表! return; } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js index 5676e444..74457600 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationModel.js @@ -41,6 +41,7 @@ { name: 'CHEQUENUMREMARK', type: 'string' }, { name: 'INVNO', type: 'string' }, { name: 'INVDATE', type: 'string' }, + { name: 'INVOICEAMOUNT', type: 'string' }, { name: 'REMARK', type: 'string' }, { name: 'SALECORP', type: 'string' }, { name: 'SALECORPID', type: 'string' }, diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js index 207df7b3..297e4477 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js @@ -306,3 +306,4 @@ Zi.LAN.TTLDR = "合计应收"; Zi.LAN.TTLCR = "合计应付"; Zi.LAN.TTLPROFIT = "合计利润"; Zi.LAN.PROFITRATE = "利润率"; +Zi.LAN.INVOICEAMOUNT = "发票金额"; \ No newline at end of file diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayAppBLsettlementEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayAppBLsettlementEdit.js index 0904e79d..412ac7c8 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayAppBLsettlementEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayAppBLsettlementEdit.js @@ -457,7 +457,7 @@ Ext.extend(Shipping.MsChPayAppSettlementEdit, Ext.Panel, { iconCls: "btnsearchBig", width: 20, handler: function (button, event) { - this.ShowBigEdit("INVOICENO", '发票备注(发票号、发票日期、金额等)'); + this.ShowBigEdit("INVOICENO", Zi.LAN.InvoiceNumber); }, scope: this }] @@ -469,9 +469,48 @@ Ext.extend(Shipping.MsChPayAppSettlementEdit, Ext.Panel, { layout: 'hbox', defaultType: 'textfield', items: [{ + xtype: 'container', + layout: 'hbox', + flex: 1, + defaultType: 'textfield', + items: [{ + fieldLabel: Zi.LAN.INVOICEDATE, //发票号 + labelWidth: 70, + flex: 1, + name: 'INVOICEDATE' + }, { + xtype: 'button', + iconCls: "btnsearchBig", + width: 20, + handler: function (button, event) { + this.ShowBigEdit("INVOICEDATE", Zi.LAN.INVOICEDATE); + }, + scope: this + }] + + }, { + xtype: 'container', + layout: 'hbox', + flex: 1, + defaultType: 'textfield', + items: [{ + fieldLabel: Zi.LAN.INVOICEAMOUNT, //发票号 + flex: 1, + name: 'INVOICEAMOUNT' + }, { + xtype: 'button', + iconCls: "btnsearchBig", + width: 20, + handler: function (button, event) { + this.ShowBigEdit("INVOICEAMOUNT", Zi.LAN.INVOICEAMOUNT); + }, + scope: this + }] + + },{ fieldLabel: Zi.LAN.Remark, labelWidth: 70, - flex: 1, + flex: 3, name: 'REMARK' }] @@ -3495,7 +3534,7 @@ Ext.extend(Shipping.MsChPayAppSettlementEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 155, + height: 160, items: [this.panelBtn, this.formEdit] }); this.panelBody = new Ext.Panel({ diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPaysettlementIndex.js b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPaysettlementIndex.js index ff119350..d75ed84d 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPaysettlementIndex.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPaysettlementIndex.js @@ -1154,7 +1154,7 @@ Ext.extend(Shipping.MsChPaysettlementIndex, Ext.Panel, { Ext.Msg.show({ title: Zi.LAN.TiShi, msg: Zi.LAN.SelectBillFirst, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); return; } - + var bodyAddDatas = []; var BILLNOStr = ''; for (var i = 0; i < selections.length; i++) { var rec = selections[i]; @@ -1175,6 +1175,7 @@ Ext.extend(Shipping.MsChPaysettlementIndex, Ext.Panel, { BILLNOStr = BILLNOStr + ',' + BILLNO; } + bodyAddDatas.push(rec); } } @@ -1185,11 +1186,12 @@ Ext.extend(Shipping.MsChPaysettlementIndex, Ext.Panel, { if (BILLNOStr == '') { } else { + var jsonbodyAddDatas = ConvertRecordsToJsonAll(bodyAddDatas); Ext.Ajax.request({ waitMsg: Zi.LAN.Msg_Adding, - url: '/Account/Chfee_settlement/LockList', + url: '/Account/Chfee_settlement/LockListNew', params: { - bills: BILLNOStr + data: jsonbodyAddDatas }, callback: function (options, success, response) { if (success) { diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementModel.js b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementModel.js index a112a753..5cf790b6 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementModel.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementModel.js @@ -73,6 +73,9 @@ { name: 'INVNO', type: 'string' }, { name: 'SHENNO', type: 'string' }, { name: 'INVSHENNO', type: 'string' }, + { name: 'INVOICENO', type: 'string' }, + { name: 'INVOICEDATE', type: 'string' }, + { name: 'INVOICEAMOUNT', type: 'string' }, { name: 'SETTLRATE', type: 'string' } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/Zi_zh-cn.js b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/Zi_zh-cn.js index 5390ac74..fd3f84ea 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/Zi_zh-cn.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/Zi_zh-cn.js @@ -43,7 +43,9 @@ Zi.LAN.ChargeDetails = "费用明细"; Zi.LAN.FeeTypeRef = "收付"; Zi.LAN.OriginalExchangeRate = "原始汇率"; Zi.LAN.ConvertExchangeRate = "折算汇率"; -Zi.LAN.InvoiceNumber = "发票备注"; +Zi.LAN.InvoiceNumber = "发票号"; +Zi.LAN.INVOICEDATE = "发票日期"; +Zi.LAN.INVOICEAMOUNT = "发票金额"; Zi.LAN.LanhuoPeople = "揽货人"; Zi.LAN.InputMode = "录入方式"; Zi.LAN.ExchangeCurrency = "折算币别"; diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs index 699f7bc5..c18585d8 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeYardDAL.cs @@ -109,15 +109,29 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeYardDAL MsOpSeae head = null; head = new MsOpSeae(); - head.MBLNO = GetDataHtmlList(BCStr, "订舱号:", Environment.NewLine).Trim(); + head.MBLNO = GetDataHtmlList(BCStr, "订舱号:", Environment.NewLine).Trim(); //var VESSELVOY = GetDataHtmlList(BCStr, "船名/航次:", Environment.NewLine).Trim(); //var vesselindex = VESSELVOY.LastIndexOf(" "); //head.VESSEL = VESSELVOY.Substring(0, vesselindex).Trim(); //head.VOYNO = VESSELVOY.Substring(vesselindex+1).Trim(); head.VESSEL = 中远BC.GetValue("船名"); head.VOYNO = 中远BC.GetValue("航次"); + if (string.IsNullOrEmpty(head.VESSEL)) { + var VESSELVOY = GetDataHtmlList(BCStr, "船名/航次:", Environment.NewLine).Trim(); + var vesselindex = VESSELVOY.LastIndexOf("ETD:"); + if (!string.IsNullOrEmpty(VESSELVOY)) + { + VESSELVOY = VESSELVOY.Substring(0, vesselindex).Trim(); + vesselindex = VESSELVOY.LastIndexOf(" "); + head.VESSEL = VESSELVOY.Substring(0, vesselindex).Trim(); + head.VOYNO = VESSELVOY.Substring(vesselindex + 1).Trim(); + } + + } + head.ETD = 中远BC.GetValue("ETD"); head.ETA = 中远BC.GetValue("ETA"); + head.PORTDISCHARGE = GetDataHtmlList(BCStr, "卸港:", Environment.NewLine).ToUpper().Trim(); head.PLACERECEIPT = GetDataHtmlList(BCStr, "接货地:", Environment.NewLine).ToUpper().Trim(); head.PLACEDELIVERY = GetDataHtmlList(BCStr, "交货地:", Environment.NewLine).ToUpper().Trim(); head.YARD = GetDataHtmlList(BCStr, "提箱点:", "提箱校验码:").Trim(); @@ -384,11 +398,30 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeYardDAL head.VESSEL = BC.GetValue("船名"); head.VOYNO = BC.GetValue("航次"); + if (string.IsNullOrEmpty(head.VESSEL)) { + var VESSELVOY = GetDataHtmlList(BCStr, "船名/航次(Vessel/Voyage):", Environment.NewLine).Trim(); + if (VESSELVOY == "") + { + VESSELVOY = GetDataHtmlList(BCStr, "船名/航次(Vessel): ", Environment.NewLine).Trim(); + } + if (VESSELVOY != "") + { + var vesselindex = VESSELVOY.LastIndexOf("/"); + + head.VESSEL = VESSELVOY.Substring(0, vesselindex).Trim(); + head.VOYNO = VESSELVOY.Substring(vesselindex + 1).Trim(); + if (head.VESSEL.IndexOf("(") > 0) head.VESSEL = head.VESSEL.Substring(0, head.VESSEL.IndexOf("(")).Trim(); + } + + + } head.PORTLOAD = GetDataHtmlList(BCStr, "收货地: ", Environment.NewLine).ToUpper().Trim(); + head.PLACERECEIPT = head.PORTLOAD; head.PLACEDELIVERY = GetDataHtmlList(BCStr, "交货地:", Environment.NewLine).ToUpper().Trim(); - + head.PORTDISCHARGE = head.PLACEDELIVERY; + head.DESTINATION = head.PLACEDELIVERY; //string etdstr = GetDataHtmlList(BCStr, "开港时间(CY Open): ", "(").Trim(); //if (etdstr=="") //{ @@ -400,7 +433,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeYardDAL // DateTime dtEtd = DateTime.Parse(etdstr); // head.ETD = dtEtd.ToString("yyyy-MM-dd"); //} - if(!string.IsNullOrWhiteSpace(BC.GetValue("ETD"))) + if (!string.IsNullOrWhiteSpace(BC.GetValue("ETD"))) head.ETD= BC.GetValue("ETD"); if (!string.IsNullOrWhiteSpace(BC.GetValue("ETA"))) diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index 958c9943..abc0613a 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -20562,6 +20562,10 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { _this.formEdit.getForm().findField('PLACERECEIPTID').setValue(resultData.PLACERECEIPTID); if (resultData.PLACEDELIVERYID != '') _this.formEdit.getForm().findField('PLACEDELIVERYID').setValue(resultData.PLACEDELIVERYID); + if (resultData.PORTDISCHARGE != '') + _this.formEdit.getForm().findField('PORTDISCHARGE').setValue(resultData.PORTDISCHARGE); + if (resultData.DESTINATION != '') + _this.formEdit.getForm().findField('DESTINATION').setValue(resultData.DESTINATION); if (resultData.GOODSNAME != '') _this.formEdit.getForm().findField('GOODSNAME').setValue(resultData.GOODSNAME); @@ -20882,6 +20886,10 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { _this.formEdit.getForm().findField('PLACERECEIPTID').setValue(resultData.PLACERECEIPTID); if (resultData.PLACEDELIVERYID != '') _this.formEdit.getForm().findField('PLACEDELIVERYID').setValue(resultData.PLACEDELIVERYID); + if (resultData.PORTDISCHARGE != '') + _this.formEdit.getForm().findField('PORTDISCHARGE').setValue(resultData.PORTDISCHARGE); + if (resultData.DESTINATION != '') + _this.formEdit.getForm().findField('DESTINATION').setValue(resultData.DESTINATION); if (resultData.GOODSNAME != '') _this.formEdit.getForm().findField('GOODSNAME').setValue(resultData.GOODSNAME);