Beispiel #1
0
        /// <summary>
        /// 设置缺货状态
        /// </summary>
        private void OnSellOut()
        {
            List <string> salesOrderIds = SaleList.Where(n => n.SaleOrderNo == SaleSelected.SaleOrderNo).Select(e => e.SaleOrderNo).ToList();
            var           service       = AppEx.Container.GetInstance <ILogisticsService>();
            bool          succeeded     = service.SetStatusSoldOut(salesOrderIds);

            MvvmUtility.ShowMessageAsync(succeeded ? "设置缺货成功" : "设置缺货失败", "提示", MessageBoxButton.OK, MessageBoxImage.Information);
            Query();
        }
Beispiel #2
0
        /// <summary>
        /// 完成销售单打印
        /// </summary>
        public void CommandFinishExecute()
        {
            if (SaleList == null || SaleSelected == null)
            {
                MvvmUtility.ShowMessageAsync("请选择要设置打印完成状态的销售单", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);
                return;
            }
            List <string> selectSaleIds = SaleList.Where(e => e.SaleOrderNo == SaleSelected.SaleOrderNo).Select(e => e.SaleOrderNo).ToList();
            var           iTransService = AppEx.Container.GetInstance <ILogisticsService>();
            bool          bFalg         = iTransService.SetStatusAffirmPrintSaleFinish(selectSaleIds);

            MvvmUtility.ShowMessageAsync(bFalg ? "设置打印销售单完成成功" : "设置打印销售单失败", "提示", MessageBoxButton.OK, bFalg ? MessageBoxImage.Information : MessageBoxImage.Error);
            Query();
        }
Beispiel #3
0
        private async void CannotReplenish()
        {
            if (SaleList == null || !SaleList.Any())
            {
                await MvvmUtility.ShowMessageAsync("请选择销售单", "提示", MessageBoxButton.OK, MessageBoxImage.Warning);

                return;
            }
            var saleListSelected = SaleList.Where(e => e.IsSelected).ToList();
            var succeeded        = AppEx.Container.GetInstance <ICustomerInquiryService>().SetCannotReplenish(saleListSelected.Select(e => e.SaleOrderNo).ToList());
            await MvvmUtility.ShowMessageAsync(succeeded? "设置取销售单成功" : "设置取消销售单失败", "提示", MessageBoxButton.OK, succeeded?MessageBoxImage.Information : MessageBoxImage.Error);

            if (succeeded)
            {
                SaleList       = new List <OPC_Sale>();
                SaleDetailList = new List <OPC_SaleDetail>();
                GetSaleByOrderId();
            }
        }
Beispiel #4
0
        /// <summary>
        /// 物流入库确认
        /// </summary>
        private void OnInStock()
        {
            List <string> salesOrderIds = SaleList.Where(salesOrder => salesOrder.SaleOrderNo == SaleSelected.SaleOrderNo &&
                                                         ((salesOrder.OrderProductType == SalesOrderType.System && salesOrder.Status == EnumSaleOrderStatus.ShoppingGuidePickUp) ||
                                                          (salesOrder.OrderProductType == SalesOrderType.MiniIntime && !string.IsNullOrEmpty(salesOrder.CashNum)))).Select(e => e.SaleOrderNo).ToList();

            if (salesOrderIds.Count == 0)
            {
                MvvmUtility.ShowMessageAsync("销售单无法办理入库,系统商品必须是“导购已提货”,迷你银商品必须已提供补录的收银流水号", "提示", MessageBoxButton.OK, MessageBoxImage.Error);
                return;
            }

            var  service   = AppEx.Container.GetInstance <ILogisticsService>();
            bool succeeded = service.SetStatusStoreInSure(salesOrderIds);

            MvvmUtility.ShowMessageAsync(succeeded ? "销售单入库成功" : "销售单入库失败", "提示", MessageBoxButton.OK, succeeded ? MessageBoxImage.Information : MessageBoxImage.Error);

            Query();
        }