提交修改
This commit is contained in:
parent
da8593cae4
commit
7d4cd33524
|
|
@ -30,6 +30,10 @@ namespace MasaBlazorApp3.DataAccess.Dao
|
||||||
public Task<PageData<OrderInfo>> GetAllOrderInfoByBox(int box,string OrderrNo, DateTime OrderDate, int? take, int? skip);
|
public Task<PageData<OrderInfo>> GetAllOrderInfoByBox(int box,string OrderrNo, DateTime OrderDate, int? take, int? skip);
|
||||||
//获取待处理处方中的麻醉师
|
//获取待处理处方中的麻醉师
|
||||||
public Task<PageData<OrderInfo>> GetAllOrderInfo(string Name, string OrderrNo, DateTime? OrderDate, int? take, int? skip);
|
public Task<PageData<OrderInfo>> GetAllOrderInfo(string Name, string OrderrNo, DateTime? OrderDate, int? take, int? skip);
|
||||||
|
//获取麻醉师信息
|
||||||
|
public Task<List<Anaesthetist>> GetAnaesthetistName();
|
||||||
|
//获取麻醉师单对应的手术间号
|
||||||
|
public Task<List<BoxModel>> GetOperationNum(string anaesthetistName);
|
||||||
//获取所有药盒号
|
//获取所有药盒号
|
||||||
public Task<List<ChannelStock>> GetDrawerNum(string machineId);
|
public Task<List<ChannelStock>> GetDrawerNum(string machineId);
|
||||||
/// 获取指定药盒号
|
/// 获取指定药盒号
|
||||||
|
|
|
||||||
|
|
@ -975,6 +975,15 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
}
|
}
|
||||||
if (flag)
|
if (flag)
|
||||||
{
|
{
|
||||||
|
tempData.Sort((s1, s3) =>
|
||||||
|
{
|
||||||
|
int i = s1.ChannelStock.DrawerNo.CompareTo(s3.ChannelStock.DrawerNo);
|
||||||
|
if (i == 0)
|
||||||
|
{
|
||||||
|
return s1.ChannelStock.ColNo.CompareTo(s3.ChannelStock.ColNo);
|
||||||
|
}
|
||||||
|
return i;
|
||||||
|
});
|
||||||
return tempData;
|
return tempData;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
@ -1043,6 +1052,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
EffDate = !String.IsNullOrEmpty(EffDate) ? DateTime.ParseExact(EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
EffDate = !String.IsNullOrEmpty(EffDate) ? DateTime.ParseExact(EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||||
OperationTime = DateTime.Now,
|
OperationTime = DateTime.Now,
|
||||||
Type = 2,
|
Type = 2,
|
||||||
|
Status=2,//给交接柜补药不需要还药或还空瓶
|
||||||
Quantity = boxTakeVo.GetQuantity,
|
Quantity = boxTakeVo.GetQuantity,
|
||||||
Operator = _globalStateService.Operator.Id,
|
Operator = _globalStateService.Operator.Id,
|
||||||
Reviewer = _globalStateService.Reviewer?.Id ?? _globalStateService.Operator.Id,
|
Reviewer = _globalStateService.Reviewer?.Id ?? _globalStateService.Operator.Id,
|
||||||
|
|
|
||||||
|
|
@ -300,7 +300,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
{
|
{
|
||||||
record.ReturnQuantity1 = record.ReturnQuantity1 + record.CurrentReturnQuantity;
|
record.ReturnQuantity1 = record.ReturnQuantity1 + record.CurrentReturnQuantity;
|
||||||
record.Id = record.Id;
|
record.Id = record.Id;
|
||||||
record.Status = (record.Quantity - (record.ReturnQuantity1 + record.ReturnQuantity2 + sumQuantity)) == 0 ? 2 : 1;
|
record.Status = (record.Quantity - (record.ReturnQuantity1 + record.ReturnQuantity2 + sumQuantity)) <= 0 ? 2 : 1;
|
||||||
_connection.Update(record);
|
_connection.Update(record);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -401,7 +401,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
Operator = _MachineRecord.Operator,
|
Operator = _MachineRecord.Operator,
|
||||||
OperationTime = DateTime.Now,
|
OperationTime = DateTime.Now,
|
||||||
Quantity = _MachineRecord.CurrentReturnQuantity,
|
Quantity = _MachineRecord.CurrentReturnQuantity,
|
||||||
Type = 31,
|
Type = 32,
|
||||||
InvoiceId = _MachineRecord.InvoiceId,
|
InvoiceId = _MachineRecord.InvoiceId,
|
||||||
GetId = _MachineRecord.GetId
|
GetId = _MachineRecord.GetId
|
||||||
});
|
});
|
||||||
|
|
|
||||||
|
|
@ -18,6 +18,7 @@ using System.Collections;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Data;
|
using System.Data;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
|
using System.Reflection.PortableExecutable;
|
||||||
using System.Text;
|
using System.Text;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
|
|
||||||
|
|
@ -704,6 +705,7 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
/// <returns></returns>
|
/// <returns></returns>
|
||||||
public async Task<PageData<OrderInfo>> GetAllOrderInfo(string Name, string OrderrNo, DateTime? OrderDate, int? take, int? skip)
|
public async Task<PageData<OrderInfo>> GetAllOrderInfo(string Name, string OrderrNo, DateTime? OrderDate, int? take, int? skip)
|
||||||
{
|
{
|
||||||
|
logger.Info($"GetAllOrderInfo开始:{DateTime.Now}");
|
||||||
var query2 = from od in _connection.OrderDetail
|
var query2 = from od in _connection.OrderDetail
|
||||||
from cl in _connection.ChannelStock.Where(c => c.MachineId == _setting.boxMachineId).InnerJoin(c => c.DrugId == od.DrugId)
|
from cl in _connection.ChannelStock.Where(c => c.MachineId == _setting.boxMachineId).InnerJoin(c => c.DrugId == od.DrugId)
|
||||||
group od by od.OrderNo into temp
|
group od by od.OrderNo into temp
|
||||||
|
|
@ -717,14 +719,14 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
query = query.Where(oi => oi.anaesthetistName == Name);
|
query = query.Where(oi => oi.anaesthetistName == Name);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!String.IsNullOrEmpty(OrderrNo))
|
//if (!String.IsNullOrEmpty(OrderrNo))
|
||||||
{
|
//{
|
||||||
query = query.Where(oi => oi.OrderNo.Equals(OrderrNo));
|
// query = query.Where(oi => oi.OrderNo.Equals(OrderrNo));
|
||||||
}
|
//}
|
||||||
if (OrderDate != null && OrderDate != DateTime.MinValue)
|
//if (OrderDate != null && OrderDate != DateTime.MinValue)
|
||||||
{
|
//{
|
||||||
query = query.Where(oi => oi.ChargeDate.Date.Equals(((DateTime)OrderDate).Date));
|
// query = query.Where(oi => oi.ChargeDate.Date.Equals(((DateTime)OrderDate).Date));
|
||||||
}
|
//}
|
||||||
query = query.Where(oi => oi.Status == 0);
|
query = query.Where(oi => oi.Status == 0);
|
||||||
query = query.Where(oi => oi.HisDispFlag == 0);
|
query = query.Where(oi => oi.HisDispFlag == 0);
|
||||||
query = query.Where(oi => oi.CancelFlag == 0);
|
query = query.Where(oi => oi.CancelFlag == 0);
|
||||||
|
|
@ -752,12 +754,21 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
logger.Info($"GetAllOrderInfo结束:{DateTime.Now}");
|
||||||
return new PageData<OrderInfo>()
|
return new PageData<OrderInfo>()
|
||||||
{
|
{
|
||||||
TotalDesserts = pagedData,
|
TotalDesserts = pagedData,
|
||||||
Desserts = list
|
Desserts = list
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
//public List<string> GetAnaesthetistName()
|
||||||
|
//{
|
||||||
|
// List<string> strList = new List<string>();
|
||||||
|
// strList = _connection.OrderInfo.Where(it=>it.state==0&&it.HisDispFlag==0&&it.CancelFlag==0).Select(it => it.anaesthetistName).Distinct().ToList();
|
||||||
|
// return strList;
|
||||||
|
|
||||||
|
//}
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// 获取所有药盒号
|
/// 获取所有药盒号
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -784,11 +795,11 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
public async Task<List<BoxModel>> GetDrawerNumByOperationNum(string machineId,List<int> operationNum)
|
public async Task<List<BoxModel>> GetDrawerNumByOperationNum(string machineId,List<int> operationNum)
|
||||||
{
|
{
|
||||||
List<BoxModel> boxModelList = new List<BoxModel>();
|
List<BoxModel> boxModelList = new List<BoxModel>();
|
||||||
var query = _connection.ChannelStock
|
//var query = _connection.ChannelStock
|
||||||
.Where(cs => cs.MachineId == machineId && operationNum.Contains(cs.DrawerNo)&&cs.Quantity>0);
|
// .Where(cs => cs.MachineId == machineId && operationNum.Contains(cs.DrawerNo)&&cs.Quantity>0);
|
||||||
boxModelList =await _connection.ChannelStock
|
boxModelList = await _connection.ChannelStock
|
||||||
.Where(cs => cs.MachineId == machineId&& operationNum.Contains(cs.DrawerNo))
|
.Where(cs => cs.MachineId == machineId && cs.Quantity > 0 && (operationNum.Contains(cs.DrawerNo)))
|
||||||
.Select(cs => new BoxModel { BoxName = cs.DrawerNo.ToString(), BoxNo = Convert.ToInt32(cs.ColNo) }).Distinct().ToListAsync();
|
.Select(cs => new BoxModel { BoxName = cs.DrawerNo, BoxNo = Convert.ToInt32(cs.ColNo) }).Distinct().OrderBy(cs=>new { cs.BoxName, cs.BoxNo }).ToListAsync();
|
||||||
return boxModelList;
|
return boxModelList;
|
||||||
}
|
}
|
||||||
//核对处方
|
//核对处方
|
||||||
|
|
@ -1034,5 +1045,25 @@ namespace MasaBlazorApp3.DataAccess.Impl
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public async Task<List<Anaesthetist>> GetAnaesthetistName()
|
||||||
|
{
|
||||||
|
List<Anaesthetist> strList = new List<Anaesthetist>();
|
||||||
|
strList =await _connection.OrderInfo.Where(it => it.state == 0 && it.HisDispFlag == 0 && it.CancelFlag == 0).Select(it => new Anaesthetist { Name = it.anaesthetistName }).Distinct().ToListAsync();
|
||||||
|
return strList;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
//获取麻醉师单对应的手术间号
|
||||||
|
public async Task<List<BoxModel>> GetOperationNum(string anaesthetistName)
|
||||||
|
{
|
||||||
|
List<BoxModel> boxNumList = new List<BoxModel>();
|
||||||
|
List<int> roomNameList = await _connection.OrderInfo
|
||||||
|
.Where(it => it.state == 0 && it.HisDispFlag == 0 && it.CancelFlag == 0&&it.anaesthetistName== anaesthetistName)
|
||||||
|
.Select(it => Convert.ToInt32(it.RoomName.Substring(6, it.RoomName.Length - 6))).Distinct().ToListAsync();
|
||||||
|
roomNameList.Add(99);
|
||||||
|
roomNameList.Add(111);
|
||||||
|
boxNumList=await GetDrawerNumByOperationNum(_setting.boxMachineId, roomNameList);
|
||||||
|
return boxNumList;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -192,11 +192,11 @@
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
orderTakeVo.Status = 2;
|
orderTakeVo.Status = 2;
|
||||||
if (data.Any(it => it.ChannelStock.BoardType == 2))
|
// if (data.Any(it => it.ChannelStock.BoardType.ToString().Contains("2")))
|
||||||
{
|
// {
|
||||||
//有单支抽屉则广播灭灯
|
// //有单支抽屉则广播灭灯
|
||||||
PortUtil.AllLightOff();
|
// PortUtil.AllLightOff();
|
||||||
}
|
// }
|
||||||
if (options._data == drawerNos.Count - 1)
|
if (options._data == drawerNos.Count - 1)
|
||||||
{
|
{
|
||||||
PortUtil.speechSynthesizer.SpeakAsyncCancelAll();
|
PortUtil.speechSynthesizer.SpeakAsyncCancelAll();
|
||||||
|
|
@ -224,8 +224,11 @@
|
||||||
await Task.Delay(200);
|
await Task.Delay(200);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (data[i].ChannelStock.BoardType.ToString().Contains("2"))
|
if (data[i].ChannelStock.BoardType.ToString().Contains("2") && data[i].ChannelStock.DrawerNo == drawerNo)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
//有单支抽屉则广播灭灯
|
||||||
|
PortUtil.AllLightOff();
|
||||||
byte[] quantity = await PortUtil.CheckQuantityByDrawer(drawerNo);
|
byte[] quantity = await PortUtil.CheckQuantityByDrawer(drawerNo);
|
||||||
orderTakeVo.AfterQuantity = quantity.Select(it => Convert.ToInt32(it)).ToArray().Skip(3).Take(9).ToArray();
|
orderTakeVo.AfterQuantity = quantity.Select(it => Convert.ToInt32(it)).ToArray().Skip(3).Take(9).ToArray();
|
||||||
logger.Info($"单支抽屉,关抽屉后检测数量【{string.Join(",", orderTakeVo.AfterQuantity)}】");
|
logger.Info($"单支抽屉,关抽屉后检测数量【{string.Join(",", orderTakeVo.AfterQuantity)}】");
|
||||||
|
|
@ -236,24 +239,24 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!string.IsNullOrEmpty(alertMessage))
|
// if (!string.IsNullOrEmpty(alertMessage))
|
||||||
{
|
// {
|
||||||
//弹出确认对话框
|
// //弹出确认对话框
|
||||||
alertMessage += "应取数与实际取出数不一致确认要保存吗?";
|
alertMessage += "应取数与实际取出数不一致确认要保存吗?";
|
||||||
//弹出确认提示框
|
// //弹出确认提示框
|
||||||
var confirm = await dialogService.OpenAsync<ConfirmDialog>(
|
// var confirm = await dialogService.OpenAsync<ConfirmDialog>(
|
||||||
$"保存确认",
|
// $"保存确认",
|
||||||
new Dictionary<string, object>() { { "confirmInfo", alertMessage } },
|
// new Dictionary<string, object>() { { "confirmInfo", alertMessage } },
|
||||||
new DialogOptions() { Width = "45vw", Resizable = true, Draggable = true, ShowClose = false });
|
// new DialogOptions() { Width = "45vw", Resizable = true, Draggable = true, ShowClose = false });
|
||||||
logger.Info(alertMessage);
|
logger.Info(alertMessage);
|
||||||
if (!confirm)
|
// if (!confirm)
|
||||||
{
|
// {
|
||||||
RestData();
|
// RestData();
|
||||||
logger.Info("取消保存");
|
// logger.Info("取消保存");
|
||||||
// 关闭弹窗
|
// // 关闭弹窗
|
||||||
dialogService.Close(false);
|
// dialogService.Close(false);
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
stop();
|
stop();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
||||||
|
|
@ -109,7 +109,9 @@
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Frozen="true" Width="200px" Title="药盒号" Property="DrawerNo">
|
<RadzenDataGridColumn Frozen="true" Width="200px" Title="药盒号" Property="DrawerNo">
|
||||||
<Template Context="DrawerNo">
|
<Template Context="DrawerNo">
|
||||||
@($"{DrawerNo.DrawerNo}-{DrawerNo.ColNo}")
|
@(DrawerNo.DrawerNo == 99 ? "急诊药盒" : DrawerNo.DrawerNo == 111 ? "恢复室药盒" : $"{DrawerNo.DrawerNo}-{DrawerNo.ColNo}")
|
||||||
|
|
||||||
|
@* @($"{DrawerNo.DrawerNo}-{DrawerNo.ColNo}") *@
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Title="总库存" Property="TotalQuantity"></RadzenDataGridColumn>
|
<RadzenDataGridColumn Title="总库存" Property="TotalQuantity"></RadzenDataGridColumn>
|
||||||
|
|
@ -163,7 +165,7 @@
|
||||||
async void OnRowSelect(ChannelList cl)
|
async void OnRowSelect(ChannelList cl)
|
||||||
{
|
{
|
||||||
var b = await dialogService.OpenAsync<BoxAddDetailDialog>(
|
var b = await dialogService.OpenAsync<BoxAddDetailDialog>(
|
||||||
$"{cl.DrawerNo}号药盒加药",
|
cl.DrawerNo==99?"急诊药盒":cl.DrawerNo==111?"恢复室药盒":$"{cl.DrawerNo}-{cl.ColNo}号药盒加药",
|
||||||
new Dictionary<string, object>() { { "boxChannelList", cl } },
|
new Dictionary<string, object>() { { "boxChannelList", cl } },
|
||||||
new DialogOptions() { Width = "85vw", Resizable = true, Draggable = true, ShowClose = false }
|
new DialogOptions() { Width = "85vw", Resizable = true, Draggable = true, ShowClose = false }
|
||||||
);
|
);
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.mycol {
|
.mycol {
|
||||||
width: calc(100%/7);
|
width: calc(100%/8);
|
||||||
margin: 4px !important;
|
margin: 4px !important;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<div class="container-fluid">
|
<div class="container-fluid">
|
||||||
|
|
@ -29,7 +29,7 @@
|
||||||
<RadzenStack Orientation="Orientation.Horizontal" Gap="1rem">
|
<RadzenStack Orientation="Orientation.Horizontal" Gap="1rem">
|
||||||
<RadzenRow AlignItems="AlignItems.Center">
|
<RadzenRow AlignItems="AlignItems.Center">
|
||||||
<RadzenDropDownDataGrid AllowVirtualization="true" Name="planName" TValue="Plan" Data="@plans" Value="@selectedPlan" ValueChanged="@OnPlanSelected"
|
<RadzenDropDownDataGrid AllowVirtualization="true" Name="planName" TValue="Plan" Data="@plans" Value="@selectedPlan" ValueChanged="@OnPlanSelected"
|
||||||
Style="width:100%; display: block;" AllowFilteringByAllStringColumns="true" TextProperty="Name">
|
Style="width:100%; display: block;" AllowFilteringByAllStringColumns="true" TextProperty="Name">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDropDownDataGridColumn Property="Name" Title="套餐名称" Sortable="false" />
|
<RadzenDropDownDataGridColumn Property="Name" Title="套餐名称" Sortable="false" />
|
||||||
|
|
@ -50,12 +50,23 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12 mb-4">
|
<div class="col-12 mb-4">
|
||||||
|
|
||||||
<RadzenDataList @ref="grid" LoadData="@LoadData" WrapItems="true" Count="@count" IsLoading="@isLoading" Data="@_forecasts" PageSize="54" style="height:61vh; overflow:auto">
|
<RadzenDataList @ref="grid" LoadData="@LoadData" WrapItems="true" Count="@count" IsLoading="@isLoading" Data="@_forecasts" PageSize="56" style="height:61vh; overflow:auto">
|
||||||
<Template Context="channel">
|
<Template Context="channel">
|
||||||
<RadzenCard class="mycol" onclick="@(() => CardClick(channel))">
|
<RadzenCard class="mycol" onclick="@(() => CardClick(channel))">
|
||||||
<RadzenRow>
|
<RadzenRow>
|
||||||
<RadzenColumn Size="8" Class="rz-text-truncate">
|
<RadzenColumn Size="8" Class="rz-text-truncate">
|
||||||
<b class="rz-pr-3">@($"{channel.DrawerNo}-{channel.ColNo}")</b>
|
@if (channel.DrawerNo == 99)
|
||||||
|
{
|
||||||
|
<b class="rz-pr-3">@($"急诊药盒")</b>
|
||||||
|
}
|
||||||
|
else if(channel.DrawerNo==111)
|
||||||
|
{
|
||||||
|
<b class="rz-pr-3">@($"恢复室药盒")</b>
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<b class="rz-pr-3">@($"{channel.DrawerNo}-{channel.ColNo}")</b>
|
||||||
|
}
|
||||||
@* <b>号药盒</b> *@
|
@* <b>号药盒</b> *@
|
||||||
|
|
||||||
</RadzenColumn>
|
</RadzenColumn>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
<div class="row justify-content-around align-items-center" style="height:600px;overflow:auto">
|
<div class="row justify-content-around align-items-center" style="height:600px;overflow:auto">
|
||||||
@foreach (var cs in channelStockList)
|
@foreach (var cs in channelStockList)
|
||||||
{
|
{
|
||||||
<RadzenButton class="col-12" Style="margin-bottom:5px" Click="@(() => SelectDrawer((cs.DrawerNo.ToString() + "-" + cs.ColNo.ToString())))" Text="@($"{cs.DrawerNo.ToString() + "-" + cs.ColNo.ToString()}")" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo != (cs.DrawerNo.ToString() + "-" + cs.ColNo.ToString()) ? Variant.Outlined : Variant.Flat)" />
|
<RadzenButton class="col-12" Style="margin-bottom:5px" Click="@(() => SelectDrawer((cs.DrawerNo.ToString() + "-" + cs.ColNo.ToString())))" Text="@(cs.DrawerNo==99?"急诊室药盒":cs.DrawerNo==111?"恢复室药盒":$"{cs.DrawerNo.ToString() + "-" + cs.ColNo.ToString()}")" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo != (cs.DrawerNo.ToString() + "-" + cs.ColNo.ToString()) ? Variant.Outlined : Variant.Flat)" />
|
||||||
|
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,19 +1,21 @@
|
||||||
@page "/Box/Check"
|
@page "/Box/Check"
|
||||||
@using MasaBlazorApp3.Pojo.Config
|
@using MasaBlazorApp3.Pojo.Config
|
||||||
@using MasaBlazorApp3.Report
|
@using MasaBlazorApp3.Report
|
||||||
|
@using Microsoft.Extensions.Options
|
||||||
@using Radzen.Blazor.Rendering
|
@using Radzen.Blazor.Rendering
|
||||||
|
@using log4net;
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.my-popup {
|
.my-popup {
|
||||||
display: none;
|
display: none;
|
||||||
position: absolute;
|
position: absolute;
|
||||||
overflow: auto;
|
overflow: auto;
|
||||||
/* height: 360px; */
|
/* height: 360px; */
|
||||||
width: 900px;
|
width: 900px;
|
||||||
border: var(--rz-panel-border);
|
border: var(--rz-panel-border);
|
||||||
background-color: var(--rz-panel-background-color);
|
background-color: var(--rz-panel-background-color);
|
||||||
box-shadow: var(--rz-panel-shadow);
|
box-shadow: var(--rz-panel-shadow);
|
||||||
border-radius: var(--rz-border-radius);
|
border-radius: var(--rz-border-radius);
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
||||||
|
|
@ -42,46 +44,85 @@
|
||||||
@* <RadzenStack Orientation="Orientation.Horizontal" Gap="1rem"> *@
|
@* <RadzenStack Orientation="Orientation.Horizontal" Gap="1rem"> *@
|
||||||
<RadzenRow AlignItems="AlignItems.Center">
|
<RadzenRow AlignItems="AlignItems.Center">
|
||||||
<RadzenColumn Size="6">
|
<RadzenColumn Size="6">
|
||||||
<RadzenLabel Text="麻醉师" Component="NamesList" />
|
<RadzenLabel Text="麻醉医师" Component="NamesList" />
|
||||||
<RadzenDropDownDataGrid AllowVirtualization="true" Name="NamesList" TValue="Anaesthetist" Data="@NamesList" @bind-Value="Name"
|
<RadzenDropDownDataGrid AllowVirtualization="true" Name="NamesList" TValue="Anaesthetist" Data="@NamesList" @bind-Value="Name"
|
||||||
Style="width:100%; display: block;" AllowFilteringByAllStringColumns="true" TextProperty="Name">
|
Style="width:100%; display: block;" AllowFilteringByAllStringColumns="true" TextProperty="Name">
|
||||||
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDropDownDataGridColumn Property="Name" Title="麻醉师" Sortable="false" />
|
<RadzenDropDownDataGridColumn Property="Name" Title="麻醉医师" Sortable="false" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</RadzenDropDownDataGrid>
|
</RadzenDropDownDataGrid>
|
||||||
</RadzenColumn>
|
</RadzenColumn>
|
||||||
|
|
||||||
<RadzenColumn Size="6">
|
<RadzenColumn Size="6" Style="margin-top:0.5rem">
|
||||||
<RadzenLabel Text="处方号" Component="OrderNo" />
|
<RadzenLabel Text="核对药箱" Component="BoxList" />
|
||||||
<RadzenTextBox @bind-Value="OrderNo" Style="width: 100%;" Name="OrderNo"></RadzenTextBox>
|
<RadzenDropDownDataGrid AllowVirtualization="true" Name="BoxList" TValue="BoxModel" Data="@BoxList" @bind-Value="BoxNum" Style="width: 100%;"
|
||||||
|
AllowFilteringByAllStringColumns="true" TextProperty="药箱号">
|
||||||
|
<Template>
|
||||||
|
|
||||||
|
@((context as BoxModel).BoxName == 99 ? "急诊药盒" : (context as BoxModel).BoxName == 111 ? "恢复室药盒" : (context as BoxModel).BoxName + "-" + (context as BoxModel).BoxNo)
|
||||||
|
|
||||||
|
@* @((context as BoxModel).BoxName + "-" + (context as BoxModel).BoxNo) *@
|
||||||
|
|
||||||
|
</Template>
|
||||||
|
<Columns>
|
||||||
|
<RadzenDropDownDataGridColumn Property="BoxName" Title="药箱号" Sortable="false" />
|
||||||
|
</Columns>
|
||||||
|
</RadzenDropDownDataGrid>
|
||||||
</RadzenColumn>
|
</RadzenColumn>
|
||||||
</RadzenRow>
|
</RadzenRow>
|
||||||
<RadzenRow AlignItems="AlignItems.Center">
|
<RadzenRow AlignItems="AlignItems.Center">
|
||||||
<RadzenColumn Size="6">
|
<RadzenColumn Size="6">
|
||||||
|
|
||||||
|
<RadzenLabel Text="处方号" Component="OrderNo" />
|
||||||
|
<RadzenTextBox @bind-Value="OrderNo" Style="width: 100%;" Name="OrderNo"></RadzenTextBox>
|
||||||
|
|
||||||
|
</RadzenColumn>
|
||||||
|
<RadzenColumn Size="6" Style="margin-top:0.5rem">
|
||||||
<RadzenLabel Text="处方时间" Component="OrderDate" />
|
<RadzenLabel Text="处方时间" Component="OrderDate" />
|
||||||
<RadzenDatePicker DateFormat="yyyy-MM-dd" CurrentDateChanged="@OnCurrentDateChanged" AllowClear @bind-Value="OrderDate" Style="width: 100%;" Name="OrderDate" />
|
<RadzenDatePicker DateFormat="yyyy-MM-dd" CurrentDateChanged="@OnCurrentDateChanged" AllowClear @bind-Value="OrderDate" Style="width: 100%;" Name="OrderDate" />
|
||||||
</RadzenColumn>
|
</RadzenColumn>
|
||||||
<RadzenColumn Size="6" Style="margin-top:0.5rem">
|
</RadzenRow>
|
||||||
<RadzenButton Size="ButtonSize.Medium" ButtonType="ButtonType.Submit" IsBusy="isLoading" Icon="search" Text="查询" />
|
<RadzenRow AlignItems="AlignItems.Center" Style="margin-top:2vh;margin-left:48vh;">
|
||||||
<RadzenButton Size="ButtonSize.Medium" Click="reloadGrid" IsBusy="isLoading" Icon="refresh" Text="重置" ButtonStyle="ButtonStyle.Warning" />
|
|
||||||
</RadzenColumn>
|
<RadzenButton Size="ButtonSize.Medium" ButtonType="ButtonType.Submit" IsBusy="isLoading" Icon="search" Text="查询" />
|
||||||
|
<RadzenButton Size="ButtonSize.Medium" Click="reloadGrid" IsBusy="isLoading" Icon="refresh" Text="重置" ButtonStyle="ButtonStyle.Warning" />
|
||||||
|
<RadzenButton Size="ButtonSize.Medium" Click="Confirm" ButtonType="ButtonType.Button" IsBusy="isLoading" Icon="check_circle" Text="确认" />
|
||||||
|
<RadzenButton Icon="download" @ref=button Text="麻醉药品使用登记本导出" Variant="Variant.Outlined" Click="@(args => popup.ToggleAsync(button.Element))" />
|
||||||
|
<Popup @ref=popup Lazy=true class="my-popup">
|
||||||
|
<RadzenStack Orientation="Orientation.Vertical" Gap="1rem" class="rz-h-100 rz-p-4">
|
||||||
|
<RadzenFieldset Text="条件选择">
|
||||||
|
<RadzenStack Orientation="Orientation.Horizontal" Gap="1rem">
|
||||||
|
<RadzenRow AlignItems="AlignItems.Center">
|
||||||
|
<RadzenColumn Size="6">
|
||||||
|
<RadzenLabel Text="处方时间" Component="PortOrderDate" />
|
||||||
|
</RadzenColumn>
|
||||||
|
<RadzenColumn Size="6">
|
||||||
|
<RadzenDatePicker DateFormat="yyyy-MM-dd" CurrentDateChanged="@OnCurrentPortDateChanged" @bind-Value="PortOrderDate" Style="width: 100%;" Name="PortOrderDate" />
|
||||||
|
</RadzenColumn>
|
||||||
|
</RadzenRow>
|
||||||
|
|
||||||
|
<RadzenRow JustifyContent="JustifyContent.End" AlignItems="AlignItems.Center">
|
||||||
|
<RadzenButton Icon="download" Text="导出" Variant="Variant.Outlined" Click="StockExport" />
|
||||||
|
</RadzenRow>
|
||||||
|
</RadzenStack>
|
||||||
|
</RadzenFieldset>
|
||||||
|
</RadzenStack>
|
||||||
|
</Popup>
|
||||||
</RadzenRow>
|
</RadzenRow>
|
||||||
@* </RadzenStack> *@
|
@* </RadzenStack> *@
|
||||||
</RadzenFieldset>
|
</RadzenFieldset>
|
||||||
<RadzenStack Orientation="Orientation.Horizontal" Gap="1rem" Style="margin:0.5rem">
|
<RadzenStack Orientation="Orientation.Horizontal" Gap="1rem" Style="margin:0.5rem">
|
||||||
<RadzenLabel Text="核对药箱" Component="BoxList" Style="margin:0.5rem" />
|
@* <RadzenLabel Text="核对药箱" Component="BoxList" Style="margin:0.5rem" />
|
||||||
<RadzenDropDownDataGrid AllowVirtualization="true" Name="BoxList" TValue="BoxModel" Data="@BoxList" @bind-Value="BoxNum"
|
<RadzenDropDownDataGrid AllowVirtualization="true" Name="BoxList" TValue="BoxModel" Data="@BoxList" @bind-Value="BoxNum"
|
||||||
AllowFilteringByAllStringColumns="true" TextProperty="BoxName">
|
AllowFilteringByAllStringColumns="true" TextProperty="药箱号">
|
||||||
<Template>
|
<Template>
|
||||||
@((context as BoxModel).BoxName + "-" + (context as BoxModel).BoxNo)
|
@((context as BoxModel).BoxName + "-" + (context as BoxModel).BoxNo)
|
||||||
</Template>
|
</Template>
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDropDownDataGridColumn Property="BoxName" Title="药箱号" Sortable="false" />
|
<RadzenDropDownDataGridColumn Property="BoxName" Title="药箱号" Sortable="false" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</RadzenDropDownDataGrid>
|
</RadzenDropDownDataGrid> *@
|
||||||
<RadzenButton Size="ButtonSize.Medium" Click="Confirm" ButtonType="ButtonType.Button" IsBusy="isLoading" Icon="check_circle" Text="确认" />
|
@* <RadzenButton Size="ButtonSize.Medium" Click="Confirm" ButtonType="ButtonType.Button" IsBusy="isLoading" Icon="check_circle" Text="确认" />
|
||||||
<RadzenButton Icon="download" @ref=button Text="麻醉药品使用登记本导出" Variant="Variant.Outlined" Click="@(args => popup.ToggleAsync(button.Element))" />
|
<RadzenButton Icon="download" @ref=button Text="麻醉药品使用登记本导出" Variant="Variant.Outlined" Click="@(args => popup.ToggleAsync(button.Element))" />
|
||||||
<Popup @ref=popup Lazy=true class="my-popup">
|
<Popup @ref=popup Lazy=true class="my-popup">
|
||||||
<RadzenStack Orientation="Orientation.Vertical" Gap="1rem" class="rz-h-100 rz-p-4">
|
<RadzenStack Orientation="Orientation.Vertical" Gap="1rem" class="rz-h-100 rz-p-4">
|
||||||
|
|
@ -102,30 +143,31 @@
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</RadzenFieldset>
|
</RadzenFieldset>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</Popup>
|
</Popup> *@
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</form>
|
</form>
|
||||||
<RadzenDataGrid @ref="grid" AllowRowSelectOnRowClick="@allowRowSelectOnRowClick" AllowFiltering="true" LoadData="@LoadData"
|
<RadzenDataGrid @ref="grid" AllowRowSelectOnRowClick="@allowRowSelectOnRowClick" AllowFiltering="true" LoadData="@LoadData"
|
||||||
FilterPopupRenderMode="PopupRenderMode.OnDemand" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
|
FilterPopupRenderMode="PopupRenderMode.OnDemand" FilterCaseSensitivity="FilterCaseSensitivity.CaseInsensitive"
|
||||||
Data="@orderInfos" ColumnWidth="200px" IsLoading="@isLoading" Count="@count" EmptyText="无数据"
|
Data="@orderInfos" ColumnWidth="200px" IsLoading="@isLoading" Count="@count" EmptyText="无数据"
|
||||||
SelectionMode="DataGridSelectionMode.Multiple" @bind-Value=@selectedOrderInfos
|
SelectionMode="DataGridSelectionMode.Multiple" @bind-Value=@selectedOrderInfos
|
||||||
CellClick="@((DataGridCellMouseEventArgs<OrderInfo> args) => OnCellClick(args))"
|
CellClick="@((DataGridCellMouseEventArgs<OrderInfo> args) => OnCellClick(args))"
|
||||||
AllowPaging="true" PageSize="10" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
AllowPaging="true" PageSize="10" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Sortable="false" Filterable="false" Width="4rem">
|
<RadzenDataGridColumn Sortable="false" Filterable="false" Width="2rem">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<RadzenCheckBox TabIndex="-1" TriState="false" TValue="bool?" InputAttributes="@(new Dictionary<string, object>() { { "aria-label", "Select all items" } })"
|
<RadzenCheckBox TabIndex="-1" TriState="false" TValue="bool?" InputAttributes="@(new Dictionary<string, object>() { { "aria-label", "Select all items" } })"
|
||||||
Value="@(selectedOrderInfos == null || selectedOrderInfos?.Any() != true ? false : !orderInfos.All(i => selectedOrderInfos.Contains(i)) ? null : orderInfos.Any(i => selectedOrderInfos.Contains(i)))"
|
Value="@(selectedOrderInfos == null || selectedOrderInfos?.Any() != true ? false : !orderInfos.All(i => selectedOrderInfos.Contains(i)) ? null : orderInfos.Any(i => selectedOrderInfos.Contains(i)))"
|
||||||
Change="@(args => selectedOrderInfos = args == true ? orderInfos.ToList() : null)" />
|
Change="@(args => selectedOrderInfos = args == true ? orderInfos.ToList() : null)" />
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<Template Context="data">
|
<Template Context="data">
|
||||||
<RadzenCheckBox TabIndex="-1" TriState="false" Value="@(selectedOrderInfos != null && selectedOrderInfos.Contains(data))" InputAttributes="@(new Dictionary<string, object>() { { "aria-label", "Select item" } })"
|
<RadzenCheckBox TabIndex="-1" TriState="false" Value="@(selectedOrderInfos != null && selectedOrderInfos.Contains(data))" InputAttributes="@(new Dictionary<string, object>() { { "aria-label", "Select item" } })"
|
||||||
TValue="bool" Change="@(args => { if (!allowRowSelectOnRowClick) { grid.SelectRow(data); } })" />
|
TValue="bool" Change="@(args => { if (!allowRowSelectOnRowClick) { grid.SelectRow(data); } })" />
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Property="PatientName" Title="姓名" Sortable="false" Filterable="false" Width="4rem" />
|
<RadzenDataGridColumn Property="PatientName" Title="姓名" Sortable="false" Filterable="false" Width="3rem" />
|
||||||
<RadzenDataGridColumn Property="Sex" Title="性别" Sortable="false" Filterable="false" Width="2rem" />
|
<RadzenDataGridColumn Property="Sex" Title="性别" Sortable="false" Filterable="false" Width="2rem" />
|
||||||
<RadzenDataGridColumn Property="OrderNo" Title="单号" Sortable="false" Filterable="false" Width="8rem" />
|
<RadzenDataGridColumn Property="OrderNo" Title="单号" Sortable="false" Filterable="false" Width="3rem" />
|
||||||
|
<RadzenDataGridColumn Property="ChargeDate" Title="处方时间" Sortable="false" Filterable="false" Width="5rem" />
|
||||||
<RadzenDataGridColumn Property="DetailInfo.Drug.DrugName" Title="药品名称" FormatString="{0:d}" Sortable="false" Filterable="false" Width="8rem" />
|
<RadzenDataGridColumn Property="DetailInfo.Drug.DrugName" Title="药品名称" FormatString="{0:d}" Sortable="false" Filterable="false" Width="8rem" />
|
||||||
@* <Template Context="DetailInfo">
|
@* <Template Context="DetailInfo">
|
||||||
@for (int i = 0; i < DetailList.DetailList.Count; i++)
|
@for (int i = 0; i < DetailList.DetailList.Count; i++)
|
||||||
|
|
@ -144,7 +186,7 @@
|
||||||
}
|
}
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn> *@
|
</RadzenDataGridColumn> *@
|
||||||
<RadzenDataGridColumn Width="110px" Title="批次" Property="DetailInfo.SetManuNo">
|
<RadzenDataGridColumn Title="批次" Property="DetailInfo.SetManuNo" Filterable="false" Width="4rem">
|
||||||
@* <Template Context="DetailInfo">
|
@* <Template Context="DetailInfo">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" class="mb-0">@DetailInfo.DetailInfo.SetManuNo</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" class="mb-0">@DetailInfo.DetailInfo.SetManuNo</RadzenText>
|
||||||
|
|
||||||
|
|
@ -203,12 +245,14 @@
|
||||||
</div>
|
</div>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
@code {
|
@code {
|
||||||
|
|
||||||
|
private readonly ILog logger = LogManager.GetLogger(typeof(CheckOrder));
|
||||||
@inject IOrderInfoDao orderInfoDao;
|
@inject IOrderInfoDao orderInfoDao;
|
||||||
@inject DialogService dialogService;
|
@inject DialogService dialogService;
|
||||||
@inject Microsoft.Extensions.Options.IOptions<Pojo.Config.SettingConfig> setting;
|
@inject Microsoft.Extensions.Options.IOptions<Pojo.Config.SettingConfig> setting;
|
||||||
@inject NotificationService _message;
|
@inject NotificationService _message;
|
||||||
@inject IReportDataDao reportDataDao;
|
@inject IReportDataDao reportDataDao;
|
||||||
|
@inject IOptions<SettingConfig> setting;
|
||||||
bool allowRowSelectOnRowClick = true;
|
bool allowRowSelectOnRowClick = true;
|
||||||
IEnumerable<OrderInfo> orderInfos;
|
IEnumerable<OrderInfo> orderInfos;
|
||||||
IList<OrderInfo> selectedOrderInfos;
|
IList<OrderInfo> selectedOrderInfos;
|
||||||
|
|
@ -226,7 +270,7 @@
|
||||||
string OrderNo;
|
string OrderNo;
|
||||||
DateTime? OrderDate = null;
|
DateTime? OrderDate = null;
|
||||||
DateTime PortOrderDate = DateTime.Now;
|
DateTime PortOrderDate = DateTime.Now;
|
||||||
Popup popup;
|
Popup popup;
|
||||||
RadzenButton button;
|
RadzenButton button;
|
||||||
void OnCurrentDateChanged(DateTime args)
|
void OnCurrentDateChanged(DateTime args)
|
||||||
{
|
{
|
||||||
|
|
@ -249,7 +293,7 @@
|
||||||
{
|
{
|
||||||
args.Data.DetailInfo.drugManuNo = args.Data.DetailInfo.Drug.Manus.Where(m => m.ManuNo == args.Data.DetailInfo.SetManuNo).FirstOrDefault();
|
args.Data.DetailInfo.drugManuNo = args.Data.DetailInfo.Drug.Manus.Where(m => m.ManuNo == args.Data.DetailInfo.SetManuNo).FirstOrDefault();
|
||||||
}
|
}
|
||||||
if (args.Data.DetailInfo.drugManuNo==null)
|
if (args.Data.DetailInfo.drugManuNo == null)
|
||||||
{
|
{
|
||||||
args.Data.DetailInfo.drugManuNo = args.Data.DetailInfo.Drug.Manus.FirstOrDefault();
|
args.Data.DetailInfo.drugManuNo = args.Data.DetailInfo.Drug.Manus.FirstOrDefault();
|
||||||
}
|
}
|
||||||
|
|
@ -258,14 +302,14 @@
|
||||||
//确认
|
//确认
|
||||||
async Task Confirm()
|
async Task Confirm()
|
||||||
{
|
{
|
||||||
if (selectedOrderInfos==null)
|
if (selectedOrderInfos == null)
|
||||||
{
|
{
|
||||||
_message.Notify(
|
_message.Notify(
|
||||||
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择处方", Duration = 4000 }
|
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择处方", Duration = 4000 }
|
||||||
);
|
);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (BoxNum==null)
|
if (BoxNum == null)
|
||||||
{
|
{
|
||||||
_message.Notify(
|
_message.Notify(
|
||||||
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择药箱", Duration = 4000 }
|
new NotificationMessage { Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择药箱", Duration = 4000 }
|
||||||
|
|
@ -303,51 +347,82 @@
|
||||||
}
|
}
|
||||||
async Task GetInitialDate()
|
async Task GetInitialDate()
|
||||||
{
|
{
|
||||||
result = await orderInfoDao.GetAllOrderInfo(null, null, null, null, null);
|
|
||||||
List<string> nameList = result.Desserts.Select(it => it.anaesthetistName).Distinct().ToList();
|
// List<string> nameList = result.Desserts.Select(it => it.anaesthetistName).Distinct().ToList();
|
||||||
NamesList = nameList.Select(it => new Anaesthetist { Name = it }).ToList();
|
NamesList = await orderInfoDao.GetAnaesthetistName();// nameList.Select(it => new Anaesthetist { Name = it }).ToList();
|
||||||
Name = NamesList.FirstOrDefault();
|
Name = NamesList.FirstOrDefault();
|
||||||
|
|
||||||
|
// List<int> roomNameList = await orderInfoDao.Select(it => Convert.ToInt32(it.RoomName.Substring(6, it.RoomName.Length - 6))).Distinct().ToList();
|
||||||
|
BoxList = await orderInfoDao.GetOperationNum(Name.Name);// await orderInfoDao.GetDrawerNumByOperationNum(setting.Value.boxMachineId, roomNameList); //roomNameList.Select(it => new BoxModel { BoxName = it, BoxNo = Convert.ToInt32(it.Substring(it.Length - 2, 2)) }).ToList();
|
||||||
|
|
||||||
|
BoxNum = BoxList.FirstOrDefault();
|
||||||
|
|
||||||
|
result = await orderInfoDao.GetAllOrderInfo(Name.Name, null, null, null, null);
|
||||||
}
|
}
|
||||||
async Task LoadData(LoadDataArgs args)
|
async Task LoadData(LoadDataArgs args)
|
||||||
{
|
{
|
||||||
|
logger.Info($"LoadData开始:{DateTime.Now}-{result != null}");
|
||||||
if (result != null)
|
if (result != null)
|
||||||
{
|
{
|
||||||
isLoading = true;
|
isLoading = true;
|
||||||
orderInfos = result.Desserts;
|
orderInfos = result.Desserts;
|
||||||
// Update the count
|
// Update the count
|
||||||
count = result.TotalDesserts;
|
count = result.TotalDesserts;
|
||||||
|
logger.Info($"LoadData:{DateTime.Now},{orderInfos.Count()}");
|
||||||
// Update the Data property
|
// Update the Data property
|
||||||
if (Name != null)
|
if (Name != null)
|
||||||
{
|
{
|
||||||
orderInfos = orderInfos.Where(it => it.anaesthetistName == Name.Name);
|
orderInfos = orderInfos.Where(it => it.anaesthetistName == Name.Name);
|
||||||
|
logger.Info($"LoadData:{DateTime.Now},{orderInfos.Count()},Name{Name.Name}");
|
||||||
count = orderInfos.Count();
|
count = orderInfos.Count();
|
||||||
}
|
}
|
||||||
if(OrderDate != null && OrderDate != DateTime.MinValue)
|
if (OrderDate != null && OrderDate != DateTime.MinValue)
|
||||||
{
|
{
|
||||||
orderInfos = orderInfos.Where(it => it.ChargeDate.Date == OrderDate.Value.Date);
|
orderInfos = orderInfos.Where(it => it.ChargeDate.Date == OrderDate.Value.Date);
|
||||||
|
|
||||||
|
logger.Info($"LoadData:{DateTime.Now},{orderInfos.Count()}");
|
||||||
// Update the count
|
// Update the count
|
||||||
count = orderInfos.Count();
|
count = orderInfos.Count();
|
||||||
}
|
}
|
||||||
if(!string.IsNullOrEmpty(OrderNo))
|
if (!string.IsNullOrEmpty(OrderNo))
|
||||||
{
|
{
|
||||||
orderInfos = orderInfos.Where(it => it.OrderNo.Contains(OrderNo));
|
orderInfos = orderInfos.Where(it => it.OrderNo.Contains(OrderNo));
|
||||||
|
|
||||||
|
logger.Info($"LoadData:{DateTime.Now},{orderInfos.Count()}-OrderNo{OrderNo}");
|
||||||
// Update the count
|
// Update the count
|
||||||
count = orderInfos.Count();
|
count = orderInfos.Count();
|
||||||
}
|
}
|
||||||
if (Name != null && OrderDate != null && OrderDate != DateTime.MinValue && !string.IsNullOrEmpty(OrderNo))
|
if (Name != null && OrderDate != null && OrderDate != DateTime.MinValue && !string.IsNullOrEmpty(OrderNo))
|
||||||
{
|
{
|
||||||
orderInfos = orderInfos.Where(it => it.anaesthetistName == Name.Name && it.ChargeDate.Date == OrderDate.Value.Date && it.OrderNo.Contains(OrderNo));
|
orderInfos = orderInfos.Where(it => it.anaesthetistName == Name.Name && it.ChargeDate.Date == OrderDate.Value.Date && it.OrderNo.Contains(OrderNo));
|
||||||
|
|
||||||
|
logger.Info($"LoadData:{DateTime.Now},{orderInfos.Count()}");
|
||||||
// Update the count
|
// Update the count
|
||||||
count = orderInfos.Count();
|
count = orderInfos.Count();
|
||||||
}
|
}
|
||||||
|
if (BoxNum != null&&BoxNum.BoxName!=99&&BoxNum.BoxName!=111)
|
||||||
|
{
|
||||||
|
string roomName = setting.Value.roomName + BoxNum.BoxName.ToString().PadLeft(2, '0');
|
||||||
|
|
||||||
|
orderInfos = orderInfos.Where(it => it.RoomName == roomName);
|
||||||
|
|
||||||
|
logger.Info($"LoadData:{DateTime.Now},{orderInfos.Count()};roomName{roomName}");
|
||||||
|
count = orderInfos.Count();
|
||||||
|
}
|
||||||
|
|
||||||
|
logger.Info($"LoadData结束:{DateTime.Now},{orderInfos.Count()}");
|
||||||
|
|
||||||
orderInfos = orderInfos.Skip(args.Skip.Value).Take(args.Top.Value).ToList();
|
orderInfos = orderInfos.Skip(args.Skip.Value).Take(args.Top.Value).ToList();
|
||||||
|
|
||||||
|
logger.Info($"LoadData结束:{DateTime.Now},{orderInfos.Count()} -{args.Skip.Value}-{args.Top.Value}");
|
||||||
|
|
||||||
|
await InvokeAsync(StateHasChanged);
|
||||||
//查找该麻醉师对应的手术室
|
//查找该麻醉师对应的手术室
|
||||||
//List<string> roomNameList = orderInfos.Select(it => it.RoomName).Distinct().ToList();
|
//List<string> roomNameList = orderInfos.Select(it => it.RoomName).Distinct().ToList();
|
||||||
List<int> roomNameList = orderInfos.Select(it => Convert.ToInt32(it.RoomName.Substring(6, it.RoomName.Length - 6))).Distinct().ToList();
|
// List<int> roomNameList = orderInfos.Select(it => Convert.ToInt32(it.RoomName.Substring(6, it.RoomName.Length - 6))).Distinct().ToList();
|
||||||
BoxList = await orderInfoDao.GetDrawerNumByOperationNum(setting.Value.boxMachineId, roomNameList); //roomNameList.Select(it => new BoxModel { BoxName = it, BoxNo = Convert.ToInt32(it.Substring(it.Length - 2, 2)) }).ToList();
|
// BoxList = await orderInfoDao.GetDrawerNumByOperationNum(setting.Value.boxMachineId, roomNameList); //roomNameList.Select(it => new BoxModel { BoxName = it, BoxNo = Convert.ToInt32(it.Substring(it.Length - 2, 2)) }).ToList();
|
||||||
|
|
||||||
BoxNum = BoxList.FirstOrDefault();
|
// BoxNum = BoxList.FirstOrDefault();
|
||||||
|
|
||||||
isLoading = false;
|
isLoading = false;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
@using log4net;
|
@using log4net;
|
||||||
<style>
|
<style>
|
||||||
.rz-custom-header {
|
.rz-custom-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<RadzenStack Orientation="Orientation.Horizontal">
|
<RadzenStack Orientation="Orientation.Horizontal">
|
||||||
|
|
@ -17,8 +17,14 @@
|
||||||
<div class="row justify-content-around align-items-center" style="margin-top: 220px; height: 430px;">
|
<div class="row justify-content-around align-items-center" style="margin-top: 220px; height: 430px;">
|
||||||
@foreach (int i in DrawerNos)
|
@foreach (int i in DrawerNos)
|
||||||
{
|
{
|
||||||
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" />
|
if (setting.Value.returnDrawer != null && setting.Value.returnDrawer.Contains(i))
|
||||||
|
{
|
||||||
|
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="true" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" Style="background-color: #d3d3d3;" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" />
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -37,14 +43,14 @@
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
<RadzenDataGrid @ref="grid" Style="overflow:auto"
|
<RadzenDataGrid @ref="grid" Style="overflow:auto"
|
||||||
LoadData="@LoadData"
|
LoadData="@LoadData"
|
||||||
IsLoading="@isLoading"
|
IsLoading="@isLoading"
|
||||||
Count="@count"
|
Count="@count"
|
||||||
EmptyText="无数据"
|
EmptyText="无数据"
|
||||||
Data="@channels"
|
Data="@channels"
|
||||||
AllowColumnResize="true" AllowAlternatingRows="false"
|
AllowColumnResize="true" AllowAlternatingRows="false"
|
||||||
CellClick="@((DataGridCellMouseEventArgs<ChannelStock> args) => OnCellClick(args))"
|
CellClick="@((DataGridCellMouseEventArgs<ChannelStock> args) => OnCellClick(args))"
|
||||||
AllowPaging="true" PageSize="10" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
AllowPaging="true" PageSize="10" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<RadzenRow JustifyContent="JustifyContent.End">
|
<RadzenRow JustifyContent="JustifyContent.End">
|
||||||
@if (status < 3)
|
@if (status < 3)
|
||||||
|
|
@ -310,7 +316,7 @@
|
||||||
for (int i = 0; i < ColNos.Count; i++)
|
for (int i = 0; i < ColNos.Count; i++)
|
||||||
{
|
{
|
||||||
int afterQuantity = await PortUtil.CheckQuantityForSingle(ColNos[i]);
|
int afterQuantity = await PortUtil.CheckQuantityForSingle(ColNos[i]);
|
||||||
AfterQuantity[ColNos[i]-1] = afterQuantity;
|
AfterQuantity[ColNos[i] - 1] = afterQuantity;
|
||||||
logger.Info($"AfterQuantity:{ColNos[i]}-{string.Join(",", AfterQuantity)}数量{string.Join(", ", BeforeQuantity)}");
|
logger.Info($"AfterQuantity:{ColNos[i]}-{string.Join(",", AfterQuantity)}数量{string.Join(", ", BeforeQuantity)}");
|
||||||
}
|
}
|
||||||
channels.Where(cl => ColNos.Contains(cl.ColNo)).ToList().ForEach(cl =>
|
channels.Where(cl => ColNos.Contains(cl.ColNo)).ToList().ForEach(cl =>
|
||||||
|
|
|
||||||
|
|
@ -17,8 +17,14 @@
|
||||||
<div class="row justify-content-around align-items-center" style="margin-top: 220px; height: 430px;">
|
<div class="row justify-content-around align-items-center" style="margin-top: 220px; height: 430px;">
|
||||||
@foreach (int i in DrawerNos)
|
@foreach (int i in DrawerNos)
|
||||||
{
|
{
|
||||||
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" />
|
if (setting.Value.returnDrawer != null && setting.Value.returnDrawer.Contains(i))
|
||||||
|
{
|
||||||
|
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="true" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" Style="background-color: #d3d3d3;" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" />
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -62,8 +68,8 @@
|
||||||
</RadzenRow>
|
</RadzenRow>
|
||||||
</HeaderTemplate>
|
</HeaderTemplate>
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Width="70px" Title="库位" Property="ColNo"></RadzenDataGridColumn>
|
<RadzenDataGridColumn Width="70px" Title="库位" Property="ColNo"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Width="130px" Title="药品名称" Property="Drug.DrugName">
|
<RadzenDataGridColumn Width="130px" Title="药品名称" Property="Drug.DrugName">
|
||||||
<Template Context="channel">
|
<Template Context="channel">
|
||||||
<RadzenText TextStyle="TextStyle.Subtitle2" class="mb-0">@channel.Drug?.DrugName</RadzenText>
|
<RadzenText TextStyle="TextStyle.Subtitle2" class="mb-0">@channel.Drug?.DrugName</RadzenText>
|
||||||
<RadzenText TextStyle="TextStyle.Caption">@channel.Drug?.DrugSpec</RadzenText>
|
<RadzenText TextStyle="TextStyle.Caption">@channel.Drug?.DrugSpec</RadzenText>
|
||||||
|
|
@ -250,7 +256,7 @@
|
||||||
for (int i = 0; i < ColNos.Count; i++)
|
for (int i = 0; i < ColNos.Count; i++)
|
||||||
{
|
{
|
||||||
int afterQuantity = await PortUtil.CheckQuantityForSingle(ColNos[i]);
|
int afterQuantity = await PortUtil.CheckQuantityForSingle(ColNos[i]);
|
||||||
AfterQuantity[ColNos[i]-1] = afterQuantity;
|
AfterQuantity[ColNos[i] - 1] = afterQuantity;
|
||||||
logger.Info($"AfterQuantity:{ColNos[i]}-{afterQuantity}数量{string.Join(",", AfterQuantity)}");
|
logger.Info($"AfterQuantity:{ColNos[i]}-{afterQuantity}数量{string.Join(",", AfterQuantity)}");
|
||||||
}
|
}
|
||||||
if (!BeforeQuantity.SequenceEqual(AfterQuantity))
|
if (!BeforeQuantity.SequenceEqual(AfterQuantity))
|
||||||
|
|
|
||||||
|
|
@ -119,7 +119,7 @@
|
||||||
var b = await dialogService.OpenAsync<RecordReturnEmptyDialog>(
|
var b = await dialogService.OpenAsync<RecordReturnEmptyDialog>(
|
||||||
$"归还空瓶",
|
$"归还空瓶",
|
||||||
new Dictionary<string, object>() { { "records", list } },
|
new Dictionary<string, object>() { { "records", list } },
|
||||||
new DialogOptions() { Width = "85vw", Resizable = true, Draggable = true, ShowClose = false }
|
new DialogOptions() { Width = "85vw",Height="130vh", Resizable = true, Draggable = true, ShowClose = false }
|
||||||
);
|
);
|
||||||
if (b)
|
if (b)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
</RadzenFieldset>
|
</RadzenFieldset>
|
||||||
|
<div Style="height:vh;overflow:auto;">
|
||||||
<RadzenDataGrid @ref="grid"
|
<RadzenDataGrid @ref="grid"
|
||||||
LoadData="@LoadData"
|
LoadData="@LoadData"
|
||||||
IsLoading="@isLoading"
|
IsLoading="@isLoading"
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
AllowColumnResize="true" AllowAlternatingRows="false"
|
AllowColumnResize="true" AllowAlternatingRows="false"
|
||||||
AllowRowSelectOnRowClick="true"
|
AllowRowSelectOnRowClick="true"
|
||||||
CellClick="@((DataGridCellMouseEventArgs<MachineRecord> args) => OnCellClick(args))"
|
CellClick="@((DataGridCellMouseEventArgs<MachineRecord> args) => OnCellClick(args))"
|
||||||
AllowPaging="true" PageSize="8" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
AllowPaging="false" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
||||||
<Columns>
|
<Columns>
|
||||||
<RadzenDataGridColumn Width="60px" Sortable="false" Filterable="false">
|
<RadzenDataGridColumn Width="60px" Sortable="false" Filterable="false">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
|
|
@ -61,19 +61,19 @@
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
</Columns>
|
</Columns>
|
||||||
</RadzenDataGrid>
|
</RadzenDataGrid>
|
||||||
|
</div>
|
||||||
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.Center" Gap="0.5rem" Style="margin-top:15px;">
|
<RadzenStack Orientation="Orientation.Horizontal" JustifyContent="JustifyContent.Center" Gap="0.5rem" Style="margin-top:15px;">
|
||||||
@if (status < 2)
|
@if (status < 2)
|
||||||
{
|
{
|
||||||
<RadzenButton Click="@StartAdd" IsBusy="status > 0" BusyText="还空瓶中。。。" ButtonStyle="ButtonStyle.Warning" Variant="Variant.Flat" Text="归还" Style="width: 120px" />
|
<RadzenButton Click="@StartAdd" IsBusy="status > 0" BusyText="还空瓶中。。。" ButtonStyle="ButtonStyle.Warning" Variant="Variant.Flat" Text="归还" Style="width: 120px" />
|
||||||
}
|
}
|
||||||
@if (status == 2)
|
@if (status == 2)
|
||||||
{
|
{
|
||||||
<RadzenButton Click="@AddFinish" ButtonStyle="ButtonStyle.Success" Variant="Variant.Flat" Text="完成" Style="width: 120px" />
|
<RadzenButton Click="@AddFinish" ButtonStyle="ButtonStyle.Success" Variant="Variant.Flat" Text="完成" Style="width: 120px" />
|
||||||
}
|
}
|
||||||
@if (status < 2)
|
@if (status < 2)
|
||||||
{
|
{
|
||||||
<RadzenButton Click="@((args) => CancelOpera())" Variant="Variant.Flat" Text="取消" Style="width: 120px" />
|
<RadzenButton Click="@((args) => CancelOpera())" Variant="Variant.Flat" Text="取消" Style="width: 120px" />
|
||||||
}
|
}
|
||||||
</RadzenStack>
|
</RadzenStack>
|
||||||
@code
|
@code
|
||||||
|
|
@ -107,7 +107,7 @@
|
||||||
var result = await machineRecordDao.getReturnEmptyInfoByRecords(records);
|
var result = await machineRecordDao.getReturnEmptyInfoByRecords(records);
|
||||||
// Update the Data property
|
// Update the Data property
|
||||||
_returnEmptys = result.Desserts;
|
_returnEmptys = result.Desserts;
|
||||||
emptyQuantity = _returnEmptys.Sum(it=>it.Quantity-it.ReturnQuantity1-it.ReturnQuantity2);
|
emptyQuantity = _returnEmptys.Sum(it => it.Quantity - it.ReturnQuantity1 - it.ReturnQuantity2);
|
||||||
// Update the count
|
// Update the count
|
||||||
count = result.TotalDesserts;
|
count = result.TotalDesserts;
|
||||||
|
|
||||||
|
|
@ -145,7 +145,7 @@
|
||||||
int status = 0;
|
int status = 0;
|
||||||
async Task StartAdd()
|
async Task StartAdd()
|
||||||
{
|
{
|
||||||
if (_returnEmptys.Where(it => it.CurrentReturnQuantity>0).Count()<=0)
|
if (_returnEmptys.Where(it => it.CurrentReturnQuantity > 0).Count() <= 0)
|
||||||
{
|
{
|
||||||
_message.Notify(
|
_message.Notify(
|
||||||
new NotificationMessage { Style = "position: absolute; inset-inline-start: -1000px;", Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择药品!", Duration = 4000 }
|
new NotificationMessage { Style = "position: absolute; inset-inline-start: -1000px;", Severity = NotificationSeverity.Error, Summary = "提示", Detail = $"请选择药品!", Duration = 4000 }
|
||||||
|
|
@ -298,7 +298,7 @@
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// 关闭弹窗
|
// 关闭弹窗
|
||||||
dialogService.Close(true);
|
dialogService.Close(true);
|
||||||
_message.Notify(new NotificationMessage { Style = "position: absolute; inset-inline-start: -1000px;", Severity = NotificationSeverity.Success, Summary = "提示", Detail = $"还空瓶操作完成!", Duration = 4000 });
|
_message.Notify(new NotificationMessage { Style = "position: absolute; inset-inline-start: -1000px;", Severity = NotificationSeverity.Success, Summary = "提示", Detail = $"还空瓶操作完成!", Duration = 4000 });
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.rz-custom-header {
|
.rz-custom-header {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<RadzenStack Orientation="Orientation.Horizontal">
|
<RadzenStack Orientation="Orientation.Horizontal">
|
||||||
|
|
@ -17,22 +17,28 @@
|
||||||
<div class="row justify-content-around align-items-center" style="margin-top: 220px; height: 430px;">
|
<div class="row justify-content-around align-items-center" style="margin-top: 220px; height: 430px;">
|
||||||
@foreach (int i in DrawerNos)
|
@foreach (int i in DrawerNos)
|
||||||
{
|
{
|
||||||
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" />
|
if (setting.Value.returnDrawer != null && setting.Value.returnDrawer.Contains(i))
|
||||||
|
{
|
||||||
|
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="true" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" Style="background-color: #d3d3d3;" />
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
<RadzenButton class="col-5" Click="@(() => SelectDrawer(i))" Text="@i.ToString()" Disabled="@(status > 0)" Shade="Shade.Light" Variant="@(drawerNo !=i ? Variant.Outlined : Variant.Flat)" />
|
||||||
|
}
|
||||||
}
|
}
|
||||||
</div>
|
</div>
|
||||||
@* </RadzenStack> *@
|
@* </RadzenStack> *@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<RadzenDataGrid @ref="grid"
|
<RadzenDataGrid @ref="grid"
|
||||||
LoadData="@LoadData"
|
LoadData="@LoadData"
|
||||||
IsLoading="@isLoading"
|
IsLoading="@isLoading"
|
||||||
Count="@count"
|
Count="@count"
|
||||||
EmptyText="无数据"
|
EmptyText="无数据"
|
||||||
Data="@channels"
|
Data="@channels"
|
||||||
AllowColumnResize="true" AllowAlternatingRows="false"
|
AllowColumnResize="true" AllowAlternatingRows="false"
|
||||||
CellClick="@((DataGridCellMouseEventArgs<ChannelStock> args) => OnCellClick(args))"
|
CellClick="@((DataGridCellMouseEventArgs<ChannelStock> args) => OnCellClick(args))"
|
||||||
AllowPaging="true" PageSize="10" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
AllowPaging="true" PageSize="10" PagerHorizontalAlign="HorizontalAlign.Left" ShowPagingSummary="true" PagingSummaryFormat="{0}/{1} 共{2}条数据">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
<RadzenRow JustifyContent="JustifyContent.End">
|
<RadzenRow JustifyContent="JustifyContent.End">
|
||||||
@if (status < 3)
|
@if (status < 3)
|
||||||
|
|
|
||||||
|
|
@ -204,16 +204,16 @@
|
||||||
@{
|
@{
|
||||||
DateTime dateTime;
|
DateTime dateTime;
|
||||||
bool success = DateTime.TryParse(s.EffDate, out dateTime);
|
bool success = DateTime.TryParse(s.EffDate, out dateTime);
|
||||||
if (success && dateTime <= DateTime.Now.AddMonths(3))
|
// if (success && dateTime <= DateTime.Now.AddMonths(3))
|
||||||
{
|
// {
|
||||||
@s.EffDate
|
// @s.EffDate
|
||||||
|
|
||||||
<p class="shaky-text">近效期药品!</p>
|
// <p class="shaky-text">近效期药品!</p>
|
||||||
}
|
// }
|
||||||
else
|
// else
|
||||||
{
|
//{
|
||||||
@s.EffDate
|
@s.EffDate
|
||||||
}
|
//}
|
||||||
}
|
}
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
|
|
@ -225,16 +225,16 @@
|
||||||
<RadzenDataGridColumn Title="¹æ¸ñ" Property="DrugSpec"></RadzenDataGridColumn>
|
<RadzenDataGridColumn Title="¹æ¸ñ" Property="DrugSpec"></RadzenDataGridColumn>
|
||||||
<RadzenDataGridColumn Title="×Ü¿â´æ" Property="StockQuantity">
|
<RadzenDataGridColumn Title="×Ü¿â´æ" Property="StockQuantity">
|
||||||
<Template Context="s">
|
<Template Context="s">
|
||||||
@if (s.StockQuantity < 10)
|
@* @if (s.StockQuantity < 10)
|
||||||
{
|
{
|
||||||
@s.StockQuantity
|
@s.StockQuantity
|
||||||
|
|
||||||
<p class="shaky-text">¿â´æÔ¤¾¯£¡</p>
|
<p class="shaky-text">¿â´æÔ¤¾¯£¡</p>
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{ *@
|
||||||
@s.StockQuantity
|
@s.StockQuantity
|
||||||
}
|
@* } *@
|
||||||
</Template>
|
</Template>
|
||||||
</RadzenDataGridColumn>
|
</RadzenDataGridColumn>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,10 @@ namespace MasaBlazorApp3.Pojo
|
||||||
{
|
{
|
||||||
public class BoxModel
|
public class BoxModel
|
||||||
{
|
{
|
||||||
|
//库位号
|
||||||
public int BoxNo { get; set; }
|
public int BoxNo { get; set; }
|
||||||
public string BoxName { get; set; }
|
//药箱号
|
||||||
|
public int BoxName { get; set; }
|
||||||
|
public string 药箱号 { get; set; } = "药箱号";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ namespace MasaBlazorApp3.Pojo.Config
|
||||||
public int[] weigh { get; set; }
|
public int[] weigh { get; set; }
|
||||||
public int[] box { get; set; }
|
public int[] box { get; set; }
|
||||||
public int[] label { get; set; }
|
public int[] label { get; set; }
|
||||||
|
public int[] returnDrawer { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,6 +16,8 @@ namespace MasaBlazorApp3.Pojo.Config
|
||||||
public int autoOutLog { get; set; }
|
public int autoOutLog { get; set; }
|
||||||
//手术室药盒的设备id
|
//手术室药盒的设备id
|
||||||
public string boxMachineId { get; set; }
|
public string boxMachineId { get; set; }
|
||||||
|
//手术室名称
|
||||||
|
public string roomName { get; set; }
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -19,6 +19,7 @@ using MasaBlazorApp3.Pojo.Config;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using LinqToDB.Common;
|
using LinqToDB.Common;
|
||||||
using MasaBlazorApp3.Util;
|
using MasaBlazorApp3.Util;
|
||||||
|
using Microsoft.Extensions.Logging;
|
||||||
|
|
||||||
namespace MasaBlazorApp3.Port
|
namespace MasaBlazorApp3.Port
|
||||||
{
|
{
|
||||||
|
|
@ -409,8 +410,22 @@ namespace MasaBlazorApp3.Port
|
||||||
// 以抽屉为单位灭灯
|
// 以抽屉为单位灭灯
|
||||||
public void LightOffByDrawer(int DrawerNo)
|
public void LightOffByDrawer(int DrawerNo)
|
||||||
{
|
{
|
||||||
|
SerialPort serialPort = canBusSerial;
|
||||||
|
int channelDrawerNo = DrawerNo;
|
||||||
|
if (_portConfig.totalDrawerCount > 8)
|
||||||
|
{
|
||||||
|
if (DrawerNo % 2 == 0)
|
||||||
|
{
|
||||||
|
channelDrawerNo = DrawerNo / 2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
serialPort = canBusSerialTwo;
|
||||||
|
channelDrawerNo = (DrawerNo + 1) / 2;
|
||||||
|
}
|
||||||
|
}
|
||||||
byte[] buffer = new byte[] { 0xaa, (byte)(0xf0 + DrawerNo), 0x06, 0x00, 0x00, 0x00, 0x00, 0xee };
|
byte[] buffer = new byte[] { 0xaa, (byte)(0xf0 + DrawerNo), 0x06, 0x00, 0x00, 0x00, 0x00, 0xee };
|
||||||
canBusSerial.Write(buffer, 0, 8);
|
serialPort.Write(buffer, 0, 8);
|
||||||
}
|
}
|
||||||
// 以单支板为单位有药位置亮灯
|
// 以单支板为单位有药位置亮灯
|
||||||
public async Task HasLightOnByCol(int DrawerNo, int[] ColNos)
|
public async Task HasLightOnByCol(int DrawerNo, int[] ColNos)
|
||||||
|
|
@ -434,7 +449,8 @@ namespace MasaBlazorApp3.Port
|
||||||
|
|
||||||
var channel = Convert.ToInt32((channelDrawerNo * 10 + ColNos[i]).ToString(), 16);
|
var channel = Convert.ToInt32((channelDrawerNo * 10 + ColNos[i]).ToString(), 16);
|
||||||
byte[] buffer = new byte[] { 0xaa, (byte)channel, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xee };
|
byte[] buffer = new byte[] { 0xaa, (byte)channel, 0x0a, 0x00, 0x00, 0x00, 0x00, 0xee };
|
||||||
canBusSerial.Write(buffer, 0, 8);
|
serialPort.Write(buffer, 0, 8);
|
||||||
|
logger.Info($"{serialPort}串口{DrawerNo}号{channelDrawerNo}抽屉{string.Join(',',ColNos)}库位有药位置亮灯发送指令:{Convert.ToHexString(buffer)}");
|
||||||
await Task.Delay(TimeSpan.FromMilliseconds(20));
|
await Task.Delay(TimeSpan.FromMilliseconds(20));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -469,6 +485,7 @@ namespace MasaBlazorApp3.Port
|
||||||
{
|
{
|
||||||
byte[] buffer = new byte[] { 0xaa, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xee };
|
byte[] buffer = new byte[] { 0xaa, 0xff, 0x07, 0x00, 0x00, 0x00, 0x00, 0xee };
|
||||||
canBusSerial.Write(buffer, 0, 8);
|
canBusSerial.Write(buffer, 0, 8);
|
||||||
|
canBusSerialTwo.Write(buffer, 0, 8);
|
||||||
}
|
}
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,7 @@
|
||||||
//. 药房代码: 武昌 07010323 麻醉科小药柜 8个抽屉
|
//. 药房代码: 武昌 07010323 麻醉科小药柜 8个抽屉
|
||||||
// 汉口 "07010363" "麻醉科 16个抽屉",
|
// 汉口 "07010363" "麻醉科 16个抽屉",
|
||||||
"storage": "07010323",
|
"storage": "07010323",
|
||||||
|
"roomName": "麻醉科手术室",
|
||||||
"loginMode": 1,
|
"loginMode": 1,
|
||||||
"opFirst": true,
|
"opFirst": true,
|
||||||
//自动退出登录时间,单位秒(0不自动退出)
|
//自动退出登录时间,单位秒(0不自动退出)
|
||||||
|
|
@ -27,7 +28,7 @@
|
||||||
"canBusTwoExsit": true,
|
"canBusTwoExsit": true,
|
||||||
"StorageCan": 1,
|
"StorageCan": 1,
|
||||||
//第二个can总线端口
|
//第二个can总线端口
|
||||||
"canBusPortPathTwo": "COM31",
|
"canBusPortPathTwo": "COM11",
|
||||||
"doorAddr": 0,
|
"doorAddr": 0,
|
||||||
"storageBoxAddr": 0,
|
"storageBoxAddr": 0,
|
||||||
"fridgePortExist": false,
|
"fridgePortExist": false,
|
||||||
|
|
@ -37,7 +38,8 @@
|
||||||
"single": [ 1 ],
|
"single": [ 1 ],
|
||||||
"weigh": [ 4 ],
|
"weigh": [ 4 ],
|
||||||
"box": [ 4 ],
|
"box": [ 4 ],
|
||||||
"label": [ 4 ]
|
"label": [ 4 ],
|
||||||
|
"returnDrawer": [2,4,6,8,10,12,14,16]
|
||||||
},
|
},
|
||||||
"fridge": {
|
"fridge": {
|
||||||
//冰箱温度区间
|
//冰箱温度区间
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,54 @@
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_11','DM5',1,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_12','DM5',1,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_21','DM5',2,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_22','DM5',2,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_31','DM5',3,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_32','DM5',3,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_41','DM5',4,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_42','DM5',4,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_51','DM5',5,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_52','DM5',5,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_61','DM5',6,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_62','DM5',6,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_71','DM5',7,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_72','DM5',7,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_81','DM5',8,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_82','DM5',8,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_91','DM5',9,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_92','DM5',9,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_101','DM5',10,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_102','DM5',10,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_111','DM5',11,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_112','DM5',11,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_121','DM5',12,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_122','DM5',12,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_131','DM5',13,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_132','DM5',13,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_141','DM5',14,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_142','DM5',14,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_151','DM5',15,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_152','DM5',15,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_161','DM5',16,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_162','DM5',16,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_171','DM5',17,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_172','DM5',17,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_181','DM5',18,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_182','DM5',18,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_191','DM5',19,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_192','DM5',19,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_201','DM5',20,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_202','DM5',20,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_211','DM5',21,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_212','DM5',21,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_221','DM5',22,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_222','DM5',22,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_231','DM5',23,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_232','DM5',23,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_241','DM5',24,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_242','DM5',24,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_251','DM5',25,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_252','DM5',25,2);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_261','DM5',26,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_271','DM5',27,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_281','DM5',28,1);
|
||||||
|
INSERT into channel_list(chnguid,machine_id,row_no,col_no) values('DM5_CHANNEL_291','DM5',29,1);
|
||||||
Loading…
Reference in New Issue