Exemplo n.º 1
0
        public VendorAgentInfoMaintain(VendorBasicInfoVM vendorBasicVM)
        {
            EditFlag             = false;
            newAgentInfo         = new VendorAgentInfoVM();
            validationPeriodList = new List <ValidationEntity>();
            InitializeComponent();
            BindComboBoxData();
            if (vendorBasicVM.ConsignFlag.HasValue && vendorBasicVM.ConsignFlag.Value == VendorConsignFlag.Consign)
            {
                //如果为"代销" ,则显示代销结算模式Row:
                SetSettleTypeVisible(Visibility.Visible);
            }
            else
            {
                //如果为非代销,则隐藏代销结算模式Row:
                SetSettleTypeVisible(Visibility.Collapsed);
            }
            if (null != vendorBasicVM.ExtendedInfo)
            {
                //if (vendorBasicVM.ExtendedInfo.ShippingType == VendorShippingType.MET || vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET || vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Collapsed);
                //}
                //else
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Visible);

                //}
                //开票方式=商家开票&仓储方式=商家仓储,显示 “该模式下前台顾客运费均免收,请确保佣金收取足以承受运费的支出”
                if (vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET && vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                {
                    this.lblCommissionFeeAlert.Text       = ResVendorMaintain.Label_Commission_Fee_Alert;
                    this.lblCommissionFeeAlert.Visibility = Visibility.Visible;
                }
                else
                {
                    this.lblCommissionFeeAlert.Visibility = Visibility.Collapsed;
                }
            }
            this.Loaded += new RoutedEventHandler(VendorAgentInfoMaintain_Loaded);
            SetAccessControl();
        }
Exemplo n.º 2
0
        /// <summary>
        /// 编辑
        /// </summary>
        /// <param name="editVendorAgentInfo"></param>
        /// <param name="vendorBasicVM"></param>
        /// <param name="consignFlag"></param>
        public VendorAgentInfoMaintain(VendorAgentInfoVM editVendorAgentInfo, VendorBasicInfoVM vendorBasicVM, bool isView)
        {
            EditFlag             = true;
            newAgentInfo         = new VendorAgentInfoVM();
            validationPeriodList = new List <ValidationEntity>();
            newAgentInfo         = editVendorAgentInfo;

            InitializeComponent();
            BindComboBoxData();
            if (isView)
            {
                this.btnAddAgentInfo.Visibility = Visibility.Collapsed;
            }
            this.ucSaleStageSettings.VendorStageSaleSettingsList = editVendorAgentInfo.VendorCommissionInfo.SaleRuleEntity.StagedSaleRuleItems;

            if (vendorBasicVM.ConsignFlag.HasValue && vendorBasicVM.ConsignFlag.Value == VendorConsignFlag.Consign)
            {
                //如果为"代销" ,则显示代销结算模式Row:
                SetSettleTypeVisible(Visibility.Visible);
            }
            else
            {
                //如果为非代销,则隐藏代销结算模式Row:
                SetSettleTypeVisible(Visibility.Collapsed);
            }
            if (null != vendorBasicVM.ExtendedInfo)
            {
                //if (vendorBasicVM.ExtendedInfo.ShippingType == VendorShippingType.MET || vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET || vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Collapsed);
                //}
                //else
                //{
                //    SetDeliveryAndOrderTimeControl(Visibility.Visible);
                //}
                //开票方式=商家开票&仓储方式=商家仓储,显示 “该模式下前台顾客运费均免收,请确保佣金收取足以承受运费的支出”
                if (vendorBasicVM.ExtendedInfo.InvoiceType == VendorInvoiceType.MET && vendorBasicVM.ExtendedInfo.StockType == VendorStockType.MET)
                {
                    this.lblCommissionFeeAlert.Text       = ResVendorMaintain.Label_Commission_Fee_Alert;
                    this.lblCommissionFeeAlert.Visibility = Visibility.Visible;
                }
                else
                {
                    this.lblCommissionFeeAlert.Visibility = Visibility.Collapsed;
                }
            }

            if (editVendorAgentInfo.SettleType == SettleType.P)
            {
                this.rdoSettleType_O.IsChecked = false;
                this.rdoSettleType_P.IsChecked = true;

                this.lblSettlePercentage.Visibility = Visibility.Visible;
                this.txtSettlePercentage.Visibility = Visibility.Visible;
                this.txtSettlePercentage.Text       = editVendorAgentInfo.SettlePercentage;
            }
            else
            {
                this.rdoSettleType_O.IsChecked = true;
                this.rdoSettleType_P.IsChecked = false;
            }

            this.btnAddAgentInfo.Content = ResVendorMaintain.Button_Agent_Modify;

            //绑定下单日期 - CheckBoxList:
            BindVendorBuyWeekDayCheckBoxList(string.IsNullOrEmpty(editVendorAgentInfo.RequestBuyWeekDay) ? editVendorAgentInfo.BuyWeekDay : editVendorAgentInfo.RequestBuyWeekDay);
            //待审核状态:显示"以下为修改待审核状态信息:"
            if (editVendorAgentInfo.RequestType == VendorModifyRequestStatus.Apply)
            {
                lblAuditText.Text       = ResVendorMaintain.Msg_AuditAgentAlertText;
                lblAuditText.Visibility = Visibility.Visible;
            }
            this.Loaded += new RoutedEventHandler(VendorAgentInfoMaintain_Loaded);
            SetAccessControl();
        }