请领入库页面选择请领单后没有药品id,添加选中行的药品id

This commit is contained in:
maqiao 2024-07-02 15:46:27 +08:00
parent 3a12e3bfee
commit cb09e98cbd
1 changed files with 11 additions and 1 deletions

View File

@ -359,6 +359,16 @@ namespace DM_Weight.ViewModels
.OrderBy(cs => cs.DrawerNo)
.OrderBy(cs => cs.ColNo)
.First();
if(q is null)
{
AlertMsg alertMsg = new AlertMsg
{
Message = "药品没有绑定库位信息!",
Type = MsgType.ERROR,
};
_eventAggregator.GetEvent<SnackbarEvent>().Publish(alertMsg);
return;
}
q.AddQuantity = drugPleaseManuNo.Quantity;
csList.Add(q);
@ -438,7 +448,7 @@ namespace DM_Weight.ViewModels
int totalCount = 0;
var sb = new StringBuilder();
sb.Append("SELECT i.please_no,i.do_date,i.totalQuantity,count(1) as get_quantity,drug_manu_no,machine_id from drug_please_claim i inner join ");
sb.Append("SELECT i.please_no,i.do_date,i.totalQuantity,count(1) as get_quantity,drug_manu_no,machine_id,i.drug_id from drug_please_claim i inner join ");
sb.Append(" ( select c.drug_id as drug_id from channel_stock c where c.machine_id = 'DM3' group by c.drug_id ) di on di.drug_id = i.drug_id WHERE state=@State and type=@Type ");
if (OrderDate != null)