StoreRequiScannerPage.xaml 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174
  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. x:Class="PRS.Mobile.StoreRequiScannerPage">
  6. <NavigationPage.TitleView>
  7. <Grid Margin="0" Padding="0">
  8. <Grid.ColumnDefinitions>
  9. <ColumnDefinition Width="*"/>
  10. <ColumnDefinition Width="*"/>
  11. <ColumnDefinition Width="*"/>
  12. <ColumnDefinition Width="5"/>
  13. </Grid.ColumnDefinitions>
  14. <Button Grid.Column="0" HorizontalOptions="Start" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0"
  15. Text="Exit" Clicked="ExitBtn_Clicked"/>
  16. <Label Grid.Column="1" Text="Add items" VerticalOptions="Center" x:Name="titleLbl"
  17. HorizontalOptions="Center" HorizontalTextAlignment="Center" TextColor="White" FontSize="Medium" FontAttributes="Bold"/>
  18. <Button Grid.Column="2" HorizontalOptions="End" VerticalOptions="Center" TextColor="White" BackgroundColor="Transparent" Margin="0" Padding="0"
  19. IsVisible="false" x:Name="saveBtn"
  20. Text="Save" Clicked="SaveBtn_Clicked"/>
  21. </Grid>
  22. </NavigationPage.TitleView>
  23. <mobile:MobilePage.PageContent>
  24. <Grid Padding="0">
  25. <Grid.RowDefinitions>
  26. <RowDefinition Height="auto"/>
  27. <RowDefinition Height="2*"/>
  28. <RowDefinition Height="5*"/>
  29. </Grid.RowDefinitions>
  30. <Label Grid.Row="0" Text="Scan a barcode or add item manually" HorizontalOptions="Center" VerticalOptions="Center" HorizontalTextAlignment="Center"/>
  31. <Grid Grid.Row="1" x:Name="scannerGrid">
  32. <Grid.RowDefinitions>
  33. <RowDefinition Height="*"/>
  34. <RowDefinition Height="*"/>
  35. <RowDefinition Height="*"/>
  36. <RowDefinition Height="*"/>
  37. <RowDefinition Height="*"/>
  38. <RowDefinition Height="*"/>
  39. </Grid.RowDefinitions>
  40. <Grid.ColumnDefinitions>
  41. <ColumnDefinition Width="*"/>
  42. <ColumnDefinition Width="*"/>
  43. <ColumnDefinition Width="*"/>
  44. <ColumnDefinition Width="*"/>
  45. <ColumnDefinition Width="*"/>
  46. <ColumnDefinition Width="*"/>
  47. </Grid.ColumnDefinitions>
  48. <Label Grid.Row="1" Grid.Column="0" x:Name="lblv1" IsVisible="false" Margin="0"
  49. VerticalOptions="Center" Rotation="90" HorizontalOptions="End" HeightRequest="2" WidthRequest="60"
  50. BackgroundColor="White"/>
  51. <Label Grid.Row="1" Grid.Column="1" x:Name="lblh1" IsVisible="false" Margin="0"
  52. VerticalOptions="Start" HorizontalOptions="Start" HeightRequest="2" WidthRequest="60"
  53. BackgroundColor="White"/>
  54. <Label Grid.Row="1" Grid.Column="5" x:Name="lblv2" IsVisible="false" Margin="0"
  55. VerticalOptions="Center" Rotation="90" HorizontalOptions="Start" HeightRequest="2" WidthRequest="60"
  56. BackgroundColor="White"/>
  57. <Label Grid.Row="1" Grid.Column="4" x:Name="lblh2" IsVisible="false" Margin="0"
  58. VerticalOptions="Start" HorizontalOptions="Start" HeightRequest="2" WidthRequest="60"
  59. BackgroundColor="White"/>
  60. <Label Grid.Row="4" Grid.Column="0" x:Name="lblv3" IsVisible="false" Margin="0"
  61. VerticalOptions="End" Rotation="90" HorizontalOptions="End" HeightRequest="2" WidthRequest="60"
  62. BackgroundColor="White"/>
  63. <Label Grid.Row="5" Grid.Column="1" x:Name="lblh3" IsVisible="false" Margin="0"
  64. VerticalOptions="Start" HorizontalOptions="Start" HeightRequest="2" WidthRequest="60"
  65. BackgroundColor="White"/>
  66. <Label Grid.Row="4" Grid.Column="5" x:Name="lblv4" IsVisible="false" Margin="0"
  67. VerticalOptions="End" Rotation="90" HorizontalOptions="Start" HeightRequest="2" WidthRequest="60"
  68. BackgroundColor="White"/>
  69. <Label Grid.Row="5" Grid.Column="4" x:Name="lblh4" IsVisible="false" Margin="0"
  70. VerticalOptions="Start" HorizontalOptions="Start" HeightRequest="1" WidthRequest="60"
  71. BackgroundColor="White"/>
  72. <zxing:ZXingScannerView Grid.Row="0" Grid.Column="0" Grid.RowSpan="6" Grid.ColumnSpan="6"
  73. x:Name="_scanView" VerticalOptions="FillAndExpand"/>
  74. <zxing:ZXingDefaultOverlay Grid.Row="0" Grid.Column="0" Grid.RowSpan="6" Grid.ColumnSpan="6"
  75. Opacity="0"
  76. x:Name="scannerOverlay" VerticalOptions="FillAndExpand"/>
  77. </Grid>
  78. <Label Grid.Row="1"
  79. x:Name="loadingLbl" Text="Loading Holdings, Please wait.." VerticalOptions="Center"
  80. HorizontalTextAlignment="Center" HorizontalOptions="CenterAndExpand"
  81. FontAttributes="Bold" FontSize="Medium" BackgroundColor="#9f4576" TextColor="White"/>
  82. <Frame Grid.Row="2" Padding="0">
  83. <StackLayout Padding="0">
  84. <Button Margin="2" TextColor="White" BackgroundColor="#15C7C1" CornerRadius="10" IsEnabled="False" x:Name="addBtn"
  85. Text="Manually add an item" FontAttributes="Bold" HorizontalOptions="FillAndExpand" VerticalOptions="Center" Padding="6,3,6,3"
  86. Clicked="AddItem_Clicked"
  87. />
  88. <Label x:Name="countLbl" HorizontalOptions="Center" VerticalOptions="Center" IsVisible="false"/>
  89. <ListView x:Name="requiItemListView" HasUnevenRows="True" BackgroundColor="Transparent" Grid.Row="1"
  90. Margin="0,5,0,0">
  91. <ListView.ItemTemplate>
  92. <DataTemplate>
  93. <ViewCell Tapped="RequiItem_Tapped">
  94. <Frame Padding="3" BorderColor="{Binding BorderColor}" Margin="5" CornerRadius="10" HasShadow="False" BackgroundColor="{Binding Colour}">
  95. <Grid>
  96. <Grid.RowDefinitions>
  97. <RowDefinition Height="auto"/>
  98. <RowDefinition Height="auto"/>
  99. <RowDefinition Height="auto"/>
  100. </Grid.RowDefinitions>
  101. <Grid.ColumnDefinitions>
  102. <ColumnDefinition Width="60"/>
  103. <!--col 0-->
  104. <ColumnDefinition Width="60"/>
  105. <!--col 1-->
  106. <ColumnDefinition Width="*"/>
  107. <!--col 2-->
  108. <ColumnDefinition Width="60"/>
  109. <!--col 3-->
  110. </Grid.ColumnDefinitions>
  111. <Label Grid.Row="0" Grid.Column="0" Grid.ColumnSpan="4"
  112. TextColor="#9f4576" LineBreakMode="WordWrap" Margin="4" VerticalOptions="Fill"
  113. Text="{Binding Summary}" IsVisible="{Binding IsNotes}"/>
  114. <!--col 0-->
  115. <Label Grid.Row="0" Grid.RowSpan="2" Grid.Column="0" IsVisible="{Binding IsNotNotes}"
  116. Text="-" HorizontalOptions="FillAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"
  117. FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" VerticalOptions="FillAndExpand" Margin="5,0,0,0">
  118. <Label.GestureRecognizers>
  119. <TapGestureRecognizer Tapped="ReduceQtyBtn_Clicked" CommandParameter="{Binding .}"/>
  120. </Label.GestureRecognizers>
  121. </Label>
  122. <!--col 1-->
  123. <Entry Grid.Row="0" Grid.RowSpan="2" Grid.Column="1" IsVisible="{Binding IsNotNotes}"
  124. x:Name="qtyLbl" Text="{Binding Quantity}" Keyboard="Numeric" TextColor="DimGray" TextChanged="Qty_Changed"
  125. FontSize="Large" FontAttributes="Bold" HorizontalTextAlignment="Center" VerticalTextAlignment="Center" VerticalOptions="Center"/>
  126. <!--col 2-->
  127. <Label Grid.Row="0" Grid.Column="2" IsVisible="{Binding IsNotNotes}"
  128. x:Name="productLbl" Text="{Binding ProductName}"
  129. FontSize="Medium" FontAttributes="Bold" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" VerticalOptions="Center"/>
  130. <!--row 1-->
  131. <Label Grid.Row="1" Grid.Column="2" IsVisible="{Binding IsNotNotes}"
  132. x:Name="locationLbl" Text="{Binding LocationName}" TextColor="#9f4576"
  133. FontSize="Medium" FontAttributes="Bold" HorizontalTextAlignment="Start" VerticalTextAlignment="Center" VerticalOptions="Center"/>
  134. <!--col 3-->
  135. <Label Grid.Row="0" Grid.RowSpan="2" Grid.Column="3" IsVisible="{Binding IsNotNotes}"
  136. Text="+" HorizontalOptions="FillAndExpand" VerticalTextAlignment="Center" HorizontalTextAlignment="Center"
  137. FontSize="Medium" TextColor="White" BackgroundColor="#15C7C1" FontAttributes="Bold" VerticalOptions="FillAndExpand" Margin="0,0,5,0">
  138. <Label.GestureRecognizers>
  139. <TapGestureRecognizer Tapped="IncreaseQtyBtn_Clicked" CommandParameter="{Binding .}"/>
  140. </Label.GestureRecognizers>
  141. </Label>
  142. </Grid>
  143. </Frame>
  144. </ViewCell>
  145. </DataTemplate>
  146. </ListView.ItemTemplate>
  147. </ListView>
  148. </StackLayout>
  149. </Frame>
  150. </Grid>
  151. </mobile:MobilePage.PageContent>
  152. </mobile:MobilePage>