CY_ECommercePlatform/CY.Model/OA/OA_ShebeiWeixiu.cs
@@ -33,6 +33,32 @@ public int? FukuanshenqingId { get; set; } public string Fukuanfangshi { get; set; } public string FukuanfangshiName { get { if (string.IsNullOrEmpty(this.Fukuanfangshi)) { return ""; } else if (this.Fukuanfangshi == "1") { return "对公转账"; } else if (this.Fukuanfangshi == "2") { return "现金支付"; } else { return ""; } } } //是否付费 1是2否 public int? Shifoufufei { get; set; } @@ -302,7 +328,12 @@ this.ApprovalStatus = isChange ? MyConvert.ConvertToInt32(value) : ApprovalStatus; theValue = this.ApprovalStatus; } else if ("Fukuanfangshi".Equals(name, StringComparison.CurrentCultureIgnoreCase) || index == 24) { this.Fukuanfangshi = isChange ? MyConvert.ConvertToString(value) : Fukuanfangshi; theValue = this.Fukuanfangshi; } return theValue; } CY_ECommercePlatform/CY.SQLDAL/OA/OA_ShebeiWeixiuDAL.cs
@@ -70,10 +70,11 @@ new SqlParameter("@LastUpdateTime", trueModel.LastUpdateTime) , new SqlParameter("@Operator", trueModel.Operator) , new SqlParameter("@ApprovalStatus", trueModel.ApprovalStatus.HasValue?trueModel.ApprovalStatus.Value:0) , new SqlParameter("@Fukuanfangshi", string.IsNullOrEmpty(trueModel.Fukuanfangshi)?"":trueModel.Fukuanfangshi) , }; string sql = "Insert Into OA_ShebeiWeixiu ([MemberId],[ShebeiId],[WeixiuTime],[CateId],[Name],[Anzhuangdidian],[Remark],[WeixiuPrice],[Zerenren],[ZerenrenName],[DanzePrice],[WeixiuShebeiId],[FukuanShebeiId],[FukuanshenqingId],[Shifoufufei],[CreateTime],[Creator],[LastUpdateTime],[Operator],[ApprovalStatus])" + " Values (@MemberId,@ShebeiId,@WeixiuTime,@CateId,@Name,@Anzhuangdidian,@Remark ,@WeixiuPrice,@Zerenren,@ZerenrenName,@DanzePrice,@WeixiuShebeiId,@FukuanShebeiId,@FukuanshenqingId,@Shifoufufei,@CreateTime,@Creator,@LastUpdateTime,@Operator,@ApprovalStatus)"; string sql = "Insert Into OA_ShebeiWeixiu ([MemberId],[ShebeiId],[WeixiuTime],[CateId],[Name],[Anzhuangdidian],[Remark],[WeixiuPrice],[Zerenren],[ZerenrenName],[DanzePrice],[WeixiuShebeiId],[FukuanShebeiId],[FukuanshenqingId],[Shifoufufei],[CreateTime],[Creator],[LastUpdateTime],[Operator],[ApprovalStatus],[Fukuanfangshi])" + " Values (@MemberId,@ShebeiId,@WeixiuTime,@CateId,@Name,@Anzhuangdidian,@Remark ,@WeixiuPrice,@Zerenren,@ZerenrenName,@DanzePrice,@WeixiuShebeiId,@FukuanShebeiId,@FukuanshenqingId,@Shifoufufei,@CreateTime,@Creator,@LastUpdateTime,@Operator,@ApprovalStatus,@Fukuanfangshi)"; try { @@ -131,8 +132,9 @@ new SqlParameter("@LastUpdateTime", trueModel.LastUpdateTime) , new SqlParameter("@Operator", trueModel.Operator) , new SqlParameter("@ApprovalStatus", trueModel.ApprovalStatus.HasValue?trueModel.ApprovalStatus.Value:0) , new SqlParameter("@Fukuanfangshi", string.IsNullOrEmpty(trueModel.Fukuanfangshi)?"":trueModel.Fukuanfangshi) , }; string sql = "Update OA_ShebeiWeixiu Set [MemberId]=@MemberId,[ShebeiId]=@ShebeiId,[WeixiuTime]=@WeixiuTime,[CateId]=@CateId,[Name]=@Name,[Anzhuangdidian]=@Anzhuangdidian,[Remark]=@Remark,[WeixiuPrice]=@WeixiuPrice,[Zerenren]=@Zerenren,[ZerenrenName]=@ZerenrenName,[DanzePrice]=@DanzePrice, [WeixiuShebeiId]=@WeixiuShebeiId,[FukuanShebeiId]=@FukuanShebeiId,[FukuanshenqingId]=@FukuanshenqingId,[Shifoufufei]=@Shifoufufei,[LastUpdateTime]=@LastUpdateTime, [Operator]=@Operator,ApprovalStatus=@ApprovalStatus where [Keyid] =@Keyid "; string sql = "Update OA_ShebeiWeixiu Set [MemberId]=@MemberId,[ShebeiId]=@ShebeiId,[WeixiuTime]=@WeixiuTime,[CateId]=@CateId,[Name]=@Name,[Anzhuangdidian]=@Anzhuangdidian,[Remark]=@Remark,[WeixiuPrice]=@WeixiuPrice,[Zerenren]=@Zerenren,[ZerenrenName]=@ZerenrenName,[DanzePrice]=@DanzePrice, [WeixiuShebeiId]=@WeixiuShebeiId,[FukuanShebeiId]=@FukuanShebeiId,[FukuanshenqingId]=@FukuanshenqingId,[Shifoufufei]=@Shifoufufei,[LastUpdateTime]=@LastUpdateTime, [Operator]=@Operator,ApprovalStatus=@ApprovalStatus,Fukuanfangshi=@Fukuanfangshi where [Keyid] =@Keyid "; try { CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuAdd.aspx
@@ -51,9 +51,18 @@ <tr> <td class="ali03">是否申请付款:</td> <td> <select keepdefaultstyle='true' id='selShifoufukuan' runat="server" class='Sreq' > <td> <select keepdefaultstyle='true' id='selShifoufukuan' runat="server" class='Sreq' onchange="changeShifoufukuan();" > <option value='2'>否</option> <option value='1'>是</option> </select> </td> </tr> <tr style="display:none;" id="Fukuanfangshitr"> <td class="ali03">付款方式:</td> <td> <select keepdefaultstyle='true' id='selFukuanfangshi' runat="server" class='Sreq' > <option value='1'>对公转账</option> <option value='2'>现金支付</option> </select> </td> </tr> @@ -105,6 +114,15 @@ }); } function changeShifoufukuan() { if ($("#selShifoufukuan").val() == "1") { $("#Fukuanfangshitr").show(); } else { $("#Fukuanfangshitr").hide(); } } ///新增客户 function showCustomer() { top.Dialog.open({ URL: "/Pages/procurement/SuppliersEdit.aspx?Keyid='0'&&flasss=ddfffff", Title: "新增供应商", Width: 950, Height: 650 }); CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuAdd.aspx.cs
@@ -12,6 +12,9 @@ using System.Threading.Tasks; using System.Transactions; using CY.BLL.OA; using System.Net; using System.IO; using System.Web.Script.Serialization; namespace CY.WebForm.Pages.Property { @@ -22,12 +25,13 @@ EC_OrderBasicBLL bll_EC_OrderBasicBLL = null; OA_FukuanshenqingBLL _oA_FukuanshenqingBLL = null; OA_SubjectSetBLL _OA_SubjectSetBLL = null; OA_StaffBLL bll_OA_StaffBLL = null; OA_WorkPlanBll oA_WorkReminderBll = null; OA_ShebeiManageBLL oA_ShebeiManageBLL = null; OA_ShebeiWeixiuBLL oA_ShebeiWeixiuBLL = null; string url = "https://yocaisim.51zhengcai.com/api/CYOSSetting/GetShowID";// "http://192.168.0.36:5000/api/CYOSSetting/GetShowID"; @@ -41,6 +45,7 @@ oA_WorkReminderBll = new OA_WorkPlanBll(); oA_ShebeiManageBLL = new OA_ShebeiManageBLL(); oA_ShebeiWeixiuBLL = new OA_ShebeiWeixiuBLL(); _OA_SubjectSetBLL = new OA_SubjectSetBLL(); } @@ -204,6 +209,7 @@ oA_ShebeiWeixiu.Creator = CurrentUser.ShortName; oA_ShebeiWeixiu.LastUpdateTime = nowTime; oA_ShebeiWeixiu.Operator = CurrentUser.ShortName; //需要添加审批信息 @@ -212,96 +218,238 @@ if (this.selShifoufukuan.Value == "1" ) { OA_Fukuanshenqing oA_Fukuanshenqing = new OA_Fukuanshenqing(); oA_ShebeiWeixiu.Fukuanfangshi = this.selFukuanfangshi.Value; if(oA_ShebeiWeixiu.Fukuanfangshi == "1") { OA_Fukuanshenqing oA_Fukuanshenqing = new OA_Fukuanshenqing(); oA_Fukuanshenqing.FirmId = CurrentUser.MemberId; oA_Fukuanshenqing.SupplierId = "0"; oA_Fukuanshenqing.Fukuanshenqingstatus = 0; oA_Fukuanshenqing.ApprovalStatus = 0; oA_Fukuanshenqing.FirmId = CurrentUser.MemberId; oA_Fukuanshenqing.SupplierId = "0"; oA_Fukuanshenqing.Fukuanshenqingstatus = 0; oA_Fukuanshenqing.ApprovalStatus = 0; oA_Fukuanshenqing.Molingmoney = 0; oA_Fukuanshenqing.Molingmoney = 0; oA_Fukuanshenqing.Fukuanmoney = this.txtWeixiuPrice.Value.ToDecimal2(); oA_Fukuanshenqing.Bank = ""; oA_Fukuanshenqing.Huming = ""; oA_Fukuanshenqing.AccountID = ""; oA_Fukuanshenqing.Yishoumoney = 0; oA_Fukuanshenqing.Youwufapiao = 0; oA_Fukuanshenqing.Fukuanyongtu = "设备维修费"; oA_Fukuanshenqing.FukuanStatus = 1; oA_Fukuanshenqing.remark = ""; oA_Fukuanshenqing.DindanId = ""; oA_Fukuanshenqing.Fukuanmoney = this.txtWeixiuPrice.Value.ToDecimal2(); oA_Fukuanshenqing.Bank = ""; oA_Fukuanshenqing.Huming = ""; oA_Fukuanshenqing.AccountID = ""; oA_Fukuanshenqing.Yishoumoney = 0; oA_Fukuanshenqing.Youwufapiao = 0; oA_Fukuanshenqing.Fukuanyongtu = "设备维修费"; oA_Fukuanshenqing.FukuanStatus = 1; oA_Fukuanshenqing.remark = ""; oA_Fukuanshenqing.DindanId = ""; oA_Fukuanshenqing.Creater = CurrentUser.ShortName; oA_Fukuanshenqing.CreateTime = nowTime; oA_Fukuanshenqing.Updater = CurrentUser.ShortName; oA_Fukuanshenqing.LastUpdateTime = nowTime; //var oA_Suppliers = _OA_SuppliersBLL.getSingleSupplier(this.selSuppliers.Value); //var _SupplierName = ""; //if (oA_Suppliers != null) //{ // _SupplierName = oA_Suppliers.Name; //} var _SupplierName = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修"; oA_Fukuanshenqing.SupplierName = _SupplierName; var id = _oA_FukuanshenqingBLL.InsertModel(oA_Fukuanshenqing); oA_ShebeiWeixiu.FukuanshenqingId = id; m_OA_WorkPlan.PlanComplany = id.ToString(); oA_Fukuanshenqing.Creater = CurrentUser.ShortName; oA_Fukuanshenqing.CreateTime = nowTime; oA_Fukuanshenqing.Updater = CurrentUser.ShortName; oA_Fukuanshenqing.LastUpdateTime = nowTime; //var oA_Suppliers = _OA_SuppliersBLL.getSingleSupplier(this.selSuppliers.Value); //var _SupplierName = ""; //if (oA_Suppliers != null) //{ // _SupplierName = oA_Suppliers.Name; //} var _SupplierName = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修"; oA_Fukuanshenqing.SupplierName = _SupplierName; var id = _oA_FukuanshenqingBLL.InsertModel(oA_Fukuanshenqing); oA_ShebeiWeixiu.FukuanshenqingId = id; m_OA_WorkPlan.PlanComplany = id.ToString(); m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 0; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardContent = ""; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardResult = ""; m_OA_WorkPlan.RewardType = 0; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.PlanTitle = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修申请"; m_OA_WorkPlan.PlanDataType = 18; m_OA_WorkPlan.PlanMoney = this.txtWeixiuPrice.Value.ToDecimal2(); m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanContent = this.txtPlanRemark.Value + ".维修日期:" + this.txtWeixiuTime.Value; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; } else { m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 2; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardType = 1; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; if (string.IsNullOrEmpty(m_OA_WorkPlan.EvaluationContent)) { try { var request = (HttpWebRequest)WebRequest.Create(url); request.Method = "GET"; using (var response = (HttpWebResponse)request.GetResponse()) { using (var reader = new StreamReader(response.GetResponseStream())) { string content = reader.ReadToEnd(); JavaScriptSerializer serializer = new JavaScriptSerializer(); var person = serializer.Deserialize<Responsebody>(content); if (person != null && person.code == 1) { m_OA_WorkPlan.EvaluationContent = person.data; } else { JavaScript.MessageBox("生成报销单号失败", this); return; } } } } catch (Exception ex) { JavaScript.MessageBox("生成报销单号失败", this); return; } } var oA_SubjectSet =_OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "贷").Where(x=>x.SubjectName == "维修配件").FirstOrDefault(); if (oA_SubjectSet != null) { m_OA_WorkPlan.RewardResult = oA_SubjectSet.Keyid.ToString(); m_OA_WorkPlan.RewardContent = oA_SubjectSet.SubjectName; } else { m_OA_WorkPlan.RewardResult = "0"; m_OA_WorkPlan.RewardContent = "其他"; } oA_ShebeiWeixiu.FukuanshenqingId = 0; m_OA_WorkPlan.PlanComplany = ""; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.HoubufapiaoStatus = 3; m_OA_WorkPlan.PlanContent = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修申请." + this.txtPlanRemark.Value + ".维修日期:" + this.txtWeixiuTime.Value; ; m_OA_WorkPlan.PlanDataType = 17; m_OA_WorkPlan.PlanMoney = this.txtWeixiuPrice.Value.Trim().ToDecimal2() ?? 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanTitle = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修申请"; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; } } else { m_OA_WorkPlan.PlanComplany = ""; m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 0; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardContent = ""; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardResult = ""; m_OA_WorkPlan.RewardType = 0; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.PlanTitle = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修申请"; m_OA_WorkPlan.PlanDataType = 18; m_OA_WorkPlan.PlanMoney = this.txtWeixiuPrice.Value.ToDecimal2(); m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanContent = this.txtPlanRemark.Value + ".维修日期:" + this.txtWeixiuTime.Value; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; } m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 0; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardContent = ""; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardResult = ""; m_OA_WorkPlan.RewardType = 0; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.PlanTitle = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修申请"; m_OA_WorkPlan.PlanDataType = 18; m_OA_WorkPlan.PlanMoney = this.txtWeixiuPrice.Value.ToDecimal2(); m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanContent = this.txtPlanRemark.Value+ ".维修日期:"+ this.txtWeixiuTime.Value; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; var workid = oA_WorkReminderBll.InserModelAndGetId(m_OA_WorkPlan); m_OA_WorkPlan.Keyid = workid; if (workid > 0) CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuAdd.aspx.designer.cs
@@ -78,6 +78,15 @@ protected global::System.Web.UI.HtmlControls.HtmlSelect selShifoufukuan; /// <summary> /// selFukuanfangshi 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selFukuanfangshi; /// <summary> /// trbtn 控件。 /// </summary> /// <remarks> CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuFukuanAdd.aspx
@@ -38,6 +38,15 @@ <td class="ali03">申请费用:</td> <td> <input id='txtWeixiuPrice' runat="server" maxlength='18' onblur="validateAmount(event)" placeholder="请输入金额" /></td> </tr> <tr> <td class="ali03">付款方式:</td> <td> <select keepdefaultstyle='true' id='selFukuanfangshi' runat="server" class='Sreq' > <option value='1'>对公转账</option> <option value='2'>现金支付</option> </select> </td> </tr> <tr> <td colspan="2"></td> CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuFukuanAdd.aspx.cs
@@ -12,6 +12,9 @@ using System.Threading.Tasks; using System.Transactions; using CY.BLL.OA; using System.Net; using System.IO; using System.Web.Script.Serialization; namespace CY.WebForm.Pages.Property { @@ -27,7 +30,8 @@ OA_WorkPlanBll oA_WorkReminderBll = null; OA_ShebeiManageBLL oA_ShebeiManageBLL = null; OA_ShebeiWeixiuBLL oA_ShebeiWeixiuBLL = null; string url = "https://yocaisim.51zhengcai.com/api/CYOSSetting/GetShowID";// "http://192.168.0.36:5000/api/CYOSSetting/GetShowID"; OA_SubjectSetBLL _OA_SubjectSetBLL = null; @@ -41,7 +45,7 @@ oA_WorkReminderBll = new OA_WorkPlanBll(); oA_ShebeiManageBLL = new OA_ShebeiManageBLL(); oA_ShebeiWeixiuBLL = new OA_ShebeiWeixiuBLL(); _OA_SubjectSetBLL = new OA_SubjectSetBLL(); } @@ -172,6 +176,7 @@ oA_ShebeiWeixiu.WeixiuPrice = this.txtWeixiuPrice.Value.ToDecimal2(); oA_ShebeiWeixiu.Fukuanfangshi = this.selFukuanfangshi.Value; oA_ShebeiWeixiu.LastUpdateTime = nowTime; oA_ShebeiWeixiu.Operator = CurrentUser.ShortName; @@ -179,94 +184,190 @@ OA_WorkPlan m_OA_WorkPlan = new OA_WorkPlan(); OA_Fukuanshenqing oA_Fukuanshenqing = new OA_Fukuanshenqing(); if (oA_ShebeiWeixiu.Fukuanfangshi == "1") { OA_Fukuanshenqing oA_Fukuanshenqing = new OA_Fukuanshenqing(); oA_Fukuanshenqing.FirmId = CurrentUser.MemberId; oA_Fukuanshenqing.SupplierId = "0"; oA_Fukuanshenqing.Fukuanshenqingstatus = 0; oA_Fukuanshenqing.ApprovalStatus = 0; oA_Fukuanshenqing.FirmId = CurrentUser.MemberId; oA_Fukuanshenqing.SupplierId = "0"; oA_Fukuanshenqing.Fukuanshenqingstatus = 0; oA_Fukuanshenqing.ApprovalStatus = 0; oA_Fukuanshenqing.Molingmoney = 0; oA_Fukuanshenqing.Molingmoney = 0; oA_Fukuanshenqing.Fukuanmoney = this.txtWeixiuPrice.Value.ToDecimal2(); oA_Fukuanshenqing.Bank = ""; oA_Fukuanshenqing.Huming = ""; oA_Fukuanshenqing.AccountID = ""; oA_Fukuanshenqing.Yishoumoney = 0; oA_Fukuanshenqing.Youwufapiao = 0; oA_Fukuanshenqing.Fukuanyongtu = "设备维修费"; oA_Fukuanshenqing.FukuanStatus = 1; oA_Fukuanshenqing.remark = ""; oA_Fukuanshenqing.DindanId = ""; oA_Fukuanshenqing.Fukuanmoney = this.txtWeixiuPrice.Value.ToDecimal2(); oA_Fukuanshenqing.Bank = ""; oA_Fukuanshenqing.Huming = ""; oA_Fukuanshenqing.AccountID = ""; oA_Fukuanshenqing.Yishoumoney = 0; oA_Fukuanshenqing.Youwufapiao = 0; oA_Fukuanshenqing.Fukuanyongtu = "设备维修费"; oA_Fukuanshenqing.FukuanStatus = 1; oA_Fukuanshenqing.remark = ""; oA_Fukuanshenqing.DindanId = ""; oA_Fukuanshenqing.Creater = CurrentUser.ShortName; oA_Fukuanshenqing.CreateTime = nowTime; oA_Fukuanshenqing.Updater = CurrentUser.ShortName; oA_Fukuanshenqing.LastUpdateTime = nowTime; //var oA_Suppliers = _OA_SuppliersBLL.getSingleSupplier(this.selSuppliers.Value); //var _SupplierName = ""; //if (oA_Suppliers != null) //{ // _SupplierName = oA_Suppliers.Name; //} oA_Fukuanshenqing.Creater = CurrentUser.ShortName; oA_Fukuanshenqing.CreateTime = nowTime; oA_Fukuanshenqing.Updater = CurrentUser.ShortName; oA_Fukuanshenqing.LastUpdateTime = nowTime; //var oA_Suppliers = _OA_SuppliersBLL.getSingleSupplier(this.selSuppliers.Value); //var _SupplierName = ""; //if (oA_Suppliers != null) //{ // _SupplierName = oA_Suppliers.Name; //} var _SupplierName = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修"; oA_Fukuanshenqing.SupplierName = _SupplierName; var id = _oA_FukuanshenqingBLL.InsertModel(oA_Fukuanshenqing); var _SupplierName = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修"; oA_Fukuanshenqing.SupplierName = _SupplierName; var id = _oA_FukuanshenqingBLL.InsertModel(oA_Fukuanshenqing); oA_ShebeiWeixiu.FukuanshenqingId = id; m_OA_WorkPlan.PlanComplany = id.ToString(); oA_ShebeiWeixiu.FukuanshenqingId = id; m_OA_WorkPlan.PlanComplany = id.ToString(); m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 0; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardContent = ""; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardResult = ""; m_OA_WorkPlan.RewardType = 0; m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationContent = ""; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 0; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardContent = ""; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardResult = ""; m_OA_WorkPlan.RewardType = 0; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.PlanTitle = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修付款申请"; m_OA_WorkPlan.PlanDataType = 19; m_OA_WorkPlan.PlanMoney = this.txtWeixiuPrice.Value.ToDecimal2(); m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanContent = this.txtPlanRemark.Value + ".维修日期:" + this.txtWeixiuTime.Value; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; } else m_OA_WorkPlan.DepartId = 0; { m_OA_WorkPlan.ApprovalContent = ""; m_OA_WorkPlan.ApprovalStaffId = Guid.Empty; m_OA_WorkPlan.ApprovalStaffName = ""; m_OA_WorkPlan.ApprovalStatus = 0; m_OA_WorkPlan.ApprovalTime = nowTime; m_OA_WorkPlan.EvaluationStaff = ""; m_OA_WorkPlan.EvaluationStaffId = Guid.Empty; m_OA_WorkPlan.EvaluationStatus = 2; m_OA_WorkPlan.EvaluationTime = nowTime; m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.RewardType = 1; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.PlanTitle = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修付款申请"; m_OA_WorkPlan.PlanDataType = 19; m_OA_WorkPlan.PlanMoney = this.txtWeixiuPrice.Value.ToDecimal2(); m_OA_WorkPlan.RewardMoney = 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanContent = this.txtPlanRemark.Value+ ".维修日期:"+ this.txtWeixiuTime.Value; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; m_OA_WorkPlan.PlanStartTime = nowTime; m_OA_WorkPlan.PlanStatus = 1; m_OA_WorkPlan.SentStaffId = CurrentUser.TrueMemberId; m_OA_WorkPlan.MemberId = CurrentUser.MemberId; OA_Staff m_OA_Staff = bll_OA_StaffBLL.GetModelByMemberId(CurrentUser.TrueMemberId); if (m_OA_Staff != null) m_OA_WorkPlan.DepartId = m_OA_Staff.DepartmentId; else m_OA_WorkPlan.DepartId = 0; m_OA_WorkPlan.PlanPeople = CurrentUser.TrueName; m_OA_WorkPlan.ReciveStaffId = CurrentUser.TrueMemberId; if (string.IsNullOrEmpty(m_OA_WorkPlan.EvaluationContent)) { try { var request = (HttpWebRequest)WebRequest.Create(url); request.Method = "GET"; using (var response = (HttpWebResponse)request.GetResponse()) { using (var reader = new StreamReader(response.GetResponseStream())) { string content = reader.ReadToEnd(); JavaScriptSerializer serializer = new JavaScriptSerializer(); var person = serializer.Deserialize<Responsebody>(content); if (person != null && person.code == 1) { m_OA_WorkPlan.EvaluationContent = person.data; } else { JavaScript.MessageBox("生成报销单号失败", this); return; } } } } catch (Exception ex) { JavaScript.MessageBox("生成报销单号失败", this); return; } } var oA_SubjectSet = _OA_SubjectSetBLL.getAllSubject(CurrentUser.MemberId, "贷").Where(x => x.SubjectName == "维修配件").FirstOrDefault(); if (oA_SubjectSet != null) { m_OA_WorkPlan.RewardResult = oA_SubjectSet.Keyid.ToString(); m_OA_WorkPlan.RewardContent = oA_SubjectSet.SubjectName; } else { m_OA_WorkPlan.RewardResult = "0"; m_OA_WorkPlan.RewardContent = "其他"; } oA_ShebeiWeixiu.FukuanshenqingId = 0; m_OA_WorkPlan.PlanComplany = ""; m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.HoubufapiaoStatus = 3; m_OA_WorkPlan.PlanContent = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修申请." + this.txtPlanRemark.Value + ".维修日期:" + this.txtWeixiuTime.Value; ; m_OA_WorkPlan.PlanDataType = 17; m_OA_WorkPlan.PlanMoney = this.txtWeixiuPrice.Value.Trim().ToDecimal2() ?? 0; m_OA_WorkPlan.PlanRemark = ""; m_OA_WorkPlan.PlanRunTime = DateTime.Now; m_OA_WorkPlan.PlanTitle = oA_ShebeiWeixiu.Name + "(" + ShebeiZerenrenName + ")" + "维修申请"; m_OA_WorkPlan.PlanType = 3; m_OA_WorkPlan.LastUpdateTime = nowTime; } var workid = oA_WorkReminderBll.InserModelAndGetId(m_OA_WorkPlan); m_OA_WorkPlan.Keyid = workid; if (workid > 0) CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuFukuanAdd.aspx.designer.cs
@@ -60,6 +60,15 @@ protected global::System.Web.UI.HtmlControls.HtmlInputText txtWeixiuPrice; /// <summary> /// selFukuanfangshi 控件。 /// </summary> /// <remarks> /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// </remarks> protected global::System.Web.UI.HtmlControls.HtmlSelect selFukuanfangshi; /// <summary> /// trbtn 控件。 /// </summary> /// <remarks> CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuList.aspx
@@ -195,7 +195,9 @@ <th style="text-align: center"> 担责费用 </th> <th style="text-align: center"> 付款方式 </th> <th style="text-align: center"> 操作 </th> @@ -234,6 +236,9 @@ <td style="text-align: center"> <%#Eval("DanzePrice","{0:F2}")%> </td> <td style="text-align: center"> <%#Eval("FukuanfangshiName")%> </td> <td class="Operate " style="text-align: center"> @@ -258,6 +263,8 @@ </td> <td class="ali01" > </td> <td class="ali01" > </td> </tr> <tr class="StatisticsMoney"> <td colspan="7" class="ali03"> @@ -273,7 +280,10 @@ <%=HuiMoney %> </td> <td class="ali01" > </td> <td class="ali01" > </td> </tr> </table> </FooterTemplate> CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeiWeixiuList.aspx.cs
@@ -114,7 +114,7 @@ { if(oA_ShebeiWeixiu.FukuanShebeiId.HasValue && oA_ShebeiWeixiu.FukuanShebeiId.Value > 0) { if(oA_ShebeiWeixiu.Shifoufufei.HasValue && oA_ShebeiWeixiu.FukuanShebeiId.Value == 1) if(oA_ShebeiWeixiu.Shifoufufei.HasValue && oA_ShebeiWeixiu.Shifoufufei.Value == 1) { oA_ShebeiWeixiu.Caozuo = "已付款"; } CY_ECommercePlatform/CY.WebForm/Pages/Property/ShebeimanageEdit.aspx.cs
@@ -140,7 +140,7 @@ this.txtPrice.Value=""; this.selAnzhuangdidian.Value = ""; this.txtQiyongTime.Value = ""; this.txtQiyongTime.Value = DateTime.Now.ToString("yyyy-MM-dd"); JavaScript.MessageBox("新增成功", this, false, true); } CY_ECommercePlatform/CY.WebForm/Pages/business/AgOutsourcSingleAllList.aspx
@@ -466,7 +466,7 @@ <%#IsOpearted(Eval("Keyid"), Eval("OrderState"), "送货") ? "√" : "×"%></span> </td> <td> <span menu_member_case_id="case_outAfterOrder" menu_member_case_name="修改" class="a_under <%#Eval("OrderState").ToString() == "1"?"":"UnRecive" %>" onclick='outAfterOrder(<%#Eval("Keyid") %>,<%#Eval("OldOrderId") %>)'>修改</span> <span menu_member_case_id="case_outAfterOrder" menu_member_case_name="修改" class="a_under <%#Eval("OrderState").ToString() == "1"||Eval("OrderState").ToString() == "2"?"":"UnRecive" %>" onclick='outAfterOrder(<%#Eval("Keyid") %>,<%#Eval("OldOrderId") %>)'>修改</span> <span menu_member_case_id="case_chexiaoOrder" menu_member_case_name="撤销" class="a_under <%#Eval("OrderState").ToString() == "1"?"":"UnRecive" %>" onclick='onChexiao(<%#Eval("Keyid") %>)'>撤销</span> <span menu_member_case_id="case_deleteOrder" menu_member_case_name="删除" class="a_under <%#Eval("OrderState").ToString() == "1"?"":"UnRecive" %>" onclick='onDelete(<%#Eval("Keyid") %>)'>删除</span> </td> CY_ECommercePlatform/CY.WebForm/Pages/financial/BaoxiaoFukuanEdit.aspx.cs
@@ -25,6 +25,7 @@ OA_StaffBLL staffBLL = null; OA_WorkPlanBll bll_OA_WorkPlanBll = null; OA_DepartmentBll oA_DepartmentBll = null; OA_ShebeiWeixiuBLL oA_ShebeiWeixiuBLL = null; public BaoxiaoFukuanEdit() { firmAccount = new OA_FirmAccount(); @@ -37,6 +38,7 @@ staffBLL = new OA_StaffBLL(); bll_OA_WorkPlanBll = new OA_WorkPlanBll(); oA_DepartmentBll = new OA_DepartmentBll(); oA_ShebeiWeixiuBLL = new OA_ShebeiWeixiuBLL(); } protected void Page_Load(object sender, EventArgs e) @@ -152,6 +154,14 @@ oA_WorkPlan.Operator = CurrentUser.ShortName; oA_WorkPlan.LastUpdateTime = DateTime.Now; var res = bll_OA_WorkPlanBll.UpdateModel(oA_WorkPlan); var shebeiWeixiu = oA_ShebeiWeixiuBLL.GetModelBytiaojian(null, oA_WorkPlan.Keyid, null); if (shebeiWeixiu != null) { shebeiWeixiu.Shifoufufei = 1; oA_ShebeiWeixiuBLL.UpdateModel(shebeiWeixiu); } } CY_ECommercePlatform/CY.WebForm/Pages/financial/BaoxiaoFukuanPiliang.aspx.cs
@@ -25,6 +25,7 @@ OA_StaffBLL staffBLL = null; OA_WorkPlanBll bll_OA_WorkPlanBll = null; OA_DepartmentBll oA_DepartmentBll = null; OA_ShebeiWeixiuBLL oA_ShebeiWeixiuBLL = null; public BaoxiaoFukuanPiliang() { firmAccount = new OA_FirmAccount(); @@ -37,6 +38,7 @@ staffBLL = new OA_StaffBLL(); bll_OA_WorkPlanBll = new OA_WorkPlanBll(); oA_DepartmentBll = new OA_DepartmentBll(); oA_ShebeiWeixiuBLL = new OA_ShebeiWeixiuBLL(); } protected void Page_Load(object sender, EventArgs e) @@ -160,6 +162,13 @@ oA_WorkPlan.Operator = CurrentUser.ShortName; oA_WorkPlan.LastUpdateTime = DateTime.Now; var res = bll_OA_WorkPlanBll.UpdateModel(oA_WorkPlan); var shebeiWeixiu = oA_ShebeiWeixiuBLL.GetModelBytiaojian(null, oA_WorkPlan.Keyid, null); if (shebeiWeixiu != null) { shebeiWeixiu.Shifoufufei = 1; oA_ShebeiWeixiuBLL.UpdateModel(shebeiWeixiu); } } } CY_ECommercePlatform/CY.WebForm/Pages/work/BaoxiaoReplyAdd.aspx.cs
@@ -33,6 +33,7 @@ OA_DepartmentBll oA_DepartmentBll = null; public string planDataType = ""; OA_SubjectSetBLL _OA_SubjectSetBLL = null; OA_ShebeiWeixiuBLL oA_ShebeiWeixiuBLL = null; public BaoxiaoReplyAdd() { oA_WorkReminderBll = new OA_WorkPlanBll(); @@ -45,6 +46,7 @@ oA_StaffBLL = new OA_StaffBLL(); oA_DepartmentBll = new OA_DepartmentBll(); _OA_SubjectSetBLL = new OA_SubjectSetBLL(); oA_ShebeiWeixiuBLL = new OA_ShebeiWeixiuBLL(); } //页面加载 @@ -238,6 +240,15 @@ m_OA_WorkPlan.Operator = CurrentUser.ShortName; m_OA_WorkPlan.LastUpdateTime = nowTime; res = oA_WorkReminderBll.UpdateModel(m_OA_WorkPlan); var oA_ShebeiWeixiu = oA_ShebeiWeixiuBLL.GetModelBytiaojian(null, m_OA_WorkPlan.Keyid, null); if (oA_ShebeiWeixiu != null) { //oA_ShebeiWeixiu.Zerenren = this.selZerenren.Value.ToInt32(); oA_ShebeiWeixiu.ApprovalStatus = this.selApprovalStatus.Value.ToInt32(); //oA_ShebeiWeixiu.DanzePrice = this.txtDanzePrice.Value.ToDecimal2(); oA_ShebeiWeixiuBLL.UpdateModel(oA_ShebeiWeixiu); } } else { CY_ECommercePlatform/CY.WebForm/Pages/work/RequestReplyAdd.aspx.cs
@@ -217,6 +217,26 @@ } if (m_OA_WorkPlan.ApprovalStatus == 2 && (m_OA_WorkPlan.PlanDataType == 18)) { var oA_ShebeiWeixiu = oA_ShebeiWeixiuBLL.GetModelBytiaojian(m_OA_WorkPlan.Keyid, null, null); if (oA_ShebeiWeixiu != null) { oA_ShebeiWeixiu.ApprovalStatus = m_OA_WorkPlan.ApprovalStatus; oA_ShebeiWeixiuBLL.UpdateModel(oA_ShebeiWeixiu); } } if (m_OA_WorkPlan.ApprovalStatus == 2 && (m_OA_WorkPlan.PlanDataType == 19)) { var oA_ShebeiWeixiu = oA_ShebeiWeixiuBLL.GetModelBytiaojian(null, m_OA_WorkPlan.Keyid, null); if (oA_ShebeiWeixiu != null) { oA_ShebeiWeixiu.ApprovalStatus = m_OA_WorkPlan.ApprovalStatus; oA_ShebeiWeixiuBLL.UpdateModel(oA_ShebeiWeixiu); } } if (m_OA_WorkPlan.ApprovalStatus == 1 && m_OA_WorkPlan.PlanDataType == 20) { var oA_WageAward = bll_OA_WageAwardPunishBLL.GetModelByKeyid(m_OA_WorkPlan.PlanComplany.ToInt32().Value);