Administrator 2 months ago
parent
commit
dbb91fe0ee
  1. 2
      InfoDetail.xaml.cs
  2. 4
      Models/DataSource.cs
  3. 6
      QueryDetail.xaml.cs
  4. 4
      QueryPage.xaml
  5. 20
      QueryPage.xaml.cs

2
InfoDetail.xaml.cs

@ -22,7 +22,7 @@ public partial class InfoDetail : ContentPage
InfoDyelotDetailsItems.Add(new DyelotDetailsItem InfoDyelotDetailsItems.Add(new DyelotDetailsItem
{ Dyelot = "2134566", Machine = "g01", CreationTime = "", CallTime = "" , { Dyelot = "2134566", Machine = "g01", CreationTime = "", CallTime = "" ,
ReDye="0", ReDye=0,
Information = "yyjjy\nfxfxdsdg\n", Information = "yyjjy\nfxfxdsdg\n",
}); });
InfoDyelotDetailsItems.Add(new DyelotDetailsItem InfoDyelotDetailsItems.Add(new DyelotDetailsItem

4
Models/DataSource.cs

@ -51,7 +51,7 @@ namespace SunlightAggregationTerminal.Models
public class DyelotItem public class DyelotItem
{ {
public string? Dyelot { get; set; } public string? Dyelot { get; set; }
public string? ReDye { get; set; } public int? ReDye { get; set; }
public string? Machine { get; set; } public string? Machine { get; set; }
public string? CreationTime { get; set; } public string? CreationTime { get; set; }
public string? FabricName { get; set; } public string? FabricName { get; set; }
@ -62,7 +62,7 @@ namespace SunlightAggregationTerminal.Models
public class DyelotDetailsItem public class DyelotDetailsItem
{ {
public string? Dyelot { get; set; } public string? Dyelot { get; set; }
public string? ReDye { get; set; } public int? ReDye { get; set; }
public string? Step { get; set; } public string? Step { get; set; }
public string? ProductName { get; set; } public string? ProductName { get; set; }
public string? ProductCode { get; set; } public string? ProductCode { get; set; }

6
QueryDetail.xaml.cs

@ -21,7 +21,7 @@ public partial class QueryDetail : ContentPage
CreationTime = "", CreationTime = "",
DispenserGram="32434", DispenserGram="32434",
Gram = "3212", Gram = "3212",
ReDye = "0", ReDye = 0,
ProductName="sdvsf1", ProductName="sdvsf1",
Information = "yyjjy\nfxfxdsdg\n", Information = "yyjjy\nfxfxdsdg\n",
}); });
@ -33,7 +33,7 @@ public partial class QueryDetail : ContentPage
CreationTime = "", CreationTime = "",
DispenserGram = "32423434", DispenserGram = "32423434",
Gram = "3212434", Gram = "3212434",
ReDye = "0", ReDye = 0,
ProductName = "sdvsf2", ProductName = "sdvsf2",
Information = "yyjjy\nfxfxdsdg\n", Information = "yyjjy\nfxfxdsdg\n",
}); });
@ -45,7 +45,7 @@ public partial class QueryDetail : ContentPage
DispenserGram = "3212434", DispenserGram = "3212434",
Gram= "3212434", Gram= "3212434",
Step = "4", Step = "4",
ReDye = "0", ReDye = 0,
ProductName = "sdvsf3", ProductName = "sdvsf3",
Information = "yyjjy\nfxfxdsdg\n", Information = "yyjjy\nfxfxdsdg\n",
}); });

4
QueryPage.xaml

@ -26,9 +26,9 @@
</Button> </Button>
<StackLayout Grid.Row="1" Grid.Column="0" > <StackLayout Grid.Row="1" Grid.Column="0" >
<HorizontalStackLayout> <HorizontalStackLayout>
<DatePicker Format="yyyy年MM月dd日" FontSize="18"/> <DatePicker x:Name="StartTime" Format="yyyy-MM-dd" FontSize="18"/>
<Label Text="~" FontSize="32"/> <Label Text="~" FontSize="32"/>
<DatePicker Format="yyyy年MM月dd日" FontSize="18"/> <DatePicker x:Name="EndTime" Format="yyyy-MM-dd" FontSize="18"/>
<Button Text="搜索" Margin="5"/> <Button Text="搜索" Margin="5"/>
</HorizontalStackLayout> </HorizontalStackLayout>
</StackLayout> </StackLayout>

20
QueryPage.xaml.cs

@ -3,6 +3,7 @@ using SunlightAggregationTerminal.Class;
using SunlightAggregationTerminal.Models; using SunlightAggregationTerminal.Models;
using System.Collections.ObjectModel; using System.Collections.ObjectModel;
using System.Text.Json; using System.Text.Json;
using TouchSocket.Core;
namespace SunlightAggregationTerminal; namespace SunlightAggregationTerminal;
@ -19,14 +20,14 @@ public partial class QueryPage : ContentPage
ResultEntry.Text = scannedValue; ResultEntry.Text = scannedValue;
}); });
DyelotItems.Add(new DyelotItem Dictionary<string, object> QueryDictionary = new Dictionary<string, object>();
{ QueryDictionary.Add("Command", "Query");
Dyelot = "2134566", QueryDictionary.Add("StartTime", StartTime.Date.ToString()!);
Machine = "g01", DateTime EndTime_ = (DateTime)EndTime.Date!;
CreationTime = "", QueryDictionary.Add("EndTime", EndTime_.AddDays(1).ToString());
ReDye = "0", TcpServer.TcpTransmit(QueryDictionary.ToJsonString());
Information = "yyjjy\nfxfxdsdg\n",
});
CardCollectionView.ItemsSource = DyelotItems; CardCollectionView.ItemsSource = DyelotItems;
} }
private async void OnScanButtonClicked(object sender, EventArgs e) private async void OnScanButtonClicked(object sender, EventArgs e)
@ -63,7 +64,8 @@ public partial class QueryPage : ContentPage
} }
} }
} }
catch (Exception) { } catch (Exception ex) {
}
} }
public async void Query_Command(string dat) public async void Query_Command(string dat)

Loading…
Cancel
Save