麻醉师核对去掉取药箱、还药箱
This commit is contained in:
		
							parent
							
								
									de36bbafcc
								
							
						
					
					
						commit
						acdecc8700
					
				| 
						 | 
					@ -554,12 +554,11 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        IDialogService _dialogService;
 | 
					        IDialogService _dialogService;
 | 
				
			||||||
        SocketHelper _socketHelper;
 | 
					        SocketHelper _socketHelper;
 | 
				
			||||||
        public CheckSelfOrderWindowViewModel(IEventAggregator eventAggregator, SocketHelper socketHelper, IDialogService dialogService)
 | 
					        public CheckSelfOrderWindowViewModel(IEventAggregator eventAggregator, SocketHelper socketHelper)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            //_portUtil = portUtil;
 | 
					            //_portUtil = portUtil;
 | 
				
			||||||
            _eventAggregator = eventAggregator;
 | 
					            _eventAggregator = eventAggregator;
 | 
				
			||||||
            _socketHelper = socketHelper;
 | 
					            _socketHelper = socketHelper;
 | 
				
			||||||
            _dialogService = dialogService;
 | 
					 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        private string? _searchValue;
 | 
					        private string? _searchValue;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -620,6 +619,7 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
 | 
					
 | 
				
			||||||
                if (OrderInfoList != null && OrderInfoList.Count() > 0)
 | 
					                if (OrderInfoList != null && OrderInfoList.Count() > 0)
 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
 | 
					                    OrderInfoList.ForEach(oi => oi.ItemIsChecked = true);
 | 
				
			||||||
                    OrderInfoList.ForEach(oi => oi._OrderDetail.DrugInfo = oi._OrderDetail.DrugInfo ?? new DrugInfo());
 | 
					                    OrderInfoList.ForEach(oi => oi._OrderDetail.DrugInfo = oi._OrderDetail.DrugInfo ?? new DrugInfo());
 | 
				
			||||||
                    OrderInfoList.Where(oi=>oi._OrderDetail.surgicalResidual?.SendNo==DrawerNo.ToString()).ToList()?.ForEach(oi => oi.ItemIsChecked = true);
 | 
					                    OrderInfoList.Where(oi=>oi._OrderDetail.surgicalResidual?.SendNo==DrawerNo.ToString()).ToList()?.ForEach(oi => oi.ItemIsChecked = true);
 | 
				
			||||||
                    //TotalDrugList = OrderInfoList.Where(oi => oi.ItemIsChecked).GroupBy(oi => oi.OrderDetailList.DrugInfo.DrugName).Select(oi => new TotalDrug { DrugName = oi.Key, TotalCount = oi.Sum(item => item.OrderDetailList.Quantity) }).ToList();
 | 
					                    //TotalDrugList = OrderInfoList.Where(oi => oi.ItemIsChecked).GroupBy(oi => oi.OrderDetailList.DrugInfo.DrugName).Select(oi => new TotalDrug { DrugName = oi.Key, TotalCount = oi.Sum(item => item.OrderDetailList.Quantity) }).ToList();
 | 
				
			||||||
| 
						 | 
					@ -800,6 +800,7 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            if (DrawerNo > 0)
 | 
					            if (DrawerNo > 0)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
 | 
					                RequestData();
 | 
				
			||||||
                Status = 1;
 | 
					                Status = 1;
 | 
				
			||||||
                _socketHelper.speechSynthesizer.SpeakAsyncCancelAll();
 | 
					                _socketHelper.speechSynthesizer.SpeakAsyncCancelAll();
 | 
				
			||||||
                _socketHelper.speechSynthesizer.Resume();
 | 
					                _socketHelper.speechSynthesizer.Resume();
 | 
				
			||||||
| 
						 | 
					@ -826,71 +827,71 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
                _socketHelper.OpenStatus = true;
 | 
					                _socketHelper.OpenStatus = true;
 | 
				
			||||||
                //记录药箱打开时间
 | 
					                //记录药箱打开时间
 | 
				
			||||||
                //ChannelList channelList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5" && cl.DrawerNo == DrawerNo).First();
 | 
					                ChannelList channelList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5" && cl.DrawerNo == DrawerNo).First();
 | 
				
			||||||
                //if (channelList != null && (channelList.EffDate is null || Convert.ToDateTime(channelList.EffDate).ToString("yyyy-MM-dd") != DateTime.Now.ToString("yyyy-MM-dd")))
 | 
					                if (channelList != null && (channelList.EffDate is null || Convert.ToDateTime(channelList.EffDate).ToString("yyyy-MM-dd") != DateTime.Now.ToString("yyyy-MM-dd")))
 | 
				
			||||||
                //{
 | 
					 | 
				
			||||||
                    //channelList.DrawerState = 0;
 | 
					 | 
				
			||||||
                    //channelList.EffDate = DateTime.Now.ToString();
 | 
					 | 
				
			||||||
                    //SqlSugarHelper.Db.Updateable(channelList).UpdateColumns(it => new { it.EffDate,it.DrawerState }).ExecuteCommand();
 | 
					 | 
				
			||||||
                //    SqlSugarHelper.Db.Updateable<ChannelList>().SetColumns(it=>it.EffDate== DateTime.Now.ToString()).SetColumns(it => it.DrawerState == 0)
 | 
					 | 
				
			||||||
                //        .Where(it => it.MachineId == "DM5" && it.DrawerNo == DrawerNo).ExecuteCommand();
 | 
					 | 
				
			||||||
                //}
 | 
					 | 
				
			||||||
                if (OperationType == 1)
 | 
					 | 
				
			||||||
                {
 | 
					                {
 | 
				
			||||||
                    //取药箱,将当前药箱号记录到当前登录人身上
 | 
					                    channelList.DrawerState = 0;
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(HomeWindowViewModel.Operator.BoxNumber))
 | 
					                    channelList.EffDate = DateTime.Now.ToString();
 | 
				
			||||||
                    {
 | 
					                    SqlSugarHelper.Db.Updateable(channelList).UpdateColumns(it => new { it.EffDate, it.DrawerState }).ExecuteCommand();
 | 
				
			||||||
                        HomeWindowViewModel.Operator.BoxNumber += $",{DrawerNo.ToString()}";
 | 
					 | 
				
			||||||
                        SqlSugarHelper.Db.Updateable(HomeWindowViewModel.Operator).UpdateColumns(it => new { it.BoxNumber }).ExecuteCommand();
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    else
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        HomeWindowViewModel.Operator.BoxNumber = $",{DrawerNo.ToString()}";
 | 
					 | 
				
			||||||
                        SqlSugarHelper.Db.Updateable(HomeWindowViewModel.Operator).UpdateColumns(it => new { it.BoxNumber }).ExecuteCommand();
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    SqlSugarHelper.Db.Updateable<ChannelList>().SetColumns(it => it.EffDate == DateTime.Now.ToString()).SetColumns(it => it.DrawerState == 0)
 | 
					                    SqlSugarHelper.Db.Updateable<ChannelList>().SetColumns(it => it.EffDate == DateTime.Now.ToString()).SetColumns(it => it.DrawerState == 0)
 | 
				
			||||||
                      .Where(it => it.MachineId == "DM5" && it.DrawerNo == DrawerNo).ExecuteCommand();
 | 
					 | 
				
			||||||
                    //记录取药箱信息
 | 
					 | 
				
			||||||
                    SqlSugarHelper.Db.Insertable(new MachineRecord()
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
 | 
					 | 
				
			||||||
                        DrawerNo = DrawerNo,   
 | 
					 | 
				
			||||||
                        Operator = HomeWindowViewModel.Operator?.Id,
 | 
					 | 
				
			||||||
                        Reviewer = HomeWindowViewModel.Reviewer?.Id,
 | 
					 | 
				
			||||||
                        OperationTime = DateTime.Now,
 | 
					 | 
				
			||||||
                        Type = 70,
 | 
					 | 
				
			||||||
                        Status= 70,
 | 
					 | 
				
			||||||
                        InvoiceId = $"{DateTime.Now} 取出药箱"
 | 
					 | 
				
			||||||
                    }).ExecuteCommand();
 | 
					 | 
				
			||||||
                }
 | 
					 | 
				
			||||||
                else if (OperationType == 0)
 | 
					 | 
				
			||||||
                {
 | 
					 | 
				
			||||||
                    RequestData();
 | 
					 | 
				
			||||||
                    //还药箱,将当前药箱号从当前登录人身上删除
 | 
					 | 
				
			||||||
                    if (HomeWindowViewModel.Operator.BoxNumber == $",{DrawerNo.ToString()}")
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        HomeWindowViewModel.Operator.BoxNumber = string.Empty;
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    else
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        HomeWindowViewModel.Operator.BoxNumber = HomeWindowViewModel.Operator.BoxNumber.Replace($",{DrawerNo.ToString()},", ",");
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
                    SqlSugarHelper.Db.Updateable(HomeWindowViewModel.Operator).UpdateColumns(it => new { it.BoxNumber }).ExecuteCommand();
 | 
					 | 
				
			||||||
                    SqlSugarHelper.Db.Updateable<ChannelList>().SetColumns(it => it.EffDate ==null).SetColumns(it => it.DrawerState == 1)
 | 
					 | 
				
			||||||
                        .Where(it => it.MachineId == "DM5" && it.DrawerNo == DrawerNo).ExecuteCommand();
 | 
					                        .Where(it => it.MachineId == "DM5" && it.DrawerNo == DrawerNo).ExecuteCommand();
 | 
				
			||||||
                    //记录还药箱时间
 | 
					 | 
				
			||||||
                    MachineRecord returnRecord = SqlSugarHelper.Db.Queryable<MachineRecord>().Where(mc => mc.MachineId == "DM5" && mc.DrawerNo == DrawerNo&&mc.Type==70&&mc.Operator==HomeWindowViewModel.Operator.Id).First();
 | 
					 | 
				
			||||||
                    if(returnRecord!=null)
 | 
					 | 
				
			||||||
                    {
 | 
					 | 
				
			||||||
                        returnRecord.EffDate = DateTime.Now;
 | 
					 | 
				
			||||||
                        returnRecord.Status = 71;
 | 
					 | 
				
			||||||
                        returnRecord.Type = 71;
 | 
					 | 
				
			||||||
                        returnRecord.InvoiceId += $";{DateTime.Now} 还回药箱";
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
                        SqlSugarHelper.Db.Updateable(returnRecord).UpdateColumns(it => new { it.EffDate,it.Status,it.Type,it.InvoiceId }).ExecuteCommand();
 | 
					 | 
				
			||||||
                    }
 | 
					 | 
				
			||||||
             
 | 
					 | 
				
			||||||
                }
 | 
					                }
 | 
				
			||||||
 | 
					                //if (OperationType == 1)
 | 
				
			||||||
 | 
					                //{
 | 
				
			||||||
 | 
					                //    //取药箱,将当前药箱号记录到当前登录人身上
 | 
				
			||||||
 | 
					                //    if (!string.IsNullOrEmpty(HomeWindowViewModel.Operator.BoxNumber))
 | 
				
			||||||
 | 
					                //    {
 | 
				
			||||||
 | 
					                //        HomeWindowViewModel.Operator.BoxNumber += $",{DrawerNo.ToString()}";
 | 
				
			||||||
 | 
					                //        SqlSugarHelper.Db.Updateable(HomeWindowViewModel.Operator).UpdateColumns(it => new { it.BoxNumber }).ExecuteCommand();
 | 
				
			||||||
 | 
					                //    }
 | 
				
			||||||
 | 
					                //    else
 | 
				
			||||||
 | 
					                //    {
 | 
				
			||||||
 | 
					                //        HomeWindowViewModel.Operator.BoxNumber = $",{DrawerNo.ToString()}";
 | 
				
			||||||
 | 
					                //        SqlSugarHelper.Db.Updateable(HomeWindowViewModel.Operator).UpdateColumns(it => new { it.BoxNumber }).ExecuteCommand();
 | 
				
			||||||
 | 
					                //    }
 | 
				
			||||||
 | 
					                //    SqlSugarHelper.Db.Updateable<ChannelList>().SetColumns(it => it.EffDate == DateTime.Now.ToString()).SetColumns(it => it.DrawerState == 0)
 | 
				
			||||||
 | 
					                //      .Where(it => it.MachineId == "DM5" && it.DrawerNo == DrawerNo).ExecuteCommand();
 | 
				
			||||||
 | 
					                //    //记录取药箱信息
 | 
				
			||||||
 | 
					                //    SqlSugarHelper.Db.Insertable(new MachineRecord()
 | 
				
			||||||
 | 
					                //    {
 | 
				
			||||||
 | 
					                //        MachineId = ConfigurationManager.AppSettings["machineId"].ToString(),
 | 
				
			||||||
 | 
					                //        DrawerNo = DrawerNo,   
 | 
				
			||||||
 | 
					                //        Operator = HomeWindowViewModel.Operator?.Id,
 | 
				
			||||||
 | 
					                //        Reviewer = HomeWindowViewModel.Reviewer?.Id,
 | 
				
			||||||
 | 
					                //        OperationTime = DateTime.Now,
 | 
				
			||||||
 | 
					                //        Type = 70,
 | 
				
			||||||
 | 
					                //        Status= 70,
 | 
				
			||||||
 | 
					                //        InvoiceId = $"{DateTime.Now} 取出药箱"
 | 
				
			||||||
 | 
					                //    }).ExecuteCommand();
 | 
				
			||||||
 | 
					                //}
 | 
				
			||||||
 | 
					                //else if (OperationType == 0)
 | 
				
			||||||
 | 
					                //{
 | 
				
			||||||
 | 
					                //    RequestData();
 | 
				
			||||||
 | 
					                //    //还药箱,将当前药箱号从当前登录人身上删除
 | 
				
			||||||
 | 
					                //    if (HomeWindowViewModel.Operator.BoxNumber == $",{DrawerNo.ToString()}")
 | 
				
			||||||
 | 
					                //    {
 | 
				
			||||||
 | 
					                //        HomeWindowViewModel.Operator.BoxNumber = string.Empty;
 | 
				
			||||||
 | 
					                //    }
 | 
				
			||||||
 | 
					                //    else
 | 
				
			||||||
 | 
					                //    {
 | 
				
			||||||
 | 
					                //        HomeWindowViewModel.Operator.BoxNumber = HomeWindowViewModel.Operator.BoxNumber.Replace($",{DrawerNo.ToString()},", ",");
 | 
				
			||||||
 | 
					                //    }
 | 
				
			||||||
 | 
					                //    SqlSugarHelper.Db.Updateable(HomeWindowViewModel.Operator).UpdateColumns(it => new { it.BoxNumber }).ExecuteCommand();
 | 
				
			||||||
 | 
					                //    SqlSugarHelper.Db.Updateable<ChannelList>().SetColumns(it => it.EffDate ==null).SetColumns(it => it.DrawerState == 1)
 | 
				
			||||||
 | 
					                //        .Where(it => it.MachineId == "DM5" && it.DrawerNo == DrawerNo).ExecuteCommand();
 | 
				
			||||||
 | 
					                //    //记录还药箱时间
 | 
				
			||||||
 | 
					                //    MachineRecord returnRecord = SqlSugarHelper.Db.Queryable<MachineRecord>().Where(mc => mc.MachineId == "DM5" && mc.DrawerNo == DrawerNo&&mc.Type==70&&mc.Operator==HomeWindowViewModel.Operator.Id).First();
 | 
				
			||||||
 | 
					                //    if(returnRecord!=null)
 | 
				
			||||||
 | 
					                //    {
 | 
				
			||||||
 | 
					                //        returnRecord.EffDate = DateTime.Now;
 | 
				
			||||||
 | 
					                //        returnRecord.Status = 71;
 | 
				
			||||||
 | 
					                //        returnRecord.Type = 71;
 | 
				
			||||||
 | 
					                //        returnRecord.InvoiceId += $";{DateTime.Now} 还回药箱";
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					                //        SqlSugarHelper.Db.Updateable(returnRecord).UpdateColumns(it => new { it.EffDate,it.Status,it.Type,it.InvoiceId }).ExecuteCommand();
 | 
				
			||||||
 | 
					                //    }
 | 
				
			||||||
 | 
					             
 | 
				
			||||||
 | 
					                //}
 | 
				
			||||||
                Thread.Sleep(200);
 | 
					                Thread.Sleep(200);
 | 
				
			||||||
                int iException = 0;
 | 
					                int iException = 0;
 | 
				
			||||||
                new PromiseUtil<int>().taskAsyncLoop(500, 0, async (options, next, stop) =>
 | 
					                new PromiseUtil<int>().taskAsyncLoop(500, 0, async (options, next, stop) =>
 | 
				
			||||||
| 
						 | 
					@ -1123,7 +1124,7 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
        private void GetUseBox()
 | 
					        private void GetUseBox()
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            List<ChannelList> chlList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5").ToList();//.Select(cl => cl.BelongUser).First();
 | 
					            List<ChannelList> chlList = SqlSugarHelper.Db.Queryable<ChannelList>().Where(cl => cl.MachineId == "DM5").ToList();//.Select(cl => cl.BelongUser).First();
 | 
				
			||||||
            chlList = chlList.GroupBy(cl => cl.DrawerNo).Select(cl => cl.FirstOrDefault()).ToList();
 | 
					            //chlList = chlList.GroupBy(cl => cl.DrawerNo).Select(cl => cl.FirstOrDefault()).ToList();
 | 
				
			||||||
            if (chlList != null && chlList.Count > 0)
 | 
					            if (chlList != null && chlList.Count > 0)
 | 
				
			||||||
            {
 | 
					            {
 | 
				
			||||||
                for (int i = 0; i < chlList.Count; i++)
 | 
					                for (int i = 0; i < chlList.Count; i++)
 | 
				
			||||||
| 
						 | 
					@ -1137,32 +1138,32 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
                    //DrawerType== 1为公共药箱
 | 
					                    //DrawerType== 1为公共药箱
 | 
				
			||||||
                    if (chl.DrawerType == 1)
 | 
					                    if (chl.DrawerType == 1)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
                        if (OperationType == 1)
 | 
					                        //if (OperationType == 1)
 | 
				
			||||||
                        {
 | 
					                        //{
 | 
				
			||||||
                            //取药箱,在库则可取,不在则不可取
 | 
					                        //    //取药箱,在库则可取,不在则不可取
 | 
				
			||||||
                            if (chl.DrawerState == 1)
 | 
					                        //    if (chl.DrawerState == 1)
 | 
				
			||||||
                            {
 | 
					                        //    {
 | 
				
			||||||
 | 
					                        //        SetBtnEnable(chl.DrawerNo, true);
 | 
				
			||||||
 | 
					                        //    }
 | 
				
			||||||
 | 
					                        //    else
 | 
				
			||||||
 | 
					                        //    {
 | 
				
			||||||
 | 
					                        //        SetBtnEnable(chl.DrawerNo, false);
 | 
				
			||||||
 | 
					                        //    }
 | 
				
			||||||
 | 
					                        //}
 | 
				
			||||||
 | 
					                        //else
 | 
				
			||||||
 | 
					                        //{
 | 
				
			||||||
 | 
					                        //    //还药箱,只能还自己取过的药箱
 | 
				
			||||||
 | 
					                        //    //查询用户取过哪些药箱
 | 
				
			||||||
 | 
					                        //    string[] BoxNumber = HomeWindowViewModel.Operator.BoxNumber.Split(',');
 | 
				
			||||||
 | 
					                        //    if (BoxNumber != null && BoxNumber.Contains(chl.DrawerNo.ToString()))
 | 
				
			||||||
 | 
					                        //    {
 | 
				
			||||||
 | 
					                        //        SetBtnEnable(chl.DrawerNo, true);
 | 
				
			||||||
 | 
					                        //    }
 | 
				
			||||||
 | 
					                        //    else
 | 
				
			||||||
 | 
					                        //    {
 | 
				
			||||||
                                SetBtnEnable(chl.DrawerNo, true);
 | 
					                                SetBtnEnable(chl.DrawerNo, true);
 | 
				
			||||||
                            }
 | 
					                            //}
 | 
				
			||||||
                            else
 | 
					                        //}
 | 
				
			||||||
                            {
 | 
					 | 
				
			||||||
                                SetBtnEnable(chl.DrawerNo, false);
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                        else
 | 
					 | 
				
			||||||
                        {
 | 
					 | 
				
			||||||
                            //还药箱,只能还自己取过的药箱
 | 
					 | 
				
			||||||
                            //查询用户取过哪些药箱
 | 
					 | 
				
			||||||
                            string[] BoxNumber = HomeWindowViewModel.Operator.BoxNumber.Split(',');
 | 
					 | 
				
			||||||
                            if (BoxNumber != null && BoxNumber.Contains(chl.DrawerNo.ToString()))
 | 
					 | 
				
			||||||
                            {
 | 
					 | 
				
			||||||
                                SetBtnEnable(chl.DrawerNo, true);
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                            else
 | 
					 | 
				
			||||||
                            {
 | 
					 | 
				
			||||||
                                SetBtnEnable(chl.DrawerNo, false);
 | 
					 | 
				
			||||||
                            }
 | 
					 | 
				
			||||||
                        }
 | 
					 | 
				
			||||||
                    }
 | 
					                    }
 | 
				
			||||||
                    if (!string.IsNullOrEmpty(chl.BelongUser) && chl.BelongUser == HomeWindowViewModel.Operator.UserBarcode)
 | 
					                    if (!string.IsNullOrEmpty(chl.BelongUser) && chl.BelongUser == HomeWindowViewModel.Operator.UserBarcode)
 | 
				
			||||||
                    {
 | 
					                    {
 | 
				
			||||||
| 
						 | 
					@ -1179,8 +1180,8 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
        public void OnNavigatedTo(NavigationContext navigationContext)
 | 
					        public void OnNavigatedTo(NavigationContext navigationContext)
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            logger.Info("进入OnNavigatedTo");
 | 
					            logger.Info("进入OnNavigatedTo");
 | 
				
			||||||
            OpenOrderDialog();
 | 
					            //OpenOrderDialog();
 | 
				
			||||||
            //RequestData();
 | 
					            RequestData();
 | 
				
			||||||
            logger.Info("结束RequestData");
 | 
					            logger.Info("结束RequestData");
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
        public async Task OpenOrderDialog()
 | 
					        public async Task OpenOrderDialog()
 | 
				
			||||||
| 
						 | 
					@ -1221,28 +1222,28 @@ namespace DM_Weight.ViewModels
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 点击取药箱按钮
 | 
					        /// 点击取药箱按钮
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public DelegateCommand TakeBoxCommand
 | 
					        //public DelegateCommand TakeBoxCommand
 | 
				
			||||||
        {
 | 
					        //{
 | 
				
			||||||
            get => new DelegateCommand(TakeBoxMethod);
 | 
					        //    get => new DelegateCommand(TakeBoxMethod);
 | 
				
			||||||
        }
 | 
					        //}
 | 
				
			||||||
        public void TakeBoxMethod()
 | 
					        //public void TakeBoxMethod()
 | 
				
			||||||
        {
 | 
					        //{
 | 
				
			||||||
            OperationType = 1; 
 | 
					        //    OperationType = 1;
 | 
				
			||||||
            GetUseBox();
 | 
					        //    GetUseBox();
 | 
				
			||||||
        }
 | 
					        //}
 | 
				
			||||||
        /// <summary>
 | 
					        /// <summary>
 | 
				
			||||||
        /// 点击还药箱按钮
 | 
					        /// 点击还药箱按钮
 | 
				
			||||||
        /// </summary>
 | 
					        /// </summary>
 | 
				
			||||||
        public DelegateCommand ReturnBoxCommand
 | 
					        //public DelegateCommand ReturnBoxCommand
 | 
				
			||||||
        {
 | 
					        //{
 | 
				
			||||||
            get => new DelegateCommand(ReturnBoxMethod);
 | 
					        //    get => new DelegateCommand(ReturnBoxMethod);
 | 
				
			||||||
        }
 | 
					        //}
 | 
				
			||||||
        public void ReturnBoxMethod()
 | 
					        //public void ReturnBoxMethod()
 | 
				
			||||||
        {
 | 
					        //{
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            OperationType = 0;
 | 
					        //    OperationType = 0;
 | 
				
			||||||
            GetUseBox();
 | 
					        //    GetUseBox();
 | 
				
			||||||
            RequestData();
 | 
					        //    RequestData();
 | 
				
			||||||
        }
 | 
					        //}
 | 
				
			||||||
    }
 | 
					    }
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -15,7 +15,6 @@
 | 
				
			||||||
        <convert:OrderStatusConverter x:Key="OrderStatusConverter" />
 | 
					        <convert:OrderStatusConverter x:Key="OrderStatusConverter" />
 | 
				
			||||||
        <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
 | 
					        <convert:DrawerSelectConverter x:Key="DrawerSelectConverter" />
 | 
				
			||||||
        <convert:BoxNumConverter x:Key="BoxNumConverter" />
 | 
					        <convert:BoxNumConverter x:Key="BoxNumConverter" />
 | 
				
			||||||
        <convert:TakeReturnConverter x:Key="TakeReturnConverter" />
 | 
					 | 
				
			||||||
        <Style x:Key="st" TargetType="GridViewColumnHeader">
 | 
					        <Style x:Key="st" TargetType="GridViewColumnHeader">
 | 
				
			||||||
            <Style.Setters>
 | 
					            <Style.Setters>
 | 
				
			||||||
                <Setter Property="Height">
 | 
					                <Setter Property="Height">
 | 
				
			||||||
| 
						 | 
					@ -115,7 +114,7 @@
 | 
				
			||||||
                    <ColumnDefinition Width="3*" />
 | 
					                    <ColumnDefinition Width="3*" />
 | 
				
			||||||
                    <ColumnDefinition Width="3*" />
 | 
					                    <ColumnDefinition Width="3*" />
 | 
				
			||||||
                </Grid.ColumnDefinitions>
 | 
					                </Grid.ColumnDefinitions>
 | 
				
			||||||
                <DatePicker Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" 
 | 
					                <DatePicker 
 | 
				
			||||||
                Grid.Column="0"
 | 
					                Grid.Column="0"
 | 
				
			||||||
                SelectedDate="{Binding OrderDate, StringFormat=yyyy-MM-dd, TargetNullValue='',UpdateSourceTrigger=PropertyChanged}"
 | 
					                SelectedDate="{Binding OrderDate, StringFormat=yyyy-MM-dd, TargetNullValue='',UpdateSourceTrigger=PropertyChanged}"
 | 
				
			||||||
                SelectedDateFormat="Short"
 | 
					                SelectedDateFormat="Short"
 | 
				
			||||||
| 
						 | 
					@ -129,19 +128,20 @@
 | 
				
			||||||
                    IsEnabled="{Binding SelfEnable}"
 | 
					                    IsEnabled="{Binding SelfEnable}"
 | 
				
			||||||
                    materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding SelfStatus, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
 | 
					                    materialDesign:ButtonProgressAssist.IsIndicatorVisible="{Binding SelfStatus, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
 | 
				
			||||||
                    materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding SelfStatus, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
 | 
					                    materialDesign:ButtonProgressAssist.IsIndeterminate="{Binding SelfStatus, Converter={StaticResource StatusConverter}, ConverterParameter=opearBtnLoading}"
 | 
				
			||||||
                    Style="{StaticResource MaterialDesignOutlinedLightButton}"/>--><Button Margin="0 0 6 0" VerticalAlignment="Center" Command="{Binding ReturnBoxCommand}" Content="还药箱" Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=ReturnBox}"  Style="{StaticResource MaterialDesignOutlinedLightButton}"> </Button>
 | 
					                    Style="{StaticResource MaterialDesignOutlinedLightButton}"/>
 | 
				
			||||||
                    <Button  Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" 
 | 
					                    <Button Margin="0 0 6 0" VerticalAlignment="Center" Command="{Binding ReturnBoxCommand}" Content="还药箱" Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=ReturnBox}"  Style="{StaticResource MaterialDesignOutlinedLightButton}"> </Button>-->
 | 
				
			||||||
 | 
					                    <Button 
 | 
				
			||||||
                        Margin="0 0 6 0"
 | 
					                        Margin="0 0 6 0"
 | 
				
			||||||
                        VerticalAlignment="Center" Command="{Binding CheckOrder}"
 | 
					                        VerticalAlignment="Center" Command="{Binding CheckOrder}"
 | 
				
			||||||
                        Content="确认"
 | 
					                        Content="确认"
 | 
				
			||||||
                        Style="{StaticResource MaterialDesignOutlinedLightButton}">
 | 
					                        Style="{StaticResource MaterialDesignOutlinedLightButton}">
 | 
				
			||||||
                    </Button>
 | 
					                    </Button>
 | 
				
			||||||
                    <Button  Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" 
 | 
					                    <Button 
 | 
				
			||||||
                            Margin="2"
 | 
					                            Margin="2"
 | 
				
			||||||
                            Style="{StaticResource MaterialDesignOutlinedLightButton}"
 | 
					                            Style="{StaticResource MaterialDesignOutlinedLightButton}"
 | 
				
			||||||
                            Content="取消"
 | 
					                            Content="取消"
 | 
				
			||||||
                            Command="{Binding CancleTake}" Cursor="Hand" />
 | 
					                            Command="{Binding CancleTake}" Cursor="Hand" />
 | 
				
			||||||
                    <Button  Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" 
 | 
					                    <Button 
 | 
				
			||||||
                        Margin="0 0 6 0"
 | 
					                        Margin="0 0 6 0"
 | 
				
			||||||
                        VerticalAlignment="Center"
 | 
					                        VerticalAlignment="Center"
 | 
				
			||||||
                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
 | 
					                        Style="{StaticResource MaterialDesignOutlinedLightButton}"
 | 
				
			||||||
| 
						 | 
					@ -149,12 +149,12 @@
 | 
				
			||||||
                        <materialDesign:PackIcon Kind="Refresh" />
 | 
					                        <materialDesign:PackIcon Kind="Refresh" />
 | 
				
			||||||
                    </Button>
 | 
					                    </Button>
 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
                    <Button Margin="6 0 6 0" VerticalAlignment="Center" Command="{Binding TakeBoxCommand}" Content="取药箱" Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" Style="{StaticResource MaterialDesignOutlinedLightButton}"></Button>
 | 
					                    <!--<Button Margin="6 0 6 0" VerticalAlignment="Center" Command="{Binding TakeBoxCommand}" Content="取药箱" Style="{StaticResource MaterialDesignOutlinedLightButton}"></Button>-->
 | 
				
			||||||
                    
 | 
					                    
 | 
				
			||||||
                </StackPanel>
 | 
					                </StackPanel>
 | 
				
			||||||
            </Grid>
 | 
					            </Grid>
 | 
				
			||||||
            <!--<Grid Grid.Row="1" Grid.Column="0" Margin="0 0 -100 0">-->
 | 
					            <!--<Grid Grid.Row="1" Grid.Column="0" Margin="0 0 -100 0">-->
 | 
				
			||||||
            <ListView Grid.Row="1" Grid.Column="0"  Margin="0" Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" 
 | 
					            <ListView Grid.Row="1" Grid.Column="0"  Margin="0" 
 | 
				
			||||||
            ItemsSource="{Binding OrderInfoList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
 | 
					            ItemsSource="{Binding OrderInfoList, UpdateSourceTrigger=PropertyChanged, Mode=TwoWay}"
 | 
				
			||||||
            SelectedItem="{Binding selectOrderInfo}"
 | 
					            SelectedItem="{Binding selectOrderInfo}"
 | 
				
			||||||
            materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
 | 
					            materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
 | 
				
			||||||
| 
						 | 
					@ -255,7 +255,7 @@
 | 
				
			||||||
                                <GridViewColumn.CellTemplate>
 | 
					                                <GridViewColumn.CellTemplate>
 | 
				
			||||||
                                    <DataTemplate>
 | 
					                                    <DataTemplate>
 | 
				
			||||||
                                        <ListBox ItemsSource="{Binding OrderDetailList}" DisplayMemberPath="surgicalResidual.ResidualDoseInfo" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
 | 
					                                        <ListBox ItemsSource="{Binding OrderDetailList}" DisplayMemberPath="surgicalResidual.ResidualDoseInfo" materialDesign:ListBoxItemAssist.ShowSelection="False"></ListBox>
 | 
				
			||||||
                                    </DataTemplate>
 | 
					                                    </DataTemplate>yjn7
 | 
				
			||||||
                                </GridViewColumn.CellTemplate>
 | 
					                                </GridViewColumn.CellTemplate>
 | 
				
			||||||
                            </GridViewColumn>
 | 
					                            </GridViewColumn>
 | 
				
			||||||
                        <GridViewColumn Width="160">
 | 
					                        <GridViewColumn Width="160">
 | 
				
			||||||
| 
						 | 
					@ -275,7 +275,7 @@
 | 
				
			||||||
            </ListView>
 | 
					            </ListView>
 | 
				
			||||||
            <!--</Grid>-->
 | 
					            <!--</Grid>-->
 | 
				
			||||||
            <!--<Grid Grid.Column="1" Grid.Row="1" Margin="0 0 0 0" HorizontalAlignment="Right">-->
 | 
					            <!--<Grid Grid.Column="1" Grid.Row="1" Margin="0 0 0 0" HorizontalAlignment="Right">-->
 | 
				
			||||||
            <ListView Grid.Column="1" Grid.Row="1" Margin="0 0 3 0" Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" 
 | 
					            <ListView Grid.Column="1" Grid.Row="1" Margin="0 0 3 0"  
 | 
				
			||||||
                          ItemsSource="{Binding TotalDrugList,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
 | 
					                          ItemsSource="{Binding TotalDrugList,UpdateSourceTrigger=PropertyChanged,Mode=TwoWay}"
 | 
				
			||||||
                          materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
 | 
					                          materialDesign:ListViewAssist.HeaderRowBackground="#31ccec"
 | 
				
			||||||
                          materialDesign:ListViewAssist.ListViewItemPadding="0 16 0 15">
 | 
					                          materialDesign:ListViewAssist.ListViewItemPadding="0 16 0 15">
 | 
				
			||||||
| 
						 | 
					@ -297,7 +297,7 @@
 | 
				
			||||||
            </ListView>
 | 
					            </ListView>
 | 
				
			||||||
            <!--</Grid>-->
 | 
					            <!--</Grid>-->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
            <pagination:Pagination Grid.Row="2"  Grid.ColumnSpan="2" Visibility="{Binding OperationType,Converter={StaticResource TakeReturnConverter},ConverterParameter=TakeBox}" 
 | 
					            <pagination:Pagination Grid.Row="2"  Grid.ColumnSpan="2"  
 | 
				
			||||||
                                   CurrentPage="{Binding PageNum}"
 | 
					                                   CurrentPage="{Binding PageNum}"
 | 
				
			||||||
                                   PageSize="{Binding PageSize}"
 | 
					                                   PageSize="{Binding PageSize}"
 | 
				
			||||||
                                   TotalPages="{Binding TotalCount}"
 | 
					                                   TotalPages="{Binding TotalCount}"
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue