Commit c9503e3d by zxw

充电台 领用单直接入单警柜

parent dd98cd3c
......@@ -1392,9 +1392,10 @@ namespace LiteChannel.Commons
/// </summary>
/// <param name="policeId"></param>
/// <param name="invInfoList"></param>
/// <param name="isBindCabinet"></param>
/// <param name="msg"></param>
/// <returns></returns>
public static bool CreateBorrowLYOrder(string policeId, List<scan_info> invInfoList, out string msg)
public static bool CreateBorrowLYOrder(string policeId, List<scan_info> invInfoList, bool isBindCabinet, out string msg)
{
try
{
......@@ -1407,6 +1408,7 @@ namespace LiteChannel.Commons
policeId = policeId,
applyId = LiteCaChe.UserId,
applyName = LiteCaChe.UserName,
isBindCabinet = isBindCabinet,
detailList = invInfoList.Select(x => new
{
equipmentName = x.equName,
......
......@@ -33,7 +33,7 @@
</DataGridTemplateColumn>
</DataGrid.Columns>
</DataGrid>
<ComboBox Name="cbo_type" FontSize="24" Grid.Row="2" Grid.Column="0" pu:ComboBoxHelper.Watermark="单据类型" Height="40" Width="100" Margin="5,0,5,0" HorizontalAlignment="Left">
<ComboBox Name="cbo_type" FontSize="24" Grid.Row="2" Grid.Column="0" pu:ComboBoxHelper.Watermark="单据类型" Height="40" Width="100" Margin="5,0,5,0" HorizontalAlignment="Left" SelectionChanged="cbo_type_SelectionChanged">
<ComboBoxItem FontSize="24">借用</ComboBoxItem>
<ComboBoxItem FontSize="24">领用</ComboBoxItem>
</ComboBox>
......@@ -43,6 +43,7 @@
pu:ComboBoxHelper.HoverBackground="#1EB5B5B5"
pu:ComboBoxHelper.SelectedBackground="#32B5B5B5"
pu:ComboBoxHelper.Watermark="请选择警员" PreviewMouseDown="cbo_police_MouseDown"></ComboBox>
<CheckBox x:Name="cb_bindCabinet" Grid.Row="2" Grid.Column="0" Width="150" Margin="315,0,5,0" HorizontalAlignment="Left" FontSize="24">放入单警柜</CheckBox>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Background="Red" pu:ButtonHelper.HoverBrush="Red" Width="120" Height="35" Margin="0,0,270,0" Click="AddInv_Click" FontSize="24">添加装备</Button>
<Button pu:ButtonHelper.CornerRadius="4" Grid.Row="2" Grid.ColumnSpan="2" HorizontalAlignment="Right" Width="120" Height="35" Margin="0,0,140,0" Click="OnSave_Click" FontSize="24">创建单据</Button>
......
......@@ -49,6 +49,7 @@ namespace LiteChannel
cbo_police.SelectedIndex = -1;
cbo_type.SelectedIndex = 0;
cb_bindCabinet.Visibility = Visibility.Hidden;
dg_epc.ItemsSource = RefreshSourcesList;
}
......@@ -93,7 +94,7 @@ namespace LiteChannel
else
{
//领用
if (HttpHelper.CreateBorrowLYOrder(police.id, RefreshSourcesList.ToList(), out string msg))
if (HttpHelper.CreateBorrowLYOrder(police.id, RefreshSourcesList.ToList(), cb_bindCabinet.IsChecked == true, out string msg))
{
MessageBox.Show("领用单创建成功");
this.Close();
......@@ -155,5 +156,17 @@ namespace LiteChannel
cbo_police.SelectedItem = police;
}
}
private void cbo_type_SelectionChanged(object sender, SelectionChangedEventArgs e)
{
if (cbo_type.SelectedIndex == 1)
{
cb_bindCabinet.Visibility = Visibility.Visible;
}
else
{
cb_bindCabinet.Visibility = Visibility.Hidden;
}
}
}
}
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论