西昌现场要求去掉批次管理
This commit is contained in:
parent
b39419bf65
commit
aed46d6c7e
|
@ -3,7 +3,7 @@
|
|||
<connectionStrings>
|
||||
<!-- 数据库连接字符串 -->
|
||||
<!--<add name="database" connectionString="server=127.0.0.1;database=wpf_dm_program;userid=root;password=qq1223" />-->
|
||||
<add name="database" connectionString="server=127.0.0.1;port=3306;database=xichang_db_xianchang;userid=root;password=root" />
|
||||
<add name="database" connectionString="server=127.0.0.1;port=3306;database=xichang_db;userid=root;password=root" />
|
||||
</connectionStrings>
|
||||
<!--<runtime>
|
||||
--><!--配置之后,Appdomain.CurrentDomain.UnhandledException 事件的 IsTerminating 就变成了 false 啦!也就是说,程序并不会因为这次的异常而崩溃退出。--><!--
|
||||
|
@ -21,6 +21,8 @@
|
|||
<add key="firstLogin" value="operator" />
|
||||
<!-- 按处方还药或者按取药记录还药 1:处方(ReturnDrugWindow2)2:药品(ReturnDrugWindow)-->
|
||||
<add key="returnDrugMode" value="1" />
|
||||
<!-- 1:多处方取药 0:无多处方取药-->
|
||||
<add key="manyOrder" value="1" />
|
||||
<!-- 自动退出时间,单位秒,为0时不自动退出 -->
|
||||
<add key="autoExit" value="0"/>
|
||||
|
||||
|
@ -36,9 +38,9 @@
|
|||
<!-- 抽屉串口使用的协议232或者485 -->
|
||||
<add key="DrawerProtocol" value="485" />
|
||||
<!-- 抽屉串口的串口号 -->
|
||||
<add key="DrawerPortPath" value="COM6" />
|
||||
<add key="DrawerPortPath" value="COM1" />
|
||||
<!-- can总线串口的串口号 -->
|
||||
<add key="CanBusPortPath" value="COM17" />
|
||||
<add key="CanBusPortPath" value="COM9" />
|
||||
<!-- 条码枪串口的串口号 -->
|
||||
<add key="ScanCodePortPath" value="COM8" />
|
||||
<!-- 冰箱的串口号 -->
|
||||
|
|
|
@ -706,7 +706,7 @@ namespace DM_Weight.Port
|
|||
}
|
||||
if (_length != length)
|
||||
{
|
||||
throw new TimeoutException($"串口【{serialPort.PortName}】交互超时");
|
||||
throw new TimeoutException($"串口【{serialPort.PortName}】交互超时");
|
||||
}
|
||||
serialPort.Read(buffer, 0, length);
|
||||
// }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Version":"6.3.0.1",
|
||||
"Version":"6.8.1.1",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
|
@ -116,14 +116,6 @@
|
|||
"Name":"操作类型",
|
||||
"Width":2.19604
|
||||
},
|
||||
{
|
||||
"Name":"批号",
|
||||
"Width":3.99521
|
||||
},
|
||||
{
|
||||
"Name":"有效期",
|
||||
"Width":2.43417
|
||||
},
|
||||
{
|
||||
"Name":"入库数量",
|
||||
"Width":1.79917
|
||||
|
@ -173,16 +165,6 @@
|
|||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"Column":"批号",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"批号"
|
||||
},
|
||||
{
|
||||
"Column":"有效期",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"有效期"
|
||||
},
|
||||
{
|
||||
"Column":"入库数量",
|
||||
"TextAlign":"MiddleCenter",
|
||||
|
@ -280,30 +262,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"Text":"凭证号"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"批号",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"批号"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"有效期",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"有效\r\n期"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"入库数量",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Version":"6.3.0.1",
|
||||
"Version":"6.8.1.1",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
|
@ -76,14 +76,6 @@
|
|||
"Name":"数量",
|
||||
"Width":1.98438
|
||||
},
|
||||
{
|
||||
"Name":"批次",
|
||||
"Width":2.61938
|
||||
},
|
||||
{
|
||||
"Name":"效期",
|
||||
"Width":2.38125
|
||||
},
|
||||
{
|
||||
"Name":"库位",
|
||||
"Width":2.59292
|
||||
|
@ -112,16 +104,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"数量"
|
||||
},
|
||||
{
|
||||
"Column":"批次",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"批次"
|
||||
},
|
||||
{
|
||||
"Column":"效期",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"效期"
|
||||
},
|
||||
{
|
||||
"Column":"库位",
|
||||
"FreeCell":true,
|
||||
|
@ -198,30 +180,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"Text":"数量"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"批次",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"批次"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"效期",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"效期"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"库位",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Version":"6.3.0.1",
|
||||
"Version":"6.8.1.1",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
|
@ -76,14 +76,6 @@
|
|||
"Name":"数量",
|
||||
"Width":1.98438
|
||||
},
|
||||
{
|
||||
"Name":"批次",
|
||||
"Width":2.61938
|
||||
},
|
||||
{
|
||||
"Name":"效期",
|
||||
"Width":2.38125
|
||||
},
|
||||
{
|
||||
"Name":"库位",
|
||||
"Width":2.59292
|
||||
|
@ -112,16 +104,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"数量"
|
||||
},
|
||||
{
|
||||
"Column":"批次",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"批次"
|
||||
},
|
||||
{
|
||||
"Column":"效期",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"效期"
|
||||
},
|
||||
{
|
||||
"Column":"库位",
|
||||
"FreeCell":true,
|
||||
|
@ -198,30 +180,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"Text":"数量"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"批次",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"批次"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"效期",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"效期"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"库位",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Version":"6.3.0.1",
|
||||
"Version":"6.8.1.1",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
|
@ -76,14 +76,6 @@
|
|||
"Name":"数量",
|
||||
"Width":1.98438
|
||||
},
|
||||
{
|
||||
"Name":"批次",
|
||||
"Width":2.61938
|
||||
},
|
||||
{
|
||||
"Name":"效期",
|
||||
"Width":2.38125
|
||||
},
|
||||
{
|
||||
"Name":"库位",
|
||||
"Width":2.59292
|
||||
|
@ -112,16 +104,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"数量"
|
||||
},
|
||||
{
|
||||
"Column":"批次",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"批次"
|
||||
},
|
||||
{
|
||||
"Column":"效期",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"效期"
|
||||
},
|
||||
{
|
||||
"Column":"库位",
|
||||
"FreeCell":true,
|
||||
|
@ -198,30 +180,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"Text":"数量"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"批次",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"批次"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"效期",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"效期"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"库位",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Version":"6.3.0.1",
|
||||
"Version":"6.8.1.1",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
|
@ -76,14 +76,6 @@
|
|||
"Name":"数量",
|
||||
"Width":1.98438
|
||||
},
|
||||
{
|
||||
"Name":"批次",
|
||||
"Width":2.61938
|
||||
},
|
||||
{
|
||||
"Name":"效期",
|
||||
"Width":2.38125
|
||||
},
|
||||
{
|
||||
"Name":"库位",
|
||||
"Width":2.59292
|
||||
|
@ -112,16 +104,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"数量"
|
||||
},
|
||||
{
|
||||
"Column":"批次",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"批次"
|
||||
},
|
||||
{
|
||||
"Column":"效期",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"效期"
|
||||
},
|
||||
{
|
||||
"Column":"库位",
|
||||
"FreeCell":true,
|
||||
|
@ -198,30 +180,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"Text":"数量"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"批次",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"批次"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"效期",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":120000,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"效期"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"库位",
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
{
|
||||
"Version":"6.3.0.1",
|
||||
"Version":"6.8.1.1",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":105000,
|
||||
|
@ -70,12 +70,6 @@
|
|||
"Name":"quantityCount",
|
||||
"Width":2.59292
|
||||
},
|
||||
{
|
||||
"Name":"manuNo"
|
||||
},
|
||||
{
|
||||
"Name":"effDate"
|
||||
},
|
||||
{
|
||||
"Name":"quantity",
|
||||
"Width":2.43417
|
||||
|
@ -107,16 +101,6 @@
|
|||
"Column":"quantityCount",
|
||||
"FreeCell":true
|
||||
},
|
||||
{
|
||||
"Column":"manuNo",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"manuNo"
|
||||
},
|
||||
{
|
||||
"Column":"effDate",
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"effDate"
|
||||
},
|
||||
{
|
||||
"Column":"quantity",
|
||||
"TextAlign":"MiddleCenter",
|
||||
|
@ -188,30 +172,6 @@
|
|||
"TextAlign":"MiddleCenter",
|
||||
"Text":"总库存"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"manuNo",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":142500,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"批次"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"effDate",
|
||||
"Font":{
|
||||
"Name":"宋体",
|
||||
"Size":142500,
|
||||
"Bold":true,
|
||||
"Charset":134
|
||||
},
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"效期"
|
||||
},
|
||||
{
|
||||
"GroupTitle":false,
|
||||
"Column":"quantity",
|
||||
|
@ -253,7 +213,7 @@
|
|||
"Type":"MemoBox",
|
||||
"Name":"MemoBox3",
|
||||
"AlignColumn":"drugName",
|
||||
"Width":5.3975,
|
||||
"Width":5.34458,
|
||||
"Height":1.19063,
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"[#drugName#]"
|
||||
|
@ -263,7 +223,7 @@
|
|||
"Name":"MemoBox4",
|
||||
"AlignColumn":"drugSpec",
|
||||
"Left":5.37104,
|
||||
"Width":3.01625,
|
||||
"Width":2.96333,
|
||||
"Height":1.19063,
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"[#drugSpec#]"
|
||||
|
@ -273,7 +233,7 @@
|
|||
"Name":"MemoBox5",
|
||||
"AlignColumn":"manuFactory",
|
||||
"Left":8.36083,
|
||||
"Width":4.63021,
|
||||
"Width":4.57729,
|
||||
"Height":1.19063,
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"[#manuFactory#]"
|
||||
|
@ -283,7 +243,7 @@
|
|||
"Name":"MemoBox6",
|
||||
"AlignColumn":"Column1",
|
||||
"Left":12.9646,
|
||||
"Width":3.01625,
|
||||
"Width":2.96333,
|
||||
"Height":1.19063,
|
||||
"TextAlign":"MiddleCenter",
|
||||
"Text":"[#baseQuantity#]"
|
||||
|
@ -293,7 +253,7 @@
|
|||
"Name":"SummaryBox1",
|
||||
"AlignColumn":"quantityCount",
|
||||
"Left":15.9544,
|
||||
"Width":2.61938,
|
||||
"Width":2.56646,
|
||||
"Height":1.19063,
|
||||
"TextAlign":"MiddleCenter",
|
||||
"DataField":"quantity",
|
||||
|
@ -326,7 +286,7 @@
|
|||
"Type":"StaticBox",
|
||||
"Name":"StaticBox1",
|
||||
"Center":"Horizontal",
|
||||
"Left":8.89,
|
||||
"Left":7.77875,
|
||||
"Top":0.608542,
|
||||
"Width":9.18104,
|
||||
"Height":1.21708,
|
||||
|
|
|
@ -74,21 +74,21 @@ namespace DM_Weight.ViewModels
|
|||
_portUtil = portUtil;
|
||||
_eventAggregator = eventAggregator;
|
||||
}
|
||||
public DelegateCommand SelectionChangedCommand => new DelegateCommand(selectionAction);
|
||||
//public DelegateCommand SelectionChangedCommand => new DelegateCommand(selectionAction);
|
||||
|
||||
private async void selectionAction()
|
||||
{
|
||||
if (CStock != null)
|
||||
{
|
||||
// 此处延时1毫秒,等待页面渲染
|
||||
await Task.Delay(TimeSpan.FromMilliseconds(1));
|
||||
DialogParameters dialogParameters = new DialogParameters();
|
||||
dialogParameters.Add("addManuno", CStock);
|
||||
DialogServiceExtensions.ShowDialogHost(_dialogService, "AddManunoDialog", dialogParameters, DoDialogResult, "RootDialog");
|
||||
//private async void selectionAction()
|
||||
//{
|
||||
// if (CStock != null)
|
||||
// {
|
||||
// // 此处延时1毫秒,等待页面渲染
|
||||
// await Task.Delay(TimeSpan.FromMilliseconds(1));
|
||||
// DialogParameters dialogParameters = new DialogParameters();
|
||||
// dialogParameters.Add("addManuno", CStock);
|
||||
// DialogServiceExtensions.ShowDialogHost(_dialogService, "AddManunoDialog", dialogParameters, DoDialogResult, "RootDialog");
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
//}
|
||||
private void DoDialogResult(IDialogResult dialogResult)
|
||||
{
|
||||
CStock = null;
|
||||
|
@ -350,11 +350,11 @@ namespace DM_Weight.ViewModels
|
|||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.Quantity + it.AddQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
PosNo = 1
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity, it.PosNo }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -369,8 +369,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
Quantity = it.AddQuantity,
|
||||
|
|
|
@ -78,11 +78,11 @@ namespace DM_Weight.ViewModels
|
|||
set
|
||||
{
|
||||
SetProperty(ref _drugInfo, value);
|
||||
if (_drugInfo != null)
|
||||
{
|
||||
//DrugManuNos = _drugInfo.DrugManuNos;
|
||||
DrugManuNos = SqlSugarHelper.Db.Queryable<DrugManuNo>().Where(m => m.DrugId == _drugInfo.DrugId.ToString()).ToList();
|
||||
}
|
||||
//if (_drugInfo != null)
|
||||
//{
|
||||
// //DrugManuNos = _drugInfo.DrugManuNos;
|
||||
// DrugManuNos = SqlSugarHelper.Db.Queryable<DrugManuNo>().Where(m => m.DrugId == _drugInfo.DrugId.ToString()).ToList();
|
||||
//}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -94,20 +94,21 @@ namespace DM_Weight.ViewModels
|
|||
set => SetProperty(ref _drugInfos, value);
|
||||
}
|
||||
|
||||
private DrugManuNo? _drugManuNo;
|
||||
//private DrugManuNo? _drugManuNo;
|
||||
|
||||
public DrugManuNo? DrugManuNo
|
||||
{
|
||||
get => _drugManuNo;
|
||||
set => SetProperty(ref _drugManuNo, value);
|
||||
}
|
||||
private List<DrugManuNo>? _drugManuNos;
|
||||
//public DrugManuNo? DrugManuNo
|
||||
//{
|
||||
// get => _drugManuNo;
|
||||
// set => SetProperty(ref _drugManuNo, value);
|
||||
//}
|
||||
|
||||
public List<DrugManuNo>? DrugManuNos
|
||||
{
|
||||
get => _drugManuNos;
|
||||
set => SetProperty(ref _drugManuNos, value);
|
||||
}
|
||||
//private List<DrugManuNo>? _drugManuNos;
|
||||
|
||||
//public List<DrugManuNo>? DrugManuNos
|
||||
//{
|
||||
// get => _drugManuNos;
|
||||
// set => SetProperty(ref _drugManuNos, value);
|
||||
//}
|
||||
|
||||
|
||||
private List<ChannelStock>? _channels;
|
||||
|
@ -166,7 +167,7 @@ namespace DM_Weight.ViewModels
|
|||
|
||||
private void GetAllDrugInfos()
|
||||
{
|
||||
var list = SqlSugarHelper.Db.Queryable<DrugInfo>().Includes<DrugManuNo>(di => di.DrugManuNos).OrderBy(di => di.DrugId).ToList();
|
||||
var list = SqlSugarHelper.Db.Queryable<DrugInfo>().OrderBy(di => di.DrugId).ToList();
|
||||
DrugInfos = list;
|
||||
}
|
||||
|
||||
|
@ -264,7 +265,7 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
else
|
||||
{
|
||||
if (DrugInfo != null && DrugManuNo != null)
|
||||
if (DrugInfo != null)
|
||||
{
|
||||
|
||||
var c = SelectChannels.Count;
|
||||
|
@ -279,10 +280,10 @@ namespace DM_Weight.ViewModels
|
|||
}
|
||||
|
||||
item.DrugId = DrugInfo.DrugId.ToString();
|
||||
item.ManuNo = DrugManuNo.ManuNo;
|
||||
//item.ManuNo = DrugManuNo.ManuNo;
|
||||
item.DrugInfo = DrugInfo;
|
||||
item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate);
|
||||
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
|
||||
//item.EffDate = String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate);
|
||||
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.PosNo }).ExecuteCommand();
|
||||
|
||||
if (item.BoardType == (Int32)BoardTypeEnum.smart || item.BoardType == (Int32)BoardTypeEnum.weighSmartBox)
|
||||
{
|
||||
|
@ -294,9 +295,9 @@ namespace DM_Weight.ViewModels
|
|||
await Task.Delay(200);
|
||||
_portUtil.WriteChannelInfo(8, DrugInfo.Manufactory, item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.WriteChannelInfo(6, DrugManuNo.ManuNo, item.DrawerNo, item.ColNo);
|
||||
//_portUtil.WriteChannelInfo(6, DrugManuNo.ManuNo, item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.WriteChannelInfo(5, String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate), item.DrawerNo, item.ColNo);
|
||||
//_portUtil.WriteChannelInfo(5, String.Format("{0:yyyy-MM-dd}", DrugManuNo.EffDate), item.DrawerNo, item.ColNo);
|
||||
await Task.Delay(200);
|
||||
_portUtil.ShowContent(item.DrawerNo, item.ColNo);
|
||||
}
|
||||
|
@ -313,7 +314,7 @@ namespace DM_Weight.ViewModels
|
|||
else
|
||||
{
|
||||
SnackbarBackground = new SolidColorBrush((Color)ColorConverter.ConvertFromString("#b71c1c"));
|
||||
SnackbarMessageQueue.Enqueue("请选择库位需要绑定的药品及批次信息");
|
||||
SnackbarMessageQueue.Enqueue("请选择库位需要绑定的药品");
|
||||
}
|
||||
}
|
||||
});
|
||||
|
@ -333,7 +334,7 @@ namespace DM_Weight.ViewModels
|
|||
item.ManuNo = null;
|
||||
item.EffDate = null;
|
||||
item.DrugInfo = null;
|
||||
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
SqlSugarHelper.Db.Updateable(item).UpdateColumns(it => new { it.DrugId }).ExecuteCommand();
|
||||
if (item.BoardType == (Int32)BoardTypeEnum.smart || item.BoardType == (Int32)BoardTypeEnum.weighSmartBox)
|
||||
{
|
||||
// 清除显示屏库位信息
|
||||
|
|
|
@ -163,11 +163,9 @@ namespace DM_Weight.ViewModels
|
|||
// 更新数据 库存信息
|
||||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.CheckQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
Quantity = it.CheckQuantity,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -182,8 +180,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
|
|
@ -175,18 +175,18 @@ namespace DM_Weight.ViewModels
|
|||
for (int i = 0; i < record.Count; i++)
|
||||
{
|
||||
ChannelStock it = record[i];
|
||||
it.ManuNo = it.drugManuNo==null?it.ManuNo: it.drugManuNo.ManuNo;
|
||||
it.EffDate = it.drugManuNo == null? it.EffDate: it.drugManuNo.EffDate;
|
||||
//it.ManuNo = it.drugManuNo==null?it.ManuNo: it.drugManuNo.ManuNo;
|
||||
//it.EffDate = it.drugManuNo == null? it.EffDate: it.drugManuNo.EffDate;
|
||||
|
||||
|
||||
// 更新数据 库存信息
|
||||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.Quantity + it.AddQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -201,8 +201,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
@ -360,7 +360,7 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
ChannelStocks = queryData.Select(cs =>
|
||||
{
|
||||
cs.drugManuNo = cs.DrugInfo.DrugManuNos.Find(it => it.ManuNo.Equals(cs.ManuNo));
|
||||
//cs.drugManuNo = cs.DrugInfo.DrugManuNos.Find(it => it.ManuNo.Equals(cs.ManuNo));
|
||||
return cs;
|
||||
}).ToList();
|
||||
}
|
||||
|
|
|
@ -183,10 +183,10 @@ namespace DM_Weight.ViewModels
|
|||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.Quantity - it.TakeQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -201,8 +201,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
|
|
@ -256,10 +256,8 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
Quantity = it.Quantity + it.AddQuantity,
|
||||
PosNo = 1,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity, it.PosNo }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -274,8 +272,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
|
|
@ -206,8 +206,8 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
List<ChannelStock> q = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Includes<DrugInfo>(cs => cs.DrugInfo)
|
||||
.WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
|
||||
.WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
|
||||
//.WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
|
||||
//.WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
|
||||
.Where(cs => cs.DrugId == invoice.DrugId)
|
||||
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
|
||||
|
|
|
@ -192,10 +192,10 @@ namespace DM_Weight.ViewModels
|
|||
.Where(cs => cs.Quantity > 0)
|
||||
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
|
||||
.WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
|
||||
.WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
|
||||
//.WhereIF(!string.IsNullOrEmpty(invoice.DrugEffDate), cs => cs.EffDate.Equals(invoice.DrugEffDate))
|
||||
//.WhereIF(!string.IsNullOrEmpty(invoice.DrugManuNo), cs => cs.ManuNo.Equals(invoice.DrugManuNo))
|
||||
.Where(cs => cs.DrugId == invoice.DrugId)
|
||||
.OrderBy(cs => cs.EffDate)
|
||||
//.OrderBy(cs => cs.EffDate)
|
||||
.ToList();
|
||||
int total = HasQChannels.Sum(it => it.Quantity);
|
||||
int TakeQ = invoice.quantity;
|
||||
|
@ -317,10 +317,10 @@ namespace DM_Weight.ViewModels
|
|||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.Quantity - it.TakeQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -335,8 +335,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
|
|
@ -178,7 +178,7 @@ namespace DM_Weight.ViewModels
|
|||
.InnerJoin(SqlSugarHelper.Db.Queryable<ChannelStock>().Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne).Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1")).GroupBy(cs => cs.DrugId), (od, t) => od.DrugId == t.DrugId)
|
||||
.Where(od => OrderInfo.Select(o => o.OrderNo).Contains(od.OrderNo)).GroupBy(od => od.DrugId)
|
||||
|
||||
.Select(od => new OrderDetail { DrugId = od.DrugId, SetEffDate = od.SetEffDate, SetManuNo = od.SetManuNo, Quantity = SqlFunc.AggregateSum(od.Quantity) })
|
||||
.Select(od => new OrderDetail { DrugId = od.DrugId,Quantity = SqlFunc.AggregateSum(od.Quantity) })
|
||||
|
||||
//.Where(od => od.OrderNo. OrderInfo.OrderNo)
|
||||
.ToList();
|
||||
|
@ -195,8 +195,8 @@ namespace DM_Weight.ViewModels
|
|||
.Where(cs => cs.Quantity > 0)
|
||||
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
|
||||
.WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
|
||||
.WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
|
||||
//.WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
|
||||
//.WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
|
||||
.Where(cs => cs.DrugId == orderDetail.DrugId)
|
||||
.OrderBy(cs => cs.EffDate)
|
||||
.OrderBy(cs => cs.DrawerNo)
|
||||
|
@ -375,8 +375,8 @@ namespace DM_Weight.ViewModels
|
|||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.Quantity - it.TakeQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
|
@ -393,8 +393,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
|
|
@ -190,10 +190,10 @@ namespace DM_Weight.ViewModels
|
|||
.Where(cs => cs.Quantity > 0)
|
||||
.Where(cs => cs.DrawerType == (Int32)DrawerTypeEnum.drawerTypeOne)
|
||||
.Where(cs => cs.MachineId.Equals(ConfigurationManager.AppSettings["machineId"] ?? "DM1"))
|
||||
.WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
|
||||
.WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
|
||||
//.WhereIF(!string.IsNullOrEmpty(orderDetail.SetEffDate), cs => cs.EffDate.Equals(orderDetail.SetEffDate))
|
||||
//.WhereIF(!string.IsNullOrEmpty(orderDetail.SetManuNo), cs => cs.ManuNo.Equals(orderDetail.SetManuNo))
|
||||
.Where(cs => cs.DrugId == orderDetail.DrugId)
|
||||
.OrderBy(cs => cs.EffDate)
|
||||
//.OrderBy(cs => cs.EffDate)
|
||||
.OrderBy(cs => cs.DrawerNo)
|
||||
.ToList();
|
||||
int total = HasQChannels.Sum(it => it.Quantity);
|
||||
|
@ -337,10 +337,10 @@ namespace DM_Weight.ViewModels
|
|||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.Quantity - it.TakeQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -355,8 +355,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
|
|
@ -243,10 +243,10 @@ namespace DM_Weight.ViewModels
|
|||
{
|
||||
Quantity = it.Quantity + it.AddQuantity,
|
||||
PosNo = 1,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate, it.PosNo }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity, it.PosNo }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -261,8 +261,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
Reviewer = HomeWindowViewModel.Reviewer?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
|
|
|
@ -220,10 +220,10 @@ namespace DM_Weight.ViewModels
|
|||
SqlSugarHelper.Db.Updateable(new ChannelStock()
|
||||
{
|
||||
Quantity = it.Quantity - it.TakeQuantity,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = it.EffDate,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = it.EffDate,
|
||||
Id = it.Id,
|
||||
}).UpdateColumns(it => new { it.Quantity, it.ManuNo, it.EffDate }).ExecuteCommand();
|
||||
}).UpdateColumns(it => new { it.Quantity }).ExecuteCommand();
|
||||
// 获取更新完库存后的药品库存
|
||||
List<ChannelStock> nowChannels = SqlSugarHelper.Db.Queryable<ChannelStock>()
|
||||
.Where(cs => cs.MachineId.Equals(it.MachineId))
|
||||
|
@ -238,8 +238,8 @@ namespace DM_Weight.ViewModels
|
|||
DrawerNo = it.DrawerNo,
|
||||
ColNo = it.ColNo,
|
||||
DrugId = it.DrugId,
|
||||
ManuNo = it.ManuNo,
|
||||
EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
//ManuNo = it.ManuNo,
|
||||
//EffDate = !String.IsNullOrEmpty(it.EffDate) ? DateTime.ParseExact(it.EffDate, "yyyy-MM-dd", System.Globalization.CultureInfo.CurrentCulture) : null,
|
||||
Operator = HomeWindowViewModel.Operator?.Id,
|
||||
OperationTime = DateTime.Now,
|
||||
Quantity = it.TakeQuantity,
|
||||
|
|
|
@ -222,11 +222,11 @@
|
|||
SelectionUnit="Cell"
|
||||
CanUserAddRows="False"
|
||||
AutoGenerateColumns="False">
|
||||
<i:Interaction.Triggers>
|
||||
<!--<i:Interaction.Triggers>
|
||||
<i:EventTrigger EventName="SelectionChanged">
|
||||
<i:InvokeCommandAction Command="{Binding SelectionChangedCommand}" />
|
||||
</i:EventTrigger>
|
||||
</i:Interaction.Triggers>
|
||||
</i:Interaction.Triggers>-->
|
||||
<DataGrid.Resources>
|
||||
<Style TargetType="{x:Type DataGridColumnHeader}" BasedOn="{StaticResource MaterialDesignDataGridColumnHeader}">
|
||||
<Setter Property="Background" Value="#31ccec" />
|
||||
|
@ -262,11 +262,11 @@
|
|||
Header="规格"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="100"
|
||||
<!--<DataGridTextColumn Width="100"
|
||||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<!--<DataGridTemplateColumn Width="200" IsReadOnly="True"
|
||||
Header="批次">
|
||||
<DataGridTemplateColumn.CellTemplate>
|
||||
|
@ -281,11 +281,11 @@
|
|||
</DataTemplate>
|
||||
</DataGridTemplateColumn.CellTemplate>
|
||||
</DataGridTemplateColumn>-->
|
||||
<DataGridTextColumn Width="100"
|
||||
<!--<DataGridTextColumn Width="100"
|
||||
Binding="{Binding drugManuNo.EffDate}"
|
||||
Header="效期"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="60"
|
||||
Binding="{Binding Quantity}"
|
||||
Header="库存"
|
||||
|
|
|
@ -215,7 +215,7 @@
|
|||
Header="规格"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="100"
|
||||
<!--<DataGridTextColumn Width="100"
|
||||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
|
@ -224,7 +224,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
Header="效期"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="100"
|
||||
Binding="{Binding Quantity}"
|
||||
Header="库存"
|
||||
|
|
|
@ -54,13 +54,13 @@
|
|||
SelectedItem="{Binding DrugInfo}"
|
||||
DisplayMemberPath="DrugName" IsEnabled="True" IsTextSearchEnabled="False" KeyUp="ComboBox_KeyUp"
|
||||
/>
|
||||
<ComboBox
|
||||
<!--<ComboBox
|
||||
Grid.Column="1"
|
||||
Style="{StaticResource MaterialDesignOutlinedComboBox}"
|
||||
materialDesign:HintAssist.Hint="批次"
|
||||
ItemsSource="{Binding DrugManuNos}"
|
||||
SelectedItem="{Binding DrugManuNo}"
|
||||
DisplayMemberPath="ManuNo"/>
|
||||
DisplayMemberPath="ManuNo"/>-->
|
||||
<StackPanel HorizontalAlignment="Right" Grid.Column="2" Orientation="Horizontal">
|
||||
<Button
|
||||
Style="{StaticResource MaterialDesignOutlinedLightButton}"
|
||||
|
@ -151,12 +151,14 @@
|
|||
HorizontalAlignment="Right"
|
||||
Orientation="Horizontal">
|
||||
<TextBlock Text="{Binding DrugInfo.DrugName}" />
|
||||
<TextBlock
|
||||
Visibility="{Binding Quantity, Converter={StaticResource NotZeroToVisibilityConverter}}"
|
||||
Text="{Binding Quantity, StringFormat=({0})}" />
|
||||
</StackPanel>
|
||||
|
||||
<TextBlock
|
||||
<TextBlock HorizontalAlignment="Left" Grid.Row="1" Grid.Column="0" Text="数量"/>
|
||||
<TextBlock HorizontalAlignment="Right"
|
||||
Grid.Row="1"
|
||||
Grid.Column="1"
|
||||
Visibility="{Binding Quantity, Converter={StaticResource NotZeroToVisibilityConverter}}"
|
||||
Text="{Binding Quantity}" />
|
||||
<!--<TextBlock
|
||||
HorizontalAlignment="Left"
|
||||
Grid.Row="1"
|
||||
Grid.Column="0"
|
||||
|
@ -175,7 +177,7 @@
|
|||
HorizontalAlignment="Right"
|
||||
Grid.Row="2"
|
||||
Grid.Column="1"
|
||||
Text="{Binding EffDate}" />
|
||||
Text="{Binding EffDate}" />-->
|
||||
</Grid>
|
||||
</Grid>
|
||||
</materialDesign:Card>
|
||||
|
|
|
@ -119,7 +119,7 @@
|
|||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
<DataGridTextColumn Width="130"
|
||||
<!--<DataGridTextColumn Width="130"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
Binding="{Binding ManuNo}"
|
||||
|
@ -132,7 +132,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
/>-->
|
||||
<DataGridTextColumn Width="100"
|
||||
Header="取出数量"
|
||||
IsReadOnly="True"
|
||||
|
|
|
@ -151,7 +151,7 @@
|
|||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
<DataGridTextColumn Width="130"
|
||||
<!--<DataGridTextColumn Width="130"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
Binding="{Binding ManuNo}"
|
||||
|
@ -164,7 +164,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
/>-->
|
||||
<DataGridTextColumn Width="100"
|
||||
Header="取出数量"
|
||||
IsReadOnly="True"
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
<DataGridTextColumn
|
||||
<!--<DataGridTextColumn
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
Binding="{Binding ManuNo}"
|
||||
|
@ -94,7 +94,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
/>-->
|
||||
<DataGridTextColumn
|
||||
Header="添加数量"
|
||||
IsReadOnly="True"
|
||||
|
|
|
@ -81,7 +81,7 @@
|
|||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
<DataGridTextColumn
|
||||
<!--<DataGridTextColumn
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
Binding="{Binding ManuNo}"
|
||||
|
@ -94,7 +94,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"
|
||||
EditingElementStyle="{StaticResource MaterialDesignDataGridTextColumnEditingStyle}"
|
||||
/>
|
||||
/>-->
|
||||
<DataGridTextColumn
|
||||
Header="取出数量"
|
||||
IsReadOnly="True"
|
||||
|
|
|
@ -216,7 +216,7 @@
|
|||
Header="药品名称"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="100"
|
||||
<!--<DataGridTextColumn Width="100"
|
||||
Binding="{Binding DrugInfo.DrugSpec}"
|
||||
Header="规格"
|
||||
IsReadOnly="True"
|
||||
|
@ -225,7 +225,7 @@
|
|||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="100"
|
||||
Binding="{Binding EffDate}"
|
||||
Header="效期"
|
||||
|
|
|
@ -218,7 +218,7 @@
|
|||
Header="规格"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="100"
|
||||
<!--<DataGridTextColumn Width="100"
|
||||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
|
@ -227,7 +227,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
Header="效期"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="80"
|
||||
Binding="{Binding Quantity}"
|
||||
Header="库存"
|
||||
|
|
|
@ -162,7 +162,7 @@
|
|||
</StackPanel>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
<TabItem Header="批次信息">
|
||||
<!--<TabItem Header="批次信息">
|
||||
<Grid Grid.Column="0">
|
||||
<Grid.RowDefinitions>
|
||||
<RowDefinition Height="Auto" />
|
||||
|
@ -212,7 +212,7 @@
|
|||
</Grid>
|
||||
</Border>
|
||||
</Grid>
|
||||
</TabItem>
|
||||
</TabItem>-->
|
||||
</TabControl>
|
||||
</materialDesign:Card>
|
||||
</Grid>
|
||||
|
|
|
@ -199,7 +199,7 @@
|
|||
Header="库位"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="147"
|
||||
<!--<DataGridTextColumn Width="147"
|
||||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
|
@ -208,7 +208,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
Header="效期"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="100"
|
||||
Binding="{Binding Quantity}"
|
||||
Header="库存"
|
||||
|
|
|
@ -111,7 +111,7 @@
|
|||
<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding DrugInfo.DrugSpec}"
|
||||
Header="规格"/>
|
||||
<GridViewColumn Width="100"
|
||||
<!--<GridViewColumn Width="100"
|
||||
DisplayMemberBinding="{Binding Quantity}"
|
||||
Header="数量"/>
|
||||
<GridViewColumn Width="180"
|
||||
|
@ -119,7 +119,7 @@
|
|||
Header="批次"/>
|
||||
<GridViewColumn Width="150"
|
||||
DisplayMemberBinding="{Binding EffDate, StringFormat=yyyy-MM-dd}"
|
||||
Header="效期"/>
|
||||
Header="效期"/>-->
|
||||
<GridViewColumn Width="100"
|
||||
Header="库位">
|
||||
<GridViewColumn.CellTemplate>
|
||||
|
|
|
@ -128,7 +128,7 @@
|
|||
Header="库位"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="210"
|
||||
<!--<DataGridTextColumn Width="210"
|
||||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
|
@ -137,7 +137,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
Header="效期"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="210"
|
||||
Binding="{Binding Quantity}"
|
||||
Header="库存"
|
||||
|
|
|
@ -127,7 +127,7 @@
|
|||
Header="库位"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="260"
|
||||
<!--<DataGridTextColumn Width="260"
|
||||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
|
@ -136,7 +136,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
Header="效期"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="160"
|
||||
Binding="{Binding Quantity}"
|
||||
Header="库存"
|
||||
|
|
|
@ -130,7 +130,7 @@
|
|||
Header="库位"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
<DataGridTextColumn Width="250"
|
||||
<!--<DataGridTextColumn Width="250"
|
||||
Binding="{Binding ManuNo}"
|
||||
Header="批次"
|
||||
IsReadOnly="True"
|
||||
|
@ -139,7 +139,7 @@
|
|||
Binding="{Binding EffDate}"
|
||||
Header="效期"
|
||||
IsReadOnly="True"
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>
|
||||
ElementStyle="{StaticResource MaterialDesignDataGridTextColumnStyle}"/>-->
|
||||
<DataGridTextColumn Width="241"
|
||||
Binding="{Binding Quantity}"
|
||||
Header="库存"
|
||||
|
|
Loading…
Reference in New Issue