From 6f9099858ca692f5c7dbc83ddb62235ccc66ed03 Mon Sep 17 00:00:00 2001 From: hanxuntao <641739520@qq.com> Date: Mon, 5 Dec 2022 07:56:17 +0800 Subject: [PATCH] 1 --- .../Chfee_payapplicationController.cs | 92 ++++ .../ChPayapplicationAudit.js | 514 +++++++++++++++++- .../Viewsjs/Chfee_payapplication/Zi_en-us.js | 71 +++ .../Viewsjs/Chfee_payapplication/Zi_zh-cn.js | 70 +++ .../DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs | 55 +- .../Viewsjs/MsOpSeae/MsOpSeaeEdit.js | 4 +- DSWeb/Areas/OA/DAL/Baoxiao/BaoxiaoDAL.cs | 16 +- .../MsOpTruckBulk/MsOpTruckBulkCtnIndex.js | 2 +- .../MsOpTruckBulkCtnPcIndex.js | 5 +- 9 files changed, 798 insertions(+), 31 deletions(-) diff --git a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs index 8e019617..a6cc2806 100644 --- a/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs +++ b/DSWeb/Areas/Account/Controllers/Chfee_payapplicationController.cs @@ -25,6 +25,10 @@ using System.Web.Script.Serialization; using DSWeb.MvcShipping.DAL.MsSysParamSet; using DSWeb.Areas.Account.Models.ChfeeDetail; using DSWeb.Areas.Account.Models.BSNOLB; +using System.Text; +using DSWeb.Areas.CommMng.Models; +using System.Data; +using DSWeb.Areas.RptMng.Comm; namespace DSWeb.Areas.Account.Controllers { @@ -1161,6 +1165,94 @@ namespace DSWeb.Areas.Account.Controllers var jsonstr = JsonConvert.Serialize(new { Success = rst, Message = rst ? "删除成功" : msg }); return new ContentResult() { Content = jsonstr }; } + + public ContentResult BsListData(int start, int limit, string condition,string sort) + + { + + 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() == "") + { + var jsonRespose2 = new JsonResponse { Success = false, Message = "登录超时,请退出系统重新登录!" }; + return new ContentResult() { Content = JsonConvert.Serialize(jsonRespose2) }; + } + + + var PROFITRATEDR = MsSysParamSetDAL.GetData("PARAMNAME='PROFITRATEDR'"); + + var strSql = new StringBuilder(); + + + strSql.Append("SELECT B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,B.ORDERNO,"); + strSql.Append("B.ETD,B.PKGS,B.CBM,B.CNTRSEALNO,B.TRUCKER"); + strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.REMARK2,B.AGENTID,B.ETA,B.SALEDEPT,B.ISSUETYPE,B.ISCANCEL,B.ATD,B.CUSTOMSER,B.CLOSINGDATE,B.KINDPKGS,B.BSSOURCEDETAIL"); + strSql.Append(",case B.CUSTOMDATE when '1900-01-01 00:00:00.000' then '' else CONVERT(varchar(100), B.CUSTOMDATE,23) end as CUSTOMDATE"); + strSql.Append(",case B.FEESTATUS when 1 then '锁定' else '未锁定' end as FEESTATUSREF"); + strSql.Append(",B.CUSTSERVICE,B.FRCUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE,B.DESTINATION, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.CNTRTOTAL,B.CORPID"); + strSql.Append(",B.TRADETYPE,B.GOODSNAME,B.FEESTATUS"); + strSql.Append(",SUM(G.RMBDR) RMBDR,SUM(G.RMBCR) RMBCR,SUM(G.STLRMBDR) STLRMBDR,SUM(G.STLRMBCR) STLRMBCR,SUM(G.USDDR) USDDR,SUM(G.USDCR) USDCR,"); + strSql.Append("SUM(G.STLUSDDR) STLUSDDR,SUM(G.STLUSDCR) STLUSDCR,SUM(G.OTDR) OTDR,SUM(G.OTCR) OTCR,SUM(G.STLOTDR) STLOTDR,SUM(G.STLOTCR) STLOTCR,SUM(ISNULL(G.TTLDR,0)) TTLDR,"); + strSql.Append("SUM(ISNULL(G.TTLCR,0)) TTLCR,SUM(G.STLTTLDR) STLTTLDR,SUM(G.STLTTLCR) STLTTLCR"); + strSql.Append(",SUM(ISNULL(G.USDDR-G.USDCR,0)) AS USDPROFIT,SUM(ISNULL(G.RMBDR-G.RMBCR,0)) AS RMBPROFIT,SUM(ISNULL(G.OTDR-G.OTCR,0)) AS OTPROFIT,SUM(ISNULL(G.TTLDR-G.TTLCR,0)) AS TTLPROFIT "); + if (PROFITRATEDR.PARAMVALUE != "1") + { + strSql.Append(", (CASE WHEN (SUM(G.TTLDR))= 0 THEN 0 ELSE CONVERT(NUMERIC(18,2),ltrim(str((SUM(G.TTLDR-G.TTLCR)) / (SUM(G.TTLDR)) * 100, 10, 2))) END) AS PROFITRATE"); + + } + else + strSql.Append(", (CASE WHEN (SUM(G.TTLCR))= 0 THEN 0 ELSE CONVERT(NUMERIC(18,2),ltrim(str((SUM(G.TTLDR-G.TTLCR)) / (SUM(G.TTLCR)) * 100, 10, 2))) END) AS PROFITRATE"); + strSql.Append(",SUM(ISNULL(G.RMBDR-G.STLRMBDR,0)) AS RMBNODR,SUM(ISNULL(G.USDDR-G.STLUSDDR,0)) AS USDNODR,SUM(ISNULL(G.OTDR-G.STLOTDR,0)) AS OTNODR,SUM(ISNULL(G.TTLDR-G.STLTTLDR,0)) AS TTLNODR"); + strSql.Append(",SUM(ISNULL(G.RMBCR-G.STLRMBCR,0)) AS RMBNOCR,SUM(ISNULL(G.USDCR-G.STLUSDCR,0)) AS USDNOCR,SUM(ISNULL(G.OTCR-G.STLOTCR,0)) AS OTNOCR,SUM(ISNULL(G.TTLCR-G.STLTTLCR,0)) AS TTLNOCR"); + + + strSql.Append(" FROM V_OP_BILL B "); + + strSql.Append("LEFT JOIN v_op_gain_sum G ON (G.BSNO=B.BSNO) "); + strSql.Append(" WHERE 1=1 "); + + if (!string.IsNullOrEmpty(condition)) + { + strSql.Append(" and " + condition); + } + strSql.Append(" GROUP BY B.BSNO, B.OPLB,B.OPTYPE,B.OPLBNAME, B.BSTYPE,B.BLTYPE,B.BLFRT,B.CUSTOMERNAME, B.CUSTNO, B.MBLNO, B.HBLNO,B.VESSEL, B.VOYNO, B.INPUTBY, B.CREATETIME, B.BSSTATUS, B.SALE, B.OP, B.DOC,B.YARD,B.CONTRACTNO,B.ORDERNO,"); + strSql.Append("B.ETD,B.PKGS,B.CBM,B.CNTRSEALNO,B.TRUCKER"); + strSql.Append(",B.OPDATE,B.ENTERP,B.REMARK,B.REMARK2,B.AGENTID,B.ETA,B.SALEDEPT,B.ISSUETYPE,B.ISCANCEL,B.ATD,B.CUSTOMSER,B.CLOSINGDATE,B.KINDPKGS,B.BSSOURCEDETAIL"); + strSql.Append(",B.CUSTOMDATE"); + strSql.Append(",B.FEESTATUS,B.SALECORPID"); + strSql.Append(",B.CUSTSERVICE,B.FRCUSTSERVICE, B.PORTLOAD, B.PORTDISCHARGE,B.DESTINATION, B.CUSTOMNO, B.ACCDATE,B.CARRIER, B.BSSOURCE, B.LANE, B.FORWARDER,B.NETWEIGHT,B.KGS,B.TEU,B.CNTRTOTAL,B.CORPID"); + strSql.Append(",B.TRADETYPE,B.GOODSNAME,B.FEESTATUS"); + + + + + var sortstring = DatasetSort.Getsortstring(sort); + if (!string.IsNullOrEmpty(sortstring)) + { + strSql.Append(" order by " + sortstring); + } + else + { + + strSql.Append(" order by B.ETD DESC,B.MBLNO"); + + } + var dbparams = new List(); + + var paramps_sSQL = new CustomDbParamter(); + paramps_sSQL.ParameterName = "@sSQL"; + paramps_sSQL.DbType = DbType.String; + paramps_sSQL.Direction = ParameterDirection.Input; + paramps_sSQL.Value = strSql.ToString(); + dbparams.Add(paramps_sSQL); + + + + var dbRptResult = PubSysDAL.GetMsSqlPrcDataSet("sMsExesqlQry", dbparams, "Result_Set"); + var json = RptHelper.GetRptJsonResult(start, limit, dbRptResult, "Result_Set", true); + return new ContentResult() { Content = json }; + + } + + #region 参照部分 #endregion diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationAudit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationAudit.js index adcf8176..1ca5f414 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationAudit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/ChPayapplicationAudit.js @@ -888,6 +888,493 @@ Ext.extend(Shipping.ChPayapplicationAudit, Ext.Panel, { items: [this.gridBillSum] }); + //#region 按票合计 + + //定义数据集 + this.storeListbillsum = Ext.create('Ext.data.Store', { + pageSize: this.PageSize, + fields: [ + { name: 'BSNO', type: 'string' }, + { name: 'OPLB', type: 'string' }, + { name: 'OPLBNAME', type: 'string' }, + { name: 'OPTYPE', type: 'string' }, + { name: 'BLTYPE', type: 'string' }, + { name: 'BLFRT', type: 'string' }, + { name: 'FEESTATUSREF', type: 'string' }, + { name: 'CUSTOMERNAME', type: 'string' }, + { name: 'CUSTFULLNAME', type: 'string' }, + { name: 'CUSTNO', type: 'string' }, + { name: 'MBLNO', type: 'string' }, + { name: 'HBLNO', type: 'string' }, + { name: 'ETD', type: 'string' }, + { name: 'ATD', type: 'string' }, + { name: 'VESSEL', type: 'string' }, + { name: 'VOYNO', type: 'string' }, + { name: 'INPUTBY', type: 'string' }, + { name: 'CREATETIME', type: 'string' }, + { name: 'BSSTATUS', type: 'string' }, + { name: 'SALE', type: 'string' }, + { name: 'OP', type: 'string' }, + { name: 'DOC', type: 'string' }, + { name: 'CUSTSERVICE', type: 'string' }, + { name: 'FRCUSTSERVICE', type: 'string' }, + { name: 'PORTLOAD', type: 'string' }, + { name: 'PORTDISCHARGE', type: 'string' }, + { name: 'DESTINATION', type: 'string' }, + { name: 'CUSTOMNO', type: 'string' }, + { name: 'ACCDATE', type: 'string' }, + { name: 'CARRIER', type: 'string' }, + { name: 'BSSOURCE', type: 'string' }, + { name: 'BSSOURCEDETAIL', type: 'string' }, + { name: 'LANE', type: 'string' }, + { name: 'ISCANCEL', type: 'string' }, + { name: 'CONTRACTNO', type: 'string' }, + { name: 'ORDERNO', type: 'string' }, + { name: 'FORWARDER', type: 'string' }, + { name: 'CNTRTOTAL', type: 'string' }, + { name: 'TRADETYPE', type: 'string' }, + { name: 'GOODSNAME', type: 'string' }, + { name: 'OPDATE', type: 'string' }, + { name: 'CUSTOMDATE', type: 'string' }, + + { name: 'AGENTID', type: 'string' }, + { name: 'ETA', type: 'string' }, + { name: 'SALEDEPT', type: 'string' }, + { name: 'ISSUETYPE', type: 'string' }, + { name: 'CUSTOMSER', type: 'string' }, + { name: 'CLOSINGDATE', type: 'string' }, + { name: 'KINDPKGS', type: 'string' }, + { name: 'SALECORP', type: 'string' }, + { name: 'YARD', type: 'string' }, + { name: 'TEU', type: 'number' }, + { name: 'RMBDR', type: 'number' }, + { name: 'RMBCR', type: 'number' }, + { name: 'USDDR', type: 'number' }, + { name: 'USDCR', type: 'number' }, + { name: 'OTDR', type: 'number' }, + { name: 'OTCR', type: 'number' }, + { name: 'TTLDR', type: 'number' }, + { name: 'TTLCR', type: 'number' }, + { name: 'TTLTAXDR', type: 'number' }, + { name: 'TTLTAXCR', type: 'number' }, + { name: 'TTLTAXPROFIT', type: 'number' }, + { name: 'RMBPROFIT', type: 'number' }, + { name: 'USDPROFIT', type: 'number' }, + { name: 'OTPROFIT', type: 'number' }, + { name: 'TTLPROFIT', type: 'number' }, + { name: 'PROFITRATE', type: 'number' } + + ], + remoteSort: true, + proxy: { + type: 'ajax', + timeout: 120000, + url: '/Account/Chfee_payapplication/BsListData', + reader: { + id: '', + root: 'data', + totalProperty: 'totalCount' + } + } + }); + + //定义Grid + this.initgirdcolumsbillsum = [{ + sortable: true, + dataIndex: 'BSNO', + text: '编号', + hidden: true, + width: 130 + }, { + sortable: true, + dataIndex: 'OPLBNAME', + text: Zi.LAN.OPLBNAME, + width: 70 + }, { + sortable: true, + dataIndex: 'OPTYPE', + text: Zi.LAN.OPTYPE, + width: 70 + }, { + sortable: true, + dataIndex: 'FEESTATUSREF', + text: Zi.LAN.FEESTATUSREF, + width: 70 + }, { + sortable: true, + dataIndex: 'BSSTATUS', + text: Zi.LAN.BSSTATUS, + width: 70, + renderer: function (value, meta) { + if (value == '1') + return '锁定'; //是 + else + return '未锁定'; + } + }, { + dataIndex: 'ISCANCEL', + header: Zi.LAN.ISCANCEL, //'退舱', + width: 60, + renderer: function (value, meta, record) { + if (value == '1') + return '√'; + else if (value == '2') + return '申请退舱'; + else if (value == '4') + return '驳回申请'; + else + return ''; + } + }, { + sortable: true, + dataIndex: 'BSTYPE', + text: Zi.LAN.BSTYPE, + width: 70 + }, { + sortable: true, + dataIndex: 'BLTYPE', + text: Zi.LAN.BLTYPE, + width: 70 + }, { + sortable: true, + dataIndex: 'BLFRT', + text: Zi.LAN.BLFRT, + width: 70 + }, { + sortable: true, + dataIndex: 'ISSUETYPE', + text: Zi.LAN.ISSUETYPE, + width: 70 + }, { + sortable: true, + dataIndex: 'OPDATE', + text: Zi.LAN.OPDATE, + width: 86 + }, { + sortable: true, + dataIndex: 'CUSTOMDATE', + text: Zi.LAN.CUSTOMDATE, + width: 86 + }, { + sortable: true, + dataIndex: 'CUSTOMERNAME', + text: Zi.LAN.CUSTOMERNAME, + width: 120 + }, { + sortable: true, + dataIndex: 'CUSTFULLNAME', + text: Zi.LAN.CUSTFULLNAME, + width: 140 + }, { + sortable: true, + dataIndex: 'CUSTNO', + text: Zi.LAN.CUSTNO, + width: 136 + }, { + sortable: true, + dataIndex: 'FORWARDER', + text: Zi.LAN.FORWARDER, + width: 100 + }, { + sortable: true, + dataIndex: 'MBLNO', + text: Zi.LAN.MBLNO, + width: 120 + }, { + sortable: true, + dataIndex: 'HBLNO', + text: Zi.LAN.HBLNO, + width: 120 + }, { + sortable: true, + dataIndex: 'ETD', + text: Zi.LAN.ETD, + width: 86 + }, { + sortable: true, + dataIndex: 'RMBDR', + text: Zi.LAN.RMBDR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'RMBCR', + text: Zi.LAN.RMBCR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'RMBPROFIT', + text: Zi.LAN.RMBPROFIT, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'USDDR', + text: Zi.LAN.USDDR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'USDCR', + text: Zi.LAN.USDCR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'USDPROFIT', + text: Zi.LAN.USDPROFIT, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'OTDR', + text: Zi.LAN.OTDR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'OTCR', + text: Zi.LAN.OTCR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'OTPROFIT', + text: Zi.LAN.OTPROFIT, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'TTLDR', + text: Zi.LAN.TTLDR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'TTLCR', + text: Zi.LAN.TTLCR, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'TTLPROFIT', + text: Zi.LAN.TTLPROFIT, + 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; }, + align: 'right', + width: 80 + }, { + sortable: true, + dataIndex: 'PROFITRATE', + text: Zi.LAN.PROFITRATE, + width: 80, + renderer: function (value, meta) { + if (value != 0) value = value + '%'; + return value; + } + }, { + sortable: true, + dataIndex: 'ETA', + text: Zi.LAN.ETA, + width: 86 + }, { + sortable: true, + dataIndex: 'ATD', + text: Zi.LAN.ATD, + width: 86 + }, { + sortable: true, + dataIndex: 'VESSEL', + text: Zi.LAN.VESSEL, + width: 200 + }, { + sortable: true, + dataIndex: 'VOYNO', + text: Zi.LAN.VOYNO, + width: 50 + }, { + sortable: true, + dataIndex: 'SALE', + text: Zi.LAN.SALE, + width: 80 + }, { + sortable: true, + dataIndex: 'OP', + text: Zi.LAN.OP, + width: 80 + }, { + sortable: true, + dataIndex: 'DOC', + text: Zi.LAN.DOC, + width: 80 + }, { + sortable: true, + dataIndex: 'SALEDEPT', + text: Zi.LAN.SALEDEPT, + width: 80 + }, { + sortable: true, + dataIndex: 'CUSTSERVICE', + text: Zi.LAN.CUSTSERVICE, + width: 80 + }, { + sortable: true, + dataIndex: 'FRCUSTSERVICE', + text: Zi.LAN.FRCUSTSERVICE, + width: 80 + }, { + sortable: true, + dataIndex: 'CONTRACTNO', + text: Zi.LAN.CONTRACTNO, + width: 80 + }, { + sortable: true, + dataIndex: 'ORDERNO', + text: Zi.LAN.ORDERNO, + width: 80 + }, { + sortable: true, + dataIndex: 'PORTLOAD', + text: Zi.LAN.PORTLOAD, + width: 80 + }, { + sortable: true, + dataIndex: 'PORTDISCHARGE', + text: Zi.LAN.PORTDISCHARGE, + width: 150 + }, { + sortable: true, + dataIndex: 'DESTINATION', + header: Zi.LAN.DESTINATION, + width: 150 + }, { + sortable: true, + dataIndex: 'ACCDATE', + text: Zi.LAN.ACCDATE, + width: 80 + }, { + sortable: true, + dataIndex: 'CARRIER', + text: Zi.LAN.CARRIER, + width: 80 + }, { + sortable: true, + dataIndex: 'LANE', + text: Zi.LAN.LANE, + width: 80 + }, { + sortable: true, + dataIndex: 'BSSOURCE', + text: Zi.LAN.BSSOURCE, + width: 120 + }, { + sortable: true, + dataIndex: 'BSSOURCEDETAIL', + text: Zi.LAN.BSSOURCEDETAIL, + width: 120 + }, { + sortable: true, + dataIndex: 'YARD', + text: Zi.LAN.YARD, + width: 120 + }, { + sortable: true, + dataIndex: 'AGENTID', + text: Zi.LAN.AGENTID, + width: 120 + }, { + sortable: true, + dataIndex: 'TEU', + text: Zi.LAN.TEU, + width: 80 + },{ + sortable: true, + dataIndex: 'GOODSNAME', + text: Zi.LAN.GOODSNAME, + width: 80 + }, { + sortable: true, + dataIndex: 'CREATETIME', + text: Zi.LAN.CREATETIME, + width: 80 + }, { + sortable: true, + dataIndex: 'CNTRTOTAL', + text: Zi.LAN.CNTRTOTAL, + width: 80 + } + ]; + + + // this.girdcolums = this.initgirdcolums; + this.girdcolumsbillsum = DsTruck.GetGridPanel(USERID, this.formname + 'billsum', this.initgirdcolumsbillsum, 1); + + + this.gridListbillsum = new Ext.grid.GridPanel({ + store: this.storeListbillsum, + enableHdMenu: false, + region: 'center', + loadMask: { msg: "数据加载中,请稍等..." }, + trackMouseOver: true, + disableSelection: false, + viewConfig: { + enableTextSelection: true, //允许复制数据 + autoFill: true + }, + columns: this.girdcolumsbillsum, + // paging bar on the bottom + bbar: [Ext.create('Ext.PagingToolbar', { + store: this.storeListbillsum, + displayInfo: true, + displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', + emptyMsg: "没有数据" + })] + }); + + this.panelttlBillSum = new Ext.Panel({ + layout: "border", + region: 'center', + title: '按票合计', + items: [this.gridListbillsum] + }); + + + //this.gridListbillsum = new Ext.grid.GridPanel({ + // store: this.storeListbillsum, + // enableHdMenu: false, + // region: 'center', + // loadMask: { msg: "数据加载中,请稍等..." }, + // trackMouseOver: true, + // disableSelection: false, + // viewConfig: { + // enableTextSelection: true, //允许复制数据 + // autoFill: true + // }, + // columns: this.girdcolumsbillsum, + // // paging bar on the bottom + // bbar: [Ext.create('Ext.PagingToolbar', { + // store: this.storeListbillsum, + // displayInfo: true, + // displayMsg: '当前显示 {0} - {1}条记录 /共 {2}条记录', + // emptyMsg: "没有数据" + // })] + //}); + + //#endregion + + + //#endregion formSearch //查询工具条 @@ -1122,7 +1609,14 @@ Ext.extend(Shipping.ChPayapplicationAudit, Ext.Panel, { items: [ this.page_1 , this.page_2 - ] + , this.panelttlBillSum + ], + //tab切换事件 + listeners: { + 'tabchange': function (tabPanel, newCard, oldCard, eOpts) { + _this.RpttabChange(tabPanel, newCard, oldCard, eOpts); + } + } }); //#endregion @@ -1199,6 +1693,15 @@ Ext.extend(Shipping.ChPayapplicationAudit, Ext.Panel, { scope: this }); + if (this.MainTab.getActiveTab() == this.panelttlBillSum) { + + var sql = " B.BSNO IN (SELECT BSNO FROM CH_FEE_DO WHERE BILLNO='" + _this.billno + "') "; + this.storeListbillsum.load({ params: { start: 0, limit: _this.BodyPageSize, condition: sql } }); + } + + //var sql = " BSNO IN (SELECT BSNO FROM CH_FEE_DO WHERE BILLNO='" + _this.billno+"') "; + //_this.storeListbillsum.load({ params: { start: 0, limit: _this.BodyPageSize, condition: sql } }); + }, this); @@ -1725,6 +2228,15 @@ Ext.extend(Shipping.ChPayapplicationAudit, Ext.Panel, { scope: this }); }, + RpttabChange: function (tabPanel, newCard, oldCard, eOpts) { + if (newCard == this.panelttlBillSum) { + + var sql = " B.BSNO IN (SELECT BSNO FROM CH_FEE_DO WHERE BILLNO='" + _this.billno + "') "; + this.storeListbillsum.load({ params: { start: 0, limit: _this.BodyPageSize, condition: sql } }); + } + }, + + onExportClick: function (button, event) { _this = this; diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js index 62edb8f9..96468387 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_en-us.js @@ -230,6 +230,77 @@ Zi.LAN.STLNAME = '结费方式'; Zi.LAN.BALTTLDR = '合计未收'; Zi.LAN.INPUTBY = '录入人'; Zi.LAN.HBLNO = '分提单号'; +Zi.LAN.OPLBNAME = "业务类型"; +Zi.LAN.OPTYPE = "更改单"; +Zi.LAN.FEESTATUSREF = "费用锁定"; +Zi.LAN.BSSTATUS = "业务锁定"; +Zi.LAN.ISCANCEL = "退舱"; +Zi.LAN.BSTYPE = "运输类型"; +Zi.LAN.BLTYPE = "装运方式"; +Zi.LAN.BLFRT = "付费方式"; +Zi.LAN.ISSUETYPE = "签单方式"; +Zi.LAN.OPDATE = "业务日期"; +Zi.LAN.CUSTOMDATE = "报关日期"; +Zi.LAN.CUSTOMERNAME = "委托单位"; +Zi.LAN.CUSTFULLNAME = "委托单位全称"; +Zi.LAN.CUSTNO = "委托编号"; +Zi.LAN.CUSTOMNO = "报关单号"; +Zi.LAN.ENTERP = "经营单位"; +Zi.LAN.CUSTOMSER = "报关行"; +Zi.LAN.FORWARDER = "货代公司"; +Zi.LAN.MBLNO = "主提单号"; +Zi.LAN.HBLNO = "分提单号"; +Zi.LAN.ETD = "开船日期"; +Zi.LAN.ETA = "预抵日期"; +Zi.LAN.ATD = "ATD"; +Zi.LAN.VESSEL = "船名"; +Zi.LAN.VOYNO = "航次"; +Zi.LAN.SALE = "业务员"; +Zi.LAN.OP = "操作"; +Zi.LAN.DOC = "单证"; +Zi.LAN.SALEDEPT = "销售部门"; +Zi.LAN.CUSTSERVICE = "客服员"; +Zi.LAN.FRCUSTSERVICE = "海外客服员"; +Zi.LAN.CONTRACTNO = "运费协议号"; +Zi.LAN.ORDERNO = "订舱编号"; +Zi.LAN.PORTLOAD = "起运港"; +Zi.LAN.PORTDISCHARGE = "卸货港"; +Zi.LAN.DESTINATION = "目的地"; +Zi.LAN.ACCDATE = "会计期间"; +Zi.LAN.CARRIER = "船公司"; +Zi.LAN.LANE = "航线"; +Zi.LAN.BSSOURCE = "业务来源"; +Zi.LAN.BSSOURCEDETAIL = "来源明细"; +Zi.LAN.YARD = "场站"; +Zi.LAN.AGENTID = "代理"; +Zi.LAN.REMARK = "备注"; +Zi.LAN.REMARK2 = "其他备注"; +Zi.LAN.TEU = "TEU"; +Zi.LAN.PKGS = "件数"; +Zi.LAN.KINDPKGS = "包装"; +Zi.LAN.KGS = "KGS"; +Zi.LAN.CBM = "尺码"; +Zi.LAN.NETWEIGHT = "计费重量(或净重)"; +Zi.LAN.GOODSNAME = "品名"; +Zi.LAN.CREATETIME = "创建时间"; +Zi.LAN.CNTRTOTAL = "集装箱"; +Zi.LAN.CNTRSEALNO = "箱号封号"; +Zi.LAN.TRUCKER = "车队"; +Zi.LAN.SALECORP = "所属分部"; +Zi.LAN.RMBDR = "RMB应收"; +Zi.LAN.RMBCR = "RMB应付"; +Zi.LAN.RMBPROFIT = "RMB利润"; +Zi.LAN.USDDR = "USD应收"; +Zi.LAN.USDCR = "USD应付"; +Zi.LAN.USDPROFIT = "USD利润"; +Zi.LAN.OTDR = "其他币别应收"; +Zi.LAN.OTCR = "其他币别应付"; +Zi.LAN.OTPROFIT = "其他币别利润"; +Zi.LAN.TTLDR = "合计应收"; +Zi.LAN.TTLCR = "合计应付"; +Zi.LAN.TTLPROFIT = "合计利润"; +Zi.LAN.PROFITRATE = "利润率"; + //#endregion 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 3f274f85..a98a44a5 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_payapplication/Zi_zh-cn.js @@ -236,3 +236,73 @@ Zi.LAN.STLNAME = '结费方式'; Zi.LAN.BALTTLDR = '合计未收'; Zi.LAN.INPUTBY = '录入人'; Zi.LAN.HBLNO = '分提单号'; +Zi.LAN.OPLBNAME = "业务类型"; +Zi.LAN.OPTYPE = "更改单"; +Zi.LAN.FEESTATUSREF = "费用锁定"; +Zi.LAN.BSSTATUS = "业务锁定"; +Zi.LAN.ISCANCEL = "退舱"; +Zi.LAN.BSTYPE = "运输类型"; +Zi.LAN.BLTYPE = "装运方式"; +Zi.LAN.BLFRT = "付费方式"; +Zi.LAN.ISSUETYPE = "签单方式"; +Zi.LAN.OPDATE = "业务日期"; +Zi.LAN.CUSTOMDATE = "报关日期"; +Zi.LAN.CUSTOMERNAME = "委托单位"; +Zi.LAN.CUSTFULLNAME = "委托单位全称"; +Zi.LAN.CUSTNO = "委托编号"; +Zi.LAN.CUSTOMNO = "报关单号"; +Zi.LAN.ENTERP = "经营单位"; +Zi.LAN.CUSTOMSER = "报关行"; +Zi.LAN.FORWARDER = "货代公司"; +Zi.LAN.MBLNO = "主提单号"; +Zi.LAN.HBLNO = "分提单号"; +Zi.LAN.ETD = "开船日期"; +Zi.LAN.ETA = "预抵日期"; +Zi.LAN.ATD = "ATD"; +Zi.LAN.VESSEL = "船名"; +Zi.LAN.VOYNO = "航次"; +Zi.LAN.SALE = "业务员"; +Zi.LAN.OP = "操作"; +Zi.LAN.DOC = "单证"; +Zi.LAN.SALEDEPT = "销售部门"; +Zi.LAN.CUSTSERVICE = "客服员"; +Zi.LAN.FRCUSTSERVICE = "海外客服员"; +Zi.LAN.CONTRACTNO = "运费协议号"; +Zi.LAN.ORDERNO = "订舱编号"; +Zi.LAN.PORTLOAD = "起运港"; +Zi.LAN.PORTDISCHARGE = "卸货港"; +Zi.LAN.DESTINATION = "目的地"; +Zi.LAN.ACCDATE = "会计期间"; +Zi.LAN.CARRIER = "船公司"; +Zi.LAN.LANE = "航线"; +Zi.LAN.BSSOURCE = "业务来源"; +Zi.LAN.BSSOURCEDETAIL = "来源明细"; +Zi.LAN.YARD = "场站"; +Zi.LAN.AGENTID = "代理"; +Zi.LAN.REMARK = "备注"; +Zi.LAN.REMARK2 = "其他备注"; +Zi.LAN.TEU = "TEU"; +Zi.LAN.PKGS = "件数"; +Zi.LAN.KINDPKGS = "包装"; +Zi.LAN.KGS = "KGS"; +Zi.LAN.CBM = "尺码"; +Zi.LAN.NETWEIGHT = "计费重量(或净重)"; +Zi.LAN.GOODSNAME = "品名"; +Zi.LAN.CREATETIME = "创建时间"; +Zi.LAN.CNTRTOTAL = "集装箱"; +Zi.LAN.CNTRSEALNO = "箱号封号"; +Zi.LAN.TRUCKER = "车队"; +Zi.LAN.SALECORP = "所属分部"; +Zi.LAN.RMBDR = "RMB应收"; +Zi.LAN.RMBCR = "RMB应付"; +Zi.LAN.RMBPROFIT = "RMB利润"; +Zi.LAN.USDDR = "USD应收"; +Zi.LAN.USDCR = "USD应付"; +Zi.LAN.USDPROFIT = "USD利润"; +Zi.LAN.OTDR = "其他币别应收"; +Zi.LAN.OTCR = "其他币别应付"; +Zi.LAN.OTPROFIT = "其他币别利润"; +Zi.LAN.TTLDR = "合计应收"; +Zi.LAN.TTLCR = "合计应付"; +Zi.LAN.TTLPROFIT = "合计利润"; +Zi.LAN.PROFITRATE = "利润率"; diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index f7fd613d..924d8ac5 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -21432,34 +21432,39 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL icount++; #endregion - #region 12 提单的第一个记录 - var xtype = "P"; - if (bill.BLFRT.IndexOf("COLLECT") >= 0) - { - xtype = "C"; - } - r.WriteLine("12" - + ":" + bill.MBLNO// 2 B/L NO. 提单号 X(20) - + ":"// 3 PRE. VESSEL CODE 前程运输船名代码 X(9) C - + ":"// 4 PRE. VESSEL 前程运输船名 X(35) C - + ":"// 5 PRE. VOYAGE 前程运输航次 X(6) C - + ":" + GetPortEDICode(bill.PLACERECEIPTID, typeIFCSUM)// 6 PLACE CODE OF RECEIPT 收货地代码(货物托运地或者国家代码) X(5) C - + ":" + bill.PLACERECEIPT// 7 PLACE OF RECEIPT 收货地名称 X(70)C - + ":" + GetPortEDICode(bill.PORTLOADID, typeIFCSUM)// 8 LOAD PORT CODE 装货港代码 X(5)M - + ":" + bill.PORTLOAD// 9 LOAD PORT 装货港 X(35) C - + ":" + bill.SERVICE// 10 B/L CY-CFS ITEM 运输条款 X(9) M - + ":" + xtype// 11 PREPAID OR COLLECT 付款方式(运费支付方法代码) X(1) "C:Collect到付,P:Prepaid only预付,F=免费" M - + ":" + GetDateStr(bill.ETA, "yyyyMMdd")// 12 Consignment loading date 货物装船时间 9(8) "YYYYMMDD" M - + ":"// 13 QUARANTINE CODING 检疫代码 X(1) C - + ":"// 14 DATE OF ISSUE 签发日期 9(8) CCYYMMDD C - + ":"// 15 CURRENCY 币种(金额类型代码) X(3) 填写“托运货物价值”数据项填写的金额数值对应的货币代码,参照代码表:CN025 C - + ":"// 16 EXCHANGE RATE 汇率 9(5). 9999 C - + "'"); - icount++; - #endregion } + + isfirst = false; + + #region 12 提单的第一个记录 + var xtype = "P"; + if (bill.BLFRT.IndexOf("COLLECT") >= 0) + { + xtype = "C"; + } + + r.WriteLine("12" + + ":" + bill.MBLNO// 2 B/L NO. 提单号 X(20) + + ":"// 3 PRE. VESSEL CODE 前程运输船名代码 X(9) C + + ":"// 4 PRE. VESSEL 前程运输船名 X(35) C + + ":"// 5 PRE. VOYAGE 前程运输航次 X(6) C + + ":" + GetPortEDICode(bill.PLACERECEIPTID, typeIFCSUM)// 6 PLACE CODE OF RECEIPT 收货地代码(货物托运地或者国家代码) X(5) C + + ":" + bill.PLACERECEIPT// 7 PLACE OF RECEIPT 收货地名称 X(70)C + + ":" + GetPortEDICode(bill.PORTLOADID, typeIFCSUM)// 8 LOAD PORT CODE 装货港代码 X(5)M + + ":" + bill.PORTLOAD// 9 LOAD PORT 装货港 X(35) C + + ":" + bill.SERVICE// 10 B/L CY-CFS ITEM 运输条款 X(9) M + + ":" + xtype// 11 PREPAID OR COLLECT 付款方式(运费支付方法代码) X(1) "C:Collect到付,P:Prepaid only预付,F=免费" M + + ":" + GetDateStr(bill.ETA, "yyyyMMdd")// 12 Consignment loading date 货物装船时间 9(8) "YYYYMMDD" M + + ":"// 13 QUARANTINE CODING 检疫代码 X(1) C + + ":"// 14 DATE OF ISSUE 签发日期 9(8) CCYYMMDD C + + ":"// 15 CURRENCY 币种(金额类型代码) X(3) 填写“托运货物价值”数据项填写的金额数值对应的货币代码,参照代码表:CN025 C + + ":"// 16 EXCHANGE RATE 汇率 9(5). 9999 C + + "'"); + icount++; + #endregion + #region 13 提单的地点信息 r.WriteLine("13" + ":" + GetPortEDICode(bill.PORTDISCHARGEID, typeIFCSUM)//2 DISCHARGE PORT CODE 卸货地代码 X(5)M diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js index b294d7df..bb774865 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeEdit.js @@ -1990,7 +1990,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { text: Zi.LAN.SaveGridPanel, //"保存", handler: function (button, event) { _this.ctncolumns = DsTruck.SaveGridPanel(USERID, 'SEAECTNCOLUMN', _this.gridList.columns, _this.ctncolumns, 0, true); - _this.gridListshow.reconfigure(this.storeBodyList, _this.ctncolumns); + _this.gridList.reconfigure(this.storeBodyList, _this.ctncolumns); } }, { @@ -12580,7 +12580,7 @@ Ext.extend(Shipping.MsOpSeaeEdit, Ext.Panel, { }] }); this.gridList.reconfigure(this.storeBodyList, this.ctncolumns); - this.gridListshow.reconfigure(this.storeBodyList, this.ctncolumns); + this.gridListshow.reconfigure(this.storeBodyList, this.ctncolumnsshow); this.storeShipper.on('beforeload', function (store) { var CUSTOMERNAME = this.formHead.getForm().findField('CUSTOMERNAME').getValue(); diff --git a/DSWeb/Areas/OA/DAL/Baoxiao/BaoxiaoDAL.cs b/DSWeb/Areas/OA/DAL/Baoxiao/BaoxiaoDAL.cs index 5f5a0352..06b73f16 100644 --- a/DSWeb/Areas/OA/DAL/Baoxiao/BaoxiaoDAL.cs +++ b/DSWeb/Areas/OA/DAL/Baoxiao/BaoxiaoDAL.cs @@ -778,7 +778,7 @@ namespace DSWeb.Areas.OA.DAL.Baoxiao { result.Message = "只有在‘审核通过’状态下才能进行此操作"; } - else if (newStatus==1) + else if (newStatus == 1) { result.Message = "只有未经审核的单据才能撤回"; } @@ -786,6 +786,20 @@ namespace DSWeb.Areas.OA.DAL.Baoxiao return result; } + else { + if (newStatus == 6) { + T_ALL_DA T_ALL_DA = new T_ALL_DA(); + var BLCOUNT = T_ALL_DA.GetStrSQL("BLCOUNT", "select count(*) BLCOUNT from v_op_bill where FEESTATUS=1 AND BSNO IN (SELECT BSNO FROM ch_fee where BXGID='"+ BX.BXGID + "') "); + if (BLCOUNT != "0") + { + result.Success = false; + result.Message = "费用相关业务已费用锁定,不允许驳回!"; + return result; + } + } + } + + } Database db = DatabaseFactory.CreateDatabase(); //if () diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulk/MsOpTruckBulkCtnIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulk/MsOpTruckBulkCtnIndex.js index 9447c08f..b4bd8580 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulk/MsOpTruckBulkCtnIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulk/MsOpTruckBulkCtnIndex.js @@ -234,7 +234,7 @@ Ext.extend(Shipping.MsOpTruckBulkCtnIndex, Ext.Panel, { }, { sortable: true, dataIndex: 'ETD', - header: '要求装货(卸货)日期', + header: '要求派车日期', width: 80 }, { sortable: true, diff --git a/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulkPc/MsOpTruckBulkCtnPcIndex.js b/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulkPc/MsOpTruckBulkCtnPcIndex.js index 58d140a2..cde5f84f 100644 --- a/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulkPc/MsOpTruckBulkCtnPcIndex.js +++ b/DSWeb/Areas/TruckMng/Viewsjs/MsOpTruckBulkPc/MsOpTruckBulkCtnPcIndex.js @@ -277,7 +277,7 @@ Ext.extend(Shipping.MsOpTruckBulkCtnPcIndex, Ext.Panel, { }, { sortable: true, dataIndex: 'DDOP', - header: '操作', + header: '调度', width: 80 }, { sortable: true, @@ -2587,6 +2587,9 @@ Ext.extend(Shipping.MsOpTruckBulkCtnPcIndex, Ext.Panel, { var TRADETYPE = form.findField('TRADETYPE').getValue(); sql = sql + getAndConSql(sql, TRADETYPE, "TRADETYPE='" + TRADETYPE + "'"); + var OP = form.findField('OP').getValue(); + sql = sql + getAndConSql(sql, OP, "op_truck_bulk_pc.OP='" + OP + "'"); + var CUSTOMERNAME = form.findField('CUSTOMERNAME').getValue(); sql = sql + getAndConSql(sql, CUSTOMERNAME, "CUSTOMERNAME='" + CUSTOMERNAME + "'");