StoreRequiScannerPage.xaml 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <?xml version="1.0" encoding="utf-8" ?>
  2. <mobile:MobilePage xmlns:local="clr-namespace:PRS.Mobile" xmlns="http://xamarin.com/schemas/2014/forms"
  3. xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" xmlns:zxing="clr-namespace:ZXing.Net.Mobile.Forms;assembly=ZXing.Net.Mobile.Forms"
  4. xmlns:mobile="clr-namespace:InABox.Mobile;assembly=InABox.Mobile.Shared"
  5. xmlns:views="http://xamarin.com/schemas/2020/toolkit"
  6. x:Class="PRS.Mobile.StoreRequiScannerPage">
  7. <NavigationPage.TitleView>
  8. <Grid Margin="0" Padding="0">
  9. <Grid.ColumnDefinitions>
  10. <ColumnDefinition Width="*"/>
  11. <ColumnDefinition Width="*"/>
  12. <ColumnDefinition Width="*"/>
  13. <ColumnDefinition Width="5"/>
  14. </Grid.ColumnDefinitions>
  15. <Button Grid.Column="0" HorizontalOptions="Start" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0"
  16. Text="Exit" Clicked="ExitBtn_Clicked"/>
  17. <Label Grid.Column="1" Text="Add items" VerticalOptions="Center" x:Name="titleLbl"
  18. HorizontalOptions="Center" HorizontalTextAlignment="Center" TextColor="White" FontSize="Medium" FontAttributes="Bold"/>
  19. <Button Grid.Column="2" HorizontalOptions="End" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0"
  20. IsVisible="false" x:Name="saveBtn"
  21. Text="Save" Clicked="SaveBtn_Clicked"/>
  22. </Grid>
  23. </NavigationPage.TitleView>
  24. <mobile:MobilePage.PageContent>
  25. <Grid Padding="5" RowSpacing="5">
  26. <Grid.RowDefinitions>
  27. <RowDefinition Height="3*"/>
  28. <RowDefinition Height="5*"/>
  29. </Grid.RowDefinitions>
  30. <mobile:MobileCard Padding="0" IsClippedToBounds="True">
  31. <Grid x:Name="scannerGrid">
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="*"/>
  34. <RowDefinition Height="21"/>
  35. <RowDefinition Height="4*"/>
  36. <RowDefinition Height="21"/>
  37. <RowDefinition Height="*"/>
  38. </Grid.RowDefinitions>
  39. <Grid.ColumnDefinitions>
  40. <ColumnDefinition Width="*"/>
  41. <ColumnDefinition Width="21"/>
  42. <ColumnDefinition Width="4*"/>
  43. <ColumnDefinition Width="21"/>
  44. <ColumnDefinition Width="*"/>
  45. </Grid.ColumnDefinitions>
  46. <zxing:ZXingScannerView
  47. Grid.Row="0"
  48. Grid.Column="0"
  49. Grid.RowSpan="5"
  50. Grid.ColumnSpan="5"
  51. x:Name="_scanView"
  52. Background="Gray"
  53. OnScanResult="ScanView_OnScanResult"/>
  54. <Polyline Points="20,00 00,00 00,20" Grid.Row="1" Grid.Column="1" x:Name="topleft" Stroke="Red" StrokeThickness="2"/>
  55. <Polyline Points="00,00 20,00 20,20" Grid.Row="1" Grid.Column="3" x:Name="topright" Stroke="Red" StrokeThickness="2"/>
  56. <Polyline Points="20,00 20,20 00,20" Grid.Row="3" Grid.Column="3" x:Name="bottomright" Stroke="Red" StrokeThickness="2"/>
  57. <Polyline Points="20,20 00,20 00,00" Grid.Row="3" Grid.Column="1" x:Name="bottomleft" Stroke="Red" StrokeThickness="2"/>
  58. <Label
  59. Text="Scan Barcode"
  60. TextColor="White"
  61. BackgroundColor="Transparent"
  62. Grid.Row="4"
  63. Grid.Column="0"
  64. Grid.ColumnSpan="5"
  65. HorizontalTextAlignment="Center"
  66. VerticalTextAlignment="Center"/>
  67. </Grid>
  68. </mobile:MobileCard>
  69. <views:DockLayout Grid.Row="1">
  70. <views:DockLayout Dock="Bottom">
  71. <Button
  72. Margin="2"
  73. TextColor="White"
  74. BackgroundColor="#15C7C1"
  75. CornerRadius="10"
  76. IsEnabled="False"
  77. x:Name="addBtn"
  78. Text="Add"
  79. FontAttributes="Bold"
  80. HorizontalOptions="FillAndExpand"
  81. VerticalOptions="Center"
  82. Padding="6,3,6,3"
  83. Clicked="AddItem_Clicked"
  84. views:DockLayout.Dock="Left"
  85. />
  86. <Label
  87. x:Name="countLbl"
  88. HorizontalOptions="Center"
  89. VerticalOptions="Center"
  90. IsVisible="false"
  91. views:DockLayout.Dock="Right"/>
  92. </views:DockLayout>
  93. <ListView
  94. x:Name="requiItemListView"
  95. HasUnevenRows="True"
  96. BackgroundColor="Transparent"
  97. views:DockLayout.Dock="Top"
  98. Margin="0,5,0,0">
  99. <ListView.ItemTemplate>
  100. <DataTemplate>
  101. <ViewCell Tapped="RequiItem_Tapped">
  102. <Frame Padding="3" BorderColor="{Binding BorderColor}" Margin="5" CornerRadius="10" HasShadow="False" BackgroundColor="{Binding Colour}">
  103. <Grid>
  104. <Grid.RowDefinitions>
  105. <RowDefinition Height="auto"/>
  106. <RowDefinition Height="auto"/>
  107. <RowDefinition Height="auto"/>
  108. </Grid.RowDefinitions>
  109. <Grid.ColumnDefinitions>
  110. <ColumnDefinition Width="60"/>
  111. <!--col 0-->
  112. <ColumnDefinition Width="60"/>
  113. <!--col 1-->
  114. <ColumnDefinition Width="*"/>
  115. <!--col 2-->
  116. <ColumnDefinition Width="60"/>
  117. <!--col 3-->
  118. </Grid.ColumnDefinitions>
  119. <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4"
  120. TextColor="#9f4576" LineBreakMode="WordWrap" Margin="4" VerticalOptions="Fill"
  121. Text="{Binding Summary}" IsVisible="{Binding IsNotes}"/>
  122. <!--col 0-->
  123. <Label Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" IsVisible="{Binding IsNotNotes}"
  124. Text="-" HorizontalOptions="FillAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"
  125. FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" VerticalOptions="FillAndExpand" Margin="5,0,0,0">
  126. <Label.GestureRecognizers>
  127. <TapGestureRecognizer Tapped="ReduceQtyBtn_Clicked" CommandParameter="{Binding .}"/>
  128. </Label.GestureRecognizers>
  129. </Label>
  130. <!--col 1-->
  131. <Entry Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" IsVisible="{Binding IsNotNotes}"
  132. x:Name="qtyLbl" Text="{Binding Quantity}" Keyboard="Numeric" TextColor="DimGray" TextChanged="Qty_Changed"
  133. FontSize="Large" FontAttributes="Bold" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" VerticalOptions="Center"/>
  134. <!--col 2-->
  135. <Label Grid.Row="0" Grid.Column="2" IsVisible="{Binding IsNotNotes}"
  136. x:Name="productLbl" Text="{Binding ProductName}"
  137. FontSize="Medium" FontAttributes="Bold" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" VerticalOptions="Center"/>
  138. <!--row 1-->
  139. <Label Grid.Row="1" Grid.Column="2" IsVisible="{Binding IsNotNotes}"
  140. x:Name="locationLbl" Text="{Binding LocationName}" TextColor="#9f4576"
  141. FontSize="Medium" FontAttributes="Bold" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" VerticalOptions="Center"/>
  142. <!--col 3-->
  143. <Label Grid.Row="0" Grid.RowSpan="2" Grid.Column="3" IsVisible="{Binding IsNotNotes}"
  144. Text="+" HorizontalOptions="FillAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"
  145. FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" VerticalOptions="FillAndExpand" Margin="0,0,5,0">
  146. <Label.GestureRecognizers>
  147. <TapGestureRecognizer Tapped="IncreaseQtyBtn_Clicked" CommandParameter="{Binding .}"/>
  148. </Label.GestureRecognizers>
  149. </Label>
  150. </Grid>
  151. </Frame>
  152. </ViewCell>
  153. </DataTemplate>
  154. </ListView.ItemTemplate>
  155. </ListView>
  156. </views:DockLayout>
  157. </Grid>
  158. </mobile:MobilePage.PageContent>
  159. </mobile:MobilePage>