private void btnCancelAudit_Click(object sender, RoutedEventArgs e) { //取消审核: CurrentWindow.Confirm(ResVendorMaintain.InfoMsg_ConfirmCancelAudit, (obj, args) => { if (args.DialogResult == DialogResultType.OK) { VendorModifyRequestInfo info = EntityConverter<VendorModifyRequestInfoVM, VendorModifyRequestInfo>.Convert(editVM.VendorFinanceInfo.FinanceRequestInfo); serviceFacade.WithDrawVendorFinanceInfo(info, (obj2, args2) => { if (args2.FaultsHandle()) { return; } CurrentWindow.Alert(ResVendorMaintain.AlertMsg_AlertTitle, ResVendorMaintain.InfoMsg_CancelAuditSuc, MessageType.Information, (obj3, args3) => { if (args3.DialogResult == DialogResultType.Cancel) { Dialog.Close(); //CurrentWindow.Refresh(); } }); }); } }); }
private void btnDeclineAudit_Click(object sender, RoutedEventArgs e) { //审核未通过: CurrentWindow.Confirm(ResVendorMaintain.InfoMsg_ConfirmAuditFail, (obj, args) => { if (args.DialogResult == DialogResultType.OK) { VendorModifyRequestInfo info = EntityConverter<VendorModifyRequestInfoVM, VendorModifyRequestInfo>.Convert(editVM.VendorFinanceInfo.FinanceRequestInfo, (s, t) => { t.Memo = this.txtMemo.Text; }); serviceFacade.DeclineVendorFinanceInfo(info, (obj2, args2) => { if (args2.FaultsHandle()) { return; } CurrentWindow.Alert(ResVendorMaintain.AlertMsg_AlertTitle, ResVendorMaintain.InfoMsg_AuditFailSuc, MessageType.Information, (obj3, args3) => { if (args3.DialogResult == DialogResultType.Cancel) { Dialog.Close(); //CurrentWindow.Refresh(); } }); }); } }); }
/// <summary> /// 申请通过(下单日期/等级申请/代理信息) /// </summary> /// <param name="requestInfo"></param> /// <param name="callback"></param> public void PassVendorModifyRequest(VendorModifyRequestInfo requestInfo, EventHandler <RestClientEventArgs <VendorModifyRequestInfo> > callback) { requestInfo.CompanyCode = CPApplication.Current.CompanyCode; requestInfo.CreateUserSysNo = CPApplication.Current.LoginUser.UserSysNo; string relativeUrl = "/POService/Vendor/PassVendorModifyRequest"; restClient.Update <VendorModifyRequestInfo>(relativeUrl, requestInfo, callback); }
/// <summary> /// 取消审核 - 供应商财务信息 /// </summary> /// <param name="info"></param> /// <param name="callback"></param> public void WithDrawVendorFinanceInfo(VendorModifyRequestInfo info, EventHandler <RestClientEventArgs <object> > callback) { info.CompanyCode = CPApplication.Current.CompanyCode; info.CreateUserSysNo = CPApplication.Current.LoginUser.UserSysNo; string relativeUrl = "/POService/Vendor/WithdrawVendorFinanceInfo"; restClient.Update(relativeUrl, info, callback); }
public static VendorModifyRequestInfo CreateModifyRequest(VendorModifyRequestInfo requestInfo, int sellerSysNo) { DataCommand command = DataCommandManager.GetDataCommand("CreateModifyRequest"); command.SetParameterValue("@VendorSysNo", requestInfo.VendorSysNo); command.SetParameterValue("@CompanyCode", requestInfo.CompanyCode); //command.SetParameterValueAsCurrentUserSysNo("@CreateUserSysNo"); command.SetParameterValue("@CreateUserSysNo", sellerSysNo); command.SetParameterValue("@Status", requestInfo.Status); command.SetParameterValue("@RequestType", (int)requestInfo.RequestType); command.SetParameterValue("@RANK", requestInfo.Rank); command.SetParameterValue("@ActionType", (int?)requestInfo.ActionType); command.SetParameterValue("@ManufacturerSysNo", requestInfo.ManufacturerSysNo); command.SetParameterValue("@VendorManufacturerSysNo", requestInfo.VendorManufacturerSysNo); command.SetParameterValue("@VendorManufacturerStatus", VendorAgentStatus.Requesting); command.SetParameterValue("@LEVEL", requestInfo.AgentLevel); command.SetParameterValue("@C2SysNo", requestInfo.C2SysNo); command.SetParameterValue("@C3SysNo", requestInfo.C3SysNo); command.SetParameterValue("@Content", requestInfo.Content); command.SetParameterValue("@Memo", requestInfo.Memo); if (requestInfo.SettleType.HasValue) { command.SetParameterValue("@SettleType", requestInfo.SettleType.Value.ToString()); } else { command.SetParameterValue("@SettleType", ""); } command.SetParameterValue("@SettlePercentage", requestInfo.SettlePercentage.HasValue ? requestInfo.SettlePercentage.Value : 0); command.SetParameterValue("@BuyWeekDay", requestInfo.BuyWeekDay); command.SetParameterValue("@SendPeriod", requestInfo.SendPeriod); command.SetParameterValue("@BrandSysNo", requestInfo.BrandSysNo); //CRL20146 By Kilin command.SetParameterValue("@SettlePeriodType", (int?)requestInfo.SettlePeriodType); command.SetParameterValue("@AutoAudit", requestInfo.AutoAudit.HasValue && requestInfo.AutoAudit == true ? "Y" : null); command.SetParameterValue("@CompanyCode", requestInfo.CompanyCode); //[[ added by poseidon.y.tong at [2012-08-21 20:52:22] //command.SetParameterValue("@MaxNoPayTimeForOrder", requestInfo.MaxNoPayTimeForOrder); //command.SetParameterValue("@IsNeedConfirmOrder", requestInfo.IsNeedConfirmOrder); //]] if (command.ExecuteNonQuery() > 0) { return(requestInfo); } else { return(null); } }
private void btnRequestForApproval_Click(object sender, RoutedEventArgs e) { if (!this.editVM.VendorFinanceInfo.CooperateValidDate.HasValue || !this.editVM.VendorFinanceInfo.CooperateExpiredDate.HasValue) { CurrentWindow.Alert(ResVendorMaintain.Msg_CooperateDateNull); return; } if (!ValidationManager.Validate(LayoutRoot)) { return; } //提交审核: CurrentWindow.Confirm(ResVendorMaintain.InfoMsg_ConfirmSumitAudit, (obj, args) => { if (args.DialogResult == DialogResultType.OK) { VendorModifyRequestInfo info = new VendorModifyRequestInfo() { VendorSysNo = editVM.SysNo.Value, ValidDate = editVM.VendorFinanceInfo.CooperateValidDate, ExpiredDate = editVM.VendorFinanceInfo.CooperateExpiredDate, ContractAmt = Convert.ToDecimal(editVM.VendorFinanceInfo.CooperateAmt), VendorName = editVM.VendorBasicInfo.VendorNameLocal, AutoAudit = editVM.VendorFinanceInfo.IsAutoAudit, ActionType = VendorModifyActionType.Edit, RequestType = VendorModifyRequestType.Finance, Memo = this.txtMemo.Text, PayPeriodType = new VendorPayTermsItemInfo() { PayTermsNo = editVM.VendorFinanceInfo.PayPeriodType.PayTermsNo }, SettlePeriodType = editVM.VendorFinanceInfo.SettlePeriodType }; serviceFacade.RequestForApprovalVendorFinanceInfo(info, (obj2, args2) => { if (args2.FaultsHandle()) { return; } CurrentWindow.Alert(ResVendorMaintain.AlertMsg_AlertTitle, ResVendorMaintain.InfoMsg_SumitAuditSuc, MessageType.Information, (obj3, args3) => { if (args3.DialogResult == DialogResultType.Cancel) { Dialog.Close(); // CurrentWindow.Refresh(); } }); }); } }); }
public VendorModifyRequestInfo WithDrawVendorFinanceInfo(VendorModifyRequestInfo info) { return(VendorProcessor.WithDrawVendorFinanceInfo(info)); }
public static void SaveStoreAgentProduct(List <VendorAgentInfo> agentsInfoes, int sellerSysNo, string createUserName , bool isRequest) { var singleAgentInfo = new List <VendorAgentInfo>(); #region check 是否存在重复的代理,品牌,C3 if (isRequest == false) { var message = new StringBuilder(); var originAgentInfo = StoreService.QueryStoreAgentInfos(sellerSysNo); agentsInfoes.ForEach(p => { var isExists = originAgentInfo.Any(q => q.C3Name == p.C3Name && q.BrandInfo.SysNo == p.BrandInfo.SysNo); if (isExists) { message.AppendFormat("{0},{1},{2}已代理<br/>", p.BrandInfo.BrandNameLocal, p.C3Name, p.AgentLevel); } else { singleAgentInfo.Add(p); } }); if (message.Length > 0) { throw new BusinessException(message.ToString()); } } #endregion var agentedProduct = StoreDA.QueryStoreAgentInfos(sellerSysNo).Where(p => p.RequestType == VendorModifyRequestStatus.VerifyPass); using (var trans = TransactionManager.Create()) { agentsInfoes.ForEach(p => { if (p.AgentSysNo.HasValue && agentedProduct.Any(q => q.AgentSysNo == p.AgentSysNo.Value)) { return; } p.RequestType = VendorModifyRequestStatus.Apply; //CreateVendorManufacturerInfo VendorAgentInfo createdVendorAgentInfo; if (p.AgentSysNo.HasValue) { //p.Status = VendorAgentStatus.Normal; //提交审核需要将Status置零 if (isRequest) { p.Status = VendorAgentStatus.Normal; } createdVendorAgentInfo = StoreDA.UpdateVendorManufacturerInfo(p, sellerSysNo); } else { createdVendorAgentInfo = StoreDA.CreateVendorManufacturerInfo(p, sellerSysNo); } p.AgentSysNo = createdVendorAgentInfo.AgentSysNo; //CreateVendorCommissionInfo //根据C3和Brand获取佣金规则,设置VendorCommissionInfo //p.BrandInfo.SysNo //p.C3SysNo if (p.BrandInfo != null && p.BrandInfo.SysNo.HasValue) { CommissionRule rule = StoreDA.QueryCommissionRule(p.BrandInfo.SysNo.Value, p.C3SysNo.Value); if (rule != null) { if (p.VendorCommissionInfo == null) { p.VendorCommissionInfo = new VendorCommissionInfo(); } p.VendorCommissionInfo.DeliveryFee = rule.DeliveryFee; //p.VendorCommissionInfo.GuaranteedAmt= p.VendorCommissionInfo.RentFee = rule.RentFee; if (string.IsNullOrWhiteSpace(rule.SalesRule)) { p.VendorCommissionInfo.SaleRuleEntity = new VendorStagedSaleRuleEntity(); } else { p.VendorCommissionInfo.SaleRuleEntity = SerializationUtility.XmlDeserialize <VendorStagedSaleRuleEntity>(rule.SalesRule); } p.VendorCommissionInfo.OrderCommissionAmt = rule.OrderCommissionFee; } } StoreDA.CreateVendorCommissionInfo(p, sellerSysNo, createUserName); #region 写入品牌商检信息 //seller portal不需要些商检信息,在ecc中品牌审核通过后写品牌的商检信息 //var brandFiling = new StoreBrandFiling(); //brandFiling.AgentLevel = p.AgentLevel; //brandFiling.BrandSysNo = p.BrandInfo.SysNo.Value; //brandFiling.CompanyCode = p.CompanyCode; //brandFiling.EditDate = DateTime.Now; //brandFiling.EditUserName = createUserName; //brandFiling.EditUserSysNo = sellerSysNo; //brandFiling.InDate = DateTime.Now; //brandFiling.InUserName = createUserName; //brandFiling.InUserSysNo = sellerSysNo; //brandFiling.Staus = 1; //brandFiling.SellerSysNo = sellerSysNo; //brandFiling.InspectionNo = CommonService.GenerateInspectionNo(); //StoreDA.InsertStoreBrandFiling(brandFiling); #endregion #region 写申请表 if (isRequest) { VendorModifyRequestInfo requestVendorAgentInfo = new VendorModifyRequestInfo { ActionType = VendorModifyActionType.Add, RequestType = VendorModifyRequestType.Manufacturer, VendorSysNo = sellerSysNo, //生产商的编号读取品牌对应的生产商 //ManufacturerSysNo = agentInfo.ManufacturerInfo.SysNo.Value, VendorManufacturerSysNo = p.AgentSysNo.Value, AgentLevel = p.AgentLevel, C2SysNo = p.C2SysNo, C3SysNo = p.C3SysNo, Status = VendorModifyRequestStatus.Apply, SettlePercentage = p.SettlePercentage, SettleType = p.SettleType, BuyWeekDay = p.BuyWeekDay, SendPeriod = p.SendPeriod, BrandSysNo = p.BrandInfo.SysNo, CompanyCode = p.CompanyCode, //CRL20146 By Kilin //写代销结算类型 //SettlePeriodType = vendorInfo.VendorFinanceInfo.SettlePeriodType, SettlePeriodType = null, AutoAudit = false, MaxNoPayTimeForOrder = p.MaxNoPayTimeForOrder, IsNeedConfirmOrder = p.IsNeedConfirmOrder //]] }; // StoreDA.CreateModifyRequest(requestVendorAgentInfo, sellerSysNo); } #endregion }); trans.Complete(); } }
public VendorModifyRequestInfo ApproveVendorFinanceInfo(VendorModifyRequestInfo info) { return(VendorProcessor.ApproveVendorFinanceInfo(info)); }
public VendorModifyRequestInfo DeclineVendorFinanceInfo(VendorModifyRequestInfo info) { return(VendorProcessor.DeclineVendorFinanceInfo(info)); }
public VendorModifyRequestInfo PassVendorManufacturer(VendorModifyRequestInfo info) { return(VendorProcessor.PassVendorManufacturer(info)); }
public VendorModifyRequestInfo RequestForApprovalVendorFinanceInfo(VendorModifyRequestInfo info) { return(VendorProcessor.RequestForApprovalVendorFinanceInfo(info)); }
public VendorModifyRequestInfo CancelVendorManufacturer(VendorModifyRequestInfo info) { return(VendorProcessor.CancelVendorManufacturer(info)); }
public VendorModifyRequestInfo PassVendorModifyRequest(VendorModifyRequestInfo requestInfo) { return(ObjectFactory <VendorAppService> .Instance.PassVendorManufacturer(requestInfo)); }
public void DeclineVendorFinanceInfo(VendorModifyRequestInfo info) { ObjectFactory <VendorAppService> .Instance.DeclineVendorFinanceInfo(info); }
public void RequestForApprovalVendorFinanceInfo(VendorModifyRequestInfo info) { ObjectFactory <VendorAppService> .Instance.RequestForApprovalVendorFinanceInfo(info); }
public void WithdrawVendorFinanceInfo(VendorModifyRequestInfo info) { ObjectFactory <VendorAppService> .Instance.WithDrawVendorFinanceInfo(info); }