diff --git a/B3DealerClient/B3DealerClient.csproj b/B3DealerClient/B3DealerClient.csproj index bb69112..3a856bc 100644 --- a/B3DealerClient/B3DealerClient.csproj +++ b/B3DealerClient/B3DealerClient.csproj @@ -115,6 +115,9 @@ BaseInfoDialog.xaml + + DriverGoodsLineDialog.xaml + FunctionSelectDialog.xaml @@ -212,6 +215,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile diff --git a/B3DealerClient/BL/BaseInfoBL.cs b/B3DealerClient/BL/BaseInfoBL.cs index 6aa04f6..0969f7c 100644 --- a/B3DealerClient/BL/BaseInfoBL.cs +++ b/B3DealerClient/BL/BaseInfoBL.cs @@ -1,6 +1,7 @@ using B3DealerClient.BO; using Forks.JsonRpc.Client; using Forks.JsonRpc.Client.Data; +using Newtonsoft.Json; using System; using System.Collections.Generic; using System.Linq; @@ -31,5 +32,11 @@ namespace B3DealerClient.BL } return RpcFacade.Call>(BaseInfoUrl, dataKind, string.Empty, string.Empty).Select(x => new NameIDPair { ID = Convert.ToInt64(x.Get("Item1")), Name = x.Get("Item2") }); } - } + + internal static IEnumerable> GetBaseInfoList(DateTime mDate, long? mStoreID) + { + var rst = RpcFacade.Call("/MainSystem/B3Dealer/Rpcs/BaseInfoRpc/GetDriverGoodsLine", mDate, mStoreID); + return JsonConvert.DeserializeObject>>(rst); + } + } } diff --git a/B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml b/B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml new file mode 100644 index 0000000..4792bdf --- /dev/null +++ b/B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml @@ -0,0 +1,68 @@ + + + + + + + + + + + \ No newline at end of file diff --git a/B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml.cs b/B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml.cs new file mode 100644 index 0000000..48b9c2f --- /dev/null +++ b/B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml.cs @@ -0,0 +1,64 @@ +using B3DealerClient.BL; +using B3DealerClient.BO; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using System.Windows; +using System.Windows.Controls; +using System.Windows.Data; +using System.Windows.Documents; +using System.Windows.Input; +using System.Windows.Media; +using System.Windows.Media.Imaging; +using System.Windows.Shapes; + +namespace B3DealerClient.Dialogs +{ + /// + /// DriverGoodsLineDialog.xaml 的交互逻辑 + /// + public partial class DriverGoodsLineDialog : Window + { + public NameIDPair Result { get; private set; } + private DateTime mDate; + private long? mStoreID; + Style orgStyle,greedStyle; + public DriverGoodsLineDialog(DateTime date, long? storeID) + { + mDate = date; + mStoreID = storeID; + InitializeComponent(); + this.Loaded += BaseInfoDialog_Loaded; + } + + void BaseInfoDialog_Loaded(object sender, RoutedEventArgs e) + { + orgStyle = this.Resources["orgBtn"] as Style; + greedStyle = this.Resources["greenBtn"] as Style; + var list = BaseInfoBL.GetBaseInfoList(mDate, mStoreID); + if (list == null) + return; + foreach (var item in list) + { + var content = new TextBlock() { TextWrapping = TextWrapping.Wrap }; + content.Text = item.Item1; + var btn = new Button() { Content = content, Tag = new NameIDPair { ID = item.Item2, Name = item.Item1 } }; + if (item.Item3 == 0) + btn.Style = greedStyle; + else if (item.Item3 == 1) + btn.Style = orgStyle; + btn.PreviewMouseDown += btn_PreviewMouseDown; + this.wrapPanel.Children.Add(btn); + } + } + + void btn_PreviewMouseDown(object sender, MouseButtonEventArgs e) + { + var btn = sender as Button; + Result = btn.Tag as NameIDPair; + DialogResult = true; + } + } +} diff --git a/B3DealerClient/Windows/CarcassSaleOutWindow_/CarcassSaleOutWindow.xaml b/B3DealerClient/Windows/CarcassSaleOutWindow_/CarcassSaleOutWindow.xaml index eb2c244..137305b 100644 --- a/B3DealerClient/Windows/CarcassSaleOutWindow_/CarcassSaleOutWindow.xaml +++ b/B3DealerClient/Windows/CarcassSaleOutWindow_/CarcassSaleOutWindow.xaml @@ -5,171 +5,179 @@ xmlns:util="clr-namespace:B3DealerClient.Utils" xmlns:self="clr-namespace:B3DealerClient.Windows.CarcassSaleOutWindow_" Title="白条发货" Height="800" Width="1200" FontSize="17" WindowState="Maximized"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - + + + + + + - - - - - - - - - - - + + + + + +