diff --git a/BookingJieFeng/BookingJieFeng.csproj.user b/BookingJieFeng/BookingJieFeng.csproj.user index 28be9c4c..a48b3371 100644 --- a/BookingJieFeng/BookingJieFeng.csproj.user +++ b/BookingJieFeng/BookingJieFeng.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU FolderProfile true diff --git a/BookingWeb/BookingWeb.csproj.user b/BookingWeb/BookingWeb.csproj.user index 4edb5e0f..6bc24ada 100644 --- a/BookingWeb/BookingWeb.csproj.user +++ b/BookingWeb/BookingWeb.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true diff --git a/DSWeb.Common/DB/Comm.cs b/DSWeb.Common/DB/Comm.cs index b762101a..2fda1fd0 100644 --- a/DSWeb.Common/DB/Comm.cs +++ b/DSWeb.Common/DB/Comm.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.ComponentModel.DataAnnotations; using System.ComponentModel.DataAnnotations.Schema; using System.Linq; +using System.Linq.Expressions; using System.Text.RegularExpressions; using System.Web; @@ -1644,6 +1645,33 @@ namespace DSWeb.Common.DB } + [Table("code_goods")] + public partial class code_goods_md + { + [Key] + public string GID { get; set; } + public string GOODCODE { get; set; } + public string GOODNAME { get; set; } + public string DESCRIP { get; set; } + public decimal? ARRATE { get; set; } = 0; + public decimal? APRATE { get; set; } = 0; + public decimal? AROUTRATE { get; set; } = 0; + public decimal? APOUTRATE { get; set; } = 0; + public bool? ISSTOP { get; set; } = false; + public string GoodsTypeGID { get; set; } + public string GOODNO { get; set; } + public string CREATEUSER { get; set; } + public DateTime? CREATETIME { get; set; } + public string CORPID { get; set; } + public string GOODSFEETYPE { get; set; } + public string RULEUNIT { get; set; } + public string RULEUNIT2 { get; set; } + public string RULEUNIT1 { get; set; } + public string ENAME { get; set; } + public string HSCODE { get; set; } + + } + [Table("code_goods_inv")] public partial class code_goods_inv_md { @@ -3410,7 +3438,7 @@ namespace DSWeb.Common.DB // public string mblno { get; set; } // public string custno { get; set; } // public DateTime? ETD { get; set; } - + // public string BSNO { get; set; } // public int? FEETYPE { get; set; } @@ -3737,23 +3765,24 @@ namespace DSWeb.Common.DB } [NotMapped] - public class JG_Finance_DeptZY_md: t_JG_Finance_DeptZY_md + public class JG_Finance_DeptZY_md : t_JG_Finance_DeptZY_md { new public string STARTDATE { get; set; } new public string ENDDATE { get; set; } public JG_Finance_DeptZY_md() { } - public JG_Finance_DeptZY_md(t_JG_Finance_DeptZY_md _head) { + public JG_Finance_DeptZY_md(t_JG_Finance_DeptZY_md _head) + { GID = _head.GID; - + BSNO = _head.BSNO; CORPID = _head.CORPID; INPUTBYID = _head.INPUTBYID; INPUTTIME = _head.INPUTTIME; INPUTBY = _head.INPUTBY; REMARK = _head.REMARK; - STARTDATE = _head.STARTDATE==null?"": ((DateTime)_head.STARTDATE).ToString("yyyy-MM-dd"); + STARTDATE = _head.STARTDATE == null ? "" : ((DateTime)_head.STARTDATE).ToString("yyyy-MM-dd"); ENDDATE = _head.STARTDATE == null ? "" : ((DateTime)_head.ENDDATE).ToString("yyyy-MM-dd"); STARTAMOUNT = _head.STARTAMOUNT; RECEIVESETTLEMENT = _head.RECEIVESETTLEMENT; @@ -3781,12 +3810,13 @@ namespace DSWeb.Common.DB public decimal? PAYSETTLEMENT { get; set; } = 0; public decimal? ZY_AMOUNT { get; set; } = 0; - public t_JG_Finance_DeptZY_Detail_md() { + public t_JG_Finance_DeptZY_Detail_md() + { GID = Guid.NewGuid().ToString(); } //public t_JG_Finance_DeptZY_Detail_md(string PID) { - + // this.PID = PID; // this.SORT = 0; //} @@ -3814,4 +3844,24 @@ namespace DSWeb.Common.DB public string COMPANYID { get; set; } public string DEPTGID { get; set; } } + + [Table("OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL")] + public class OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL_md + { + [Key] + public Guid GID { get; set; } + public Guid WMSDUIID { get; set; } + public string GOODSNAME { get; set; } + public string MBLNO { get; set; } + public DateTime? FEEDATE { get; set; } + public decimal? QICHU { get; set; } + public decimal? JINHUO { get; set; } + public decimal? CHUHUO { get; set; } + public decimal? JIECUN { get; set; } + public decimal? PRICE { get; set; } + public decimal? AMOUNT { get; set; } + public DateTime? INDATE { get; set; } + public int? DAYS { get; set; } + public decimal? STORAGEUNITCOUNT { get; set; } + } } \ No newline at end of file diff --git a/DSWeb.Common/DB/CommonDataContext.cs b/DSWeb.Common/DB/CommonDataContext.cs index fa0d3911..be8d5c6d 100644 --- a/DSWeb.Common/DB/CommonDataContext.cs +++ b/DSWeb.Common/DB/CommonDataContext.cs @@ -44,6 +44,7 @@ namespace DSWeb.Common.DB public DbSet ch_fee_invoice { get; set; } public DbSet ch_fee_invoicedetail { get; set; } public DbSet code_goods_inv { get; set; } + public DbSet code_goods { get; set; } public DbSet ch_fee_do { get; set; } public DbSet ch_fee_payapplication { get; set; } @@ -132,8 +133,8 @@ namespace DSWeb.Common.DB public DbSet VW_COMPANYDEPT_SETTLEMENT { get; set; } public DbSet code_fee_templatedetail { get; set; } + public DbSet OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL { get; set; } - } diff --git a/DSWeb.Common/DB/EDIFTPInfo.cs b/DSWeb.Common/DB/EDIFTPInfo.cs index 57daaa68..5138ab34 100644 --- a/DSWeb.Common/DB/EDIFTPInfo.cs +++ b/DSWeb.Common/DB/EDIFTPInfo.cs @@ -73,14 +73,14 @@ namespace DSWeb.Common.DB public string CTNCODE { get; set; } public string SIZE { get; set; } public string CTN { get; set; } - public int? CTNNUM { get; set; } - public int? TEU { get; set; } + public int? CTNNUM { get; set; } = 0; + public int? TEU { get; set; } = 0; public string CTNALL { get; set; } public string CNTRNO { get; set; } public string SEALNO { get; set; } - public int PKGS { get; set; } - public decimal? KGS { get; set; } - public decimal? CBM { get; set; } + public int PKGS { get; set; } = 0; + public decimal? KGS { get; set; } = 0; + public decimal? CBM { get; set; } = 0; public string REMARK { get; set; } public string KINDPKGS { get; set; } public decimal? TAREWEIGHT { get; set; } @@ -94,17 +94,17 @@ namespace DSWeb.Common.DB public string WEIGHDATE { get; set; } public string MASTERNO { get; set; } public string TRUCKER { get; set; } - public decimal? TRUCKFEE { get; set; } - public int? FREESTORAGEDAY { get; set; } - public int? STORAGEDAY { get; set; } - public decimal? STORAGEPRICE { get; set; } - public decimal? STORAGEFEE { get; set; } - public int? FREECTNDAY { get; set; } - public int? CTNDAY { get; set; } - public decimal? CTNPRICE { get; set; } - public decimal? CTNFEE { get; set; } + public decimal? TRUCKFEE { get; set; } = 0; + public int? FREESTORAGEDAY { get; set; } = 0; + public int? STORAGEDAY { get; set; } = 0; + public decimal? STORAGEPRICE { get; set; } = 0; + public decimal? STORAGEFEE { get; set; } = 0; + public int? FREECTNDAY { get; set; } = 0; + public int? CTNDAY { get; set; } = 0; + public decimal? CTNPRICE { get; set; } = 0; + public decimal? CTNFEE { get; set; } = 0; public string TRUCKNO { get; set; } - public string vgmconncom { get; set; } + public string vgmconncom { get; set; } = ""; public string VGMADDR { get; set; } public string VGMEMAIL { get; set; } public string MTMC { get; set; } diff --git a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs index 644364a2..056622c8 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_invoiceapplication/Chfee_InvoiceapplicationDAL.cs @@ -421,7 +421,7 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Invoiceapplication } else { - strSql.Append(" order by b.MBLNO"); + strSql.Append(" order by c.CREATETIME, b.MBLNO"); } return BodySetData(strSql); diff --git a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs index a21a5866..77286bfe 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_payapplication/Chfee_PayapplicationDAL.cs @@ -440,8 +440,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Payapplication } else { - //strSql.Append(" order by C.CREATETIME,b.ETD,b.MBLNO "); - strSql.Append(" order by b.ETD,b.MBLNO,C.CREATETIME "); + strSql.Append(" order by C.CREATETIME,b.ETD,b.MBLNO "); + //strSql.Append(" order by b.ETD,b.MBLNO,C.CREATETIME "); } diff --git a/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs b/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs index 06dbf83e..02afbaec 100644 --- a/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs +++ b/DSWeb/Areas/Account/DAL/Chfee_recvapplication/Chfee_RecvapplicationDAL.cs @@ -22,6 +22,7 @@ using DSWeb.Areas.Account.DAL.Chfee_Settlement; using Renci.SshNet; using System.Web; using System.Web.Mvc; +using DSWeb.MvcShipping.Models.CodeStlMode; namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication { @@ -55,6 +56,8 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication strSql.Append(",(select ShowName from [user] where GID=cm.APPLICANT) as APPLICANTNAME"); strSql.Append(",cm.SALECORPID,(select [NAME] from [company] where GID=cm.SALECORPID) as SALECORP"); + strSql.Append(",isnull((select top 1 STLNAME from code_stlmode where stlcode=SETTLETYPE),'') SETTLETYPEREF"); + strSql.Append(" FROM ch_fee_recvapplication cm where 1=1 "); if (!string.IsNullOrEmpty(strCondition)) @@ -88,6 +91,10 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication { var headList = new List(); Database db = DatabaseFactory.CreateDatabase(); + + //var 结算方式列表 = MsBaseInfoDAL.GetStlModeList("", ""); + + using (IDataReader reader = db.ExecuteReader(CommandType.Text, strSql.ToString())) { while (reader.Read()) @@ -146,6 +153,9 @@ namespace DSWeb.Areas.Account.DAL.Chfee_Recvapplication data.SALECORP = Convert.ToString(reader["SALECORP"]); data.SALECORPID = Convert.ToString(reader["SALECORPID"]); + + data.SETTLETYPEREF = Convert.ToString(reader["SETTLETYPEREF"]); + #endregion headList.Add(data); } diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js index 73b65211..08bfb846 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoiceapplication/ChInvoiceapplicationAudit.js @@ -799,7 +799,16 @@ Ext.extend(Shipping.ChInvoiceapplicationAudit, Ext.Panel, { } }], scope: this - }], + } + , '-', { + text: "查看仓储费明细", + //iconCls: "btnreturn", + handler: function (button, event) { + this.ShowCCFDetail(); + }, + scope: this + } + ], columns: this.girdbillcolums }); @@ -1708,7 +1717,111 @@ Ext.extend(Shipping.ChInvoiceapplicationAudit, Ext.Panel, { ret[2] = this.SelectedRecord; ret[3] = INVOICEPORT; return ret; - } + }, + + ShowCCFDetail: function () { + + //20231220 查看选中的仓储费明细 + + var selectedRecords = this.gridListdetail.selModel.getSelection(); + + if (selectedRecords.length > 0) { + var rec = selectedRecords[0]; + + var GID = rec.data.FEEID; + title = "仓储费明细[" + rec.data.MBLNO + "]"; + + + model = Ext.define('OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL_md', { + extend: 'Ext.data.Model', + idProperty: 'GID', + fields: [ + { name: 'GID', type: 'string' }, + { name: 'FEEDATE', type: 'string' }, + { name: 'QICHU', type: 'string' }, + { name: 'JINHUO', type: 'string' }, + { name: 'CHUHUO', type: 'string' }, + { name: 'JIECUN', type: 'string' }, + { name: 'STORAGEUNITCOUNT', type: 'decimal' }, + { name: 'PRICE', type: 'string' }, + { name: 'AMOUNT', type: 'decimal' }, + { name: 'INDATE', type: 'string' }, + { name: 'DAYS', type: 'string' } + ] + }); + + proxyUrl = '/MvcShipping/MsOpBill/GetCCFDetail'; + + condition = GID; + + columns = [ + { + sortable: true, hidden: true, + dataIndex: 'GID', + header: 'GID', + width: 120 + }, { + sortable: true, + dataIndex: 'FEEDATE', + header: '费用日期', + width: 120 + }, { + sortable: true, + dataIndex: 'QICHU', + header: '期初', + width: 80 + }, { + sortable: true, + dataIndex: 'JINHUO', + header: '进货', + width: 80 + }, { + dataIndex: 'CHUHUO', + header: '出货', + width: 90 + }, { + dataIndex: 'JIECUN', + header: '结存', + width: 90 + }, { + dataIndex: 'PRICE', + header: '价格', + width: 90 + }, { + dataIndex: 'STORAGEUNITCOUNT', + header: '计费数量', + summaryType: 'sum', + summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + value = usMoney(value, 6, '', true); + return value; + }, + width: 90 + }, { + dataIndex: 'AMOUNT', + header: '金额', + summaryType: 'sum', + summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + value = usMoney(value, 2, '', true); + return value; + }, + width: 90 + }, { + dataIndex: 'INDATE', + header: '最初入库', + width: 120 + }, { + dataIndex: 'DAYS', + header: '堆存天数', + width: 90 + } + ]; + + ShowPublicINFO(title, model, proxyUrl, condition, columns, 1000, 700); + } else { + return; + } + + }, }); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js index ca958e9e..1e12ce0f 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationBLEdit.js @@ -249,7 +249,7 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { items: [ {//fieldset 1 - xtype: 'fieldset', + xtype: 'container',//fieldset defaultType: 'textfield', layout: 'anchor', defaults: { @@ -759,7 +759,16 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { } }], scope: this - }], + } + , '-', { + text: "查看仓储费明细", + //iconCls: "btnreturn", + handler: function (button, event) { + this.ShowCCFDetail(); + }, + scope: this + } + ], columns: this.girdbillcolums }); @@ -1412,6 +1421,7 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { queryMode: 'remote', forceSelection: true, minChars: 1, + flex:1, queryParam: 'CODENAME', name: 'CUSTNAME', valueField: 'CustName', @@ -1586,6 +1596,23 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { } } }); + + this.StoreFeeINPUTMODE = Ext.create('Ext.data.Store', { + fields: ['Frt'] + }); + this.StoreFeeINPUTMODE.add({ "Frt": "月结" }); + this.StoreFeeINPUTMODE.add({ "Frt": "现结" }); + + this.comboxFeeINPUTMODE = Ext.create('DsExt.ux.RefTableCombox', { + fieldLabel: '结算账期', + flex: 1, + store: this.StoreFeeINPUTMODE, + forceSelection: true, + name: 'INPUTMODE', + valueField: 'Frt', + displayField: 'Frt' + }); + //#endregion @@ -1691,12 +1718,14 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { scope: this } ] - }, { + } + + , { xtype: 'container', layout: 'hbox', defaultType: 'textfield', items: [this.comboxaddDCType, this.comboxCurr2, this.comboxFeeNameRef, { - fieldLabel: '会计期间', + fieldLabel: '从..会计期间', xtype: 'monthfield', name: 'ACCDATEFR', enableKeyEvents: true, @@ -1708,7 +1737,7 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { } } }, { - fieldLabel: '会计期间', + fieldLabel: '到..会计期间', xtype: 'monthfield', name: 'ACCDATETO', enableKeyEvents: true, @@ -1741,7 +1770,101 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { scope: this } ] - } + } + + , { + xtype: 'container', + layout: 'hbox', + defaultType: 'textfield', + items: [ + this.comboxFeeINPUTMODE + //, { + // fieldLabel: '1', + // name: 'DuiNo', + // enableKeyEvents: true, + // listeners: { + // specialkey: function (field, e) { + // if (e.getKey() == e.ENTER) { + // _this.onRefreshClick(); + // } + // } + // } + //} + //, { + // fieldLabel: '2', + // name: 'DuiNo', + // enableKeyEvents: true, + // listeners: { + // specialkey: function (field, e) { + // if (e.getKey() == e.ENTER) { + // _this.onRefreshClick(); + // } + // } + // } + //} + //, { + // fieldLabel: '3', + // name: 'DuiNo', + // enableKeyEvents: true, + // listeners: { + // specialkey: function (field, e) { + // if (e.getKey() == e.ENTER) { + // _this.onRefreshClick(); + // } + // } + // } + //} + //, { + // fieldLabel: '4', + // name: 'DuiNo', + // enableKeyEvents: true, + // listeners: { + // specialkey: function (field, e) { + // if (e.getKey() == e.ENTER) { + // _this.onRefreshClick(); + // } + // } + // } + //} + //, { + // fieldLabel: '5', + // name: 'DuiNo', + // enableKeyEvents: true, + // listeners: { + // specialkey: function (field, e) { + // if (e.getKey() == e.ENTER) { + // _this.onRefreshClick(); + // } + // } + // } + //} + , { + xtype: 'hiddenfield', + flex: 1 + } + , { + xtype: 'hiddenfield', + flex: 1 + } + , { + xtype: 'hiddenfield', + flex: 1 + } + , { + xtype: 'hiddenfield', + flex: 1 + } + , { + xtype: 'hiddenfield', + flex: 1 + } + , { + xtype: 'label', + width: 60, + text: "" + } + ] + } ]//end items(fieldset 1) }//end fieldset 1 ]//end root items @@ -1832,7 +1955,7 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { this.panelTop = new Ext.Panel({ layout: "border", region: "north", - height: 160, + height: 150, items: [this.panelBtn, this.formEdit] }); @@ -2251,7 +2374,109 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { this.deleteBill(); }, //end onAddDetailClick + ShowCCFDetail: function () { + //20231220 查看选中的仓储费明细 + + //var selectedRecords = this.gridListdetail.selModel.getSelection(); + var selectedRecords = this.gridList.selModel.getSelection(); + if (selectedRecords.length > 0) { + var rec = selectedRecords[0]; + + var GID = rec.data.FEEID; + title = "仓储费明细[" + rec.data.MBLNO + "]"; + + + model = Ext.define('OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL_md', { + extend: 'Ext.data.Model', + idProperty: 'GID', + fields: [ + { name: 'GID', type: 'string' }, + { name: 'FEEDATE', type: 'string' }, + { name: 'QICHU', type: 'string' }, + { name: 'JINHUO', type: 'string' }, + { name: 'CHUHUO', type: 'string' }, + { name: 'JIECUN', type: 'string' }, + { name: 'STORAGEUNITCOUNT', type: 'decimal' }, + { name: 'PRICE', type: 'string' }, + { name: 'AMOUNT', type: 'decimal' }, + { name: 'INDATE', type: 'string' }, + { name: 'DAYS', type: 'string' } + ] + }); + + proxyUrl = '/MvcShipping/MsOpBill/GetCCFDetail'; + + condition = GID; + + columns = [ + { + sortable: true, hidden: true, + dataIndex: 'GID', + header: 'GID', + width: 120 + }, { + sortable: true, + dataIndex: 'FEEDATE', + header: '费用日期', + width: 120 + }, { + sortable: true, + dataIndex: 'QICHU', + header: '期初', + width: 80 + }, { + sortable: true, + dataIndex: 'JINHUO', + header: '进货', + width: 80 + }, { + dataIndex: 'CHUHUO', + header: '出货', + width: 90 + }, { + dataIndex: 'JIECUN', + header: '结存', + width: 90 + }, { + dataIndex: 'PRICE', + header: '价格', + width: 90 + }, { + dataIndex: 'STORAGEUNITCOUNT', + header: '计费数量', + summaryType: 'sum', + summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + value = usMoney(value, 6, '', true); + return value; + }, + width: 90 + }, { + dataIndex: 'AMOUNT', + header: '金额', + summaryType: 'sum', + summaryRenderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + value = usMoney(value, 2, '', true); + return value; + }, + width: 90 + }, { + dataIndex: 'INDATE', + header: '最初入库', + width: 120 + }, { + dataIndex: 'DAYS', + header: '堆存天数', + width: 90 + } + ]; + + ShowPublicINFO(title, model, proxyUrl, condition, columns, 1000, 700); + } else { + return; + } + + }, gridAddFeeListAfterEdit: function (editor, e, eOpts) { //需要自己实现里面的事件 if (e.value == e.originalValue) return; @@ -3283,6 +3508,9 @@ Ext.extend(Shipping.MsChRecvapplicationBLEdit, Ext.Panel, { var ACCDATETO = form.findField('ACCDATETO').getRawValue(); sql = sql + getAndConSql(sql, ACCDATETO, "b.ACCDATE<='" + ACCDATETO + "'"); + var INPUTMODE = form.findField('INPUTMODE').getRawValue(); + sql = sql + getAndConSql(sql, INPUTMODE, "f.INPUTMODE='" + INPUTMODE + "'"); + var feesql = ' '; diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationIndex.js b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationIndex.js index 5b69dd3c..e2a9c346 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationIndex.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationIndex.js @@ -45,6 +45,59 @@ Ext.extend(Shipping.MsChRecvapplicationIndex, Ext.Panel, { }); _this = this; + + Ext.define('MsCompanysEntity', { + extend: 'Ext.data.Model', + idProperty: 'GID', + fields: [ + { name: 'GID', type: 'string' }, //GID + { name: 'CODENAME', type: 'string' }, //CODENAME + { name: 'NAME', type: 'string' }, //NAME + { name: 'FULLNAME', type: 'string' }, //FULLNAME + { name: 'ENNAME', type: 'string' }, //公司英文名称 + { name: 'ADDRESS', type: 'string' }, //ADDRESS + { name: 'ENADDRESS', type: 'string' }, //公司英文地址 + { name: 'POSTCODE', type: 'string' }, //POSTCODE + { name: 'OFFICEPHONE', type: 'string' }, //OFFICEPHONE + { name: 'FAX', type: 'string' }, //FAX + { name: 'EMAIL', type: 'string' }, //EMAIL + { name: 'WEBSITEURL', type: 'string' }, //WEBSITEURL + { name: 'LICENSECODE', type: 'string' }, //LICENSECODE + { name: 'TAXCODE', type: 'string' }, //TAXCODE + //{name: 'LOGO', type: 'byte[]' }, //徽标 + { name: 'CREATEUSER', type: 'string' }, //CREATEUSER + { name: 'CREATETIME', type: 'DateTime' }, //CREATETIME + { name: 'MODIFIEDUSER', type: 'string' }, //更新人gid + { name: 'MODIFIEDTIME', type: 'DateTime' }, //更新时间 + { name: 'ISDELETED', type: 'bool' }, //ISDELETED + { name: 'ISDISABLE', type: 'bool' }, //ISDISABLE + { name: 'PARENTID', type: 'string' }, //PARENTID + { name: 'BILLRISES', type: 'string' }, //发票抬头 + { name: 'CHEQUEPAYABLE', type: 'string' }, //支票抬头 + { name: 'PRTHEADXML1', type: 'string' }, //打印抬头1 + { name: 'PRTHEADXML2', type: 'string' }, //打印抬头2 + { name: 'PRTHEADXML3', type: 'string' }, //打印抬头3 + { name: 'PRTHEADXML4', type: 'string' }, //打印抬头4 + { name: 'PRTHEADXML5', type: 'string' }, //打印抬头5 + { name: 'BANKSHEAD', type: 'string' }, //BANKSHEAD + { name: 'LOCALCURR', type: 'string' }, //本地货币 + { name: 'WORKFLOWMSG', type: 'string' }, //是否启用消息提示 + { name: 'GPSUSER', type: 'string' }, //GPSUser + { name: 'GPSPASSWORD', type: 'string' }, //GPSPassWord + { name: 'ORGANIZATIONCODE', type: 'string' }, + { name: 'MODIFIEDUSERNAME', type: 'string' }, + { name: 'DBNAME', type: 'string' }, + { name: 'LOGOURL', type: 'string' } + ] + }); + this.storeSaleCompany = Ext.create('DsExt.ux.RefTableStore', { + model: 'MsCompanysEntity', + proxy: { url: '/MvcShipping/MsCompanys/GetNoPicDataList' }, + //async: false + }); + this.storeSaleCompany.load({ params: { condition: "" } }); + + //#endregion //#region 定义Grid @@ -67,12 +120,15 @@ Ext.extend(Shipping.MsChRecvapplicationIndex, Ext.Panel, { }); this.GridCheckBoxModel = Ext.create('Ext.selection.CheckboxModel'); - this.initgirdcolums = [{ + this.initgirdcolums = [ + + { sortable: true, dataIndex: 'BILLNO', header: '申请单号', width: 120 - }, { + } + , { sortable: true, dataIndex: 'BILLSTATUSREF', header: '状态', @@ -168,8 +224,42 @@ Ext.extend(Shipping.MsChRecvapplicationIndex, Ext.Panel, { dataIndex: 'REMARK', header: '备注', width: 160 - } - ]; + }, { + sortable: true, + dataIndex: 'SETTLETYPEREF', + header: '结算方式', + width: 90 + }, { + sortable: true, + dataIndex: 'SALECORPID', + header: '所属分部', + width: 90, + renderer: function (value, cellmeta, record, rowIndex, columnIndex, store) { + + //_this.storeSaleCompany.each(function (record) { + // //console.log(record.data['fieldName']); // 'fieldName' 为字段名称,可以根据需要进行修改 + // if (record.data['GID'] == value) { + // var _name = record.data['NAME']; + // return _name; + // } + //}); + //return "青岛金港"; + var _r = ""; + for (var i = 0; i < _this.storeSaleCompany.getCount(); i++) { + + var recored = _this.storeSaleCompany.getAt(i); + + //jsonArray.push(record.get('ORGID')); + if (recored.data['GID'] == value) { + _r = recored.data['NAME'] + ""; + } + + } + return _r; + }, + align: 'left', + } + ]; this.girdcolums = this.initgirdcolums; diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationModel.js b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationModel.js index 2c2bb10a..e0fa9413 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationModel.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_recvapplication/ChRecvapplicationModel.js @@ -2,42 +2,45 @@ extend: 'Ext.data.Model', idProperty: 'GID', fields: [ - { name: 'GID', type: 'string' }, - { name: 'BILLNO', type: 'string' }, - { name: 'BILLSTATUS', type: 'string' }, - { name: 'BILLSTATUSREF', type: 'string' }, - { name: 'CUSTOMERNAME', type: 'string' }, - { name: 'INVOICETITLE', type: 'string' }, - { name: 'SETTLETYPE', type: 'number' }, - { name: 'SETTLETYPEREF', type: 'string' }, - { name: 'RECVTIME', type: 'string' }, - { name: 'CURR', type: 'string' }, - { name: 'AMOUNTRMB', type: 'number' }, - { name: 'AMOUNTUSD', type: 'number' }, - { name: 'ACCOUNT', type: 'string' }, - { name: 'ACCOUNTREF', type: 'string' }, - { name: 'RATE', type: 'number' }, - { name: 'SETTLERMB', type: 'number' }, - { name: 'SETTLEUSD', type: 'number' }, - { name: 'SETTLERATE', type: 'number' }, - { name: 'APPLYTIME', type: 'string' }, - { name: 'ENTERTIME', type: 'string' }, - { name: 'SETTLETIME', type: 'string' }, - { name: 'AUDITTIME', type: 'string' }, - { name: 'APPLICANT', type: 'string' }, - { name: 'APPLICANTNAME', type: 'string' }, - { name: 'SETTLEUSER', type: 'string' }, - { name: 'AUDITUSER', type: 'string' }, + { name: 'GID', type: 'string' }, + { name: 'BILLNO', type: 'string' }, + { name: 'BILLSTATUS', type: 'string' }, + { name: 'BILLSTATUSREF', type: 'string' }, + { name: 'CUSTOMERNAME', type: 'string' }, + { name: 'INVOICETITLE', type: 'string' }, + { name: 'SETTLETYPE', type: 'number' }, + { name: 'SETTLETYPEREF', type: 'string' }, + { name: 'RECVTIME', type: 'string' }, + { name: 'CURR', type: 'string' }, + { name: 'AMOUNTRMB', type: 'number' }, + { name: 'AMOUNTUSD', type: 'number' }, + { name: 'ACCOUNT', type: 'string' }, + { name: 'ACCOUNTREF', type: 'string' }, + { name: 'RATE', type: 'number' }, + { name: 'SETTLERMB', type: 'number' }, + { name: 'SETTLEUSD', type: 'number' }, + { name: 'SETTLERATE', type: 'number' }, + { name: 'APPLYTIME', type: 'string' }, + { name: 'ENTERTIME', type: 'string' }, + { name: 'SETTLETIME', type: 'string' }, + { name: 'AUDITTIME', type: 'string' }, + { name: 'APPLICANT', type: 'string' }, + { name: 'APPLICANTNAME', type: 'string' }, + { name: 'SETTLEUSER', type: 'string' }, + { name: 'AUDITUSER', type: 'string' }, { name: 'COMPANYID', type: 'string' }, { name: 'SALECORP', type: 'string' }, { name: 'SALECORPID', type: 'string' }, { name: 'PRINTCOUNT', type: 'number' }, - { name: 'INVOICENUMREMARK', type: 'string' }, - { name: 'PREAMOUNTRMB', type: 'number' }, - { name: 'PREAMOUNTUSD', type: 'number' }, - { name: 'BALAMOUNTRMB', type: 'number' }, - { name: 'BALAMOUNTUSD', type: 'number' }, - { name: 'REMARK', type: 'string' } - ] + { name: 'INVOICENUMREMARK', type: 'string' }, + { name: 'PREAMOUNTRMB', type: 'number' }, + { name: 'PREAMOUNTUSD', type: 'number' }, + { name: 'BALAMOUNTRMB', type: 'number' }, + { name: 'BALAMOUNTUSD', type: 'number' }, + { name: 'REMARK', type: 'string' }, + { name: 'SETTLETYPEREF', type: 'string' } + + + ] }); diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayInvsettlementEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayInvsettlementEdit.js index b8fd5072..e381ec96 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayInvsettlementEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_settlement/ChPayInvsettlementEdit.js @@ -13,7 +13,7 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, { StoreList: null, EditRecord: null, addstore: false, - PageSize: 30, + PageSize: 100, initUIComponents: function () { this.serialNo = 0; @@ -923,7 +923,7 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, { enableHdMenu: false, region: 'west', split: true, - width: 860, + width: 1010, loadMask: { msg: Zi.LAN.LoadData }, trackMouseOver: true, disableSelection: false, @@ -1360,7 +1360,28 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, { } } } - }, this.comboxSALECORPID, { + }, { + fieldLabel: "金额", + xtype: 'numberfield', + keyNavEnabled: false, + allowDecimals: true, + decimalPrecision: 2, + selectOnFocus: true, + mouseWheelEnabled: false, + enableKeyEvents: true, + name: 'AMOUNT', + //enableKeyEvents: true, + listeners: { + specialkey: function (field, e) { + if (e.getKey() == e.ENTER) { + _this.onRefreshClick(); + } + } + } + } + + + , this.comboxSALECORPID, { xtype: 'button', width: 90, text: Zi.LAN.SearchOrRefresh, @@ -1513,7 +1534,7 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, { this.paneldetail = new Ext.Panel({ // title: '结算明细', layout: "border", - height: 260, + height: 230, region: "north", split: true, items: [ @@ -2693,7 +2714,11 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, { this.storeAddFeeList.on('load', function (store, records) { if (store.getCount() > 0) { - this.gridAddFeeList.getSelectionModel().select(0); + + if (store.getCount() == 1) + { + this.gridAddFeeList.getSelectionModel().select(0); + } } else { this.storeAddBodydetail.load({ params: { condition: " BILLNO='XX'"} }); @@ -4215,12 +4240,11 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, { var sql = ''; - var customNo = form.findField('CustomNo').getValue(); +/* var customNo = form.findField('CustomNo').getValue(); sql = sql + getAndConSql(sql, customNo, " BILLNO='" + customNo + "'"); - - - - +*/ + var customNo = form.findField('CustomNo').getValue(); + sql = sql + getAndConSql(sql, customNo, " (BILLNO like '%" + customNo + "%' or INVNO like '%" + customNo + "%')"); var CUSTNAME = form.findField('CUSTNAME').getValue(); @@ -4245,6 +4269,9 @@ Ext.extend(Shipping.MsChPayInvSettlementEdit, Ext.Panel, { sql = sql + getAndConSql(sql, InvHead, "INVOICECUSTNAME like '%" + InvHead + "%'"); + var AMOUNT = form.findField('AMOUNT').getRawValue(); + sql = sql + getAndConSql(sql, AMOUNT, "AMOUNT = " + AMOUNT + ""); + // this.FeeSqlStr = this.getFeeCondition(); // feesql = feesql + getAndConSql(feesql, this.FeeSqlStr, this.FeeSqlStr); diff --git a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs index 162dca3d..e4e7b658 100644 --- a/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs +++ b/DSWeb/Areas/CommMng/DAL/BasicDataRefDAL.cs @@ -5135,16 +5135,17 @@ namespace DSWeb.Areas.CommMng.DAL 值匹配 = false; } - if (值匹配) - { - SaveDic = paramdic; - SaveDic["recvalue"] = savevalue; - SaveRec = item; - SaveRec.PROPVALUE = DicToStr(SaveDic); - cdc.OP_LOGICINFO.AddOrUpdate(SaveRec); - cdc.SaveChanges(); - break; - } + } + + if (值匹配) + { + SaveDic = paramdic; + SaveDic["recvalue"] = savevalue; + SaveRec = item; + SaveRec.PROPVALUE = DicToStr(SaveDic); + cdc.OP_LOGICINFO.AddOrUpdate(SaveRec); + cdc.SaveChanges(); + break; } } @@ -5155,8 +5156,17 @@ namespace DSWeb.Areas.CommMng.DAL } else { + //SaveLogicInfo("模块字段值最近取值", PROPNAME, paramdic); + SaveDic = paramdic; + SaveDic["recvalue"] = savevalue; + SaveRec = new OP_LOGICINFO_md(); + SaveRec.GID = Guid.NewGuid(); + SaveRec.BSNO = "模块字段值最近取值"; + SaveRec.PROPNAME = "OP_OTHER"; + SaveRec.PROPVALUE = DicToStr(SaveDic); + cdc.OP_LOGICINFO.AddOrUpdate(SaveRec); + cdc.SaveChanges(); - SaveLogicInfo("模块字段值最近取值", PROPNAME, paramdic); } } diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs index d85c1967..f643a205 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpApplyController.cs @@ -33,6 +33,9 @@ using DSWeb.Areas.MvcShipping.Models.Message.VGM; using DSWeb.Common.DB; using DSWeb.Areas.MvcShipping.Helper; using DSWeb.SoftMng.BLL; +using DSWeb.MvcShipping.DAL.MsCodeGoods; +using DSWeb.SoftMng.Model; +using DSWeb.MvcShipping.DAL.MsCodeCtnSet; namespace DSWeb.MvcShipping.Controllers { @@ -171,13 +174,23 @@ namespace DSWeb.MvcShipping.Controllers private readonly DecListBLL lbll = new DecListBLL(); private readonly DecHeadBLL hbll = new DecHeadBLL(); - public ContentResult GetOpseaiData(string handle, string condition) + private readonly ContainerBLL cbll = new ContainerBLL(); + + /// + /// 引入报关信息/从报关业务引入 + /// + /// + /// + /// + public ContentResult GetOpseaiData(string data, string data2, string data3, string handle, string condition) { MsOpApply_Opseai head = null; if (handle == "edit") { + var headData = JsonConvert.Deserialize(data.Replace("}", "") + data2.Replace("{", ",").Replace("}", ",") + data3.Replace("{", ""));//需 + var applylist = MsOpApplyDAL.GetDataAll(condition); if (applylist!=null && applylist.Count > 1) { var json0 = JsonConvert.Serialize( @@ -187,8 +200,13 @@ namespace DSWeb.MvcShipping.Controllers head = AutoMapperHelper.MapTo(applylist[0]); + var dechead = new DecHead(); + var Declist = new List(); + var decCtn = new List(); + var BodyList = MsOpApplyDAL.GetBodyList(" BsNo='" + head.BSNO + "'"); + if (BodyList != null && BodyList.Count > 0) { head.商品名称 = BodyList[0].GoodsName; @@ -202,15 +220,46 @@ namespace DSWeb.MvcShipping.Controllers var decheadList = hbll.GetModelList(" BSNO='" + head.BSNO + "'"); if (decheadList != null && decheadList.Count > 0) { - var dechead = decheadList[0]; - var Declist = lbll.GetModelList(0, 99, "PID='" + dechead.GID + "'", String.Format("{0}", "CONVERT(int, gno)", "")); + dechead = decheadList[0]; + Declist = lbll.GetModelList(0, 99, "PID='" + dechead.GID + "'", String.Format("{0}", "CONVERT(int, gno)", "")); if (Declist != null && Declist.Count > 0) { head.商品名称 = Declist[0].GName; head.单价 = Declist[0].DeclPrice.ToString(); head.REMARK2 = Declist[0].GoodsModel ; } + + decCtn = cbll.GetModelList("PID='" + dechead.GID + "'"); + } + } + + if (!string.IsNullOrWhiteSpace(headData.BSNO)) { + //根据报关业务的商品明细 添加进口业务的商品明细 + + //var cdc = new CommonDataContext(); + //var codectn = cdc.CODE_CTN.Where(x => 1 == 1).ToList(); + //商品信息 + if (BodyList != null && BodyList.Count > 0) { + + //foreach (var item in BodyList) { + // //var newctn = AutoMapperHelper.MapTo(item); + // //newctn.CTN_ID = Guid.NewGuid().ToString(); + // //newctn.BSNO = headData.BSNO; + + // //if(codectn.Exists(x=>x.CTN==)) + + // //cdc.OP_CTN.Add(newctn); + //} + + //cdc.SaveChanges(); + + foreach (var item in BodyList) + { + MsCodeGoodsDAL.AddCodeGoods(item.GoodsName, item.GoodsCode); + } } + + } } @@ -223,12 +272,72 @@ namespace DSWeb.MvcShipping.Controllers head.CDNTYPE = 0; } + + var json = JsonConvert.Serialize( new { Success = true, Message = "查询成功", data = head }); return new ContentResult() { Content = json }; } + public ContentResult GetAndSaveOpseaiData(string handle, string condition) + { + + MsOpApply_Opseai head = null; + + if (handle == "edit") + { + var applylist = MsOpApplyDAL.GetDataAll(condition); + if (applylist != null && applylist.Count > 1) + { + var json0 = JsonConvert.Serialize( + new { Success = false, Message = "根据提单号和报关单号对应到多于一个报关业务,请确认填写的信息是否正确。" }); + return new ContentResult() { Content = json0 }; + } + + head = AutoMapperHelper.MapTo(applylist[0]); + + var BodyList = MsOpApplyDAL.GetBodyList(" BsNo='" + head.BSNO + "'"); + + if (BodyList != null && BodyList.Count > 0) + { + head.商品名称 = BodyList[0].GoodsName; + head.单价 = BodyList[0].Price.ToString(); + head.REMARK2 = BodyList[0].GOODSMODEL; + } + else + { + + + var decheadList = hbll.GetModelList(" BSNO='" + head.BSNO + "'"); + if (decheadList != null && decheadList.Count > 0) + { + var dechead = decheadList[0]; + var Declist = lbll.GetModelList(0, 99, "PID='" + dechead.GID + "'", String.Format("{0}", "CONVERT(int, gno)", "")); + if (Declist != null && Declist.Count > 0) + { + head.商品名称 = Declist[0].GName; + head.单价 = Declist[0].DeclPrice.ToString(); + head.REMARK2 = Declist[0].GoodsModel; + } + } + } + } + + if (head == null) + { + head = new MsOpApply_Opseai(); + head.OP = Convert.ToString(Session["SHOWNAME"]); + head.BSTYPE = "2"; + head.ETPS_CATEGORY = "A"; + head.CDNTYPE = 0; + } + + + var json = JsonConvert.Serialize( + new { Success = true, Message = "查询成功", data = head }); + return new ContentResult() { Content = json }; + } public ContentResult GetCopyData(string handle, string condition, string copyfee = "false") { diff --git a/DSWeb/Areas/MvcShipping/Controllers/MsOpBillController.cs b/DSWeb/Areas/MvcShipping/Controllers/MsOpBillController.cs index 00dbf866..0a1bd046 100644 --- a/DSWeb/Areas/MvcShipping/Controllers/MsOpBillController.cs +++ b/DSWeb/Areas/MvcShipping/Controllers/MsOpBillController.cs @@ -17,6 +17,7 @@ using HcUtility.Core; using DSWeb.Areas.CommMng.DAL; using DSWeb.Areas.RptMng.Comm; using DSWeb.MvcShipping.DAL.MsSysParamSet; +using DSWeb.MvcShipping.DAL.BillCheckOut; namespace DSWeb.MvcShipping.Controllers { @@ -208,6 +209,31 @@ namespace DSWeb.MvcShipping.Controllers return new ContentResult() { Content = json }; } + #region 查询指定的 仓储费 的计算明细 + + /// + /// 查询指定的 仓储费 的计算明细 + /// + /// \ + /// 原理是:ch_fee.BXGID 记录 OP_WMS_FEEDUI_STORAGE.WMSDUIID(仓储费对账单ID) + /// ch_fee.F_NO记录这票货的提单号 + /// OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL当中,WMSDUIID对应的, + /// + public ContentResult GetCCFDetail(string condition) + { + var canlogin = BasicDataRefDAL.CheckLogin(Session); + if (!canlogin.Success) + { + return (ContentResult)canlogin.Data; + } + + var data = MsOpBillDAL.GetCCFDetail(condition); + + var json = JsonConvert.Serialize(new { Success = true, Message = "查询成功", totalCount = data.Count, data = data }); + return new ContentResult() { Content = json }; + } + + #endregion } } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsChDui/MsChDuiDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsChDui/MsChDuiDAL.cs index 18af0d9c..5a0bd28f 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsChDui/MsChDuiDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsChDui/MsChDuiDAL.cs @@ -296,12 +296,12 @@ namespace DSWeb.MvcShipping.DAL.MsChDui } else { - strSql.Append(" order by ETD,MBLNO "); + strSql.Append(" order by DB_ID "); } - strSql.Append(@") as num ,v.* from ("); + strSql.Append(@" ) as num ,v.* from ( "); // strSql.Append(" "); - strSql.Append(" select d.BSNO,d.DUINO,dbo.F_GetDuiFeeStatus(d.BSNO,d.DUINO) DUIFEESTATUS"); + strSql.Append(" select d.[DB_ID], d.BSNO,d.DUINO,dbo.F_GetDuiFeeStatus(d.BSNO,d.DUINO) DUIFEESTATUS"); strSql.Append(",b.OPLB,b.OPLBNAME,b.MBLNO,b.HBLNO,b.CUSTNO,b.CUSTOMERNAME,b.VESSEL,b.VOYNO,b.ETD,b.CUSTOMNO,b.ORDERNO,b.PORTDISCHARGE"); strSql.Append(",b.ACCDATE,b.SALE,b.OP,b.CNTRTOTAL,(select [NAME] from [company] where GID=B.SALECORPID) as SALECORP"); strSql.Append(",f.RMBDR,f.RMBCR,f.RMBDR-f.STLRMBDR AS BALRMBDR,f.RMBCR-f.STLRMBCR AS BALRMBCR,f.USDDR,f.USDCR"); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs index 0027f521..7948ec88 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsChFee/MsChFeeDAL.cs @@ -7179,7 +7179,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL /// 金额 /// 数量 /// - public static ch_fee_md getChFee(string USERID, string BSNO, string CUSTOMERNAME, int FEETYPE, string FEENAME, decimal AMOUNT, string UNIT, decimal QUANTITY = 1, string SALE = "", string remark = "") + public static ch_fee_md getChFee(string USERID, string BSNO, string CUSTOMERNAME, int FEETYPE, string FEENAME, decimal AMOUNT, string UNIT, decimal QUANTITY = 1, string SALE = "", string remark = "", decimal? TAXRATE =null) { var result = getNewChfee(); result.BSNO = BSNO; @@ -7206,6 +7206,8 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL result.REMARK = remark; + result.TAXRATE = TAXRATE; + CommonDataContext cdc = new CommonDataContext(); var codefeelist = cdc.code_fee.Where(x => 1 == 1).ToList(); @@ -7257,7 +7259,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL return result; } - public static DBResult MakeNewFee(string USERID, string BSNO, string CUSTOMERNAME, string CUSTOMERTYPE, int FEETYPE, string FEENAME, decimal AMOUNT,string UNIT, decimal QUANTITY = 1,string SALE="",string REMARK="",string CURRENCY="RMB") + public static DBResult MakeNewFee(string USERID, string BSNO, string CUSTOMERNAME, string CUSTOMERTYPE, int FEETYPE, string FEENAME, decimal AMOUNT,string UNIT, decimal QUANTITY = 1,string SALE="",string REMARK="",string CURRENCY="RMB",decimal? TAXRATE=null) { var result = new DBResult(); result.OK(""); @@ -7265,7 +7267,7 @@ namespace DSWeb.MvcShipping.DAL.MsChFeeDAL { if (AMOUNT != 0) { - var newfee = getChFee(USERID, BSNO, CUSTOMERNAME, FEETYPE, FEENAME, AMOUNT,UNIT, QUANTITY, SALE,REMARK); + var newfee = getChFee(USERID, BSNO, CUSTOMERNAME, FEETYPE, FEENAME, AMOUNT,UNIT, QUANTITY, SALE,REMARK, TAXRATE); CommonDataContext cdc = new CommonDataContext(); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsCodeCtnSet/MsCodeCtnSetDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsCodeCtnSet/MsCodeCtnSetDAL.cs index e8b6da8d..9f760c83 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsCodeCtnSet/MsCodeCtnSetDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsCodeCtnSet/MsCodeCtnSetDAL.cs @@ -231,5 +231,29 @@ namespace DSWeb.MvcShipping.DAL.MsCodeCtnSet int rows = db.ExecuteNonQuery(strSql.ToString(), parameters); return rows > 0; } + + + public static string GetApplyCtn(string applyctnid) { + var dic = new Dictionary + { + { "32", "40OT" }, + { "N", "40FR" }, + { "31", "20OT" }, + { "23", "20TK" }, + { "11", "40GP" }, + { "22", "20RF" }, + { "13", "40TK" }, + { "21", "20GP" }, + { "12", "40RF" } + }; + + var result = ""; + + if (dic.ContainsKey(applyctnid)) { + result = dic[applyctnid]; + } + + return result; + } } } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsCodeGoods/MsCodeGoodsDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsCodeGoods/MsCodeGoodsDAL.cs index c0412c2f..c05a3eb6 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsCodeGoods/MsCodeGoodsDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsCodeGoods/MsCodeGoodsDAL.cs @@ -6,7 +6,8 @@ using DSWeb.MvcShipping.Models.MsCodeGoods; using Microsoft.Practices.EnterpriseLibrary.Data; using DSWeb.Areas.CommMng.Models; using HcUtility.Comm; - +using DSWeb.Common.DB; +using System.Linq; namespace DSWeb.MvcShipping.DAL.MsCodeGoods { @@ -120,6 +121,43 @@ namespace DSWeb.MvcShipping.DAL.MsCodeGoods } #endregion + #region 公开方法 添加商品信息 + + public static DBResult AddCodeGoods(string GOODSNAME, string HSCODE) + { + var result = new DBResult(); + + var cdc = new CommonDataContext(); + + if (string.IsNullOrWhiteSpace(GOODSNAME) || string.IsNullOrWhiteSpace(HSCODE)) { + return result; + } + + var currinfo = cdc.code_goods.Where(x => x.GOODNAME == GOODSNAME || x.HSCODE == HSCODE).ToList(); + if (currinfo != null && currinfo.Count > 0) + { + //已有 不做操作 + result.SetErrorInfo(""); + } + else { + var newrec = new code_goods_md(); + newrec.GID = Guid.NewGuid().ToString(); + newrec.GOODNAME = GOODSNAME; + newrec.GOODCODE = HSCODE; + newrec.HSCODE = HSCODE; + newrec.CREATETIME = DateTime.Now; + cdc.code_goods.Add(newrec); + cdc.SaveChanges(); + result.OK(); + } + + return result; + + + } + + #endregion + #region 明细表 static public List GetBodyList(string strCondition, string sort = null) @@ -344,6 +382,7 @@ namespace DSWeb.MvcShipping.DAL.MsCodeGoods #endregion + #region 商品类别 static public List GetGoodsType(string strCondition, string sort = null) { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsCodeOpDef/MsCodeOpDefDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsCodeOpDef/MsCodeOpDefDAL.cs index 5c0f315d..b62643fe 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsCodeOpDef/MsCodeOpDefDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsCodeOpDef/MsCodeOpDefDAL.cs @@ -121,7 +121,11 @@ namespace DSWeb.MvcShipping.DAL.MsCodeOpDef } #endregion - + /// + /// 字段名称 下拉框 StoreField + /// + /// + /// static public List GetFieldList(string bstable) { var strSql = new StringBuilder(); diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpBill/MsOpBillDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpBill/MsOpBillDAL.cs index 2a56d67c..43ff7f06 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpBill/MsOpBillDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpBill/MsOpBillDAL.cs @@ -10,6 +10,11 @@ using DSWeb.Areas.Account.Models.Chfee_do; using DSWeb.MvcShipping.Models.MsOpHistry; using DSWeb.MvcShipping.DAL.MsSysParamSet; using DSWeb.Areas.CommMng.DAL; +using DSWeb.MvcShipping.DAL.BillCheckOut; +using Renci.SshNet; +using System.Web.Mvc; +using DSWeb.Common.DB; +using System.Linq; namespace DSWeb.Areas.MvcShipping.DAL { @@ -491,5 +496,29 @@ namespace DSWeb.Areas.MvcShipping.DAL */ #endregion + + /// + /// 查询指定的 仓储费 的计算明细 + /// + /// \ + /// 原理是:ch_fee.BXGID 记录 OP_WMS_FEEDUI_STORAGE.WMSDUIID(仓储费对账单ID) + /// ch_fee.F_NO记录这票货的提单号 + /// OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL当中,WMSDUIID对应的, + /// + public static List GetCCFDetail(string FEEID) + { + var cdc = new CommonDataContext(); + + var result = new List(); + + var chfee = cdc.ch_fee.FirstOrDefault(x => x.GID == FEEID); + + result = cdc.OP_WMS_FEEDUI_STORAGE_WUTONGDETAIL.Where(x => x.WMSDUIID == new Guid( chfee.BXGID) && x.MBLNO == chfee.F_NO).OrderBy(o => o.FEEDATE).ToList(); + + return result; + } + + + } } diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpOther/MsOpOtherDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpOther/MsOpOtherDAL.cs index d37f4e51..8bf1e2a1 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpOther/MsOpOtherDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpOther/MsOpOtherDAL.cs @@ -2043,15 +2043,29 @@ namespace DSWeb.MvcShipping.DAL.MsOpOtherDAL if (应收方案 != null && !string.IsNullOrWhiteSpace(应收方案.UNIT)) { var amount = 根据方案获取金额(应收方案, head); var quantity = 根据方案获取数量(应收方案, head); - MsChFeeDAL.MsChFeeDAL.MakeNewFee(USERID, head.BSNO, head.CUSTOMERNAME, "委托单位", 1, "陆运费", amount, 应收方案.UNIT, quantity, ""); + + var UNIT = 应收方案.UNIT; + + if (UNIT == "自然箱") { + UNIT = head.CTNALL; + } + + MsChFeeDAL.MsChFeeDAL.MakeNewFee(USERID, head.BSNO, head.CUSTOMERNAME, "委托单位", 1, "陆运费", amount, UNIT, quantity, "","","RMB", 应收方案.TAXRATE); } var 应付方案 = 获取适配的方案_应付(head); if (应付方案 != null && !string.IsNullOrWhiteSpace(应付方案.UNIT)) { + var UNIT = 应收方案.UNIT; + + if (UNIT == "自然箱") + { + UNIT = head.CTNALL; + } + var amount = 根据方案获取金额(应付方案, head); var quantity = 根据方案获取数量(应付方案, head); - MsChFeeDAL.MsChFeeDAL.MakeNewFee(USERID, head.BSNO, "车队", "车队", 2, "陆运费", amount, 应收方案.UNIT, quantity, ""); + MsChFeeDAL.MsChFeeDAL.MakeNewFee(USERID, head.BSNO, "车队", "车队", 2, "陆运费", amount, UNIT, quantity, "", "", "RMB", 应付方案.TAXRATE); } return result; diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js index 156b07d5..628dcf33 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/Comm/DsComm.js @@ -1372,6 +1372,9 @@ ShowPublicINFO = function (title, model, proxyUrl, condition, columns, width = 5 enableHdMenu: false, region: 'center', loadMask: { msg: "数据加载中,请稍等..." }, + features: [{ + ftype: 'summary'//Ext.grid.feature.Summary表格汇总特性 + }], trackMouseOver: true, disableSelection: false, singleSelect: true, diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js index 0d470023..82a4174b 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpApply/MsOpApplyEdit.js @@ -2780,147 +2780,158 @@ Ext.extend(Shipping.MsOpApplyEdit, Ext.Panel, { } var bodydatas = []; + var cansave = true; for (var i = 0; i < this.storeBodyList.getCount(); i += 1) { var member = this.storeBodyList.getAt(i); bodydatas.push(member); + if (member.data.GoodsName == "" || member.data.GoodsCode == "") { + cansave = false; + } } - var jsonBody = ConvertRecordsToJsonAll(bodydatas); - var jsonDelBody = ConvertRecordsToJsonAll(this.bodyDel); - - var bodyctndatas = []; - var cntrnostr = ''; - var isnoctn = false; - for (var i = 0; i < this.storeCtnBodyList.getCount(); i += 1) { - var member = this.storeCtnBodyList.getAt(i); - var WEIGHDATE = member.data.WEIGHDATE; - if (WEIGHDATE != '') - WEIGHDATE = Ext.util.Format.date(WEIGHDATE, 'Y-m-d'); - member.data.WEIGHDATE = WEIGHDATE; - var cntrno = member.data.CNTRNO; - if (cntrno != '') { - var iscn = cntrno.match(/^[a-zA-Z]{4}[0-9]{7}$/); - if (iscn == null) { - cntrnostr = cntrnostr + cntrno + ','; + if (!cansave) + { + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: '商品名称和商品编码不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + } else { + + var jsonBody = ConvertRecordsToJsonAll(bodydatas); + var jsonDelBody = ConvertRecordsToJsonAll(this.bodyDel); + + var bodyctndatas = []; + var cntrnostr = ''; + var isnoctn = false; + for (var i = 0; i < this.storeCtnBodyList.getCount(); i += 1) { + var member = this.storeCtnBodyList.getAt(i); + var WEIGHDATE = member.data.WEIGHDATE; + if (WEIGHDATE != '') + WEIGHDATE = Ext.util.Format.date(WEIGHDATE, 'Y-m-d'); + member.data.WEIGHDATE = WEIGHDATE; + var cntrno = member.data.CNTRNO; + if (cntrno != '') { + var iscn = cntrno.match(/^[a-zA-Z]{4}[0-9]{7}$/); + if (iscn == null) { + cntrnostr = cntrnostr + cntrno + ','; + } + } + //if (member.data.CTNALL == '') { + // isnoctn = true; + //} + bodyctndatas.push(member); } - //if (member.data.CTNALL == '') { - // isnoctn = true; - //} - bodyctndatas.push(member); - } - - if (isnoctn) { + if (isnoctn) { - Ext.Msg.show({ title: Zi.LAN.JingGao, msg: cntrnostr + '集装箱信息,箱型不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); - return; + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: cntrnostr + '集装箱信息,箱型不能为空!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + return; - } + } - if (cntrnostr != '') { + if (cntrnostr != '') { - Ext.Msg.show({ title: Zi.LAN.JingGao, msg: cntrnostr + '箱号不正确,请录入正确箱号再保存!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); - return; - } - var jsonCtnBody = ConvertRecordsToJsonAll(bodyctndatas); + Ext.Msg.show({ title: Zi.LAN.JingGao, msg: cntrnostr + '箱号不正确,请录入正确箱号再保存!', icon: Ext.Msg.WARNING, buttons: Ext.Msg.OK }); + return; + } + var jsonCtnBody = ConvertRecordsToJsonAll(bodyctndatas); - this.formHead.getForm().findField('BSNO').setDisabled(false); - var data = this.formHead.getForm().getValues(false, false, false); - var data2 = this.formEdit.getForm().getValues(false, false, false); - var data3 = this.formEdi.getForm().getValues(false, false, false); - this.formHead.getForm().findField('BSNO').setDisabled(true); - _this=this; + this.formHead.getForm().findField('BSNO').setDisabled(false); + var data = this.formHead.getForm().getValues(false, false, false); + var data2 = this.formEdit.getForm().getValues(false, false, false); + var data3 = this.formEdi.getForm().getValues(false, false, false); + this.formHead.getForm().findField('BSNO').setDisabled(true); + _this = this; - Ext.Msg.wait('正在保存数据, 请稍侯..'); - Ext.Ajax.request({ - waitMsg: '正在保存数据...', - url: '/MvcShipping/MsOpApply/Save', - scope: this, - params: { - opstatus: this.opStatus, - data: Ext.JSON.encode(data), - data2: Ext.JSON.encode(data2), - data3: Ext.JSON.encode(data3), - body: jsonBody, - ctnbody:jsonCtnBody + Ext.Msg.wait('正在保存数据, 请稍侯..'); + Ext.Ajax.request({ + waitMsg: '正在保存数据...', + url: '/MvcShipping/MsOpApply/Save', + scope: this, + params: { + opstatus: this.opStatus, + data: Ext.JSON.encode(data), + data2: Ext.JSON.encode(data2), + data3: Ext.JSON.encode(data3), + body: jsonBody, + ctnbody: jsonCtnBody - }, - callback: function (options, success, response) { - if (success) { - Ext.MessageBox.hide(); - var jsonresult = Ext.JSON.decode(response.responseText); - if (jsonresult.Success) { - var returnData = jsonresult.Data; - this.formEdit.getForm().reset(); - this.formEdit.getForm().setValues(returnData); - this.formHead.getForm().reset(); - this.formHead.getForm().setValues(returnData); - this.formEdi.getForm().reset(); - this.formEdi.getForm().setValues(returnData); - - - if (this.opStatus == 'add') { - var arrNewRecords = _this.StoreList.insert(0, returnData); - this.editRecord = this.StoreList.getAt(0); - } - else if (this.opStatus == 'edit') { - var editp = Ext.create('MsOpApply', returnData); - - this.editRecord.fields.each(function (field) { - if (field.persist) { - name = field.name; - if (name != 'id') - this.editRecord.set(name, editp.get(name)); + }, + callback: function (options, success, response) { + if (success) { + Ext.MessageBox.hide(); + var jsonresult = Ext.JSON.decode(response.responseText); + if (jsonresult.Success) { + var returnData = jsonresult.Data; + this.formEdit.getForm().reset(); + this.formEdit.getForm().setValues(returnData); + this.formHead.getForm().reset(); + this.formHead.getForm().setValues(returnData); + this.formEdi.getForm().reset(); + this.formEdi.getForm().setValues(returnData); + + + if (this.opStatus == 'add') { + var arrNewRecords = _this.StoreList.insert(0, returnData); + this.editRecord = this.StoreList.getAt(0); + } + else if (this.opStatus == 'edit') { + var editp = Ext.create('MsOpApply', returnData); + + this.editRecord.fields.each(function (field) { + if (field.persist) { + name = field.name; + if (name != 'id') + this.editRecord.set(name, editp.get(name)); + } + }, this); + this.editRecord.commit(); + } + if (type == '0') { + this.opStatus = 'edit'; + basicForm2.findField('BSNO').setDisabled(true); + + for (var j = 0; j < this.storeBodyList.getCount(); j += 1) { + var memberbody = this.storeBodyList.getAt(j); + memberbody.set("BSNO", this.editRecord.get('BSNO')); + memberbody.commit(); + }; + for (var j = 0; j < this.storeCtnBodyList.getCount(); j += 1) { + var memberbody = this.storeCtnBodyList.getAt(j); + memberbody.set("BSNO", this.editRecord.get('BSNO')); + memberbody.commit(); + }; + this.LoadPeriodStatus(this.opStatus); + if (returnData.WMSNO != '') { + this.storeListWmsIn.load({ params: { wmsno: returnData.WMSNO } }); + + } else this.storeListWmsIn.load({ params: { wmsno: '' } }); + if (returnData.MBLNO != '') { + this.storeListBsCustomNo.load({ params: { constr: " MBLNO='" + returnData.MBLNO + "' AND BSNO<>'" + returnData.BSNO + "'" } }); + this.storeListWmsNo.load({ params: { constr: " w.BLNO='" + returnData.MBLNO + "'" } }); } - }, this); - this.editRecord.commit(); - } - if (type == '0') { - this.opStatus = 'edit'; - basicForm2.findField('BSNO').setDisabled(true); - - for (var j = 0; j < this.storeBodyList.getCount(); j += 1) { - var memberbody = this.storeBodyList.getAt(j); - memberbody.set("BSNO", this.editRecord.get('BSNO')); - memberbody.commit(); - }; - for (var j = 0; j < this.storeCtnBodyList.getCount(); j += 1) { - var memberbody = this.storeCtnBodyList.getAt(j); - memberbody.set("BSNO", this.editRecord.get('BSNO')); - memberbody.commit(); - }; - this.LoadPeriodStatus(this.opStatus); - if (returnData.WMSNO != '') { - this.storeListWmsIn.load({ params: { wmsno: returnData.WMSNO} }); - - } else this.storeListWmsIn.load({ params: { wmsno:''} }); - if (returnData.MBLNO!=''){ - this.storeListBsCustomNo.load({ params: { constr:" MBLNO='"+returnData.MBLNO+"' AND BSNO<>'"+returnData.BSNO+"'" }}); - this.storeListWmsNo.load({ params: { constr:" w.BLNO='"+returnData.MBLNO+"'" }}); - } - - - } else if (type == '1') { - window.close(); - } else if (type == '2') { - this.LoadData('add', ''); - } + } else if (type == '1') { + window.close(); + } else if (type == '2') { + this.LoadData('add', ''); + } + + + } else { + Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + } } else { - Ext.Msg.show({ title: '错误', msg: jsonresult.Message, icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK }); + Ext.Msg.show({ + title: '请重试', + msg: '服务器响应出错', + icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK + }); } - } else { - Ext.Msg.show({ title: '请重试', - msg: '服务器响应出错', - icon: Ext.Msg.ERROR, buttons: Ext.Msg.OK - }); } - } - }); + }); + } } //end save , diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js index dedb1d3a..9bce7e2f 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeai/MsOpSeaiEdit.js @@ -4608,7 +4608,8 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { var member = this.storeBodyListGoods.getAt(i); bodyGoodsdatas.push(member); } - var jsonBodyGoods = ConvertRecordsToJsonAll(bodyGoodsdatas); + + var jsonBodyGoods = ConvertRecordsToJsonAll(bodyGoodsdatas); // Ext.Msg.wait(Zi.LAN.ZhengZaiCaoZuoShuJu); //'正在保存数据, 请稍侯..' Ext.Ajax.request({ @@ -4982,10 +4983,88 @@ Ext.extend(Shipping.MsOpSeaiEdit, Ext.Panel, { condition = "(isnull(MBLNO,'')<>'' and MBLNO='" + MBLNO + "')"; } else return; + var basicForm = this.formEdit.getForm(); + var basicForm2 = this.formHead.getForm(); + if (!basicForm.isValid()) { + return; + } + if (!basicForm2.isValid()) { + return; + } + // + var bodydatas = []; + var iCount = this.storeBodyList.getCount(); + for (var i = 1; i <= iCount; i++) { + var member = this.storeBodyList.getAt(i - 1); + var sn = i.toString(); + var al = iCount.toString().length; + var bl = i.toString().length; + if (iCount.toString().length > i.toString().length) { + for (var j = 0; j < (iCount.toString().length - i.toString().length); j++) { + sn = "0" + i.toString().toString(); + } + } + member.data.CTNCODE = sn; + var TIXIANGSHIJIAN = member.data.TIXIANGSHIJIAN; + if (TIXIANGSHIJIAN != '') + TIXIANGSHIJIAN = Ext.util.Format.date(TIXIANGSHIJIAN, 'Y-m-d'); + member.data.TIXIANGSHIJIAN = TIXIANGSHIJIAN; + + bodydatas.push(member); + } + + if (this.accdatesameetd == 1) { + var ETD = this.formEdit.getForm().findField('ETD').getRawValue(); + if (ETD == '') { + + } else { + var oDate1 = new Date(ETD); + var oDate2 = new Date(_this.MsPeriod.FDAY); + if (oDate1.getTime() >= oDate2.getTime()) { + var mydatestr = Ext.util.Format.date(ETD, 'Y-m'); + if (_this.MsPeriod.CLOSEDAY != 0) { + var myday = Ext.util.Format.date(ETD, 'd'); + if (myday > _this.MsPeriod.CLOSEDAY) { + var lastMonthDate = new Date(ETD); //上月日期 + lastMonthDate.setDate(1); + lastMonthDate.setMonth(lastMonthDate.getMonth() + 1); + var mymonth = Ext.util.Format.date(lastMonthDate, 'm'); + var myyear = Ext.util.Format.date(lastMonthDate, 'Y'); + var mymonthstr = mymonth.toString(); + if (mymonthstr.length == 1) mymonthstr = '0' + mymonthstr; + mydatestr = myyear.toString() + '-' + mymonthstr; + } + } else { + } + var field = this.formHead.getForm().findField('ACCDATE'); + field.setValue(mydatestr); + } + } + } + + this.formHead.getForm().findField('MSHIPPERID').setValue(this.formMBL.getForm().findField('MSHIPPERID').getValue()); + this.formHead.getForm().findField('MCONSIGNEEID').setValue(this.formMBL.getForm().findField('MCONSIGNEEID').getValue()); + this.formHead.getForm().findField('MNOTIFYPARTYID').setValue(this.formMBL.getForm().findField('MNOTIFYPARTYID').getValue()); + this.formHead.getForm().findField('MSHIPPER').setValue(this.formMBL.getForm().findField('MSHIPPER').getValue()); + this.formHead.getForm().findField('MDESCRIPTION').setValue(this.formMBL.getForm().findField('MDESCRIPTION').getValue()); + this.formHead.getForm().findField('MCONSIGNEE').setValue(this.formMBL.getForm().findField('MCONSIGNEE').getValue()); + this.formHead.getForm().findField('MNOTIFYPARTY').setValue(this.formMBL.getForm().findField('MNOTIFYPARTY').getValue()); + this.formHead.getForm().findField('MBLFRT').setValue(this.formMBL.getForm().findField('MBLFRT').getValue()); + // + var jsonBody = ConvertRecordsToJsonAll(bodydatas); + //this.formHead.getForm().findField('BSNO').setDisabled(false); + var data = this.formHead.getForm().getValues(false, false, false); + var data2 = this.formEdit.getForm().getValues(false, false, false); + var data3 = this.formBill.getForm().getValues(false, false, false); + //this.formHead.getForm().findField('BSNO').setDisabled(true); + Ext.Ajax.request({ waitMsg: '正在查询主表数据...', url: '/MvcShipping/MsOpApply/GetOpseaiData', params: { + data: Ext.JSON.encode(data), + data2: Ext.JSON.encode(data2), + data3: Ext.JSON.encode(data3), handle: 'edit', condition: condition }, diff --git a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs index f3cdb543..3ac6fb74 100644 --- a/DSWeb/Areas/SoftMng/Controllers/ExportController.cs +++ b/DSWeb/Areas/SoftMng/Controllers/ExportController.cs @@ -46,6 +46,7 @@ using DSWeb.MvcShipping.Models.MsOpSeai; using System.Data.Entity.Migrations; using DSWeb.EntityDA; using System.Configuration; +using DSWeb.MvcShipping.DAL.MsCodeGoods; namespace DSWeb.SoftMng.Controllers { @@ -1511,7 +1512,7 @@ namespace DSWeb.SoftMng.Controllers return Json(new { total = count, rows = list }); } /// - /// 集装箱列表 + /// 集装箱列表 单一窗口集装箱 /// /// public JsonResult GetList1(string pId) @@ -4014,7 +4015,7 @@ string swcn = "2020030084935", string swpw = "8a5889ea8e53b257e2a3ba053979ee64" } } - + MsCodeGoodsDAL.AddCodeGoods(port_decMergeListVo.gName, port_decMergeListVo.codeTs); opapplyhead.ARCOUNTRY = port_decMergeListVo.cusOriginCountryName; } diff --git a/DSWeb/Areas/SoftMng/Model/DecHead.cs b/DSWeb/Areas/SoftMng/Model/DecHead.cs index 5494e1af..2c5996c3 100644 --- a/DSWeb/Areas/SoftMng/Model/DecHead.cs +++ b/DSWeb/Areas/SoftMng/Model/DecHead.cs @@ -28,7 +28,11 @@ namespace DSWeb.SoftMng.Model{ { get{ return _bsno; } set{ _bsno = value; } - } + } + + //public bool isnull() { + // return !string.IsNullOrWhiteSpace(_bsno); + //} /// /// 进出口标志 I进口 E出口 /// diff --git a/DSWeb/DSWeb.csproj.user b/DSWeb/DSWeb.csproj.user index 2d48e101..be4fdb37 100644 --- a/DSWeb/DSWeb.csproj.user +++ b/DSWeb/DSWeb.csproj.user @@ -4,7 +4,7 @@ ShowAllFiles E:\DS7_JinGang\DS7\DSWeb\Properties\PublishProfiles\FolderProfile.pubxml true - Release|Any CPU + Debug|Any CPU diff --git a/DispatchWeb/DispatchWeb.csproj.user b/DispatchWeb/DispatchWeb.csproj.user index af17a67a..e6a8406a 100644 --- a/DispatchWeb/DispatchWeb.csproj.user +++ b/DispatchWeb/DispatchWeb.csproj.user @@ -1,7 +1,7 @@  - Release|Any CPU + Debug|Any CPU true