Exemplo n.º 1
0
 private async void CheckOrder(OrderVM order)
 {
     if (MessageBox.Show("确认直接二次清点吗?", "提示", MessageBoxButton.YesNo) != MessageBoxResult.Yes)
     {
         return;
     }
     try
     {
         ApiResult <string> result = new ApiResult <string>();
         if (order.InType == "反洗入库")
         {
             result = await Task.Run(() => UserContext.ApiHelper.CheckRewashOrder(order.OrderNum, order.OrderDetailRfids));
         }
         else
         {
             result = await Task.Run(() => UserContext.ApiHelper.CheckInOrder(order.OrderNum, order.OrderDetailRfids));
         }
         if (result.Success)
         {
             MessageBox.Show("清点成功");
             InitOrderSource();
         }
         else
         {
             MessageBox.Show("清点失败");
         }
     }
     catch (Exception ex)
     {
         LogHelper.WriteErrorLog(LogType.BASE, ex);
     }
 }
Exemplo n.º 2
0
        private OrderVM InOrderToOrderVM(InOrder order, int index)
        {
            var orderVm = new OrderVM();

            orderVm.Index            = index++;
            orderVm.OrderNum         = order.OrderNo;
            orderVm.OrderDate        = order.CreateTime;
            orderVm.CustomId         = order.CustomerId;
            orderVm.CustomName       = order.CustomerName;
            orderVm.StoreName        = order.StoreName;
            orderVm.InType           = order.InType == 1 ? "日常入库" : "反洗入库";
            orderVm.OrderDetailRfids = new List <string>();
            foreach (var detail in order.Details)
            {
                orderVm.OrderDetailRfids.AddRange(detail.WareSNCodes.Split(','));
            }
            orderVm.RfidCount = orderVm.OrderDetailRfids.Count;
            orderVm.CheckInfo = "待清点";
            return(orderVm);
        }