diff --git a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js index 76cd3153..31a40def 100644 --- a/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js +++ b/DSWeb/Areas/Account/Viewsjs/Chfee_invoice_HangXin/ChInvoiceAppEdit.js @@ -4163,6 +4163,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { CUSTBANK.setValue(''); CUSTADDR.setValue(''); CUSTTEL.setValue(''); + _this.addsave(); } } @@ -4196,6 +4197,7 @@ Ext.extend(Shipping.MsChInvoiceAppEdit, Ext.Panel, { else { //如果不完全是一票新业务 CUSTOMERNAME 有数据 则 //1 = 1; + _this.addsave(); } if (this.AddMblNo == 1) { diff --git a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs index 9b1b1671..87356a8c 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsOpSeae/MsOpSeaeEdiPortDAL.cs @@ -4241,6 +4241,10 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL r.WriteLine("RFF+ON:" + bill.ORDERNO.Trim() + "'"); icount = icount + 2; } + else { + r.WriteLine("RFF+FF:" + bill.CUSTNO.Trim() + "'"); + icount = icount + 1; + } } if (carrier != "COSU"&&!string.IsNullOrEmpty(bill.MBLNO)) @@ -35389,6 +35393,11 @@ namespace DSWeb.MvcShipping.DAL.MsOpSeaeEdiPortDAL r.WriteLine("RFF+ON:" + bill.ORDERNO.Trim() + "'"); icount = icount + 2; } + else { + r.WriteLine("RFF+FF:" + bill.CUSTNO.Trim() + "'"); + //r.WriteLine("RFF+ON:" + bill.ORDERNO.Trim() + "'"); + icount = icount + 1; + } } if (carrier != "COSU"&&!string.IsNullOrEmpty(bill.MBLNO)) diff --git a/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs b/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs index 07592565..3212e1b0 100644 --- a/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs +++ b/DSWeb/Areas/MvcShipping/DAL/MsRptSaleBalProfitShare/MsRptSaleBalProfitShareDAL.cs @@ -1361,20 +1361,21 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL data.TiChengQuJian = 100; var isnottc = false; - if (BaseComp==0||sale!=data.SALE) - saleprofitlist.ForEach(i => - { - if (i.SALE == data.SALE && i.BSSOURCE =="") + if (BaseComp == 0 || sale != data.SALE) + saleprofitlist.ForEach(i => { - data.TiChengBiLi =0; - if (i.PROFITUP> BaseComp) - BaseComp = i.PROFITUP; - sale = data.SALE; - if (data.COMPR > i.PROFITDOWN && data.COMPR <= i.PROFITUP) { - isnottc = true; + if (i.SALE == data.SALE && i.BSSOURCE == "") + { + data.TiChengBiLi = 0; + if (i.PROFITUP > BaseComp) + BaseComp = i.PROFITUP; + sale = data.SALE; + if (data.COMPR > i.PROFITDOWN && data.COMPR <= i.PROFITUP) + { + isnottc = true; + } } - } - }); + }); var TTLCOMPR = data.ZKTTLPROFIT; if (data.BSSOURCE != "直客") @@ -1382,22 +1383,20 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL TTLCOMPR = data.THTTLPROFIT; } - else { - if (data.THTTLPROFIT < BaseComp) { + else + { + if (data.THTTLPROFIT < BaseComp) + { - TTLCOMPR = TTLCOMPR - BaseComp +data.THTTLPROFIT; + TTLCOMPR = TTLCOMPR - BaseComp + data.THTTLPROFIT; } } - var mblno = data.MBLNO; - if (mblno == "QDSR061873") { - mblno = "111"; - } - if (!isnottc&&data.COMPR>BaseComp) + if (!isnottc && data.COMPR > BaseComp) { saleprofitlist.ForEach(i => { - if (i.SALE == data.SALE && i.BSSOURCE == data.BSSOURCE && ((TTLCOMPR-data.TTLPROFIT)> i.PROFITDOWN ||TTLCOMPR>i.PROFITDOWN) && ((data.MONTHTTLPR >= i.PROFITPLAN && i.PROFITPLAN > 0) || (i.PROFITPLAN <= 0))) + if (i.SALE == data.SALE && i.BSSOURCE == data.BSSOURCE && ((TTLCOMPR - data.TTLPROFIT) > i.PROFITDOWN || TTLCOMPR > i.PROFITDOWN) && ((data.MONTHTTLPR >= i.PROFITPLAN && i.PROFITPLAN > 0) || (i.PROFITPLAN <= 0))) { if (((TTLCOMPR - data.TTLPROFIT) <= i.PROFITUP || TTLCOMPR <= i.PROFITUP)) @@ -1419,9 +1418,9 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL } }); } - + data.TiChengBiLi = i.SHAREPR * data.TiChengQuJian / 100; - data.ShiJiTiChengBiLi= i.SHAREPR / 100; + data.ShiJiTiChengBiLi = i.SHAREPR / 100; SHAREPR = i.SHAREPR; beginplan = i.PROFITDOWN; @@ -1429,27 +1428,21 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL if (TTLCOMPR <= i.PROFITUP) { var TMPTTLPROFIT = data.TTLPROFIT; - - decimal basecompr = TTLCOMPR; - if ((data.COMPR - data.TTLPROFIT) < BaseComp) basecompr = data.COMPR - BaseComp; - - if ((TTLCOMPR - data.TTLPROFIT) <= i.PROFITDOWN) TMPTTLPROFIT = (data.COMPR - i.PROFITDOWN); + if ((TTLCOMPR - data.TTLPROFIT) <= i.PROFITDOWN) TMPTTLPROFIT = (TTLCOMPR - i.PROFITDOWN); + if ((data.COMPR - data.TTLPROFIT) < BaseComp) TMPTTLPROFIT = data.COMPR - BaseComp; data.TiCheng = data.TiCheng + TMPTTLPROFIT * data.TiChengBiLi / 100; - data.KouXi=data.KouXi+ (TMPTTLPROFIT * i.SHAREPR / 100- TMPTTLPROFIT * data.TiChengBiLi / 100); + data.KouXi = data.KouXi + (TMPTTLPROFIT * i.SHAREPR / 100 - TMPTTLPROFIT * data.TiChengBiLi / 100); if (!string.IsNullOrEmpty(data.TiChengBiLiStr)) - data.TiChengBiLiStr = data.TiChengBiLiStr+"+"+ Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + data.TiChengBiLiStr = data.TiChengBiLiStr + "+" + Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; else data.TiChengBiLiStr = Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; } - else { - decimal basecompr = TTLCOMPR; - if ((data.COMPR - data.TTLPROFIT) < BaseComp) basecompr = data.COMPR - BaseComp; - var TMPTTLPROFIT = data.TTLPROFIT - (basecompr - i.PROFITUP); - if ((TTLCOMPR - data.TTLPROFIT) < i.PROFITDOWN && (TMPTTLPROFIT > (i.PROFITUP - i.PROFITDOWN))) TMPTTLPROFIT = i.PROFITUP - i.PROFITDOWN; - - //if ((data.COMPR - data.TTLPROFIT) < BaseComp) TMPTTLPROFIT = data.COMPR - BaseComp; - data.TiCheng = data.TiCheng + TMPTTLPROFIT * data.TiChengBiLi/100; + else + { + var TMPTTLPROFIT = data.TTLPROFIT - (TTLCOMPR - i.PROFITUP); + if ((data.COMPR - data.TTLPROFIT) < BaseComp) TMPTTLPROFIT = data.COMPR - BaseComp; + data.TiCheng = data.TiCheng + TMPTTLPROFIT * data.TiChengBiLi / 100; data.KouXi = data.KouXi + (TMPTTLPROFIT * i.SHAREPR / 100 - TMPTTLPROFIT * data.TiChengBiLi / 100); if (!string.IsNullOrEmpty(data.TiChengBiLiStr)) data.TiChengBiLiStr = data.TiChengBiLiStr + "+" + Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; @@ -1462,56 +1455,139 @@ namespace DSWeb.MvcShipping.DAL.MsRptSaleBalProfitShareDAL } }); - } - //decimal lasttc = 0; - //decimal lastpr = 0; - //decimal lasttcxs = 0; - //var TTLPROFIT = data.TTLPROFIT; - //if ((data.COMPR - TTLPROFIT) >= (data.MONTHTTLPR - data.MONTHTRAVEFEE) && data.COMPR > 0) - // TTLPROFIT = 0; - //else if ((data.COMPR) >= (data.MONTHTTLPR - data.MONTHTRAVEFEE) && (data.COMPR > 0)) - // TTLPROFIT = (data.MONTHTTLPR - data.MONTHTRAVEFEE) - (data.COMPR - TTLPROFIT); - //data.TiChengBiLiStr = Convert.ToString(data.TiChengQuJian / 100) + "*(" + TTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + // var salemonthprofit = new MsSaleMonthProfit(); + // salemonthprofit.SALE = data.SALE; + // salemonthprofit.ETDMONTH = data.ETDMONTH; + // salemonthprofit.TTLPROFIT = data.TTLPROFIT; + // data.COMPR = data.TTLPROFIT; + // if (data.BSSOURCE == "直客") + // { + // salemonthprofit.ZKTTLPROFIT = salemonthprofit.ZKTTLPROFIT + data.TTLPROFIT; + // data.ZKTTLPROFIT = salemonthprofit.ZKTTLPROFIT; + // } + // else + // { + // salemonthprofit.THTTLPROFIT = salemonthprofit.THTTLPROFIT + data.TTLPROFIT; + // data.THTTLPROFIT = salemonthprofit.THTTLPROFIT; + // } + // MsSaleMonthProfitList.Add(salemonthprofit); + //} + - //if (data.TiChengBiLi != 0) + //decimal beginplan = 0; + //decimal endplan = 0; + //decimal SHAREPR = 0; + //if (data.TTLPROFIT <= 0) //{ - // if (beginplan > (TTLCOMPR - TTLPROFIT)) + // data.NODAY = 0; + //} + + //data.TiChengQuJian = 100; + //var isnottc = false; + //if (BaseComp==0||sale!=data.SALE) + //saleprofitlist.ForEach(i => + //{ + // if (i.SALE == data.SALE && i.BSSOURCE =="") // { - // var bpr = (TTLCOMPR - beginplan); - // data.TiCheng = Math.Round(data.TiChengBiLi * bpr / 100, 2); - // data.TiChengBiLiStr = Convert.ToString(data.TiChengQuJian / 100) + "*(" + bpr.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + // data.TiChengBiLi =0; + // if (i.PROFITUP> BaseComp) + // BaseComp = i.PROFITUP; + // sale = data.SALE; + // if (data.COMPR > i.PROFITDOWN && data.COMPR <= i.PROFITUP) { + // isnottc = true; + // } + // } + //}); - // lastpr = TTLCOMPR - TTLPROFIT; - // saleprofitlist.ForEach(i => + //var TTLCOMPR = data.ZKTTLPROFIT; + //if (data.BSSOURCE != "直客") + //{ + // TTLCOMPR = data.THTTLPROFIT; + + //} + //else { + // if (data.THTTLPROFIT < BaseComp) { + + // TTLCOMPR = TTLCOMPR - BaseComp +data.THTTLPROFIT; + // } + //} + //var mblno = data.MBLNO; + //if (mblno == "QDSR061873") { + // mblno = "111"; + //} + + //if (!isnottc&&data.COMPR>BaseComp) + //{ + // saleprofitlist.ForEach(i => + // { + // if (i.SALE == data.SALE && i.BSSOURCE == data.BSSOURCE && ((TTLCOMPR-data.TTLPROFIT)> i.PROFITDOWN ||TTLCOMPR>i.PROFITDOWN) && ((data.MONTHTTLPR >= i.PROFITPLAN && i.PROFITPLAN > 0) || (i.PROFITPLAN <= 0))) // { - // if (i.SALE == data.SALE && i.BSSOURCE == data.BSSOURCE && lastpr > i.PROFITDOWN && lastpr <= i.PROFITUP) + + // if (((TTLCOMPR - data.TTLPROFIT) <= i.PROFITUP || TTLCOMPR <= i.PROFITUP)) // { - // lasttcxs = i.SHAREPR * data.TiChengQuJian / 100; + + // POORDAY = i.POORDAY; + // MONTHPOORDAY = i.MONTHPOORDAY; + // if (data.NODAY <= 0) + // { + // data.TiChengQuJian = 100; + // } + // else + // { + // saleprofitcqlist.ForEach(j => + // { + // if (j.SALE == data.SALE && data.NODAY >= j.BDAY && data.NODAY <= j.EDAY) + // { + // data.TiChengQuJian = j.DEDUCTIN; + // } + // }); + // } + + // data.TiChengBiLi = i.SHAREPR * data.TiChengQuJian / 100; + // data.ShiJiTiChengBiLi= i.SHAREPR / 100; + // SHAREPR = i.SHAREPR; // beginplan = i.PROFITDOWN; // endplan = i.PROFITUP; - // } - // }); + // if (TTLCOMPR <= i.PROFITUP) + // { + // var TMPTTLPROFIT = data.TTLPROFIT; + + // decimal basecompr = TTLCOMPR; + // if ((data.COMPR - data.TTLPROFIT) < BaseComp) basecompr = data.COMPR - BaseComp; + + // if ((TTLCOMPR - data.TTLPROFIT) <= i.PROFITDOWN) TMPTTLPROFIT = (data.COMPR - i.PROFITDOWN); + + // data.TiCheng = data.TiCheng + TMPTTLPROFIT * data.TiChengBiLi / 100; + // data.KouXi=data.KouXi+ (TMPTTLPROFIT * i.SHAREPR / 100- TMPTTLPROFIT * data.TiChengBiLi / 100); + // if (!string.IsNullOrEmpty(data.TiChengBiLiStr)) + // data.TiChengBiLiStr = data.TiChengBiLiStr+"+"+ Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + // else + // data.TiChengBiLiStr = Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + // } + // else { + // decimal basecompr = TTLCOMPR; + // if ((data.COMPR - data.TTLPROFIT) < BaseComp) basecompr = data.COMPR - BaseComp; + // var TMPTTLPROFIT = data.TTLPROFIT - (basecompr - i.PROFITUP); + // if ((TTLCOMPR - data.TTLPROFIT) < i.PROFITDOWN && (TMPTTLPROFIT > (i.PROFITUP - i.PROFITDOWN))) TMPTTLPROFIT = i.PROFITUP - i.PROFITDOWN; + + // //if ((data.COMPR - data.TTLPROFIT) < BaseComp) TMPTTLPROFIT = data.COMPR - BaseComp; + // data.TiCheng = data.TiCheng + TMPTTLPROFIT * data.TiChengBiLi/100; + // data.KouXi = data.KouXi + (TMPTTLPROFIT * i.SHAREPR / 100 - TMPTTLPROFIT * data.TiChengBiLi / 100); + // if (!string.IsNullOrEmpty(data.TiChengBiLiStr)) + // data.TiChengBiLiStr = data.TiChengBiLiStr + "+" + Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + // else + // data.TiChengBiLiStr = Convert.ToString(data.TiChengQuJian / 100) + "*(" + TMPTTLPROFIT.ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + + // } - // if (TTLPROFIT - bpr > 0) - // { - // lasttc = Math.Round(lasttcxs * (TTLPROFIT - bpr) / 100, 2); - // if (lasttc != 0) - // data.TiChengBiLiStr = data.TiChengBiLiStr + "+" + Convert.ToString(data.TiChengQuJian / 100) + "*(" + (TTLPROFIT - bpr).ToString() + "*" + Convert.ToString(SHAREPR / 100) + ")"; + // } // } - // if (lasttc != 0) - // { - // data.TiCheng = data.TiCheng + lasttc; - // data.PRREMARK = "系数:" + lasttcxs.ToString() + "提成:" + lasttc.ToString(); - // } - // } - // else - // data.TiCheng = Math.Round(data.TiChengBiLi * TTLPROFIT / 100, 2); + // }); + } - //} - //else data.TiCheng = 0; if (reader["SETTLETIME"] != DBNull.Value) diff --git a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js index a4fa563d..cfdf8e2e 100644 --- a/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js +++ b/DSWeb/Areas/MvcShipping/Viewsjs/MsOpSeae/MsOpSeaeIndex.js @@ -8978,7 +8978,7 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { var MblNo = form.findField('MblNo').getValue(); MblNo = MblNo.trim(); sql = sql + getAndConSql(sql, MblNo, "(B.MblNo like '%" + MblNo + "%' or B.CONTRACTNO like '%" + MblNo + "%' or B.CUSTNO like '%" + MblNo + "%' or B.HBLNO like '%" - + MblNo + "%' or B.ORDERNO like '%" + MblNo + "%' or B.APPLYNO like '%" + MblNo + "%' or B.SERVICECONTRACTNO like '%" + MblNo + "%' )"); + + MblNo + "%' or B.ORDERNO like '%" + MblNo + "%' or B.APPLYNO like '%" + MblNo + "%' or B.SERVICECONTRACTNO like '%" + MblNo + "%' OR B.IRCODE like '%" + MblNo + "%')"); var HblNo = form.findField('HblNo').getValue(); @@ -16060,11 +16060,13 @@ Ext.extend(Shipping.MsOpSeaeIndex, Ext.Panel, { }, scope: this }); + } } }); + function fnSearch() { steplay.fnSearch(); }