From 51c1272ba753221b51111f0d251ea5e300203d05 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Thu, 16 Mar 2023 11:30:43 +0800 Subject: [PATCH] 1 --- .../Controllers/Chfee_AuditController.cs | 4 +- .../Chfee_invoiceapplicationController.cs | 27 +- .../Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs | 10 +- .../Chfee_InvoiceapplicationDAL.cs | 6 +- .../Viewsjs/Chfee_Audit/Chfee_AuditBL.js | 17 +- .../Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js | 406 +++++++++--------- .../ChInvoiceapplicationAdd.js | 268 ++++++------ .../ChInvoiceapplicationNewEdit.js | 19 +- .../ChSettlementPayAppEdit.js | 228 +++++----- .../Viewsjs/Chfee_settlement/Zi_zh-cn.js | 2 +- .../Controllers/MsOpSeaeController.cs | 19 +- .../DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs | 2 +- .../Viewsjs/MsChDui/MsChDuiBLEdit.js | 74 ++++ .../Viewsjs/MsChDui/MsChDuiIndex.js | 79 +--- .../Viewsjs/MsChFee/FeeAmendDrCrGrid.js | 4 +- .../Viewsjs/MsChFee/FeeDrCrGrid.js | 4 +- 16 files changed, 611 insertions(+), 558 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs b/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs index 472a5839..0e7dc095 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_AuditController.cs @@ -1127,8 +1127,8 @@ namespace DSWeb.Areas.Account.Controllers string mblnotemp = ""; var auditlist = new List(); var error = ""; - var DrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "') AND FEETYPE=1 "); - var CrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "') AND FEETYPE=2 "); + var DrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "' OR MASTERNO='" + pbsno + "') AND FEETYPE=1 "); + var CrChfeeList = MsChFeeDAL.GetAllDataList("BSNO in (select BSNO FROM V_OP_BILL WHERE PARENTID='" + pbsno + "' OR MASTERNO='" + pbsno + "') AND FEETYPE=2 "); if (DrChfeeList != null && DrChfeeList.Count != 0) { foreach (var fee in DrChfeeList) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_invoiceapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_invoiceapplicationController.cs index 1083aa37..7f76e84e 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_invoiceapplicationController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_invoiceapplicationController.cs @@ -364,7 +364,7 @@ namespace DSWeb.Areas.Account.Controllers result= modb.Save(headData); if (result.Success) { - ChinvoiceapplicationDAL.SaveAppDetail(headData, detailList); + ChinvoiceapplicationDAL.SaveAppDetail(headData.GID, detailList); } }; @@ -432,7 +432,22 @@ namespace DSWeb.Areas.Account.Controllers } - public ContentResult AddDetail(string bill, string data, string curr, bool islist, string GID, bool custgroup = false, string duino = "") + public ContentResult SaveAppDetail(string body) + { + var bodyList = JsonConvert.Deserialize>(body); + + DBResult result = ChinvoiceapplicationDAL.SaveAppDetail(bodyList[0].LINKGID, bodyList); + + var jsonRespose = new JsonResponse + { + Success = result.Success, + Message = result.Message + }; + + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; + } + + public ContentResult AddDetail(string bill, string data, string curr, bool islist, string GID, bool custgroup = false, string duino = "") { if (Convert.ToString(Session["COMPANYID"]).ToString().Trim() == "" || Convert.ToString(Session["USERID"]).ToString().Trim() == "" || Convert.ToString(Session["CODENAME"]).ToString().Trim() == "" || Convert.ToString(Session["SHOWNAME"]).ToString().Trim() == "" || Convert.ToString(Session["DEPTNAME"]).ToString().Trim() == "") { @@ -790,14 +805,17 @@ namespace DSWeb.Areas.Account.Controllers return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } - public ContentResult CreateInvList(string data, string storeCurrExrate) + public ContentResult CreateInvList(string data,string alldata,string storeCurrExrate) { var bodyList = JsonConvert.Deserialize>(data); + var allbodyList = JsonConvert.Deserialize>(alldata); + + var exrateList = JsonConvert.Deserialize>(storeCurrExrate); var headData = ChinvoiceapplicationDAL.GetData(" GID='" + bodyList[0].LINKGID + "'"); - + ChinvoiceapplicationDAL.SaveAppDetail(headData.GID, allbodyList); decimal ttlinv = 0; decimal ttlrmbinv = 0; decimal ttlusdinv = 0; @@ -860,7 +878,6 @@ namespace DSWeb.Areas.Account.Controllers } - ChinvoiceapplicationDAL.SaveAppDetail(headData, bodyList); if ((exrateList == null) || (exrateList.Count == 0)) diff --git a/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs index 3478af42..f65a102c 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_Audit/Chfee_AuditDAL.cs @@ -4644,10 +4644,10 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL } else { - _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=2,BSSTATUS=1 WHERE BSNO=@BSNO"; + _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=2,BSSTATUS=1 WHERE MASTERNO=@BSNO"; } } - _feeComm = "update ch_fee set FEESTATUS=0 where FEESTATUS=2 AND BSNO=@BSNO"; + _feeComm = "update ch_fee set FEESTATUS=0 where FEESTATUS=2 AND BSNO in (select bsno from v_op_bill where MASTERNO=@BSNO)"; } else { @@ -4680,11 +4680,11 @@ namespace DSWeb.MvcShipping.DAL.Chfee_AuditDAL else { if (SUBMITFEEBLFEELOCK == "1") - _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE BSNO=@BSNO"; - else _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE BSNO=@BSNO"; + _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE MASTERNO=@BSNO"; + else _Comm = "UPDATE " + bill.OPLB + " SET BillFeeStatus=1,BILLFEESTATUSTIME=GETDATE() WHERE MASTERNO=@BSNO"; } } - _feeComm = "update ch_fee set FEESTATUS=2 where (FEESTATUS=1 or FEESTATUS=6 or FEESTATUS=7) AND BSNO=@BSNO"; + _feeComm = "update ch_fee set FEESTATUS=2 where (FEESTATUS=1 or FEESTATUS=6 or FEESTATUS=7) AND BSNO in (select bsno from v_op_bs where MASTERNO=@BSNO)"; } var cmdupdate = db.GetSqlStringCommand(_Comm); diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs index 41062015..ab3def52 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs @@ -468,7 +468,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication return headList; } - public static DBResult SaveAppDetail(ChInvoiceapplication headData, List bodyList) + public static DBResult SaveAppDetail(string GID, List bodyList) { var result = new DBResult(); @@ -505,7 +505,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication cmdInsert.Parameters.Clear(); db.AddInParameter(cmdInsert, "@GID", DbType.String, Guid.NewGuid().ToString()); db.AddInParameter(cmdInsert, "@BILLSTATUS", DbType.String,"未开"); - db.AddInParameter(cmdInsert, "@LINKGID", DbType.String, headData.GID); + db.AddInParameter(cmdInsert, "@LINKGID", DbType.String, GID); db.AddInParameter(cmdInsert, "@CUSTOMERNAME", DbType.String, enumValue.CUSTOMERNAME); db.AddInParameter(cmdInsert, "@INVOICECUSTNAME", DbType.String, enumValue.INVOICECUSTNAME); db.AddInParameter(cmdInsert, "@AMOUNT", DbType.String, enumValue.AMOUNT); @@ -4700,7 +4700,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication } - ChinvoiceapplicationDAL.SaveAppDetail(headData, dataList); + ChinvoiceapplicationDAL.SaveAppDetail(headData.GID, dataList); return 0; } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_AuditBL.js b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_AuditBL.js index 1f5c1882..4e7eb6df 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_AuditBL.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_Audit/Chfee_AuditBL.js @@ -497,6 +497,8 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { } }], scope: this + }, { + xtype: "label", id: "bstextall", text: "" } ], columns: this.girdBLcolums @@ -2381,6 +2383,9 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { ] }); + + + this.panelFee = new Ext.Panel({ // title: '费用信息', // layout: "border", @@ -2389,7 +2394,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { // height: 560, region: 'east', split:true, - width:850, + width:700, items: [ this.gridBLChFee, this.gridListAmendSum,this.panelBLList ] @@ -2496,6 +2501,7 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { _thisblaudit.storeBLChFee.removeAll(); _thisblaudit.storeBodySum.removeAll(); _thisblaudit.storeAmendSum.removeAll(); + Ext.getCmp("bstextall").setText(''); } else { if (selections.length == 1) { var record = selections[0]; @@ -2512,7 +2518,14 @@ Ext.extend(Shipping.MsChfeeAudit, Ext.Panel, { _thisblaudit.FeeStatus = record.data.FEESTATUS; _thisblaudit.storeAuditDetailList.load({ params: { condition: "BSNO='" + bsno + "'" } }); _thisblaudit.storeBLChFee.load({ params: { bsno: _thisblaudit.strMBSNO, SLNO, SLNO, bltype: bltype, optype: _thisblaudit.strOPTYPE } }); - + var bstextall = ""; + bstextall = bstextall + '集装箱:' + record.data.CNTRTOTAL; + bstextall = bstextall + ' 场站:' + record.data.YARD; + bstextall = bstextall + ' 船公司:' + record.data.CARRIER; + Ext.getCmp("bstextall").setText(bstextall); + + //_thisblaudit.formHead.getForm().reset(); + //_thisblaudit.formHead.getForm().setValues(record.data); if (OPTYPE == '更改单') { _thisblaudit.panelBLList.setHeight(50); _thisblaudit.gridListAmendSum.setVisible(true); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js index 08978e00..b2f76ac4 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice/ChInvoiceAppEdit.js @@ -934,8 +934,200 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { clicksToEdit: 1 }); - - + this.initgirddetailcolumn = [{ + sortable: true, + dataIndex: 'GID', + header: 'GID', + hidden: true, + width: 100 + }, { + sortable: true, + dataIndex: 'PID', + header: 'PID', + hidden: true, + width: 100 + }, { + sortable: true, + dataIndex: 'SERIALNO', + header: 'SERIALNO', + hidden: true, + width: 100 + }, { + sortable: false, + dataIndex: 'GOODSNAME', + header: '货物或应税劳务名称', + editor: this.comboxCodeGoodInv, + renderer: function (value, p, record) { + return record.data.GOODSNAMEREF; + }, + summaryType: 'count', + width: 120 + }, { + sortable: false, + dataIndex: 'SPEC', + header: '规格型号', + editor: { + xtype: 'textfield', + allowBlank: false, + selectOnFocus: true + }, + width: 100 + }, { + sortable: false, + dataIndex: 'UNIT', + header: '单位', + editor: { + xtype: 'textfield', + allowBlank: false, + selectOnFocus: true + }, + width: 100 + }, { + sortable: false, + dataIndex: 'PKGS', + header: '数量', + editor: { + xtype: 'numberfield', + allowBlank: false, + selectOnFocus: true + }, + width: 80 + }, { + sortable: false, + dataIndex: 'TAXPRICE', + header: '含税单价', + editor: { + xtype: 'numberfield', + allowBlank: false, + selectOnFocus: true + }, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + }, + summaryType: 'sum', + summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + value = usMoney(value, 2, '', true); + return value; + }, + width: 80 + }, { + sortable: false, + dataIndex: 'PRICE', + header: '单价', + editor: { + xtype: 'numberfield', + allowBlank: false, + selectOnFocus: true + }, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + }, + width: 80 + }, { + sortable: false, + dataIndex: 'AMOUNT', + editor: { + xtype: 'numberfield', + allowBlank: false, + selectOnFocus: true + }, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + }, + summaryType: 'sum', + summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + value = usMoney(value, 2, '', true); + return value; + }, + header: '金额', + width: 80 + }, { + sortable: false, + dataIndex: 'TAXRATE', + editor: { + xtype: 'numberfield', + allowBlank: false, + selectOnFocus: true + }, + header: '税率', + width: 80 + }, { + sortable: false, + dataIndex: 'TAX', + header: '税额', + editor: { + xtype: 'numberfield', + allowBlank: false, + selectOnFocus: true + }, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + try { + var lsValue = usMoney(value, 2, '', false); + if (lsValue != "NaN") { + value = lsValue; if (parseFloat(lsValue) < 0) { + return '' + lsValue + ''; + } + } + else { + return value; + } + } + catch (e) { + return value; + } + return value; + }, + summaryType: 'sum', + summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + value = usMoney(value, 2, '', true); + return value; + }, + width: 80 + } + ]; + this.girddetailcolumn = this.initgirddetailcolumn; this.gridDetailList = new Ext.grid.GridPanel({ store: this.storeDetailList, enableHdMenu: false, @@ -971,203 +1163,27 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { this.onDelInvDetailClick(); }, scope: this - }], - columns: [{ - sortable: true, - dataIndex: 'GID', - header: 'GID', - hidden: true, - width: 100 - }, { - sortable: true, - dataIndex: 'PID', - header: 'PID', - hidden: true, - width: 100 - }, { - sortable: true, - dataIndex: 'SERIALNO', - header: 'SERIALNO', - hidden: true, - width: 100 - }, { - sortable: false, - dataIndex: 'GOODSNAME', - header: '货物或应税劳务名称', - editor: this.comboxCodeGoodInv, - renderer: function (value, p, record) { - return record.data.GOODSNAMEREF; - }, - summaryType: 'count', - width: 120 - }, { - sortable: false, - dataIndex: 'SPEC', - header: '规格型号', - editor: { - xtype: 'textfield', - allowBlank: false, - selectOnFocus: true - }, - width: 100 - }, { - sortable: false, - dataIndex: 'UNIT', - header: '单位', - editor: { - xtype: 'textfield', - allowBlank: false, - selectOnFocus: true - }, - width: 100 - }, { - sortable: false, - dataIndex: 'PKGS', - header: '数量', - editor: { - xtype: 'numberfield', - allowBlank: false, - selectOnFocus: true - }, - width: 80 - }, { - sortable: false, - dataIndex: 'TAXPRICE', - header: '含税单价', - editor: { - xtype: 'numberfield', - allowBlank: false, - selectOnFocus: true - }, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; - } - } - else { - return value; - } - } - catch (e) { - return value; - } - return value; - }, - summaryType: 'sum', - summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - value = usMoney(value, 2, '', true); - return value; - }, - width: 80 - }, { - sortable: false, - dataIndex: 'PRICE', - header: '单价', - editor: { - xtype: 'numberfield', - allowBlank: false, - selectOnFocus: true - }, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; - } - } - else { - return value; - } - } - catch (e) { - return value; - } - return value; - }, - width: 80 - }, { - sortable: false, - dataIndex: 'AMOUNT', - editor: { - xtype: 'numberfield', - allowBlank: false, - selectOnFocus: true - }, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; + }, '-', { + text: "保存列表样式", + menu: [ + { + text: "保存", + handler: function (button, event) { + this.girddetailcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'detail', _this.gridAppDetailList.columns, _this.girddetailcolumn, 1, true); } - } - else { - return value; - } - } - catch (e) { - return value; - } - return value; - }, - summaryType: 'sum', - summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - value = usMoney(value, 2, '', true); - return value; - }, - header: '金额', - width: 80 - }, { - sortable: false, - dataIndex: 'TAXRATE', - editor: { - xtype: 'numberfield', - allowBlank: false, - selectOnFocus: true - }, - header: '税率', - width: 80 - }, { - sortable: false, - dataIndex: 'TAX', - header: '税额', - editor: { - xtype: 'numberfield', - allowBlank: false, - selectOnFocus: true - }, - renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - try { - var lsValue = usMoney(value, 2, '', false); - if (lsValue != "NaN") { - value = lsValue; if (parseFloat(lsValue) < 0) { - return '' + lsValue + ''; + }, { + text: "初始化", + handler: function (menu, event) { + _this.girddetailcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'detail', _this.gridAppDetailList.columns, _this.initgirddetailcolumn, 1, true); } - } - else { - return value; - } - } - catch (e) { - return value; - } - return value; - }, - summaryType: 'sum', - summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { - value = usMoney(value, 2, '', true); - return value; - }, - width: 80 - } - ] + }], + scope: this + }], + columns: this.girddetailcolumn }); - + this.girddetailcolumn = DsTruck.GetGridPanel(USERID, this.formname + 'detail', this.girddetailcolumn, 1); //使用者id,表名,中间column数组,跳过一开始的几列 + this.gridAppDetailList.reconfigure(this.storeDetailList, this.girddetailcolumn); this.gridDetailList.on('edit', function (editor, e, eOpts) { diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js index 4483b48d..fa77adce 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceapplicationAdd.js @@ -21,6 +21,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { this.formname = "ChInvoiceapplicationAdd" this.billno = ''; this.sqlcontext = ''; + this.GID = ''; _this = this; this.ParentWin = window.parent.opener; Ext.Ajax.timeout = 1200000; @@ -886,6 +887,111 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { clicksToEdit: 1 }); + this.initappgirdcolumn = [{ + sortable: true, + dataIndex: 'GID', + header: 'GID', + hidden: true, + width: 100 + }, { + sortable: true, + dataIndex: 'LINKGID', + header: 'LINKGID', + hidden: true, + width: 100 + }, { + sortable: true, + dataIndex: 'BILLSTATUS', + header: '开票状态', //'币别', + width: 80 + }, { + sortable: true, + dataIndex: 'CURRENCY', + header: '发票币别', //'币别', + editor: this.comboxCurr3, + width: 100 + }, { + sortable: true, + dataIndex: 'AMOUNT', + header: '开票金额', //'单价', + editor: { + xtype: 'numberfield', + keyNavEnabled: false, + selectOnFocus: true, + hideTrigger: true, + mouseWheelEnabled: false, + enableKeyEvents: true + }, + align: 'right', + width: 80 + }, { + sortable: false, + dataIndex: 'INVOICECUSTNAME', + header: '发票抬头', + editor: this.comboxINVOICECUSTNAME2, + width: 180 + }, { + sortable: false, + dataIndex: 'INVOICELINE', + header: '发票种类', + editor: this.comboxINVOICELINE, + renderer: function (value, p, record) { + return record.data.INVOICELINEREF; + }, + width: 80 + }, { + sortable: false, + dataIndex: 'REMARK', + header: '发票备注', + editor: { + xtype: 'textfield', + allowBlank: false, + selectOnFocus: true + }, + width: 160 + }, { + sortable: false, + dataIndex: 'CUSTRATENO', + header: '纳税人识别号', + editor: { + xtype: 'textfield', + allowBlank: false, + selectOnFocus: true + }, + width: 180 + }, { + sortable: false, + dataIndex: 'CUSTTEL', + header: '电话', + editor: { + xtype: 'textfield', + allowBlank: false, + selectOnFocus: true + }, + width: 150 + }, { + sortable: false, + dataIndex: 'CUSTADDR', + header: '地址', + editor: { + xtype: 'textfield', + allowBlank: false, + selectOnFocus: true + }, + width: 180 + }, { + sortable: false, + dataIndex: 'CUSTBANK', + header: '银行', + editor: { + xtype: 'textfield', + allowBlank: false, + selectOnFocus: true + }, + width: 180 + } + ]; + this.appgirdcolumn = this.initappgirdcolumn; this.gridAppDetailList = new Ext.grid.GridPanel({ store: this.storeAppDetailList, @@ -923,114 +1029,28 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { this.onDelInvAppDetailClick(); }, scope: this - }], - columns: [{ - sortable: true, - dataIndex: 'GID', - header: 'GID', - hidden: true, - width: 100 - }, { - sortable: true, - dataIndex: 'LINKGID', - header: 'LINKGID', - hidden: true, - width: 100 - }, { - sortable: true, - dataIndex: 'BILLSTATUS', - header: '开票状态', //'币别', - width: 80 - }, { - sortable: true, - dataIndex: 'CURRENCY', - header: '发票币别', //'币别', - editor: this.comboxCurr3, - width: 100 - }, { - sortable: true, - dataIndex: 'AMOUNT', - header: '开票金额', //'单价', - editor: { - xtype: 'numberfield', - keyNavEnabled: false, - selectOnFocus: true, - hideTrigger: true, - mouseWheelEnabled: false, - enableKeyEvents: true - }, - align: 'right', - width: 80 - }, { - sortable: false, - dataIndex: 'INVOICECUSTNAME', - header: '发票抬头', - editor: this.comboxINVOICECUSTNAME2, - width: 180 - }, { - sortable: false, - dataIndex: 'INVOICELINE', - header: '发票种类', - editor: this.comboxINVOICELINE, - renderer: function (value, p, record) { - return record.data.INVOICELINEREF; - }, - width: 80 - }, { - sortable: false, - dataIndex: 'REMARK', - header: '发票备注', - editor: { - xtype: 'textfield', - allowBlank: false, - selectOnFocus: true - }, - width: 160 - }, { - sortable: false, - dataIndex: 'CUSTRATENO', - header: '纳税人识别号', - editor: { - xtype: 'textfield', - allowBlank: false, - selectOnFocus: true - }, - width: 180 - }, { - sortable: false, - dataIndex: 'CUSTTEL', - header: '电话', - editor: { - xtype: 'textfield', - allowBlank: false, - selectOnFocus: true - }, - width: 150 - }, { - sortable: false, - dataIndex: 'CUSTADDR', - header: '地址', - editor: { - xtype: 'textfield', - allowBlank: false, - selectOnFocus: true - }, - width: 180 - }, { - sortable: false, - dataIndex: 'CUSTBANK', - header: '银行', - editor: { - xtype: 'textfield', - allowBlank: false, - selectOnFocus: true - }, - width: 180 - } - ] + }, '-', { + text: "保存列表样式", + menu: [ + { + text: "保存", + handler: function (button, event) { + this.appgirdcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppDetailList.columns, _this.appgirdcolumn, 1, true); + } + }, { + text: "初始化", + handler: function (menu, event) { + _this.appgirdcolumn = DsTruck.SaveGridPanel(USERID, _this.formname + 'app', _this.gridAppDetailList.columns, _this.initappgirdcolumn, 1, true); + } + }], + scope: this + }], + columns: this.appgirdcolumn }); - + this.appgirdcolumn = DsTruck.GetGridPanel(USERID, this.formname+'app', this.appgirdcolumn, 1); //使用者id,表名,中间column数组,跳过一开始的几列 + this.appgirdcolumn.unshift(new Ext.grid.RowNumberer()); + this.gridAppDetailList.reconfigure(this.storeAppDetailList, this.appgirdcolumn); this.gridAppDetailList.on('edit', function (editor, e, eOpts) { @@ -1097,13 +1117,13 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { this.gridList.getSelectionModel().on('select', function (model, record, index) { this.billno = record.data.BILLNO; - var GID = record.data.GID; + this.GID = record.data.GID; var sql = ""; sql = " BILLNO='" + this.billno + "'"; _this.storeBodyListdetail.load({ params: { condition: sql} }); _this.storeBodySum.load({ params: { condition: sql} }); _this.storeChfeeFile.load({ params: { start: 0, limit: 9999, BillNo: _this.billno} }); - this.storeAppDetailList.load({ params: { condition: " LINKGID='" + GID + "'" } }); + this.storeAppDetailList.load({ params: { condition: " LINKGID='" + _this.GID + "'" } }); }, this); @@ -1190,12 +1210,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { } _this = this; - //var bodydatas2 = []; - //for (var i = 0; i < this.storeAppDetailList.getCount(); i += 1) { - // var member = this.storeAppDetailList.getAt(i); - // bodydatas2.push(member); - //} - //var jsonBody2 = ConvertRecordsToJsonAll(bodydatas2); + @@ -1207,16 +1222,21 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { } var jsonBody2 = ConvertRecordsToJsonAll(bodyDatas2); + var allbodydatas = []; + for (var i = 0; i < this.storeAppDetailList.getCount(); i += 1) { + var member = this.storeAppDetailList.getAt(i); + allbodydatas.push(member); + } + var alljsonBody = ConvertRecordsToJsonAll(allbodydatas); - - + var bodydatas = []; for (var i = 0; i < this.storeCurrExrate.getCount(); i += 1) { var member = this.storeCurrExrate.getAt(i); - if (member.data.EXRATE == 0) { - _this.ExrateConversion(member.CURR, billcurr, 'bill', 0); - return; - } + //if (member.data.EXRATE == 0) { + // _this.ExrateConversion(member.CURR, billcurr, 'bill', 0); + // return; + //} bodydatas.push(member); } var currBody = ConvertRecordsToJsonAll(bodydatas); @@ -1231,6 +1251,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { url: '/Account/Chfee_invoiceapplication/CreateInvList', params: { data: jsonBody2, + alldata: alljsonBody, storeCurrExrate: currBody }, @@ -1577,7 +1598,12 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { onDelInvAppDetailClick: function () { var selectedRecords = this.GridAppDetailCheckBoxModel.selected.items; - var GID = this.formEdit.getForm().findField('GID').getValue(); + var selections = this.gridList.getSelectionModel().getSelection(); + if (selections.length == 0) { + Ext.Msg.show({ title: '提示', msg: '请先选择需开出的发票申请!', icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + return; + } + var GID = selections[0].data.GID; Ext.MessageBox.confirm('提示', '确定要删除选中的明细吗?', function (btn) { if (btn == 'yes') { diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js index d1b885c6..7582be03 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationNewEdit.js @@ -41,6 +41,7 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { this.bsCust = getUrlParam('bsCust'); this.isfeename = getUrlParam('isfeename'); this.salecorp = getUrlParam('salecorp'); + this.bsduino = getUrlParam('bsduino'); this.INVOICEPORT = ""; this.INVAPPPRINTAFTERAUDIT = 0; @@ -3046,6 +3047,9 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { var ret = this.ParentWin.OprationSwap(); bsnos = ret[4]; currsql = ret[5]; + } else if (this.ParentWin && this.bsnosql == 'recapp') { + bsnos = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + this.bsduino+ "') "; + currsql = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + this.bsduino+ "') "; } this.comboxCustCode.allowBlank = true; @@ -3053,7 +3057,8 @@ Ext.extend(Shipping.MsChInvoiceapplicationBLEdit, Ext.Panel, { var condition = ''; - + if (this.bsduino != undefined) + this.formSearch.getForm().findField('DuiNo').setValue(this.bsduino); var sql = this.getCondition(); this.sqlcontext = sql + ' and ' + bsnos; if (currsql != '') @@ -6287,8 +6292,8 @@ setSaveBtnStatus: function (enable) { var btnEAddDetail = Ext.getCmp('btnadddetail'); var btnEDeleteDetail = Ext.getCmp('btndeldetail'); var btnEAddbill = Ext.getCmp('btnaddbill'); - var btnEAddInvDetail = Ext.getCmp('btnAddInvdetail'); - var btnEDeleteInvDetail = Ext.getCmp('btndelInvdetail'); + //var btnEAddInvDetail = Ext.getCmp('btnAddInvdetail'); + //var btnEDeleteInvDetail = Ext.getCmp('btndelInvdetail'); var btnEAddAppInvDetail = Ext.getCmp('btnAddAppInvdetail'); var btnEDeleteAppInvDetail = Ext.getCmp('btndelAppInvdetail'); @@ -6303,8 +6308,8 @@ setSaveBtnStatus: function (enable) { btnEAddDetail.enable(); btnEDeleteDetail.enable(); btnEAddbill.enable(); - btnEAddInvDetail.enable(); - btnEDeleteInvDetail.enable(); + //btnEAddInvDetail.enable(); + //btnEDeleteInvDetail.enable(); btnEAddAppInvDetail.enable(); btnEDeleteAppInvDetail.enable(); } else { @@ -6314,8 +6319,8 @@ setSaveBtnStatus: function (enable) { btnEAddDetail.disable(); btnEDeleteDetail.disable(); btnEAddbill.disable(); - btnEAddInvDetail.disable(); - btnEDeleteInvDetail.disable(); + //btnEAddInvDetail.disable(); + //btnEDeleteInvDetail.disable(); btnEAddAppInvDetail.disable(); btnEDeleteAppInvDetail.disable(); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementPayAppEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementPayAppEdit.js index fb0a447c..d4640a09 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementPayAppEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChSettlementPayAppEdit.js @@ -60,32 +60,32 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { }); // this.StoreUnLockOp.load({ params: { optype: "modPayFeeSettlementUnLock"} }); - this.storecustbank = Ext.create('DsExt.ux.RefTableStore', { - model: 'MsInfoClientBankModel', - proxy: { url: '/MvcShipping/MsInfoClient/GetBankList' } - }); - - - - this.comboxCustBank = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: Zi.LAN.CustomerBank , - store: this.storecustbank, - forceSelection: true, - labelWidth: 70, - name: 'CUSTBANK', - valueField: 'GID', - displayField: 'ACCOUNTNAMEREF', - listeners: { - scope: this, - 'select': function (combo, records, eOpts) { - if (records.length > 0) { - var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT'); - CUSTACCOUNT.setValue(records[0].data.ACCOUNT); - } + //this.storecustbank = Ext.create('DsExt.ux.RefTableStore', { + // model: 'MsInfoClientBankModel', + // proxy: { url: '/MvcShipping/MsInfoClient/GetBankList' } + //}); + + + + //this.comboxCustBank = Ext.create('DsExt.ux.RefTableCombox', { + // fieldLabel: Zi.LAN.CustomerBank , + // store: this.storecustbank, + // forceSelection: true, + // labelWidth: 70, + // name: 'CUSTBANK', + // valueField: 'GID', + // displayField: 'ACCOUNTNAMEREF', + // listeners: { + // scope: this, + // 'select': function (combo, records, eOpts) { + // if (records.length > 0) { + // var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT'); + // CUSTACCOUNT.setValue(records[0].data.ACCOUNT); + // } - } - } - }); + // } + // } + //}); //#region 编辑form @@ -154,8 +154,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { store: this.StoreCurr, forceSelection: true, emptyText:'原币结算', //原币申请 - labelWidth: 60, - flex: 0.5, + //labelWidth: 60, + //flex: 0.5, name: 'CURR', valueField: 'CURR', displayField: 'CURR', @@ -228,8 +228,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { this.StoreBANK.load({ params: { condition: "CURRENCY='RMB'"} }); this.StoreBANK.on('beforeload', function (store) { - var companyid = this.formEdit.getForm().findField('SALECORPID').getValue(); - Ext.apply(store.proxy.extraParams, { companyid: companyid }); + //var companyid = this.formEdit.getForm().findField('SALECORPID').getValue(); + Ext.apply(store.proxy.extraParams, { companyid: '' }); }, this); this.comboxBANK = Ext.create('DsExt.ux.RefTableCombox', { @@ -250,8 +250,8 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { this.StoreBANKUSD.load({ params: { condition: "CURRENCY='USD'" } }); this.StoreBANKUSD.on('beforeload', function (store) { - var companyid = this.formEdit.getForm().findField('SALECORPID').getValue(); - Ext.apply(store.proxy.extraParams, { companyid: companyid }); +// var companyid = this.formEdit.getForm().findField('SALECORPID').getValue(); + Ext.apply(store.proxy.extraParams, { companyid: '' }); }, this); this.comboxBANKUSD = Ext.create('DsExt.ux.RefTableCombox', { fieldLabel: 'USD银行账号', @@ -310,7 +310,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { store: this.storeBILLTYPE, valueField: 'FSTATUS', displayField: 'NAME', - flex: 0.5, + //flex: 0.5, labelWidth: 70, // flex: 0.7, // labelWidth: 55, @@ -423,7 +423,11 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { // flex: 0.5, readOnly: true, name: 'BILLSTATUSREF' - }, this.comboxCustCode, { + }, { + fieldLabel: Zi.LAN.SettlementNo, + flex: 1, + name: 'SETTLENO' + }, this.comboxCustCode, { fieldLabel: Zi.LAN.SettlementTime, format: 'Y-m-d H:i:s', xtype: 'datefield', @@ -489,24 +493,6 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { } }, this.comboxBANKUSD] - }, { - xtype: 'container', - layout: 'hbox', - defaultType: 'textfield', - items: [this.comboxCustBank, { - fieldLabel:Zi.LAN.CustomerAccount, - flex: 1, - name: 'CUSTACCOUNT' - }, this.comboxSTLCATEGROY,this.comboxSaleCompany, { - fieldLabel: Zi.LAN.Remark, - flex: 1, - name: 'REMARK' - }, { - fieldLabel: Zi.LAN.SettlementNo, - flex: 1, - name: 'SETTLENO' - }] - } ]//end items(fieldset 1) }//end fieldset 1 @@ -1724,21 +1710,20 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { } } } - }, { - fieldLabel: Zi.LAN.Port, - //format: 'Y-m-d', - labelWidth: 90, - xtype: 'textfield', - name: 'PORT', - enableKeyEvents: true, - listeners: { - specialkey: function (field, e) { - if (e.getKey() == e.ENTER) { - _this.onRefreshClick(); + }, { + fieldLabel: Zi.LAN.Number, + tooltip: Zi.LAN.DelegateNumber + '、' + Zi.LAN.LadingNumber + '、' + Zi.LAN.FenladingNumber, + name: 'BH', + labelWidth: 40, + enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } } } - } - }, this.comboxIsDebit, { + }, this.comboxCurr2, { xtype: 'button', width: 45, text: "", @@ -1766,36 +1751,17 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { }, scope: this - } - ] - }, - { - xtype: 'container', - layout: 'hbox', - defaultType: 'textfield', - items: [{ - fieldLabel: Zi.LAN.Number, - tooltip: Zi.LAN.DelegateNumber + '、' + Zi.LAN.LadingNumber + '、' + Zi.LAN.FenladingNumber, - name: 'BH', - labelWidth: 40, - enableKeyEvents: true, - listeners: { - specialkey: function (field, e) { - if (e.getKey() == e.ENTER) { - _this.onRefreshClick(); - } - } + }, { + xtype: 'button', + width: 90, + text: Zi.LAN.SearchOrRefresh, + iconCls: "btnrefresh", + handler: function (button, event) { + this.onRefreshClick(); + }, + scope: this } - }, this.comboxCurr2, this.comboxSALECORPID, this.comboxStlMode2, { xtype: 'hiddenfield' }, { xtype: 'hiddenfield' }, { - xtype: 'button', - width: 90, - text: Zi.LAN.SearchOrRefresh, - iconCls: "btnrefresh", - handler: function (button, event) { - this.onRefreshClick(); - }, - scope: this - }] + ] } ]//end items(fieldset 1) }//end fieldset 1 @@ -3527,7 +3493,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 145, + height: 115, items: [this.panelBtn, this.formEdit] }); this.panelBody = new Ext.Panel({ @@ -4259,11 +4225,11 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { var CUSTOMERNAME = this.formEdit.getForm().findField('CUSTOMERNAME').getValue(); var CURR = this.formEdit.getForm().findField('CURR').getValue(); - var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK').getValue(); - var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT').getValue(); + //var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK').getValue(); + //var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT').getValue(); var PARAMVALUE = this.formSearch.getForm().findField('PARAMVALUE').getValue(); var BILLNO = this.formEdit.getForm().findField('BILLNO').getValue(); - var SALECORPID = this.formEdit.getForm().findField('SALECORPID').getValue(); + //var SALECORPID = this.formEdit.getForm().findField('SALECORPID').getValue(); if (addcurr == '') { if ((CURR == '') || (CURR == null)) { @@ -4309,12 +4275,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { // else if (rec.data.USDBALAMOUNT != 0) this.formEdit.getForm().findField('CURR').setValue('USD'); //} } - if ((CUSTBANK == '') || (CUSTBANK == null)) - this.formEdit.getForm().findField('CUSTBANK').setValue(addcustbank); - if ((CUSTACCOUNT == '') || (CUSTACCOUNT == null)) - this.formEdit.getForm().findField('CUSTACCOUNT').setValue(addcustaccount); - if ((SALECORPID == '') || (SALECORPID == null)) - this.formEdit.getForm().findField('SALECORPID').setValue(addsalecorpid); + //if ((CUSTBANK == '') || (CUSTBANK == null)) + // this.formEdit.getForm().findField('CUSTBANK').setValue(addcustbank); + //if ((CUSTACCOUNT == '') || (CUSTACCOUNT == null)) + // this.formEdit.getForm().findField('CUSTACCOUNT').setValue(addcustaccount); + //if ((SALECORPID == '') || (SALECORPID == null)) + // this.formEdit.getForm().findField('SALECORPID').setValue(addsalecorpid); if (PARAMVALUE == '1') { if (BILLNO == '*' || BILLNO == '') { var addbillno = rec.data.BILLNO; @@ -4326,7 +4292,7 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { } var CUST = this.formEdit.getForm().findField('CUSTOMERNAME').getValue(); - this.storecustbank.load({ params: { condition: " LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + CUST + "')"} }); + //this.storecustbank.load({ params: { condition: " LINKID=(SELECT TOP 1 GID FROM INFO_CLIENT WHERE SHORTNAME='" + CUST + "')"} }); if (!basicForm.isValid()) { btnEAddbill.enable(); @@ -5602,25 +5568,25 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { LoadCustACCOUNT: function (CUSTOMERNAME) { - var CURR = this.formEdit.getForm().findField('CURR').getValue(); - var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK'); - var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT'); - var condition = " LINKID=(select TOP 1 GID from info_client where shortname='" + CUSTOMERNAME + "') "; - if (CURR != "" && CURR != undefined) { - condition = condition + " and CURRENCY='" + CURR + "'"; - } + //var CURR = this.formEdit.getForm().findField('CURR').getValue(); + //var CUSTBANK = this.formEdit.getForm().findField('CUSTBANK'); + //var CUSTACCOUNT = this.formEdit.getForm().findField('CUSTACCOUNT'); + //var condition = " LINKID=(select TOP 1 GID from info_client where shortname='" + CUSTOMERNAME + "') "; + //if (CURR != "" && CURR != undefined) { + // condition = condition + " and CURRENCY='" + CURR + "'"; + //} - this.storecustbank.load({ params: { condition: condition }, - callback: function (r, options, success) { - if (success) { - if (r.length != 0) { -// CUSTBANK.setValue(this.storecustbank.data.items[0].data.GID); - // CUSTACCOUNT.setValue(this.storecustbank.data.items[0].data.ACCOUNT); - } - } - }, - scope: this - }); +// this.storecustbank.load({ params: { condition: condition }, +// callback: function (r, options, success) { +// if (success) { +// if (r.length != 0) { +//// CUSTBANK.setValue(this.storecustbank.data.items[0].data.GID); +// // CUSTACCOUNT.setValue(this.storecustbank.data.items[0].data.ACCOUNT); +// } +// } +// }, +// scope: this +// }); }, onClearSql: function () { @@ -5647,12 +5613,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { var CUSTNAME = form.findField('CUSTNAME').getValue(); sql = sql + getAndConSql(sql, CUSTNAME, " CUSTOMERNAME='" + CUSTNAME + "'"); - var SALECORPID = form.findField('SALECORPID').getValue(); - sql = sql + getAndConSql(sql, SALECORPID, " SALECORPID='" + SALECORPID + "'"); + //var SALECORPID = form.findField('SALECORPID').getValue(); + //sql = sql + getAndConSql(sql, SALECORPID, " SALECORPID='" + SALECORPID + "'"); - var SETTLETYPE = form.findField('SETTLETYPE').getValue(); - sql = sql + getAndConSql(sql, SETTLETYPE, " SETTLETYPE='" + SETTLETYPE + "'"); + //var SETTLETYPE = form.findField('SETTLETYPE').getValue(); + //sql = sql + getAndConSql(sql, SETTLETYPE, " SETTLETYPE='" + SETTLETYPE + "'"); var Currency = form.findField('Currency').getValue(); if (Currency != '') { @@ -5667,12 +5633,12 @@ Ext.extend(Shipping.ChSettlementPayAppEdit, Ext.Panel, { var expDateEnd = form.findField('ExpDateEnd').getRawValue(); sql = sql + getAndConSql(sql, expDateEnd, "APPLYTIME <='" + expDateEnd + "'"); - var PORT = form.findField('PORT').getValue(); - sql = sql + getAndConSql(sql, PORT, " (PORTLOAD like '%" + PORT + "%' or PORTDISCHARGE like '%" + PORT + "%') "); + //var PORT = form.findField('PORT').getValue(); + //sql = sql + getAndConSql(sql, PORT, " (PORTLOAD like '%" + PORT + "%' or PORTDISCHARGE like '%" + PORT + "%') "); - var DC = form.findField('ISDEBIT').getValue(); - if (DC == '1') - sql = sql + getAndConSql(sql, DC, " (BILLSTATUS=0 OR BILLSTATUS=5) "); + //var DC = form.findField('ISDEBIT').getValue(); + //if (DC == '1') + // sql = sql + getAndConSql(sql, DC, " (BILLSTATUS=0 OR BILLSTATUS=5) "); // this.FeeSqlStr = this.getFeeCondition(); 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 c4c91976..be276953 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/Zi_zh-cn.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/Zi_zh-cn.js @@ -15,7 +15,7 @@ Zi.LAN.BillNo = "结算单号"; Zi.LAN.BillStatus = "状态"; Zi.LAN.SettlementTime = "结算日期"; Zi.LAN.SettlementUser = "结算人"; -Zi.LAN.SettlementNo = "相关号码"; +Zi.LAN.SettlementNo = "摘要"; Zi.LAN.VoucherNo = "总账凭证号"; Zi.LAN.CustomerAccount = "客户账户"; Zi.LAN.VoucherNo_PayBL = "凭证备注"; diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs index b496d755..ffbb276f 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpSeaeController.cs @@ -3730,7 +3730,7 @@ namespace DSWeb.MvcShipping.Controllers else error = MsOpSeaeEdiPortDAL.IsCreateEdi(headEdiList, type, filetype, filerole); - + var ftpcount = 0; if (error == "") { var ediname = ""; @@ -3747,7 +3747,7 @@ namespace DSWeb.MvcShipping.Controllers var ftpset = MsCodeFtpSetDAL.GetData("EDINAME='" + ediname + "'", Convert.ToString(Session["COMPANYID"])); var filename = ""; - + if (ftpset.SERVERIP != "" && ftpset.SERVERIP != null) { @@ -3774,7 +3774,7 @@ namespace DSWeb.MvcShipping.Controllers else result = MsOpSeaeEdiPortDAL.FtpFile(filename, ftpset); - + ftpcount = ftpcount + 1; var afilename = Path.GetFileName(filename); MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, type, filetype, "", ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"])); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); @@ -3808,6 +3808,11 @@ namespace DSWeb.MvcShipping.Controllers result.Message = error; } + if (result.Success) { + result.Message = "已发送成功"+ ftpcount.ToString()+"票!"; + + } + var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; @@ -4031,7 +4036,7 @@ namespace DSWeb.MvcShipping.Controllers { Directory.CreateDirectory(path); } - + var ftpcount = 0; var result = new DBResult(); if (filetype == "V") @@ -4088,6 +4093,7 @@ namespace DSWeb.MvcShipping.Controllers { result = MsOpSeaeEdiPortDAL.FtpFile2(filename, ftpset); var afilename = Path.GetFileName(filename); + if (result.Success) ftpcount = ftpcount + 1; MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, "INTTR", filetype, carrier, ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"])); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); @@ -4111,6 +4117,7 @@ namespace DSWeb.MvcShipping.Controllers { result = MsOpSeaeEdiPortDAL.FtpFile(filename, ftpset); var afilename = Path.GetFileName(filename); + if (result.Success) ftpcount = ftpcount + 1; MsOpSeaeEdiPortDAL.InsertEdiLog(bsnos, "INTTR", filetype, carrier, ftpset.SERVERIP, afilename, "../../EDIFiles/SeaeEdi/" + afilename, Convert.ToString(Session["SHOWNAME"])); T_ALL_DA T_ALL_DA = new EntityDA.T_ALL_DA(); @@ -4162,7 +4169,11 @@ namespace DSWeb.MvcShipping.Controllers } MsOpSeaeEdiPortDAL.SendToDJY(headList, Convert.ToString(Session["COMPANYID"])); } + if (result.Success&&ftpcount!=0) + { + result.Message = "已发送成功" + ftpcount.ToString() + "票!"; + } var jsonRespose = new JsonResponse { Success = result.Success, Message = result.Message }; return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose) }; } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index f7b0ad55..024efcb5 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -20714,7 +20714,7 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL //if (bill.EDIREMARK.Trim() != "") //{ Shipping = formatEdiStr("txt", bill.EDIREMARK); - ShippingList = formatlengthStr(Shipping, 70, false, true); + ShippingList = formatlengthStr(Shipping, 70, false); var strlist = new List(); if (!string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE1) || !string.IsNullOrEmpty(OpAms.ENTERPRISECODETYPE2)) { diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiBLEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiBLEdit.js index 1ace45e4..090ec8c5 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiBLEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiBLEdit.js @@ -15,6 +15,8 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, { PageSize: 100, PageSizeAdd: 100, sqlcontext: '', + selectbsnostr: '', + selectfeestr: '', initUIComponents: function () { this.serialNo = 0; @@ -308,6 +310,20 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, { this.onSubmitFeeClick(); }, scope: this + }, '-', + { + text: Zi.LAN.scfapiao, //生成发票申请 + handler: function (button, event) { + this.onCreateInvAppClick(button, event); + }, + scope: this + }, '-', + { + text: '生成付费申请', //生成发票申请 + handler: function (button, event) { + this.onCreatePayShenClick(button, event); + }, + scope: this } //, '-', { @@ -3970,6 +3986,53 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, { form.reset(); }, + onCreateInvAppClick: function (button, event) { + var invduino = this.formEdit.getForm().findField('DUINO').getValue(); + var invcust = this.formEdit.getForm().findField('CUSTNAME').getValue(); + this.selectbsnostr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + invduino + "') "; + this.selectfeestr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + invduino + "') "; + + DsOpenEditWin("/Account/Chfee_invoiceapplication/BLEdit?handle=check&bsnosql=recapp&bsCurr=&bsCust=" + invcust + "&bsduino=" + invduino, '发票申请'); + + + + }, + + onCreatePayShenClick: function (button, event) { + + var invduino = this.formEdit.getForm().findField('DUINO').getValue(); + Ext.MessageBox.confirm(Zi.LAN.Prompt, '确定要生成付费申请吗?', function (btn) { + if (btn == 'yes') { + Ext.Msg.wait('正在处理....'); //正在删除数据... + Ext.Ajax.request({ + waitMsg: '正在处理....', + url: '/MvcShipping/MsChDui/MakeShen', + params: { + duino: invduino + }, + callback: function (options, success, response) { + if (success) { + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + Ext.Msg.hide(); + DsOpenEditWin("/Account/Chfee_payapplication/BLEdit?handle=check&bsPayNo=" + jsonresult.Data, '付费申请'); + } + else {//错误 + Ext.Msg.show({ title: Zi.LAN.Error, msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } + } + }, + failure: function (response, options) {//警告', msg: '服务器响应出错,请重试 + Ext.Msg.show({ title: Zi.LAN.Caveat, msg: Zi.LAN.FuWuQiError, icon: Ext.Msg.INFO, buttons: Ext.Msg.OK }); + }, + success: function (response, options) { + }, + scope: this + }); //end Ext.Ajax.request + } + }, this); + }, //onDeleteClick + getduiCondition: function () { var form = this.formSearch.getForm(); if (!form.isValid()) { @@ -4707,6 +4770,17 @@ Ext.extend(Shipping.MsChDuiEdit, Ext.Panel, { } }, + OprationSwap: function () { + var ret = new Array(); + ret[0] = this.OprationStatus; + ret[1] = this.storeList; + ret[2] = this.EditRecord; + ret[3] = this.EditRecord; + ret[4] = this.selectbsnostr; + ret[5] = this.selectfeestr; + return ret; + }, + Print: function () { var basicForm = this.formEdit.getForm(); var billNo = basicForm.findField('DUINO').value; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js index cf711ec7..4defbb12 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChDui/MsChDuiIndex.js @@ -1225,86 +1225,11 @@ Ext.extend(Shipping.MsChDuiIndex, Ext.Panel, { var record = selections[0]; var invcust = record.data.CUSTNAME; + var invduino = record.data.DUINO; this.selectbsnostr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + record.data.DUINO + "') "; this.selectfeestr = " f.GID IN (SELECT GID FROM V_DUI_FEE WHERE DUINO='" + record.data.DUINO + "') "; - var StoreCurr = Ext.create('DsExt.ux.RefTableStore', { - model: 'MsFeeCurr', - proxy: { url: '/MvcShipping/MsChFee/GetFeeCurrList' } - }); - StoreCurr.load({ params: { condition: ""} }); - - this.comboxInvCurr = Ext.create('DsExt.ux.RefTableCombox', { - fieldLabel: Zi.LAN.shishoubibie, //实收币别 - store: StoreCurr, - id: 'ShenCurr', - forceSelection: true, - allowBlank: false, - name: 'CURR', - value: 'RMB', - valueField: 'CURR', - displayField: 'CURR' - }); - - - this.formIFTMBFSShow = Ext.widget('form', { - frame: true, - region: 'center', - bodyPadding: 5, - fieldDefaults: { - margins: '2 2 2 2', - labelAlign: 'right', - flex: 1, - labelWidth: 80, - msgTarget: 'qtip' - }, - items: [{ - xtype: 'container', - defaultType: 'textfield', - layout: 'anchor', - defaults: { - anchor: '100%' - }, - items: [this.comboxInvCurr] - }] - }); - - me = this; - var winIFTMBFShow = Ext.create('Ext.window.Window', { - width: 250, - height: 190, - //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.formIFTMBFSShow], - buttons: [{ - text: Zi.LAN.suisc, //确认生成 - minWidth: 70, - handler: function () { - var ShenCurr = Ext.getCmp('ShenCurr'); - var Curr = ShenCurr.getValue(); - _this.onCreateInvShenClick(Curr, invcust); - - } - }, { - text: Zi.LAN.close, //关闭 - minWidth: 70, - handler: function () { - winIFTMBFShow.close(); - } - }] - }); - - winIFTMBFShow.show(); - + DsOpenEditWin("/Account/Chfee_invoiceapplication/BLEdit?handle=check&bsnosql=recapplist&bsCurr=&bsCust=" + invcust + "&bsduino=" + invduino, '发票申请'); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js index d750799a..1e75b42e 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeAmendDrCrGrid.js @@ -4259,10 +4259,10 @@ Ext.extend(Shipping.FeeAmendEditGrid, Ext.Panel, { var cellediting = null; if (type == 1) { cellediting = this.cellEditingDrChFee; - editColumnIndex = 4; + editColumnIndex = 3; } else if (type == 2) { cellediting = this.cellEditingCrChFee; - editColumnIndex = 4; + editColumnIndex = 3; } var n = store.getCount(); cellediting.startEditByPosition({ row: n - 1, column: editColumnIndex }); diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js index 2478cbb2..9346de16 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsChFee/FeeDrCrGrid.js @@ -6139,10 +6139,10 @@ Ext.extend(Shipping.FeeEditGrid, Ext.Panel, { var cellediting = null; if (type == 1) { cellediting = this.cellEditingDrChFee; - editColumnIndex = 5; + editColumnIndex = 4; } else if (type == 2) { cellediting = this.cellEditingCrChFee; - editColumnIndex =5; + editColumnIndex =4; } var n = store.getCount();