From 5cccbb67654e468245dac77ca9de0b445771e329 Mon Sep 17 00:00:00 2001 From: username@email.com <yzy2002yzy@163.com> Date: 星期三, 11 十二月 2024 08:45:14 +0800 Subject: [PATCH] 未确认收入销账 --- CY_ECommercePlatform/CY.BLL/CY.BLL.csproj | 1 CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.designer.cs | 125 + CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs | 12 CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.cs | 549 +++++++ CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx | 256 +++ CY_ECommercePlatform/CY.IDAL/OA/IOA_KaipiaoJineQuerenDAL.cs | 40 CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.designer.cs | 116 + CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx | 72 + CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQueren.cs | 219 +++ CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx.designer.cs | 44 CY_ECommercePlatform/CY.SQLDAL/EC/EC_OrderBasicDAL.cs | 53 CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.designer.cs | 134 + CY_ECommercePlatform/AbstractFactory/Factory.cs | 7 CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx | 327 ++++ CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.cs | 274 +++ CY_ECommercePlatform/CY.Model/CY.Model.csproj | 2 CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs | 46 CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoJineQuerenBLL.cs | 196 ++ CY_ECommercePlatform/CY.IDAL/EC/IEC_OrderBasicDAL.cs | 10 CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShoukuan.aspx.cs | 2 CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx | 308 ++++ CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx | 15 CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj | 24 CY_ECommercePlatform/CY.SQLDAL/OA/OA_KaipiaoJineQuerenDAL.cs | 289 ++++ CY_ECommercePlatform/CY.SQLDAL/CY.SQLDAL.csproj | 1 CY_ECommercePlatform/CY.IDAL/CY.IDAL.csproj | 1 CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.cs | 774 +++++++++++ CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.designer.cs | 43 CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx | 2 CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQuerendetail.cs | 166 ++ 30 files changed, 4,065 insertions(+), 43 deletions(-) diff --git a/CY_ECommercePlatform/AbstractFactory/Factory.cs b/CY_ECommercePlatform/AbstractFactory/Factory.cs index d430f6e..5fac9d8 100644 --- a/CY_ECommercePlatform/AbstractFactory/Factory.cs +++ b/CY_ECommercePlatform/AbstractFactory/Factory.cs @@ -260,7 +260,8 @@ OBJECT_PATH.Add(DALInterface.IOA_DeliverPlanDAL, "OA_DeliverPlanDAL"); OBJECT_PATH.Add(DALInterface.IOA_KipiaoshenqingDAL, "OA_KipiaoshenqingDAL"); OBJECT_PATH.Add(DALInterface.IOA_KaipiaonewcuishouDAL, "OA_KaipiaonewcuishouDAL"); - OBJECT_PATH.Add(DALInterface.IOA_KaipiaonewhuikuanDAL, "OA_KaipiaonewhuikuanDAL"); + OBJECT_PATH.Add(DALInterface.IOA_KaipiaonewhuikuanDAL, "OA_KaipiaonewhuikuanDAL"); + OBJECT_PATH.Add(DALInterface.IOA_KaipiaoJineQuerenDAL, "OA_KaipiaoJineQuerenDAL"); OBJECT_PATH.Add(DALInterface.IOA_KaipiaonewDAL, "OA_KaipiaonewDAL"); OBJECT_PATH.Add(DALInterface.ICoreCmsPlanOrderDAL, "CoreCmsPlanOrderDAL"); OBJECT_PATH.Add(DALInterface.ICoreCmsPlanOrderItemDAL, "CoreCmsPlanOrderItemDAL"); @@ -887,6 +888,10 @@ /// <summary> /// 寮�绁ㄧ敵璇� /// </summary> + IOA_KaipiaoJineQuerenDAL = 1934, + /// <summary> + /// 寮�绁ㄧ敵璇� + /// </summary> IOA_KaipiaonewDAL = 1932, /// <summary> diff --git a/CY_ECommercePlatform/CY.BLL/CY.BLL.csproj b/CY_ECommercePlatform/CY.BLL/CY.BLL.csproj index 49f7f22..41b4185 100644 --- a/CY_ECommercePlatform/CY.BLL/CY.BLL.csproj +++ b/CY_ECommercePlatform/CY.BLL/CY.BLL.csproj @@ -170,6 +170,7 @@ <Compile Include="OA\OA_DepartmentBLL.cs" /> <Compile Include="OA\OA_DocumentBLL.cs" /> <Compile Include="OA\OA_DocumentDicBLL.cs" /> + <Compile Include="OA\OA_KaipiaoJineQuerenBLL.cs" /> <Compile Include="OA\OA_KaipiaonewBLL.cs" /> <Compile Include="OA\OA_KaipiaonewcuishouBLL.cs" /> <Compile Include="OA\OA_KaipiaonewhuikuanBLL.cs" /> diff --git a/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs b/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs index 65b036e..3cbc719 100644 --- a/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs +++ b/CY_ECommercePlatform/CY.BLL/EC/EC_OrderBasicBLL.cs @@ -297,6 +297,18 @@ return _eC_OrderBasicDAL.ReceiveMoneyToAccount(orderId, firmAccountRecord); } + + /// <summary> + /// 鏀舵(绾夸笅杞处銆佺幇閲�) + /// </summary> + /// <param name="orderId">璁㈠崟缂栧彿</param> + /// <param name="firmAccountRecord">鎿嶄綔璁板綍</param> + /// <returns></returns> + public bool ReceiveMoneyToQueren(int orderId, OA_FirmAccountRecord firmAccountRecord) + { + return _eC_OrderBasicDAL.ReceiveMoneyToQueren(orderId, firmAccountRecord); + } + /// <summary> /// 閫佽揣 /// </summary> diff --git a/CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoJineQuerenBLL.cs b/CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoJineQuerenBLL.cs new file mode 100644 index 0000000..922c73a --- /dev/null +++ b/CY_ECommercePlatform/CY.BLL/OA/OA_KaipiaoJineQuerenBLL.cs @@ -0,0 +1,196 @@ +锘� +/** +* OA_KaipiaoJineQuerenBLL.cs +* +* 鍔� 鑳斤細 鍚堜綔瀹㈡埛涓氬姟閫昏緫绫� +* 绫� 鍚嶏細 OA_KaipiaoJineQuerenBLL +* +* Ver 鍙樻洿鏃ユ湡 璐熻矗浜� 鍙樻洿鍐呭 +* 鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹� +* V0.01 2013-4-2 15:11 鍚磋緣 鍒濈増 +* V0.02 2013-5-29 17:43 鍚村磶鍧� 澧炲姞杞崲鍦ㄧ嚎浼氬憳涓哄巶鍟嗗鎴锋柟娉� +* +* +* +* +* +* +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CY.IDAL; +using CY.Model; +using AbstractFactory; +using CY.IBaseDAL; +using CY.Infrastructure.DESEncrypt; +using CY.Infrastructure.Query; + +namespace CY.BLL +{ + public class OA_KaipiaoJineQuerenBLL + + { + IOA_KaipiaoJineQuerenDAL _IOA_KaipiaoJineQuerenDAL = null; + + /// <summary> + /// 鍒濆鍖栨瀯閫� + /// </summary> + public OA_KaipiaoJineQuerenBLL() + { + //鑾峰彇OA_KaipiaoJineQueren DAL瀹炵幇 + _IOA_KaipiaoJineQuerenDAL = Factory.GetDALByInterfaceName(DALInterface.IOA_KaipiaoJineQuerenDAL) as IOA_KaipiaoJineQuerenDAL; + + + } + + /// <summary> + /// 鏂板閫佽揣瀹夋帓 + /// </summary> + /// <param name="rType"></param> + /// <param name="m_OA_CustomerCommunications"></param> + /// <param name="m_EC_AcceptWayByCustomers"></param> + /// <returns></returns> + public bool InsertModel(CY.Model.OA_KaipiaoJineQueren m_OA_KaipiaoJineQueren) + { + try + { + + return _IOA_KaipiaoJineQuerenDAL.InserModel(m_OA_KaipiaoJineQueren); + } + catch (Exception ex) + { + throw ex; + } + } + + + /// <summary> + /// 鏂板閫佽揣瀹夋帓 + /// </summary> + /// <param name="rType"></param> + /// <param name="m_OA_CustomerCommunications"></param> + /// <param name="m_EC_AcceptWayByCustomers"></param> + /// <returns></returns> + public bool InserModeldetail(CY.Model.OA_KaipiaoJineQuerendetail m_OA_KaipiaoJineQuerendetail) + { + try + { + + return _IOA_KaipiaoJineQuerenDAL.InserModeldetail(m_OA_KaipiaoJineQuerendetail); + } + catch (Exception ex) + { + throw ex; + } + } + + /// <summary> + /// 淇敼閫佽揣瀹夋帓 + /// </summary> + /// <param name="rType"></param> + /// <returns></returns> + public bool UpdateModel(CY.Model.OA_KaipiaoJineQueren m_OA_KaipiaoJineQueren) + { + try + { + return _IOA_KaipiaoJineQuerenDAL.UpdateModel(m_OA_KaipiaoJineQueren); + } + catch (Exception ex) + { + throw ex; + } + } + + /// <summary> + /// 鑾峰彇鍏ㄩ儴鍚堜綔瀹㈡埛 + /// </summary> + /// <param name="Keyid">涓婚敭id</param> + /// <returns></returns> + public IEnumerable<OA_KaipiaoJineQueren> GetModelList() + { + Query query = new Query(); + return _IOA_KaipiaoJineQuerenDAL.SelectAllModel(query); + } + + + /// <summary> + /// 鏍规嵁buyeridid鑾峰緱淇℃伅 + /// </summary> + /// <param name="buyerid">缂栧彿</param> + /// <returns></returns> + public IEnumerable<Model.OA_KaipiaoJineQueren> GetModelBybuyerid(Guid buyerid) + { + + return _IOA_KaipiaoJineQuerenDAL.GetModelBybuyerid(buyerid); + } + + /// <summary> + /// 鑾峰彇鍏ㄩ儴鍚堜綔瀹㈡埛 + /// </summary> + /// <param name="Keyid">涓婚敭id</param> + /// <returns></returns> + public OA_KaipiaoJineQueren GetModelByKeyid(Guid? keyid) + { + + return _IOA_KaipiaoJineQuerenDAL.GetModelByKeyid(keyid); + } + + /// <summary> + /// 鍒犻櫎鍚堜綔瀹㈡埛 + /// </summary> + /// <param name="rType"></param> + /// <returns></returns> + public bool DeleteModel(CY.Model.OA_KaipiaoJineQueren rType) + { + try + { + _IOA_KaipiaoJineQuerenDAL.DeleteModel(rType); + } + catch (Exception ex) + { + throw ex; + } + return true; + } + + /// <summary> + /// 鏌ヨ鍚堜綔瀹㈡埛鍒嗛〉鍒楄〃 + /// </summary> + /// <param name="pa"></param> + /// <returns></returns> + public IEnumerable<OA_KaipiaoJineQueren> SelectModelPage(Pagination pa, Guid FirmId, string CreateTimeStart, string CreateTimeEnd, + string BusinessManagerId, string CustormerName, string Querenstatus) + { + string Condition = " and ok.FirmId ='" + FirmId + "' "; + + if (!string.IsNullOrEmpty(CreateTimeStart)) + Condition += " and DATEDIFF(day,ok.[CreateTime],'" + CreateTimeStart + "')<=0 "; + + if (!string.IsNullOrEmpty(CreateTimeEnd)) + Condition += " and DATEDIFF(day,ok.[CreateTime],'" + CreateTimeEnd + "')>=0 "; + + if (!string.IsNullOrEmpty(BusinessManagerId)) + Condition += " and ok.BusinessManagerId = '" + BusinessManagerId + "'"; + if (!string.IsNullOrEmpty(CustormerName)) + Condition += " and oe.CompanyName like '%" + CustormerName + "%'"; + if (!string.IsNullOrEmpty(Querenstatus)) + Condition += " and ok.Querenstatus = " + Querenstatus + ""; + + + Query query = new Query(); + IList<Criterion> criterias = new List<Criterion>() + { + new Criterion("", Condition), + + new Criterion("orderBy"," CreateTime desc ") + }; + query.Criteria = criterias; + return _IOA_KaipiaoJineQuerenDAL.SelectModelPage(query, pa); + } + + + + } +} diff --git a/CY_ECommercePlatform/CY.IDAL/CY.IDAL.csproj b/CY_ECommercePlatform/CY.IDAL/CY.IDAL.csproj index 0e8328e..84fb8ff 100644 --- a/CY_ECommercePlatform/CY.IDAL/CY.IDAL.csproj +++ b/CY_ECommercePlatform/CY.IDAL/CY.IDAL.csproj @@ -161,6 +161,7 @@ <Compile Include="OA\IOA_CarrepairDAL.cs" /> <Compile Include="OA\IOA_CuikuanjiluDAL.cs" /> <Compile Include="OA\IOA_DeliverPlanDAL.cs" /> + <Compile Include="OA\IOA_KaipiaoJineQuerenDAL.cs" /> <Compile Include="OA\IOA_KaipiaonewcuishouDAL.cs" /> <Compile Include="OA\IOA_KaipiaonewDAL.cs" /> <Compile Include="OA\IOA_KipiaoshenqingDAL.cs" /> diff --git a/CY_ECommercePlatform/CY.IDAL/EC/IEC_OrderBasicDAL.cs b/CY_ECommercePlatform/CY.IDAL/EC/IEC_OrderBasicDAL.cs index 56edef1..a51933f 100644 --- a/CY_ECommercePlatform/CY.IDAL/EC/IEC_OrderBasicDAL.cs +++ b/CY_ECommercePlatform/CY.IDAL/EC/IEC_OrderBasicDAL.cs @@ -215,6 +215,16 @@ /// <returns></returns> bool ReceiveMoneyToAccount(int orderId, OA_FirmAccountRecord firmAccountRecord); + + /// <summary> + /// 鏀舵(绾夸笅杞处銆佺幇閲�) + /// </summary> + /// <param name="orderId">璁㈠崟缂栧彿</param> + /// <param name="firmAccountRecord">鎿嶄綔璁板綍</param> + /// <returns></returns> + bool ReceiveMoneyToQueren(int orderId, OA_FirmAccountRecord firmAccountRecord); + + /// <summary> /// 鏀舵(澶栧崗棰勪粯娆俱�佸鎴烽浠樻) /// </summary> diff --git a/CY_ECommercePlatform/CY.IDAL/OA/IOA_KaipiaoJineQuerenDAL.cs b/CY_ECommercePlatform/CY.IDAL/OA/IOA_KaipiaoJineQuerenDAL.cs new file mode 100644 index 0000000..c8d70a8 --- /dev/null +++ b/CY_ECommercePlatform/CY.IDAL/OA/IOA_KaipiaoJineQuerenDAL.cs @@ -0,0 +1,40 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Data; +using System.Data.SqlClient; +using CY.IBaseDAL; +using CY.Model; + + +namespace CY.IDAL +{ + public interface IOA_KaipiaoJineQuerenDAL : ICommonDAL, IPaging<OA_KaipiaoJineQueren>, IGetAllModel<OA_KaipiaoJineQueren> + { + + /// <summary> + /// 鏍规嵁缂栧彿鑾峰緱淇℃伅 + /// </summary> + /// <param name="Keyid">缂栧彿</param> + /// <returns></returns> + OA_KaipiaoJineQueren GetModelByKeyid(Guid? keyid); + + /// <summary> + /// 鏍规嵁buyerid鑾峰緱淇℃伅 + /// </summary> + /// <param name="buyerid">涔板id</param> + /// <returns></returns> + IEnumerable<OA_KaipiaoJineQueren> GetModelBybuyerid(Guid buyerid); + + + + + /// <summary> + /// 鏂板 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + bool InserModeldetail(OA_KaipiaoJineQuerendetail model); + } +} diff --git a/CY_ECommercePlatform/CY.Model/CY.Model.csproj b/CY_ECommercePlatform/CY.Model/CY.Model.csproj index e6b8825..f1f595c 100644 --- a/CY_ECommercePlatform/CY.Model/CY.Model.csproj +++ b/CY_ECommercePlatform/CY.Model/CY.Model.csproj @@ -234,6 +234,8 @@ <Compile Include="OA\OA_IntentionCustomer.cs" /> <Compile Include="OA\OA_IntentionCustomerExtend.cs" /> <Compile Include="OA\OA_Inventory.cs" /> + <Compile Include="OA\OA_KaipiaoJineQueren.cs" /> + <Compile Include="OA\OA_KaipiaoJineQuerendetail.cs" /> <Compile Include="OA\OA_Kaipiaonew.cs" /> <Compile Include="OA\OA_Kaipiaonewcuishou.cs" /> <Compile Include="OA\OA_Kaipiaonewhuikuan.cs" /> diff --git a/CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQueren.cs b/CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQueren.cs new file mode 100644 index 0000000..8ee3503 --- /dev/null +++ b/CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQueren.cs @@ -0,0 +1,219 @@ +锘�/** +* OA_CorporateClients.cs +* +* 鍔� 鑳斤細 N/A +* 绫� 鍚嶏細 OA_CorporateClients +* +* Ver 鍙樻洿鏃ユ湡 璐熻矗浜� 鍙樻洿鍐呭 +* 鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹� +* V0.01 2013-4-2 14:27:43 N/A 鍒濈増 +* +* +* +* +* +* +*/ + +using System; +using CY.Infrastructure.Domain; +using CY.Infrastructure.Common; + +namespace CY.Model +{ + /// <summary> + /// 鍗板埛鍙傛暟 + /// </summary> + [Serializable] + public partial class OA_KaipiaoJineQueren : IAggregateRoot + { + + public OA_KaipiaoJineQueren() + { + } + #region Model + /// <summary> + /// id + /// </summary> + public int Keyid { get; set; } + /// <summary> + /// FirmId + /// </summary> + public Guid FirmId { get; set; } + /// <summary> + /// 瀹㈡埛id + /// </summary> + public Guid BuyerId { get; set; } + /// <summary> + /// 瀹㈡埛id + /// </summary> + public string BuyerName { get; set; } + + public int? BusinessManagerId { get; set; } + + public string BusinessManager { get; set; } + + /// <summary> + /// 鍙栦汉鐘舵��/鏈‘璁�0,宸茬‘璁�1 + /// </summary> + public int? Querenstatus { get; set; } + + public decimal? Fukuanmoney { get; set; } + + public decimal? Hexiaomoney { get; set; } + + public decimal? WeiHexiaomoney { + get { + var fukuanmoney = Fukuanmoney.HasValue ? Fukuanmoney.Value : 0; + var hexiaomoney = Hexiaomoney.HasValue ? Hexiaomoney.Value : 0; + return (fukuanmoney - hexiaomoney); + } + } + + /// <summary> + /// 璇存槑 + /// </summary> + public string OperationalMatters { get; set; } + + + + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public string Creater + { + get; + set; + } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime? CreateTime + { + get; + set; + } + /// <summary> + /// 淇敼浜� + /// </summary> + public string Updater + { + get; + set; + } + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public DateTime? LastUpdateTime + { + get; + set; + } + + + + #endregion Model + + #region Visiter + + /// <summary> + /// 灞炴�ц闂櫒 + /// </summary> + /// <param name="name">灞炴�у悕</param> + /// <param name="index">绱㈠紩</param> + /// <param name="isChange">鏄惁灏嗘寚瀹氬睘鎬ц缃负浼犲叆鍊�</param> + /// <param name="value">闇�瑕佽祴浜堢殑鍊�</param> + /// <returns>涓庡悕绉板搴旂殑灞炴�у��</returns> + public object Visiter(string name, int? index = -1, bool isChange = false, object value = null) + { + object theValue = null; + + + if ("Keyid".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1) + { + this.Keyid = isChange ? MyConvert.ConvertToInt32(value).Value : Keyid; + theValue = this.Keyid; + } + else if ("FirmId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2) + { + this.FirmId = isChange ? MyConvert.ConvertToGuid(value) : FirmId; + theValue = this.FirmId; + } + else if ("BuyerId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3) + { + this.BuyerId = isChange ? MyConvert.ConvertToGuid(value) : BuyerId; + theValue = this.BuyerId; + } + else if ("BuyerName".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 4) + { + this.BuyerName = isChange ? MyConvert.ConvertToString(value) : BuyerName; + theValue = this.BuyerName; + } + + else if ("BusinessManagerId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 5) + { + this.BusinessManagerId = isChange ? MyConvert.ConvertToInt32(value) : BusinessManagerId; + theValue = this.BusinessManagerId; + } + else if ("BusinessManager".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 6) + { + this.BusinessManager = isChange ? MyConvert.ConvertToString(value) : BusinessManager; + theValue = this.BusinessManager; + } + + else if ("OperationalMatters".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 21) + { + this.OperationalMatters = isChange ? MyConvert.ConvertToString(value) : OperationalMatters; + theValue = this.OperationalMatters; + } + else if ("Fukuanmoney".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 28) + { + this.Fukuanmoney = isChange ? MyConvert.ConvertToDecimal(value) : Fukuanmoney; + theValue = this.Fukuanmoney; + } + else if ("Hexiaomoney".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 28) + { + this.Hexiaomoney = isChange ? MyConvert.ConvertToDecimal(value) : Hexiaomoney; + theValue = this.Hexiaomoney; + } + else if ("Querenstatus".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 28) + { + this.Querenstatus = isChange ? MyConvert.ConvertToInt32(value) : Querenstatus; + theValue = this.Querenstatus; + } + + + else if ("Creater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 14) + { + this.Creater = isChange ? MyConvert.ConvertToString(value) : Creater; + theValue = this.Creater; + } + else if ("CreateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 15) + { + this.CreateTime = isChange ? MyConvert.ConvertToDateTime(value) : CreateTime; + theValue = this.CreateTime; + } + else if ("Updater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 16) + { + this.Updater = isChange ? MyConvert.ConvertToString(value) : Updater; + theValue = this.Updater; + } + else if ("LastUpdateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 17) + { + this.LastUpdateTime = isChange ? MyConvert.ConvertToDateTime(value) : LastUpdateTime; + theValue = this.LastUpdateTime; + } + + + + + + + return theValue; + } + + #endregion + } +} \ No newline at end of file diff --git a/CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQuerendetail.cs b/CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQuerendetail.cs new file mode 100644 index 0000000..53bad70 --- /dev/null +++ b/CY_ECommercePlatform/CY.Model/OA/OA_KaipiaoJineQuerendetail.cs @@ -0,0 +1,166 @@ +锘�/** +* OA_CorporateClients.cs +* +* 鍔� 鑳斤細 N/A +* 绫� 鍚嶏細 OA_CorporateClients +* +* Ver 鍙樻洿鏃ユ湡 璐熻矗浜� 鍙樻洿鍐呭 +* 鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹� +* V0.01 2013-4-2 14:27:43 N/A 鍒濈増 +* +* +* +* +* +* +*/ + +using System; +using CY.Infrastructure.Domain; +using CY.Infrastructure.Common; + +namespace CY.Model +{ + /// <summary> + /// 鍗板埛鍙傛暟 + /// </summary> + [Serializable] + public partial class OA_KaipiaoJineQuerendetail : IAggregateRoot + { + + public OA_KaipiaoJineQuerendetail() + { + } + #region Model + /// <summary> + /// id + /// </summary> + public int Keyid { get; set; } + /// <summary> + /// FirmId + /// </summary> + public int? KaipiaoJineQuerenId { get; set; } + /// <summary> + /// 瀹㈡埛id + /// </summary> + public Guid KaipiaoshenqingId { get; set; } + /// <summary> + + + public decimal? Hexiaomoney { get; set; } + + + + + + + /// <summary> + /// 鍒涘缓浜� + /// </summary> + public string Creater + { + get; + set; + } + + /// <summary> + /// 鍒涘缓鏃堕棿 + /// </summary> + public DateTime? CreateTime + { + get; + set; + } + /// <summary> + /// 淇敼浜� + /// </summary> + public string Updater + { + get; + set; + } + /// <summary> + /// 淇敼鏃堕棿 + /// </summary> + public DateTime? LastUpdateTime + { + get; + set; + } + + + + #endregion Model + + #region Visiter + + /// <summary> + /// 灞炴�ц闂櫒 + /// </summary> + /// <param name="name">灞炴�у悕</param> + /// <param name="index">绱㈠紩</param> + /// <param name="isChange">鏄惁灏嗘寚瀹氬睘鎬ц缃负浼犲叆鍊�</param> + /// <param name="value">闇�瑕佽祴浜堢殑鍊�</param> + /// <returns>涓庡悕绉板搴旂殑灞炴�у��</returns> + public object Visiter(string name, int? index = -1, bool isChange = false, object value = null) + { + object theValue = null; + + + if ("Keyid".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 1) + { + this.Keyid = isChange ? MyConvert.ConvertToInt32(value).Value : Keyid; + theValue = this.Keyid; + } + else if ("KaipiaoJineQuerenId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 2) + { + this.KaipiaoJineQuerenId = isChange ? MyConvert.ConvertToInt32(value) : KaipiaoJineQuerenId; + theValue = this.KaipiaoJineQuerenId; + } + else if ("KaipiaoshenqingId".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 3) + { + this.KaipiaoshenqingId = isChange ? MyConvert.ConvertToGuid(value) : KaipiaoshenqingId; + theValue = this.KaipiaoshenqingId; + } + + + else if ("Hexiaomoney".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 28) + { + this.Hexiaomoney = isChange ? MyConvert.ConvertToDecimal(value) : Hexiaomoney; + theValue = this.Hexiaomoney; + } + + + + else if ("Creater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 14) + { + this.Creater = isChange ? MyConvert.ConvertToString(value) : Creater; + theValue = this.Creater; + } + else if ("CreateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 15) + { + this.CreateTime = isChange ? MyConvert.ConvertToDateTime(value) : CreateTime; + theValue = this.CreateTime; + } + else if ("Updater".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 16) + { + this.Updater = isChange ? MyConvert.ConvertToString(value) : Updater; + theValue = this.Updater; + } + else if ("LastUpdateTime".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 17) + { + this.LastUpdateTime = isChange ? MyConvert.ConvertToDateTime(value) : LastUpdateTime; + theValue = this.LastUpdateTime; + } + + + + + + + return theValue; + } + + #endregion + } +} diff --git a/CY_ECommercePlatform/CY.SQLDAL/CY.SQLDAL.csproj b/CY_ECommercePlatform/CY.SQLDAL/CY.SQLDAL.csproj index 15fd216..0890bf0 100644 --- a/CY_ECommercePlatform/CY.SQLDAL/CY.SQLDAL.csproj +++ b/CY_ECommercePlatform/CY.SQLDAL/CY.SQLDAL.csproj @@ -185,6 +185,7 @@ <Compile Include="OA\OA_DepartmentDAL.cs" /> <Compile Include="OA\OA_DocumentDAL.cs" /> <Compile Include="OA\OA_DocumentDicDAL.cs" /> + <Compile Include="OA\OA_KaipiaoJineQuerenDAL.cs" /> <Compile Include="OA\OA_KaipiaonewcuishouDAL.cs" /> <Compile Include="OA\OA_KaipiaonewDAL.cs" /> <Compile Include="OA\OA_KaipiaonewhuikuanDAL.cs" /> diff --git a/CY_ECommercePlatform/CY.SQLDAL/EC/EC_OrderBasicDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/EC/EC_OrderBasicDAL.cs index bbf428f..2bb2c7f 100644 --- a/CY_ECommercePlatform/CY.SQLDAL/EC/EC_OrderBasicDAL.cs +++ b/CY_ECommercePlatform/CY.SQLDAL/EC/EC_OrderBasicDAL.cs @@ -1920,6 +1920,59 @@ } + + + /// <summary> + /// 鏀舵(绾夸笅杞处銆佺幇閲�) + /// </summary> + /// <param name="orderId">璁㈠崟缂栧彿</param> + /// <param name="firmAccountRecord">鎿嶄綔璁板綍</param> + /// <returns></returns> + public bool ReceiveMoneyToQueren(int orderId, OA_FirmAccountRecord firmAccountRecord) + { + bool isWin = false; + if (0 >= orderId || !firmAccountRecord.Money.HasValue) + return false; + else + ; + if ( 0 > firmAccountRecord.Money.Value) + return false; + else + ; + try + { + OA_FirmAccountRecordDAL oA_FirmAccountRecordDAL = new OA_FirmAccountRecordDAL(_dataBase); + using (TransactionScope tran = new TransactionScope()) + { + + + //鏇存柊璁㈠崟鏀粯閲戦 + isWin = this.UpdateOrderPayedMoney(orderId, -1, firmAccountRecord.Money.Value); + if (!isWin) + { + return isWin; + } + else + ; + //鏇存柊璁㈠崟鐘舵�� + isWin = this.UpdateOrderPayState(orderId); + if (!isWin) + { + return isWin; + } + else + ; + tran.Complete(); + } + } + catch (Exception ex) + { + throw ex; + } + return isWin; + + } + /// <summary> /// 鏀舵(澶栧崗棰勪粯娆俱�佸鎴烽浠樻) /// </summary> diff --git a/CY_ECommercePlatform/CY.SQLDAL/OA/OA_KaipiaoJineQuerenDAL.cs b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_KaipiaoJineQuerenDAL.cs new file mode 100644 index 0000000..2f4c03d --- /dev/null +++ b/CY_ECommercePlatform/CY.SQLDAL/OA/OA_KaipiaoJineQuerenDAL.cs @@ -0,0 +1,289 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using CY.IDAL; +using System.Data.SqlClient; +using System.Data; +using CY.Model; +using System.Transactions; + + +namespace CY.SQLDAL +{ + public class OA_KaipiaoJineQuerenDAL : IOA_KaipiaoJineQuerenDAL + { + + private Database _dataBase = null; + #region 甯搁噺 + /// <summary> + /// 鏌ヨ鐩爣 + /// </summary> + const string SELECTTARGET = " t.* "; + /// <summary> + /// 鏌ヨ鏉ユ簮 + /// </summary> + const string FROMSOUCEBEFORE = " ( select distinct ok.* , " + + " oe.CompanyName as BuyerName, os.Name as BusinessManager " + + " from [OA_KaipiaoJineQueren] ok inner join [OA_CorporateClients] oe on oe.Keyid = ok.[BuyerId] " + + + + " left join [OA_Staff] os on ok.BusinessManagerId = os.Keyid " + + + + " where 0=0 "; + const string FROMSOUCEEND = ") as t "; + /// <summary> + /// 鍒嗛〉榛樿鎺掑簭瀛楁 + /// </summary> + const string ORDERBY = " CreateTime desc "; + #endregion + public OA_KaipiaoJineQuerenDAL() + { + _dataBase = new Database(); + } + + /// <summary> + /// 鏂板 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public bool InserModel(Infrastructure.Domain.IAggregateRoot model) + { + Model.OA_KaipiaoJineQueren trueModel = model as Model.OA_KaipiaoJineQueren; + if (trueModel == null) + { + return false; + } + + IList<SqlParameter> sqlParms = new List<SqlParameter>() + { + + new SqlParameter("@FirmId",trueModel.FirmId), + new SqlParameter("@BuyerId",trueModel.BuyerId), + new SqlParameter("@BusinessManagerId",trueModel.BusinessManagerId.HasValue?trueModel.BusinessManagerId.Value:0), + new SqlParameter("@Fukuanmoney",trueModel.Fukuanmoney.HasValue?trueModel.Fukuanmoney.Value:new decimal(0)), + new SqlParameter("@Hexiaomoney",trueModel.Hexiaomoney.HasValue?trueModel.Hexiaomoney.Value:new decimal(0)), + new SqlParameter("@OperationalMatters",string.IsNullOrEmpty(trueModel.OperationalMatters)?"":trueModel.OperationalMatters), + new SqlParameter("@Querenstatus",trueModel.Querenstatus.HasValue?trueModel.Querenstatus.Value:0), + new SqlParameter("@CreateTime",trueModel.CreateTime), + new SqlParameter("@Updater",trueModel.Updater), + new SqlParameter("@LastUpdateTime",trueModel.LastUpdateTime), + new SqlParameter("@Creater",trueModel.Creater), + + }; + string sql = "Insert Into OA_KaipiaoJineQueren ([FirmId],[BuyerId],[BusinessManagerId],Fukuanmoney,Hexiaomoney,OperationalMatters,Querenstatus, [Creater],[CreateTime],[Updater],[LastUpdateTime])" + + " Values ( @FirmId,@BuyerId, @BusinessManagerId,@Fukuanmoney,@Hexiaomoney,@OperationalMatters,@Querenstatus, @Creater,@CreateTime,@Updater,@LastUpdateTime)"; + try + { + _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); + } + catch (Exception ex) + { + throw ex; + } + return true; + } + + + + + /// <summary> + /// 鏂板 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public bool InserModeldetail(OA_KaipiaoJineQuerendetail trueModel) + { + + if (trueModel == null) + { + return false; + } + + IList<SqlParameter> sqlParms = new List<SqlParameter>() + { + + new SqlParameter("@KaipiaoJineQuerenId",trueModel.KaipiaoJineQuerenId.HasValue?trueModel.KaipiaoJineQuerenId.Value:0), + new SqlParameter("@KaipiaoshenqingId",trueModel.KaipiaoshenqingId), + new SqlParameter("@Hexiaomoney",trueModel.Hexiaomoney.HasValue?trueModel.Hexiaomoney.Value:new decimal(0)), + + new SqlParameter("@CreateTime",trueModel.CreateTime), + new SqlParameter("@Updater",trueModel.Updater), + new SqlParameter("@LastUpdateTime",trueModel.LastUpdateTime), + new SqlParameter("@Creater",trueModel.Creater), + + }; + string sql = "Insert Into OA_KaipiaoJineQuerendetail ([KaipiaoJineQuerenId],[KaipiaoshenqingId],Hexiaomoney, [Creater],[CreateTime],[Updater],[LastUpdateTime])" + + " Values ( @KaipiaoJineQuerenId,@KaipiaoshenqingId,@Hexiaomoney, @Creater,@CreateTime,@Updater,@LastUpdateTime)"; + try + { + _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); + } + catch (Exception ex) + { + throw ex; + } + return true; + } + + /// <summary> + /// 淇敼 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public bool UpdateModel(Infrastructure.Domain.IAggregateRoot model) + { + Model.OA_KaipiaoJineQueren trueModel = model as Model.OA_KaipiaoJineQueren; + if (trueModel == null) + { + return false; + } + + + + IList<SqlParameter> sqlParms = new List<SqlParameter>() + { + + new SqlParameter("@Keyid",trueModel.Keyid), + new SqlParameter("@FirmId",trueModel.FirmId), + new SqlParameter("@BuyerId",trueModel.BuyerId), + new SqlParameter("@BusinessManagerId",trueModel.BusinessManagerId.HasValue?trueModel.BusinessManagerId.Value:0), + new SqlParameter("@Fukuanmoney",trueModel.Fukuanmoney.HasValue?trueModel.Fukuanmoney.Value:new decimal(0)), + new SqlParameter("@Hexiaomoney",trueModel.Hexiaomoney.HasValue?trueModel.Hexiaomoney.Value:new decimal(0)), + new SqlParameter("@OperationalMatters",string.IsNullOrEmpty(trueModel.OperationalMatters)?"":trueModel.OperationalMatters), + new SqlParameter("@Querenstatus",trueModel.Querenstatus.HasValue?trueModel.Querenstatus.Value:0), + new SqlParameter("@CreateTime",trueModel.CreateTime), + new SqlParameter("@Updater",trueModel.Updater), + new SqlParameter("@LastUpdateTime",trueModel.LastUpdateTime), + new SqlParameter("@Creater",trueModel.Creater), + + + + + }; + string sql = "Update OA_KaipiaoJineQueren Set [FirmId]=@FirmId,[BuyerId]=@BuyerId,[BusinessManagerId]=@BusinessManagerId,Fukuanmoney=@Fukuanmoney,Hexiaomoney=@Hexiaomoney,OperationalMatters=@OperationalMatters,Querenstatus=@Querenstatus, [Creater]=@Creater,[CreateTime]=@CreateTime,[Updater]=@Updater,[LastUpdateTime]=@LastUpdateTime where [Keyid] =@Keyid "; + + try + { + _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); + } + catch (Exception ex) + { + throw ex; + } + return true; + } + + /// <summary> + /// 鏍规嵁缂栧彿鑾峰緱淇℃伅 + /// </summary> + /// <param name="Keyid">缂栧彿</param> + /// <returns></returns> + public OA_KaipiaoJineQueren GetModelByKeyid(Guid? keyid) + { + try + { + string condition = " "; + if (!keyid.Equals(Guid.Empty)) + { + condition = " Keyid='" + keyid + "'"; + } + else + { + return null; + } + + // return null;//閿欒鏁版嵁杩斾細绌� + + IList<OA_KaipiaoJineQueren> result = _dataBase.SelectModel<OA_KaipiaoJineQueren>("*", "OA_KaipiaoJineQueren", condition) as IList<OA_KaipiaoJineQueren>;//鎵ц鏌ヨ + + return (null == result || result.Count == 0) ? null : result[0];//杩斿洖缁撴灉 + } + catch (Exception ex) + { + throw ex; + } + } + + + /// <summary> + /// 鍏ㄩ儴鏌ヨ + /// </summary> + /// <param name="query"></param> + /// <returns></returns> + public IEnumerable<Model.OA_KaipiaoJineQueren> SelectAllModel(Infrastructure.Query.Query query) + { + return _dataBase.SelectModel<Model.OA_KaipiaoJineQueren>(" * ", " OA_KaipiaoJineQueren ") as IList<Model.OA_KaipiaoJineQueren>;//鎵ц鏌ヨ + } + + /// <summary> + /// 鍏ㄩ儴鏌ヨ + /// </summary> + /// <param name="query"></param> + /// <returns></returns> + public IEnumerable<Model.OA_KaipiaoJineQueren> GetModelBybuyerid(Guid buyerid) + { + return _dataBase.SelectModel<Model.OA_KaipiaoJineQueren>(" ok.* , oe.CompanyName as BuyerName, os.Name as BusinessManager ", " OA_KaipiaoJineQueren ok inner join [OA_CorporateClients] oe on oe.Keyid = ok.[BuyerId] left join [OA_Staff] os on ok.BusinessManagerId = os.Keyid ", " ok.BuyerId = '" + buyerid + "'") as IList<Model.OA_KaipiaoJineQueren>;//鎵ц鏌ヨ + } + + + /// <summary> + /// 鍒嗛〉鏌ヨ + /// </summary> + /// <param name="query"></param> + /// <param name="pagination"></param> + /// <returns></returns> + public IEnumerable<Model.OA_KaipiaoJineQueren> SelectModelPage(Infrastructure.Query.Query query, Infrastructure.Query.Pagination pagination) + { + if (null == pagination || null == query || null == query.Criteria || 1 > query.Criteria.Count) + return null; + //query.Criteria 棣栦釜鍏冪礌蹇呴』鏄帓搴忓瓧娈碉紝鍏跺�间负缁撴灉鎺掑簭瀛楁 + + int maxParamIndex = query.Criteria.Count - 1;//鏈�澶х储寮� + + string[] orderbys = new string[] { ORDERBY }; + string resultOrderBy = "";//缁撴灉闆嗘帓搴忔柟寮� + + if ("@orderBy".Equals(query.Criteria[maxParamIndex].PropertyName)) + { + orderbys = string.Format("{0}", query.Criteria[maxParamIndex].Value).Split(','); + resultOrderBy = query.Criteria[maxParamIndex].Value.ToString();//= 1 == orderbys.Length ? resultOrderBy : orderbys[1]; + } + string fromSouce = string.Format("{0}{1}{2}", FROMSOUCEBEFORE, query.Criteria[0].Value, FROMSOUCEEND);//鎷艰鏉′欢 + + + return _dataBase.SelectModelPage<Model.OA_KaipiaoJineQueren>(pagination, SELECTTARGET, fromSouce, orderbys[0], resultOrderBy); + } + + /// <summary> + /// 鍒犻櫎 + /// </summary> + /// <param name="model"></param> + /// <returns></returns> + public bool DeleteModel(Infrastructure.Domain.IAggregateRoot model) + { + Model.OA_KaipiaoJineQueren trueModel = model as Model.OA_KaipiaoJineQueren; + if (trueModel == null) + { + return false; + } + IList<SqlParameter> sqlParms = new List<SqlParameter>() + { + new SqlParameter("@Keyid",trueModel.Keyid) + }; + string sql = "Delete OA_KaipiaoJineQueren Where [Keyid] = @Keyid "; + + + try + { + _dataBase.ExecuteSql(sql, sqlParms.ToArray<SqlParameter>()); + } + catch (Exception ex) + { + throw ex; + } + return true; + } + } +} \ No newline at end of file diff --git a/CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj b/CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj index 49d4d82..176aa57 100644 --- a/CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj +++ b/CY_ECommercePlatform/CY.WebForm/CY.WebForm.csproj @@ -1883,6 +1883,7 @@ <Content Include="Pages\business\BackVisitNoteEdit.aspx" /> <Content Include="Pages\business\BargainPrice.aspx" /> <Content Include="Pages\business\BargainPriceByFirm.aspx" /> + <Content Include="Pages\business\InvoicingWeiquerenshouru.aspx" /> <Content Include="Pages\business\InvoicingHuikuan.aspx" /> <Content Include="Pages\business\InvoicingCuishou.aspx" /> <Content Include="Pages\business\kaipiaoKehu.aspx" /> @@ -2036,9 +2037,11 @@ <Content Include="Pages\common\U_Info.ascx" /> <Content Include="Pages\common\U_Link.ascx" /> <Content Include="Pages\common\U_Login.ascx" /> + <Content Include="Pages\financial\DepositsCustomershouruqueren.aspx" /> <Content Include="Pages\financial\DepositsCustomerFapiao.aspx" /> <Content Include="Pages\financial\FirmAccountPrint.aspx" /> <Content Include="Pages\financial\FirmAccountPrintTable.aspx" /> + <Content Include="Pages\financial\InvoicingShouruqueren.aspx" /> <Content Include="Pages\financial\MemberOrderMoneyReceive.aspx" /> <Content Include="Pages\financial\MemberOrderPayList.aspx" /> <Content Include="Pages\financial\OrderFinancialPrint.aspx" /> @@ -3291,6 +3294,13 @@ <Compile Include="Pages\business\BargainPriceByFirm.aspx.designer.cs"> <DependentUpon>BargainPriceByFirm.aspx</DependentUpon> </Compile> + <Compile Include="Pages\business\InvoicingWeiquerenshouru.aspx.cs"> + <DependentUpon>InvoicingWeiquerenshouru.aspx</DependentUpon> + <SubType>ASPXCodeBehind</SubType> + </Compile> + <Compile Include="Pages\business\InvoicingWeiquerenshouru.aspx.designer.cs"> + <DependentUpon>InvoicingWeiquerenshouru.aspx</DependentUpon> + </Compile> <Compile Include="Pages\business\InvoicingHuikuan.aspx.cs"> <DependentUpon>InvoicingHuikuan.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> @@ -4362,6 +4372,13 @@ <Compile Include="Pages\common\U_Login.ascx.designer.cs"> <DependentUpon>U_Login.ascx</DependentUpon> </Compile> + <Compile Include="Pages\financial\DepositsCustomershouruqueren.aspx.cs"> + <DependentUpon>DepositsCustomershouruqueren.aspx</DependentUpon> + <SubType>ASPXCodeBehind</SubType> + </Compile> + <Compile Include="Pages\financial\DepositsCustomershouruqueren.aspx.designer.cs"> + <DependentUpon>DepositsCustomershouruqueren.aspx</DependentUpon> + </Compile> <Compile Include="Pages\financial\DepositsCustomerFapiao.aspx.cs"> <DependentUpon>DepositsCustomerFapiao.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> @@ -4383,6 +4400,13 @@ <Compile Include="Pages\financial\FirmAccountPrintTable.aspx.designer.cs"> <DependentUpon>FirmAccountPrintTable.aspx</DependentUpon> </Compile> + <Compile Include="Pages\financial\InvoicingShouruqueren.aspx.cs"> + <DependentUpon>InvoicingShouruqueren.aspx</DependentUpon> + <SubType>ASPXCodeBehind</SubType> + </Compile> + <Compile Include="Pages\financial\InvoicingShouruqueren.aspx.designer.cs"> + <DependentUpon>InvoicingShouruqueren.aspx</DependentUpon> + </Compile> <Compile Include="Pages\financial\MemberOrderMoneyReceive.aspx.cs"> <DependentUpon>MemberOrderMoneyReceive.aspx</DependentUpon> <SubType>ASPXCodeBehind</SubType> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx index 846f031..2e67d17 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx +++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingConfirm.aspx @@ -97,6 +97,16 @@ } } + //鏀跺叆纭 + function ViewShouru(personId, shenqingleixing) { + if (shenqingleixing == "璁㈠崟寮�绁�") { + top.Dialog.open({ URL: "/Pages/financial/InvoicingShouruqueren.aspx?id=" + personId, Title: "璁㈠崟纭鏀跺叆", Width: 600, Height: 800 }); + } else { + top.Dialog.open({ URL: "/Pages/financial/DepositsCustomershouruqueren.aspx?Keyid=" + personId, Title: "瀹㈡埛棰勪粯娆剧‘璁ゆ敹鍏�", Width: 900, Height: 680 }); + } + + } + //鍥炴 function ViewFukuan(personId) { @@ -286,7 +296,7 @@ <th width="60"> 寮�绁ㄧ姸鎬� </th> - <th width="120"> + <th width="160"> 鎿嶄綔 </th> @@ -369,7 +379,8 @@ <a href='javascript:void(0)' title='浠樻鐧昏' class='a_under' onclick='ViewFukuan("<%#Eval("Keyid")%>")'> 浠樻鐧昏 </a> <a href='javascript:void(0)' title='鍌' class='a_under' onclick='ViewCuishou("<%#Eval("Keyid")%>")'> 鍌 </a> - <a href='javascript:void(0)' title='鏀舵' class='a_under' onclick='ViewShoukuan("<%#Eval("Keyid")%>","<%#Eval("Shenqingleixing")%>")'> 鏀舵 </a> + <a href='javascript:void(0)' title='鏀舵' class='a_under' onclick='ViewShoukuan("<%#Eval("Keyid")%>","<%#Eval("Shenqingleixing")%>")'> 鏀舵 </a> + <a href='javascript:void(0)' title='鏀舵' class='a_under' onclick='ViewShouru("<%#Eval("Keyid")%>","<%#Eval("Shenqingleixing")%>")'> 鏀跺叆纭 </a> </td> </tr> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx new file mode 100644 index 0000000..998f036 --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx @@ -0,0 +1,327 @@ +锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoicingWeiquerenshouru.aspx.cs" Inherits="CY.WebForm.Pages.business.InvoicingWeiquerenshouru" %> + + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head id="Head1" runat="server"> + <title>璁㈠崟鍒楄〃</title> + <uc:cmshead id="CMSHead1" runat="server" /> + <script src="../../js/business/Order.js" type="text/javascript"></script> + <script type="text/javascript"> + + /* + 纭鎵归噺寮�绁ㄧ敵璇� + */ + //function ToBatchPayList() { + + // var ids = ''; + // var cks = $("input[name='ckId']:checked"); + // if (cks.length == 0) { alertMsg('娌℃湁閫変腑浠讳綍椤癸紒'); return; } else { } + // var isCan = true; + // var BuyerId = ''; + // var SellerOrderIds = ''; + // var bbbb = true; + // var cccc = true; + // cks.each( + // function () { + + // var ckVal = $(this).val(); + + // var ckValJson = eval('(' + ckVal + ')'); + + // PayState = ckValJson.PayState; + // //鍓旈櫎宸茬粡寮�绁ㄧ敵璇风殑鍗曟嵁 + // if (BuyerId != '' && ckValJson.buyerId != BuyerId) { + // bbbb = false; + + // } else { + // BuyerId = ckValJson.buyerId; + // } + // if (ckValJson.Kaipiaoshenqing != 1) { + // cccc = false; + // } + + // ids = ids + ',' + ckValJson.id; + + + + // } + // ); + + // if (!bbbb) { + // alertMsg('蹇呴』鏄悓涓�瀹跺鎴凤紒'); + // return; + // } + // if (!cccc) { + // alertMsg('鏈夌姸鎬佷笉鏄紑绁ㄥ凡鐢宠鐨勮鍗曪紒'); + // return; + // } + + // if (!isCan) { + // // alertMsg('璇烽�夋嫨鏈彈鐞嗙殑璁㈠崟锛�'); + // } + // else { + // if (ids != '') { + // ids = ids.substring(1); + // SellerOrderIds = SellerOrderIds.substring(1); + + // } else { + // alertMsg('娌℃湁閫変腑鏈敮浠樿鍗曪紒'); + // return; + // } + + // top.Dialog.open({ URL: '/Pages/business/InvoicingWeiquerenshouruEdit.aspx?id=' + ids, Title: '鎵归噺纭鍙戠エ', Height: 400, Width: 600 }); + // } + //} + //鏌ョ湅瀹㈡埛璧勬枡 + function Viewkehuqianshou(Keyid, SellerOrderId) { + top.Dialog.open({ URL: "/Pages/business/OrderKehuqianshou.aspx?id=" + Keyid + "&SellerOrderId=" + SellerOrderId, Title: "瀹㈡埛绛炬敹", Width: 400, Height: 600 }); + } + + + //鏌ョ湅瀹㈡埛璧勬枡 + function Viewkehu(personId) { + top.Dialog.open({ URL: "/Pages/business/InvoicingWeiquerenshouruEdit.aspx?id=" + personId, Title: "纭鍙戠エ", Width: 400, Height: 600 }); + } + + //鍌敹 + function ViewCuishou(personId) { + top.Dialog.open({ URL: "/Pages/business/InvoicingCuishou.aspx?id=" + personId, Title: "鍌", Width: 600, Height: 800 }); + } + //鏀舵 + function ViewShoukuan(personId, shenqingleixing) { + if (shenqingleixing == "璁㈠崟寮�绁�") { + top.Dialog.open({ URL: "/Pages/financial/InvoicingShoukuan.aspx?id=" + personId, Title: "璁㈠崟鏀舵", Width: 600, Height: 800 }); + } else { + top.Dialog.open({ URL: "/Pages/financial/DepositsCustomerFapiao.aspx?Keyid=" + personId, Title: "瀹㈡埛棰勪粯娆惧瓨娆�", Width: 900, Height: 680 }); + } + + } + + + + /* +澶勭悊鍙楃悊璁㈠崟 +*/ + var ViewFukuan = function (orderId) { + top.Dialog.confirm('纭鍒犻櫎鏀跺叆?', function () { + window.submitUrl = '/Pages/business/InvoicingWeiquerenshouru.aspx'; + CallServer({ Target: "AcceptOrder", id: orderId }, function (data, textStatus) { + if ('1' == data) { + alertMsg('鎿嶄綔鎴愬姛锛�'); + RefreshDIVOpener(); //鍏抽棴椤甸潰 + } else { + alertMsg('-1' == data ? '鍒犻櫎杩囩▼涓彂鐢熷紓甯革紝璇烽噸鏂板垹闄わ紒' : '鍒犻櫎澶辫触锛�'); + //dialog.close(); + } + }); + }); + + + } + + + //鏌ョ湅瀹㈡埛璧勬枡 + function Viewkaipiao(Keyid, SellerOrderId) { + window.open("/Pages/business/InvoicingOrderPrint.aspx?Keyid=" + Keyid + "&SellerOrderId=" + SellerOrderId, '', ''); + } + //鏌ョ湅瀹㈡埛璧勬枡 + function View(personId) { + top.Dialog.open({ URL: "/Pages/business/CorporateClientsDetail.aspx?Keyid=" + personId, Title: "鏌ョ湅瀹㈡埛", Width: 900, Height: 580 }); + } + + + </script> + <style type="text/css"> + .tableStyleXS th { padding: 1px 0 1px 3px; background-image:none; border-bottom:1px solid #CCC; } + .tableStyleXS td { padding: 1px 0 1px 3px; } + .TableNewStyle select { width: 80px; } + .td_hide span { text-decoration: default; display: none; text-align: center; } + span.hand_no { cursor: default; display: block; font-size: 12px; } + span.hand_no:hover { text-decoration: none; } + span.hand_yes { cursor: pointer; display: block; font-size: 12px; } + .td_hide { cursor: pointer; } + .auto-style1 { + width: 39px; + } + .auto-style3 { + width: 13px; + } + .auto-style4 { + width: 55px; + } + .auto-style5 { + width: 26px; + } + .auto-style6 { + cursor: pointer; + width: 26px; + } + </style> +</head> +<body> + <form id="form1" runat="server"> + <div id="scrollContent" style="width: auto;"> + <div class="box1"> + <table class="TableNewStyle" style="width: 100%;"> + <tr> + <td class="ali03"> + 浠樻鏃ユ湡锛� + </td> + <td style="width: 215px"> + <input id="txtSQBeginDate" type="text" runat="server" class='date w80px' maxlength='10' />-<input id="txtSQEndDate" type="text" runat="server" class='date w80px' maxlength='10' /> + </td> + <td class="ali03"> + 浠樻鍗曚綅锛� + </td> + <td> + <input id='txtCustormerName' runat="server" maxlength='50' /> + </td> + <td class="ali03"> + 鏄惁纭锛� + </td> + <td> + <select keepdefaultstyle='true' id='selQuerenstatus' runat="server" > + <option value="">鍏ㄩ儴</option> + <option value="1">鏄�</option> + <option value="0">鍚�</option> + </select> + </td> + <td class="ali03"> + 涓氬姟缁忕悊锛� + </td> + <td> + <select keepdefaultstyle='true' id='selBusinessManager' runat="server" datatextfield='Name' datavaluefield='Keyid'> + </select> + </td> + + + <td > + <asp:button id="btn_Search" text="鏌ヨ" runat="server" /> <input type="button" value='閲嶇疆' onclick='document.body.innerHTML="";window.location=window.location;' /> + + </td> + + + + </tr> + + </table> + </div> + + <div clear="fl" dir="ltr"> + <table class="tableStyle tableStyleXS" useclick="false" usecheckbox="true" sortmode="false" id="test_table"> + <thead> + <tr> + <th width="25"> + 缂栧彿 + </th> + <th style="text-align: center;" width="70"> + 浠樻鏃ユ湡 + </th> + + + + <th style="text-align: center;"width="150"> + 浠樻鍗曚綅 + </th> + + + <th width="60"> + 閲戦 + </th> + <th width="60"> + 宸茬‘璁ら噾棰� + </th> + <th width="200"> + 浠樻璇存槑 + </th> + <th style="text-align: center;" width="70"> + 涓氬姟缁忕悊 + </th> + <th width="60"> + 鎿嶄綔 + + </th> + + + </tr> + </thead> + <tbody> + <asp:repeater id="rptData" runat="server"> + <itemtemplate> + <tr> + + <td> + <%#Container.ItemIndex +1 /*(UCPager1.PageSize *( UCPager1.PageIndex-1)+1)*/%> + </td> + <td> + <%#Eval("CreateTime", "{0:yyyy-MM-dd}")%> + + </td> + <td style="text-align: center;"> + <div style="width: 140px; word-wrap: break-word; text-align:justify;"> + <a href='javascript:void(0)' title='鐐瑰嚮鏌ョ湅 <%#Eval("BuyerName").ToString()%> 璧勬枡' class='a_under' onclick='View("<%#Eval("BuyerId")%>")'><%#Eval("BuyerName").ToString().Length > 10 ? (Eval("BuyerName").ToString().Substring(0, 10) + "..") : Eval("BuyerName").ToString()%></a> + </div> + </td> + + <td> + <%#Eval("Fukuanmoney", "{0:F}")%> + </td> + <td> + <%#Eval("Hexiaomoney", "{0:F}")%> + </td> + <td > + <%#Eval("OperationalMatters")%> + + + </td> + <td style="text-align: center;"> + <%#Eval("BusinessManager")%> + + + </td> + + + + + <td> + + <a href='javascript:void(0)' title='浠樻鐧昏' class='a_under' onclick='ViewFukuan("<%#Eval("Keyid")%>")'> 鍒犻櫎 </a> + + </td> + + </tr> + </itemtemplate> + </asp:repeater> + </tbody> + <tr> + <td colspan="3"> + 鍚堣 + </td> + + + <td > + <span id="heji" runat="server" ></span> + </td> + <td > + <span id="heji1" runat="server" ></span> + </td> + <td colspan="3"> + + </td> + + + + </tr> + + </table> + <uc:ucpager id="UCPager1" runat="server" /> + </div> + </div> + </form> +</body> + <script type="text/javascript" language="javascript"> + + + </script> +</html> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.cs new file mode 100644 index 0000000..56f0cb4 --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.cs @@ -0,0 +1,774 @@ +锘�/** +* OrderList.aspx.cs +* +* 鍔� 鑳斤細 璁㈠崟鍒楄〃 +* 绫� 鍚嶏細 OrderList +* +* Ver 鍙樻洿鏃ユ湡 璐熻矗浜� 鍙樻洿鍐呭 +* 鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹� +* V0.01 2013-5-6 9:16 鍚村磶鍧� 鍒濈増 +* V0.02 2013-5-6 18:02 鍚村磶鍧� 瀹屾垚鍒嗛〉鏌ヨ +* V0.03 2013-5-7 17:28 鍚村磶鍧� 澧炲姞璁㈠崟鐘舵�佽缃�(缃负锛氱敓浜с�佸畬鎴�)骞跺姞涓婁互闄愬埗(濡�:绾夸笂璁㈠崟涓嶅彲缃负瀹屾垚)銆� +* 澧炲姞鎵归噺鍒犻櫎骞朵簣浠ラ檺鍒�(鍙兘鍒犻櫎鏈彈鐞嗙殑鍘傚晢鏂板璁㈠崟)銆� +* 澧炲姞鍙楃悊鎿嶄綔骞跺姞浠ラ檺鍒�(鍙湁鏈彈鐞嗙殑璁㈠崟鎵嶈兘鍙楃悊) +* +* +* +* +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using CY.BLL.EC; +using CY.Model; +using CY.BLL.Sys; +using CY.Infrastructure.Common; +using CY.BLL; +using CY.WebForm.Pages.common; +using System.Transactions; + +namespace CY.WebForm.Pages.business +{ + public partial class InvoicingWeiquerenshouru : BasePage + { + EC_OrderBasicBLL _eC_OrderBasicBLL = null; + OA_StaffBLL bll_OA_StaffBLL = null; + LF_OrderFileBLL _lF_OrderFileBLL = null; + EC_OrderBLL _eC_OrderBLL = null; + OA_KaipiaoJineQuerenBLL oA_KaipiaoJineQuerenBLL = null; + + /// <summary> + /// 鍒濆鍖栨瀯閫� + /// </summary> + public InvoicingWeiquerenshouru() + { + _eC_OrderBasicBLL = new EC_OrderBasicBLL(); + bll_OA_StaffBLL = new OA_StaffBLL(); + _lF_OrderFileBLL = new LF_OrderFileBLL(); + _eC_OrderBLL = new EC_OrderBLL(); + oA_KaipiaoJineQuerenBLL = new OA_KaipiaoJineQuerenBLL(); + } + + /// <summary> + /// 鍔犺浇浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + protected void Page_Load(object sender, EventArgs e) + { + try + { + if (Request["downId"] != null) + { + int iDownId = Convert.ToInt32(Request["downId"]); + LF_OrderFile model = _lF_OrderFileBLL.GetModel(iDownId); + model.FileState = 1; + _lF_OrderFileBLL.UpdateModel(model); + string fileName = "";//瀹㈡埛绔繚瀛樼殑鏂囦欢鍚� + string filePath = "";//璺緞 + if (model != null) + { + fileName = model.FileName;//瀹㈡埛绔繚瀛樼殑鏂囦欢鍚� + filePath = model.FilePath;//璺緞 + } + else + { + JavaScript.MessageBox("鏂囦欢涓嶅瓨鍦�", this); + return; + } + System.IO.FileInfo fileInfo = new System.IO.FileInfo(filePath); + if (fileInfo.Exists == true) + { + const long ChunkSize = 102400;//100K 姣忔璇诲彇鏂囦欢锛屽彧璇诲彇100K锛岃繖鏍峰彲浠ョ紦瑙f湇鍔″櫒鐨勫帇鍔� + byte[] buffer = new byte[ChunkSize]; + Response.Clear(); + System.IO.FileStream iStream = System.IO.File.OpenRead(filePath); + long dataLengthToRead = iStream.Length;//鑾峰彇涓嬭浇鐨勬枃浠舵�诲ぇ灏� + Response.ContentType = "application/octet-stream"; + Response.AddHeader("Content-Disposition", "attachment; filename=" + HttpUtility.UrlEncode(fileName)); + while (dataLengthToRead > 0 && Response.IsClientConnected) + { + int lengthRead = iStream.Read(buffer, 0, Convert.ToInt32(ChunkSize));//璇诲彇鐨勫ぇ灏� + Response.OutputStream.Write(buffer, 0, lengthRead); + Response.Flush(); + dataLengthToRead = dataLengthToRead - lengthRead; + } + Response.Close(); + } + Response.Redirect("/Pages/business/OrderListBatchOperation.aspx"); + return; + } + switch (Request["Target"]) + { + case "deleteOrderAll2": + AcceptAll2(); + break; + case "deleteOrderAll3": + AcceptAll3(); + break; + case "AcceptOrder": + Accept(); + break; + case "AcceptOrderAll": + AcceptAll(); + break; + case "ChangeState": + //ChangeOrderState(); + break; + case "BatchDelete": + CY.WebForm.cs.WebUtil.DeleteData(_eC_OrderBasicBLL.DeleteDataByIds, CurrentUser.ShortName);//璋冪敤閫氱敤鍒犻櫎鏂规硶 + break; + case "BatchToOver": + UpdataState(-1);//璁剧疆鐘舵�佷负瀹屾垚(涓嶈兘鏄�1'鏈彈鐞�'鎴�2'宸插彈鐞�') + break; + case "BatchToProduction": + //UpdataState(3);//璁剧疆鐘舵�佷负鐢熶骇涓�(涓嶈兘鏄�1'鏈彈鐞�'鎴�2'宸插彈鐞�') + break; + case "BatchToSend": + UpdataState(4);//璁剧疆鐘舵�佷负宸插畬宸� (涓嶈兘鏄�1'鏈彈鐞�'鎴�2'宸插彈鐞�') + break; + case "ToAccountDelay": + Delay(1);//璇锋眰鎵撴寤舵湡 + break; + case "DeliveryDelay": + Delay(2);//璇锋眰浜よ揣寤舵湡 + break; + case "OrderRepeal": + Delay(3);//璇锋眰鎾ゅ崟 + break; + case "ReplyRequest"://绛斿璁㈠崟璇锋眰 + RequestReply(); + break; + case "RetireOrderBySeller": //鍗栧鐩存帴鎾ゅ崟锛屾垨鑰� + RetireOrderBySeller(); + break; + case "CanPrintAwb": + CanPrintAwb(); + break; + default: + Page_Load_Default(); + return; + } + } + catch (Exception ex) + { + PAGEHandleException(ex); + Response.Clear(); + //Response.Write("鍙傛暟閿欒"); + Response.Write(ex.Message); + } + Response.End(); + } + + /// <summary> + /// 鍒ゆ柇鏄惁鍙互鎵归噺鎵撳嵃閫佽揣鍗� + /// </summary> + public void CanPrintAwb() + { + EC_AcceptWayByOrderBLL _AcceptWayByOrderBLL = new EC_AcceptWayByOrderBLL(); + string orderIds = Request["orderIds"].ToString(); + string[] orderIdArry = orderIds.Split(','); + bool IsFirst = true; + string firstAccepterAddress = string.Empty; + string result = string.Empty; + string jsonStr = "IsCan:'true'"; + string msg = "鍙湁閫佽揣涓婇棬涓旈�佽揣鍦板潃鐩稿悓鐨勮鍗曟墠鑳芥墦鍗伴�佽揣鍗�"; + foreach (string orderIdStr in orderIdArry) + { + int orderId = orderIdStr.ToInt32().Value; + EC_AcceptWayByOrder model = _AcceptWayByOrderBLL.GetModelByTargetId(orderId); + if (model == null) + continue; + if (IsFirst) + { + firstAccepterAddress = model.AccepterAddress.Trim(); + } + if (model.AcceptTypeId.Value != 106) + { + jsonStr = "IsCan:'false',Msg:'" + msg + "'"; + break; + } + if (model.AccepterAddress.Trim() != firstAccepterAddress) + { + jsonStr = "IsCan:'false',Msg:'" + msg + "'"; + break; + } + IsFirst = false; + } + result = "{" + jsonStr + "}"; + Response.Write(result); + } + + /// <summary> + /// 鏇存柊鐘舵�� + /// </summary> + private void UpdataState(int stateId) + { + Response.Clear(); + if (1 == stateId || 2 == stateId) + { + HttpContext.Current.Response.Write(-2); + return; + } + string paramValue = HttpContext.Current.Request["ids"]; + //string stateStr=HttpContext.Current.Request["state"]; + string remark = string.Format("{0}", Request["remark"]); + int? tempId; + //tempId = string.IsNullOrEmpty(stateStr)?null:MyConvert.ConvertToInt32(stateStr); + if (string.IsNullOrEmpty(paramValue)/*||!tempId.HasValue*/) + { + HttpContext.Current.Response.Write(-2); + return; + } + else + { + } + + //int stateId=tempId.Value; + string[] splitResult = paramValue.Split(','); + int i = -1; + + List<EC_OrderOperate> oprates = new List<EC_OrderOperate>(); + while (++i < splitResult.Length) + { + tempId = MyConvert.ConvertToInt32(splitResult[i]); + if (!tempId.HasValue) + { + HttpContext.Current.Response.Write(-2); + return; + } + else + { + } + oprates.Add(new EC_OrderOperate() + { + OperateType = stateId, + OrderId = tempId.Value, + Operator = CurrentUser.ShortName, + Remark = remark + }); + } + HttpContext.Current.Response.Write((_eC_OrderBasicBLL.UpdateOrderState(oprates.ToArray()) ? 1 : 0)); + } + + /// <summary> + /// 鍙楃悊璁㈠崟(鍏ㄩ儴璁㈠崟鍙楃悊) + /// </summary> + private void Accept() + { + Response.Clear(); + + int? orderId = string.IsNullOrEmpty(Request["id"]) ? null : MyConvert.ConvertToInt32(Request["id"]); + if (!orderId.HasValue ) + { + Response.Write("-2"); + return; + } + else + { + } + var a_KaipiaoJineQueren = new OA_KaipiaoJineQueren(); + a_KaipiaoJineQueren.Keyid = orderId.Value; + Response.Write(oA_KaipiaoJineQuerenBLL.DeleteModel(a_KaipiaoJineQueren) ? "1" : "0"); + } + + /// <summary> + /// 鎵归噺鍙楃悊璁㈠崟 + /// </summary> + public void AcceptAll() + { + Response.Clear(); + PayAbout payAbout = new PayAbout(); + payAbout.LoadNewestPaymentAccount(true); + double? commission = MyConvert.ConvertToDouble(CY.Config.WebInfo.Instance.FirmOrderAgencyFee); + string orderIds = string.Empty; + ; + if (Request["ids"] != null) + { + orderIds = Request["ids"].ToString(); + } + if (string.IsNullOrEmpty(orderIds) || !commission.HasValue) + { + Response.Write("-2"); + return; + } + else + { + } + Response.Write(_eC_OrderBasicBLL.AcceptOrderAll(orderIds, commission.Value) ? "1" : "0"); + } + + /// <summary> + /// 鏀瑰彉璁㈠崟鐘舵��(鏆傛椂涓嶅惎鐢�) + /// </summary> + private void ChangeOrderState() + { + Response.Clear(); + string idsStr = Request["ids"]; + string stateIdStr = Request["stateId"]; + string remark = string.Format("{0}", Request["remark"]); + int? stateId = string.IsNullOrEmpty(stateIdStr) ? null : MyConvert.ConvertToInt32(stateIdStr); + if (string.IsNullOrEmpty(idsStr) || !stateId.HasValue) + { + Response.Write("-2"); + return; + } + else + { + } + string[] ids = idsStr.Split(','); + + int i = -1; + int? tempId = null; + List<EC_OrderOperate> operaters = new List<EC_OrderOperate>(); + while (++i < ids.Length) + { + tempId = string.IsNullOrEmpty(ids[i]) ? null : MyConvert.ConvertToInt32(ids[i]); + if (!tempId.HasValue) + { + operaters = null; + break; + } + else + { + } + operaters.Add(new EC_OrderOperate() + { + OrderId = tempId.Value, + Operator = CurrentUser.ShortName, + OperateType = stateId.Value, + Remark = remark + }); + } + if (null == operaters) + { + Response.Write("-2"); + return; + } + else + { + } + Response.Write(_eC_OrderBasicBLL.UpdateOrderState(operaters.ToArray()) ? "1" : "0"); + } + + /// <summary> + /// 鍗栧閫�鍗� + /// </summary> + public void RetireOrderBySeller() + { + string orderidStr = Request["orderid"]; + string tovalueStr = Request["tovalue"]; + + int orderId = orderidStr.ToInt32().Value; + decimal retireMony = tovalueStr.ToDecimal2().Value; + string operatorName = CurrentUser.ShortName; + Response.Write(_eC_OrderBasicBLL.RetireOrderBySeller(orderId, retireMony, operatorName)); + } + + /// <summary> + /// 璇锋眰寤舵湡 + /// </summary> + /// <param name="typeId">璇锋眰绫诲瀷</param> + private void Delay(int typeId) + { + Response.Clear(); + string receiverStr = Request["receiver"]; + string orderidStr = Request["orderid"]; + string tovalueStr = Request["tovalue"]; + if (string.IsNullOrEmpty(receiverStr) || string.IsNullOrEmpty(orderidStr) || string.IsNullOrEmpty(tovalueStr)) + { + Response.Write(0); + return; + } + else + { + } + + int? orderid = MyConvert.ConvertToInt32(orderidStr); + int? tovalue = MyConvert.ConvertToInt32(tovalueStr); + Guid receiver = MyConvert.ConvertToGuid(receiverStr); + if (Guid.Empty == receiver || !orderid.HasValue || !tovalue.HasValue) + { + Response.Write(0); + return; + } + else + { + } + EC_OrderDialogue _eC_OrderDialogue = new EC_OrderDialogue(); + _eC_OrderDialogue.ReceiverId = receiver; + _eC_OrderDialogue.TargetOrder = orderid; + _eC_OrderDialogue.TargetValue = tovalue; + _eC_OrderDialogue.DialogueTypeId = typeId; + _eC_OrderDialogue.InitiatorId = CurrentUser.MemberId; + _eC_OrderDialogue.DialogueContent = string.Format("{0}", Request["dialoguecontent"]); + //寮�濮嬭姹� + Response.Write(_eC_OrderBasicBLL.OrderPropertyChangeRequest(_eC_OrderDialogue)); + } + + /// <summary> + /// 绛斿娓呭崟璇锋眰 + /// </summary> + private void RequestReply() + { + Response.Clear(); + string ridStr = Request["did"]; + string isAllowStr = Request["isAllow"]; + Guid rid = MyConvert.ConvertToGuid(ridStr); + bool? isAllow = Convert.ToBoolean(isAllowStr); + if (Guid.Empty == rid || !isAllow.HasValue) + { + Response.Write(0); + return; + } + else + { + } + Response.Write(_eC_OrderBasicBLL.OrderPropertyChangeReply(rid, CurrentUser.MemberId, isAllow.Value)); + } + + private void ToBatchRemove() + { + string orderidStr = Request["orderid"]; + string tovalueStr = Request["tovalue"]; + + int orderId = orderidStr.ToInt32().Value; + decimal retireMony = tovalueStr.ToDecimal2().Value; + string operatorName = CurrentUser.ShortName; + Response.Write(_eC_OrderBasicBLL.RetireOrderBySeller(orderId, retireMony, operatorName)); + } + /// <summary> + /// 榛樿鎵ц鏂规硶 + /// </summary> + private void Page_Load_Default() + { + UCPager1.AspNetPager.PageChanged += AspNetPager_PageChanged; + btn_Search.Click += btn_Search_Click; + // txtCommission.Value = CY.Config.WebInfo.Instance.FirmOrderAgencyFee; + List<EC_OrderDialogue> dialogues = _eC_OrderBasicBLL.SelectPropertyChangeRequest(CurrentUser.MemberId) as List<EC_OrderDialogue>; + + + if (!IsPostBack && !IsCallback) + { + Sys_DictionaryBLL _sys_DictionaryBLL = new Sys_DictionaryBLL();//瀛楀吀涓氬姟閫昏緫鎿嶄綔绫诲璞� + SysInquiry_PrintingTypeBLL _sysInquiry_PrintingTypeBLL = new SysInquiry_PrintingTypeBLL();//鍗板埛涓氬姟绫诲瀷涓氬姟閫昏緫鎿嶄綔绫诲璞� + + + + + + + + + + + + this.selBusinessManager.DataSource = bll_OA_StaffBLL.SelectListByFirmId(CurrentUser.MemberId, true, false); + this.selBusinessManager.DataTextField = "Name"; + this.selBusinessManager.DataValueField = "Keyid"; + this.selBusinessManager.DataBind(); + this.selBusinessManager.Items.Insert(0, new ListItem("鍏ㄩ儴", "")); + //this.selBusinessManager.Items.Insert(1, new ListItem(CurrentUser.ShortName, CurrentUser.ShortName)); + + this.txtSQBeginDate.Value = DateTime.Now.AddDays(-14).ToString("yyyy-MM-dd"); + this.txtSQEndDate.Value = DateTime.Now.ToString("yyyy-MM-dd"); + this.selQuerenstatus.Value = "0"; + //鍒濇鏁版嵁鍔犺浇 + btn_Search_Click(btn_Search, new EventArgs()); + } + } + + #region 鏌ヨ + + /// <summary> + /// 鎼滅储鎸夐挳鐐瑰嚮浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void btn_Search_Click(object sender, EventArgs e) + { + + + + UCPager1.AspNetPager.CurrentPageIndex = 1;//閲嶇疆椤垫暟 + //鍐嶆鏌ヨ + AspNetPager_PageChanged(UCPager1.AspNetPager, new EventArgs()); + } + + /// <summary> + /// 璁剧疆鏌ヨ鍙傛暟鏂规硶 + /// </summary> + /// <param name="target">璁剧疆鐩爣</param> + /// <param name="key">閿�</param> + /// <param name="value">鍊�</param> + private static void SetParamValue(Dictionary<int, object> target, int key, object value) + { + if (string.IsNullOrEmpty(string.Format("{0}", value))) + return; + else + { + } + + if (target.ContainsKey(key)) + { + target[key] = value; + } + else + { + target.Add(key, value); + } + } + + /// <summary> + /// 鍒嗛〉浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + private void AspNetPager_PageChanged(object sender, EventArgs e) + { + // UCPager1.AspNetPager.PageSize = 3; + + Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() + { + PageSize = UCPager1.AspNetPager.PageSize, + PageIndex = UCPager1.AspNetPager.CurrentPageIndex + }; + IEnumerable<OA_KaipiaoJineQueren> result = oA_KaipiaoJineQuerenBLL.SelectModelPage(pagination, CurrentUser.MemberId, this.txtSQBeginDate.Value, this.txtSQEndDate.Value, this.selBusinessManager.Value, this.txtCustormerName.Value, this.selQuerenstatus.Value ); + rptData.DataSource = result; + rptData.DataBind(); + + heji.InnerText = String.Format("{0:F2}", result.Sum(x => x.Fukuanmoney)); + heji1.InnerText = String.Format("{0:F2}", result.Sum(x => x.Hexiaomoney)); ; + + UCPager1.AspNetPager.RecordCount = pagination.RecordCount; + } + + /// <summary> + /// 鏌ヨ鍙傛暟 + /// </summary> + private Dictionary<int, object> SearchParam + { + get + { + return ViewState["SearchParam"] as Dictionary<int, object>; + } + set + { + ViewState["SearchParam"] = value; + } + } + + /// <summary> + /// 鏄惁鍙互鎿嶄綔 + /// </summary> + /// <param name="keyid"></param> + /// <param name="orderState"></param> + /// <param name="opType"></param> + /// <returns></returns> + public bool IsCanOpearte(object keyidObj, object orderStateObj, object outIdObj, object opTypeObj) + { + bool isCan = false; + int keyid = (int)keyidObj; + int orderState = (int)orderStateObj; + string opType = (string)opTypeObj; + int outId = (int)outIdObj; + if (orderState == -2) + { + return false; + } + if (opType == "鍥炶" || opType == "璇勪环" || opType == "鎶曡瘔") + { + if (orderState == 1) + { + isCan = false; + } + else + { + isCan = true; + } + } + else + { + if (outId > 0) + { + return false; + } + if (orderState == 0) + { + isCan = false; + } + else if (orderState == -1) + { + if (opType != "閫佽揣") + { + isCan = false; + } + else + { + isCan = true; + } + } + else + { + if (opType == "鍙楃悊") + { + if (orderState == 1) + { + isCan = true; + } + } + else + { + if (orderState == 1) + { + isCan = false; + } + else + { + if (opType == "鎾ゅ崟") + { + if (orderState == 4 || orderState == 5) + { + isCan = false; + } + else + { + isCan = true; + } + } + else + { + isCan = true; + } + } + } + } + } + return isCan; + } + + /// <summary> + /// 鏄惁宸茬粡鎿嶄綔 + /// </summary> + /// <param name="keyid"></param> + /// <param name="orderState"></param> + /// <param name="opType"></param> + /// <returns></returns> + public bool IsOpearted(object keyidObj, object orderStateObj, object opTypeObj) + { + int keyid = (int)keyidObj; + int orderState = (int)orderStateObj; + string opType = (string)opTypeObj; + return _eC_OrderBasicBLL.IsOpearted(keyid, orderState, opType); + } + + /// <summary> + /// 鎵归噺鍘婚櫎璁㈠崟 + /// </summary> + public void AcceptAll2() + { + Response.Clear(); + + string ids = string.Empty; + + if (Request["ids"] != null) + { + ids = Request["ids"].ToString(); + } + + + string[] idsArray = ids.Split(','); + using (TransactionScope scope = new TransactionScope()) + { + if (idsArray != null && idsArray.Length > 0) + { + for (int i = 0; i < idsArray.Length; i++) + { + bool result = true; + EC_OrderExtend model = new EC_OrderExtend(); + model.Keyid = idsArray[i].ToInt32(); + model.QuchudingdanCreater = CurrentUser.TrueMemberId; + model.QuchudingdanTime = DateTime.Now; + model.Quchudingdan = 1; + + result = _eC_OrderBLL.OldUpdateQuchudingdan(model); + + if (!result) + { + //Page_Load_Default(); + Response.Write("-2"); + return; + } + } + } + + scope.Complete(); + } + + + // Page_Load_Default(); + Response.Write("1"); + + + + } + + + /// <summary> + /// 鎵归噺寮�绁ㄧ敵璇� + /// </summary> + public void AcceptAll3() + { + Response.Clear(); + + string ids = string.Empty; + + if (Request["ids"] != null) + { + ids = Request["ids"].ToString(); + } + + + string[] idsArray = ids.Split(','); + using (TransactionScope scope = new TransactionScope()) + { + + if (idsArray != null && idsArray.Length > 0) + { + DateTime kaipiaoshenqing = DateTime.Now; + for (int i = 0; i < idsArray.Length; i++) + { + bool result = true; + EC_OrderExtend model = new EC_OrderExtend(); + model.Keyid = idsArray[i].ToInt32(); + model.KaipiaoshenqingCreater = CurrentUser.TrueMemberId; + model.KaipiaoshenqingTime = kaipiaoshenqing; + model.Kaipiaoshenqing = 1; + + result = _eC_OrderBLL.OldUpdateKaipiaoshenqing(model); + + if (!result) + { + //Page_Load_Default(); + Response.Write("-2"); + return; + } + } + } + + scope.Complete(); + } + + + // Page_Load_Default(); + Response.Write("1"); + + + + } + #endregion + } +} \ No newline at end of file diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.designer.cs b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.designer.cs new file mode 100644 index 0000000..c87a462 --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/business/InvoicingWeiquerenshouru.aspx.designer.cs @@ -0,0 +1,134 @@ +锘�//------------------------------------------------------------------------------ +// <鑷姩鐢熸垚> +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆� +// </鑷姩鐢熸垚> +//------------------------------------------------------------------------------ + +namespace CY.WebForm.Pages.business +{ + + + public partial class InvoicingWeiquerenshouru + { + + /// <summary> + /// Head1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlHead Head1; + + /// <summary> + /// CMSHead1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; + + /// <summary> + /// form1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// <summary> + /// txtSQBeginDate 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtSQBeginDate; + + /// <summary> + /// txtSQEndDate 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtSQEndDate; + + /// <summary> + /// txtCustormerName 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtCustormerName; + + /// <summary> + /// selQuerenstatus 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlSelect selQuerenstatus; + + /// <summary> + /// selBusinessManager 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlSelect selBusinessManager; + + /// <summary> + /// btn_Search 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.WebControls.Button btn_Search; + + /// <summary> + /// rptData 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.WebControls.Repeater rptData; + + /// <summary> + /// heji 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl heji; + + /// <summary> + /// heji1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl heji1; + + /// <summary> + /// UCPager1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::CY.WebForm.Pages.common.UCPager UCPager1; + } +} diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx new file mode 100644 index 0000000..8067b0b --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx @@ -0,0 +1,256 @@ +锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DepositsCustomershouruqueren.aspx.cs" Inherits="CY.WebForm.Pages.financial.DepositsCustomershouruqueren" %> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head runat="server"> + <title>瀹㈡埛棰勪粯娆惧瓨娆�</title> + <uc:CMSHead ID="CMSHead1" runat="server" /> + <script language="javascript" type="text/javascript"> + function ChangeThisType(obj) { + $("#selAccountName").html("<option value=''>璇烽�夋嫨</option>"); + $.ajax({ + url: "/Pages/financial/FirmAccountExpensesEdit.aspx", + type: "POST", + dataType: "html", + data: { TypeName: $(obj).val(), DataType: "change" }, + global: false, + cache: false, + success: function (data) { + var myobj = eval('(' + data + ')'); + if (myobj != null && myobj.length > 0) { + for (var i = 0; i < myobj.length; i++) { + var city_keyid = myobj[i].Keyid; + var city_name = myobj[i].AccountName + "-" + myobj[i].UserName; + var option = ""; + option = "<option value = '" + city_keyid + "'>" + city_name + "</option>"; + $(option).appendTo($("#selAccountName")); + } + } + } + }); + } + + function jisuanheji() { + + var cks = $("input[name='ckId']:checked"); + + if (cks.length == 0) { $("#NoMoney").text("0"); return; } else { } + + var unPayedMoney = 0; + + + cks.each( + function () { + var ckVal = $(this).val(); + + var ckValJson = eval('(' + ckVal + ')'); + + unPayedMoney += (parseFloat(ckValJson.fukuanmoney) - parseFloat(ckValJson.hexiaomoney)); + + + + } + ); + + $("#NoMoney").text(unPayedMoney); + + } + + function CheckStaff() { + + + + var ids = ''; + var cks = $("input[name='ckId']:checked"); + if (cks.length == 0) { + alertMsg('娌℃湁閫変腑浠讳綍椤癸紒'); + return false; + } + else { + } + + + + + + + cks.each( + function () { + var ckVal = $(this).val(); + + var ckValJson = eval('(' + ckVal + ')'); + + ids = ids + ',' + ckValJson.id; + + + } + ); + + + $("#ids").val(ids); + return true; + + } + + </script> + <script type="text/javascript"> + $(function () { + + + $('.hand').click(function () { + jisuanheji(); + }); + + }); + </script> +</head> +<body> + <form id="form1" runat="server" class="form"> + <div id="scrollContent"> + <div class="box"> + <table class="tableStyle"> + <tr> + <td class="ali03 "> + 瀹㈡埛鍚嶇О锛� + </td> + <td> + <span id="spanCustomName" runat="server"></span> + </td> + <td class="ali03 "> + 棰勪粯娆句綑棰濓細 + </td> + <td> + <span id="spanCustomMoney" runat="server" class="moneystyle"></span> + </td> + <td class="ali03 "> + 鍙戠エ鍙凤細 + </td> + <td> + <span id="spanFapiaohao" runat="server" class="moneystyle"></span> + </td> + + + </tr> + <tr> + <td class="ali03 "> + 鍙戠エ閲戦锛� + </td> + <td> + <span id="spankpmoney" runat="server" class="moneystyle"></span> + </td> + <td class="ali03 "> + 宸插瓨閲戦锛� + </td> + <td> + <span id="spanKehumoney" runat="server" class="moneystyle"></span> + </td> + <td class="ali03 "> + 瀛樺叆閲戦锛� + </td> + <td> + <input runat="server" id="txtOperatMoney" type="text" class="w80px req float" maxlength="18" /> + </td> + </tr> + + <tr> + <td class="ali03"> + </td> + <td colspan="5"> + <asp:Button ID="btn_Submit" Text="纭鏀跺叆" runat="server" OnClick="btn_Submit_Deposits" OnClientClick="if(CheckStaff())return true;else return false; " /> + <input type="hidden" id="ids" runat="server" /> + </td> + </tr> + </table> + </div> + <table class="tableStyle" useclick="false" usecheckbox="true" sortmode="false" id="test_table" > + <thead> + <tr> + <th width="25"> + </th> + <th width="25"> + 缂栧彿 + </th> + <th style="text-align: center;" > + 瀹㈡埛鍚嶇О + </th> + + <th style="text-align: center;"width="70"> + 鏀舵鏃ユ湡 + </th> + + <th width="60"> + 閲戦 + </th> + <th width="60"> + 宸茬‘璁� + </th> + <th width="60"> + 鏈‘璁� + </th> + + + </tr> + </thead> + <tbody> + <asp:repeater id="rptData" runat="server"> + <itemtemplate> + <tr> + <td> + <input type="checkbox" name='ckId' value_keyid="<%#Eval("Keyid")%>" value="{ + id:<%#Eval("Keyid")%>, + buyerId:'<%#Eval("BuyerId")%>', + + fukuanmoney:<%#Eval("Fukuanmoney")%>, + querenstatus:<%#Eval("Querenstatus")%>, + + hexiaomoney:<%#Eval("Hexiaomoney")%>, + + }" id='ckBox<%#Container.ItemIndex%>' class='ckBox' onclick="jisuanheji();" /> + </td> + <td class="ItemIndex"> + <%#Container.ItemIndex +1 /*(UCPager1.PageSize *( UCPager1.PageIndex-1)+1)*/%> + </td> + <td style="text-align: center;"> + + <%#Eval("BuyerName")%> + + </td> + <td style="text-align: center;"> + + + <%#Eval("CreateTime", "{0:yyyy-MM-dd}")%> + + </td> + + + <td class="SumPrice"> + <%#Eval("FukuanMoney", "{0:F}")%> + </td> + + <td class="PayedMoney"> + <%#Eval("Hexiaomoney", "{0:F}")%> + </td> + <td class="UnPayedMoney"> + <%#Eval("WeiHexiaomoney","{0:F}")%> + </td> + + </tr> + </itemtemplate> + </asp:repeater> + </tbody> + + <tr class="StatisticsMoney"> + <td colspan="6" class="ali03" style="text-align:left;"> + 閫変腑鍚堣锛� + </td> + + <td class="ali01" > + <span id="NoMoney" runat="server" ></span> + </td> + + </tr> + </table> + </div> + </form> +</body> +</html> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.cs new file mode 100644 index 0000000..b83d811 --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.cs @@ -0,0 +1,274 @@ +锘縰sing System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using CY.BLL; +using CY.BLL.Sys; +using CY.Infrastructure.Query; +using CY.Infrastructure.Common; +using CY.Model; +using CY.BLL.OA; +using System.Transactions; + +namespace CY.WebForm.Pages.financial +{ + //鍚磋緣 + //瀹㈡埛棰勪粯娆惧瓨鍏� + public partial class DepositsCustomershouruqueren : BasePage + { + OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = null; + Sys_DictionaryBLL _Sys_DictionaryBLL = null; + OA_AdvanceMoneyRecordBLL bll_OA_AdvanceMoneyRecordBLL = null; + OA_SubjectSetBLL _OA_SubjectSetBLL = null; + OA_FirmAccountBLL _OA_FirmAccountBLL = null; + OA_FirmAccountRecordBLL _OA_FirmAccountRecordBLL = null; + OA_KaipiaoshenqingBLL oA_KaipiaoshenqingBLL = null; + OA_KaipiaoJineQuerenBLL oA_KaipiaoJineQuerenBLL = null; + OA_AdvanceMoneyRecordBLL oA_AdvanceMoneyRecordBLL = null; + //鍒濆鍖� + public DepositsCustomershouruqueren() + { + _Sys_DictionaryBLL = new Sys_DictionaryBLL(); + bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL(); + bll_OA_AdvanceMoneyRecordBLL = new OA_AdvanceMoneyRecordBLL(); + _Sys_DictionaryBLL = new Sys_DictionaryBLL(); + _OA_FirmAccountBLL = new OA_FirmAccountBLL(); + _OA_FirmAccountRecordBLL = new OA_FirmAccountRecordBLL(); + _OA_SubjectSetBLL = new OA_SubjectSetBLL(); + oA_KaipiaoshenqingBLL = new OA_KaipiaoshenqingBLL(); + oA_KaipiaoJineQuerenBLL = new OA_KaipiaoJineQuerenBLL(); + oA_AdvanceMoneyRecordBLL = new OA_AdvanceMoneyRecordBLL(); + } + + //椤甸潰鍔犺浇 + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindList(); + } + } + + //缁戝畾鏁版嵁 + private void BindList() + { + try + { + //绉戠洰鍚嶇О + //selSubject.DataSource = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "鍊�"); + //selSubject.DataBind(); + //selSubject.Items.Insert(0, new ListItem("璇烽�夋嫨", "")); + var shenqid = Request["Keyid"].ToGuid2(); + var kaipiaoshenqing = oA_KaipiaoshenqingBLL.GetModelByKeyid(shenqid); + + + //璐︽埛淇℃伅 + OA_CorporateClients m_OA_CorporateClients = bll_OA_CorporateClientsBLL.GetModel(kaipiaoshenqing.BuyerId); + this.spanCustomName.InnerText = m_OA_CorporateClients.CompanyName; + this.spanCustomMoney.InnerText = "锟� " + m_OA_CorporateClients.Prepayments.ToDecimal2Yen(); + + this.spanFapiaohao.InnerText = kaipiaoshenqing.Fapiaohao; + this.spankpmoney.InnerText = "锟� " + kaipiaoshenqing.kpmoney.ToDecimal2Yen(); + this.spanKehumoney.InnerText = "锟� " + kaipiaoshenqing.Kehumoney.ToDecimal2Yen(); + + var kpmoney = kaipiaoshenqing.kpmoney.HasValue ? kaipiaoshenqing.kpmoney.Value:0; + var Kehumoney = kaipiaoshenqing.Kehumoney.HasValue ? kaipiaoshenqing.Kehumoney.Value : 0; + this.txtOperatMoney.Value = (kpmoney - Kehumoney).ToString(); + + var oA_KaipiaoJineQuerens = oA_KaipiaoJineQuerenBLL.GetModelBybuyerid(kaipiaoshenqing.BuyerId).Where(x => x.Querenstatus == 0); + rptData.DataSource = oA_KaipiaoJineQuerens; + rptData.DataBind(); + } + catch (Exception ex) + { + PAGEHandleException(ex); + } + } + + //鍒嗛〉浜嬩欢 + protected void AspNetPager1_PageChanged(object src, EventArgs e) + { + BindList(); + } + + //鎻愪氦琛ㄥ崟 + protected void btn_Submit_Deposits(object sender, EventArgs e) + { + try + { + + var shenqid = Request["Keyid"].ToGuid2(); + var ids = this.ids.Value; + var kaipiaoshenqing = oA_KaipiaoshenqingBLL.GetModelByKeyid(shenqid); + + decimal? money = this.txtOperatMoney.Value.ToDecimal2(); + if ( money == null) + JavaScript.MessageBox("鎿嶄綔澶辫触", this); + else + { + var kpmoney = kaipiaoshenqing.kpmoney.HasValue ? kaipiaoshenqing.kpmoney.Value : 0; + var Kehumoney = kaipiaoshenqing.Kehumoney.HasValue ? kaipiaoshenqing.Kehumoney.Value : 0; + if (money<=0) + { + JavaScript.MessageBox("璇峰~鍐欏瓨鍏ラ噾棰�", this); + return; + } + if (money > (kpmoney -Kehumoney)) + { + JavaScript.MessageBox("鏈瀛樺叆閲戦澶т簬瀹㈡埛鏈粯娆�", this); + return; + } + var idssss = ids.Trim(',').Split(','); + + var idsssssint = new List<int>(); + foreach (var iddd in idssss) + { + idsssssint.Add(int.Parse(iddd)); + } + var oA_KaipiaoJineQuerens = oA_KaipiaoJineQuerenBLL.GetModelBybuyerid(kaipiaoshenqing.BuyerId).Where(x => x.Querenstatus == 0 && idsssssint.Contains(x.Keyid)); + + + var WeiHexiaomoney = oA_KaipiaoJineQuerens.Sum(x => x.WeiHexiaomoney); + + if (WeiHexiaomoney < money) + { + JavaScript.MessageBox("鏈鏀舵閲戦澶т簬鏈‘璁ゆ敹鍏�!", this); + return; + } + + bool isWin = false; + using (var scope = new TransactionScope(TransactionScopeOption.Required, +new TransactionOptions +{ + IsolationLevel = IsolationLevel.ReadCommitted, + Timeout = TransactionManager.MaximumTimeout +} +)) + { + + try + { + + + //鏇存柊纭鏀跺叆 + decimal weiReceiveMoney = money.Value; + foreach (var a_KaipiaoJineQueren in oA_KaipiaoJineQuerens) + { + if (a_KaipiaoJineQueren.WeiHexiaomoney <= weiReceiveMoney) + { + + var a_KaipiaoJineQuerendetail = new OA_KaipiaoJineQuerendetail(); + a_KaipiaoJineQuerendetail.KaipiaoJineQuerenId = a_KaipiaoJineQueren.Keyid; + a_KaipiaoJineQuerendetail.KaipiaoshenqingId = shenqid; + a_KaipiaoJineQuerendetail.Hexiaomoney = a_KaipiaoJineQueren.WeiHexiaomoney; + a_KaipiaoJineQuerendetail.Creater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.CreateTime = DateTime.Now; + a_KaipiaoJineQuerendetail.Updater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.LastUpdateTime = a_KaipiaoJineQuerendetail.CreateTime; + isWin = oA_KaipiaoJineQuerenBLL.InserModeldetail(a_KaipiaoJineQuerendetail); + + weiReceiveMoney = money.Value - a_KaipiaoJineQueren.WeiHexiaomoney.Value; + a_KaipiaoJineQueren.Hexiaomoney = a_KaipiaoJineQueren.Fukuanmoney; + a_KaipiaoJineQueren.Querenstatus = 1; + isWin = oA_KaipiaoJineQuerenBLL.UpdateModel(a_KaipiaoJineQueren); + } + else + { + var a_KaipiaoJineQuerendetail = new OA_KaipiaoJineQuerendetail(); + a_KaipiaoJineQuerendetail.KaipiaoJineQuerenId = a_KaipiaoJineQueren.Keyid; + a_KaipiaoJineQuerendetail.KaipiaoshenqingId = shenqid; + a_KaipiaoJineQuerendetail.Hexiaomoney = weiReceiveMoney; + a_KaipiaoJineQuerendetail.Creater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.CreateTime = DateTime.Now; + a_KaipiaoJineQuerendetail.Updater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.LastUpdateTime = a_KaipiaoJineQuerendetail.CreateTime; + isWin = oA_KaipiaoJineQuerenBLL.InserModeldetail(a_KaipiaoJineQuerendetail); + + + a_KaipiaoJineQueren.Hexiaomoney = a_KaipiaoJineQueren.Hexiaomoney.Value + weiReceiveMoney; + + isWin = oA_KaipiaoJineQuerenBLL.UpdateModel(a_KaipiaoJineQueren); + + weiReceiveMoney = 0; + } + + + + if (weiReceiveMoney <= 0) + { + break; + } + } + + + + OA_CorporateClients m_OA_CorporateClients = bll_OA_CorporateClientsBLL.GetModel(kaipiaoshenqing.BuyerId); + m_OA_CorporateClients.Prepayments += money; + m_OA_CorporateClients.Operator = CurrentUser.ShortName; + m_OA_CorporateClients.LastUpdateTime = DateTime.Now; + ; + + OA_AdvanceMoneyRecord m_OA_AdvanceMoneyRecord = new OA_AdvanceMoneyRecord(); + m_OA_AdvanceMoneyRecord.CustomerId = m_OA_CorporateClients.Keyid; + m_OA_AdvanceMoneyRecord.OperatTypeId = _Sys_DictionaryBLL.GetNameByMeanValue(1, "瀹㈡埛棰勪粯娆炬槑缁嗙被鍨�"); + m_OA_AdvanceMoneyRecord.OperatMoney = money; + m_OA_AdvanceMoneyRecord.SubjectName = money > 0 ? "棰勪粯娆炬敹鍏�" : "棰勪粯娆炬敹鍏�(璐�)"; + m_OA_AdvanceMoneyRecord.AccountType = "鏀跺叆纭"; + m_OA_AdvanceMoneyRecord.AccountName = "鏀跺叆纭"; + m_OA_AdvanceMoneyRecord.LastUpdateTime = DateTime.Now; + m_OA_AdvanceMoneyRecord.Operator = CurrentUser.ShortName.ToString2(); + m_OA_AdvanceMoneyRecord.Remark = ""; + + kaipiaoshenqing.Kehumoney = Kehumoney + money.Value; + isWin = oA_KaipiaoshenqingBLL.UpdateModel(kaipiaoshenqing); + + isWin = bll_OA_CorporateClientsBLL.UpdateModel(m_OA_CorporateClients); + isWin = oA_AdvanceMoneyRecordBLL.InsertModel(m_OA_AdvanceMoneyRecord); + if (isWin) + { + BindList(); + JavaScript.MessageBox("瀛樺叆鎴愬姛", this, true, true); + } + else + JavaScript.MessageBox("鎿嶄綔澶辫触", this); + + + scope.Complete(); + } + catch (Exception ex) + { + // 鍥炴粴浜嬪姟 + } + finally + { + // 閲婃斁璧勬簮 + scope.Dispose(); + } + } + + + } + } + catch (Exception ex) + { + PAGEHandleException(ex); + JavaScript.MessageBox("鎿嶄綔澶辫触", this); + } + } + + protected void btn_Query_Deposits(object sender, EventArgs e) + { + try + { + BindList(); + } + catch (Exception ex) + { + PAGEHandleException(ex); + JavaScript.MessageBox("鎿嶄綔澶辫触", this); + } + } + } +} \ No newline at end of file diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.designer.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.designer.cs new file mode 100644 index 0000000..de87432 --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/DepositsCustomershouruqueren.aspx.designer.cs @@ -0,0 +1,125 @@ +锘�//------------------------------------------------------------------------------ +// <鑷姩鐢熸垚> +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆� +// </鑷姩鐢熸垚> +//------------------------------------------------------------------------------ + +namespace CY.WebForm.Pages.financial +{ + + + public partial class DepositsCustomershouruqueren + { + + /// <summary> + /// CMSHead1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; + + /// <summary> + /// form1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// <summary> + /// spanCustomName 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanCustomName; + + /// <summary> + /// spanCustomMoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanCustomMoney; + + /// <summary> + /// spanFapiaohao 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanFapiaohao; + + /// <summary> + /// spankpmoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl spankpmoney; + + /// <summary> + /// spanKehumoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl spanKehumoney; + + /// <summary> + /// txtOperatMoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtOperatMoney; + + /// <summary> + /// btn_Submit 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.WebControls.Button btn_Submit; + + /// <summary> + /// ids 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputHidden ids; + + /// <summary> + /// rptData 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.WebControls.Repeater rptData; + + /// <summary> + /// NoMoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl NoMoney; + } +} diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx index fbc803b..f52f947 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx @@ -54,6 +54,19 @@ <input runat="server" id="txtPaymentUnit" type="text" style="width: 259px" /> </td> </tr> + <tr> + <td class="ali03 "> + 閫夋嫨瀹㈡埛锛� + </td> + <td> + <select id='selCustormer' runat="server" keepdefaultstyle='true' datavaluefield='MemberId' datatextfield='CompanyName' onchange='custormerChange(this)' selinputhtml="True" sign="" style=" width:123px;"></select> + </td> + </tr> + <tr> + <td colspan="2"> + <span style="color:red;">閫夋嫨绉戠洰锛氬嵃鍒蜂笟鍔℃敹鍏ワ紝閫夋嫨浜嗗鎴凤紝鎿嶄綔閲戦涓烘鏁帮紝灏嗕細浜х敓涓�鏉℃湭纭鏀跺叆锛�</span> + </td> + </tr> <tr> <td class="ali03 "> 鎽樿锛� @@ -104,11 +117,68 @@ } }); } - + + function custormerChange(oss) { + var selectedText = $(oss).find("option:selected").text(); + // console.log(selectedText); // 杈撳嚭閫変腑椤圭殑鏂囨湰 + if ($(oss).val() != "") { + $("#txtPaymentUnit").val(selectedText); + } else { + $("#txtPaymentUnit").val(""); + } + + } + + //涓篠elect鏂板杩囨护鍔熻兘 + function SelectAddSearch() { + $("select[SelInputHtml='True']").each(function (i, v) { + $(this).unbind("blur"); + var old = $(this).html(); + var oldObject = $(this).clone(); + var sign = "selectS" + i; + $(v).attr("sign", sign); + + var inputClass = "input_" + sign; + var html = "<span style='margin-left:10px'>杩囨护锛�</span><input type='text' class='" + inputClass + "' style='width:80px;height:18px;line-height:18px;'/>"; + $(v).after(html); + $("." + inputClass).blur(function () { + var nowval = $(this).val().trim(); + var output = ""; + if (nowval == "" || nowval == null) { + output = old; + } else { + output += "<option value=''>璇烽�夋嫨</option>"; + var valueArr = new Array(); + oldObject.find("option").each(function (ii, vv) { + + var value = $.trim($(vv).attr("value")); + var text = $.trim($(vv).text()); + + if (text.indexOf(nowval) >= 0) + valueArr.push(value + "|||" + text); + }); + for (var ss in valueArr) { + var s = valueArr[ss]; + if (s.split("|||").length == 2) { + var value1 = s.split("|||")[0]; + var text1 = s.split("|||")[1]; + output += "<option value='" + value1 + "'>" + text1 + "</option>"; + } + } + } + $(v).html(output); + }); + }); + } </script> <script type="text/javascript"> $(function () { ChangeThisType("#selAcoountType"); + + + + SelectAddSearch(); + }); </script> </body> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs index 9c394a7..3a17ab5 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.cs @@ -8,6 +8,7 @@ using CY.Infrastructure.Common; using CY.BLL.OA; using CY.BLL.Sys; +using CY.BLL; namespace CY.WebForm.Pages.financial { @@ -20,6 +21,8 @@ OA_FirmAccountRecordBLL _OA_FirmAccountRecordBLL = null; OA_FirmAccountRecord firmAccountRecord = null; OA_FirmAccount firmAccount = null; + OA_CorporateClientsBLL _oA_CorporateClientsBLL = null; + OA_KaipiaoJineQuerenBLL _oA_KaipiaoJineQuerenBLL = null; public FirmAccountIncomeEdit() { @@ -29,6 +32,8 @@ _OA_FirmAccountRecordBLL = new OA_FirmAccountRecordBLL(); _OA_SubjectSetBLL = new OA_SubjectSetBLL(); firmAccountRecord = new OA_FirmAccountRecord(); + _oA_CorporateClientsBLL = new OA_CorporateClientsBLL(); + _oA_KaipiaoJineQuerenBLL = new OA_KaipiaoJineQuerenBLL(); } protected void Page_Load(object sender, EventArgs e) @@ -65,10 +70,20 @@ this.selSubject.DataSource = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "鍊�"); this.selSubject.DataBind(); this.selSubject.Items.Insert(0, new ListItem("璇烽�夋嫨", "")); + this.selSubject.Value = "1"; ///璐︽埛绫诲瀷 this.selAcoountType.DataSource = _Sys_DictionaryBLL.GetDataByType("璐︽埛绫诲瀷"); this.selAcoountType.DataBind(); + + IList<OA_CorporateClients> corporateClients = _oA_CorporateClientsBLL.SelectListByFirmId(CurrentUser.MemberId) as IList<OA_CorporateClients>; + if (null != corporateClients) + { + corporateClients.Where(cc => CurrentUser.MemberId.Equals(cc.MemberId) && corporateClients.Remove(cc)); + } + this.selCustormer.DataSource = corporateClients; + this.selCustormer.DataBind(); + this.selCustormer.Items.Insert(0, new ListItem("璇烽�夋嫨", "")); } protected string reLoadAccountName(string selAcoountType) @@ -80,6 +95,37 @@ { try { + var oA_SubjectSet = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "鍊�").FirstOrDefault(x=>x.Keyid == selSubject.Value.ToInt32()); + if(oA_SubjectSet!=null && oA_SubjectSet.SubjectName == "鍗板埛涓氬姟鏀跺叆") + { + if(!string.IsNullOrEmpty(this.selCustormer.Value) && txtMoney.Value.ToDecimal2() > 0) + { + //鎻掑叆鏈‘璁ゆ敹鍏� + var a_KaipiaoJineQueren = new OA_KaipiaoJineQueren(); + a_KaipiaoJineQueren.FirmId = CurrentUser.MemberId; + a_KaipiaoJineQueren.BuyerId = this.selCustormer.Value.ToGuid2(); + var corporateClients = _oA_CorporateClientsBLL.GetModel(a_KaipiaoJineQueren.BuyerId); + { + if (corporateClients != null) + { + a_KaipiaoJineQueren.BusinessManagerId = corporateClients.BusinessManagerId; + } + } + + a_KaipiaoJineQueren.Fukuanmoney = txtMoney.Value.ToDecimal2(); + a_KaipiaoJineQueren.Hexiaomoney = 0; + a_KaipiaoJineQueren.OperationalMatters = txtOperationalMatters.Value; + a_KaipiaoJineQueren.Querenstatus = 0; + a_KaipiaoJineQueren.Creater = CurrentUser.ShortName; + a_KaipiaoJineQueren.CreateTime = DateTime.Now; + a_KaipiaoJineQueren.Updater = CurrentUser.ShortName; + a_KaipiaoJineQueren.LastUpdateTime = a_KaipiaoJineQueren.CreateTime; + + var a = _oA_KaipiaoJineQuerenBLL.InsertModel(a_KaipiaoJineQueren); + } + } + + firmAccount = _OA_FirmAccountBLL.getSingleSubject(Request["selAccountName"].ToInt32()); firmAccountRecord.AccountId = Request["selAccountName"].ToInt32(); diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.designer.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.designer.cs index 9e62248..5f32519 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.designer.cs +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeEdit.aspx.designer.cs @@ -2,16 +2,18 @@ // <鑷姩鐢熸垚> // 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� // -// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋� -// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�� +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆� // </鑷姩鐢熸垚> //------------------------------------------------------------------------------ -namespace CY.WebForm.Pages.financial { - - - public partial class FirmAccountIncomeEdit { - +namespace CY.WebForm.Pages.financial +{ + + + public partial class FirmAccountIncomeEdit + { + /// <summary> /// CMSHead1 鎺т欢銆� /// </summary> @@ -20,7 +22,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; - + /// <summary> /// form1 鎺т欢銆� /// </summary> @@ -29,7 +31,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// <summary> /// selAcoountType 鎺т欢銆� /// </summary> @@ -38,7 +40,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selAcoountType; - + /// <summary> /// selAccountName 鎺т欢銆� /// </summary> @@ -47,7 +49,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selAccountName; - + /// <summary> /// selSubject 鎺т欢銆� /// </summary> @@ -56,7 +58,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selSubject; - + /// <summary> /// txtMoney 鎺т欢銆� /// </summary> @@ -65,7 +67,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText txtMoney; - + /// <summary> /// txtPaymentUnit 鎺т欢銆� /// </summary> @@ -74,7 +76,16 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText txtPaymentUnit; - + + /// <summary> + /// selCustormer 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlSelect selCustormer; + /// <summary> /// txtOperationalMatters 鎺т欢銆� /// </summary> @@ -83,7 +94,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlTextArea txtOperationalMatters; - + /// <summary> /// txtRemark 鎺т欢銆� /// </summary> @@ -92,7 +103,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlTextArea txtRemark; - + /// <summary> /// btn_Submit 鎺т欢銆� /// </summary> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx index e7c8ae7..716a279 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx @@ -8,7 +8,7 @@ <script type="text/javascript"> ///娣诲姞 function addModel() { - top.Dialog.open({ URL: "/Pages/financial/FirmAccountIncomeEdit.aspx?Keyid='0'", Title: "鏂板鏀跺叆璁板綍", Width: 420, Height: 230 }); + top.Dialog.open({ URL: "/Pages/financial/FirmAccountIncomeEdit.aspx?Keyid='0'", Title: "鏂板鏀跺叆璁板綍", Width: 600, Height: 600 }); } //鏌ョ湅 function onView(keyid) { diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx.designer.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx.designer.cs index d14b78c..699b20d 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx.designer.cs +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/FirmAccountIncomeList.aspx.designer.cs @@ -2,16 +2,18 @@ // <鑷姩鐢熸垚> // 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� // -// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳戒細瀵艰嚧涓嶆纭殑琛屼负锛屽苟涓斿鏋� -// 閲嶆柊鐢熸垚浠g爜锛岃繖浜涙洿鏀瑰皢浼氫涪澶便�� +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆� // </鑷姩鐢熸垚> //------------------------------------------------------------------------------ -namespace CY.WebForm.Pages.financial { - - - public partial class FirmAccountIncomeList { - +namespace CY.WebForm.Pages.financial +{ + + + public partial class FirmAccountIncomeList + { + /// <summary> /// CMSHead1 鎺т欢銆� /// </summary> @@ -20,7 +22,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; - + /// <summary> /// form1 鎺т欢銆� /// </summary> @@ -29,7 +31,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// <summary> /// txtRegTimeStart 鎺т欢銆� /// </summary> @@ -38,7 +40,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText txtRegTimeStart; - + /// <summary> /// txtRegTimeEnd 鎺т欢銆� /// </summary> @@ -47,7 +49,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText txtRegTimeEnd; - + /// <summary> /// dwAcoountType 鎺т欢銆� /// </summary> @@ -56,7 +58,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.WebControls.DropDownList dwAcoountType; - + /// <summary> /// selAccountName 鎺т欢銆� /// </summary> @@ -65,7 +67,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selAccountName; - + /// <summary> /// selSubject 鎺т欢銆� /// </summary> @@ -74,7 +76,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selSubject; - + /// <summary> /// txtOperationalMatters 鎺т欢銆� /// </summary> @@ -83,7 +85,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText txtOperationalMatters; - + /// <summary> /// txtPaymentUnit 鎺т欢銆� /// </summary> @@ -92,7 +94,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText txtPaymentUnit; - + /// <summary> /// textOperator 鎺т欢銆� /// </summary> @@ -101,7 +103,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlInputText textOperator; - + /// <summary> /// btn_Register 鎺т欢銆� /// </summary> @@ -110,7 +112,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.WebControls.Button btn_Register; - + /// <summary> /// RepFirmAccountIncomeList 鎺т欢銆� /// </summary> @@ -119,7 +121,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.WebControls.Repeater RepFirmAccountIncomeList; - + /// <summary> /// NowPageAllMoney 鎺т欢銆� /// </summary> @@ -128,7 +130,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlGenericControl NowPageAllMoney; - + /// <summary> /// AllMoney 鎺т欢銆� /// </summary> @@ -137,7 +139,7 @@ /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlGenericControl AllMoney; - + /// <summary> /// UCPager1 鎺т欢銆� /// </summary> diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShoukuan.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShoukuan.aspx.cs index 0a36d14..7be2493 100644 --- a/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShoukuan.aspx.cs +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShoukuan.aspx.cs @@ -158,7 +158,7 @@ if (this.txtReceiveMoney.Value.ToDecimal2() < xuanzhongjine) { - JavaScript.MessageBox("鏈鏀舵閲戦钀у畤閫変腑璁㈠崟鏈粯娆�!", this); + JavaScript.MessageBox("鏈鏀舵閲戦灏忎簬閫変腑璁㈠崟鏈粯娆�!", this); return; } } diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx new file mode 100644 index 0000000..ccc1495 --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx @@ -0,0 +1,308 @@ +锘�<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="InvoicingShouruqueren.aspx.cs" Inherits="CY.WebForm.Pages.financial.InvoicingShouruqueren" %> + +<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> +<html xmlns="http://www.w3.org/1999/xhtml"> +<head runat="server"> + <title>璁㈠崟鏀舵</title> + <uc:CMSHead ID="CMSHead1" runat="server" /> + <link href="../../Styles/ParticularWQJ.css" rel="stylesheet" type="text/css" /> + <script type="text/javascript"> + var accountsTypes = false; + var accounts = false; + + var keyDownHook = new KeyBehaviorHook('keydown'); + keyDownHook.Regist(window.Keys.S, "ClickElement('btnSubmit')", window.WithKey.Ctrl); //Ctrl+s 淇濆瓨 + keyDownHook.Regist(window.Keys.Enter, "ClickElement('btnSubmit')", window.WithKey.Ctrl); //Ctrl+Enter 淇濆瓨 + keyDownHook.Regist(window.Keys.R, "ClickElement('btnReset')", window.WithKey.Ctrl); //Ctrl+R 閲嶇疆(Reset) + keyDownHook.Regist(window.Keys.Q, "ClickElement('btnQuit')", window.WithKey.Ctrl); //Ctrl+Q 閫�鍑�(Quit) + + function jisuanheji() { + + var cks = $("input[name='ckId']:checked"); + + if (cks.length == 0) { $("#NoMoney").text("0"); return; } else { } + + var unPayedMoney = 0; + + + cks.each( + function () { + var ckVal = $(this).val(); + + var ckValJson = eval('(' + ckVal + ')'); + + unPayedMoney += (parseFloat(ckValJson.fukuanmoney) - parseFloat(ckValJson.hexiaomoney)) ; + + + + } + ); + + $("#NoMoney").text(unPayedMoney); + + } + + $(function () { + + $('.hand').click(function () { + jisuanheji(); + }); + + + keyDownHook.Binding(); + if ('1' == document.getElementById('txtResult').value) { + CloseOpenWindow(true) + return; + } else; + //document.getElementById('txtReceiveDate').value = new Date().ToString("yyyy-MM-dd HH:mm"); + // document.getElementById('txtReceiveMoney').value = document.getElementById('txtUnPayedMoney').value; + //document.getElementById('txtReceiveMoney').focus(); + //d accountsTypes = '<%=Request.RequestContext.RouteData.DataTokens["accountsTypes"] %>'; + //d accounts = '<%=Request.RequestContext.RouteData.DataTokens["accounts"] %>'; + + + //try { + + // accountsTypes = eval(accountsTypes); + // accounts = eval(accounts)[0]; + //} catch (e) { + // accountsTypes = 'object' == typeof (accountsTypes) ? accountsTypes : []; + // accounts = []; + //} + + //LoadAccountType(); + }); + + function QuannbuCheckedChanging(sel) { + if (sel.value == "0") { + $("#txtReceiveMoney").prop('readonly', true); + $("#txtReceiveMoney").val($("#hidReceiveMoney").val()); + $("#test_table").hide(); + } else if (sel.value == "1") + { + $("#txtReceiveMoney").prop('readonly', false); + + $("#test_table").show(); + } + } + function CheckStaff() { + + + + var ids = ''; + var cks = $("input[name='ckId']:checked"); + if (cks.length == 0) { + alertMsg('娌℃湁閫変腑浠讳綍椤癸紒'); + return false; + } + else { + } + + + + + + + cks.each( + function () { + var ckVal = $(this).val(); + + var ckValJson = eval('(' + ckVal + ')'); + + ids = ids + ',' + ckValJson.id; + + + } + ); + + + $("#ids").val(ids); + return true; + + } + + function CheckedChanging(sel, name) { + + var td_toaccount = document.getElementById('td_toaccount'); + td_toaccount.parentNode.style.display = td_toaccount.style.display = name ? '' : 'none'; + + if (!name) { return; } + var currentAccounts = accounts[name]; + var selAccounts = document.getElementById('selAccounts'); + selAccounts.options.length = 0; + var i = -1; + while (++i < currentAccounts.length) { + var optionItem = document.createElement('option'); + optionItem.value = currentAccounts[i].Keyid; + optionItem.innerHTML = currentAccounts[i].AccountName + '-' + currentAccounts[i].UserName; + selAccounts.appendChild(optionItem); + } + }; + + function LoadAccountType() { + var td_receiveWay = document.getElementById('td_receiveWay'); + td_receiveWay.parentNode.style.display = td_receiveWay.style.display = '<%=Request["isprepareway"] %>'; + if (td_receiveWay.style.display) { return; } else; + var thtml = ''; + var i = -1; + while (++i < accountsTypes.length) { + thtml += ("<input type='radio' name='rdoReceiveWay' id='rdoReceiveWay" + accountsTypes[i].Keyid + "' value='" + + accountsTypes[i].Keyid + "' onclick=\"CheckedChanging(this,'" + accountsTypes[i].Name + "')\" /><label for='rdoReceiveWay" + accountsTypes[i].Keyid + "'>" + accountsTypes[i].Name + "</label>  "); + } + document.getElementById('spn_receiveWay').innerHTML = thtml; + + } + /* + 楠岃瘉杈撳叆浠锋牸 + */ + function ValidateInputPrice(txt) { + if (!ValidateDecimal(txt)) return; else; + try { + var inputPrice = parseFloat(txt.value); + var unPayed = parseFloat(document.getElementById('hidReceiveMoney').value); + txt.value = isNaN(inputPrice) || isNaN(unPayed) ? 0 : txt.value; + if (inputPrice > unPayed) { alertMsg(' 鏈鏀舵閲戦澶т簬璁㈠崟鏈粯娆�!<br/>涓轰簡鎮ㄧ殑璐﹀姟姝g‘鎬ц閲嶆柊澶嶆煡锛�'); } + + } catch (e) { + + } + + } + </script> +</head> +<body style='margin: 0; padding: 0;'> + <form id="form1" runat="server" onsubmit="if(false)return false;"> + <input type="hidden" id='txtResult' value='<%=Request.RequestContext.RouteData.DataTokens["IsWin"] %>'> + <table class="table2" width="100%"> + + <tr> + <td colspan='3' class='col_third'> + 瀹㈡埛鍚嶇О锛� + <input id='txtBuyerName' runat="server" style='width: 220px;' readonly="readonly" /> + </td> + </tr> + <tr> + <td colspan='3' class='col_third'> + 鍙戠エ鍙凤細 + <input id='txtFapiaohao' runat="server" style='width: 220px;' readonly="readonly" /> + </td> + </tr> + <tr> + <td colspan='3' class='col_third'> + 搴旀敹娆撅細 + <input id='txtSumMoney' runat="server" style='width: 120px;' onblur='ValidateInputPrice(this)' readonly="readonly" /> + <input type="hidden" runat="server" id='hidReceiveMoney' /> + </td> + </tr> + <tr> + <td colspan='3' class='col_third'> + 鏀舵閲戦锛� + <input id='txtReceiveMoney' runat="server" maxlength='16' style='width: 120px;' onblur='ValidateInputPrice(this)' /> + </td> + </tr> + + + + + + <tr> + <td class="contentLeft" colspan='3'> +      <%--<input type="button" value="纭鏀舵" runat="server" id='btnSubmit' />--%> + + <asp:Button ID="btn_Submit" Text="纭鏀跺叆" runat="server" OnClick="btn_Submit_form" OnClientClick="if(CheckStaff())return true;else return false; " /> + <input type="hidden" id="ids" runat="server" /> + </td> + </tr> + </table> + + <table class="tableStyle" useclick="false" usecheckbox="true" sortmode="false" id="test_table" > + <thead> + <tr> + <th width="25"> + </th> + <th width="25"> + 缂栧彿 + </th> + <th style="text-align: center;" > + 瀹㈡埛鍚嶇О + </th> + + <th style="text-align: center;"width="70"> + 鏀舵鏃ユ湡 + </th> + + <th width="60"> + 閲戦 + </th> + <th width="60"> + 宸茬‘璁� + </th> + <th width="60"> + 鏈‘璁� + </th> + + + </tr> + </thead> + <tbody> + <asp:repeater id="rptData" runat="server"> + <itemtemplate> + <tr> + <td> + <input type="checkbox" name='ckId' value_keyid="<%#Eval("Keyid")%>" value="{ + id:<%#Eval("Keyid")%>, + buyerId:'<%#Eval("BuyerId")%>', + + fukuanmoney:<%#Eval("Fukuanmoney")%>, + querenstatus:<%#Eval("Querenstatus")%>, + + hexiaomoney:<%#Eval("Hexiaomoney")%>, + + }" id='ckBox<%#Container.ItemIndex%>' class='ckBox' onclick="jisuanheji();" /> + </td> + <td class="ItemIndex"> + <%#Container.ItemIndex +1 /*(UCPager1.PageSize *( UCPager1.PageIndex-1)+1)*/%> + </td> + <td style="text-align: center;"> + + <%#Eval("BuyerName")%> + + </td> + <td style="text-align: center;"> + + + <%#Eval("CreateTime", "{0:yyyy-MM-dd}")%> + + </td> + + + <td class="SumPrice"> + <%#Eval("FukuanMoney", "{0:F}")%> + </td> + + <td class="PayedMoney"> + <%#Eval("Hexiaomoney", "{0:F}")%> + </td> + <td class="UnPayedMoney"> + <%#Eval("WeiHexiaomoney","{0:F}")%> + </td> + + </tr> + </itemtemplate> + </asp:repeater> + </tbody> + + <tr class="StatisticsMoney"> + <td colspan="6" class="ali03" style="text-align:left;"> + 閫変腑鍚堣锛� + </td> + + <td class="ali01" > + <span id="NoMoney" runat="server" ></span> + </td> + + </tr> + </table> + </form> +</body> +</html> \ No newline at end of file diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.cs new file mode 100644 index 0000000..ae5e110 --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.cs @@ -0,0 +1,549 @@ +锘�/** +* OrderMoneyReceive.aspx.cs +* +* 鍔� 鑳斤細 璁㈠崟鏀舵 +* 绫� 鍚嶏細 OrderMoneyReceive +* +* Ver 鍙樻洿鏃ユ湡 璐熻矗浜� 鍙樻洿鍐呭 +* 鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹�鈹� +* V0.01 2013-5-28 13:44 鍚村磶鍧� 鍒濈増 +* +*/ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using CY.BLL.EC; +using CY.Infrastructure.Common; +using CY.Model; +using CY.BLL.OA; +using CY.BLL.Sys; +using System.Text; +using CY.BLL; +using System.Transactions; + +namespace CY.WebForm.Pages.financial +{ + public partial class InvoicingShouruqueren : BasePage + { + private EC_OrderBasicBLL _eC_OrderBasicBLL = null; + + private OA_CorporateClientsBLL bll_OA_CorporateClientsBLL = null; + OA_KaipiaoshenqingBLL oA_KaipiaoshenqingBLL = null; + OA_KaipiaoJineQuerenBLL oA_KaipiaoJineQuerenBLL = null; + + /// <summary> + /// 鍒濆鍖栨瀯閫� + /// </summary> + public InvoicingShouruqueren() + { + bll_OA_CorporateClientsBLL = new OA_CorporateClientsBLL(); + oA_KaipiaoshenqingBLL = new OA_KaipiaoshenqingBLL(); + _eC_OrderBasicBLL = new EC_OrderBasicBLL(); + oA_KaipiaoJineQuerenBLL = new OA_KaipiaoJineQuerenBLL(); + } + /// <summary> + /// 鐣岄潰鍔犺浇浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + protected void Page_Load(object sender, EventArgs e) + { + + //btnSubmit.ServerClick += new EventHandler(btnSubmit_ServerClick); + if (!IsPostBack) + { + LoadOrder(); + } + + if (IsPostBack || IsCallback) + return; + InitPage(); + + } + + /// <summary> + /// 鎻愪氦鎸夐挳鐐瑰嚮浜嬩欢 + /// </summary> + /// <param name="sender"></param> + /// <param name="e"></param> + protected void btn_Submit_form(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtReceiveMoney.Value) ) + { + JavaScript.MessageBox("璇峰~鍐欐敹娆鹃噾棰�!", this); + return; + } + + if (this.txtReceiveMoney.Value.ToDecimal2() <= 0 ) + { + JavaScript.MessageBox("璇峰~鍐欐敹娆鹃噾棰�!", this); + return; + } + + if (this.txtReceiveMoney.Value.ToDecimal2()> this.hidReceiveMoney.Value.ToDecimal2()) + { + JavaScript.MessageBox("鏈鏀舵閲戦澶т簬璁㈠崟鏈粯娆�!", this); + return; + } + + + + var id = Request["id"]; + + + var ids = this.ids.Value; + + bool isWin = false; + + + var idssss = ids.Trim(',').Split(','); + + var idsssssint = new List<int>(); + foreach(var iddd in idssss) + { + idsssssint.Add(int.Parse(iddd)); + } + var a_Kaipiaoshenqing = oA_KaipiaoshenqingBLL.GetModelByKeyid(id.ToGuid2()); + var oA_KaipiaoJineQuerens = oA_KaipiaoJineQuerenBLL.GetModelBybuyerid(a_Kaipiaoshenqing.BuyerId).Where(x => x.Querenstatus == 0 && idsssssint.Contains(x.Keyid)); + + var ReceiveMoney = this.txtReceiveMoney.Value.ToDecimal2(); + var WeiHexiaomoney = oA_KaipiaoJineQuerens.Sum(x=>x.WeiHexiaomoney); + + if (WeiHexiaomoney< ReceiveMoney) + { + JavaScript.MessageBox("鏈鏀舵閲戦澶т簬鏈‘璁ゆ敹鍏�!", this); + return; + } + + + + Dictionary<int, object> searchParam = new Dictionary<int, object>(); + + SetParamValue(searchParam, 1, CurrentUser.MemberId); + SetParamValue(searchParam, 2, ""); + SetParamValue(searchParam, 3, ""); + SetParamValue(searchParam, 4, ""); + SetParamValue(searchParam, 5, ""); + SetParamValue(searchParam, 6, ""); + SetParamValue(searchParam, 7, ""); + SetParamValue(searchParam, 8, ""); + SetParamValue(searchParam, 9, ""); + SetParamValue(searchParam, 10, ""); + SetParamValue(searchParam, 11, ""); + SetParamValue(searchParam, 12, ""); + SetParamValue(searchParam, 13, ""); + SetParamValue(searchParam, 14, ""); + SetParamValue(searchParam, 15, ""); + SetParamValue(searchParam, 16, ""); + SetParamValue(searchParam, 18, 0); + SetParamValue(searchParam, 19, CurrentUser.TrueMemberId); + SetParamValue(searchParam, 20, CurrentUser.StaffId); + SetParamValue(searchParam, 21, CurrentUser.TrueName); + SetParamValue(searchParam, 22, ""); + SetParamValue(searchParam, 23, ""); + SetParamValue(searchParam, 24, ""); + SetParamValue(searchParam, 25, ""); + SetParamValue(searchParam, 26, id.ToGuid2()); + SearchParam = searchParam; + + + + Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() + { + PageSize = 1000,// UCPager1.AspNetPager.PageSize, + PageIndex = 1// UCPager1.AspNetPager.CurrentPageIndex + }; + var _orderBasicmodes = _eC_OrderBasicBLL.SelectModelPage_Seller(pagination, SearchParam); + using (var scope = new TransactionScope(TransactionScopeOption.Required, + new TransactionOptions + { + IsolationLevel = IsolationLevel.ReadCommitted, + Timeout = TransactionManager.MaximumTimeout + } + )) + { + + try + { + + + if (string.IsNullOrEmpty(id) ) + { + JavaScript.MessageBox("浼犲叆鍙傛暟閿欒锛�", this); + return; + } + if (null == _orderBasicmodes) + { + JavaScript.MessageBox("璁㈠崟涓嶅瓨鍦ㄦ垨宸插垹闄わ紒", this); + return; + } + //鏇存柊纭鏀跺叆 + decimal weiReceiveMoney = ReceiveMoney.Value; + foreach (var a_KaipiaoJineQueren in oA_KaipiaoJineQuerens) + { + if(a_KaipiaoJineQueren.WeiHexiaomoney <= weiReceiveMoney) + { + + var a_KaipiaoJineQuerendetail = new OA_KaipiaoJineQuerendetail(); + a_KaipiaoJineQuerendetail.KaipiaoJineQuerenId = a_KaipiaoJineQueren.Keyid; + a_KaipiaoJineQuerendetail.KaipiaoshenqingId = id.ToGuid2(); + a_KaipiaoJineQuerendetail.Hexiaomoney = a_KaipiaoJineQueren.WeiHexiaomoney; + a_KaipiaoJineQuerendetail.Creater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.CreateTime = DateTime.Now; + a_KaipiaoJineQuerendetail.Updater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.LastUpdateTime = a_KaipiaoJineQuerendetail.CreateTime; + isWin = oA_KaipiaoJineQuerenBLL.InserModeldetail(a_KaipiaoJineQuerendetail); + + weiReceiveMoney = ReceiveMoney.Value - a_KaipiaoJineQueren.WeiHexiaomoney.Value; + a_KaipiaoJineQueren.Hexiaomoney = a_KaipiaoJineQueren.Fukuanmoney; + a_KaipiaoJineQueren.Querenstatus = 1; + isWin = oA_KaipiaoJineQuerenBLL.UpdateModel(a_KaipiaoJineQueren); + } + else + { + var a_KaipiaoJineQuerendetail = new OA_KaipiaoJineQuerendetail(); + a_KaipiaoJineQuerendetail.KaipiaoJineQuerenId = a_KaipiaoJineQueren.Keyid; + a_KaipiaoJineQuerendetail.KaipiaoshenqingId = id.ToGuid2(); + a_KaipiaoJineQuerendetail.Hexiaomoney = weiReceiveMoney; + a_KaipiaoJineQuerendetail.Creater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.CreateTime = DateTime.Now; + a_KaipiaoJineQuerendetail.Updater = CurrentUser.ShortName; + a_KaipiaoJineQuerendetail.LastUpdateTime = a_KaipiaoJineQuerendetail.CreateTime; + isWin = oA_KaipiaoJineQuerenBLL.InserModeldetail(a_KaipiaoJineQuerendetail); + + + a_KaipiaoJineQueren.Hexiaomoney = a_KaipiaoJineQueren.Hexiaomoney.Value + weiReceiveMoney; + + isWin = oA_KaipiaoJineQuerenBLL.UpdateModel(a_KaipiaoJineQueren); + + weiReceiveMoney = 0; + } + + + + if (weiReceiveMoney <= 0) + { + break; + } + } + + + + weiReceiveMoney = ReceiveMoney.Value; + foreach (var _orderBasic in _orderBasicmodes) + { + if (_orderBasic.UnPayedMoney <= 0) + { + continue; + } + decimal UnPayedMoney = _orderBasic.UnPayedMoney; + if (_orderBasic.UnPayedMoney > weiReceiveMoney) + { + UnPayedMoney = weiReceiveMoney; + weiReceiveMoney = 0; + } + else + { + weiReceiveMoney = weiReceiveMoney - _orderBasic.UnPayedMoney; + } + + + + isWin = ToAccount(_orderBasic.Keyid.Value, _orderBasic.BuyerName, UnPayedMoney); + if (!isWin) + { + JavaScript.MessageBox(_orderBasic.SellerOrderId + "鏀舵澶辫触锛�", this); + return; + //break; + } + if (weiReceiveMoney<=0) + { + break; + } + + } + + + + + + scope.Complete(); + } + catch (Exception ex) + { + // 鍥炴粴浜嬪姟 + } + finally + { + // 閲婃斁璧勬簮 + scope.Dispose(); + } + } + + + if (isWin) + { + JavaScript.MessageBox("鎿嶄綔鎴愬姛", this); + + JavaScript.RefreshDIVOpener(this); + } + else + { + JavaScript.MessageBox("鎿嶄綔澶辫触", this); + } + + + + //JavaScript.MessageBox(isWin ? "鏀舵鎴愬姛锛�" : "鏀舵澶辫触锛�", this, "top.frmright.ReLoad();top.Dialog.close();"); + //Request.RequestContext.RouteData.DataTokens.Add("IsWin", isWin ? "1" : ""); + //if (!isWin) + // InitPage(); + //else + // ; + + + } + + /// <summary> + /// 鍔犺浇椤甸潰鏁版嵁 + /// </summary> + private void InitPage() + { + try + { + Sys_DictionaryBLL _Sys_DictionaryBLL = new Sys_DictionaryBLL(); + OA_SubjectSetBLL _OA_SubjectSetBLL = new OA_SubjectSetBLL(); + OA_FirmAccountBLL oA_FirmAccountBLL = new OA_FirmAccountBLL(); + + + + int i = -1; + //璐︽埛绫诲瀷 + List<Sys_Dictionary> accountsType = _Sys_DictionaryBLL.GetDataByType("璐︽埛绫诲瀷") as List<Sys_Dictionary>; + Request.RequestContext.RouteData.DataTokens.Add("accountsTypes", null == accountsType || accountsType.Count == 0 ? "[]" : JsonHelper.GetJsonStringByObject(accountsType)); + + List<OA_FirmAccount> firmAccounts = oA_FirmAccountBLL.getAllSubject(CurrentUser.MemberId, "") as List<OA_FirmAccount>; + + const string ACCOUNTSJSONKEY = "accounts"; + if (null == firmAccounts) + { + Request.RequestContext.RouteData.DataTokens.Add(ACCOUNTSJSONKEY, "[]"); + return; + } + + IEnumerable<IGrouping<string, OA_FirmAccount>> groupings = firmAccounts.GroupBy(fa => fa.AccountType); + StringBuilder builder = new StringBuilder(); + + foreach (IGrouping<string, OA_FirmAccount> groupitem in groupings) + { + OA_FirmAccount[] items = groupitem.ToArray(); + builder.AppendFormat("{0}\"{2}\":{3}{1}", ",", "", groupitem.Key, JsonHelper.GetJsonStringByObject(items)); + } + builder.Append("}]"); + builder.Replace(",", "[{", 0, 1); + + Request.RequestContext.RouteData.DataTokens.Add(ACCOUNTSJSONKEY, null == firmAccounts ? "[]" : builder.ToString()); + + } + catch (Exception ex) + { + PAGEHandleException(ex); + } + } + + /// <summary> + /// 鍔犺浇璁㈠崟 + /// </summary> + private void LoadOrder() + { + var id = Request["id"]; + + var a_Kaipiaoshenqing = oA_KaipiaoshenqingBLL.GetModelByKeyid(id.ToGuid2()); + if (a_Kaipiaoshenqing != null) + { + var corporateClients = bll_OA_CorporateClientsBLL.GetModel(a_Kaipiaoshenqing.BuyerId); + if (corporateClients!=null) + { + this.txtBuyerName.Value = corporateClients.CompanyName; + } + this.txtFapiaohao.Value = a_Kaipiaoshenqing.Fapiaohao; + } + + + + Dictionary<int, object> searchParam = new Dictionary<int, object>(); + + SetParamValue(searchParam, 1, CurrentUser.MemberId); + SetParamValue(searchParam, 2, ""); + SetParamValue(searchParam, 3, ""); + SetParamValue(searchParam, 4, ""); + SetParamValue(searchParam, 5, ""); + SetParamValue(searchParam, 6, ""); + SetParamValue(searchParam, 7, ""); + SetParamValue(searchParam, 8, ""); + SetParamValue(searchParam, 9, ""); + SetParamValue(searchParam, 10, ""); + SetParamValue(searchParam, 11, ""); + SetParamValue(searchParam, 12, ""); + SetParamValue(searchParam, 13, ""); + SetParamValue(searchParam, 14, ""); + SetParamValue(searchParam, 15, ""); + SetParamValue(searchParam, 16, ""); + SetParamValue(searchParam, 18, 0); + SetParamValue(searchParam, 19, CurrentUser.TrueMemberId); + SetParamValue(searchParam, 20, CurrentUser.StaffId); + SetParamValue(searchParam, 21, CurrentUser.TrueName); + SetParamValue(searchParam, 22, ""); + SetParamValue(searchParam, 23, ""); + SetParamValue(searchParam, 24, ""); + SetParamValue(searchParam, 25, ""); + SetParamValue(searchParam, 26, id.ToGuid2()); + SearchParam = searchParam; + + + + Infrastructure.Query.Pagination pagination = new Infrastructure.Query.Pagination() + { + PageSize = 1000, + PageIndex = 1 + }; + var _orderBasicmodes = _eC_OrderBasicBLL.SelectModelPage_Seller(pagination, SearchParam); + + + + + decimal shoukuanmoney = 0; + decimal sumMoney = 0; + if (id == null || id.Length==0) + { + return; + } + + try + { + + foreach (var _orderBasicmode in _orderBasicmodes) + { + + + sumMoney += (_orderBasicmode.SumPrice.HasValue? _orderBasicmode.SumPrice.Value:0); + shoukuanmoney += _orderBasicmode.UnPayedMoney; + + } + this.txtReceiveMoney.Value = String.Format("{0:F}", shoukuanmoney); + this.txtSumMoney.Value = String.Format("{0:F}", sumMoney); + this.hidReceiveMoney.Value = String.Format("{0:F}", shoukuanmoney); + this.NoMoney.InnerText = "0"; + var oA_KaipiaoJineQuerens = oA_KaipiaoJineQuerenBLL.GetModelBybuyerid(a_Kaipiaoshenqing.BuyerId).Where(x => x.Querenstatus == 0); + rptData.DataSource = oA_KaipiaoJineQuerens; + rptData.DataBind(); + } + catch (Exception ex) + { + PAGEHandleException(ex); + JavaScript.MessageBox("璁㈠崟涓嶅瓨鍦紒", this); + } + + + } + + /// <summary> + /// 鏀舵鍒拌处鎴� + /// </summary> + /// <param name="orderId"></param> + /// <param name="buyerName"></param> + /// <returns></returns> + private bool ToAccount(int orderId, string buyerName,decimal UnPayedMoney) + { + OA_FirmAccountRecord oA_FirmAccountRecord = new Model.OA_FirmAccountRecord(); + oA_FirmAccountRecord.Money = UnPayedMoney; + //oA_FirmAccountRecord.LastUpdateTime = MyConvert.ConvertToDateTime(txtReceiveDate.Value); + if (!oA_FirmAccountRecord.Money.HasValue || 0 > oA_FirmAccountRecord.Money.Value) + { + return false; + } + //if (!oA_FirmAccountRecord.LastUpdateTime.HasValue) + //{ + // return false; + //} + + oA_FirmAccountRecord.Operator = CurrentUser.ShortName; + // oA_FirmAccountRecord.Remark = txtRemark.Value; + oA_FirmAccountRecord.PaymentUnit = buyerName; + // oA_FirmAccountRecord.SubjectId = MyConvert.ConvertToInt32(selSubjects.Value); + // oA_FirmAccountRecord.AccountId = MyConvert.ConvertToInt32("0".Equals(Request["rdoReceiveWay"]) ? "0" : Request["selAccounts"]); + // if (!oA_FirmAccountRecord.AccountId.HasValue || 0 == oA_FirmAccountRecord.AccountId.Value) + // return false; + return _eC_OrderBasicBLL.ReceiveMoneyToQueren(orderId, oA_FirmAccountRecord); + } + + /// <summary> + /// 浣跨敤棰勪粯娆�(浠樻銆佹敹娆�) + /// </summary> + /// <returns></returns> + private bool UsePrepare(EC_OrderBasic _orderBasic, decimal UnPayedMoney = 0) + { + decimal? money = _orderBasic.UnPayedMoney; + if(UnPayedMoney > 0) + { + money = UnPayedMoney; + } + int operatTypeId = 3; + string subject = "璁㈠崟浠樻"; + switch (Request["outsourceType"]) + { + case "1": + operatTypeId = 2; + subject = "澶栧崗浠樻"; + break; + default: + break; + } + return _eC_OrderBasicBLL.ReceiveMoney(_orderBasic.SellerId, _orderBasic.BuyerId, _orderBasic.Keyid.Value, money.Value, operatTypeId, subject, CurrentUser.ShortName); + } + + + /// <summary> + /// 鏌ヨ鍙傛暟 + /// </summary> + private Dictionary<int, object> SearchParam + { + get + { + return ViewState["SearchParam"] as Dictionary<int, object>; + } + set + { + ViewState["SearchParam"] = value; + } + } + + /// <summary> + /// 璁剧疆鏌ヨ鍙傛暟鏂规硶 + /// </summary> + /// <param name="target">璁剧疆鐩爣</param> + /// <param name="key">閿�</param> + /// <param name="value">鍊�</param> + private static void SetParamValue(Dictionary<int, object> target, int key, object value) + { + if (string.IsNullOrEmpty(string.Format("{0}", value))) + return; + else + { + } + + if (target.ContainsKey(key)) + { + target[key] = value; + } + else + { + target.Add(key, value); + } + } + + } +} \ No newline at end of file diff --git a/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.designer.cs b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.designer.cs new file mode 100644 index 0000000..8ddfb7a --- /dev/null +++ b/CY_ECommercePlatform/CY.WebForm/Pages/financial/InvoicingShouruqueren.aspx.designer.cs @@ -0,0 +1,116 @@ +锘�//------------------------------------------------------------------------------ +// <鑷姩鐢熸垚> +// 姝や唬鐮佺敱宸ュ叿鐢熸垚銆� +// +// 瀵规鏂囦欢鐨勬洿鏀瑰彲鑳藉鑷翠笉姝g‘鐨勮涓猴紝濡傛灉 +// 閲嶆柊鐢熸垚浠g爜锛屽垯鎵�鍋氭洿鏀瑰皢涓㈠け銆� +// </鑷姩鐢熸垚> +//------------------------------------------------------------------------------ + +namespace CY.WebForm.Pages.financial +{ + + + public partial class InvoicingShouruqueren + { + + /// <summary> + /// CMSHead1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::CY.WebForm.Pages.common.CMSHead CMSHead1; + + /// <summary> + /// form1 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// <summary> + /// txtBuyerName 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtBuyerName; + + /// <summary> + /// txtFapiaohao 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtFapiaohao; + + /// <summary> + /// txtSumMoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtSumMoney; + + /// <summary> + /// hidReceiveMoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputHidden hidReceiveMoney; + + /// <summary> + /// txtReceiveMoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputText txtReceiveMoney; + + /// <summary> + /// btn_Submit 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.WebControls.Button btn_Submit; + + /// <summary> + /// ids 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlInputHidden ids; + + /// <summary> + /// rptData 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.WebControls.Repeater rptData; + + /// <summary> + /// NoMoney 鎺т欢銆� + /// </summary> + /// <remarks> + /// 鑷姩鐢熸垚鐨勫瓧娈点�� + /// 鑻ヨ杩涜淇敼锛岃灏嗗瓧娈靛0鏄庝粠璁捐鍣ㄦ枃浠剁Щ鍒颁唬鐮侀殣钘忔枃浠躲�� + /// </remarks> + protected global::System.Web.UI.HtmlControls.HtmlGenericControl NoMoney; + } +} -- Gitblit v1.9.1