From 87ae1eed306c9130b7c473ccc8969f69b2546281 Mon Sep 17 00:00:00 2001 From: wangshaoyang <18303387296@139.com> Date: Tue, 30 Apr 2019 17:04:31 +0800 Subject: [PATCH] =?UTF-8?q?=E9=9C=80=E6=B1=82=E5=8D=95No.143292=E3=80=81?= =?UTF-8?q?=E3=80=90=E4=BB=93=E5=BA=93=E5=AE=A2=E6=88=B7=E7=AB=AF=E3=80=91?= =?UTF-8?q?=E9=80=89=E5=AE=9A=E5=AE=A2=E6=88=B7=E6=97=B6=EF=BC=8C=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E5=BD=93=E5=89=8D=E7=BA=BF=E8=B7=AF=E9=85=8D=E9=80=81?= =?UTF-8?q?=E9=85=8D=E8=B4=A7=E7=9A=84=E7=8A=B6=E6=80=81=E3=80=82=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E5=AE=A2=E6=88=B7=E7=AB=AF=E3=80=91=20=20=E9=80=81?= =?UTF-8?q?=E8=B4=A7=E7=BA=BF=E8=B7=AF=E7=95=8C=E9=9D=A2=E4=B8=AD=E6=8C=89?= =?UTF-8?q?=E7=85=A7=E3=80=90=E9=80=81=E8=B4=A7=E7=BA=BF=E8=B7=AF=E3=80=91?= =?UTF-8?q?=E7=9A=84{=E9=A1=BA=E5=BA=8F=E5=8F=B7}=E6=8E=92=E5=BA=8F?= =?UTF-8?q?=E3=80=90=E4=BB=93=E5=BA=93=E5=AE=A2=E6=88=B7=E7=AB=AF=E3=80=91?= =?UTF-8?q?=E7=9A=84=E2=80=98=E7=99=BD=E6=9D=A1=E5=8F=91=E8=B4=A7=E2=80=99?= =?UTF-8?q?=E2=80=98=E9=B2=9C=E5=93=81=E5=8F=91=E8=B4=A7=E2=80=99=E7=9A=84?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E7=AB=AF=E4=B8=AD=EF=BC=8C{=E5=87=BA?= =?UTF-8?q?=E5=BA=93=E6=97=B6=E9=97=B4}=20=E6=98=BE=E7=A4=BA=E5=9C=A8?= =?UTF-8?q?=E4=BB=93=E5=BA=93=E5=90=8E=E9=9D=A2=E5=B0=86=E3=80=90=E4=BB=93?= =?UTF-8?q?=E5=BA=93=E5=AE=A2=E6=88=B7=E7=AB=AF=E3=80=91=E7=9A=84=E2=80=98?= =?UTF-8?q?=E7=99=BD=E6=9D=A1=E5=8F=91=E8=B4=A7=E2=80=99=E2=80=98=E9=B2=9C?= =?UTF-8?q?=E5=93=81=E5=8F=91=E8=B4=A7=E2=80=99=E7=9A=84=E5=AE=A2=E6=88=B7?= =?UTF-8?q?=E7=AB=AF=E4=B8=AD=EF=BC=8C=E4=B8=AD=E6=95=B0=E5=AD=97=E9=94=AE?= =?UTF-8?q?=E2=80=980=E2=80=99=E8=B0=83=E6=95=B4=E4=B8=BA=20=E2=80=98AC?= =?UTF-8?q?=E2=80=99=E2=80=980=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- B3DealerClient/B3DealerClient.csproj | 7 + B3DealerClient/BL/BaseInfoBL.cs | 9 +- .../Dialogs/DriverGoodsLineDialog.xaml | 68 +++ .../Dialogs/DriverGoodsLineDialog.xaml.cs | 64 +++ .../CarcassSaleOutWindow.xaml | 501 +++++++++--------- .../CarcassSaleOutWindow.xaml.cs | 18 +- .../FreshSaleOutWindow.xaml | 402 +++++++------- 7 files changed, 624 insertions(+), 445 deletions(-) create mode 100644 B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml create mode 100644 B3DealerClient/Dialogs/DriverGoodsLineDialog.xaml.cs 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"> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + - - - - - - - - - - - + + + + + + - - - - + + + + + + - - - - - - - - - - - + + + + + +